I've sometimes seen that this operator is used to specify that each of given variables is in some set, e.g. Reals
. Like (x|y|z) ∈ Reals
as a shorthand for x ∈ Reals && y ∈ Reals && z ∈ Reals
. This was in the context of specifying Assumptions
to functions like Simplify
or Integrate
.
But I remember that when I tried something like this (don't remember exactly what), for some reason it gave me unexpected results, so I've been staying clear of this syntax for a while.
I've read the the documentation on the Alternatives
operator,
$p_1|p_2|\ldots$
is a pattern object that represents any of the patterns $p_i$.
If a named pattern such as
x_
appears in $p_i$ that are not used in a particular match, then the named pattern is taken to have a value that is a zero-length sequenceSequence[]
.
But that didn't make it clear what the "any" means.
Now I'm wondering: what is the difference between the two variants? FullSimplify
for equality doesn't appear to say True
, so I assume they are different. What are the conditions for (x|y|z)∈Reals
to mean exactly that each of $x$, $y$ and $z$ is in $\mathbb R$, as does the &&
-chained version?
Element[a|b, set]
, but you can useElement[{a,b}, set]
to get the behavior equivalent toElement[a,set] && Element[b,set]
. $\endgroup$LogicalExpand[! LogicalExpand[! exp1]]
will expand exactly toexp2
(see Element, under Properties&Relations). TheElement
documentation also states that all elements need to be part of the domain for the(x|y|z)∈Reals
syntax, answering your original question directly. $\endgroup$