From a contradiction, anything

exfalso and absurd let a contradiction prove any goal.

14 minBeginnerexfalsoabsurdthe principle of explosion
0/11 completed in this course

From False, anything follows. Lean states this as False.elim : False → C for any proposition C. The rule is sound precisely because False has no proofs, so it can never be used on a real one.

exfalso turns whatever goal you have into False. Reach for it when the goal has nothing to do with your hypotheses and the hypotheses contradict each other. After exfalso the goal is ⊢ False, and the previous lesson takes over.

absurd hp hnp does both steps at once: given a proof and its negation it produces a proof of any proposition. The worked example uses it to conclude something plainly false about a number, which is legitimate, because the assumptions it was handed can never both hold.

Prefer exfalso when you want the shape of the argument visible in the proof, and absurd when the contradiction is already sitting in front of you.

Worked example

example (n : Nat) (h : n = 3) (hn : ¬ (n = 3)) : n = 100 := by
  exact absurd h hn

The conclusion is false for almost every n, and the proof is still correct: the two hypotheses cannot both hold, so the theorem never applies to anything. Your exercise proves an abstract Q the same way, but with the two steps written out.

Takeaway

Contradictory hypotheses prove any goal: exfalso then derive False, or absurd hp hnp in one move.

Exercise 1 of 3

Prove Q from the contradictory hypotheses hp and hnp.

Suggested steps
  1. Replace the goal by False, or use absurd directly
  2. Derive the contradiction from hp and hnp

These marks only recognize text. Another correct proof may use different steps; Lean checks whether it works.

Exercise.lean
1theorem exercise (P Q : Prop) (hp : P) (hnp : ¬P) : Q := by
given
Loading editor…

Where you start. Everything above ⊢ may be assumed; the line below it is what you must prove.

P Q:Prop
hp:P
hnp:¬P
⊢Q
ReadyLn 1, Col 1Lean 4
Draft saved in this browser
Stuck?
Recall and apply

Knowledge check

Answer without looking back, then check your reasoning.

0of 3
correct
Question 1 of 3What does exfalso do to the goal?
Question 2 of 3Is a theorem with contradictory hypotheses useful?
Question 3 of 3What is the type of absurd hp hnp when hp : P and hnp : ¬P?