feat: add [recursor] attribute to Iff.elim

This commit is contained in:
Leonardo de Moura 2020-04-09 10:45:27 -07:00
parent 40336131bb
commit 7a5fcfae8b
2 changed files with 7 additions and 0 deletions

View file

@ -760,6 +760,7 @@ def Or.symm := @Or.swap
/- xor -/
def Xor (a b : Prop) : Prop := (a ∧ ¬ b) (b ∧ ¬ a)
@[recursor 5]
theorem Iff.elim (h₁ : (a → b) → (b → a) → c) (h₂ : a ↔ b) : c :=
Iff.rec h₁ h₂

View file

@ -76,3 +76,9 @@ begin
| nil => exact rfl
| cons z zs => exact absurd rfl (h z zs)
end
theorem tst10 {p q : Prop } (h₁ : p ↔ q) (h₂ : p) : q :=
begin
induction h₁ using Iff.elim with
| _ h _ => exact h h₂
end