Skip to main content

Logic

Constants

SymbolLaTeXNotation
True\top\top
’’\mathsf{T} \mathsf{T}
’’\operator{True} \operatorname{True}
False\bot\bot
’’\mathsf{F} \mathsf{F}
’’\operatorname{False} \operatorname{False}

Logical Operators

SymbolLaTeXNotation
Andp \land q p \land qConjunction
’’p \operatorname{and} q p \operatorname{and} q
Orp \lor q p \lor qDisjunction
’’p \operatorname{or} q p \operatorname{or} q
Xorp \veebar q p \veebar qExclusive Or
Nandp \barwedge q p \barwedge qNot And
Norp \char"22BD q p \char"22BD qNot Or
Not\lnot p \lnot pNegation
’’\operatorname{not} p \operatorname{not} p
Equivalentp \iff q p \iff q
’’p \Leftrightarrow q p \Leftrightarrow q
Impliesp \implies qp \implies q
’’p \Rightarrow qp \Rightarrow q
Provesp \vdash qp \vdash q
Entailsp \vDash qp \vDash q
Satisfiesp \models qp \models q

Quantifiers

["ForAll", condition, predicate]

The ForAll function represents the universal quantifier.

The condition is the variable or variables that are being quantified over or the set of elements that the variable can take.

The predicate is the statement that is being quantified.

The condition and the predicate are separated by a comma, a colon, or a vertical bar. The predicate can also be enclosed in parentheses after the condition.

\forall x, x + 1 > x
$$\forall x, x + 1 > x$$
\forall x: x + 1 > x
$$\forall x: x + 1 > x$$
\forall x\mid x + 1 > x
$$\forall x\mid x + 1 > x$$
\forall x( x + 1 > x)
$$\forall x( x + 1 > x)$$
\forall x \in \R, x + 1 > x
$$\forall x \in \R, x + 1 > x$$
["ForAll", "x", ["Greater", ["Add", "x", 1], "x"]]

["ForAll", ["Element", "x", "RealNumbers"], ["Greater", ["Square", "x"], 0]]

["Exists", condition, predicate]

The Exists function represents the existential quantifier.

The condition is the variable or variables that are being quantified over, and the predicate is the statement that is being quantified.

The condition and the predicate are separated by a comma, a colon, or a vertical bar. The predicate can also be enclosed in parentheses after the condition.

\exists x, x^2 = 1
$$\exists x, x^2 = 1$$
\exists x: x^2 = 1
$$\exists x: x^2 = 1$$
\exists x\mid x^2 = 1
$$\exists x\mid x^2 = 1$$
\exists x( x^2 = 1)
$$\exists x( x^2 = 1)$$
["Exists", "x", ["Equal", ["Square", "x"], 1]]

["Exists", ["Element", "x", "RealNumbers"], ["Equal", ["Square", "x"], 1]]

["ExistsUnique", condition, predicate]

The ExistsUnique function represents the unique existential quantifier.

\exists! x, x^2 = 1
$$\exists! x, x^2 = 1$$