There is a specific explanation for each of the examples.

an algebra with unit e;

Every algebra had a unique unit which is a property of it; for this algebra the unit is e. It cannot be "a unit" because there is only one unit. This is perhaps a contraction of "with the unit being e".

an operator with domain H2;

Similar. Every operator has a domain, and only one domain.

a solution with vanishing Cauchy data;

"Data" is plural, so no article is needed.

a cube with sides parallel to the axes;

Plural, and all sides are parallel to the axes, so no article. If only one side is parallel, it would have to have an aritcle; "a side parallel" or "one side parallel".

a domain with smooth boundary;

As before, the boundary is referred to as a property of the domain, and not as just a curve; there is only one boundary, and it is smooth. Can be "with the boundary being smooth".

an equation with constant coefficients;

Plural.

a function with compact support;

Property of a function

random variables with zero expectation

The expectation is a property of the distribution, which is a property of the RV.

But

Let В be a Banach space with a weak symplectic form w.

W is some weak symplectic form, it is not determined, so use an indeterminate article.

Two random variables with a common distribution.

Some distribution, which is common to both, but otherwise not specified. If it was specified, the article would be omitted: "two random variables with common distribution N(0, 1)".

2It's a good question. In general, the rules for using articles are the same after

withas they would be anywhere else (e.g. "A manwith a dog"), but I think in this kind of technical writing the noun is used almost like a title or name. Also, in headlines, signs, and instructions, it's very common to leave out articles, like "Place wax paper on table" (even thoughpaperandcounterare countable and specific), and this may be a related phenomenon. – stangdon – 2017-01-06T16:16:46.5571I don't believe you're going to find a rule that works for most situations, because whether you use the article really depends on what you are trying to communicate, and not on the word 'with'. Ok not happy with my examples. Let me think about it. – ColleenV – 2017-01-09T17:24:42.780

Note that the book mentioned by the OP and which the quoted text was taken from is

– Damkerng T. – 2017-01-09T21:08:53.993Writing Mathematical Papers in English: A Practical GuideBy Jerzy Trzeciak, page 26. (For your convenience, you can click this link to see the quoted text as printed in the book: http://i.stack.imgur.com/afe7w.jpg.)