Equal
“is equal to”
Both sides have the same value.
x = 5
- Unicode
- U+003D
- HTML
- =
- LaTeX
- =
- Code
- == / ===
Tool
Every logic symbol in one place, a translator from plain sentences to logic, and a truth table builder.
Write a statement in plain English. Each simple statement becomes a letter, and words like and, or, not, if…then, unless, only if, all and some become symbols.
Try an example
Works best with one idea per clause. English can be ambiguous — if a result looks wrong, try rephrasing (for example “if A then B” instead of “B when A”).
In logic
—
Key
Type a formula with symbols or plain keys: ~ ! not, & && and, | || or, xor, -> =>, <-> <=> iff, nand nor, T F.
Reads as
Result
Truth table
Meaning, how to read it, and how to type it in HTML, LaTeX and code.
Relations between values.
“is equal to”
Both sides have the same value.
x = 5
“is not equal to”
The two sides have different values.
x ≠ 0
“is less than”
The left side is strictly smaller.
3 < 7
“is greater than”
The left side is strictly larger.
age > 18
“is at most”
Smaller than, or equal to, the right side.
x ≤ 10
“is at least”
Larger than, or equal to, the right side.
age ≥ 18
“is approximately”
Close enough to be treated as equal.
π ≈ 3.14
“is equivalent to”
Always has the same value (logical equivalence, or congruence in modular arithmetic).
P ∨ Q ≡ Q ∨ P
Combine statements into bigger statements (propositional logic).
“not P”
True when P is false. Also written ~P or !P.
¬(x > 5)
“P and Q”
True only when both P and Q are true.
P ∧ Q
“P or Q”
True when at least one is true (inclusive or).
P ∨ Q
“either P or Q, not both”
True when exactly one is true.
P ⊕ Q
“if P then Q”
False only when P is true and Q is false.
Rain → Wet
“P if and only if Q”
True when P and Q have the same truth value.
P ↔ Q
“P entails Q”
Used between statements: whenever the left holds, the right must hold.
x > 3 ⇒ x > 1
“P is equivalent to Q”
Each statement implies the other.
¬¬P ⇔ P
“not both P and Q”
False only when both are true.
P ↑ Q
“neither P nor Q”
True only when both are false.
P ↓ Q
“top / true”
A statement that is always true.
P ∨ ¬P ≡ ⊤
“bottom / false”
A statement that is always false.
P ∧ ¬P ≡ ⊥
Talk about all or some things (predicate logic).
“for every x”
The statement holds for every member of the domain.
∀x (Cat(x) → Mammal(x))
“there is at least one x”
The statement holds for at least one member.
∃x (x > 5)
“there is no x”
No member satisfies the statement.
∄x (x < 0)
“there is exactly one x”
Exactly one member satisfies the statement.
∃!x (x + 2 = 5)
Membership and operations on collections.
“x is in A”
x is a member of the set A.
3 ∈ {1, 2, 3}
“x is not in A”
x is not a member of A.
4 ∉ {1, 2, 3}
“A is a subset of B”
Every member of A is also in B (A may equal B).
{1} ⊆ {1, 2}
“A is a proper subset of B”
A ⊆ B and A ≠ B.
{1} ⊂ {1, 2}
“A is not a subset of B”
Some member of A is not in B.
{3} ⊄ {1, 2}
“A is a superset of B”
A contains every member of B.
{1, 2} ⊇ {2}
“A union B”
Everything in A, in B, or in both.
{1} ∪ {2} = {1, 2}
“A intersect B”
Only what is in both A and B.
{1, 2} ∩ {2, 3} = {2}
“A minus B”
What is in A but not in B.
{1, 2} ∖ {2} = {1}
“the empty set”
The set with no members.
A ∩ ∅ = ∅
“A cross B”
All ordered pairs (a, b) with a in A and b in B.
{1} × {x, y}
“the power set of A”
The set of all subsets of A.
𝒫({1}) = {∅, {1}}
Reasoning about statements.
“therefore”
Introduces a conclusion.
P, P → Q ∴ Q
“because”
Introduces a reason.
Q ∵ P
“P proves Q”
Q can be derived from P using the rules of a proof system.
P ∧ Q ⊢ P
“P entails Q”
Q is true in every case where P is true.
P ⊨ P ∨ Q
“is defined as”
The left side is defined to mean the right side.
f(x) ≔ x²
“necessarily P”
Modal logic: P is true in every possible world.
□P → P
“possibly P”
Modal logic: P is true in some possible world.
P → ◇P
“which was to be shown”
Marks the end of a proof.
… ∎
How each connective behaves for every combination of P and Q (T = true, F = false).
| P | Q | ¬P | P ∧ Q | P ∨ Q | P ⊕ Q | P → Q | P ↔ Q | P ↑ Q | P ↓ Q |
|---|---|---|---|---|---|---|---|---|---|
| T | T | F | T | T | F | T | T | F | F |
| T | F | F | F | T | T | F | F | T | F |
| F | T | T | F | T | T | T | F | T | F |
| F | F | T | F | F | F | T | T | T | T |
Keep exploring