A small translation guide
Symbols, in plain words.
Type the backslash shortcut in the Lean editor, then press Space or Tab. The editor turns it into the symbol.
The logic symbols, as pictures
- ∧and
P ∧ Q needs both. Like a door with two locks: you need both keys.
- ∨or
P ∨ Q needs at least one. Two doors: one open door is enough.
- ¬not
¬P says P is false. In Lean: P would lead to something impossible.
- →implies
P → Q is a promise: give me P and I will give you Q.
- ↔if and only if
P ↔ Q is a two-way promise: P gives Q, and Q gives P.
- ∀for all
∀ x, P x: every single x passes. Not just the ones you tried.
- ∃there exists
∃ x, P x: at least one x passes. Point to it to prove it.
Every symbol in the course
| Symbol | Read it as | How to type it | Meet it |
|---|---|---|---|
| → | implies between propositions; function arrow between types | \to | Example 11 |
| ∀ | for all | \forall | Example 19 |
| ∃ | there exists | \exists | Example 20 |
| ∧ | and | \and | Example 12 |
| ∨ | or (at least one side) | \or | Example 14 |
| ¬ | not | \not | Example 16 |
| ↔ | if and only if | \iff | Example 18 |
| ≠ | not equal | \ne | Example 7 |
| ≤ | less than or equal to | \le | Example 25 |
| ∣ | divides | \dvd | Example 38 |
| ⊢ | the goal starts here | \vdash | Example 6 |
| ℕ | the natural numbers (Mathlib notation for Nat) | \N | Example 36 |
| ℤ | the integers (Mathlib notation for Int) | \Z | Example 27 |
| ℚ | the rational numbers | \Q | Example 27 |
| ℝ | the real numbers | \R | Example 26 |
| ⟨ | start an anonymous constructor | \langle | Example 13 |
| ⟩ | end an anonymous constructor | \rangle | Example 13 |
| ← | reverse an equality when rewriting | \l | Example 23 |
| · | focus one goal | \cdot | Example 12 |
| α | a type variable in our list examples | \alpha | Example 32 |
These shortcuts are editor features. You can also copy a symbol directly. The turnstile usually appears in Lean’s output; it is not part of the statement you type.