Proof Hike · Module 1 · Lean 4.36.0
Lean as a calculator.
Make things. Try things. See what happens.
The five steps
- Example 1: Meet your new calculator
- Example 2: Everything has a type
- Example 3: Make a function
- Example 4: Words and collections
- Example 5: Make a decision
New words
- Expression
- A piece of code that describes a term. Well-typed expressions have types.
- Natural number
- Zero or a positive whole number. Lean’s Nat type does not contain negative integers or fractions.
- Evaluation
- Computing the value described by an expression. Evaluation alone is different from stating a theorem.
- Type
- A classification of terms. It tells Lean what kind of term is required in a position.
- Term
- A value or expression inhabiting a type. Functions, data values, and proofs can all be terms.
A checked example
#eval 2 + 3 * 4
#eval (2 + 3) * 4
#eval (17 : Nat) / 5
example : (2 + 3 * 4 : Nat) = 14 := by
rfl
Before you move on
- Explain the claim in everyday words.
- Identify what Lean expects at each step.
- Complete the warm-up exercises.
- Read an error and explain its fix.
The full lesson includes the captured Lean output, hints, stretch tasks, and checked solutions.
Use your browser’s Print command. This course stores progress only in the learner’s browser.