-
-
Save Ruben-VandeVelde/ef797b8fb8d8f9bf51dd5218c118ccee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lemma pnat.strong_induction_on {p : pnat → Prop} (n : pnat) (h : ∀ k, (∀ m, m < k → p m) → p k) : p n := | |
begin | |
let p' : nat → Prop := λ n, if h : 0 < n then p ⟨n, h⟩ else true, | |
have : ∀ n', p' n', | |
{ | |
intro n', | |
refine nat.strong_induction_on n' _, | |
intro k, | |
dsimp [p'], | |
split_ifs, | |
{ | |
intros a, | |
apply h, | |
intros m hm, | |
have := a m.1 hm, | |
split_ifs at this, | |
{ | |
convert this, | |
simp only [subtype.coe_eta, subtype.val_eq_coe], | |
}, | |
{exfalso, | |
exact h_2 m.2}}, | |
{intros, trivial} | |
}, | |
have a := this n.1, | |
dsimp [p'] at a, | |
split_ifs at a, | |
{ convert a, simp only [subtype.coe_eta], }, | |
{ exfalso, exact h_1 n.pos }, | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment