Appendix A: List of Recognized Symbols and Tokens

Token Display Symbol Description Recognized String(s)
TIdent Identifier (variable or function name) A letter followed by zero or more letters, numbers, or underscores (e.g. x Fn example_ident p2)
TFloatLit Literal decimal number and/or scientific notation Any positive number (Note: negation is treated operation) with a decimal point or 'e' somewhere in it (e.g. 0.3 .125 3.14 6.02e23 1.602E-19)
TIntLit Integer One or more decimal digits (e.g. 1234 095 42 7)
TConstant An identifier that has a constant value (number, set, or truth value) Usually preceded by a # sign, but some keywords are recognized. See the list of constants below.
TPlus \( + \) Addition +
TMinus \( - \) Subtraction -
TPlusMinus \( \pm \) "Plus or Minus" &pm +/-
TMinusPlus \( \mp \) "Minus or Plus" &mp -/+
TTimes \( \cdot \) Multiplication *
TDivide \( \tfrac{a}{b} \) Division (vertical notation) /
TSlash \( a/b \) Division (horizontal notation) &/
TRatio \( a:b \) Ratio ("the ratio of a to b") &:
TExponent \( a^b \) Exponentiation/Power ^ **
TSuperscript \( a^b \) Superscript Index Selector &^
TSubscript \( a_b \) Subscript Index Selector &_
TRatioEqual \( a:b :: c:d \) Equal Relation Operator for ratios ("a is to b as c is to d") :: as
TModulus \( \mathrm{mod} \) Modular Arithmetic Operator mod %
TBang \( ! \) Exclamation Point (used for negation and factorial) !
TChoose \( \binom{\Box}{\Box} \) Binomial Coefficent choose
TReal \( \Re \) Real Part Filter Operator &Re
TImaginary \( \Im \) Imaginary Part Filter Operator &Im
TEqual \( = \) "Equal To" Relation Operator (for algebraic expressions) = ==
TNotEqual \( \ne \) "Not Equal To" Relation Operator (for algebraic expressions) != /= <>
TLess \( < \) "Less Than" Relation Operator <
TGreater \( > \) "Greater Than" Relation Operator >
TLessEqual \( \le \) "Less Than or Equal" Relation Operator <=
TGreaterEqual \( \ge \) "Greater Than or Equal To" Relation Operator >=
TDivides \( \mid \) Divisibility Relation Operator divides
TNotDivides \( \nmid \) Negation of Divisibility Relation ~| /| ndivides ndivide notdivides notdivide
TCongruent \( \cong \) "Congruent" Relation Operator ~= congruent
TSimilar \( \sim \) "Similar To" Relation Operator (sometimes also TTilde depending on context) similar sim
TParallel \( \parallel \) "Parallel To" Relation Operator parallel para
TPerpendicular \( \perp \) "Perpendicular To" Relation Operator perpendicular perp
TSubset \( \subseteq \) Subset Relation Operator subset
TPropSubset \( \subset \) Proper Subset Relation Operator propersubset propsubset psubset
TSuperset \( \supseteq \) Superset Relation Operator superset supset
TPropSuperset \( \supset \) Proper Superset Relation Operator propersuperset propersupset propsuperset propsupset psuperset psupset
TIn \( \in \) Inclusion Relation Operator in
TPipe \( \mid \) Vertical Bar Character |
TUnion \( \cup \) Set Union Operator union
TIntersect \( \cap \) Set Intersection Operator intersect
TSetDiff \( \setminus \) Set Difference Operator \ minus
TDirectSum \( \oplus \) Direct Sum Operator &o+
TCartesianProduct \( \times \) Cartesian Product Operator &*
TEquiv \( \equiv \) "Equivalent" Relation Operator === equiv
TNotEquiv \( \not\equiv \) "Not Equivalent" Relation Operator !== /== nequiv
TQForall \( \forall \) Universal Quantification ("for all") forall
TQExists \( \exists \) Existential Quantification ("there exists") exists
TQUnique \( \exists ! \) Unique Quantification ("there exists a unique") unique
TIff \( \leftrightarrow \) Biconditional Logical Operator ("if and only if") <-> iff
TImplies \( \rightarrow \) Conditional Logical Operator ("implies", "if-then") -> implies onlyif
TIf \( \leftarrow \) Reverse Conditional Logical Operator ("implied by") <- if when whenever impliedby
TThen Keyword used for parsing "if-then" implication then
TAnd \( \wedge \) Logical Conjunction and &&
TOr \( \vee \) Logical Disjunction or ||
TXor \( \veebar \) Logical Exclusive-Or xor
TNot \( \neg \) Logical Negation (sometimes also TTilde or TBang depending on context) not
TTilde \( \sim \) Tilde Character (used for negation and similarity) ~
TCompose \( \circ \) Function Composition Operator @
TSelfCompose \( f^{\circ n} \) Function Self-Composition Operator @@
TPrime \( ' \) Prime Differentiation '
TDotDiff \( \dot{} \) Dot Differentiation .
TChangeDelta \( \Delta \) Difference Operator &D
TDifferential \( \mathrm{d} \) Differential "D" &d
TDivDiff \( \frac{}{\mathrm{d}\Box} \) Denominator of handwritten differential syntax (&d (x^2) /&dx) /&d
TPartial \( \partial \) Partial Differential "D" &pd
TDivPartial \( \frac{}{\partial\Box} \) Denominator of handwritten partial differential syntax (&pd (x^2) /&pdx) /&pd
TIntegral \( \int \) Integration Symbol &integral &Integral &int &Int ... (case insensitive)
TLimit \( \lim \) Limit Indicator Function &lim &limit &Lim &Limit ... (case insensitive)
TSum \( \sum \) Sum Operator &sum &Sum ... (case insensitive)
TProduct \( \prod \) Product Operator &prod &product &Prod &Product ... (case insensitive)
TBigUnion \( \bigcup \) Universal Union Operator &Union
TBigIntersect \( \bigcap \) Universal Intersection Operator &Intersect
TVectorizer \( \vec{} \) Arrow over a vector variable &v
TUnitVectorizer \( \hat{} \) "Hat" over a unit vector variable &u
TDot \( \cdot \) Dot Product Operator &.
TCross \( \times \) Cross Product Operator &x
TWedge \( \wedge \) Wedge Product Operator &w
TTensor \( \otimes \) Tensor Product Operator &ox
TGradient \( \vec{\nabla} \) Gradient Operator ("del" or "grad") &del &grad
TDivergence \( \vec{\nabla} \cdot \) Divergence Operator ("div") &del. &div
TCurl \( \vec{\nabla} \times \) Curl Operator ("curl") &delx &curl
TLParen \( \left( \ \right. \) Left (Open) Parenthesis (
TRParen \( \left. \ \right) \) Right (Close) Parenthesis )
TLCurlyBrace \( \left\{ \ \right. \) Left (Open) Curly Brace {
TRCurlyBrace \( \left. \ \right\} \) Right (Close) Curly Brace }
TLSqBracket \( \left[ \ \right. \) Left (Open) Square Bracket [
TRSqBracket \( \left. \ \right] \) Right (Close) Square Bracket ]
TLRangeInclusive \( \left[ \ \right. \) Left Delimiter for Inclusive Range [:
TRRangeInclusive \( \left. \ \right] \) Right Delimiter for Inclusive Range :]
TLRangeExclusive \( \left( \ \right. \) Left Delimiter for Exclusive Range (:
TRRangeExclusive \( \left. \ \right) \) Right Delimiter for Exclusive Range :)
TLPipe \( \left| \ \right. \) Left Pipe Delimiter |:
TRPipe \( \left. \ \right| \) Right Pipe Delimiter :|
TLDoublePipe \( \left\| \ \right. \) Left Double-Pipe ("Norm") Delimiter ||:
TRDoublePipe \( \left. \ \right\| \) Right Double-Pipe ("Norm") Delimiter :||
TLVector \( \left\langle \ \right. \) Left Angle Bracket <:
TRVector \( \left. \ \right\rangle \) Right Angle Bracket :>
TSuchThat \( : \) Colon Character ("such that") :
TSemicolon \( ; \) Semi-Colon Character ;
TComma \( , \) Comma separator ,

List of Constants

Symbol Description Constant
\( \mathbf{T} \) Boolean constant True #T #true true, ... (case insensitive)
\( \mathbf{F} \) Boolean constant False #F #false false, ... (case insensitive)
\( \pi \) \( \approx 3.14159 \) #p #pi
\( \tau \) \( = 2 \pi \approx 6.28318 \) #tau
\( \mathrm{e} \) \( \approx 2.71828 \) #e
\( \gamma \) \( \approx 0.57722 \) #gamma
\( \infty \) #!ERROR: memory overflow #infinity infinity
\( \mathbb{N} \) Set of Natural Numbers #N
\( \mathbb{Z} \) Set of Integers #Z
\( \mathbb{Q} \) Set of Rational Numbers #Q
\( \mathbb{R} \) Set of Real Numbers #R
\( \mathbb{C} \) Set of Complex Numbers #C
\( \mathbb{H} \) Set of Quaternion Numbers #H
\( \mathbb{O} \) Set of Octonian Numbers #O
\( \mathbb{U} \) Universal Set #U
\( \vec{0} \) Zero Vector #v0
\( \hat\imath \) x-axis unit vector #vi #ui
\( \hat\jmath \) y-axis unit vector #vj #uj
\( \hat{k} \) z-axis unit vector #vk #uk
\( \mathbf{0} \) Zero Matrix #0
\( \mathbf{I} \) Identity/Unit Matrix #1