How do I prove this in Lean? p ∨ ¬p

261 Views Asked by At

I have a theorem to prove on lean,

theorem T (h : ¬ A) : ¬ (A ∨ B) ∨ (¬ A ∧ B)

For which to prove, I guess, I need to use,

or.elim (B ∨ ¬B) (assume b: B, ...) (assume nb:¬B, ...)

For which, again, I have to prove

B v ¬B

So, how do I proceed with this? Is there any better method?

2

There are 2 best solutions below

0
On
import tactic

variables (A B : Prop)

theorem T (h : ¬ A) : ¬ (A ∨ B) ∨ (¬ A ∧ B) := by tauto!
0
On

p v ¬p is a lemma from the core library called classical.em.