Infix Math Operators

An entry in the last column indicates that the operator is usable only in LaTeX (L) or only in Plain TeX (P).
Symbol or Macro MeaningReadingPrecedence Restrictions
\c Logical Implication implies 2
\cond Conditionally Existent Term then 3
\els Definitional Otherwise else 3
\Iff Logical Equivalence if and only if 4
\And Logical Conjunction and 5
\Or Logical Disjunction or 5
\ident Identity is identical to 6
= Equality equals 6
\in Elementhood belongs to 6
\i Inclusion subset of 6 P
\subset Inclusion subset of 6 L
Inequality less than 6
Inequality greater than 6
\leInequality less than or equal to 6
\geInequality greater than or equal to 6
\neInequality not equal to 6
\i \neProper Inclusion proper subset of 6 P
\subset\neProper Inclusion proper subset of 6 L
\notinNon-membership not an element of 6
\djnDisjointness does not intersect with 6
\ordersOrder Relation orders 6
,Tuple Operator comma 6
+ Addition plus 9
- Subtraction minus 9
\cdot Multiplication times 13
\cap Set Intersectionintersect 15
\cup Set Unionunion 15
\dsj Disjoint Uniondisjoint union 15
\cmp Functional Composition composed with 15
\lilx Cartesian Product cross 15
\symdif Symmetric Difference symmetric difference17
\setdif Set Difference minus 17
\toThe Exponentiation to the power 17


These operators may of course be combined to form complex expressions but they must however be used within at least one pair of parentheses.

One apparent omission from this table is mention of left vs. right associativity. The parser however does not automatically group repeated operations to the left or to the right. Repeated operations are in general left to the user to define. In the case of operations tagged as having both the associative and commutative properties however the parser removes extra parentheses and the unifier attempts to match operands irrespective of where they occur in the sequence of operands. At present conjunction is tagged in this way by the prep program and no other operators are so tagged. In time more operators will be tagged by default and more properties will be built-in, but at this stage it is helpful to keep assumptions minimal in order to better understand the behavior of the system.

Another apparent omission from the table is functional evaluation. This is omitted partly because including it would usurp adjacent-writing which is the prime location on the parse tree, partly because with outer parentheses (f(x)) is cumbersome, and partly because the non-parenthetical Morse notation using an initial dot very works well.