Skip to content
LeanLearn
Level 2~35 minLean 4

Writing proofs: direct proof and proof by cases

Put the lines of real proofs in order, spot the lines that only look right, and then write the same proofs in Lean.

You will be able to
  • Structure a direct proof: from hypotheses, through justified steps, to the conclusion.
  • Use a definition (such as 'even') to turn a claim into something you can calculate with.
  • Split a proof into cases that cover every possibility.
  • Recognise common faulty proof steps.

Recommended first: Proving and using OR, All and some: ∀ and ∃. You can start anyway. Nothing is locked.

EncounterActivity 1 of 9

Encounter

Most proofs you will meet are direct proofs: you assume the hypotheses and move, one justified step at a time, to the conclusion. Every step must follow from definitions, earlier steps, or facts already proved.

The first step is often to unfold a definition. "n is even" is vague until you say what it means:

nn is even when n=2kn = 2k for some natural number kk, that is, ∃k,  n=2k\exists k,\; n = 2k.

Now "the sum of two even numbers is even" becomes something we can calculate with.