I want to talk about collections where each element may be one of a couple types, either X or Y (independently of others).
If English had parentheses, I could say "contains only (X or Y)s". And that's the logic I used in a computer program.
But in a textual comment explaining the program's goal, I preferred to speak of the whole collection, which is likely to (1) contain a mix of Xs and Ys, though allowed to (2) contain only Xs, or (3) only Ys.
I originally used "contains only Xs and Ys" wording but was questioned by a colleague why I said "and".
Apparently they read it to mean "must contain some Xs and some Ys, and nothing else" — scenario (1) only.
Is "only Xs and Ys" inherently ambiguous between (1)/(2)/(3) vs (1) meanings?
Can I write "contains only Xs or Ys"?
I'm worried that's also inherently ambiguous, could be read as "either only Xs (2) or only Ys (3) but not both"?
How about "contains only Xs and/or Ys"?
Is that a good way to capture (1)/(2)/(3) clearly?
Is there a "distributive law" for how to read conjunctions after "only"?