Proof Hike · Module 9 · Lean 4.36.0

Logic puzzles.

Follow clues, rule out alternatives, and test a claim with one counterexample.

The five steps

  1. Example 41: Reason from a missing badge
  2. Example 42: Rule out one possibility
  3. Example 43: Keep a clue in both cases
  4. Example 44: Connect two two-way rules
  5. Example 45: Test a claim with one witness

New words

Implication
A proposition saying that a proof of a premise can be turned into a proof of a conclusion.
Negation
A not statement. In Lean, a proof of not P turns a proof of P into a proof of False.
Contradiction
A situation where the available assumptions produce a proof of False. A compiler error is not such a proof.
Disjunction
An inclusive or statement. A proof supplies one side; both sides may also be true.
Case
One possibility determined by the constructor that built a value. A proof by cases handles every possibility.

A checked example

E41.leanTry it live (opens official Lean editor)
example (P Q : Prop) (rule : P → Q) (missing : ¬ Q) : ¬ P := by
  intro hp
  exact missing (rule hp)

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.