chore(library/logic/wf): cleanup

This commit is contained in:
Leonardo de Moura 2014-11-10 21:19:38 -08:00
parent e2ce942513
commit 9c93816211

View file

@ -104,9 +104,8 @@ context
definition accessible {a : A} (ac : acc R (f a)) : acc (inv_image R f) a := definition accessible {a : A} (ac : acc R (f a)) : acc (inv_image R f) a :=
have gen : ∀x, f x = f a → acc (inv_image R f) x, from have gen : ∀x, f x = f a → acc (inv_image R f) x, from
acc.rec_on ac acc.rec_on ac
(λ (x : B) (ax : _) (λx acx (iH : ∀y, R y x → (∀z, f z = y → acc (inv_image R f) z))
(iH : ∀y, R y x → (∀z, f z = y → acc (inv_image R f) z)) (z : A) (eq₁ : f z = x),
(z : A) (eq₁ : f z = x),
acc.intro z (λ (y : A) (lt : R (f y) (f z)), acc.intro z (λ (y : A) (lt : R (f y) (f z)),
iH (f y) (eq.rec_on eq₁ lt) y rfl)), iH (f y) (eq.rec_on eq₁ lt) y rfl)),
gen a rfl gen a rfl
@ -125,19 +124,19 @@ trans : ∀a b c, tc R a b → tc R b c → tc R a c
namespace tc namespace tc
context context
parameters {A : Type} {R : A → A → Prop} parameters {A : Type} {R : A → A → Prop}
notation `R⁺` := tc R notation `R⁺`:max := tc R
definition accessible {z} (ac: acc R z) : acc R⁺ z := definition accessible {z} (ac: acc R z) : acc R⁺ z :=
acc.rec_on ac acc.rec_on ac
(x : A) (ax : _) (iH : ∀y, R y x → acc (tc R) y), x acx (iH : ∀y, R y x → acc R⁺ y),
acc.intro x (λ (y : A) (lt : R⁺ y x), acc.intro x (λ (y : A) (lt : R⁺ y x),
have gen : x = x → acc (tc R) y, from have gen : x = x → acc R⁺ y, from
tc.rec_on lt tc.rec_on lt
(λa b (H : R a b) (Heq : b = x), (λa b (H : R a b) (Heq : b = x),
iH a (eq.rec_on Heq H)) iH a (eq.rec_on Heq H))
(λa b c (H₁ : R⁺ a b) (H₂ : R⁺ b c) (λa b c (H₁ : R⁺ a b) (H₂ : R⁺ b c)
(iH₁ : b = x → acc (tc R) a) (iH₁ : b = x → acc R⁺ a)
(iH₂ : c = x → acc (tc R) b) (iH₂ : c = x → acc R⁺ b)
(Heq : c = x), (Heq : c = x),
acc.inv (iH₂ Heq) H₁), acc.inv (iH₂ Heq) H₁),
gen rfl)) gen rfl))