From: Ferruccio Guidi Date: Wed, 25 Oct 2006 12:26:16 +0000 (+0000) Subject: we removed about 100 match-with costruction turning them into applications X-Git-Tag: 0.4.95@7852~852 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=22cd9305796a779c5322a4a4c12e99643dbdcbec;p=helm.git we removed about 100 match-with costruction turning them into applications --- diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/arith.ma b/matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/arith.ma index 8f4719772..2ebbe44de 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/arith.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/arith.ma @@ -189,9 +189,10 @@ theorem minus_le: \def \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).(le (minus n y) n))) (\lambda (_: nat).(le_n O)) (\lambda (n: nat).(\lambda (H: ((\forall -(y: nat).(le (minus n y) n)))).(\lambda (y: nat).(match y in nat return -(\lambda (n0: nat).(le (minus (S n) n0) (S n))) with [O \Rightarrow (le_n (S -n)) | (S n0) \Rightarrow (le_S (minus n n0) n (H n0))])))) x). +(y: nat).(le (minus n y) n)))).(\lambda (y: nat).(nat_ind (\lambda (n0: +nat).(le (minus (S n) n0) (S n))) (le_n (S n)) (\lambda (n0: nat).(\lambda +(_: (le (match n0 with [O \Rightarrow (S n) | (S l) \Rightarrow (minus n l)]) +(S n))).(le_S (minus n n0) n (H n0)))) y)))) x). theorem le_plus_minus_sym: \forall (n: nat).(\forall (m: nat).((le n m) \to (eq nat m (plus (minus m n) diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta.ma index 327c49e39..7e15f1539 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta.ma @@ -18,6 +18,16 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta". include "LambdaDelta/theory.ma". +theorem bind_dec_not: + \forall (b1: B).(\forall (b2: B).(or (eq B b1 b2) (not (eq B b1 b2)))) +\def + \lambda (b1: B).(\lambda (b2: B).(let H_x \def (terms_props__bind_dec b1 b2) +in (let H \def H_x in (or_ind (eq B b1 b2) ((eq B b1 b2) \to (\forall (P: +Prop).P)) (or (eq B b1 b2) ((eq B b1 b2) \to False)) (\lambda (H0: (eq B b1 +b2)).(or_introl (eq B b1 b2) ((eq B b1 b2) \to False) H0)) (\lambda (H0: +(((eq B b1 b2) \to (\forall (P: Prop).P)))).(or_intror (eq B b1 b2) ((eq B b1 +b2) \to False) (\lambda (H1: (eq B b1 b2)).(H0 H1 False)))) H)))). + definition TApp: TList \to (T \to TList) \def @@ -121,19 +131,20 @@ TList).(P ts)))) \lambda (P: ((TList \to Prop))).(\lambda (H: (P TNil)).(\lambda (H0: ((\forall (ts: TList).(\forall (t: T).((P ts) \to (P (TApp ts t))))))).(\lambda (ts: TList).(tslt_wf_ind (\lambda (t: TList).(P t)) -(\lambda (ts2: TList).(match ts2 in TList return (\lambda (t: -TList).(((\forall (ts1: TList).((tslt ts1 t) \to (P ts1)))) \to (P t))) with -[TNil \Rightarrow (\lambda (_: ((\forall (ts1: TList).((tslt ts1 TNil) \to (P -ts1))))).H) | (TCons t t0) \Rightarrow (\lambda (H1: ((\forall (ts1: -TList).((tslt ts1 (TCons t t0)) \to (P ts1))))).(let H_x \def (tcons_tapp_ex -t0 t) in (let H2 \def H_x in (ex2_2_ind TList T (\lambda (ts3: -TList).(\lambda (t2: T).(eq TList (TCons t t0) (TApp ts3 t2)))) (\lambda -(ts3: TList).(\lambda (_: T).(eq nat (tslen t0) (tslen ts3)))) (P (TCons t -t0)) (\lambda (x0: TList).(\lambda (x1: T).(\lambda (H3: (eq TList (TCons t -t0) (TApp x0 x1))).(\lambda (H4: (eq nat (tslen t0) (tslen x0))).(eq_ind_r -TList (TApp x0 x1) (\lambda (t1: TList).(P t1)) (H0 x0 x1 (H1 x0 (eq_ind nat -(tslen t0) (\lambda (n: nat).(lt n (tslen (TCons t t0)))) (le_n (tslen (TCons -t t0))) (tslen x0) H4))) (TCons t t0) H3))))) H2))))])) ts)))). +(\lambda (ts2: TList).(TList_ind (\lambda (t: TList).(((\forall (ts1: +TList).((tslt ts1 t) \to (P ts1)))) \to (P t))) (\lambda (_: ((\forall (ts1: +TList).((tslt ts1 TNil) \to (P ts1))))).H) (\lambda (t: T).(\lambda (t0: +TList).(\lambda (_: ((((\forall (ts1: TList).((tslt ts1 t0) \to (P ts1)))) +\to (P t0)))).(\lambda (H2: ((\forall (ts1: TList).((tslt ts1 (TCons t t0)) +\to (P ts1))))).(let H_x \def (tcons_tapp_ex t0 t) in (let H3 \def H_x in +(ex2_2_ind TList T (\lambda (ts3: TList).(\lambda (t2: T).(eq TList (TCons t +t0) (TApp ts3 t2)))) (\lambda (ts3: TList).(\lambda (_: T).(eq nat (tslen t0) +(tslen ts3)))) (P (TCons t t0)) (\lambda (x0: TList).(\lambda (x1: +T).(\lambda (H4: (eq TList (TCons t t0) (TApp x0 x1))).(\lambda (H5: (eq nat +(tslen t0) (tslen x0))).(eq_ind_r TList (TApp x0 x1) (\lambda (t1: TList).(P +t1)) (H0 x0 x1 (H2 x0 (eq_ind nat (tslen t0) (\lambda (n: nat).(lt n (tslen +(TCons t t0)))) (le_n (tslen (TCons t t0))) (tslen x0) H5))) (TCons t t0) +H4))))) H3))))))) ts2)) ts)))). theorem iso_gen_sort: \forall (u2: T).(\forall (n1: nat).((iso (TSort n1) u2) \to (ex nat (\lambda @@ -265,6 +276,186 @@ t0) (lift h d v)) (\lambda (t1: TList).(eq TList (TCons (lift h d t) t1) (TCons (lift h d t) (TApp (lifts h d t0) (lift h d v)))) (lifts h d (TApp t0 v)) H)))) vs)))). +theorem dnf_dec2: + \forall (t: T).(\forall (d: nat).(or (\forall (w: T).(ex T (\lambda (v: +T).(subst0 d w t (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t (lift (S +O) d v)))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(or (\forall (w: +T).(ex T (\lambda (v: T).(subst0 d w t0 (lift (S O) d v))))) (ex T (\lambda +(v: T).(eq T t0 (lift (S O) d v))))))) (\lambda (n: nat).(\lambda (d: +nat).(or_intror (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (TSort n) +(lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (TSort n) (lift (S O) d +v)))) (ex_intro T (\lambda (v: T).(eq T (TSort n) (lift (S O) d v))) (TSort +n) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (TSort n) t0)) (refl_equal T +(TSort n)) (lift (S O) d (TSort n)) (lift_sort n (S O) d)))))) (\lambda (n: +nat).(\lambda (d: nat).(lt_eq_gt_e n d (or (\forall (w: T).(ex T (\lambda (v: +T).(subst0 d w (TLRef n) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T +(TLRef n) (lift (S O) d v))))) (\lambda (H: (lt n d)).(or_intror (\forall (w: +T).(ex T (\lambda (v: T).(subst0 d w (TLRef n) (lift (S O) d v))))) (ex T +(\lambda (v: T).(eq T (TLRef n) (lift (S O) d v)))) (ex_intro T (\lambda (v: +T).(eq T (TLRef n) (lift (S O) d v))) (TLRef n) (eq_ind_r T (TLRef n) +(\lambda (t0: T).(eq T (TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d +(TLRef n)) (lift_lref_lt n (S O) d H))))) (\lambda (H: (eq nat n d)).(eq_ind +nat n (\lambda (n0: nat).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 n0 +w (TLRef n) (lift (S O) n0 v))))) (ex T (\lambda (v: T).(eq T (TLRef n) (lift +(S O) n0 v)))))) (or_introl (\forall (w: T).(ex T (\lambda (v: T).(subst0 n w +(TLRef n) (lift (S O) n v))))) (ex T (\lambda (v: T).(eq T (TLRef n) (lift (S +O) n v)))) (\lambda (w: T).(ex_intro T (\lambda (v: T).(subst0 n w (TLRef n) +(lift (S O) n v))) (lift n O w) (eq_ind_r T (lift (plus (S O) n) O w) +(\lambda (t0: T).(subst0 n w (TLRef n) t0)) (subst0_lref w n) (lift (S O) n +(lift n O w)) (lift_free w n (S O) O n (le_n (plus O n)) (le_O_n n)))))) d +H)) (\lambda (H: (lt d n)).(or_intror (\forall (w: T).(ex T (\lambda (v: +T).(subst0 d w (TLRef n) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T +(TLRef n) (lift (S O) d v)))) (ex_intro T (\lambda (v: T).(eq T (TLRef n) +(lift (S O) d v))) (TLRef (pred n)) (eq_ind_r T (TLRef n) (\lambda (t0: +T).(eq T (TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d (TLRef (pred +n))) (lift_lref_gt d n H)))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda +(H: ((\forall (d: nat).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w +t0 (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t0 (lift (S O) d +v)))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).(or (\forall (w: +T).(ex T (\lambda (v: T).(subst0 d w t1 (lift (S O) d v))))) (ex T (\lambda +(v: T).(eq T t1 (lift (S O) d v)))))))).(\lambda (d: nat).(let H_x \def (H d) +in (let H1 \def H_x in (or_ind (\forall (w: T).(ex T (\lambda (v: T).(subst0 +d w t0 (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t0 (lift (S O) d +v)))) (or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) +(lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) +d v))))) (\lambda (H2: ((\forall (w: T).(ex T (\lambda (v: T).(subst0 d w t0 +(lift (S O) d v))))))).(let H_x0 \def (H0 (s k d)) in (let H3 \def H_x0 in +(or_ind (\forall (w: T).(ex T (\lambda (v: T).(subst0 (s k d) w t1 (lift (S +O) (s k d) v))))) (ex T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) v)))) +(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift +(S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d +v))))) (\lambda (H4: ((\forall (w: T).(ex T (\lambda (v: T).(subst0 (s k d) w +t1 (lift (S O) (s k d) v))))))).(or_introl (\forall (w: T).(ex T (\lambda (v: +T).(subst0 d w (THead k t0 t1) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq +T (THead k t0 t1) (lift (S O) d v)))) (\lambda (w: T).(let H_x1 \def (H4 w) +in (let H5 \def H_x1 in (ex_ind T (\lambda (v: T).(subst0 (s k d) w t1 (lift +(S O) (s k d) v))) (ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S +O) d v)))) (\lambda (x: T).(\lambda (H6: (subst0 (s k d) w t1 (lift (S O) (s +k d) x))).(let H_x2 \def (H2 w) in (let H7 \def H_x2 in (ex_ind T (\lambda +(v: T).(subst0 d w t0 (lift (S O) d v))) (ex T (\lambda (v: T).(subst0 d w +(THead k t0 t1) (lift (S O) d v)))) (\lambda (x0: T).(\lambda (H8: (subst0 d +w t0 (lift (S O) d x0))).(ex_intro T (\lambda (v: T).(subst0 d w (THead k t0 +t1) (lift (S O) d v))) (THead k x0 x) (eq_ind_r T (THead k (lift (S O) d x0) +(lift (S O) (s k d) x)) (\lambda (t2: T).(subst0 d w (THead k t0 t1) t2)) +(subst0_both w t0 (lift (S O) d x0) d H8 k t1 (lift (S O) (s k d) x) H6) +(lift (S O) d (THead k x0 x)) (lift_head k x0 x (S O) d))))) H7))))) H5)))))) +(\lambda (H4: (ex T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) +v))))).(ex_ind T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) v))) (or +(\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S O) +d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d v))))) +(\lambda (x: T).(\lambda (H5: (eq T t1 (lift (S O) (s k d) x))).(eq_ind_r T +(lift (S O) (s k d) x) (\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda +(v: T).(subst0 d w (THead k t0 t2) (lift (S O) d v))))) (ex T (\lambda (v: +T).(eq T (THead k t0 t2) (lift (S O) d v)))))) (or_introl (\forall (w: T).(ex +T (\lambda (v: T).(subst0 d w (THead k t0 (lift (S O) (s k d) x)) (lift (S O) +d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 (lift (S O) (s k d) x)) +(lift (S O) d v)))) (\lambda (w: T).(let H_x1 \def (H2 w) in (let H6 \def +H_x1 in (ex_ind T (\lambda (v: T).(subst0 d w t0 (lift (S O) d v))) (ex T +(\lambda (v: T).(subst0 d w (THead k t0 (lift (S O) (s k d) x)) (lift (S O) d +v)))) (\lambda (x0: T).(\lambda (H7: (subst0 d w t0 (lift (S O) d +x0))).(ex_intro T (\lambda (v: T).(subst0 d w (THead k t0 (lift (S O) (s k d) +x)) (lift (S O) d v))) (THead k x0 x) (eq_ind_r T (THead k (lift (S O) d x0) +(lift (S O) (s k d) x)) (\lambda (t2: T).(subst0 d w (THead k t0 (lift (S O) +(s k d) x)) t2)) (subst0_fst w (lift (S O) d x0) t0 d H7 (lift (S O) (s k d) +x) k) (lift (S O) d (THead k x0 x)) (lift_head k x0 x (S O) d))))) H6))))) t1 +H5))) H4)) H3)))) (\lambda (H2: (ex T (\lambda (v: T).(eq T t0 (lift (S O) d +v))))).(ex_ind T (\lambda (v: T).(eq T t0 (lift (S O) d v))) (or (\forall (w: +T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S O) d v))))) (ex +T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d v))))) (\lambda (x: +T).(\lambda (H3: (eq T t0 (lift (S O) d x))).(let H_x0 \def (H0 (s k d)) in +(let H4 \def H_x0 in (or_ind (\forall (w: T).(ex T (\lambda (v: T).(subst0 (s +k d) w t1 (lift (S O) (s k d) v))))) (ex T (\lambda (v: T).(eq T t1 (lift (S +O) (s k d) v)))) (or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead +k t0 t1) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) +(lift (S O) d v))))) (\lambda (H5: ((\forall (w: T).(ex T (\lambda (v: +T).(subst0 (s k d) w t1 (lift (S O) (s k d) v))))))).(eq_ind_r T (lift (S O) +d x) (\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w +(THead k t2 t1) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t2 +t1) (lift (S O) d v)))))) (or_introl (\forall (w: T).(ex T (\lambda (v: +T).(subst0 d w (THead k (lift (S O) d x) t1) (lift (S O) d v))))) (ex T +(\lambda (v: T).(eq T (THead k (lift (S O) d x) t1) (lift (S O) d v)))) +(\lambda (w: T).(let H_x1 \def (H5 w) in (let H6 \def H_x1 in (ex_ind T +(\lambda (v: T).(subst0 (s k d) w t1 (lift (S O) (s k d) v))) (ex T (\lambda +(v: T).(subst0 d w (THead k (lift (S O) d x) t1) (lift (S O) d v)))) (\lambda +(x0: T).(\lambda (H7: (subst0 (s k d) w t1 (lift (S O) (s k d) +x0))).(ex_intro T (\lambda (v: T).(subst0 d w (THead k (lift (S O) d x) t1) +(lift (S O) d v))) (THead k x x0) (eq_ind_r T (THead k (lift (S O) d x) (lift +(S O) (s k d) x0)) (\lambda (t2: T).(subst0 d w (THead k (lift (S O) d x) t1) +t2)) (subst0_snd k w (lift (S O) (s k d) x0) t1 d H7 (lift (S O) d x)) (lift +(S O) d (THead k x x0)) (lift_head k x x0 (S O) d))))) H6))))) t0 H3)) +(\lambda (H5: (ex T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) +v))))).(ex_ind T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) v))) (or +(\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S O) +d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d v))))) +(\lambda (x0: T).(\lambda (H6: (eq T t1 (lift (S O) (s k d) x0))).(eq_ind_r T +(lift (S O) (s k d) x0) (\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda +(v: T).(subst0 d w (THead k t0 t2) (lift (S O) d v))))) (ex T (\lambda (v: +T).(eq T (THead k t0 t2) (lift (S O) d v)))))) (eq_ind_r T (lift (S O) d x) +(\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead +k t2 (lift (S O) (s k d) x0)) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq +T (THead k t2 (lift (S O) (s k d) x0)) (lift (S O) d v)))))) (or_intror +(\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k (lift (S O) d x) +(lift (S O) (s k d) x0)) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T +(THead k (lift (S O) d x) (lift (S O) (s k d) x0)) (lift (S O) d v)))) +(ex_intro T (\lambda (v: T).(eq T (THead k (lift (S O) d x) (lift (S O) (s k +d) x0)) (lift (S O) d v))) (THead k x x0) (eq_ind_r T (THead k (lift (S O) d +x) (lift (S O) (s k d) x0)) (\lambda (t2: T).(eq T (THead k (lift (S O) d x) +(lift (S O) (s k d) x0)) t2)) (refl_equal T (THead k (lift (S O) d x) (lift +(S O) (s k d) x0))) (lift (S O) d (THead k x x0)) (lift_head k x x0 (S O) +d)))) t0 H3) t1 H6))) H5)) H4))))) H2)) H1))))))))) t). + +theorem pr2_change: + \forall (b: B).((not (eq B b Abbr)) \to (\forall (c: C).(\forall (v1: +T).(\forall (t1: T).(\forall (t2: T).((pr2 (CHead c (Bind b) v1) t1 t2) \to +(\forall (v2: T).(pr2 (CHead c (Bind b) v2) t1 t2)))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abbr))).(\lambda (c: C).(\lambda +(v1: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr2 (CHead c (Bind +b) v1) t1 t2)).(\lambda (v2: T).(insert_eq C (CHead c (Bind b) v1) (\lambda +(c0: C).(pr2 c0 t1 t2)) (pr2 (CHead c (Bind b) v2) t1 t2) (\lambda (y: +C).(\lambda (H1: (pr2 y t1 t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: +T).(\lambda (t0: T).((eq C c0 (CHead c (Bind b) v1)) \to (pr2 (CHead c (Bind +b) v2) t t0))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda +(H2: (pr0 t3 t4)).(\lambda (_: (eq C c0 (CHead c (Bind b) v1))).(pr2_free +(CHead c (Bind b) v2) t3 t4 H2)))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H2: (getl i c0 (CHead d (Bind +Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H3: (pr0 t3 +t4)).(\lambda (t: T).(\lambda (H4: (subst0 i u t4 t)).(\lambda (H5: (eq C c0 +(CHead c (Bind b) v1))).(let H6 \def (eq_ind C c0 (\lambda (c1: C).(getl i c1 +(CHead d (Bind Abbr) u))) H2 (CHead c (Bind b) v1) H5) in (nat_ind (\lambda +(n: nat).((getl n (CHead c (Bind b) v1) (CHead d (Bind Abbr) u)) \to ((subst0 +n u t4 t) \to (pr2 (CHead c (Bind b) v2) t3 t)))) (\lambda (H7: (getl O +(CHead c (Bind b) v1) (CHead d (Bind Abbr) u))).(\lambda (H8: (subst0 O u t4 +t)).(let H9 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda +(_: C).C) with [(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) +(CHead d (Bind Abbr) u) (CHead c (Bind b) v1) (clear_gen_bind b c (CHead d +(Bind Abbr) u) v1 (getl_gen_O (CHead c (Bind b) v1) (CHead d (Bind Abbr) u) +H7))) in ((let H10 \def (f_equal C B (\lambda (e: C).(match e in C return +(\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) +\Rightarrow (match k in K return (\lambda (_: K).B) with [(Bind b0) +\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) +(CHead c (Bind b) v1) (clear_gen_bind b c (CHead d (Bind Abbr) u) v1 +(getl_gen_O (CHead c (Bind b) v1) (CHead d (Bind Abbr) u) H7))) in ((let H11 +\def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) +with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d +(Bind Abbr) u) (CHead c (Bind b) v1) (clear_gen_bind b c (CHead d (Bind Abbr) +u) v1 (getl_gen_O (CHead c (Bind b) v1) (CHead d (Bind Abbr) u) H7))) in +(\lambda (H12: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H14 \def (eq_ind +T u (\lambda (t0: T).(subst0 O t0 t4 t)) H8 v1 H11) in (let H15 \def +(eq_ind_r B b (\lambda (b0: B).(not (eq B b0 Abbr))) H Abbr H12) in (eq_ind B +Abbr (\lambda (b0: B).(pr2 (CHead c (Bind b0) v2) t3 t)) (let H16 \def (match +(H15 (refl_equal B Abbr)) in False return (\lambda (_: False).(pr2 (CHead c +(Bind Abbr) v2) t3 t)) with []) in H16) b H12)))))) H10)) H9)))) (\lambda +(i0: nat).(\lambda (_: (((getl i0 (CHead c (Bind b) v1) (CHead d (Bind Abbr) +u)) \to ((subst0 i0 u t4 t) \to (pr2 (CHead c (Bind b) v2) t3 t))))).(\lambda +(H7: (getl (S i0) (CHead c (Bind b) v1) (CHead d (Bind Abbr) u))).(\lambda +(H8: (subst0 (S i0) u t4 t)).(pr2_delta (CHead c (Bind b) v2) d u (S i0) +(getl_head (Bind b) i0 c (CHead d (Bind Abbr) u) (getl_gen_S (Bind b) c +(CHead d (Bind Abbr) u) v1 i0 H7) v2) t3 t4 H3 t H8))))) i H6 H4))))))))))))) +y t1 t2 H1))) H0)))))))). + theorem pr3_flat: \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall (t1: T).(\forall (t2: T).((pr3 c t1 t2) \to (\forall (f: F).(pr3 c (THead @@ -283,52 +474,51 @@ t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b) u1) t1 t2)))) (pr3 (CHead c (Bind b) u1) t1 (lift (S O) O x))))))))) \def - \lambda (b: B).(match b in B return (\lambda (b0: B).((not (eq B b0 Abst)) -\to (\forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c -(THead (Bind b0) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T x (THead (Bind b0) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c -u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b0) u1) t1 -t2)))) (pr3 (CHead c (Bind b0) u1) t1 (lift (S O) O x)))))))))) with [Abbr -\Rightarrow (\lambda (_: (not (eq B Abbr Abst))).(\lambda (c: C).(\lambda -(u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H0: (pr3 c (THead (Bind -Abbr) u1 t1) x)).(let H1 \def (pr3_gen_abbr c u1 t1 x H0) in (or_ind (ex3_2 T + \lambda (b: B).(B_ind (\lambda (b0: B).((not (eq B b0 Abst)) \to (\forall +(c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr3 c (THead (Bind +b0) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x +(THead (Bind b0) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind b0) u1) t1 t2)))) (pr3 +(CHead c (Bind b0) u1) t1 (lift (S O) O x)))))))))) (\lambda (_: (not (eq B +Abbr Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: +T).(\lambda (H0: (pr3 c (THead (Bind Abbr) u1 t1) x)).(let H1 \def +(pr3_gen_abbr c u1 t1 x H0) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) +u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) -t1 (lift (S O) O x)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x -(THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) -(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 -(CHead c (Bind Abbr) u1) t1 (lift (S O) O x))) (\lambda (H2: (ex3_2 T T +t1 (lift (S O) O x))) (\lambda (H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 +c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 +t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind +Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda -(t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2))))).(ex3_2_ind T T (\lambda (u2: +(t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) +t1 (lift (S O) O x))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq T x +(THead (Bind Abbr) x0 x1))).(\lambda (H4: (pr3 c u1 x0)).(\lambda (H5: (pr3 +(CHead c (Bind Abbr) u1) t1 x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 -(CHead c (Bind Abbr) u1) t1 t2))) (or (ex3_2 T T (\lambda (u2: T).(\lambda -(t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) -u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x))) (\lambda -(x0: T).(\lambda (x1: T).(\lambda (H3: (eq T x (THead (Bind Abbr) x0 -x1))).(\lambda (H4: (pr3 c u1 x0)).(\lambda (H5: (pr3 (CHead c (Bind Abbr) -u1) t1 x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x +(CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S +O) O x)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead +(Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2))) x0 x1 +H3 H4 H5))))))) H2)) (\lambda (H2: (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S +O) O x))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 -(CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) (ex3_2_intro T T (\lambda (u2: -T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: -T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 -(CHead c (Bind Abbr) u1) t1 t2))) x0 x1 H3 H4 H5))))))) H2)) (\lambda (H2: -(pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x))).(or_intror (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda -(t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2)))) (pr3 (CHead c (Bind Abbr) u1) -t1 (lift (S O) O x)) H2)) H1)))))))) | Abst \Rightarrow (\lambda (H: (not (eq -B Abst Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: -T).(\lambda (_: (pr3 c (THead (Bind Abst) u1 t1) x)).(let H1 \def (match (H -(refl_equal B Abst)) in False return (\lambda (_: False).(or (ex3_2 T T -(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda -(t2: T).(pr3 (CHead c (Bind Abst) u1) t1 t2)))) (pr3 (CHead c (Bind Abst) u1) -t1 (lift (S O) O x)))) with []) in H1))))))) | Void \Rightarrow (\lambda (_: +(CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) H2)) H1)))))))) (\lambda (H: +(not (eq B Abst Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: +T).(\lambda (x: T).(\lambda (_: (pr3 c (THead (Bind Abst) u1 t1) x)).(let H1 +\def (match (H (refl_equal B Abst)) in False return (\lambda (_: False).(or +(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 +t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(pr3 (CHead c (Bind Abst) u1) t1 t2)))) (pr3 (CHead c +(Bind Abst) u1) t1 (lift (S O) O x)))) with []) in H1))))))) (\lambda (_: (not (eq B Void Abst))).(\lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H0: (pr3 c (THead (Bind Void) u1 t1) x)).(let H1 \def (pr3_gen_void c u1 t1 x H0) in (or_ind (ex3_2 T T (\lambda (u2: @@ -362,7 +552,7 @@ H3 H4 (H5 Void u1)))))))) H2)) (\lambda (H2: (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Void) u1) t1 -t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x)) H2)) H1))))))))]). +t2)))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x)) H2)) H1)))))))) b). theorem pr3_iso_appls_abbr: \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c @@ -967,41 +1157,49 @@ t (THead (Bind b) u t0))) (theads_tapp (Flat Appl) ts t (THead (Bind b) u t0))) in (let H4 \def (eq_ind T (THeads (Flat Appl) (TApp ts t) (THead (Bind b) u t0)) (\lambda (t1: T).((iso t1 u2) \to (\forall (P: Prop).P))) H2 (THeads (Flat Appl) ts (THead (Flat Appl) t (THead (Bind b) u t0))) -(theads_tapp (Flat Appl) ts t (THead (Bind b) u t0))) in ((match ts in TList -return (\lambda (t1: TList).(((\forall (u0: T).(\forall (t2: T).(\forall (c0: -C).(\forall (u3: T).((pr3 c0 (THeads (Flat Appl) t1 (THead (Bind b) u0 t2)) -u3) \to ((((iso (THeads (Flat Appl) t1 (THead (Bind b) u0 t2)) u3) \to -(\forall (P: Prop).P))) \to (pr3 c0 (THead (Bind b) u0 (THeads (Flat Appl) -(lifts (S O) O t1) t2)) u3)))))))) \to ((pr3 c (THeads (Flat Appl) t1 (THead -(Flat Appl) t (THead (Bind b) u t0))) u2) \to ((((iso (THeads (Flat Appl) t1 -(THead (Flat Appl) t (THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P))) -\to (pr3 c (THead (Bind b) u (THeads (Flat Appl) (lifts (S O) O t1) (THead -(Flat Appl) (lift (S O) O t) t0))) u2))))) with [TNil \Rightarrow (\lambda -(_: ((\forall (u0: T).(\forall (t1: T).(\forall (c0: C).(\forall (u3: -T).((pr3 c0 (THeads (Flat Appl) TNil (THead (Bind b) u0 t1)) u3) \to ((((iso -(THeads (Flat Appl) TNil (THead (Bind b) u0 t1)) u3) \to (\forall (P: +(theads_tapp (Flat Appl) ts t (THead (Bind b) u t0))) in (TList_ind (\lambda +(t1: TList).(((\forall (u0: T).(\forall (t2: T).(\forall (c0: C).(\forall +(u3: T).((pr3 c0 (THeads (Flat Appl) t1 (THead (Bind b) u0 t2)) u3) \to +((((iso (THeads (Flat Appl) t1 (THead (Bind b) u0 t2)) u3) \to (\forall (P: Prop).P))) \to (pr3 c0 (THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O -TNil) t1)) u3))))))))).(\lambda (H6: (pr3 c (THeads (Flat Appl) TNil (THead +t1) t2)) u3)))))))) \to ((pr3 c (THeads (Flat Appl) t1 (THead (Flat Appl) t +(THead (Bind b) u t0))) u2) \to ((((iso (THeads (Flat Appl) t1 (THead (Flat +Appl) t (THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P))) \to (pr3 c +(THead (Bind b) u (THeads (Flat Appl) (lifts (S O) O t1) (THead (Flat Appl) +(lift (S O) O t) t0))) u2))))) (\lambda (_: ((\forall (u0: T).(\forall (t1: +T).(\forall (c0: C).(\forall (u3: T).((pr3 c0 (THeads (Flat Appl) TNil (THead +(Bind b) u0 t1)) u3) \to ((((iso (THeads (Flat Appl) TNil (THead (Bind b) u0 +t1)) u3) \to (\forall (P: Prop).P))) \to (pr3 c0 (THead (Bind b) u0 (THeads +(Flat Appl) (lifts (S O) O TNil) t1)) u3))))))))).(\lambda (H6: (pr3 c +(THeads (Flat Appl) TNil (THead (Flat Appl) t (THead (Bind b) u t0))) +u2)).(\lambda (H7: (((iso (THeads (Flat Appl) TNil (THead (Flat Appl) t +(THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P)))).(pr3_iso_appl_bind b +H t u t0 c u2 H6 H7)))) (\lambda (t1: T).(\lambda (ts0: TList).(\lambda (_: +((((\forall (u0: T).(\forall (t2: T).(\forall (c0: C).(\forall (u3: T).((pr3 +c0 (THeads (Flat Appl) ts0 (THead (Bind b) u0 t2)) u3) \to ((((iso (THeads +(Flat Appl) ts0 (THead (Bind b) u0 t2)) u3) \to (\forall (P: Prop).P))) \to +(pr3 c0 (THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O ts0) t2)) +u3)))))))) \to ((pr3 c (THeads (Flat Appl) ts0 (THead (Flat Appl) t (THead +(Bind b) u t0))) u2) \to ((((iso (THeads (Flat Appl) ts0 (THead (Flat Appl) t +(THead (Bind b) u t0))) u2) \to (\forall (P: Prop).P))) \to (pr3 c (THead +(Bind b) u (THeads (Flat Appl) (lifts (S O) O ts0) (THead (Flat Appl) (lift +(S O) O t) t0))) u2)))))).(\lambda (H5: ((\forall (u0: T).(\forall (t2: +T).(\forall (c0: C).(\forall (u3: T).((pr3 c0 (THeads (Flat Appl) (TCons t1 +ts0) (THead (Bind b) u0 t2)) u3) \to ((((iso (THeads (Flat Appl) (TCons t1 +ts0) (THead (Bind b) u0 t2)) u3) \to (\forall (P: Prop).P))) \to (pr3 c0 +(THead (Bind b) u0 (THeads (Flat Appl) (lifts (S O) O (TCons t1 ts0)) t2)) +u3))))))))).(\lambda (H6: (pr3 c (THeads (Flat Appl) (TCons t1 ts0) (THead (Flat Appl) t (THead (Bind b) u t0))) u2)).(\lambda (H7: (((iso (THeads (Flat -Appl) TNil (THead (Flat Appl) t (THead (Bind b) u t0))) u2) \to (\forall (P: -Prop).P)))).(pr3_iso_appl_bind b H t u t0 c u2 H6 H7)))) | (TCons t1 t2) -\Rightarrow (\lambda (H5: ((\forall (u0: T).(\forall (t3: T).(\forall (c0: -C).(\forall (u3: T).((pr3 c0 (THeads (Flat Appl) (TCons t1 t2) (THead (Bind -b) u0 t3)) u3) \to ((((iso (THeads (Flat Appl) (TCons t1 t2) (THead (Bind b) -u0 t3)) u3) \to (\forall (P: Prop).P))) \to (pr3 c0 (THead (Bind b) u0 -(THeads (Flat Appl) (lifts (S O) O (TCons t1 t2)) t3)) u3))))))))).(\lambda -(H6: (pr3 c (THeads (Flat Appl) (TCons t1 t2) (THead (Flat Appl) t (THead -(Bind b) u t0))) u2)).(\lambda (H7: (((iso (THeads (Flat Appl) (TCons t1 t2) -(THead (Flat Appl) t (THead (Bind b) u t0))) u2) \to (\forall (P: -Prop).P)))).(H5 u (THead (Flat Appl) (lift (S O) O t) t0) c u2 -(pr3_iso_appls_appl_bind b H t u t0 (TCons t1 t2) c u2 H6 H7) (\lambda (H8: -(iso (THeads (Flat Appl) (TCons t1 t2) (THead (Bind b) u (THead (Flat Appl) +Appl) (TCons t1 ts0) (THead (Flat Appl) t (THead (Bind b) u t0))) u2) \to +(\forall (P: Prop).P)))).(H5 u (THead (Flat Appl) (lift (S O) O t) t0) c u2 +(pr3_iso_appls_appl_bind b H t u t0 (TCons t1 ts0) c u2 H6 H7) (\lambda (H8: +(iso (THeads (Flat Appl) (TCons t1 ts0) (THead (Bind b) u (THead (Flat Appl) (lift (S O) O t) t0))) u2)).(\lambda (P: Prop).(H7 (iso_trans (THeads (Flat -Appl) (TCons t1 t2) (THead (Flat Appl) t (THead (Bind b) u t0))) (THeads -(Flat Appl) (TCons t1 t2) (THead (Bind b) u (THead (Flat Appl) (lift (S O) O -t) t0))) (iso_head t1 t1 (THeads (Flat Appl) t2 (THead (Flat Appl) t (THead -(Bind b) u t0))) (THeads (Flat Appl) t2 (THead (Bind b) u (THead (Flat Appl) -(lift (S O) O t) t0))) (Flat Appl)) u2 H8) P)))))))]) H0 H3 H4))) (THeads +Appl) (TCons t1 ts0) (THead (Flat Appl) t (THead (Bind b) u t0))) (THeads +(Flat Appl) (TCons t1 ts0) (THead (Bind b) u (THead (Flat Appl) (lift (S O) O +t) t0))) (iso_head t1 t1 (THeads (Flat Appl) ts0 (THead (Flat Appl) t (THead +(Bind b) u t0))) (THeads (Flat Appl) ts0 (THead (Bind b) u (THead (Flat Appl) +(lift (S O) O t) t0))) (Flat Appl)) u2 H8) P)))))))))) ts H0 H3 H4))) (THeads (Flat Appl) (TApp (lifts (S O) O ts) (lift (S O) O t)) t0) (theads_tapp (Flat Appl) (lifts (S O) O ts) (lift (S O) O t) t0)) (lifts (S O) O (TApp ts t)) (lifts_tapp (S O) O t ts))))))))))) vs))). @@ -1754,33 +1952,32 @@ e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csuba g e2 e1)) C).(\lambda (H0: (csuba g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c4 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear c3 e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: -(clear (CHead c4 k u) e1)).((match k in K return (\lambda (k0: K).((clear -(CHead c4 k0 u) e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda -(e2: C).(clear (CHead c3 k0 u) e2))))) with [(Bind b) \Rightarrow (\lambda -(H3: (clear (CHead c4 (Bind b) u) e1)).(eq_ind_r C (CHead c4 (Bind b) u) -(\lambda (c: C).(ex2 C (\lambda (e2: C).(csuba g e2 c)) (\lambda (e2: -C).(clear (CHead c3 (Bind b) u) e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g -e2 (CHead c4 (Bind b) u))) (\lambda (e2: C).(clear (CHead c3 (Bind b) u) e2)) -(CHead c3 (Bind b) u) (csuba_head g c3 c4 H0 (Bind b) u) (clear_bind b c3 u)) -e1 (clear_gen_bind b c4 e1 u H3))) | (Flat f) \Rightarrow (\lambda (H3: -(clear (CHead c4 (Flat f) u) e1)).(let H4 \def (H1 e1 (clear_gen_flat f c4 e1 -u H3)) in (ex2_ind C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: -C).(clear c3 e2)) (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: -C).(clear (CHead c3 (Flat f) u) e2))) (\lambda (x: C).(\lambda (H5: (csuba g -x e1)).(\lambda (H6: (clear c3 x)).(ex_intro2 C (\lambda (e2: C).(csuba g e2 -e1)) (\lambda (e2: C).(clear (CHead c3 (Flat f) u) e2)) x H5 (clear_flat c3 x -H6 f u))))) H4)))]) H2))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda -(H0: (csuba g c3 c4)).(\lambda (_: ((\forall (e1: C).((clear c4 e1) \to (ex2 -C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear c3 -e2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (H2: (arity g c3 t (asucc -g a))).(\lambda (u: T).(\lambda (H3: (arity g c4 u a)).(\lambda (e1: -C).(\lambda (H4: (clear (CHead c4 (Bind Abbr) u) e1)).(eq_ind_r C (CHead c4 -(Bind Abbr) u) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csuba g e2 c)) -(\lambda (e2: C).(clear (CHead c3 (Bind Abst) t) e2)))) (ex_intro2 C (\lambda -(e2: C).(csuba g e2 (CHead c4 (Bind Abbr) u))) (\lambda (e2: C).(clear (CHead -c3 (Bind Abst) t) e2)) (CHead c3 (Bind Abst) t) (csuba_abst g c3 c4 H0 t a H2 -u H3) (clear_bind Abst c3 t)) e1 (clear_gen_bind Abbr c4 e1 u H4))))))))))))) -c2 c1 H)))). +(clear (CHead c4 k u) e1)).(K_ind (\lambda (k0: K).((clear (CHead c4 k0 u) +e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear +(CHead c3 k0 u) e2))))) (\lambda (b: B).(\lambda (H3: (clear (CHead c4 (Bind +b) u) e1)).(eq_ind_r C (CHead c4 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda +(e2: C).(csuba g e2 c)) (\lambda (e2: C).(clear (CHead c3 (Bind b) u) e2)))) +(ex_intro2 C (\lambda (e2: C).(csuba g e2 (CHead c4 (Bind b) u))) (\lambda +(e2: C).(clear (CHead c3 (Bind b) u) e2)) (CHead c3 (Bind b) u) (csuba_head g +c3 c4 H0 (Bind b) u) (clear_bind b c3 u)) e1 (clear_gen_bind b c4 e1 u H3)))) +(\lambda (f: F).(\lambda (H3: (clear (CHead c4 (Flat f) u) e1)).(let H4 \def +(H1 e1 (clear_gen_flat f c4 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csuba g +e2 e1)) (\lambda (e2: C).(clear c3 e2)) (ex2 C (\lambda (e2: C).(csuba g e2 +e1)) (\lambda (e2: C).(clear (CHead c3 (Flat f) u) e2))) (\lambda (x: +C).(\lambda (H5: (csuba g x e1)).(\lambda (H6: (clear c3 x)).(ex_intro2 C +(\lambda (e2: C).(csuba g e2 e1)) (\lambda (e2: C).(clear (CHead c3 (Flat f) +u) e2)) x H5 (clear_flat c3 x H6 f u))))) H4)))) k H2))))))))) (\lambda (c3: +C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (_: ((\forall +(e1: C).((clear c4 e1) \to (ex2 C (\lambda (e2: C).(csuba g e2 e1)) (\lambda +(e2: C).(clear c3 e2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (H2: +(arity g c3 t (asucc g a))).(\lambda (u: T).(\lambda (H3: (arity g c4 u +a)).(\lambda (e1: C).(\lambda (H4: (clear (CHead c4 (Bind Abbr) u) +e1)).(eq_ind_r C (CHead c4 (Bind Abbr) u) (\lambda (c: C).(ex2 C (\lambda +(e2: C).(csuba g e2 c)) (\lambda (e2: C).(clear (CHead c3 (Bind Abst) t) +e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g e2 (CHead c4 (Bind Abbr) u))) +(\lambda (e2: C).(clear (CHead c3 (Bind Abst) t) e2)) (CHead c3 (Bind Abst) +t) (csuba_abst g c3 c4 H0 t a H2 u H3) (clear_bind Abst c3 t)) e1 +(clear_gen_bind Abbr c4 e1 u H4))))))))))))) c2 c1 H)))). theorem csuba_drop_abst_rev: \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop i @@ -2588,105 +2785,108 @@ C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abst) u))) (\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))))) (\lambda (x: C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind -Abst) u))).((match x in C return (\lambda (c: C).((drop i O c1 c) \to ((clear -c (CHead d1 (Bind Abst) u)) \to (\forall (c2: C).((csuba g c2 c1) \to (ex2 C +Abst) u))).(C_ind (\lambda (c: C).((drop i O c1 c) \to ((clear c (CHead d1 +(Bind Abst) u)) \to (\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1)))))))) (\lambda (n: nat).(\lambda (_: (drop i O c1 (CSort n))).(\lambda +(H4: (clear (CSort n) (CHead d1 (Bind Abst) u))).(clear_gen_sort (CHead d1 +(Bind Abst) u) n H4 (\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1))))))))) (\lambda (x0: C).(\lambda (_: (((drop i O c1 x0) \to ((clear x0 +(CHead d1 (Bind Abst) u)) \to (\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)))))))) with [(CSort n) \Rightarrow (\lambda (_: (drop i O -c1 (CSort n))).(\lambda (H4: (clear (CSort n) (CHead d1 (Bind Abst) -u))).(clear_gen_sort (CHead d1 (Bind Abst) u) n H4 (\forall (c2: C).((csuba g -c2 c1) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) -(\lambda (d2: C).(csuba g d2 d1)))))))) | (CHead c k t) \Rightarrow (\lambda -(H3: (drop i O c1 (CHead c k t))).(\lambda (H4: (clear (CHead c k t) (CHead -d1 (Bind Abst) u))).((match k in K return (\lambda (k0: K).((drop i O c1 -(CHead c k0 t)) \to ((clear (CHead c k0 t) (CHead d1 (Bind Abst) u)) \to -(\forall (c2: C).((csuba g c2 c1) \to (ex2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))))))) with -[(Bind b) \Rightarrow (\lambda (H5: (drop i O c1 (CHead c (Bind b) -t))).(\lambda (H6: (clear (CHead c (Bind b) t) (CHead d1 (Bind Abst) -u))).(let H7 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda -(_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c0 _ _) \Rightarrow c0])) -(CHead d1 (Bind Abst) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 -(Bind Abst) u) t H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e -in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abst | (CHead _ k0 -_) \Rightarrow (match k0 in K return (\lambda (_: K).B) with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow Abst])])) (CHead d1 (Bind Abst) u) -(CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abst) u) t H6)) in -((let H9 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: -C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead -d1 (Bind Abst) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind -Abst) u) t H6)) in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq C d1 -c)).(\lambda (c2: C).(\lambda (H12: (csuba g c2 c1)).(let H13 \def (eq_ind_r -T t (\lambda (t0: T).(drop i O c1 (CHead c (Bind b) t0))) H5 u H9) in (let -H14 \def (eq_ind_r B b (\lambda (b0: B).(drop i O c1 (CHead c (Bind b0) u))) -H13 Abst H10) in (let H15 \def (eq_ind_r C c (\lambda (c0: C).(drop i O c1 -(CHead c0 (Bind Abst) u))) H14 d1 H11) in (let H16 \def (csuba_drop_abst_rev -i c1 d1 u H15 g c2 H12) in (ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 -(Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: -C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(\lambda (x0: C).(\lambda (H17: (drop i O c2 (CHead x0 (Bind Abst) -u))).(\lambda (H18: (csuba g x0 d1)).(ex_intro2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x0 (getl_intro i -c2 (CHead x0 (Bind Abst) u) (CHead x0 (Bind Abst) u) H17 (clear_bind Abst x0 -u)) H18)))) H16)))))))))) H8)) H7)))) | (Flat f) \Rightarrow (\lambda (H5: -(drop i O c1 (CHead c (Flat f) t))).(\lambda (H6: (clear (CHead c (Flat f) t) -(CHead d1 (Bind Abst) u))).(let H7 \def H5 in (unintro C c1 (\lambda (c0: -C).((drop i O c0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g c2 c0) -\to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda -(d2: C).(csuba g d2 d1))))))) (nat_ind (\lambda (n: nat).(\forall (x0: -C).((drop n O x0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g c2 x0) -\to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))) (\lambda -(d2: C).(csuba g d2 d1)))))))) (\lambda (x0: C).(\lambda (H8: (drop O O x0 -(CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g c2 x0)).(let -H10 \def (eq_ind C x0 (\lambda (c0: C).(csuba g c2 c0)) H9 (CHead c (Flat f) -t) (drop_gen_refl x0 (CHead c (Flat f) t) H8)) in (let H_y \def (clear_flat c -(CHead d1 (Bind Abst) u) (clear_gen_flat f c (CHead d1 (Bind Abst) u) t H6) f -t) in (let H11 \def (csuba_clear_trans g (CHead c (Flat f) t) c2 H10 (CHead -d1 (Bind Abst) u) H_y) in (ex2_ind C (\lambda (e2: C).(csuba g e2 (CHead d1 -(Bind Abst) u))) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: -C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(\lambda (x1: C).(\lambda (H12: (csuba g x1 (CHead d1 (Bind Abst) -u))).(\lambda (H13: (clear c2 x1)).(let H_x \def (csuba_gen_abst_rev g d1 x1 -u H12) in (let H14 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C x1 (CHead d2 +C).(csuba g d2 d1))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (H3: +(drop i O c1 (CHead x0 k t))).(\lambda (H4: (clear (CHead x0 k t) (CHead d1 +(Bind Abst) u))).(K_ind (\lambda (k0: K).((drop i O c1 (CHead x0 k0 t)) \to +((clear (CHead x0 k0 t) (CHead d1 (Bind Abst) u)) \to (\forall (c2: +C).((csuba g c2 c1) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1)))))))) (\lambda (b: B).(\lambda +(H5: (drop i O c1 (CHead x0 (Bind b) t))).(\lambda (H6: (clear (CHead x0 +(Bind b) t) (CHead d1 (Bind Abst) u))).(let H7 \def (f_equal C C (\lambda (e: +C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | +(CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abst) u) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abst) u) t H6)) in ((let H8 \def +(f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with +[(CSort _) \Rightarrow Abst | (CHead _ k0 _) \Rightarrow (match k0 in K +return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) +\Rightarrow Abst])])) (CHead d1 (Bind Abst) u) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abst) u) t H6)) in ((let H9 \def +(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with +[(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d1 (Bind +Abst) u) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abst) u) +t H6)) in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq C d1 x0)).(\lambda +(c2: C).(\lambda (H12: (csuba g c2 c1)).(let H13 \def (eq_ind_r T t (\lambda +(t0: T).(drop i O c1 (CHead x0 (Bind b) t0))) H5 u H9) in (let H14 \def +(eq_ind_r B b (\lambda (b0: B).(drop i O c1 (CHead x0 (Bind b0) u))) H13 Abst +H10) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(drop i O c1 (CHead c +(Bind Abst) u))) H14 d1 H11) in (let H16 \def (csuba_drop_abst_rev i c1 d1 u +H15 g c2 H12) in (ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: C).(getl i +c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda +(x1: C).(\lambda (H17: (drop i O c2 (CHead x1 (Bind Abst) u))).(\lambda (H18: +(csuba g x1 d1)).(ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x1 (getl_intro i c2 (CHead x1 +(Bind Abst) u) (CHead x1 (Bind Abst) u) H17 (clear_bind Abst x1 u)) H18)))) +H16)))))))))) H8)) H7))))) (\lambda (f: F).(\lambda (H5: (drop i O c1 (CHead +x0 (Flat f) t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind +Abst) u))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop i O c +(CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c2 c) \to (ex2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))))))) (nat_ind (\lambda (n: nat).(\forall (x1: C).((drop n +O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) \to (ex2 C +(\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1)))))))) (\lambda (x1: C).(\lambda (H8: (drop O O x1 (CHead +x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g c2 x1)).(let H10 +\def (eq_ind C x1 (\lambda (c: C).(csuba g c2 c)) H9 (CHead x0 (Flat f) t) +(drop_gen_refl x1 (CHead x0 (Flat f) t) H8)) in (let H_y \def (clear_flat x0 +(CHead d1 (Bind Abst) u) (clear_gen_flat f x0 (CHead d1 (Bind Abst) u) t H6) +f t) in (let H11 \def (csuba_clear_trans g (CHead x0 (Flat f) t) c2 H10 +(CHead d1 (Bind Abst) u) H_y) in (ex2_ind C (\lambda (e2: C).(csuba g e2 +(CHead d1 (Bind Abst) u))) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda +(d2: C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 +d1))) (\lambda (x2: C).(\lambda (H12: (csuba g x2 (CHead d1 (Bind Abst) +u))).(\lambda (H13: (clear c2 x2)).(let H_x \def (csuba_gen_abst_rev g d1 x2 +u H12) in (let H14 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) -(\lambda (x2: C).(\lambda (H15: (eq C x1 (CHead x2 (Bind Abst) u))).(\lambda -(H16: (csuba g x2 d1)).(let H17 \def (eq_ind C x1 (\lambda (c0: C).(clear c2 -c0)) H13 (CHead x2 (Bind Abst) u) H15) in (ex_intro2 C (\lambda (d2: C).(getl -O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x2 -(getl_intro O c2 (CHead x2 (Bind Abst) u) c2 (drop_refl c2) H17) H16))))) -H14)))))) H11)))))))) (\lambda (n: nat).(\lambda (H8: ((\forall (x0: -C).((drop n O x0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g c2 x0) +(\lambda (x3: C).(\lambda (H15: (eq C x2 (CHead x3 (Bind Abst) u))).(\lambda +(H16: (csuba g x3 d1)).(let H17 \def (eq_ind C x2 (\lambda (c: C).(clear c2 +c)) H13 (CHead x3 (Bind Abst) u) H15) in (ex_intro2 C (\lambda (d2: C).(getl +O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x3 +(getl_intro O c2 (CHead x3 (Bind Abst) u) c2 (drop_refl c2) H17) H16))))) +H14)))))) H11)))))))) (\lambda (n: nat).(\lambda (H8: ((\forall (x1: +C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))) (\lambda -(d2: C).(csuba g d2 d1))))))))).(\lambda (x0: C).(\lambda (H9: (drop (S n) O -x0 (CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g c2 -x0)).(let H11 \def (drop_clear x0 (CHead c (Flat f) t) n H9) in (ex2_3_ind B -C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x0 (CHead e (Bind +(d2: C).(csuba g d2 d1))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S n) O +x1 (CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g c2 +x1)).(let H11 \def (drop_clear x1 (CHead x0 (Flat f) t) n H9) in (ex2_3_ind B +C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead -c (Flat f) t))))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x1: B).(\lambda (x2: -C).(\lambda (x3: T).(\lambda (H12: (clear x0 (CHead x2 (Bind x1) -x3))).(\lambda (H13: (drop n O x2 (CHead c (Flat f) t))).(let H14 \def -(csuba_clear_trans g x0 c2 H10 (CHead x2 (Bind x1) x3) H12) in (ex2_ind C -(\lambda (e2: C).(csuba g e2 (CHead x2 (Bind x1) x3))) (\lambda (e2: +x0 (Flat f) t))))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x2: B).(\lambda (x3: +C).(\lambda (x4: T).(\lambda (H12: (clear x1 (CHead x3 (Bind x2) +x4))).(\lambda (H13: (drop n O x3 (CHead x0 (Flat f) t))).(let H14 \def +(csuba_clear_trans g x1 c2 H10 (CHead x3 (Bind x2) x4) H12) in (ex2_ind C +(\lambda (e2: C).(csuba g e2 (CHead x3 (Bind x2) x4))) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x4: C).(\lambda (H15: -(csuba g x4 (CHead x2 (Bind x1) x3))).(\lambda (H16: (clear c2 x4)).(let H_x -\def (csuba_gen_bind_rev g x1 x2 x4 x3 H15) in (let H17 \def H_x in -(ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x4 +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x5: C).(\lambda (H15: +(csuba g x5 (CHead x3 (Bind x2) x4))).(\lambda (H16: (clear c2 x5)).(let H_x +\def (csuba_gen_bind_rev g x2 x3 x5 x4 H15) in (let H17 \def H_x in +(ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: -T).(csuba g e2 x2)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x5: B).(\lambda (x6: -C).(\lambda (x7: T).(\lambda (H18: (eq C x4 (CHead x6 (Bind x5) -x7))).(\lambda (H19: (csuba g x6 x2)).(let H20 \def (eq_ind C x4 (\lambda -(c0: C).(clear c2 c0)) H16 (CHead x6 (Bind x5) x7) H18) in (let H21 \def (H8 -x2 H13 x6 H19) in (ex2_ind C (\lambda (d2: C).(getl n x6 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: C).(getl (S -n) c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda -(x8: C).(\lambda (H22: (getl n x6 (CHead x8 (Bind Abst) u))).(\lambda (H23: -(csuba g x8 d1)).(ex_intro2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1)) x8 (getl_clear_bind x5 c2 x6 x7 -H20 (CHead x8 (Bind Abst) u) n H22) H23)))) H21)))))))) H17)))))) H14))))))) -H11)))))))) i) H7))))]) H3 H4)))]) H1 H2)))) H0))))))). +T).(csuba g e2 x3)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x6: B).(\lambda (x7: +C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind x6) +x8))).(\lambda (H19: (csuba g x7 x3)).(let H20 \def (eq_ind C x5 (\lambda (c: +C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 H13 +x7 H19) in (ex2_ind C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abst) u))) +(\lambda (d2: C).(csuba g d2 d1)) (ex2 C (\lambda (d2: C).(getl (S n) c2 +(CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) (\lambda (x9: +C).(\lambda (H22: (getl n x7 (CHead x9 (Bind Abst) u))).(\lambda (H23: (csuba +g x9 d1)).(ex_intro2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) +u))) (\lambda (d2: C).(csuba g d2 d1)) x9 (getl_clear_bind x6 c2 x7 x8 H20 +(CHead x9 (Bind Abst) u) n H22) H23)))) H21)))))))) H17)))))) H14))))))) +H11)))))))) i) H7))))) k H3 H4))))))) x H1 H2)))) H0))))))). theorem csuba_getl_abbr_rev: \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).(\forall @@ -2709,147 +2909,154 @@ Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))))) (\lambda (x: C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: -(clear x (CHead d1 (Bind Abbr) u1))).((match x in C return (\lambda (c: -C).((drop i O c1 c) \to ((clear c (CHead d1 (Bind Abbr) u1)) \to (\forall -(c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -a))))))))))) with [(CSort n) \Rightarrow (\lambda (_: (drop i O c1 (CSort -n))).(\lambda (H4: (clear (CSort n) (CHead d1 (Bind Abbr) -u1))).(clear_gen_sort (CHead d1 (Bind Abbr) u1) n H4 (\forall (c2: C).((csuba -g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))))) | -(CHead c k t) \Rightarrow (\lambda (H3: (drop i O c1 (CHead c k t))).(\lambda -(H4: (clear (CHead c k t) (CHead d1 (Bind Abbr) u1))).((match k in K return -(\lambda (k0: K).((drop i O c1 (CHead c k0 t)) \to ((clear (CHead c k0 t) -(CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba g c2 c1) \to (or (ex2 -C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +(clear x (CHead d1 (Bind Abbr) u1))).(C_ind (\lambda (c: C).((drop i O c1 c) +\to ((clear c (CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba g c2 +c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))))) (\lambda +(n: nat).(\lambda (_: (drop i O c1 (CSort n))).(\lambda (H4: (clear (CSort n) +(CHead d1 (Bind Abbr) u1))).(clear_gen_sort (CHead d1 (Bind Abbr) u1) n H4 +(\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))))))))) (\lambda (x0: C).(\lambda (_: (((drop i O c1 x0) \to ((clear +x0 (CHead d1 (Bind Abbr) u1)) \to (\forall (c2: C).((csuba g c2 c1) \to (or +(ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))))))))) with [(Bind b) \Rightarrow -(\lambda (H5: (drop i O c1 (CHead c (Bind b) t))).(\lambda (H6: (clear (CHead -c (Bind b) t) (CHead d1 (Bind Abbr) u1))).(let H7 \def (f_equal C C (\lambda -(e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 -| (CHead c0 _ _) \Rightarrow c0])) (CHead d1 (Bind Abbr) u1) (CHead c (Bind -b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u1) t H6)) in ((let H8 \def -(f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with -[(CSort _) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow (match k0 in K -return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) -\Rightarrow Abbr])])) (CHead d1 (Bind Abbr) u1) (CHead c (Bind b) t) -(clear_gen_bind b c (CHead d1 (Bind Abbr) u1) t H6)) in ((let H9 \def -(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with -[(CSort _) \Rightarrow u1 | (CHead _ _ t0) \Rightarrow t0])) (CHead d1 (Bind -Abbr) u1) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u1) -t H6)) in (\lambda (H10: (eq B Abbr b)).(\lambda (H11: (eq C d1 c)).(\lambda -(c2: C).(\lambda (H12: (csuba g c2 c1)).(let H13 \def (eq_ind_r T t (\lambda -(t0: T).(drop i O c1 (CHead c (Bind b) t0))) H5 u1 H9) in (let H14 \def -(eq_ind_r B b (\lambda (b0: B).(drop i O c1 (CHead c (Bind b0) u1))) H13 Abbr -H10) in (let H15 \def (eq_ind_r C c (\lambda (c0: C).(drop i O c1 (CHead c0 -(Bind Abbr) u1))) H14 d1 H11) in (let H16 \def (csuba_drop_abbr_rev i c1 d1 -u1 H15 g c2 H12) in (or_ind (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +(_: T).(\lambda (a: A).(arity g d1 u1 a)))))))))))).(\lambda (k: K).(\lambda +(t: T).(\lambda (H3: (drop i O c1 (CHead x0 k t))).(\lambda (H4: (clear +(CHead x0 k t) (CHead d1 (Bind Abbr) u1))).(K_ind (\lambda (k0: K).((drop i O +c1 (CHead x0 k0 t)) \to ((clear (CHead x0 k0 t) (CHead d1 (Bind Abbr) u1)) +\to (\forall (c2: C).((csuba g c2 c1) \to (or (ex2 C (\lambda (d2: C).(getl i +c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a))))))))))) (\lambda (b: B).(\lambda (H5: (drop i O c1 (CHead x0 (Bind b) +t))).(\lambda (H6: (clear (CHead x0 (Bind b) t) (CHead d1 (Bind Abbr) +u1))).(let H7 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda +(_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) +(CHead d1 (Bind Abbr) u1) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead +d1 (Bind Abbr) u1) t H6)) in ((let H8 \def (f_equal C B (\lambda (e: +C).(match e in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | +(CHead _ k0 _) \Rightarrow (match k0 in K return (\lambda (_: K).B) with +[(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d1 (Bind +Abbr) u1) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) +u1) t H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e in C return +(\lambda (_: C).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ t0) +\Rightarrow t0])) (CHead d1 (Bind Abbr) u1) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abbr) u1) t H6)) in (\lambda (H10: (eq B +Abbr b)).(\lambda (H11: (eq C d1 x0)).(\lambda (c2: C).(\lambda (H12: (csuba +g c2 c1)).(let H13 \def (eq_ind_r T t (\lambda (t0: T).(drop i O c1 (CHead x0 +(Bind b) t0))) H5 u1 H9) in (let H14 \def (eq_ind_r B b (\lambda (b0: +B).(drop i O c1 (CHead x0 (Bind b0) u1))) H13 Abbr H10) in (let H15 \def +(eq_ind_r C x0 (\lambda (c: C).(drop i O c1 (CHead c (Bind Abbr) u1))) H14 d1 +H11) in (let H16 \def (csuba_drop_abbr_rev i c1 d1 u1 H15 g c2 H12) in +(or_ind (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H17: -(ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or (ex2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H17: (ex2 C (\lambda +(d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1)))).(ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))) (\lambda (x1: C).(\lambda (H18: (drop i O c2 (CHead x1 (Bind Abbr) +u1))).(\lambda (H19: (csuba g x1 d1)).(or_introl (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (x0: C).(\lambda (H18: (drop i O c2 -(CHead x0 (Bind Abbr) u1))).(\lambda (H19: (csuba g x0 d1)).(or_introl (ex2 C +(a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x1 (getl_intro i c2 +(CHead x1 (Bind Abbr) u1) (CHead x1 (Bind Abbr) u1) H18 (clear_bind Abbr x1 +u1)) H19))))) H17)) (\lambda (H17: (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x1: +C).(\lambda (x2: T).(\lambda (x3: A).(\lambda (H18: (drop i O c2 (CHead x1 +(Bind Abst) x2))).(\lambda (H19: (csuba g x1 d1)).(\lambda (H20: (arity g x1 +x2 (asucc g x3))).(\lambda (H21: (arity g d1 u1 x3)).(or_intror (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: -C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) -x0 (getl_intro i c2 (CHead x0 (Bind Abbr) u1) (CHead x0 (Bind Abbr) u1) H18 -(clear_bind Abbr x0 u1)) H19))))) H17)) (\lambda (H17: (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop i O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or (ex2 C (\lambda (d2: C).(getl -i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H18: -(drop i O c2 (CHead x0 (Bind Abst) x1))).(\lambda (H19: (csuba g x0 -d1)).(\lambda (H20: (arity g x0 x1 (asucc g x2))).(\lambda (H21: (arity g d1 -u1 x2)).(or_intror (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x1 x2 x3 +(getl_intro i c2 (CHead x1 (Bind Abst) x2) (CHead x1 (Bind Abst) x2) H18 +(clear_bind Abst x1 x2)) H19 H20 H21))))))))) H17)) H16)))))))))) H8)) +H7))))) (\lambda (f: F).(\lambda (H5: (drop i O c1 (CHead x0 (Flat f) +t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind Abbr) +u1))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop i O c (CHead x0 +(Flat f) t)) \to (\forall (c2: C).((csuba g c2 c) \to (or (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))) x0 x1 x2 (getl_intro i c2 (CHead x0 (Bind Abst) -x1) (CHead x0 (Bind Abst) x1) H18 (clear_bind Abst x0 x1)) H19 H20 -H21))))))))) H17)) H16)))))))))) H8)) H7)))) | (Flat f) \Rightarrow (\lambda -(H5: (drop i O c1 (CHead c (Flat f) t))).(\lambda (H6: (clear (CHead c (Flat -f) t) (CHead d1 (Bind Abbr) u1))).(let H7 \def H5 in (unintro C c1 (\lambda -(c0: C).((drop i O c0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g c2 -c0) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u1))) +(a: A).(arity g d1 u1 a)))))))))) (nat_ind (\lambda (n: nat).(\forall (x1: +C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) +\to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda +(u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))))))) (nat_ind -(\lambda (n: nat).(\forall (x0: C).((drop n O x0 (CHead c (Flat f) t)) \to -(\forall (c2: C).((csuba g c2 x0) \to (or (ex2 C (\lambda (d2: C).(getl n c2 -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))))))))) (\lambda (x0: C).(\lambda (H8: (drop O O x0 (CHead c (Flat f) -t))).(\lambda (c2: C).(\lambda (H9: (csuba g c2 x0)).(let H10 \def (eq_ind C -x0 (\lambda (c0: C).(csuba g c2 c0)) H9 (CHead c (Flat f) t) (drop_gen_refl -x0 (CHead c (Flat f) t) H8)) in (let H_y \def (clear_flat c (CHead d1 (Bind -Abbr) u1) (clear_gen_flat f c (CHead d1 (Bind Abbr) u1) t H6) f t) in (let -H11 \def (csuba_clear_trans g (CHead c (Flat f) t) c2 H10 (CHead d1 (Bind -Abbr) u1) H_y) in (ex2_ind C (\lambda (e2: C).(csuba g e2 (CHead d1 (Bind -Abbr) u1))) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl -O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))) (\lambda (x1: C).(\lambda (H12: (csuba g x1 (CHead d1 (Bind Abbr) -u1))).(\lambda (H13: (clear c2 x1)).(let H_x \def (csuba_gen_abbr_rev g d1 x1 -u1 H12) in (let H14 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C x1 +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))))) (\lambda +(x1: C).(\lambda (H8: (drop O O x1 (CHead x0 (Flat f) t))).(\lambda (c2: +C).(\lambda (H9: (csuba g c2 x1)).(let H10 \def (eq_ind C x1 (\lambda (c: +C).(csuba g c2 c)) H9 (CHead x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat +f) t) H8)) in (let H_y \def (clear_flat x0 (CHead d1 (Bind Abbr) u1) +(clear_gen_flat f x0 (CHead d1 (Bind Abbr) u1) t H6) f t) in (let H11 \def +(csuba_clear_trans g (CHead x0 (Flat f) t) c2 H10 (CHead d1 (Bind Abbr) u1) +H_y) in (ex2_ind C (\lambda (e2: C).(csuba g e2 (CHead d1 (Bind Abbr) u1))) +(\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead +d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) +(\lambda (x2: C).(\lambda (H12: (csuba g x2 (CHead d1 (Bind Abbr) +u1))).(\lambda (H13: (clear c2 x2)).(let H_x \def (csuba_gen_abbr_rev g d1 x2 +u1 H12) in (let H14 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C x1 (CHead d2 (Bind +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 @@ -2859,17 +3066,17 @@ u1 a))))) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H15: -(ex2 C (\lambda (d2: C).(eq C x1 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(eq C x1 (CHead d2 (Bind +(ex2 C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (x2: C).(\lambda (H16: (eq C x1 (CHead -x2 (Bind Abbr) u1))).(\lambda (H17: (csuba g x2 d1)).(let H18 \def (eq_ind C -x1 (\lambda (c0: C).(clear c2 c0)) H13 (CHead x2 (Bind Abbr) u1) H16) in +(a: A).(arity g d1 u1 a)))))) (\lambda (x3: C).(\lambda (H16: (eq C x2 (CHead +x3 (Bind Abbr) u1))).(\lambda (H17: (csuba g x3 d1)).(let H18 \def (eq_ind C +x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abbr) u1) H16) in (or_introl (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) (\lambda @@ -2877,14 +3084,14 @@ x1 (\lambda (c0: C).(clear c2 c0)) H13 (CHead x2 (Bind Abbr) u1) H16) in C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)) x2 (getl_intro O c2 (CHead x2 (Bind Abbr) u1) c2 +C).(csuba g d2 d1)) x3 (getl_intro O c2 (CHead x3 (Bind Abbr) u1) c2 (drop_refl c2) H18) H17)))))) H15)) (\lambda (H15: (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(eq C x1 (CHead d2 (Bind Abst) u2))))) +C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(eq C x1 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +A).(eq C x2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or (ex2 C (\lambda (d2: C).(getl @@ -2893,67 +3100,67 @@ T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: A).(\lambda (H16: -(eq C x1 (CHead x2 (Bind Abst) x3))).(\lambda (H17: (csuba g x2 d1)).(\lambda -(H18: (arity g x2 x3 (asucc g x4))).(\lambda (H19: (arity g d1 u1 x4)).(let -H20 \def (eq_ind C x1 (\lambda (c0: C).(clear c2 c0)) H13 (CHead x2 (Bind -Abst) x3) H16) in (or_intror (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +u1 a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: A).(\lambda (H16: +(eq C x2 (CHead x3 (Bind Abst) x4))).(\lambda (H17: (csuba g x3 d1)).(\lambda +(H18: (arity g x3 x4 (asucc g x5))).(\lambda (H19: (arity g d1 u1 x5)).(let +H20 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abst) +x4) H16) in (or_intror (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))) x2 x3 x4 (getl_intro O c2 (CHead x2 (Bind Abst) -x3) c2 (drop_refl c2) H20) H17 H18 H19)))))))))) H15)) H14)))))) H11)))))))) -(\lambda (n: nat).(\lambda (H8: ((\forall (x0: C).((drop n O x0 (CHead c -(Flat f) t)) \to (\forall (c2: C).((csuba g c2 x0) \to (or (ex2 C (\lambda +(a: A).(arity g d1 u1 a)))) x3 x4 x5 (getl_intro O c2 (CHead x3 (Bind Abst) +x4) c2 (drop_refl c2) H20) H17 H18 H19)))))))))) H15)) H14)))))) H11)))))))) +(\lambda (n: nat).(\lambda (H8: ((\forall (x1: C).((drop n O x1 (CHead x0 +(Flat f) t)) \to (\forall (c2: C).((csuba g c2 x1) \to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))))))))).(\lambda (x0: C).(\lambda (H9: (drop (S -n) O x0 (CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g c2 -x0)).(let H11 \def (drop_clear x0 (CHead c (Flat f) t) n H9) in (ex2_3_ind B -C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x0 (CHead e (Bind +(a: A).(arity g d1 u1 a)))))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S +n) O x1 (CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g c2 +x1)).(let H11 \def (drop_clear x1 (CHead x0 (Flat f) t) n H9) in (ex2_3_ind B +C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead -c (Flat f) t))))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +x0 (Flat f) t))))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) -(\lambda (x1: B).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (clear x0 -(CHead x2 (Bind x1) x3))).(\lambda (H13: (drop n O x2 (CHead c (Flat f) -t))).(let H14 \def (csuba_clear_trans g x0 c2 H10 (CHead x2 (Bind x1) x3) -H12) in (ex2_ind C (\lambda (e2: C).(csuba g e2 (CHead x2 (Bind x1) x3))) +(\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H12: (clear x1 +(CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n O x3 (CHead x0 (Flat f) +t))).(let H14 \def (csuba_clear_trans g x1 c2 H10 (CHead x3 (Bind x2) x4) +H12) in (ex2_ind C (\lambda (e2: C).(csuba g e2 (CHead x3 (Bind x2) x4))) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))) (\lambda (x4: C).(\lambda (H15: (csuba g x4 (CHead x2 (Bind x1) -x3))).(\lambda (H16: (clear c2 x4)).(let H_x \def (csuba_gen_bind_rev g x1 x2 -x4 x3 H15) in (let H17 \def H_x in (ex2_3_ind B C T (\lambda (b2: B).(\lambda -(e2: C).(\lambda (v2: T).(eq C x4 (CHead e2 (Bind b2) v2))))) (\lambda (_: -B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 x2)))) (or (ex2 C (\lambda +u1 a)))))) (\lambda (x5: C).(\lambda (H15: (csuba g x5 (CHead x3 (Bind x2) +x4))).(\lambda (H16: (clear c2 x5)).(let H_x \def (csuba_gen_bind_rev g x2 x3 +x5 x4 H15) in (let H17 \def H_x in (ex2_3_ind B C T (\lambda (b2: B).(\lambda +(e2: C).(\lambda (v2: T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csuba g e2 x3)))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x5: B).(\lambda (x6: -C).(\lambda (x7: T).(\lambda (H18: (eq C x4 (CHead x6 (Bind x5) -x7))).(\lambda (H19: (csuba g x6 x2)).(let H20 \def (eq_ind C x4 (\lambda -(c0: C).(clear c2 c0)) H16 (CHead x6 (Bind x5) x7) H18) in (let H21 \def (H8 -x2 H13 x6 H19) in (or_ind (ex2 C (\lambda (d2: C).(getl n x6 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl n x6 (CHead d2 (Bind Abst) u2))))) +(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x6: B).(\lambda (x7: +C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind x6) +x8))).(\lambda (H19: (csuba g x7 x3)).(let H20 \def (eq_ind C x5 (\lambda (c: +C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 H13 +x7 H19) in (or_ind (ex2 C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or @@ -2963,16 +3170,16 @@ T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H22: -(ex2 C (\lambda (d2: C).(getl n x6 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(getl n x6 (CHead d2 (Bind +(ex2 C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (x8: C).(\lambda (H23: (getl n x6 -(CHead x8 (Bind Abbr) u1))).(\lambda (H24: (csuba g x8 d1)).(or_introl (ex2 C +(a: A).(arity g d1 u1 a)))))) (\lambda (x9: C).(\lambda (H23: (getl n x7 +(CHead x9 (Bind Abbr) u1))).(\lambda (H24: (csuba g x9 d1)).(or_introl (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda @@ -2980,13 +3187,13 @@ C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1)) x8 (getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abbr) u1) n H23) +d1)) x9 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abbr) u1) n H23) H24))))) H22)) (\lambda (H22: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(getl n x6 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x6 (CHead d2 +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 @@ -2996,22 +3203,147 @@ C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) -(\lambda (x8: C).(\lambda (x9: T).(\lambda (x10: A).(\lambda (H23: (getl n x6 -(CHead x8 (Bind Abst) x9))).(\lambda (H24: (csuba g x8 d1)).(\lambda (H25: -(arity g x8 x9 (asucc g x10))).(\lambda (H26: (arity g d1 u1 x10)).(or_intror -(ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))) x8 x9 x10 (getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abst) x9) -n H23) H24 H25 H26))))))))) H22)) H21)))))))) H17)))))) H14))))))) -H11)))))))) i) H7))))]) H3 H4)))]) H1 H2)))) H0))))))). +(\lambda (x9: C).(\lambda (x10: T).(\lambda (x11: A).(\lambda (H23: (getl n +x7 (CHead x9 (Bind Abst) x10))).(\lambda (H24: (csuba g x9 d1)).(\lambda +(H25: (arity g x9 x10 (asucc g x11))).(\lambda (H26: (arity g d1 u1 +x11)).(or_intror (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) +u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S +n) c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))) x9 x10 x11 (getl_clear_bind x6 c2 x7 x8 H20 +(CHead x9 (Bind Abst) x10) n H23) H24 H25 H26))))))))) H22)) H21)))))))) +H17)))))) H14))))))) H11)))))))) i) H7))))) k H3 H4))))))) x H1 H2)))) +H0))))))). + +theorem sn3_gen_bind: + \forall (b: B).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 c +(THead (Bind b) u t)) \to (land (sn3 c u) (sn3 (CHead c (Bind b) u) t)))))) +\def + \lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: +(sn3 c (THead (Bind b) u t))).(insert_eq T (THead (Bind b) u t) (\lambda (t0: +T).(sn3 c t0)) (land (sn3 c u) (sn3 (CHead c (Bind b) u) t)) (\lambda (y: +T).(\lambda (H0: (sn3 c y)).(unintro T t (\lambda (t0: T).((eq T y (THead +(Bind b) u t0)) \to (land (sn3 c u) (sn3 (CHead c (Bind b) u) t0)))) (unintro +T u (\lambda (t0: T).(\forall (x: T).((eq T y (THead (Bind b) t0 x)) \to +(land (sn3 c t0) (sn3 (CHead c (Bind b) t0) x))))) (sn3_ind c (\lambda (t0: +T).(\forall (x: T).(\forall (x0: T).((eq T t0 (THead (Bind b) x x0)) \to +(land (sn3 c x) (sn3 (CHead c (Bind b) x) x0)))))) (\lambda (t1: T).(\lambda +(H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 +c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) +\to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).(\forall +(x0: T).((eq T t2 (THead (Bind b) x x0)) \to (land (sn3 c x) (sn3 (CHead c +(Bind b) x) x0)))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T +t1 (THead (Bind b) x x0))).(let H4 \def (eq_ind T t1 (\lambda (t0: +T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c +t0 t2) \to (\forall (x1: T).(\forall (x2: T).((eq T t2 (THead (Bind b) x1 +x2)) \to (land (sn3 c x1) (sn3 (CHead c (Bind b) x1) x2))))))))) H2 (THead +(Bind b) x x0) H3) in (let H5 \def (eq_ind T t1 (\lambda (t0: T).(\forall +(t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to +(sn3 c t2))))) H1 (THead (Bind b) x x0) H3) in (conj (sn3 c x) (sn3 (CHead c +(Bind b) x) x0) (sn3_sing c x (\lambda (t2: T).(\lambda (H6: (((eq T x t2) +\to (\forall (P: Prop).P)))).(\lambda (H7: (pr3 c x t2)).(let H8 \def (H4 +(THead (Bind b) t2 x0) (\lambda (H8: (eq T (THead (Bind b) x x0) (THead (Bind +b) t2 x0))).(\lambda (P: Prop).(let H9 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x | +(TLRef _) \Rightarrow x | (THead _ t0 _) \Rightarrow t0])) (THead (Bind b) x +x0) (THead (Bind b) t2 x0) H8) in (let H10 \def (eq_ind_r T t2 (\lambda (t0: +T).(pr3 c x t0)) H7 x H9) in (let H11 \def (eq_ind_r T t2 (\lambda (t0: +T).((eq T x t0) \to (\forall (P0: Prop).P0))) H6 x H9) in (H11 (refl_equal T +x) P)))))) (pr3_head_12 c x t2 H7 (Bind b) x0 x0 (pr3_refl (CHead c (Bind b) +t2) x0)) t2 x0 (refl_equal T (THead (Bind b) t2 x0))) in (and_ind (sn3 c t2) +(sn3 (CHead c (Bind b) t2) x0) (sn3 c t2) (\lambda (H9: (sn3 c t2)).(\lambda +(_: (sn3 (CHead c (Bind b) t2) x0)).H9)) H8)))))) (sn3_sing (CHead c (Bind b) +x) x0 (\lambda (t2: T).(\lambda (H6: (((eq T x0 t2) \to (\forall (P: +Prop).P)))).(\lambda (H7: (pr3 (CHead c (Bind b) x) x0 t2)).(let H8 \def (H4 +(THead (Bind b) x t2) (\lambda (H8: (eq T (THead (Bind b) x x0) (THead (Bind +b) x t2))).(\lambda (P: Prop).(let H9 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | +(TLRef _) \Rightarrow x0 | (THead _ _ t0) \Rightarrow t0])) (THead (Bind b) x +x0) (THead (Bind b) x t2) H8) in (let H10 \def (eq_ind_r T t2 (\lambda (t0: +T).(pr3 (CHead c (Bind b) x) x0 t0)) H7 x0 H9) in (let H11 \def (eq_ind_r T +t2 (\lambda (t0: T).((eq T x0 t0) \to (\forall (P0: Prop).P0))) H6 x0 H9) in +(H11 (refl_equal T x0) P)))))) (pr3_head_12 c x x (pr3_refl c x) (Bind b) x0 +t2 H7) x t2 (refl_equal T (THead (Bind b) x t2))) in (and_ind (sn3 c x) (sn3 +(CHead c (Bind b) x) t2) (sn3 (CHead c (Bind b) x) t2) (\lambda (_: (sn3 c +x)).(\lambda (H10: (sn3 (CHead c (Bind b) x) t2)).H10)) H8))))))))))))))) y +H0))))) H))))). + +theorem sn3_gen_head: + \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 c +(THead k u t)) \to (sn3 c u))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (c: C).(\forall (u: +T).(\forall (t: T).((sn3 c (THead k0 u t)) \to (sn3 c u)))))) (\lambda (b: +B).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead +(Bind b) u t))).(let H_x \def (sn3_gen_bind b c u t H) in (let H0 \def H_x in +(and_ind (sn3 c u) (sn3 (CHead c (Bind b) u) t) (sn3 c u) (\lambda (H1: (sn3 +c u)).(\lambda (_: (sn3 (CHead c (Bind b) u) t)).H1)) H0)))))))) (\lambda (f: +F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead +(Flat f) u t))).(let H_x \def (sn3_gen_flat f c u t H) in (let H0 \def H_x in +(and_ind (sn3 c u) (sn3 c t) (sn3 c u) (\lambda (H1: (sn3 c u)).(\lambda (_: +(sn3 c t)).H1)) H0)))))))) k). + +theorem sn3_gen_cflat: + \forall (f: F).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 (CHead +c (Flat f) u) t) \to (sn3 c t))))) +\def + \lambda (f: F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: +(sn3 (CHead c (Flat f) u) t)).(sn3_ind (CHead c (Flat f) u) (\lambda (t0: +T).(sn3 c t0)) (\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 +t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Flat f) u) t1 t2) \to +(sn3 (CHead c (Flat f) u) t2)))))).(\lambda (H1: ((\forall (t2: T).((((eq T +t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Flat f) u) t1 t2) \to +(sn3 c t2)))))).(sn3_sing c t1 (\lambda (t2: T).(\lambda (H2: (((eq T t1 t2) +\to (\forall (P: Prop).P)))).(\lambda (H3: (pr3 c t1 t2)).(H1 t2 H2 +(pr3_cflat c t1 t2 H3 f u))))))))) t H))))). + +theorem sn3_cflat: + \forall (c: C).(\forall (t: T).((sn3 c t) \to (\forall (f: F).(\forall (u: +T).(sn3 (CHead c (Flat f) u) t))))) +\def + \lambda (c: C).(\lambda (t: T).(\lambda (H: (sn3 c t)).(\lambda (f: +F).(\lambda (u: T).(sn3_ind c (\lambda (t0: T).(sn3 (CHead c (Flat f) u) t0)) +(\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall +(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H1: ((\forall +(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to +(sn3 (CHead c (Flat f) u) t2)))))).(sn3_pr2_intro (CHead c (Flat f) u) t1 +(\lambda (t2: T).(\lambda (H2: (((eq T t1 t2) \to (\forall (P: +Prop).P)))).(\lambda (H3: (pr2 (CHead c (Flat f) u) t1 t2)).(H1 t2 H2 +(pr3_pr2 c t1 t2 (pr2_gen_cflat f c u t1 t2 H3)))))))))) t H))))). + +theorem sn3_shift: + \forall (b: B).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sn3 c +(THead (Bind b) v t)) \to (sn3 (CHead c (Bind b) v) t))))) +\def + \lambda (b: B).(\lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (H: +(sn3 c (THead (Bind b) v t))).(let H_x \def (sn3_gen_bind b c v t H) in (let +H0 \def H_x in (and_ind (sn3 c v) (sn3 (CHead c (Bind b) v) t) (sn3 (CHead c +(Bind b) v) t) (\lambda (_: (sn3 c v)).(\lambda (H2: (sn3 (CHead c (Bind b) +v) t)).H2)) H0))))))). + +theorem sn3_change: + \forall (b: B).((not (eq B b Abbr)) \to (\forall (c: C).(\forall (v1: +T).(\forall (t: T).((sn3 (CHead c (Bind b) v1) t) \to (\forall (v2: T).(sn3 +(CHead c (Bind b) v2) t))))))) +\def + \lambda (b: B).(\lambda (H: (not (eq B b Abbr))).(\lambda (c: C).(\lambda +(v1: T).(\lambda (t: T).(\lambda (H0: (sn3 (CHead c (Bind b) v1) t)).(\lambda +(v2: T).(sn3_ind (CHead c (Bind b) v1) (\lambda (t0: T).(sn3 (CHead c (Bind +b) v2) t0)) (\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) +\to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) v1) t1 t2) \to (sn3 +(CHead c (Bind b) v1) t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 +t2) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) v1) t1 t2) \to +(sn3 (CHead c (Bind b) v2) t2)))))).(sn3_pr2_intro (CHead c (Bind b) v2) t1 +(\lambda (t2: T).(\lambda (H3: (((eq T t1 t2) \to (\forall (P: +Prop).P)))).(\lambda (H4: (pr2 (CHead c (Bind b) v2) t1 t2)).(H2 t2 H3 +(pr3_pr2 (CHead c (Bind b) v1) t1 t2 (pr2_change b H c v2 t1 t2 H4 +v1)))))))))) t H0))))))). theorem sn3_cpr3_trans: \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr3 c u1 u2) \to (\forall @@ -3030,72 +3362,120 @@ t1 t2) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr3 (CHead c k u2) t1 t2)).(H2 t2 H3 (pr3_pr3_pr3_t c u1 u2 H t1 t2 k H4))))))))) t H0))))))). theorem sn3_bind: - \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (u: -T).((sn3 c u) \to (\forall (t: T).((sn3 (CHead c (Bind b) u) t) \to (sn3 c -(THead (Bind b) u t)))))))) + \forall (b: B).(\forall (c: C).(\forall (u: T).((sn3 c u) \to (\forall (t: +T).((sn3 (CHead c (Bind b) u) t) \to (sn3 c (THead (Bind b) u t))))))) \def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (c: C).(\lambda -(u: T).(\lambda (H0: (sn3 c u)).(sn3_ind c (\lambda (t: T).(\forall (t0: -T).((sn3 (CHead c (Bind b) t) t0) \to (sn3 c (THead (Bind b) t t0))))) -(\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall -(P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall -(t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to -(\forall (t: T).((sn3 (CHead c (Bind b) t2) t) \to (sn3 c (THead (Bind b) t2 -t))))))))).(\lambda (t: T).(\lambda (H3: (sn3 (CHead c (Bind b) t1) -t)).(sn3_ind (CHead c (Bind b) t1) (\lambda (t0: T).(sn3 c (THead (Bind b) t1 -t0))) (\lambda (t2: T).(\lambda (H4: ((\forall (t3: T).((((eq T t2 t3) \to -(\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 -(CHead c (Bind b) t1) t3)))))).(\lambda (H5: ((\forall (t3: T).((((eq T t2 -t3) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to -(sn3 c (THead (Bind b) t1 t3))))))).(sn3_sing c (THead (Bind b) t1 t2) -(\lambda (t3: T).(\lambda (H6: (((eq T (THead (Bind b) t1 t2) t3) \to -(\forall (P: Prop).P)))).(\lambda (H7: (pr3 c (THead (Bind b) t1 t2) -t3)).(let H_x \def (pr3_gen_bind b H c t1 t2 t3 H7) in (let H8 \def H_x in -(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind b) -u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: + \lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (H: (sn3 c +u)).(sn3_ind c (\lambda (t: T).(\forall (t0: T).((sn3 (CHead c (Bind b) t) +t0) \to (sn3 c (THead (Bind b) t t0))))) (\lambda (t1: T).(\lambda (_: +((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 +t2) \to (sn3 c t2)))))).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to +(\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (\forall (t: T).((sn3 (CHead c +(Bind b) t2) t) \to (sn3 c (THead (Bind b) t2 t))))))))).(\lambda (t: +T).(\lambda (H2: (sn3 (CHead c (Bind b) t1) t)).(sn3_ind (CHead c (Bind b) +t1) (\lambda (t0: T).(sn3 c (THead (Bind b) t1 t0))) (\lambda (t2: +T).(\lambda (H3: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: +Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 (CHead c (Bind b) +t1) t3)))))).(\lambda (H4: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: +Prop).P))) \to ((pr3 (CHead c (Bind b) t1) t2 t3) \to (sn3 c (THead (Bind b) +t1 t3))))))).(sn3_sing c (THead (Bind b) t1 t2) (\lambda (t3: T).(\lambda +(H5: (((eq T (THead (Bind b) t1 t2) t3) \to (\forall (P: Prop).P)))).(\lambda +(H6: (pr3 c (THead (Bind b) t1 t2) t3)).(let H_x \def (bind_dec_not b Abst) +in (let H7 \def H_x in (or_ind (eq B b Abst) (not (eq B b Abst)) (sn3 c t3) +(\lambda (H8: (eq B b Abst)).(let H9 \def (eq_ind B b (\lambda (b0: B).(pr3 c +(THead (Bind b0) t1 t2) t3)) H6 Abst H8) in (let H10 \def (eq_ind B b +(\lambda (b0: B).((eq T (THead (Bind b0) t1 t2) t3) \to (\forall (P: +Prop).P))) H5 Abst H8) in (let H11 \def (eq_ind B b (\lambda (b0: B).(\forall +(t4: T).((((eq T t2 t4) \to (\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind +b0) t1) t2 t4) \to (sn3 c (THead (Bind b0) t1 t4)))))) H4 Abst H8) in (let +H12 \def (eq_ind B b (\lambda (b0: B).(\forall (t4: T).((((eq T t2 t4) \to +(\forall (P: Prop).P))) \to ((pr3 (CHead c (Bind b0) t1) t2 t4) \to (sn3 +(CHead c (Bind b0) t1) t4))))) H3 Abst H8) in (let H13 \def (eq_ind B b +(\lambda (b0: B).(\forall (t4: T).((((eq T t1 t4) \to (\forall (P: Prop).P))) +\to ((pr3 c t1 t4) \to (\forall (t0: T).((sn3 (CHead c (Bind b0) t4) t0) \to +(sn3 c (THead (Bind b0) t4 t0)))))))) H1 Abst H8) in (let H14 \def +(pr3_gen_abst c t1 t2 t3 H9) in (ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: +T).(eq T t3 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b0: B).(\forall +(u0: T).(pr3 (CHead c (Bind b0) u0) t2 t4))))) (sn3 c t3) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H15: (eq T t3 (THead (Bind Abst) x0 +x1))).(\lambda (H16: (pr3 c t1 x0)).(\lambda (H17: ((\forall (b0: B).(\forall +(u0: T).(pr3 (CHead c (Bind b0) u0) t2 x1))))).(let H18 \def (eq_ind T t3 +(\lambda (t0: T).((eq T (THead (Bind Abst) t1 t2) t0) \to (\forall (P: +Prop).P))) H10 (THead (Bind Abst) x0 x1) H15) in (eq_ind_r T (THead (Bind +Abst) x0 x1) (\lambda (t0: T).(sn3 c t0)) (let H_x0 \def (term_dec t1 x0) in +(let H19 \def H_x0 in (or_ind (eq T t1 x0) ((eq T t1 x0) \to (\forall (P: +Prop).P)) (sn3 c (THead (Bind Abst) x0 x1)) (\lambda (H20: (eq T t1 x0)).(let +H21 \def (eq_ind_r T x0 (\lambda (t0: T).((eq T (THead (Bind Abst) t1 t2) +(THead (Bind Abst) t0 x1)) \to (\forall (P: Prop).P))) H18 t1 H20) in (let +H22 \def (eq_ind_r T x0 (\lambda (t0: T).(pr3 c t1 t0)) H16 t1 H20) in +(eq_ind T t1 (\lambda (t0: T).(sn3 c (THead (Bind Abst) t0 x1))) (let H_x1 +\def (term_dec t2 x1) in (let H23 \def H_x1 in (or_ind (eq T t2 x1) ((eq T t2 +x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Bind Abst) t1 x1)) (\lambda +(H24: (eq T t2 x1)).(let H25 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T +(THead (Bind Abst) t1 t2) (THead (Bind Abst) t1 t0)) \to (\forall (P: +Prop).P))) H21 t2 H24) in (let H26 \def (eq_ind_r T x1 (\lambda (t0: +T).(\forall (b0: B).(\forall (u0: T).(pr3 (CHead c (Bind b0) u0) t2 t0)))) +H17 t2 H24) in (eq_ind T t2 (\lambda (t0: T).(sn3 c (THead (Bind Abst) t1 +t0))) (H25 (refl_equal T (THead (Bind Abst) t1 t2)) (sn3 c (THead (Bind Abst) +t1 t2))) x1 H24)))) (\lambda (H24: (((eq T t2 x1) \to (\forall (P: +Prop).P)))).(H11 x1 H24 (H17 Abst t1))) H23))) x0 H20)))) (\lambda (H20: +(((eq T t1 x0) \to (\forall (P: Prop).P)))).(let H_x1 \def (term_dec t2 x1) +in (let H21 \def H_x1 in (or_ind (eq T t2 x1) ((eq T t2 x1) \to (\forall (P: +Prop).P)) (sn3 c (THead (Bind Abst) x0 x1)) (\lambda (H22: (eq T t2 x1)).(let +H23 \def (eq_ind_r T x1 (\lambda (t0: T).(\forall (b0: B).(\forall (u0: +T).(pr3 (CHead c (Bind b0) u0) t2 t0)))) H17 t2 H22) in (eq_ind T t2 (\lambda +(t0: T).(sn3 c (THead (Bind Abst) x0 t0))) (H13 x0 H20 H16 t2 (sn3_cpr3_trans +c t1 x0 H16 (Bind Abst) t2 (sn3_sing (CHead c (Bind Abst) t1) t2 H12))) x1 +H22))) (\lambda (H22: (((eq T t2 x1) \to (\forall (P: Prop).P)))).(H13 x0 H20 +H16 x1 (sn3_cpr3_trans c t1 x0 H16 (Bind Abst) x1 (H12 x1 H22 (H17 Abst +t1))))) H21)))) H19))) t3 H15))))))) H14)))))))) (\lambda (H8: (not (eq B b +Abst))).(let H_x0 \def (pr3_gen_bind b H8 c t1 t2 t3 H6) in (let H9 \def H_x0 +in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind +b) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 (CHead c (Bind b) t1) t2 t4)))) (pr3 (CHead c (Bind -b) t1) t2 (lift (S O) O t3)) (sn3 c t3) (\lambda (H9: (ex3_2 T T (\lambda +b) t1) t2 (lift (S O) O t3)) (sn3 c t3) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 (CHead c (Bind b) t1) t2 t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr3 (CHead c (Bind b) -t1) t2 t4))) (sn3 c t3) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H10: (eq -T t3 (THead (Bind b) x0 x1))).(\lambda (H11: (pr3 c t1 x0)).(\lambda (H12: -(pr3 (CHead c (Bind b) t1) t2 x1)).(let H13 \def (eq_ind T t3 (\lambda (t0: -T).((eq T (THead (Bind b) t1 t2) t0) \to (\forall (P: Prop).P))) H6 (THead -(Bind b) x0 x1) H10) in (eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t0: -T).(sn3 c t0)) (let H_x0 \def (term_dec t1 x0) in (let H14 \def H_x0 in +t1) t2 t4))) (sn3 c t3) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq +T t3 (THead (Bind b) x0 x1))).(\lambda (H12: (pr3 c t1 x0)).(\lambda (H13: +(pr3 (CHead c (Bind b) t1) t2 x1)).(let H14 \def (eq_ind T t3 (\lambda (t0: +T).((eq T (THead (Bind b) t1 t2) t0) \to (\forall (P: Prop).P))) H5 (THead +(Bind b) x0 x1) H11) in (eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t0: +T).(sn3 c t0)) (let H_x1 \def (term_dec t1 x0) in (let H15 \def H_x1 in (or_ind (eq T t1 x0) ((eq T t1 x0) \to (\forall (P: Prop).P)) (sn3 c (THead -(Bind b) x0 x1)) (\lambda (H15: (eq T t1 x0)).(let H16 \def (eq_ind_r T x0 +(Bind b) x0 x1)) (\lambda (H16: (eq T t1 x0)).(let H17 \def (eq_ind_r T x0 (\lambda (t0: T).((eq T (THead (Bind b) t1 t2) (THead (Bind b) t0 x1)) \to -(\forall (P: Prop).P))) H13 t1 H15) in (let H17 \def (eq_ind_r T x0 (\lambda -(t0: T).(pr3 c t1 t0)) H11 t1 H15) in (eq_ind T t1 (\lambda (t0: T).(sn3 c -(THead (Bind b) t0 x1))) (let H_x1 \def (term_dec t2 x1) in (let H18 \def -H_x1 in (or_ind (eq T t2 x1) ((eq T t2 x1) \to (\forall (P: Prop).P)) (sn3 c -(THead (Bind b) t1 x1)) (\lambda (H19: (eq T t2 x1)).(let H20 \def (eq_ind_r +(\forall (P: Prop).P))) H14 t1 H16) in (let H18 \def (eq_ind_r T x0 (\lambda +(t0: T).(pr3 c t1 t0)) H12 t1 H16) in (eq_ind T t1 (\lambda (t0: T).(sn3 c +(THead (Bind b) t0 x1))) (let H_x2 \def (term_dec t2 x1) in (let H19 \def +H_x2 in (or_ind (eq T t2 x1) ((eq T t2 x1) \to (\forall (P: Prop).P)) (sn3 c +(THead (Bind b) t1 x1)) (\lambda (H20: (eq T t2 x1)).(let H21 \def (eq_ind_r T x1 (\lambda (t0: T).((eq T (THead (Bind b) t1 t2) (THead (Bind b) t1 t0)) -\to (\forall (P: Prop).P))) H16 t2 H19) in (let H21 \def (eq_ind_r T x1 -(\lambda (t0: T).(pr3 (CHead c (Bind b) t1) t2 t0)) H12 t2 H19) in (eq_ind T -t2 (\lambda (t0: T).(sn3 c (THead (Bind b) t1 t0))) (H20 (refl_equal T (THead -(Bind b) t1 t2)) (sn3 c (THead (Bind b) t1 t2))) x1 H19)))) (\lambda (H19: -(((eq T t2 x1) \to (\forall (P: Prop).P)))).(H5 x1 H19 H12)) H18))) x0 -H15)))) (\lambda (H15: (((eq T t1 x0) \to (\forall (P: Prop).P)))).(let H_x1 -\def (term_dec t2 x1) in (let H16 \def H_x1 in (or_ind (eq T t2 x1) ((eq T t2 -x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Bind b) x0 x1)) (\lambda (H17: -(eq T t2 x1)).(let H18 \def (eq_ind_r T x1 (\lambda (t0: T).(pr3 (CHead c -(Bind b) t1) t2 t0)) H12 t2 H17) in (eq_ind T t2 (\lambda (t0: T).(sn3 c -(THead (Bind b) x0 t0))) (H2 x0 H15 H11 t2 (sn3_cpr3_trans c t1 x0 H11 (Bind -b) t2 (sn3_sing (CHead c (Bind b) t1) t2 H4))) x1 H17))) (\lambda (H17: (((eq -T t2 x1) \to (\forall (P: Prop).P)))).(H2 x0 H15 H11 x1 (sn3_cpr3_trans c t1 -x0 H11 (Bind b) x1 (H4 x1 H17 H12)))) H16)))) H14))) t3 H10))))))) H9)) -(\lambda (H9: (pr3 (CHead c (Bind b) t1) t2 (lift (S O) O t3))).(sn3_gen_lift -(CHead c (Bind b) t1) t3 (S O) O (sn3_pr3_trans (CHead c (Bind b) t1) t2 -(sn3_pr2_intro (CHead c (Bind b) t1) t2 (\lambda (t0: T).(\lambda (H10: (((eq -T t2 t0) \to (\forall (P: Prop).P)))).(\lambda (H11: (pr2 (CHead c (Bind b) -t1) t2 t0)).(H4 t0 H10 (pr3_pr2 (CHead c (Bind b) t1) t2 t0 H11)))))) (lift -(S O) O t3) H9) c (drop_drop (Bind b) O c c (drop_refl c) t1))) H8)))))))))) -t H3)))))) u H0))))). +\to (\forall (P: Prop).P))) H17 t2 H20) in (let H22 \def (eq_ind_r T x1 +(\lambda (t0: T).(pr3 (CHead c (Bind b) t1) t2 t0)) H13 t2 H20) in (eq_ind T +t2 (\lambda (t0: T).(sn3 c (THead (Bind b) t1 t0))) (H21 (refl_equal T (THead +(Bind b) t1 t2)) (sn3 c (THead (Bind b) t1 t2))) x1 H20)))) (\lambda (H20: +(((eq T t2 x1) \to (\forall (P: Prop).P)))).(H4 x1 H20 H13)) H19))) x0 +H16)))) (\lambda (H16: (((eq T t1 x0) \to (\forall (P: Prop).P)))).(let H_x2 +\def (term_dec t2 x1) in (let H17 \def H_x2 in (or_ind (eq T t2 x1) ((eq T t2 +x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Bind b) x0 x1)) (\lambda (H18: +(eq T t2 x1)).(let H19 \def (eq_ind_r T x1 (\lambda (t0: T).(pr3 (CHead c +(Bind b) t1) t2 t0)) H13 t2 H18) in (eq_ind T t2 (\lambda (t0: T).(sn3 c +(THead (Bind b) x0 t0))) (H1 x0 H16 H12 t2 (sn3_cpr3_trans c t1 x0 H12 (Bind +b) t2 (sn3_sing (CHead c (Bind b) t1) t2 H3))) x1 H18))) (\lambda (H18: (((eq +T t2 x1) \to (\forall (P: Prop).P)))).(H1 x0 H16 H12 x1 (sn3_cpr3_trans c t1 +x0 H12 (Bind b) x1 (H3 x1 H18 H13)))) H17)))) H15))) t3 H11))))))) H10)) +(\lambda (H10: (pr3 (CHead c (Bind b) t1) t2 (lift (S O) O +t3))).(sn3_gen_lift (CHead c (Bind b) t1) t3 (S O) O (sn3_pr3_trans (CHead c +(Bind b) t1) t2 (sn3_pr2_intro (CHead c (Bind b) t1) t2 (\lambda (t0: +T).(\lambda (H11: (((eq T t2 t0) \to (\forall (P: Prop).P)))).(\lambda (H12: +(pr2 (CHead c (Bind b) t1) t2 t0)).(H3 t0 H11 (pr3_pr2 (CHead c (Bind b) t1) +t2 t0 H12)))))) (lift (S O) O t3) H10) c (drop_drop (Bind b) O c c (drop_refl +c) t1))) H9)))) H7)))))))))) t H2)))))) u H)))). theorem sn3_beta: \forall (c: C).(\forall (v: T).(\forall (t: T).((sn3 c (THead (Bind Abbr) v @@ -3964,7 +4344,7 @@ H23) in (let H27 \def (eq_ind_r T x2 (\lambda (t0: T).(pr2 c t0 x6)) H18 t1 H24) in (let H28 \def (eq_ind_r B x1 (\lambda (b0: B).(pr2 (CHead c (Bind b0) x6) x0 x4)) H26 b H25) in (eq_ind B b (\lambda (b0: B).(sn3 c (THead (Bind b0) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))) (sn3_pr3_trans c (THead -(Bind b) t1 (THead (Flat Appl) (lift (S O) O x5) x4)) (sn3_bind b H c t1 +(Bind b) t1 (THead (Flat Appl) (lift (S O) O x5) x4)) (sn3_bind b c t1 (sn3_sing c t1 H1) (THead (Flat Appl) (lift (S O) O x5) x4) (let H_x \def (term_dec x x5) in (let H29 \def H_x in (or_ind (eq T x x5) ((eq T x x5) \to (\forall (P: Prop).P)) (sn3 (CHead c (Bind b) t1) (THead (Flat Appl) (lift (S @@ -4036,16 +4416,17 @@ t)))))))))) \def \lambda (c: C).(\lambda (u: T).(\lambda (v: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead (Flat Appl) u (THead (Bind Abbr) v t)))).(\lambda (w: -T).(\lambda (H0: (sn3 c w)).(let H1 \def (sn3_gen_flat Appl c u (THead (Bind -Abbr) v t) H) in (and_ind (sn3 c u) (sn3 c (THead (Bind Abbr) v t)) (sn3 c -(THead (Flat Appl) u (THead (Flat Appl) v (THead (Bind Abst) w t)))) (\lambda -(H2: (sn3 c u)).(\lambda (H3: (sn3 c (THead (Bind Abbr) v t))).(sn3_appl_appl -v (THead (Bind Abst) w t) c (sn3_beta c v t H3 w H0) u H2 (\lambda (u2: -T).(\lambda (H4: (pr3 c (THead (Flat Appl) v (THead (Bind Abst) w t)) -u2)).(\lambda (H5: (((iso (THead (Flat Appl) v (THead (Bind Abst) w t)) u2) -\to (\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) u (THead -(Bind Abbr) v t)) H (THead (Flat Appl) u u2) (pr3_thin_dx c (THead (Bind -Abbr) v t) u2 (pr3_iso_beta v w t c u2 H4 H5) u Appl)))))))) H1)))))))). +T).(\lambda (H0: (sn3 c w)).(let H_x \def (sn3_gen_flat Appl c u (THead (Bind +Abbr) v t) H) in (let H1 \def H_x in (and_ind (sn3 c u) (sn3 c (THead (Bind +Abbr) v t)) (sn3 c (THead (Flat Appl) u (THead (Flat Appl) v (THead (Bind +Abst) w t)))) (\lambda (H2: (sn3 c u)).(\lambda (H3: (sn3 c (THead (Bind +Abbr) v t))).(sn3_appl_appl v (THead (Bind Abst) w t) c (sn3_beta c v t H3 w +H0) u H2 (\lambda (u2: T).(\lambda (H4: (pr3 c (THead (Flat Appl) v (THead +(Bind Abst) w t)) u2)).(\lambda (H5: (((iso (THead (Flat Appl) v (THead (Bind +Abst) w t)) u2) \to (\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat +Appl) u (THead (Bind Abbr) v t)) H (THead (Flat Appl) u u2) (pr3_thin_dx c +(THead (Bind Abbr) v t) u2 (pr3_iso_beta v w t c u2 H4 H5) u Appl)))))))) +H1))))))))). theorem sn3_appls_bind: \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (u: @@ -4057,7 +4438,7 @@ Appl) vs (THead (Bind b) u t)))))))))) (u: T).(\lambda (H0: (sn3 c u)).(\lambda (vs: TList).(TList_ind (\lambda (t: TList).(\forall (t0: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) (lifts (S O) O t) t0)) \to (sn3 c (THeads (Flat Appl) t (THead (Bind b) u t0)))))) -(\lambda (t: T).(\lambda (H1: (sn3 (CHead c (Bind b) u) t)).(sn3_bind b H c u +(\lambda (t: T).(\lambda (H1: (sn3 (CHead c (Bind b) u) t)).(sn3_bind b c u H0 t H1))) (\lambda (v: T).(\lambda (vs0: TList).(TList_ind (\lambda (t: TList).(((\forall (t0: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) (lifts (S O) O t) t0)) \to (sn3 c (THeads (Flat Appl) t (THead (Bind b) u @@ -4078,26 +4459,25 @@ t1))))))))).(\lambda (H2: ((\forall (t1: T).((sn3 (CHead c (Bind b) u) (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1)) \to (sn3 c (THeads (Flat Appl) (TCons t t0) (THead (Bind b) u t1))))))).(\lambda (t1: T).(\lambda (H3: (sn3 (CHead c (Bind b) u) (THead (Flat Appl) (lift (S O) O -v) (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1)))).(let H4 \def +v) (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1)))).(let H_x \def (sn3_gen_flat Appl (CHead c (Bind b) u) (lift (S O) O v) (THeads (Flat Appl) -(lifts (S O) O (TCons t t0)) t1) H3) in (and_ind (sn3 (CHead c (Bind b) u) -(lift (S O) O v)) (sn3 (CHead c (Bind b) u) (THead (Flat Appl) (lift (S O) O -t) (THeads (Flat Appl) (lifts (S O) O t0) t1))) (sn3 c (THead (Flat Appl) v +(lifts (S O) O (TCons t t0)) t1) H3) in (let H4 \def H_x in (and_ind (sn3 +(CHead c (Bind b) u) (lift (S O) O v)) (sn3 (CHead c (Bind b) u) (THeads +(Flat Appl) (lifts (S O) O (TCons t t0)) t1)) (sn3 c (THead (Flat Appl) v (THeads (Flat Appl) (TCons t t0) (THead (Bind b) u t1)))) (\lambda (H5: (sn3 (CHead c (Bind b) u) (lift (S O) O v))).(\lambda (H6: (sn3 (CHead c (Bind b) -u) (THead (Flat Appl) (lift (S O) O t) (THeads (Flat Appl) (lifts (S O) O t0) -t1)))).(let H_y \def (sn3_gen_lift (CHead c (Bind b) u) v (S O) O H5 c) in -(sn3_appl_appls t (THead (Bind b) u t1) t0 c (H2 t1 H6) v (H_y (drop_drop -(Bind b) O c c (drop_refl c) u)) (\lambda (u2: T).(\lambda (H7: (pr3 c -(THeads (Flat Appl) (TCons t t0) (THead (Bind b) u t1)) u2)).(\lambda (H8: -(((iso (THeads (Flat Appl) (TCons t t0) (THead (Bind b) u t1)) u2) \to -(\forall (P: Prop).P)))).(let H9 \def (pr3_iso_appls_bind b H (TCons t t0) u -t1 c u2 H7 H8) in (sn3_pr3_trans c (THead (Flat Appl) v (THead (Bind b) u -(THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1))) (sn3_appl_bind b H c u -H0 (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1) v H3) (THead (Flat -Appl) v u2) (pr3_flat c v v (pr3_refl c v) (THead (Bind b) u (THeads (Flat -Appl) (lifts (S O) O (TCons t t0)) t1)) u2 H9 Appl)))))))))) H4)))))))) -vs0))) vs)))))). +u) (THeads (Flat Appl) (lifts (S O) O (TCons t t0)) t1))).(let H_y \def +(sn3_gen_lift (CHead c (Bind b) u) v (S O) O H5 c) in (sn3_appl_appls t +(THead (Bind b) u t1) t0 c (H2 t1 H6) v (H_y (drop_drop (Bind b) O c c +(drop_refl c) u)) (\lambda (u2: T).(\lambda (H7: (pr3 c (THeads (Flat Appl) +(TCons t t0) (THead (Bind b) u t1)) u2)).(\lambda (H8: (((iso (THeads (Flat +Appl) (TCons t t0) (THead (Bind b) u t1)) u2) \to (\forall (P: +Prop).P)))).(let H9 \def (pr3_iso_appls_bind b H (TCons t t0) u t1 c u2 H7 +H8) in (sn3_pr3_trans c (THead (Flat Appl) v (THead (Bind b) u (THeads (Flat +Appl) (lifts (S O) O (TCons t t0)) t1))) (sn3_appl_bind b H c u H0 (THeads +(Flat Appl) (lifts (S O) O (TCons t t0)) t1) v H3) (THead (Flat Appl) v u2) +(pr3_flat c v v (pr3_refl c v) (THead (Bind b) u (THeads (Flat Appl) (lifts +(S O) O (TCons t t0)) t1)) u2 H9 Appl)))))))))) H4))))))))) vs0))) vs)))))). theorem sn3_appls_beta: \forall (c: C).(\forall (v: T).(\forall (t: T).(\forall (us: TList).((sn3 c @@ -4132,13 +4512,13 @@ Appl) (TCons t0 t1) (THead (Bind Abbr) v t))) \to (\forall (w: T).((sn3 c w) \to (sn3 c (THeads (Flat Appl) (TCons t0 t1) (THead (Flat Appl) v (THead (Bind Abst) w t))))))))).(\lambda (H1: (sn3 c (THead (Flat Appl) u (THeads (Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v t))))).(\lambda (w: -T).(\lambda (H2: (sn3 c w)).(let H3 \def (sn3_gen_flat Appl c u (THeads (Flat -Appl) (TCons t0 t1) (THead (Bind Abbr) v t)) H1) in (and_ind (sn3 c u) (sn3 c -(THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind Abbr) v t)))) (sn3 -c (THead (Flat Appl) u (THeads (Flat Appl) (TCons t0 t1) (THead (Flat Appl) v -(THead (Bind Abst) w t))))) (\lambda (H4: (sn3 c u)).(\lambda (H5: (sn3 c -(THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Bind Abbr) v -t))))).(sn3_appl_appls t0 (THead (Flat Appl) v (THead (Bind Abst) w t)) t1 c +T).(\lambda (H2: (sn3 c w)).(let H_x \def (sn3_gen_flat Appl c u (THeads +(Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v t)) H1) in (let H3 \def H_x in +(and_ind (sn3 c u) (sn3 c (THeads (Flat Appl) (TCons t0 t1) (THead (Bind +Abbr) v t))) (sn3 c (THead (Flat Appl) u (THeads (Flat Appl) (TCons t0 t1) +(THead (Flat Appl) v (THead (Bind Abst) w t))))) (\lambda (H4: (sn3 c +u)).(\lambda (H5: (sn3 c (THeads (Flat Appl) (TCons t0 t1) (THead (Bind Abbr) +v t)))).(sn3_appl_appls t0 (THead (Flat Appl) v (THead (Bind Abst) w t)) t1 c (H0 H5 w H2) u H4 (\lambda (u2: T).(\lambda (H6: (pr3 c (THeads (Flat Appl) (TCons t0 t1) (THead (Flat Appl) v (THead (Bind Abst) w t))) u2)).(\lambda (H7: (((iso (THeads (Flat Appl) (TCons t0 t1) (THead (Flat Appl) v (THead @@ -4146,7 +4526,7 @@ t))))).(sn3_appl_appls t0 (THead (Flat Appl) v (THead (Bind Abst) w t)) t1 c (pr3_iso_appls_beta (TCons t0 t1) v w t c u2 H6 H7) in (sn3_pr3_trans c (THead (Flat Appl) u (THeads (Flat Appl) (TCons t0 t1) (THead (Bind Abbr) v t))) H1 (THead (Flat Appl) u u2) (pr3_thin_dx c (THeads (Flat Appl) (TCons t0 -t1) (THead (Bind Abbr) v t)) u2 H8 u Appl))))))))) H3))))))))) us0))) us)))). +t1) (THead (Bind Abbr) v t)) u2 H8 u Appl))))))))) H3)))))))))) us0))) us)))). theorem sn3_appls_abbr: \forall (c: C).(\forall (d: C).(\forall (w: T).(\forall (i: nat).((getl i c @@ -4173,17 +4553,128 @@ Appl) t0 (lift (S i) O w))) \to (sn3 c (THeads (Flat Appl) t0 (TLRef i))))) i)))))))).(\lambda (H1: (((sn3 c (THeads (Flat Appl) (TCons t t0) (lift (S i) O w))) \to (sn3 c (THeads (Flat Appl) (TCons t t0) (TLRef i)))))).(\lambda (H2: (sn3 c (THead (Flat Appl) v (THeads (Flat Appl) (TCons t t0) (lift (S i) -O w))))).(let H3 \def (sn3_gen_flat Appl c v (THeads (Flat Appl) (TCons t t0) -(lift (S i) O w)) H2) in (and_ind (sn3 c v) (sn3 c (THead (Flat Appl) t -(THeads (Flat Appl) t0 (lift (S i) O w)))) (sn3 c (THead (Flat Appl) v -(THeads (Flat Appl) (TCons t t0) (TLRef i)))) (\lambda (H4: (sn3 c -v)).(\lambda (H5: (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S -i) O w))))).(sn3_appl_appls t (TLRef i) t0 c (H1 H5) v H4 (\lambda (u2: -T).(\lambda (H6: (pr3 c (THeads (Flat Appl) (TCons t t0) (TLRef i)) -u2)).(\lambda (H7: (((iso (THeads (Flat Appl) (TCons t t0) (TLRef i)) u2) \to -(\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) v (THeads (Flat -Appl) (TCons t t0) (lift (S i) O w))) H2 (THead (Flat Appl) v u2) -(pr3_thin_dx c (THeads (Flat Appl) (TCons t t0) (lift (S i) O w)) u2 -(pr3_iso_appls_abbr c d w i H (TCons t t0) u2 H6 H7) v Appl)))))))) H3))))))) -vs0))) vs)))))). +O w))))).(let H_x \def (sn3_gen_flat Appl c v (THeads (Flat Appl) (TCons t +t0) (lift (S i) O w)) H2) in (let H3 \def H_x in (and_ind (sn3 c v) (sn3 c +(THeads (Flat Appl) (TCons t t0) (lift (S i) O w))) (sn3 c (THead (Flat Appl) +v (THeads (Flat Appl) (TCons t t0) (TLRef i)))) (\lambda (H4: (sn3 c +v)).(\lambda (H5: (sn3 c (THeads (Flat Appl) (TCons t t0) (lift (S i) O +w)))).(sn3_appl_appls t (TLRef i) t0 c (H1 H5) v H4 (\lambda (u2: T).(\lambda +(H6: (pr3 c (THeads (Flat Appl) (TCons t t0) (TLRef i)) u2)).(\lambda (H7: +(((iso (THeads (Flat Appl) (TCons t t0) (TLRef i)) u2) \to (\forall (P: +Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) v (THeads (Flat Appl) (TCons +t t0) (lift (S i) O w))) H2 (THead (Flat Appl) v u2) (pr3_thin_dx c (THeads +(Flat Appl) (TCons t t0) (lift (S i) O w)) u2 (pr3_iso_appls_abbr c d w i H +(TCons t t0) u2 H6 H7) v Appl)))))))) H3)))))))) vs0))) vs)))))). + +theorem sn3_gen_def: + \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i c +(CHead d (Bind Abbr) v)) \to ((sn3 c (TLRef i)) \to (sn3 d v)))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda +(H: (getl i c (CHead d (Bind Abbr) v))).(\lambda (H0: (sn3 c (TLRef +i))).(sn3_gen_lift c v (S i) O (sn3_pr3_trans c (TLRef i) H0 (lift (S i) O v) +(pr3_pr2 c (TLRef i) (lift (S i) O v) (pr2_delta c d v i H (TLRef i) (TLRef +i) (pr0_refl (TLRef i)) (lift (S i) O v) (subst0_lref v i)))) d (getl_drop +Abbr c d v i H))))))). + +theorem sn3_cdelta: + \forall (v: T).(\forall (t: T).(\forall (i: nat).(((\forall (w: T).(ex T +(\lambda (u: T).(subst0 i w t u))))) \to (\forall (c: C).(\forall (d: +C).((getl i c (CHead d (Bind Abbr) v)) \to ((sn3 c t) \to (sn3 d v)))))))) +\def + \lambda (v: T).(\lambda (t: T).(\lambda (i: nat).(\lambda (H: ((\forall (w: +T).(ex T (\lambda (u: T).(subst0 i w t u)))))).(let H_x \def (H v) in (let H0 +\def H_x in (ex_ind T (\lambda (u: T).(subst0 i v t u)) (\forall (c: +C).(\forall (d: C).((getl i c (CHead d (Bind Abbr) v)) \to ((sn3 c t) \to +(sn3 d v))))) (\lambda (x: T).(\lambda (H1: (subst0 i v t x)).(subst0_ind +(\lambda (n: nat).(\lambda (t0: T).(\lambda (t1: T).(\lambda (_: T).(\forall +(c: C).(\forall (d: C).((getl n c (CHead d (Bind Abbr) t0)) \to ((sn3 c t1) +\to (sn3 d t0))))))))) (\lambda (v0: T).(\lambda (i0: nat).(\lambda (c: +C).(\lambda (d: C).(\lambda (H2: (getl i0 c (CHead d (Bind Abbr) +v0))).(\lambda (H3: (sn3 c (TLRef i0))).(sn3_gen_def c d v0 i0 H2 H3))))))) +(\lambda (v0: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: +nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (H3: ((\forall (c: +C).(\forall (d: C).((getl i0 c (CHead d (Bind Abbr) v0)) \to ((sn3 c u1) \to +(sn3 d v0))))))).(\lambda (t0: T).(\lambda (k: K).(\lambda (c: C).(\lambda +(d: C).(\lambda (H4: (getl i0 c (CHead d (Bind Abbr) v0))).(\lambda (H5: (sn3 +c (THead k u1 t0))).(let H_y \def (sn3_gen_head k c u1 t0 H5) in (H3 c d H4 +H_y)))))))))))))) (\lambda (k: K).(\lambda (v0: T).(\lambda (t2: T).(\lambda +(t1: T).(\lambda (i0: nat).(\lambda (H2: (subst0 (s k i0) v0 t1 t2)).(\lambda +(H3: ((\forall (c: C).(\forall (d: C).((getl (s k i0) c (CHead d (Bind Abbr) +v0)) \to ((sn3 c t1) \to (sn3 d v0))))))).(\lambda (u: T).(\lambda (c: +C).(\lambda (d: C).(\lambda (H4: (getl i0 c (CHead d (Bind Abbr) +v0))).(\lambda (H5: (sn3 c (THead k u t1))).(K_ind (\lambda (k0: K).((subst0 +(s k0 i0) v0 t1 t2) \to (((\forall (c0: C).(\forall (d0: C).((getl (s k0 i0) +c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to (sn3 d0 v0)))))) \to ((sn3 +c (THead k0 u t1)) \to (sn3 d v0))))) (\lambda (b: B).(\lambda (_: (subst0 (s +(Bind b) i0) v0 t1 t2)).(\lambda (H7: ((\forall (c0: C).(\forall (d0: +C).((getl (s (Bind b) i0) c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to +(sn3 d0 v0))))))).(\lambda (H8: (sn3 c (THead (Bind b) u t1))).(let H_x0 \def +(sn3_gen_bind b c u t1 H8) in (let H9 \def H_x0 in (and_ind (sn3 c u) (sn3 +(CHead c (Bind b) u) t1) (sn3 d v0) (\lambda (_: (sn3 c u)).(\lambda (H11: +(sn3 (CHead c (Bind b) u) t1)).(H7 (CHead c (Bind b) u) d (getl_clear_bind b +(CHead c (Bind b) u) c u (clear_bind b c u) (CHead d (Bind Abbr) v0) i0 H4) +H11))) H9))))))) (\lambda (f: F).(\lambda (_: (subst0 (s (Flat f) i0) v0 t1 +t2)).(\lambda (H7: ((\forall (c0: C).(\forall (d0: C).((getl (s (Flat f) i0) +c0 (CHead d0 (Bind Abbr) v0)) \to ((sn3 c0 t1) \to (sn3 d0 v0))))))).(\lambda +(H8: (sn3 c (THead (Flat f) u t1))).(let H_x0 \def (sn3_gen_flat f c u t1 H8) +in (let H9 \def H_x0 in (and_ind (sn3 c u) (sn3 c t1) (sn3 d v0) (\lambda (_: +(sn3 c u)).(\lambda (H11: (sn3 c t1)).(H7 c d H4 H11))) H9))))))) k H2 H3 +H5))))))))))))) (\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda +(i0: nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (H3: ((\forall (c: +C).(\forall (d: C).((getl i0 c (CHead d (Bind Abbr) v0)) \to ((sn3 c u1) \to +(sn3 d v0))))))).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(_: (subst0 (s k i0) v0 t1 t2)).(\lambda (_: ((\forall (c: C).(\forall (d: +C).((getl (s k i0) c (CHead d (Bind Abbr) v0)) \to ((sn3 c t1) \to (sn3 d +v0))))))).(\lambda (c: C).(\lambda (d: C).(\lambda (H6: (getl i0 c (CHead d +(Bind Abbr) v0))).(\lambda (H7: (sn3 c (THead k u1 t1))).(let H_y \def +(sn3_gen_head k c u1 t1 H7) in (H3 c d H6 H_y))))))))))))))))) i v t x H1))) +H0)))))). + +inductive csubn: C \to (C \to Prop) \def +| csubn_sort: \forall (n: nat).(csubn (CSort n) (CSort n)) +| csubn_head: \forall (c1: C).(\forall (c2: C).((csubn c1 c2) \to (\forall +(k: K).(\forall (v: T).(csubn (CHead c1 k v) (CHead c2 k v)))))) +| csubn_abst: \forall (c1: C).(\forall (c2: C).((csubn c1 c2) \to (\forall +(v: T).(\forall (w: T).((sn3 c2 w) \to (csubn (CHead c1 (Bind Abst) v) (CHead +c2 (Bind Abbr) w))))))). + +theorem csubc_csuba: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (csuba +g c1 c2)))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubc g c1 +c2)).(csubc_ind g (\lambda (c: C).(\lambda (c0: C).(csuba g c c0))) (\lambda +(n: nat).(csuba_refl g (CSort n))) (\lambda (c3: C).(\lambda (c4: C).(\lambda +(_: (csubc g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (k: K).(\lambda +(v: T).(csuba_head g c3 c4 H1 k v))))))) (\lambda (c3: C).(\lambda (c4: +C).(\lambda (_: (csubc g c3 c4)).(\lambda (H1: (csuba g c3 c4)).(\lambda (v: +T).(\lambda (a: A).(\lambda (H2: (sc3 g (asucc g a) c3 v)).(\lambda (w: +T).(\lambda (H3: (sc3 g a c4 w)).(csuba_abst g c3 c4 H1 v a (sc3_arity_gen g +c3 v (asucc g a) H2) w (sc3_arity_gen g c4 w a H3))))))))))) c1 c2 H)))). + +theorem csubc_csubn: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csubc g c1 c2) \to (csubn +c1 c2)))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubc g c1 +c2)).(csubc_ind g (\lambda (c: C).(\lambda (c0: C).(csubn c c0))) (\lambda +(n: nat).(csubn_sort n)) (\lambda (c3: C).(\lambda (c4: C).(\lambda (_: +(csubc g c3 c4)).(\lambda (H1: (csubn c3 c4)).(\lambda (k: K).(\lambda (v: +T).(csubn_head c3 c4 H1 k v))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda +(_: (csubc g c3 c4)).(\lambda (H1: (csubn c3 c4)).(\lambda (v: T).(\lambda +(a: A).(\lambda (_: (sc3 g (asucc g a) c3 v)).(\lambda (w: T).(\lambda (H3: +(sc3 g a c4 w)).(csubn_abst c3 c4 H1 v w (sc3_sn3 g a c4 w H3))))))))))) c1 +c2 H)))). + +theorem ceq_arity_trans: + \forall (g: G).(\forall (c1: C).(\forall (c2: C).((ceqc g c2 c1) \to +(\forall (t: T).(\forall (a: A).((arity g c1 t a) \to (arity g c2 t a))))))) +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (ceqc g c2 +c1)).(\lambda (t: T).(\lambda (a: A).(\lambda (H0: (arity g c1 t a)).(let H1 +\def H in (or_ind (csubc g c2 c1) (csubc g c1 c2) (arity g c2 t a) (\lambda +(H2: (csubc g c2 c1)).(csuba_arity_rev g c1 t a H0 c2 (csubc_csuba g c2 c1 +H2))) (\lambda (H2: (csubc g c1 c2)).(csuba_arity g c1 t a H0 c2 (csubc_csuba +g c1 c2 H2))) H1)))))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/C/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/C/props.ma index a9385d0a6..7655890bc 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/C/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/C/props.ma @@ -39,8 +39,8 @@ c) O) (\lambda (n: nat).(lt n (plus (cweight c) (tweight u)))) (lt_le_S (plus (plus_n_O (cweight c))))). theorem clt_wf__q_ind: - \forall (P: ((C \to Prop))).(((\forall (n: nat).((\lambda (P: ((C \to -Prop))).(\lambda (n0: nat).(\forall (c: C).((eq nat (cweight c) n0) \to (P + \forall (P: ((C \to Prop))).(((\forall (n: nat).((\lambda (P0: ((C \to +Prop))).(\lambda (n0: nat).(\forall (c: C).((eq nat (cweight c) n0) \to (P0 c))))) P n))) \to (\forall (c: C).(P c))) \def let Q \def (\lambda (P: ((C \to Prop))).(\lambda (n: nat).(\forall (c: @@ -59,12 +59,12 @@ Prop))).(\lambda (H: ((\forall (c: C).(((\forall (d: C).((lt (cweight d) (cweight c)) \to (P d)))) \to (P c))))).(\lambda (c: C).(clt_wf__q_ind (\lambda (c0: C).(P c0)) (\lambda (n: nat).(lt_wf_ind n (Q (\lambda (c0: C).(P c0))) (\lambda (n0: nat).(\lambda (H0: ((\forall (m: nat).((lt m n0) -\to (Q (\lambda (c: C).(P c)) m))))).(\lambda (c0: C).(\lambda (H1: (eq nat -(cweight c0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n: nat).(\forall -(m: nat).((lt m n) \to (\forall (c: C).((eq nat (cweight c) m) \to (P c)))))) -H0 (cweight c0) H1) in (H c0 (\lambda (d: C).(\lambda (H3: (lt (cweight d) -(cweight c0))).(H2 (cweight d) H3 d (refl_equal nat (cweight d))))))))))))) -c)))). +\to (Q (\lambda (c0: C).(P c0)) m))))).(\lambda (c0: C).(\lambda (H1: (eq nat +(cweight c0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n1: nat).(\forall +(m: nat).((lt m n1) \to (\forall (c1: C).((eq nat (cweight c1) m) \to (P +c1)))))) H0 (cweight c0) H1) in (H c0 (\lambda (d: C).(\lambda (H3: (lt +(cweight d) (cweight c0))).(H2 (cweight d) H3 d (refl_equal nat (cweight +d))))))))))))) c)))). theorem chead_ctail: \forall (c: C).(\forall (t: T).(\forall (k: K).(ex_3 K C T (\lambda (h: @@ -106,16 +106,17 @@ c))))))) \to (\forall (c: C).(P c)))) \lambda (P: ((C \to Prop))).(\lambda (H: ((\forall (n: nat).(P (CSort n))))).(\lambda (H0: ((\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: T).(P (CTail k t c)))))))).(\lambda (c: C).(clt_wf_ind (\lambda (c0: C).(P -c0)) (\lambda (c0: C).(match c0 in C return (\lambda (c1: C).(((\forall (d: -C).((clt d c1) \to (P d)))) \to (P c1))) with [(CSort n) \Rightarrow (\lambda -(_: ((\forall (d: C).((clt d (CSort n)) \to (P d))))).(H n)) | (CHead c1 k t) -\Rightarrow (\lambda (H1: ((\forall (d: C).((clt d (CHead c1 k t)) \to (P -d))))).(let H_x \def (chead_ctail c1 t k) in (let H2 \def H_x in (ex_3_ind K -C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c1 k t) +c0)) (\lambda (c0: C).(C_ind (\lambda (c1: C).(((\forall (d: C).((clt d c1) +\to (P d)))) \to (P c1))) (\lambda (n: nat).(\lambda (_: ((\forall (d: +C).((clt d (CSort n)) \to (P d))))).(H n))) (\lambda (c1: C).(\lambda (_: +((((\forall (d: C).((clt d c1) \to (P d)))) \to (P c1)))).(\lambda (k: +K).(\lambda (t: T).(\lambda (H2: ((\forall (d: C).((clt d (CHead c1 k t)) \to +(P d))))).(let H_x \def (chead_ctail c1 t k) in (let H3 \def H_x in (ex_3_ind +K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c1 k t) (CTail h u d))))) (P (CHead c1 k t)) (\lambda (x0: K).(\lambda (x1: -C).(\lambda (x2: T).(\lambda (H3: (eq C (CHead c1 k t) (CTail x0 x2 -x1))).(eq_ind_r C (CTail x0 x2 x1) (\lambda (c2: C).(P c2)) (let H4 \def -(eq_ind C (CHead c1 k t) (\lambda (c: C).(\forall (d: C).((clt d c) \to (P -d)))) H1 (CTail x0 x2 x1) H3) in (H0 x1 (H4 x1 (clt_thead x0 x2 x1)) x0 x2)) -(CHead c1 k t) H3))))) H2))))])) c)))). +C).(\lambda (x2: T).(\lambda (H4: (eq C (CHead c1 k t) (CTail x0 x2 +x1))).(eq_ind_r C (CTail x0 x2 x1) (\lambda (c2: C).(P c2)) (let H5 \def +(eq_ind C (CHead c1 k t) (\lambda (c2: C).(\forall (d: C).((clt d c2) \to (P +d)))) H2 (CTail x0 x2 x1) H4) in (H0 x1 (H5 x1 (clt_thead x0 x2 x1)) x0 x2)) +(CHead c1 k t) H4))))) H3)))))))) c0)) c)))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/dec.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/dec.ma index bad18aa25..8b1a36ba1 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/dec.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/dec.ma @@ -97,10 +97,10 @@ Prop).P)))) (or_introl (eq K (Bind b) (Bind b)) ((eq K (Bind b) (Bind b)) \to b b0) \to (\forall (P: Prop).P)))).(or_intror (eq K (Bind b) (Bind b0)) ((eq K (Bind b) (Bind b0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq K (Bind b) (Bind b0))).(\lambda (P: Prop).(let H2 \def (f_equal K B (\lambda (e: -K).(match e in K return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | +K).(match e in K return (\lambda (_: K).B) with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b])) (Bind b) (Bind b0) H1) in (let H3 \def (eq_ind_r B -b0 (\lambda (b0: B).((eq B b b0) \to (\forall (P: Prop).P))) H0 b H2) in (H3 -(refl_equal B b) P))))))) H)))) (\lambda (f: F).(or_intror (eq K (Bind b) +b0 (\lambda (b1: B).((eq B b b1) \to (\forall (P0: Prop).P0))) H0 b H2) in +(H3 (refl_equal B b) P))))))) H)))) (\lambda (f: F).(or_intror (eq K (Bind b) (Flat f)) ((eq K (Bind b) (Flat f)) \to (\forall (P: Prop).P)) (\lambda (H: (eq K (Bind b) (Flat f))).(\lambda (P: Prop).(let H0 \def (eq_ind K (Bind b) (\lambda (ee: K).(match ee in K return (\lambda (_: K).Prop) with [(Bind _) @@ -122,9 +122,9 @@ f) (Flat f)) \to (\forall (P: Prop).P)) (refl_equal K (Flat f))) f0 H0)) (Flat f) (Flat f0)) ((eq K (Flat f) (Flat f0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq K (Flat f) (Flat f0))).(\lambda (P: Prop).(let H2 \def (f_equal K F (\lambda (e: K).(match e in K return (\lambda (_: K).F) with -[(Bind _) \Rightarrow f | (Flat f) \Rightarrow f])) (Flat f) (Flat f0) H1) in -(let H3 \def (eq_ind_r F f0 (\lambda (f0: F).((eq F f f0) \to (\forall (P: -Prop).P))) H0 f H2) in (H3 (refl_equal F f) P))))))) H)))) k2))) k1). +[(Bind _) \Rightarrow f | (Flat f1) \Rightarrow f1])) (Flat f) (Flat f0) H1) +in (let H3 \def (eq_ind_r F f0 (\lambda (f1: F).((eq F f f1) \to (\forall +(P0: Prop).P0))) H0 f H2) in (H3 (refl_equal F f) P))))))) H)))) k2))) k1). theorem term_dec: \forall (t1: T).(\forall (t2: T).(or (eq T t1 t2) ((eq T t1 t2) \to (\forall @@ -144,11 +144,11 @@ n) (TSort n)) \to (\forall (P: Prop).P)) (refl_equal T (TSort n))) n0 H0)) (TSort n) (TSort n0)) ((eq T (TSort n) (TSort n0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TSort n) (TSort n0))).(\lambda (P: Prop).(let H2 \def (f_equal T nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with -[(TSort n) \Rightarrow n | (TLRef _) \Rightarrow n | (THead _ _ _) +[(TSort n1) \Rightarrow n1 | (TLRef _) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TSort n) (TSort n0) H1) in (let H3 \def (eq_ind_r nat n0 -(\lambda (n0: nat).((eq nat n n0) \to (\forall (P: Prop).P))) H0 n H2) in (H3 -(refl_equal nat n) P))))))) H)))) (\lambda (n0: nat).(or_intror (eq T (TSort -n) (TLRef n0)) ((eq T (TSort n) (TLRef n0)) \to (\forall (P: Prop).P)) +(\lambda (n1: nat).((eq nat n n1) \to (\forall (P0: Prop).P0))) H0 n H2) in +(H3 (refl_equal nat n) P))))))) H)))) (\lambda (n0: nat).(or_intror (eq T +(TSort n) (TLRef n0)) ((eq T (TSort n) (TLRef n0)) \to (\forall (P: Prop).P)) (\lambda (H: (eq T (TSort n) (TLRef n0))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | @@ -180,9 +180,9 @@ nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TLRef n) (TLRef n0)) ((eq T (TLRef n) (TLRef n0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TLRef n) (TLRef n0))).(\lambda (P: Prop).(let H2 \def (f_equal T nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with [(TSort _) -\Rightarrow n | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) -(TLRef n) (TLRef n0) H1) in (let H3 \def (eq_ind_r nat n0 (\lambda (n0: -nat).((eq nat n n0) \to (\forall (P: Prop).P))) H0 n H2) in (H3 (refl_equal +\Rightarrow n | (TLRef n1) \Rightarrow n1 | (THead _ _ _) \Rightarrow n])) +(TLRef n) (TLRef n0) H1) in (let H3 \def (eq_ind_r nat n0 (\lambda (n1: +nat).((eq nat n n1) \to (\forall (P0: Prop).P0))) H0 n H2) in (H3 (refl_equal nat n) P))))))) H)))) (\lambda (k: K).(\lambda (t: T).(\lambda (_: (or (eq T (TLRef n) t) ((eq T (TLRef n) t) \to (\forall (P: Prop).P)))).(\lambda (t0: T).(\lambda (_: (or (eq T (TLRef n) t0) ((eq T (TLRef n) t0) \to (\forall (P: @@ -215,15 +215,15 @@ T (THead k t t0) t4) \to (\forall (P: Prop).P)))).(let H_x \def (H t3) in (let H3 \def H_x in (or_ind (eq T t t3) ((eq T t t3) \to (\forall (P: Prop).P)) (or (eq T (THead k t t0) (THead k0 t3 t4)) ((eq T (THead k t t0) (THead k0 t3 t4)) \to (\forall (P: Prop).P))) (\lambda (H4: (eq T t t3)).(let -H5 \def (eq_ind_r T t3 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T -(THead k t t0) t1) \to (\forall (P: Prop).P)))) H1 t H4) in (eq_ind T t +H5 \def (eq_ind_r T t3 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T +(THead k t t0) t5) \to (\forall (P: Prop).P)))) H1 t H4) in (eq_ind T t (\lambda (t5: T).(or (eq T (THead k t t0) (THead k0 t5 t4)) ((eq T (THead k t t0) (THead k0 t5 t4)) \to (\forall (P: Prop).P)))) (let H_x0 \def (H0 t4) in (let H6 \def H_x0 in (or_ind (eq T t0 t4) ((eq T t0 t4) \to (\forall (P: Prop).P)) (or (eq T (THead k t t0) (THead k0 t t4)) ((eq T (THead k t t0) (THead k0 t t4)) \to (\forall (P: Prop).P))) (\lambda (H7: (eq T t0 t4)).(let -H8 \def (eq_ind_r T t4 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T -(THead k t t0) t1) \to (\forall (P: Prop).P)))) H2 t0 H7) in (eq_ind T t0 +H8 \def (eq_ind_r T t4 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T +(THead k t t0) t5) \to (\forall (P: Prop).P)))) H2 t0 H7) in (eq_ind T t0 (\lambda (t5: T).(or (eq T (THead k t t0) (THead k0 t t5)) ((eq T (THead k t t0) (THead k0 t t5)) \to (\forall (P: Prop).P)))) (let H_x1 \def (terms_props__kind_dec k k0) in (let H9 \def H_x1 in (or_ind (eq K k k0) ((eq @@ -238,41 +238,41 @@ k0 H10)) (\lambda (H10: (((eq K k k0) \to (\forall (P: Prop).P)))).(or_intror \to (\forall (P: Prop).P)) (\lambda (H11: (eq T (THead k t t0) (THead k0 t t0))).(\lambda (P: Prop).(let H12 \def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) -\Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k t t0) (THead k0 t t0) -H11) in (let H13 \def (eq_ind_r K k0 (\lambda (k0: K).((eq K k k0) \to -(\forall (P: Prop).P))) H10 k H12) in (H13 (refl_equal K k) P))))))) H9))) t4 -H7))) (\lambda (H7: (((eq T t0 t4) \to (\forall (P: Prop).P)))).(or_intror +\Rightarrow k | (THead k1 _ _) \Rightarrow k1])) (THead k t t0) (THead k0 t +t0) H11) in (let H13 \def (eq_ind_r K k0 (\lambda (k1: K).((eq K k k1) \to +(\forall (P0: Prop).P0))) H10 k H12) in (H13 (refl_equal K k) P))))))) H9))) +t4 H7))) (\lambda (H7: (((eq T t0 t4) \to (\forall (P: Prop).P)))).(or_intror (eq T (THead k t t0) (THead k0 t t4)) ((eq T (THead k t t0) (THead k0 t t4)) \to (\forall (P: Prop).P)) (\lambda (H8: (eq T (THead k t t0) (THead k0 t t4))).(\lambda (P: Prop).(let H9 \def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) -\Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k t t0) (THead k0 t t4) -H8) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e in T return +\Rightarrow k | (THead k1 _ _) \Rightarrow k1])) (THead k t t0) (THead k0 t +t4) H8) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 -| (THead _ _ t) \Rightarrow t])) (THead k t t0) (THead k0 t t4) H8) in -(\lambda (_: (eq K k k0)).(let H12 \def (eq_ind_r T t4 (\lambda (t: T).((eq T -t0 t) \to (\forall (P: Prop).P))) H7 t0 H10) in (let H13 \def (eq_ind_r T t4 -(\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to -(\forall (P: Prop).P)))) H2 t0 H10) in (H12 (refl_equal T t0) P))))) H9)))))) -H6))) t3 H4))) (\lambda (H4: (((eq T t t3) \to (\forall (P: +| (THead _ _ t5) \Rightarrow t5])) (THead k t t0) (THead k0 t t4) H8) in +(\lambda (_: (eq K k k0)).(let H12 \def (eq_ind_r T t4 (\lambda (t5: T).((eq +T t0 t5) \to (\forall (P0: Prop).P0))) H7 t0 H10) in (let H13 \def (eq_ind_r +T t4 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T (THead k t t0) t5) +\to (\forall (P0: Prop).P0)))) H2 t0 H10) in (H12 (refl_equal T t0) P))))) +H9)))))) H6))) t3 H4))) (\lambda (H4: (((eq T t t3) \to (\forall (P: Prop).P)))).(or_intror (eq T (THead k t t0) (THead k0 t3 t4)) ((eq T (THead k t t0) (THead k0 t3 t4)) \to (\forall (P: Prop).P)) (\lambda (H5: (eq T (THead k t t0) (THead k0 t3 t4))).(\lambda (P: Prop).(let H6 \def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with [(TSort _) -\Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) +\Rightarrow k | (TLRef _) \Rightarrow k | (THead k1 _ _) \Rightarrow k1])) (THead k t t0) (THead k0 t3 t4) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t -| (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead k t t0) +| (TLRef _) \Rightarrow t | (THead _ t5 _) \Rightarrow t5])) (THead k t t0) (THead k0 t3 t4) H5) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) -\Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k t t0) (THead k0 t3 +\Rightarrow t0 | (THead _ _ t5) \Rightarrow t5])) (THead k t t0) (THead k0 t3 t4) H5) in (\lambda (H9: (eq T t t3)).(\lambda (_: (eq K k k0)).(let H11 \def -(eq_ind_r T t4 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k -t t0) t1) \to (\forall (P: Prop).P)))) H2 t0 H8) in (let H12 \def (eq_ind_r T -t3 (\lambda (t0: T).((eq T t t0) \to (\forall (P: Prop).P))) H4 t H9) in (let -H13 \def (eq_ind_r T t3 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T -(THead k t t0) t1) \to (\forall (P: Prop).P)))) H1 t H9) in (H12 (refl_equal -T t) P))))))) H7)) H6)))))) H3)))))))) t2))))))) t1). +(eq_ind_r T t4 (\lambda (t5: T).(or (eq T (THead k t t0) t5) ((eq T (THead k +t t0) t5) \to (\forall (P0: Prop).P0)))) H2 t0 H8) in (let H12 \def (eq_ind_r +T t3 (\lambda (t5: T).((eq T t t5) \to (\forall (P0: Prop).P0))) H4 t H9) in +(let H13 \def (eq_ind_r T t3 (\lambda (t5: T).(or (eq T (THead k t t0) t5) +((eq T (THead k t t0) t5) \to (\forall (P0: Prop).P0)))) H1 t H9) in (H12 +(refl_equal T t) P))))))) H7)) H6)))))) H3)))))))) t2))))))) t1). theorem binder_dec: \forall (t: T).(or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: @@ -299,115 +299,119 @@ T (TLRef n) (THead (Bind b) w u))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) w u) H) in (False_ind P H0))))))))) -(\lambda (k: K).(match k in K return (\lambda (k0: K).(\forall (t0: T).((or -(ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead -(Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 -(THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (\forall (t1: -T).((or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 -(THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: -T).((eq T t1 (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (or -(ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead k0 -t0 t1) (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: -T).((eq T (THead k0 t0 t1) (THead (Bind b) w u)) \to (\forall (P: -Prop).P))))))))))) with [(Bind b) \Rightarrow (\lambda (t0: T).(\lambda (_: -(or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 +(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t0: T).((or (ex_3 B T T +(\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w +u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead +(Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (\forall (t1: T).((or (ex_3 +B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind +b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead +(Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (or (ex_3 B T T (\lambda +(b: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead k0 t0 t1) (THead (Bind b) +w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (THead k0 t0 +t1) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))))))) (\lambda (b: +B).(\lambda (t0: T).(\lambda (_: (or (ex_3 B T T (\lambda (b0: B).(\lambda +(w: T).(\lambda (u: T).(eq T t0 (THead (Bind b0) w u)))))) (\forall (b0: +B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b0) w u)) \to +(\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (_: (or (ex_3 B T T +(\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b0) w +u)))))) (\forall (b0: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead +(Bind b0) w u)) \to (\forall (P: Prop).P))))))).(or_introl (ex_3 B T T +(\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Bind b) t0 t1) +(THead (Bind b0) w u)))))) (\forall (b0: B).(\forall (w: T).(\forall (u: +T).((eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u)) \to (\forall (P: +Prop).P))))) (ex_3_intro B T T (\lambda (b0: B).(\lambda (w: T).(\lambda (u: +T).(eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u))))) b t0 t1 (refl_equal +T (THead (Bind b) t0 t1))))))))) (\lambda (f: F).(\lambda (t0: T).(\lambda +(_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead (Bind b) w u)) \to (\forall (P: -Prop).P))))))).(or_introl (ex_3 B T T (\lambda (b0: B).(\lambda (w: -T).(\lambda (u: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u)))))) -(\forall (b0: B).(\forall (w: T).(\forall (u: T).((eq T (THead (Bind b) t0 -t1) (THead (Bind b0) w u)) \to (\forall (P: Prop).P))))) (ex_3_intro B T T -(\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Bind b) t0 t1) -(THead (Bind b0) w u))))) b t0 t1 (refl_equal T (THead (Bind b) t0 t1)))))))) -| (Flat f) \Rightarrow (\lambda (t0: T).(\lambda (_: (or (ex_3 B T T (\lambda -(b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) -(\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w -u)) \to (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (_: (or (ex_3 B -T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b) -w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead -(Bind b) w u)) \to (\forall (P: Prop).P))))))).(or_intror (ex_3 B T T -(\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Flat f) t0 t1) -(THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: -T).((eq T (THead (Flat f) t0 t1) (THead (Bind b) w u)) \to (\forall (P: -Prop).P))))) (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(\lambda (H1: -(eq T (THead (Flat f) t0 t1) (THead (Bind b) w u))).(\lambda (P: Prop).(let -H2 \def (eq_ind T (THead (Flat f) t0 t1) (\lambda (ee: T).(match ee in T -return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k _ _) \Rightarrow (match k in K return (\lambda -(_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow -True])])) I (THead (Bind b) w u) H1) in (False_ind P H2))))))))))))])) t). +Prop).P))))))).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda (w: +T).(\lambda (u: T).(eq T (THead (Flat f) t0 t1) (THead (Bind b) w u)))))) +(\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (THead (Flat f) t0 t1) +(THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda +(w: T).(\lambda (u: T).(\lambda (H1: (eq T (THead (Flat f) t0 t1) (THead +(Bind b) w u))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead (Flat f) t0 +t1) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort +_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) +\Rightarrow (match k0 in K return (\lambda (_: K).Prop) with [(Bind _) +\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) w u) H1) +in (False_ind P H2))))))))))))) k)) t). theorem abst_dec: \forall (u: T).(\forall (v: T).(or (ex T (\lambda (t: T).(eq T u (THead (Bind Abst) v t)))) (\forall (t: T).((eq T u (THead (Bind Abst) v t)) \to (\forall (P: Prop).P))))) \def - \lambda (u: T).(match u in T return (\lambda (t: T).(\forall (v: T).(or (ex -T (\lambda (t0: T).(eq T t (THead (Bind Abst) v t0)))) (\forall (t0: T).((eq -T t (THead (Bind Abst) v t0)) \to (\forall (P: Prop).P)))))) with [(TSort n) -\Rightarrow (\lambda (v: T).(or_intror (ex T (\lambda (t: T).(eq T (TSort n) -(THead (Bind Abst) v t)))) (\forall (t: T).((eq T (TSort n) (THead (Bind -Abst) v t)) \to (\forall (P: Prop).P))) (\lambda (t: T).(\lambda (H: (eq T -(TSort n) (THead (Bind Abst) v t))).(\lambda (P: Prop).(let H0 \def (eq_ind T -(TSort n) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with -[(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow False])) I (THead (Bind Abst) v t) H) in (False_ind P H0))))))) | -(TLRef n) \Rightarrow (\lambda (v: T).(or_intror (ex T (\lambda (t: T).(eq T -(TLRef n) (THead (Bind Abst) v t)))) (\forall (t: T).((eq T (TLRef n) (THead -(Bind Abst) v t)) \to (\forall (P: Prop).P))) (\lambda (t: T).(\lambda (H: -(eq T (TLRef n) (THead (Bind Abst) v t))).(\lambda (P: Prop).(let H0 \def -(eq_ind T (TLRef n) (\lambda (ee: T).(match ee in T return (\lambda (_: -T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) v t) H) in (False_ind -P H0))))))) | (THead k t t0) \Rightarrow (\lambda (v: T).(let H_x \def -(terms_props__kind_dec k (Bind Abst)) in (let H \def H_x in (or_ind (eq K k -(Bind Abst)) ((eq K k (Bind Abst)) \to (\forall (P: Prop).P)) (or (ex T -(\lambda (t1: T).(eq T (THead k t t0) (THead (Bind Abst) v t1)))) (\forall -(t1: T).((eq T (THead k t t0) (THead (Bind Abst) v t1)) \to (\forall (P: -Prop).P)))) (\lambda (H0: (eq K k (Bind Abst))).(eq_ind_r K (Bind Abst) -(\lambda (k0: K).(or (ex T (\lambda (t1: T).(eq T (THead k0 t t0) (THead -(Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k0 t t0) (THead (Bind -Abst) v t1)) \to (\forall (P: Prop).P))))) (let H_x0 \def (term_dec t v) in -(let H1 \def H_x0 in (or_ind (eq T t v) ((eq T t v) \to (\forall (P: -Prop).P)) (or (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead -(Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead -(Bind Abst) v t1)) \to (\forall (P: Prop).P)))) (\lambda (H2: (eq T t -v)).(eq_ind T t (\lambda (t1: T).(or (ex T (\lambda (t2: T).(eq T (THead -(Bind Abst) t t0) (THead (Bind Abst) t1 t2)))) (\forall (t2: T).((eq T (THead -(Bind Abst) t t0) (THead (Bind Abst) t1 t2)) \to (\forall (P: Prop).P))))) -(or_introl (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind -Abst) t t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead (Bind -Abst) t t1)) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t1: T).(eq T -(THead (Bind Abst) t t0) (THead (Bind Abst) t t1))) t0 (refl_equal T (THead -(Bind Abst) t t0)))) v H2)) (\lambda (H2: (((eq T t v) \to (\forall (P: -Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) -(THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) -(THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))) (\lambda (t1: -T).(\lambda (H3: (eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v -t1))).(\lambda (P: Prop).(let H4 \def (f_equal T T (\lambda (e: T).(match e -in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) -\Rightarrow t | (THead _ t _) \Rightarrow t])) (THead (Bind Abst) t t0) -(THead (Bind Abst) v t1) H3) in ((let H5 \def (f_equal T T (\lambda (e: + \lambda (u: T).(T_ind (\lambda (t: T).(\forall (v: T).(or (ex T (\lambda +(t0: T).(eq T t (THead (Bind Abst) v t0)))) (\forall (t0: T).((eq T t (THead +(Bind Abst) v t0)) \to (\forall (P: Prop).P)))))) (\lambda (n: nat).(\lambda +(v: T).(or_intror (ex T (\lambda (t: T).(eq T (TSort n) (THead (Bind Abst) v +t)))) (\forall (t: T).((eq T (TSort n) (THead (Bind Abst) v t)) \to (\forall +(P: Prop).P))) (\lambda (t: T).(\lambda (H: (eq T (TSort n) (THead (Bind +Abst) v t))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda +(ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) +\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +False])) I (THead (Bind Abst) v t) H) in (False_ind P H0)))))))) (\lambda (n: +nat).(\lambda (v: T).(or_intror (ex T (\lambda (t: T).(eq T (TLRef n) (THead +(Bind Abst) v t)))) (\forall (t: T).((eq T (TLRef n) (THead (Bind Abst) v t)) +\to (\forall (P: Prop).P))) (\lambda (t: T).(\lambda (H: (eq T (TLRef n) +(THead (Bind Abst) v t))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) +(\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow +False])) I (THead (Bind Abst) v t) H) in (False_ind P H0)))))))) (\lambda (k: +K).(\lambda (t: T).(\lambda (_: ((\forall (v: T).(or (ex T (\lambda (t0: +T).(eq T t (THead (Bind Abst) v t0)))) (\forall (t0: T).((eq T t (THead (Bind +Abst) v t0)) \to (\forall (P: Prop).P))))))).(\lambda (t0: T).(\lambda (_: +((\forall (v: T).(or (ex T (\lambda (t1: T).(eq T t0 (THead (Bind Abst) v +t1)))) (\forall (t1: T).((eq T t0 (THead (Bind Abst) v t1)) \to (\forall (P: +Prop).P))))))).(\lambda (v: T).(let H_x \def (terms_props__kind_dec k (Bind +Abst)) in (let H1 \def H_x in (or_ind (eq K k (Bind Abst)) ((eq K k (Bind +Abst)) \to (\forall (P: Prop).P)) (or (ex T (\lambda (t1: T).(eq T (THead k t +t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k t t0) (THead +(Bind Abst) v t1)) \to (\forall (P: Prop).P)))) (\lambda (H2: (eq K k (Bind +Abst))).(eq_ind_r K (Bind Abst) (\lambda (k0: K).(or (ex T (\lambda (t1: +T).(eq T (THead k0 t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T +(THead k0 t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))))) (let +H_x0 \def (term_dec t v) in (let H3 \def H_x0 in (or_ind (eq T t v) ((eq T t +v) \to (\forall (P: Prop).P)) (or (ex T (\lambda (t1: T).(eq T (THead (Bind +Abst) t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead (Bind +Abst) t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P)))) (\lambda +(H4: (eq T t v)).(eq_ind T t (\lambda (t1: T).(or (ex T (\lambda (t2: T).(eq +T (THead (Bind Abst) t t0) (THead (Bind Abst) t1 t2)))) (\forall (t2: T).((eq +T (THead (Bind Abst) t t0) (THead (Bind Abst) t1 t2)) \to (\forall (P: +Prop).P))))) (or_introl (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) +(THead (Bind Abst) t t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) +(THead (Bind Abst) t t1)) \to (\forall (P: Prop).P))) (ex_intro T (\lambda +(t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t t1))) t0 +(refl_equal T (THead (Bind Abst) t t0)))) v H4)) (\lambda (H4: (((eq T t v) +\to (\forall (P: Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead +(Bind Abst) t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead +(Bind Abst) t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))) +(\lambda (t1: T).(\lambda (H5: (eq T (THead (Bind Abst) t t0) (THead (Bind +Abst) v t1))).(\lambda (P: Prop).(let H6 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | +(TLRef _) \Rightarrow t | (THead _ t2 _) \Rightarrow t2])) (THead (Bind Abst) +t t0) (THead (Bind Abst) v t1) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | -(TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abst) -t t0) (THead (Bind Abst) v t1) H3) in (\lambda (H6: (eq T t v)).(H2 H6 P))) -H4))))))) H1))) k H0)) (\lambda (H0: (((eq K k (Bind Abst)) \to (\forall (P: -Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead k t t0) (THead +(TLRef _) \Rightarrow t0 | (THead _ _ t2) \Rightarrow t2])) (THead (Bind +Abst) t t0) (THead (Bind Abst) v t1) H5) in (\lambda (H8: (eq T t v)).(H4 H8 +P))) H6))))))) H3))) k H2)) (\lambda (H2: (((eq K k (Bind Abst)) \to (\forall +(P: Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead k t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k t t0) (THead (Bind -Abst) v t1)) \to (\forall (P: Prop).P))) (\lambda (t1: T).(\lambda (H1: (eq T -(THead k t t0) (THead (Bind Abst) v t1))).(\lambda (P: Prop).(let H2 \def +Abst) v t1)) \to (\forall (P: Prop).P))) (\lambda (t1: T).(\lambda (H3: (eq T +(THead k t t0) (THead (Bind Abst) v t1))).(\lambda (P: Prop).(let H4 \def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with -[(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) -\Rightarrow k])) (THead k t t0) (THead (Bind Abst) v t1) H1) in ((let H3 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) -\Rightarrow t])) (THead k t t0) (THead (Bind Abst) v t1) H1) in ((let H4 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) -\Rightarrow t])) (THead k t t0) (THead (Bind Abst) v t1) H1) in (\lambda (_: -(eq T t v)).(\lambda (H6: (eq K k (Bind Abst))).(H0 H6 P)))) H3)) H2))))))) -H))))]). +[(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) +\Rightarrow k0])) (THead k t t0) (THead (Bind Abst) v t1) H3) in ((let H5 +\def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) +with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t2 _) +\Rightarrow t2])) (THead k t t0) (THead (Bind Abst) v t1) H3) in ((let H6 +\def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) +with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t2) +\Rightarrow t2])) (THead k t t0) (THead (Bind Abst) v t1) H3) in (\lambda (_: +(eq T t v)).(\lambda (H8: (eq K k (Bind Abst))).(H2 H8 P)))) H5)) H4))))))) +H1))))))))) u). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/props.ma index 95088bb19..8a86e9eaa 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/props.ma @@ -54,25 +54,26 @@ Prop).P)))).(\lambda (t1: T).(\lambda (H0: (((eq T (THead k v t1) t1) \to (\forall (P: Prop).P)))).(\lambda (H1: (eq T (THead k v (THead k0 t0 t1)) (THead k0 t0 t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | -(TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v (THead k0 -t0 t1)) (THead k0 t0 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: +(TLRef _) \Rightarrow k | (THead k1 _ _) \Rightarrow k1])) (THead k v (THead +k0 t0 t1)) (THead k0 t0 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow v | -(TLRef _) \Rightarrow v | (THead _ t _) \Rightarrow t])) (THead k v (THead k0 -t0 t1)) (THead k0 t0 t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: +(TLRef _) \Rightarrow v | (THead _ t2 _) \Rightarrow t2])) (THead k v (THead +k0 t0 t1)) (THead k0 t0 t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead -k0 t0 t1) | (TLRef _) \Rightarrow (THead k0 t0 t1) | (THead _ _ t) -\Rightarrow t])) (THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in +k0 t0 t1) | (TLRef _) \Rightarrow (THead k0 t0 t1) | (THead _ _ t2) +\Rightarrow t2])) (THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in (\lambda (H5: (eq T v t0)).(\lambda (H6: (eq K k k0)).(let H7 \def (eq_ind T -v (\lambda (t: T).((eq T (THead k t t1) t1) \to (\forall (P: Prop).P))) H0 t0 -H5) in (let H8 \def (eq_ind K k (\lambda (k: K).((eq T (THead k t0 t1) t1) -\to (\forall (P: Prop).P))) H7 k0 H6) in (H8 H4 P)))))) H3)) H2))))))))) t))). +v (\lambda (t2: T).((eq T (THead k t2 t1) t1) \to (\forall (P0: Prop).P0))) +H0 t0 H5) in (let H8 \def (eq_ind K k (\lambda (k1: K).((eq T (THead k1 t0 +t1) t1) \to (\forall (P0: Prop).P0))) H7 k0 H6) in (H8 H4 P)))))) H3)) +H2))))))))) t))). theorem tweight_lt: \forall (t: T).(lt O (tweight t)) \def - \lambda (t: T).(match t in T return (\lambda (t0: T).(lt O (tweight t0))) -with [(TSort _) \Rightarrow (le_n (S O)) | (TLRef _) \Rightarrow (le_n (S O)) -| (THead _ t0 t1) \Rightarrow (le_S_n (S O) (S (plus (tweight t0) (tweight -t1))) (le_n_S (S O) (S (plus (tweight t0) (tweight t1))) (le_n_S O (plus -(tweight t0) (tweight t1)) (le_O_n (plus (tweight t0) (tweight t1))))))]). + \lambda (t: T).(T_ind (\lambda (t0: T).(lt O (tweight t0))) (\lambda (_: +nat).(le_n (S O))) (\lambda (_: nat).(le_n (S O))) (\lambda (_: K).(\lambda +(t0: T).(\lambda (H: (lt O (tweight t0))).(\lambda (t1: T).(\lambda (_: (lt O +(tweight t1))).(le_S (S O) (plus (tweight t0) (tweight t1)) (le_plus_trans (S +O) (tweight t0) (tweight t1) H))))))) t). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/aplus/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/aplus/props.ma index 1ca629bff..7edaaa656 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/aplus/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/aplus/props.ma @@ -179,42 +179,44 @@ h) a) \to (\forall (P: Prop).P)))) nat).((eq A (aplus g (asucc g a0) h) a0) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (h: nat).(\lambda (H: (eq A (aplus g (match n with [O \Rightarrow (ASort O (next g n0)) | (S h0) -\Rightarrow (ASort h0 n0)]) h) (ASort n n0))).(\lambda (P: Prop).((match n in -nat return (\lambda (n1: nat).((eq A (aplus g (match n1 with [O \Rightarrow -(ASort O (next g n0)) | (S h0) \Rightarrow (ASort h0 n0)]) h) (ASort n1 n0)) -\to P)) with [O \Rightarrow (\lambda (H0: (eq A (aplus g (ASort O (next g -n0)) h) (ASort O n0))).(let H1 \def (eq_ind A (aplus g (ASort O (next g n0)) -h) (\lambda (a0: A).(eq A a0 (ASort O n0))) H0 (ASort (minus O h) (next_plus -g (next g n0) (minus h O))) (aplus_asort_simpl g h O (next g n0))) in (let H2 -\def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) -with [(ASort _ n1) \Rightarrow n1 | (AHead _ _) \Rightarrow ((let rec -next_plus (g0: G) (n1: nat) (i: nat) on i: nat \def (match i with [O -\Rightarrow n1 | (S i0) \Rightarrow (next g0 (next_plus g0 n1 i0))]) in -next_plus) g (next g n0) (minus h O))])) (ASort (minus O h) (next_plus g -(next g n0) (minus h O))) (ASort O n0) H1) in (let H3 \def (eq_ind_r nat -(minus h O) (\lambda (n1: nat).(eq nat (next_plus g (next g n0) n1) n0)) H2 h -(minus_n_O h)) in (le_lt_false (next_plus g (next g n0) h) n0 (eq_ind nat -(next_plus g (next g n0) h) (\lambda (n1: nat).(le (next_plus g (next g n0) -h) n1)) (le_n (next_plus g (next g n0) h)) n0 H3) (next_plus_lt g h n0) -P))))) | (S n1) \Rightarrow (\lambda (H0: (eq A (aplus g (ASort n1 n0) h) -(ASort (S n1) n0))).(let H1 \def (eq_ind A (aplus g (ASort n1 n0) h) (\lambda -(a0: A).(eq A a0 (ASort (S n1) n0))) H0 (ASort (minus n1 h) (next_plus g n0 -(minus h n1))) (aplus_asort_simpl g h n1 n0)) in (let H2 \def (f_equal A nat -(\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort n2 _) -\Rightarrow n2 | (AHead _ _) \Rightarrow ((let rec minus (n2: nat) on n2: -(nat \to nat) \def (\lambda (m: nat).(match n2 with [O \Rightarrow O | (S k) -\Rightarrow (match m with [O \Rightarrow (S k) | (S l) \Rightarrow (minus k -l)])])) in minus) n1 h)])) (ASort (minus n1 h) (next_plus g n0 (minus h n1))) -(ASort (S n1) n0) H1) in ((let H3 \def (f_equal A nat (\lambda (e: A).(match -e in A return (\lambda (_: A).nat) with [(ASort _ n2) \Rightarrow n2 | (AHead -_ _) \Rightarrow ((let rec next_plus (g0: G) (n2: nat) (i: nat) on i: nat -\def (match i with [O \Rightarrow n2 | (S i0) \Rightarrow (next g0 (next_plus -g0 n2 i0))]) in next_plus) g n0 (minus h n1))])) (ASort (minus n1 h) -(next_plus g n0 (minus h n1))) (ASort (S n1) n0) H1) in (\lambda (H4: (eq nat -(minus n1 h) (S n1))).(le_Sx_x n1 (eq_ind nat (minus n1 h) (\lambda (n2: -nat).(le n2 n1)) (minus_le n1 h) (S n1) H4) P))) H2))))]) H)))))) (\lambda -(a0: A).(\lambda (_: ((\forall (h: nat).((eq A (aplus g (asucc g a0) h) a0) -\to (\forall (P: Prop).P))))).(\lambda (a1: A).(\lambda (H0: ((\forall (h: +\Rightarrow (ASort h0 n0)]) h) (ASort n n0))).(\lambda (P: Prop).(nat_ind +(\lambda (n1: nat).((eq A (aplus g (match n1 with [O \Rightarrow (ASort O +(next g n0)) | (S h0) \Rightarrow (ASort h0 n0)]) h) (ASort n1 n0)) \to P)) +(\lambda (H0: (eq A (aplus g (ASort O (next g n0)) h) (ASort O n0))).(let H1 +\def (eq_ind A (aplus g (ASort O (next g n0)) h) (\lambda (a0: A).(eq A a0 +(ASort O n0))) H0 (ASort (minus O h) (next_plus g (next g n0) (minus h O))) +(aplus_asort_simpl g h O (next g n0))) in (let H2 \def (f_equal A nat +(\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n1) +\Rightarrow n1 | (AHead _ _) \Rightarrow ((let rec next_plus (g0: G) (n1: +nat) (i: nat) on i: nat \def (match i with [O \Rightarrow n1 | (S i0) +\Rightarrow (next g0 (next_plus g0 n1 i0))]) in next_plus) g (next g n0) +(minus h O))])) (ASort (minus O h) (next_plus g (next g n0) (minus h O))) +(ASort O n0) H1) in (let H3 \def (eq_ind_r nat (minus h O) (\lambda (n1: +nat).(eq nat (next_plus g (next g n0) n1) n0)) H2 h (minus_n_O h)) in +(le_lt_false (next_plus g (next g n0) h) n0 (eq_ind nat (next_plus g (next g +n0) h) (\lambda (n1: nat).(le (next_plus g (next g n0) h) n1)) (le_n +(next_plus g (next g n0) h)) n0 H3) (next_plus_lt g h n0) P))))) (\lambda +(n1: nat).(\lambda (_: (((eq A (aplus g (match n1 with [O \Rightarrow (ASort +O (next g n0)) | (S h0) \Rightarrow (ASort h0 n0)]) h) (ASort n1 n0)) \to +P))).(\lambda (H0: (eq A (aplus g (ASort n1 n0) h) (ASort (S n1) n0))).(let +H1 \def (eq_ind A (aplus g (ASort n1 n0) h) (\lambda (a0: A).(eq A a0 (ASort +(S n1) n0))) H0 (ASort (minus n1 h) (next_plus g n0 (minus h n1))) +(aplus_asort_simpl g h n1 n0)) in (let H2 \def (f_equal A nat (\lambda (e: +A).(match e in A return (\lambda (_: A).nat) with [(ASort n2 _) \Rightarrow +n2 | (AHead _ _) \Rightarrow ((let rec minus (n2: nat) on n2: (nat \to nat) +\def (\lambda (m: nat).(match n2 with [O \Rightarrow O | (S k) \Rightarrow +(match m with [O \Rightarrow (S k) | (S l) \Rightarrow (minus k l)])])) in +minus) n1 h)])) (ASort (minus n1 h) (next_plus g n0 (minus h n1))) (ASort (S +n1) n0) H1) in ((let H3 \def (f_equal A nat (\lambda (e: A).(match e in A +return (\lambda (_: A).nat) with [(ASort _ n2) \Rightarrow n2 | (AHead _ _) +\Rightarrow ((let rec next_plus (g0: G) (n2: nat) (i: nat) on i: nat \def +(match i with [O \Rightarrow n2 | (S i0) \Rightarrow (next g0 (next_plus g0 +n2 i0))]) in next_plus) g n0 (minus h n1))])) (ASort (minus n1 h) (next_plus +g n0 (minus h n1))) (ASort (S n1) n0) H1) in (\lambda (H4: (eq nat (minus n1 +h) (S n1))).(le_Sx_x n1 (eq_ind nat (minus n1 h) (\lambda (n2: nat).(le n2 +n1)) (minus_le n1 h) (S n1) H4) P))) H2)))))) n H)))))) (\lambda (a0: +A).(\lambda (_: ((\forall (h: nat).((eq A (aplus g (asucc g a0) h) a0) \to +(\forall (P: Prop).P))))).(\lambda (a1: A).(\lambda (H0: ((\forall (h: nat).((eq A (aplus g (asucc g a1) h) a1) \to (\forall (P: Prop).P))))).(\lambda (h: nat).(\lambda (H1: (eq A (aplus g (AHead a0 (asucc g a1)) h) (AHead a0 a1))).(\lambda (P: Prop).(let H2 \def (eq_ind A (aplus g diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/aprem/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/aprem/props.ma index 6f3e8dbf9..6a09b13a1 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/aprem/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/aprem/props.ma @@ -62,79 +62,80 @@ b2)) (\lambda (b1: A).(aprem i a0 b1)))))))).(\lambda (a4: A).(\lambda (a5: A).(\lambda (_: (leq g a4 a5)).(\lambda (H3: ((\forall (i: nat).(\forall (b2: A).((aprem i a5 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem i a4 b1)))))))).(\lambda (i: nat).(\lambda (b2: A).(\lambda (H4: -(aprem i (AHead a3 a5) b2)).((match i in nat return (\lambda (n: nat).((aprem -n (AHead a3 a5) b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: -A).(aprem n (AHead a0 a4) b1))))) with [O \Rightarrow (\lambda (H5: (aprem O +(aprem i (AHead a3 a5) b2)).(nat_ind (\lambda (n: nat).((aprem n (AHead a3 +a5) b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem n +(AHead a0 a4) b1))))) (\lambda (H5: (aprem O (AHead a3 a5) b2)).(let H6 \def +(match H5 in aprem return (\lambda (n: nat).(\lambda (a: A).(\lambda (a6: +A).(\lambda (_: (aprem n a a6)).((eq nat n O) \to ((eq A a (AHead a3 a5)) \to +((eq A a6 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: +A).(aprem O (AHead a0 a4) b1)))))))))) with [(aprem_zero a6 a7) \Rightarrow +(\lambda (_: (eq nat O O)).(\lambda (H7: (eq A (AHead a6 a7) (AHead a3 +a5))).(\lambda (H8: (eq A a6 b2)).((let H9 \def (f_equal A A (\lambda (e: +A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a7 | +(AHead _ a) \Rightarrow a])) (AHead a6 a7) (AHead a3 a5) H7) in ((let H10 +\def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) +with [(ASort _ _) \Rightarrow a6 | (AHead a _) \Rightarrow a])) (AHead a6 a7) +(AHead a3 a5) H7) in (eq_ind A a3 (\lambda (a: A).((eq A a7 a5) \to ((eq A a +b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O +(AHead a0 a4) b1)))))) (\lambda (H11: (eq A a7 a5)).(eq_ind A a5 (\lambda (_: +A).((eq A a3 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: +A).(aprem O (AHead a0 a4) b1))))) (\lambda (H12: (eq A a3 b2)).(eq_ind A b2 +(\lambda (_: A).(ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: +A).(aprem O (AHead a0 a4) b1)))) (eq_ind A a3 (\lambda (a: A).(ex2 A (\lambda +(b1: A).(leq g b1 a)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))) +(ex_intro2 A (\lambda (b1: A).(leq g b1 a3)) (\lambda (b1: A).(aprem O (AHead +a0 a4) b1)) a0 H0 (aprem_zero a0 a4)) b2 H12) a3 (sym_eq A a3 b2 H12))) a7 +(sym_eq A a7 a5 H11))) a6 (sym_eq A a6 a3 H10))) H9)) H8)))) | (aprem_succ a6 +a i0 H6 a7) \Rightarrow (\lambda (H7: (eq nat (S i0) O)).(\lambda (H8: (eq A +(AHead a7 a6) (AHead a3 a5))).(\lambda (H9: (eq A a b2)).((let H10 \def +(eq_ind nat (S i0) (\lambda (e: nat).(match e in nat return (\lambda (_: +nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H7) in +(False_ind ((eq A (AHead a7 a6) (AHead a3 a5)) \to ((eq A a b2) \to ((aprem +i0 a6 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O +(AHead a0 a4) b1)))))) H10)) H8 H9 H6))))]) in (H6 (refl_equal nat O) +(refl_equal A (AHead a3 a5)) (refl_equal A b2)))) (\lambda (i0: nat).(\lambda +(_: (((aprem i0 (AHead a3 a5) b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) +(\lambda (b1: A).(aprem i0 (AHead a0 a4) b1)))))).(\lambda (H5: (aprem (S i0) (AHead a3 a5) b2)).(let H6 \def (match H5 in aprem return (\lambda (n: nat).(\lambda (a: A).(\lambda (a6: A).(\lambda (_: (aprem n a a6)).((eq nat n -O) \to ((eq A a (AHead a3 a5)) \to ((eq A a6 b2) \to (ex2 A (\lambda (b1: -A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))))))))) with -[(aprem_zero a6 a7) \Rightarrow (\lambda (_: (eq nat O O)).(\lambda (H7: (eq -A (AHead a6 a7) (AHead a3 a5))).(\lambda (H8: (eq A a6 b2)).((let H9 \def -(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with -[(ASort _ _) \Rightarrow a7 | (AHead _ a) \Rightarrow a])) (AHead a6 a7) -(AHead a3 a5) H7) in ((let H10 \def (f_equal A A (\lambda (e: A).(match e in -A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a6 | (AHead a _) -\Rightarrow a])) (AHead a6 a7) (AHead a3 a5) H7) in (eq_ind A a3 (\lambda (a: -A).((eq A a7 a5) \to ((eq A a b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) -(\lambda (b1: A).(aprem O (AHead a0 a4) b1)))))) (\lambda (H11: (eq A a7 -a5)).(eq_ind A a5 (\lambda (_: A).((eq A a3 b2) \to (ex2 A (\lambda (b1: -A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1))))) (\lambda -(H12: (eq A a3 b2)).(eq_ind A b2 (\lambda (_: A).(ex2 A (\lambda (b1: A).(leq -g b1 b2)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))) (eq_ind A a3 -(\lambda (a: A).(ex2 A (\lambda (b1: A).(leq g b1 a)) (\lambda (b1: A).(aprem -O (AHead a0 a4) b1)))) (ex_intro2 A (\lambda (b1: A).(leq g b1 a3)) (\lambda -(b1: A).(aprem O (AHead a0 a4) b1)) a0 H0 (aprem_zero a0 a4)) b2 H12) a3 -(sym_eq A a3 b2 H12))) a7 (sym_eq A a7 a5 H11))) a6 (sym_eq A a6 a3 H10))) -H9)) H8)))) | (aprem_succ a6 a i0 H6 a7) \Rightarrow (\lambda (H7: (eq nat (S -i0) O)).(\lambda (H8: (eq A (AHead a7 a6) (AHead a3 a5))).(\lambda (H9: (eq A -a b2)).((let H10 \def (eq_ind nat (S i0) (\lambda (e: nat).(match e in nat -return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow -True])) I O H7) in (False_ind ((eq A (AHead a7 a6) (AHead a3 a5)) \to ((eq A -a b2) \to ((aprem i0 a6 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) -(\lambda (b1: A).(aprem O (AHead a0 a4) b1)))))) H10)) H8 H9 H6))))]) in (H6 -(refl_equal nat O) (refl_equal A (AHead a3 a5)) (refl_equal A b2)))) | (S n) -\Rightarrow (\lambda (H5: (aprem (S n) (AHead a3 a5) b2)).(let H6 \def (match -H5 in aprem return (\lambda (n0: nat).(\lambda (a: A).(\lambda (a6: -A).(\lambda (_: (aprem n0 a a6)).((eq nat n0 (S n)) \to ((eq A a (AHead a3 -a5)) \to ((eq A a6 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda -(b1: A).(aprem (S n) (AHead a0 a4) b1)))))))))) with [(aprem_zero a6 a7) -\Rightarrow (\lambda (H6: (eq nat O (S n))).(\lambda (H7: (eq A (AHead a6 a7) -(AHead a3 a5))).(\lambda (H8: (eq A a6 b2)).((let H9 \def (eq_ind nat O -(\lambda (e: nat).(match e in nat return (\lambda (_: nat).Prop) with [O -\Rightarrow True | (S _) \Rightarrow False])) I (S n) H6) in (False_ind ((eq -A (AHead a6 a7) (AHead a3 a5)) \to ((eq A a6 b2) \to (ex2 A (\lambda (b1: -A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1))))) H9)) H7 -H8)))) | (aprem_succ a6 a i0 H6 a7) \Rightarrow (\lambda (H7: (eq nat (S i0) -(S n))).(\lambda (H8: (eq A (AHead a7 a6) (AHead a3 a5))).(\lambda (H9: (eq A -a b2)).((let H10 \def (f_equal nat nat (\lambda (e: nat).(match e in nat -return (\lambda (_: nat).nat) with [O \Rightarrow i0 | (S n0) \Rightarrow -n0])) (S i0) (S n) H7) in (eq_ind nat n (\lambda (n0: nat).((eq A (AHead a7 -a6) (AHead a3 a5)) \to ((eq A a b2) \to ((aprem n0 a6 a) \to (ex2 A (\lambda -(b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1))))))) -(\lambda (H11: (eq A (AHead a7 a6) (AHead a3 a5))).(let H12 \def (f_equal A A -(\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) -\Rightarrow a6 | (AHead _ a8) \Rightarrow a8])) (AHead a7 a6) (AHead a3 a5) -H11) in ((let H13 \def (f_equal A A (\lambda (e: A).(match e in A return -(\lambda (_: A).A) with [(ASort _ _) \Rightarrow a7 | (AHead a8 _) -\Rightarrow a8])) (AHead a7 a6) (AHead a3 a5) H11) in (eq_ind A a3 (\lambda -(_: A).((eq A a6 a5) \to ((eq A a b2) \to ((aprem n a6 a) \to (ex2 A (\lambda -(b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1))))))) -(\lambda (H14: (eq A a6 a5)).(eq_ind A a5 (\lambda (a8: A).((eq A a b2) \to -((aprem n a8 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: -A).(aprem (S n) (AHead a0 a4) b1)))))) (\lambda (H15: (eq A a b2)).(eq_ind A -b2 (\lambda (a8: A).((aprem n a5 a8) \to (ex2 A (\lambda (b1: A).(leq g b1 -b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1))))) (\lambda (H16: -(aprem n a5 b2)).(let H_x \def (H3 n b2 H16) in (let H17 \def H_x in (ex2_ind -A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem n a4 b1)) (ex2 A -(\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) -b1))) (\lambda (x: A).(\lambda (H18: (leq g x b2)).(\lambda (H19: (aprem n a4 -x)).(ex_intro2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S -n) (AHead a0 a4) b1)) x H18 (aprem_succ a4 x n H19 a0))))) H17)))) a (sym_eq -A a b2 H15))) a6 (sym_eq A a6 a5 H14))) a7 (sym_eq A a7 a3 H13))) H12))) i0 -(sym_eq nat i0 n H10))) H8 H9 H6))))]) in (H6 (refl_equal nat (S n)) -(refl_equal A (AHead a3 a5)) (refl_equal A b2))))]) H4)))))))))))) a1 a2 -H)))). +(S i0)) \to ((eq A a (AHead a3 a5)) \to ((eq A a6 b2) \to (ex2 A (\lambda +(b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) (AHead a0 a4) +b1)))))))))) with [(aprem_zero a6 a7) \Rightarrow (\lambda (H6: (eq nat O (S +i0))).(\lambda (H7: (eq A (AHead a6 a7) (AHead a3 a5))).(\lambda (H8: (eq A +a6 b2)).((let H9 \def (eq_ind nat O (\lambda (e: nat).(match e in nat return +(\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) +I (S i0) H6) in (False_ind ((eq A (AHead a6 a7) (AHead a3 a5)) \to ((eq A a6 +b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) +(AHead a0 a4) b1))))) H9)) H7 H8)))) | (aprem_succ a6 a i1 H6 a7) \Rightarrow +(\lambda (H7: (eq nat (S i1) (S i0))).(\lambda (H8: (eq A (AHead a7 a6) +(AHead a3 a5))).(\lambda (H9: (eq A a b2)).((let H10 \def (f_equal nat nat +(\lambda (e: nat).(match e in nat return (\lambda (_: nat).nat) with [O +\Rightarrow i1 | (S n) \Rightarrow n])) (S i1) (S i0) H7) in (eq_ind nat i0 +(\lambda (n: nat).((eq A (AHead a7 a6) (AHead a3 a5)) \to ((eq A a b2) \to +((aprem n a6 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: +A).(aprem (S i0) (AHead a0 a4) b1))))))) (\lambda (H11: (eq A (AHead a7 a6) +(AHead a3 a5))).(let H12 \def (f_equal A A (\lambda (e: A).(match e in A +return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a6 | (AHead _ a8) +\Rightarrow a8])) (AHead a7 a6) (AHead a3 a5) H11) in ((let H13 \def (f_equal +A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) +\Rightarrow a7 | (AHead a8 _) \Rightarrow a8])) (AHead a7 a6) (AHead a3 a5) +H11) in (eq_ind A a3 (\lambda (_: A).((eq A a6 a5) \to ((eq A a b2) \to +((aprem i0 a6 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: +A).(aprem (S i0) (AHead a0 a4) b1))))))) (\lambda (H14: (eq A a6 a5)).(eq_ind +A a5 (\lambda (a8: A).((eq A a b2) \to ((aprem i0 a8 a) \to (ex2 A (\lambda +(b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) (AHead a0 a4) b1)))))) +(\lambda (H15: (eq A a b2)).(eq_ind A b2 (\lambda (a8: A).((aprem i0 a5 a8) +\to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) +(AHead a0 a4) b1))))) (\lambda (H16: (aprem i0 a5 b2)).(let H_x \def (H3 i0 +b2 H16) in (let H17 \def H_x in (ex2_ind A (\lambda (b1: A).(leq g b1 b2)) +(\lambda (b1: A).(aprem i0 a4 b1)) (ex2 A (\lambda (b1: A).(leq g b1 b2)) +(\lambda (b1: A).(aprem (S i0) (AHead a0 a4) b1))) (\lambda (x: A).(\lambda +(H18: (leq g x b2)).(\lambda (H19: (aprem i0 a4 x)).(ex_intro2 A (\lambda +(b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) (AHead a0 a4) b1)) x +H18 (aprem_succ a4 x i0 H19 a0))))) H17)))) a (sym_eq A a b2 H15))) a6 +(sym_eq A a6 a5 H14))) a7 (sym_eq A a7 a3 H13))) H12))) i1 (sym_eq nat i1 i0 +H10))) H8 H9 H6))))]) in (H6 (refl_equal nat (S i0)) (refl_equal A (AHead a3 +a5)) (refl_equal A b2)))))) i H4)))))))))))) a1 a2 H)))). theorem aprem_asucc: \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (i: nat).((aprem i diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/arity/aprem.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/arity/aprem.ma index ae345b6a8..97a146037 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/arity/aprem.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/arity/aprem.ma @@ -149,110 +149,114 @@ A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t0 a2)).(\lambda (H3: (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d (CHead c0 (Bind Abst) u))))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))).(\lambda (i: nat).(\lambda (b: -A).(\lambda (H4: (aprem i (AHead a1 a2) b)).((match i in nat return (\lambda -(n: nat).((aprem n (AHead a1 a2) b) \to (ex2_3 C T nat (\lambda (d: -C).(\lambda (_: T).(\lambda (j: nat).(drop (plus n j) O d c0)))) (\lambda (d: -C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))))) with -[O \Rightarrow (\lambda (H5: (aprem O (AHead a1 a2) b)).(let H6 \def (match -H5 in aprem return (\lambda (n: nat).(\lambda (a0: A).(\lambda (a3: -A).(\lambda (_: (aprem n a0 a3)).((eq nat n O) \to ((eq A a0 (AHead a1 a2)) -\to ((eq A a3 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda +A).(\lambda (H4: (aprem i (AHead a1 a2) b)).(nat_ind (\lambda (n: +nat).((aprem n (AHead a1 a2) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda +(_: T).(\lambda (j: nat).(drop (plus n j) O d c0)))) (\lambda (d: C).(\lambda +(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))))) (\lambda (H5: +(aprem O (AHead a1 a2) b)).(let H6 \def (match H5 in aprem return (\lambda +(n: nat).(\lambda (a0: A).(\lambda (a3: A).(\lambda (_: (aprem n a0 a3)).((eq +nat n O) \to ((eq A a0 (AHead a1 a2)) \to ((eq A a3 b) \to (ex2_3 C T nat +(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) +(\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g +b))))))))))))) with [(aprem_zero a0 a3) \Rightarrow (\lambda (_: (eq nat O +O)).(\lambda (H7: (eq A (AHead a0 a3) (AHead a1 a2))).(\lambda (H8: (eq A a0 +b)).((let H9 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda +(_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a4) \Rightarrow a4])) +(AHead a0 a3) (AHead a1 a2) H7) in ((let H10 \def (f_equal A A (\lambda (e: +A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | +(AHead a4 _) \Rightarrow a4])) (AHead a0 a3) (AHead a1 a2) H7) in (eq_ind A +a1 (\lambda (a4: A).((eq A a3 a2) \to ((eq A a4 b) \to (ex2_3 C T nat +(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) +(\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g +b))))))))) (\lambda (H11: (eq A a3 a2)).(eq_ind A a2 (\lambda (_: A).((eq A +a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda +(_: nat).(arity g d u0 (asucc g b)))))))) (\lambda (H12: (eq A a1 b)).(eq_ind +A b (\lambda (_: A).(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u0: -T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))))) with [(aprem_zero -a0 a3) \Rightarrow (\lambda (_: (eq nat O O)).(\lambda (H7: (eq A (AHead a0 -a3) (AHead a1 a2))).(\lambda (H8: (eq A a0 b)).((let H9 \def (f_equal A A -(\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) -\Rightarrow a3 | (AHead _ a4) \Rightarrow a4])) (AHead a0 a3) (AHead a1 a2) -H7) in ((let H10 \def (f_equal A A (\lambda (e: A).(match e in A return -(\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | (AHead a4 _) -\Rightarrow a4])) (AHead a0 a3) (AHead a1 a2) H7) in (eq_ind A a1 (\lambda -(a4: A).((eq A a3 a2) \to ((eq A a4 b) \to (ex2_3 C T nat (\lambda (d: +T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))) (eq_ind A a1 (\lambda +(a4: A).(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda +(_: nat).(arity g d u0 (asucc g a4))))))) (ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: -C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))) -(\lambda (H11: (eq A a3 a2)).(eq_ind A a2 (\lambda (_: A).((eq A a1 b) \to +C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g a1))))) c0 u O +(drop_refl c0) H0) b H12) a1 (sym_eq A a1 b H12))) a3 (sym_eq A a3 a2 H11))) +a0 (sym_eq A a0 a1 H10))) H9)) H8)))) | (aprem_succ a0 a3 i0 H6 a4) +\Rightarrow (\lambda (H7: (eq nat (S i0) O)).(\lambda (H8: (eq A (AHead a4 +a0) (AHead a1 a2))).(\lambda (H9: (eq A a3 b)).((let H10 \def (eq_ind nat (S +i0) (\lambda (e: nat).(match e in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H7) in (False_ind ((eq A +(AHead a4 a0) (AHead a1 a2)) \to ((eq A a3 b) \to ((aprem i0 a0 a3) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d -u0 (asucc g b)))))))) (\lambda (H12: (eq A a1 b)).(eq_ind A b (\lambda (_: -A).(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop -(plus O j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: -nat).(arity g d u0 (asucc g b))))))) (eq_ind A a1 (\lambda (a4: A).(ex2_3 C T -nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d -c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 -(asucc g a4))))))) (ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g a1))))) c0 u O (drop_refl -c0) H0) b H12) a1 (sym_eq A a1 b H12))) a3 (sym_eq A a3 a2 H11))) a0 (sym_eq -A a0 a1 H10))) H9)) H8)))) | (aprem_succ a0 a3 i0 H6 a4) \Rightarrow (\lambda -(H7: (eq nat (S i0) O)).(\lambda (H8: (eq A (AHead a4 a0) (AHead a1 -a2))).(\lambda (H9: (eq A a3 b)).((let H10 \def (eq_ind nat (S i0) (\lambda -(e: nat).(match e in nat return (\lambda (_: nat).Prop) with [O \Rightarrow -False | (S _) \Rightarrow True])) I O H7) in (False_ind ((eq A (AHead a4 a0) -(AHead a1 a2)) \to ((eq A a3 b) \to ((aprem i0 a0 a3) \to (ex2_3 C T nat -(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) -(\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g -b))))))))) H10)) H8 H9 H6))))]) in (H6 (refl_equal nat O) (refl_equal A -(AHead a1 a2)) (refl_equal A b)))) | (S n) \Rightarrow (\lambda (H5: (aprem -(S n) (AHead a1 a2) b)).(let H6 \def (match H5 in aprem return (\lambda (n0: -nat).(\lambda (a0: A).(\lambda (a3: A).(\lambda (_: (aprem n0 a0 a3)).((eq -nat n0 (S n)) \to ((eq A a0 (AHead a1 a2)) \to ((eq A a3 b) \to (ex2_3 C T -nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O -d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 -(asucc g b))))))))))))) with [(aprem_zero a0 a3) \Rightarrow (\lambda (H6: -(eq nat O (S n))).(\lambda (H7: (eq A (AHead a0 a3) (AHead a1 a2))).(\lambda -(H8: (eq A a0 b)).((let H9 \def (eq_ind nat O (\lambda (e: nat).(match e in -nat return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) -\Rightarrow False])) I (S n) H6) in (False_ind ((eq A (AHead a0 a3) (AHead a1 -a2)) \to ((eq A a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))))) H9)) H7 H8)))) | -(aprem_succ a0 a3 i0 H6 a4) \Rightarrow (\lambda (H7: (eq nat (S i0) (S -n))).(\lambda (H8: (eq A (AHead a4 a0) (AHead a1 a2))).(\lambda (H9: (eq A a3 -b)).((let H10 \def (f_equal nat nat (\lambda (e: nat).(match e in nat return -(\lambda (_: nat).nat) with [O \Rightarrow i0 | (S n0) \Rightarrow n0])) (S -i0) (S n) H7) in (eq_ind nat n (\lambda (n0: nat).((eq A (AHead a4 a0) (AHead -a1 a2)) \to ((eq A a3 b) \to ((aprem n0 a0 a3) \to (ex2_3 C T nat (\lambda -(d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) -(\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g -b)))))))))) (\lambda (H11: (eq A (AHead a4 a0) (AHead a1 a2))).(let H12 \def -(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with -[(ASort _ _) \Rightarrow a0 | (AHead _ a5) \Rightarrow a5])) (AHead a4 a0) -(AHead a1 a2) H11) in ((let H13 \def (f_equal A A (\lambda (e: A).(match e in -A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead a5 _) +u0 (asucc g b))))))))) H10)) H8 H9 H6))))]) in (H6 (refl_equal nat O) +(refl_equal A (AHead a1 a2)) (refl_equal A b)))) (\lambda (i0: nat).(\lambda +(_: (((aprem i0 (AHead a1 a2) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda +(_: T).(\lambda (j: nat).(drop (plus i0 j) O d c0)))) (\lambda (d: +C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g +b))))))))).(\lambda (H5: (aprem (S i0) (AHead a1 a2) b)).(let H6 \def (match +H5 in aprem return (\lambda (n: nat).(\lambda (a0: A).(\lambda (a3: +A).(\lambda (_: (aprem n a0 a3)).((eq nat n (S i0)) \to ((eq A a0 (AHead a1 +a2)) \to ((eq A a3 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus (S i0) j) O d c0)))) (\lambda (d: +C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))))) +with [(aprem_zero a0 a3) \Rightarrow (\lambda (H6: (eq nat O (S +i0))).(\lambda (H7: (eq A (AHead a0 a3) (AHead a1 a2))).(\lambda (H8: (eq A +a0 b)).((let H9 \def (eq_ind nat O (\lambda (e: nat).(match e in nat return +(\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) +I (S i0) H6) in (False_ind ((eq A (AHead a0 a3) (AHead a1 a2)) \to ((eq A a0 +b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop +(plus (S i0) j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: +nat).(arity g d u0 (asucc g b)))))))) H9)) H7 H8)))) | (aprem_succ a0 a3 i1 +H6 a4) \Rightarrow (\lambda (H7: (eq nat (S i1) (S i0))).(\lambda (H8: (eq A +(AHead a4 a0) (AHead a1 a2))).(\lambda (H9: (eq A a3 b)).((let H10 \def +(f_equal nat nat (\lambda (e: nat).(match e in nat return (\lambda (_: +nat).nat) with [O \Rightarrow i1 | (S n) \Rightarrow n])) (S i1) (S i0) H7) +in (eq_ind nat i0 (\lambda (n: nat).((eq A (AHead a4 a0) (AHead a1 a2)) \to +((eq A a3 b) \to ((aprem n a0 a3) \to (ex2_3 C T nat (\lambda (d: C).(\lambda +(_: T).(\lambda (j: nat).(drop (plus (S i0) j) O d c0)))) (\lambda (d: +C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))))))) +(\lambda (H11: (eq A (AHead a4 a0) (AHead a1 a2))).(let H12 \def (f_equal A A +(\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) +\Rightarrow a0 | (AHead _ a5) \Rightarrow a5])) (AHead a4 a0) (AHead a1 a2) +H11) in ((let H13 \def (f_equal A A (\lambda (e: A).(match e in A return +(\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead a5 _) \Rightarrow a5])) (AHead a4 a0) (AHead a1 a2) H11) in (eq_ind A a1 (\lambda -(_: A).((eq A a0 a2) \to ((eq A a3 b) \to ((aprem n a0 a3) \to (ex2_3 C T nat -(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d -c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 +(_: A).((eq A a0 a2) \to ((eq A a3 b) \to ((aprem i0 a0 a3) \to (ex2_3 C T +nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S i0) j) O +d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))))))) (\lambda (H14: (eq A a0 a2)).(eq_ind A a2 (\lambda (a5: -A).((eq A a3 b) \to ((aprem n a5 a3) \to (ex2_3 C T nat (\lambda (d: -C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda -(d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))) -(\lambda (H15: (eq A a3 b)).(eq_ind A b (\lambda (a5: A).((aprem n a2 a5) \to -(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus -(S n) j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity -g d u0 (asucc g b)))))))) (\lambda (H16: (aprem n a2 b)).(let H_x \def (H3 n -b H16) in (let H17 \def H_x in (ex2_3_ind C T nat (\lambda (d: C).(\lambda -(_: T).(\lambda (j: nat).(drop (plus n j) O d (CHead c0 (Bind Abst) u))))) +A).((eq A a3 b) \to ((aprem i0 a5 a3) \to (ex2_3 C T nat (\lambda (d: +C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S i0) j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g -b))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop -(plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: -nat).(arity g d u0 (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (x2: nat).(\lambda (H18: (drop (plus n x2) O x0 (CHead c0 (Bind -Abst) u))).(\lambda (H19: (arity g x0 x1 (asucc g b))).(ex2_3_intro C T nat -(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d -c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 -(asucc g b))))) x0 x1 x2 (drop_S Abst x0 c0 u (plus n x2) H18) H19)))))) -H17)))) a3 (sym_eq A a3 b H15))) a0 (sym_eq A a0 a2 H14))) a4 (sym_eq A a4 a1 -H13))) H12))) i0 (sym_eq nat i0 n H10))) H8 H9 H6))))]) in (H6 (refl_equal -nat (S n)) (refl_equal A (AHead a1 a2)) (refl_equal A b))))]) H4))))))))))))) -(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u -a1)).(\lambda (_: ((\forall (i: nat).(\forall (b: A).((aprem i a1 b) \to -(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus -i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d -u0 (asucc g b))))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: -(arity g c0 t0 (AHead a1 a2))).(\lambda (H3: ((\forall (i: nat).(\forall (b: -A).((aprem i (AHead a1 a2) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))).(\lambda (i: +b))))))))) (\lambda (H15: (eq A a3 b)).(eq_ind A b (\lambda (a5: A).((aprem +i0 a2 a5) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus (S i0) j) O d c0)))) (\lambda (d: C).(\lambda (u0: +T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))))) (\lambda (H16: (aprem +i0 a2 b)).(let H_x \def (H3 i0 b H16) in (let H17 \def H_x in (ex2_3_ind C T +nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d +(CHead c0 (Bind Abst) u))))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: +nat).(arity g d u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d: C).(\lambda +(_: T).(\lambda (j: nat).(drop (plus (S i0) j) O d c0)))) (\lambda (d: +C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) (\lambda +(x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H18: (drop (plus i0 x2) +O x0 (CHead c0 (Bind Abst) u))).(\lambda (H19: (arity g x0 x1 (asucc g +b))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: +nat).(drop (plus (S i0) j) O d c0)))) (\lambda (d: C).(\lambda (u0: +T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) x0 x1 x2 (drop_S Abst x0 +c0 u (plus i0 x2) H18) H19)))))) H17)))) a3 (sym_eq A a3 b H15))) a0 (sym_eq +A a0 a2 H14))) a4 (sym_eq A a4 a1 H13))) H12))) i1 (sym_eq nat i1 i0 H10))) +H8 H9 H6))))]) in (H6 (refl_equal nat (S i0)) (refl_equal A (AHead a1 a2)) +(refl_equal A b)))))) i H4))))))))))))) (\lambda (c0: C).(\lambda (u: +T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: ((\forall +(i: nat).(\forall (b: A).((aprem i a1 b) \to (ex2_3 C T nat (\lambda (d: +C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: +C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g +b))))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 +(AHead a1 a2))).(\lambda (H3: ((\forall (i: nat).(\forall (b: A).((aprem i +(AHead a1 a2) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda +(j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: +T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))).(\lambda (i: nat).(\lambda (b: A).(\lambda (H4: (aprem i a2 b)).(let H5 \def (H3 (S i) b (aprem_succ a2 b i H4 a1)) in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (S (plus i j)) O d c0)))) (\lambda (d: C).(\lambda @@ -282,72 +286,72 @@ T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))))))).(\lambda (k: K).(\lambda (t1: T).(\lambda (H8: (drop (S (plus i x2)) O (CHead d k t1) c0)).(\lambda (H9: (arity g (CHead d k t1) x1 -(asucc g b))).((match k in K return (\lambda (k0: K).((arity g (CHead d k0 -t1) x1 (asucc g b)) \to ((drop (r k0 (plus i x2)) O d c0) \to (ex2_3 C T nat -(\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 +(asucc g b))).(K_ind (\lambda (k0: K).((arity g (CHead d k0 t1) x1 (asucc g +b)) \to ((drop (r k0 (plus i x2)) O d c0) \to (ex2_3 C T nat (\lambda (d0: +C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda +(d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))))))) +(\lambda (b0: B).(\lambda (H10: (arity g (CHead d (Bind b0) t1) x1 (asucc g +b))).(\lambda (H11: (drop (r (Bind b0) (plus i x2)) O d c0)).(ex2_3_intro C T +nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 -(asucc g b))))))))) with [(Bind b0) \Rightarrow (\lambda (H10: (arity g -(CHead d (Bind b0) t1) x1 (asucc g b))).(\lambda (H11: (drop (r (Bind b0) -(plus i x2)) O d c0)).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: +(asucc g b))))) (CHead d (Bind b0) t1) x1 (S x2) (eq_ind nat (S (plus i x2)) +(\lambda (n: nat).(drop n O (CHead d (Bind b0) t1) c0)) (drop_drop (Bind b0) +(plus i x2) d c0 H11 t1) (plus i (S x2)) (plus_n_Sm i x2)) H10)))) (\lambda +(f: F).(\lambda (H10: (arity g (CHead d (Flat f) t1) x1 (asucc g +b))).(\lambda (H11: (drop (r (Flat f) (plus i x2)) O d c0)).(let H12 \def +(IHd H11 (arity_cimp_conf g (CHead d (Flat f) t1) x1 (asucc g b) H10 d +(cimp_flat_sx f d t1))) in (ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) (CHead d (Bind b0) -t1) x1 (S x2) (eq_ind nat (S (plus i x2)) (\lambda (n: nat).(drop n O (CHead -d (Bind b0) t1) c0)) (drop_drop (Bind b0) (plus i x2) d c0 H11 t1) (plus i (S -x2)) (plus_n_Sm i x2)) H10))) | (Flat f) \Rightarrow (\lambda (H10: (arity g -(CHead d (Flat f) t1) x1 (asucc g b))).(\lambda (H11: (drop (r (Flat f) (plus -i x2)) O d c0)).(let H12 \def (IHd H11 (arity_cimp_conf g (CHead d (Flat f) -t1) x1 (asucc g b) H10 d (cimp_flat_sx f d t1))) in (ex2_3_ind C T nat +(u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 -(asucc g b))))) (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda -(_: nat).(arity g d0 u0 (asucc g b)))))) (\lambda (x3: C).(\lambda (x4: -T).(\lambda (x5: nat).(\lambda (H13: (drop (plus i x5) O x3 c0)).(\lambda -(H14: (arity g x3 x4 (asucc g b))).(ex2_3_intro C T nat (\lambda (d0: -C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda -(d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) x3 -x4 x5 H13 H14)))))) H12))))]) H9 (drop_gen_drop k d c0 t1 (plus i x2) -H8)))))))) x0 H6 H7)))))) H5)))))))))))))) (\lambda (c0: C).(\lambda (u: -T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda (_: -((\forall (i: nat).(\forall (b: A).((aprem i (asucc g a0) b) \to (ex2_3 C T -nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d -c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 -(asucc g b))))))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 -a0)).(\lambda (H3: ((\forall (i: nat).(\forall (b: A).((aprem i a0 b) \to -(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus -i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d -u0 (asucc g b))))))))))).(\lambda (i: nat).(\lambda (b: A).(\lambda (H4: -(aprem i a0 b)).(let H_x \def (H3 i b H4) in (let H5 \def H_x in (ex2_3_ind C -T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d -c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 -(asucc g b))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: +(asucc g b)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: +nat).(\lambda (H13: (drop (plus i x5) O x3 c0)).(\lambda (H14: (arity g x3 x4 +(asucc g b))).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda +(j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: +T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) x3 x4 x5 H13 H14)))))) +H12))))) k H9 (drop_gen_drop k d c0 t1 (plus i x2) H8)))))))) x0 H6 H7)))))) +H5)))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a0: A).(\lambda +(_: (arity g c0 u (asucc g a0))).(\lambda (_: ((\forall (i: nat).(\forall (b: +A).((aprem i (asucc g a0) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda +(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))).(\lambda (t0: +T).(\lambda (_: (arity g c0 t0 a0)).(\lambda (H3: ((\forall (i: nat).(\forall +(b: A).((aprem i a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda +(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))))).(\lambda (i: +nat).(\lambda (b: A).(\lambda (H4: (aprem i a0 b)).(let H_x \def (H3 i b H4) +in (let H5 \def H_x in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: +T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda +(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) (ex2_3 C T nat +(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) +(\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g +b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H6: +(drop (plus i x2) O x0 c0)).(\lambda (H7: (arity g x0 x1 (asucc g +b))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda -(_: nat).(arity g d u0 (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (x2: nat).(\lambda (H6: (drop (plus i x2) O x0 c0)).(\lambda (H7: -(arity g x0 x1 (asucc g b))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda -(_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda -(u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) x0 x1 x2 H6 H7)))))) -H5)))))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda -(_: (arity g c0 t0 a1)).(\lambda (H1: ((\forall (i: nat).(\forall (b: -A).((aprem i a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: -T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: -T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (a2: -A).(\lambda (H2: (leq g a1 a2)).(\lambda (i: nat).(\lambda (b: A).(\lambda -(H3: (aprem i a2 b)).(let H_x \def (aprem_repl g a1 a2 H2 i b H3) in (let H4 -\def H_x in (ex2_ind A (\lambda (b1: A).(leq g b1 b)) (\lambda (b1: A).(aprem -i a1 b1)) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: -nat).(arity g d u (asucc g b)))))) (\lambda (x: A).(\lambda (H5: (leq g x -b)).(\lambda (H6: (aprem i a1 x)).(let H_x0 \def (H1 i x H6) in (let H7 \def -H_x0 in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: -nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: -nat).(arity g d u (asucc g x))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: +(_: nat).(arity g d u0 (asucc g b))))) x0 x1 x2 H6 H7)))))) H5)))))))))))))) +(\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 +t0 a1)).(\lambda (H1: ((\forall (i: nat).(\forall (b: A).((aprem i a1 b) \to +(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus +i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d +u (asucc g b))))))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 +a2)).(\lambda (i: nat).(\lambda (b: A).(\lambda (H3: (aprem i a2 b)).(let H_x +\def (aprem_repl g a1 a2 H2 i b H3) in (let H4 \def H_x in (ex2_ind A +(\lambda (b1: A).(leq g b1 b)) (\lambda (b1: A).(aprem i a1 b1)) (ex2_3 C T +nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d +c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc +g b)))))) (\lambda (x: A).(\lambda (H5: (leq g x b)).(\lambda (H6: (aprem i +a1 x)).(let H_x0 \def (H1 i x H6) in (let H7 \def H_x0 in (ex2_3_ind C T nat +(\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) +(\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g +x))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop +(plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: +nat).(arity g d u (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda +(x2: nat).(\lambda (H8: (drop (plus i x2) O x0 c0)).(\lambda (H9: (arity g x0 +x1 (asucc g x))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: -T).(\lambda (_: nat).(arity g d u (asucc g b)))))) (\lambda (x0: C).(\lambda -(x1: T).(\lambda (x2: nat).(\lambda (H8: (drop (plus i x2) O x0 c0)).(\lambda -(H9: (arity g x0 x1 (asucc g x))).(ex2_3_intro C T nat (\lambda (d: -C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: -C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))) x0 x1 x2 H8 -(arity_repl g x0 x1 (asucc g x) H9 (asucc g b) (asucc_repl g x b H5)))))))) -H7)))))) H4))))))))))))) c t a H))))). +T).(\lambda (_: nat).(arity g d u (asucc g b))))) x0 x1 x2 H8 (arity_repl g +x0 x1 (asucc g x) H9 (asucc g b) (asucc_repl g x b H5)))))))) H7)))))) +H4))))))))))))) c t a H))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/asucc/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/asucc/fwd.ma index 76009b124..3f4c2d91e 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/asucc/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/asucc/fwd.ma @@ -28,18 +28,19 @@ nat).(eq A a (ASort h0 n0))))))))) (h0: nat).(\lambda (n0: nat).(eq A a0 (ASort h0 n0))))))) (\lambda (n0: nat).(\lambda (n1: nat).(\lambda (H: (eq A (ASort h n) (asucc g (ASort n0 n1)))).(let H0 \def (f_equal A A (\lambda (e: A).e) (ASort h n) (match n0 -with [O \Rightarrow (ASort O (next g n1)) | (S h) \Rightarrow (ASort h n1)]) -H) in (ex_2_intro nat nat (\lambda (h0: nat).(\lambda (n2: nat).(eq A (ASort -n0 n1) (ASort h0 n2)))) n0 n1 (refl_equal A (ASort n0 n1))))))) (\lambda (a0: -A).(\lambda (_: (((eq A (ASort h n) (asucc g a0)) \to (ex_2 nat nat (\lambda -(h0: nat).(\lambda (n0: nat).(eq A a0 (ASort h0 n0)))))))).(\lambda (a1: -A).(\lambda (_: (((eq A (ASort h n) (asucc g a1)) \to (ex_2 nat nat (\lambda -(h0: nat).(\lambda (n0: nat).(eq A a1 (ASort h0 n0)))))))).(\lambda (H1: (eq -A (ASort h n) (asucc g (AHead a0 a1)))).(let H2 \def (eq_ind A (ASort h n) -(\lambda (ee: A).(match ee in A return (\lambda (_: A).Prop) with [(ASort _ -_) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (asucc g (AHead a0 -a1)) H1) in (False_ind (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: -nat).(eq A (AHead a0 a1) (ASort h0 n0))))) H2))))))) a)))). +with [O \Rightarrow (ASort O (next g n1)) | (S h0) \Rightarrow (ASort h0 +n1)]) H) in (ex_2_intro nat nat (\lambda (h0: nat).(\lambda (n2: nat).(eq A +(ASort n0 n1) (ASort h0 n2)))) n0 n1 (refl_equal A (ASort n0 n1))))))) +(\lambda (a0: A).(\lambda (_: (((eq A (ASort h n) (asucc g a0)) \to (ex_2 nat +nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A a0 (ASort h0 +n0)))))))).(\lambda (a1: A).(\lambda (_: (((eq A (ASort h n) (asucc g a1)) +\to (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A a1 (ASort h0 +n0)))))))).(\lambda (H1: (eq A (ASort h n) (asucc g (AHead a0 a1)))).(let H2 +\def (eq_ind A (ASort h n) (\lambda (ee: A).(match ee in A return (\lambda +(_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow +False])) I (asucc g (AHead a0 a1)) H1) in (False_ind (ex_2 nat nat (\lambda +(h0: nat).(\lambda (n0: nat).(eq A (AHead a0 a1) (ASort h0 n0))))) H2))))))) +a)))). theorem asucc_gen_head: \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (a: A).((eq A @@ -66,29 +67,29 @@ return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 n0) H0) in (False_ind (ex2 A (\lambda (a0: A).(eq A (ASort (S n1) n0) (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g a0)))) H1))))) n H)))) (\lambda (a0: A).(\lambda (H: (((eq A (AHead a1 a2) -(asucc g a0)) \to (ex2 A (\lambda (a2: A).(eq A a0 (AHead a1 a2))) (\lambda -(a0: A).(eq A a2 (asucc g a0))))))).(\lambda (a3: A).(\lambda (H0: (((eq A -(AHead a1 a2) (asucc g a3)) \to (ex2 A (\lambda (a0: A).(eq A a3 (AHead a1 -a0))) (\lambda (a0: A).(eq A a2 (asucc g a0))))))).(\lambda (H1: (eq A (AHead +(asucc g a0)) \to (ex2 A (\lambda (a3: A).(eq A a0 (AHead a1 a3))) (\lambda +(a3: A).(eq A a2 (asucc g a3))))))).(\lambda (a3: A).(\lambda (H0: (((eq A +(AHead a1 a2) (asucc g a3)) \to (ex2 A (\lambda (a4: A).(eq A a3 (AHead a1 +a4))) (\lambda (a4: A).(eq A a2 (asucc g a4))))))).(\lambda (H1: (eq A (AHead a1 a2) (asucc g (AHead a0 a3)))).(let H2 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a1 | -(AHead a _) \Rightarrow a])) (AHead a1 a2) (AHead a0 (asucc g a3)) H1) in +(AHead a4 _) \Rightarrow a4])) (AHead a1 a2) (AHead a0 (asucc g a3)) H1) in ((let H3 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: -A).A) with [(ASort _ _) \Rightarrow a2 | (AHead _ a) \Rightarrow a])) (AHead -a1 a2) (AHead a0 (asucc g a3)) H1) in (\lambda (H4: (eq A a1 a0)).(let H5 -\def (eq_ind_r A a0 (\lambda (a: A).((eq A (AHead a1 a2) (asucc g a)) \to -(ex2 A (\lambda (a0: A).(eq A a (AHead a1 a0))) (\lambda (a0: A).(eq A a2 -(asucc g a0)))))) H a1 H4) in (eq_ind A a1 (\lambda (a4: A).(ex2 A (\lambda -(a5: A).(eq A (AHead a4 a3) (AHead a1 a5))) (\lambda (a5: A).(eq A a2 (asucc -g a5))))) (let H6 \def (eq_ind A a2 (\lambda (a: A).((eq A (AHead a1 a) -(asucc g a3)) \to (ex2 A (\lambda (a0: A).(eq A a3 (AHead a1 a0))) (\lambda -(a0: A).(eq A a (asucc g a0)))))) H0 (asucc g a3) H3) in (let H7 \def (eq_ind -A a2 (\lambda (a: A).((eq A (AHead a1 a) (asucc g a1)) \to (ex2 A (\lambda -(a0: A).(eq A a1 (AHead a1 a0))) (\lambda (a0: A).(eq A a (asucc g a0)))))) -H5 (asucc g a3) H3) in (eq_ind_r A (asucc g a3) (\lambda (a4: A).(ex2 A -(\lambda (a5: A).(eq A (AHead a1 a3) (AHead a1 a5))) (\lambda (a5: A).(eq A -a4 (asucc g a5))))) (ex_intro2 A (\lambda (a4: A).(eq A (AHead a1 a3) (AHead -a1 a4))) (\lambda (a4: A).(eq A (asucc g a3) (asucc g a4))) a3 (refl_equal A -(AHead a1 a3)) (refl_equal A (asucc g a3))) a2 H3))) a0 H4)))) H2))))))) -a)))). +A).A) with [(ASort _ _) \Rightarrow a2 | (AHead _ a4) \Rightarrow a4])) +(AHead a1 a2) (AHead a0 (asucc g a3)) H1) in (\lambda (H4: (eq A a1 a0)).(let +H5 \def (eq_ind_r A a0 (\lambda (a4: A).((eq A (AHead a1 a2) (asucc g a4)) +\to (ex2 A (\lambda (a5: A).(eq A a4 (AHead a1 a5))) (\lambda (a5: A).(eq A +a2 (asucc g a5)))))) H a1 H4) in (eq_ind A a1 (\lambda (a4: A).(ex2 A +(\lambda (a5: A).(eq A (AHead a4 a3) (AHead a1 a5))) (\lambda (a5: A).(eq A +a2 (asucc g a5))))) (let H6 \def (eq_ind A a2 (\lambda (a4: A).((eq A (AHead +a1 a4) (asucc g a3)) \to (ex2 A (\lambda (a5: A).(eq A a3 (AHead a1 a5))) +(\lambda (a5: A).(eq A a4 (asucc g a5)))))) H0 (asucc g a3) H3) in (let H7 +\def (eq_ind A a2 (\lambda (a4: A).((eq A (AHead a1 a4) (asucc g a1)) \to +(ex2 A (\lambda (a5: A).(eq A a1 (AHead a1 a5))) (\lambda (a5: A).(eq A a4 +(asucc g a5)))))) H5 (asucc g a3) H3) in (eq_ind_r A (asucc g a3) (\lambda +(a4: A).(ex2 A (\lambda (a5: A).(eq A (AHead a1 a3) (AHead a1 a5))) (\lambda +(a5: A).(eq A a4 (asucc g a5))))) (ex_intro2 A (\lambda (a4: A).(eq A (AHead +a1 a3) (AHead a1 a4))) (\lambda (a4: A).(eq A (asucc g a3) (asucc g a4))) a3 +(refl_equal A (AHead a1 a3)) (refl_equal A (asucc g a3))) a2 H3))) a0 H4)))) +H2))))))) a)))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/cimp/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/cimp/props.ma index f48629b14..7c78f114b 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/cimp/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/cimp/props.ma @@ -26,16 +26,17 @@ c))) \def \lambda (f: F).(\lambda (c: C).(\lambda (v: T).(\lambda (b: B).(\lambda (d1: C).(\lambda (w: T).(\lambda (h: nat).(\lambda (H: (getl h (CHead c (Flat f) -v) (CHead d1 (Bind b) w))).((match h in nat return (\lambda (n: nat).((getl n -(CHead c (Flat f) v) (CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl -n c (CHead d2 (Bind b) w)))))) with [O \Rightarrow (\lambda (H0: (getl O -(CHead c (Flat f) v) (CHead d1 (Bind b) w))).(ex_intro C (\lambda (d2: -C).(getl O c (CHead d2 (Bind b) w))) d1 (getl_intro O c (CHead d1 (Bind b) w) -c (drop_refl c) (clear_gen_flat f c (CHead d1 (Bind b) w) v (getl_gen_O -(CHead c (Flat f) v) (CHead d1 (Bind b) w) H0))))) | (S n) \Rightarrow -(\lambda (H0: (getl (S n) (CHead c (Flat f) v) (CHead d1 (Bind b) -w))).(ex_intro C (\lambda (d2: C).(getl (S n) c (CHead d2 (Bind b) w))) d1 -(getl_gen_S (Flat f) c (CHead d1 (Bind b) w) v n H0)))]) H)))))))). +v) (CHead d1 (Bind b) w))).(nat_ind (\lambda (n: nat).((getl n (CHead c (Flat +f) v) (CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl n c (CHead d2 +(Bind b) w)))))) (\lambda (H0: (getl O (CHead c (Flat f) v) (CHead d1 (Bind +b) w))).(ex_intro C (\lambda (d2: C).(getl O c (CHead d2 (Bind b) w))) d1 +(getl_intro O c (CHead d1 (Bind b) w) c (drop_refl c) (clear_gen_flat f c +(CHead d1 (Bind b) w) v (getl_gen_O (CHead c (Flat f) v) (CHead d1 (Bind b) +w) H0))))) (\lambda (h0: nat).(\lambda (_: (((getl h0 (CHead c (Flat f) v) +(CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl h0 c (CHead d2 (Bind +b) w))))))).(\lambda (H0: (getl (S h0) (CHead c (Flat f) v) (CHead d1 (Bind +b) w))).(ex_intro C (\lambda (d2: C).(getl (S h0) c (CHead d2 (Bind b) w))) +d1 (getl_gen_S (Flat f) c (CHead d1 (Bind b) w) v h0 H0))))) h H)))))))). theorem cimp_flat_dx: \forall (f: F).(\forall (c: C).(\forall (v: T).(cimp c (CHead c (Flat f) @@ -55,37 +56,39 @@ C).(\forall (w: T).(\forall (h: nat).((getl h c1 (CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl h c2 (CHead d2 (Bind b) w))))))))))).(\lambda (b: B).(\lambda (v: T).(\lambda (b0: B).(\lambda (d1: C).(\lambda (w: T).(\lambda (h: nat).(\lambda (H0: (getl h (CHead c1 (Bind b) v) (CHead d1 -(Bind b0) w))).((match h in nat return (\lambda (n: nat).((getl n (CHead c1 -(Bind b) v) (CHead d1 (Bind b0) w)) \to (ex C (\lambda (d2: C).(getl n (CHead -c2 (Bind b) v) (CHead d2 (Bind b0) w)))))) with [O \Rightarrow (\lambda (H1: -(getl O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w))).(let H2 \def (f_equal -C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) -\Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind b0) w) (CHead +(Bind b0) w))).(nat_ind (\lambda (n: nat).((getl n (CHead c1 (Bind b) v) +(CHead d1 (Bind b0) w)) \to (ex C (\lambda (d2: C).(getl n (CHead c2 (Bind b) +v) (CHead d2 (Bind b0) w)))))) (\lambda (H1: (getl O (CHead c1 (Bind b) v) +(CHead d1 (Bind b0) w))).(let H2 \def (f_equal C C (\lambda (e: C).(match e +in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) +\Rightarrow c])) (CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind +b c1 (CHead d1 (Bind b0) w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 +(Bind b0) w) H1))) in ((let H3 \def (f_equal C B (\lambda (e: C).(match e in +C return (\lambda (_: C).B) with [(CSort _) \Rightarrow b0 | (CHead _ k _) +\Rightarrow (match k in K return (\lambda (_: K).B) with [(Bind b1) +\Rightarrow b1 | (Flat _) \Rightarrow b0])])) (CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) w) v (getl_gen_O -(CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in ((let H3 \def (f_equal -C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with [(CSort _) -\Rightarrow b0 | (CHead _ k _) \Rightarrow (match k in K return (\lambda (_: -K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (CHead d1 -(Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) -w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in ((let -H4 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) -with [(CSort _) \Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead d1 -(Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) -w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in -(\lambda (H5: (eq B b0 b)).(\lambda (_: (eq C d1 c1)).(eq_ind_r T v (\lambda -(t: T).(ex C (\lambda (d2: C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind -b0) t))))) (eq_ind_r B b (\lambda (b1: B).(ex C (\lambda (d2: C).(getl O -(CHead c2 (Bind b) v) (CHead d2 (Bind b1) v))))) (ex_intro C (\lambda (d2: -C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b) v))) c2 (getl_refl b c2 -v)) b0 H5) w H4)))) H3)) H2))) | (S n) \Rightarrow (\lambda (H1: (getl (S n) -(CHead c1 (Bind b) v) (CHead d1 (Bind b0) w))).(let H_x \def (H b0 d1 w (r -(Bind b) n) (getl_gen_S (Bind b) c1 (CHead d1 (Bind b0) w) v n H1)) in (let -H2 \def H_x in (ex_ind C (\lambda (d2: C).(getl (r (Bind b) n) c2 (CHead d2 -(Bind b0) w))) (ex C (\lambda (d2: C).(getl (S n) (CHead c2 (Bind b) v) -(CHead d2 (Bind b0) w)))) (\lambda (x: C).(\lambda (H3: (getl (r (Bind b) n) -c2 (CHead x (Bind b0) w))).(ex_intro C (\lambda (d2: C).(getl (S n) (CHead c2 -(Bind b) v) (CHead d2 (Bind b0) w))) x (getl_head (Bind b) n c2 (CHead x -(Bind b0) w) H3 v)))) H2))))]) H0)))))))))). +(CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in ((let H4 \def (f_equal +C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) +\Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind b0) w) (CHead +c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) w) v (getl_gen_O +(CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in (\lambda (H5: (eq B b0 +b)).(\lambda (_: (eq C d1 c1)).(eq_ind_r T v (\lambda (t: T).(ex C (\lambda +(d2: C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b0) t))))) (eq_ind_r B +b (\lambda (b1: B).(ex C (\lambda (d2: C).(getl O (CHead c2 (Bind b) v) +(CHead d2 (Bind b1) v))))) (ex_intro C (\lambda (d2: C).(getl O (CHead c2 +(Bind b) v) (CHead d2 (Bind b) v))) c2 (getl_refl b c2 v)) b0 H5) w H4)))) +H3)) H2))) (\lambda (h0: nat).(\lambda (_: (((getl h0 (CHead c1 (Bind b) v) +(CHead d1 (Bind b0) w)) \to (ex C (\lambda (d2: C).(getl h0 (CHead c2 (Bind +b) v) (CHead d2 (Bind b0) w))))))).(\lambda (H1: (getl (S h0) (CHead c1 (Bind +b) v) (CHead d1 (Bind b0) w))).(let H_x \def (H b0 d1 w (r (Bind b) h0) +(getl_gen_S (Bind b) c1 (CHead d1 (Bind b0) w) v h0 H1)) in (let H2 \def H_x +in (ex_ind C (\lambda (d2: C).(getl (r (Bind b) h0) c2 (CHead d2 (Bind b0) +w))) (ex C (\lambda (d2: C).(getl (S h0) (CHead c2 (Bind b) v) (CHead d2 +(Bind b0) w)))) (\lambda (x: C).(\lambda (H3: (getl (r (Bind b) h0) c2 (CHead +x (Bind b0) w))).(ex_intro C (\lambda (d2: C).(getl (S h0) (CHead c2 (Bind b) +v) (CHead d2 (Bind b0) w))) x (getl_head (Bind b) h0 c2 (CHead x (Bind b0) w) +H3 v)))) H2)))))) h H0)))))))))). theorem cimp_getl_conf: \forall (c1: C).(\forall (c2: C).((cimp c1 c2) \to (\forall (b: B).(\forall diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clear/drop.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clear/drop.ma index d30e4dbde..46cb013e3 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clear/drop.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clear/drop.ma @@ -45,26 +45,25 @@ n (S i) O c2 H)))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop (S i) O (CHead c k -t) c2)).((match k in K return (\lambda (k0: K).((drop (r k0 i) O c c2) \to -(ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c -k0 t) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: -T).(drop i O e c2))))))) with [(Bind b) \Rightarrow (\lambda (H1: (drop (r -(Bind b) i) O c c2)).(ex2_3_intro B C T (\lambda (b0: B).(\lambda (e: -C).(\lambda (v: T).(clear (CHead c (Bind b) t) (CHead e (Bind b0) v))))) -(\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) b c t -(clear_bind b c t) H1)) | (Flat f) \Rightarrow (\lambda (H1: (drop (r (Flat -f) i) O c c2)).(let H2 \def (H c2 i H1) in (ex2_3_ind B C T (\lambda (b: -B).(\lambda (e: C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) (\lambda -(_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) (ex2_3 B C T -(\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Flat f) t) -(CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: -T).(drop i O e c2))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: -T).(\lambda (H3: (clear c (CHead x1 (Bind x0) x2))).(\lambda (H4: (drop i O -x1 c2)).(ex2_3_intro B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: -T).(clear (CHead c (Flat f) t) (CHead e (Bind b) v))))) (\lambda (_: -B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) x0 x1 x2 (clear_flat c -(CHead x1 (Bind x0) x2) H3 f t) H4)))))) H2)))]) (drop_gen_drop k c c2 t i -H0))))))))) c1). +t) c2)).(K_ind (\lambda (k0: K).((drop (r k0 i) O c c2) \to (ex2_3 B C T +(\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c k0 t) (CHead +e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e +c2))))))) (\lambda (b: B).(\lambda (H1: (drop (r (Bind b) i) O c +c2)).(ex2_3_intro B C T (\lambda (b0: B).(\lambda (e: C).(\lambda (v: +T).(clear (CHead c (Bind b) t) (CHead e (Bind b0) v))))) (\lambda (_: +B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) b c t (clear_bind b c +t) H1))) (\lambda (f: F).(\lambda (H1: (drop (r (Flat f) i) O c c2)).(let H2 +\def (H c2 i H1) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda +(v: T).(clear c (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: +C).(\lambda (_: T).(drop i O e c2)))) (ex2_3 B C T (\lambda (b: B).(\lambda +(e: C).(\lambda (v: T).(clear (CHead c (Flat f) t) (CHead e (Bind b) v))))) +(\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))) (\lambda +(x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H3: (clear c (CHead x1 +(Bind x0) x2))).(\lambda (H4: (drop i O x1 c2)).(ex2_3_intro B C T (\lambda +(b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Flat f) t) (CHead e +(Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e +c2)))) x0 x1 x2 (clear_flat c (CHead x1 (Bind x0) x2) H3 f t) H4)))))) H2)))) +k (drop_gen_drop k c c2 t i H0))))))))) c1). theorem drop_clear_O: \forall (b: B).(\forall (c: C).(\forall (e1: C).(\forall (u: T).((clear c @@ -82,27 +81,27 @@ C).(\forall (u: T).((clear c0 (CHead e1 (Bind b) u)) \to (\forall (e2: C).(\forall (i: nat).((drop i O e1 e2) \to (drop (S i) O c0 e2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (u: T).(\lambda (H0: (clear (CHead c0 k t) (CHead e1 (Bind b) u))).(\lambda (e2: -C).(\lambda (i: nat).(\lambda (H1: (drop i O e1 e2)).((match k in K return -(\lambda (k0: K).((clear (CHead c0 k0 t) (CHead e1 (Bind b) u)) \to (drop (S -i) O (CHead c0 k0 t) e2))) with [(Bind b0) \Rightarrow (\lambda (H2: (clear -(CHead c0 (Bind b0) t) (CHead e1 (Bind b) u))).(let H3 \def (f_equal C C -(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) -\Rightarrow e1 | (CHead c _ _) \Rightarrow c])) (CHead e1 (Bind b) u) (CHead -c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in ((let -H4 \def (f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) -with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k in K -return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow -b])])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 -(CHead e1 (Bind b) u) t H2)) in ((let H5 \def (f_equal C T (\lambda (e: -C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | -(CHead _ _ t) \Rightarrow t])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) -(clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in (\lambda (H6: (eq B b -b0)).(\lambda (H7: (eq C e1 c0)).(let H8 \def (eq_ind C e1 (\lambda (c: -C).(drop i O c e2)) H1 c0 H7) in (eq_ind B b (\lambda (b1: B).(drop (S i) O -(CHead c0 (Bind b1) t) e2)) (drop_drop (Bind b) i c0 e2 H8 t) b0 H6))))) H4)) -H3))) | (Flat f) \Rightarrow (\lambda (H2: (clear (CHead c0 (Flat f) t) -(CHead e1 (Bind b) u))).(drop_drop (Flat f) i c0 e2 (H e1 u (clear_gen_flat f -c0 (CHead e1 (Bind b) u) t H2) e2 i H1) t))]) H0))))))))))) c)). +C).(\lambda (i: nat).(\lambda (H1: (drop i O e1 e2)).(K_ind (\lambda (k0: +K).((clear (CHead c0 k0 t) (CHead e1 (Bind b) u)) \to (drop (S i) O (CHead c0 +k0 t) e2))) (\lambda (b0: B).(\lambda (H2: (clear (CHead c0 (Bind b0) t) +(CHead e1 (Bind b) u))).(let H3 \def (f_equal C C (\lambda (e: C).(match e in +C return (\lambda (_: C).C) with [(CSort _) \Rightarrow e1 | (CHead c1 _ _) +\Rightarrow c1])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) +(clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in ((let H4 \def (f_equal +C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with [(CSort _) +\Rightarrow b | (CHead _ k0 _) \Rightarrow (match k0 in K return (\lambda (_: +K).B) with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead e1 +(Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) +u) t H2)) in ((let H5 \def (f_equal C T (\lambda (e: C).(match e in C return +(\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow +t0])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 +(CHead e1 (Bind b) u) t H2)) in (\lambda (H6: (eq B b b0)).(\lambda (H7: (eq +C e1 c0)).(let H8 \def (eq_ind C e1 (\lambda (c1: C).(drop i O c1 e2)) H1 c0 +H7) in (eq_ind B b (\lambda (b1: B).(drop (S i) O (CHead c0 (Bind b1) t) e2)) +(drop_drop (Bind b) i c0 e2 H8 t) b0 H6))))) H4)) H3)))) (\lambda (f: +F).(\lambda (H2: (clear (CHead c0 (Flat f) t) (CHead e1 (Bind b) +u))).(drop_drop (Flat f) i c0 e2 (H e1 u (clear_gen_flat f c0 (CHead e1 (Bind +b) u) t H2) e2 i H1) t))) k H0))))))))))) c)). theorem drop_clear_S: \forall (x2: C).(\forall (x1: C).(\forall (h: nat).(\forall (d: nat).((drop @@ -132,23 +131,23 @@ t))).(\lambda (b: B).(\lambda (c2: C).(\lambda (u: T).(\lambda (H1: (clear C).(drop h d c1 c2))) (\lambda (x: C).(\lambda (H2: (eq C x1 (CHead x k (lift h (r k d) t)))).(\lambda (H3: (drop h (r k d) x c)).(eq_ind_r C (CHead x k (lift h (r k d) t)) (\lambda (c0: C).(ex2 C (\lambda (c1: C).(clear c0 (CHead -c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))) ((match k in -K return (\lambda (k0: K).((clear (CHead c k0 t) (CHead c2 (Bind b) u)) \to -((drop h (r k0 d) x c) \to (ex2 C (\lambda (c1: C).(clear (CHead x k0 (lift h -(r k0 d) t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 -c2)))))) with [(Bind b0) \Rightarrow (\lambda (H4: (clear (CHead c (Bind b0) -t) (CHead c2 (Bind b) u))).(\lambda (H5: (drop h (r (Bind b0) d) x c)).(let -H6 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) -with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 -(Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) -t H4)) in ((let H7 \def (f_equal C B (\lambda (e: C).(match e in C return -(\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow -(match k in K return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat -_) \Rightarrow b])])) (CHead c2 (Bind b) u) (CHead c (Bind b0) t) +c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))) (K_ind +(\lambda (k0: K).((clear (CHead c k0 t) (CHead c2 (Bind b) u)) \to ((drop h +(r k0 d) x c) \to (ex2 C (\lambda (c1: C).(clear (CHead x k0 (lift h (r k0 d) +t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))))) +(\lambda (b0: B).(\lambda (H4: (clear (CHead c (Bind b0) t) (CHead c2 (Bind +b) u))).(\lambda (H5: (drop h (r (Bind b0) d) x c)).(let H6 \def (f_equal C C +(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow c2 | (CHead c0 _ _) \Rightarrow c0])) (CHead c2 (Bind b) u) +(CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in +((let H7 \def (f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: +C).B) with [(CSort _) \Rightarrow b | (CHead _ k0 _) \Rightarrow (match k0 in +K return (\lambda (_: K).B) with [(Bind b1) \Rightarrow b1 | (Flat _) +\Rightarrow b])])) (CHead c2 (Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in ((let H8 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) -\Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u) (CHead c -(Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in (\lambda +\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) u) (CHead +c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in (\lambda (H9: (eq B b b0)).(\lambda (H10: (eq C c2 c)).(eq_ind_r T t (\lambda (t0: T).(ex2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b) (lift h d t0)))) (\lambda (c1: C).(drop h d c1 c2)))) @@ -159,8 +158,8 @@ b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b) (lift h d t)))) (\lambda b1) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c)))) (ex_intro2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b0) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c)) x (clear_bind b0 x -(lift h d t)) H5) b H9) c2 H10) u H8)))) H7)) H6)))) | (Flat f) \Rightarrow -(\lambda (H4: (clear (CHead c (Flat f) t) (CHead c2 (Bind b) u))).(\lambda +(lift h d t)) H5) b H9) c2 H10) u H8)))) H7)) H6))))) (\lambda (f: +F).(\lambda (H4: (clear (CHead c (Flat f) t) (CHead c2 (Bind b) u))).(\lambda (H5: (drop h (r (Flat f) d) x c)).(let H6 \def (H x h d H5 b c2 u (clear_gen_flat f c (CHead c2 (Bind b) u) t H4)) in (ex2_ind C (\lambda (c1: C).(clear x (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 @@ -170,6 +169,6 @@ t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))) u)))).(\lambda (H8: (drop h d x0 c2)).(ex_intro2 C (\lambda (c1: C).(clear (CHead x (Flat f) (lift h (r (Flat f) d) t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)) x0 (clear_flat x (CHead x0 (Bind b) -(lift h d u)) H7 f (lift h (r (Flat f) d) t)) H8)))) H6))))]) H1 H3) x1 +(lift h d u)) H7 f (lift h (r (Flat f) d) t)) H8)))) H6))))) k H1 H3) x1 H2)))) (drop_gen_skip_r c x1 t h d k H0)))))))))))))) x2). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clear/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clear/fwd.ma index 2c8a2c80a..a617e342e 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clear/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clear/fwd.ma @@ -53,7 +53,7 @@ x)).((let H2 \def (f_equal C T (\lambda (e1: C).(match e1 in C return t])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H0) in ((let H3 \def (f_equal C B (\lambda (e1: C).(match e1 in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow (match k in K return -(\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow +(\lambda (_: K).B) with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b0])])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H0) in ((let H4 \def (f_equal C C (\lambda (e1: C).(match e1 in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow e0 | (CHead c _ _) \Rightarrow c])) (CHead e0 (Bind @@ -97,9 +97,9 @@ C).(match e1 in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | H1) in ((let H4 \def (f_equal C F (\lambda (e1: C).(match e1 in C return (\lambda (_: C).F) with [(CSort _) \Rightarrow f0 | (CHead _ k _) \Rightarrow (match k in K return (\lambda (_: K).F) with [(Bind _) \Rightarrow f0 | (Flat -f) \Rightarrow f])])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) H1) in +f1) \Rightarrow f1])])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) H1) in ((let H5 \def (f_equal C C (\lambda (e1: C).(match e1 in C return (\lambda -(_: C).C) with [(CSort _) \Rightarrow e0 | (CHead c _ _) \Rightarrow c])) +(_: C).C) with [(CSort _) \Rightarrow e0 | (CHead c0 _ _) \Rightarrow c0])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) H1) in (eq_ind C e (\lambda (c0: C).((eq F f0 f) \to ((eq T u0 u) \to ((eq C c x) \to ((clear c0 c) \to (clear e x)))))) (\lambda (H6: (eq F f0 f)).(eq_ind F f (\lambda (_: F).((eq T u0 u) @@ -128,9 +128,9 @@ T).(\lambda (H1: (eq C (CHead e0 (Bind b) u0) (CHead e (Flat f) u))).(let H2 in (False_ind P H2)))))) (\lambda (e0: C).(\lambda (c: C).(\lambda (H1: (clear e0 c)).(\lambda (H2: (((eq C c (CHead e (Flat f) u)) \to P))).(\lambda (_: F).(\lambda (_: T).(\lambda (H3: (eq C c (CHead e (Flat f) u))).(let H4 -\def (eq_ind C c (\lambda (c: C).((eq C c (CHead e (Flat f) u)) \to P)) H2 -(CHead e (Flat f) u) H3) in (let H5 \def (eq_ind C c (\lambda (c: C).(clear -e0 c)) H1 (CHead e (Flat f) u) H3) in (H4 (refl_equal C (CHead e (Flat f) +\def (eq_ind C c (\lambda (c0: C).((eq C c0 (CHead e (Flat f) u)) \to P)) H2 +(CHead e (Flat f) u) H3) in (let H5 \def (eq_ind C c (\lambda (c0: C).(clear +e0 c0)) H1 (CHead e (Flat f) u) H3) in (H4 (refl_equal C (CHead e (Flat f) u)))))))))))) x y H0))) H)))))). theorem clear_gen_all: @@ -144,13 +144,13 @@ B).(\lambda (e: C).(\lambda (u: T).(ex_3_intro B C T (\lambda (b0: B).(\lambda (e0: C).(\lambda (u0: T).(eq C (CHead e (Bind b) u) (CHead e0 (Bind b0) u0))))) b e u (refl_equal C (CHead e (Bind b) u)))))) (\lambda (e: C).(\lambda (c: C).(\lambda (H0: (clear e c)).(\lambda (H1: (ex_3 B C T -(\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(eq C c (CHead e (Bind b) +(\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(eq C c (CHead e0 (Bind b) u))))))).(\lambda (_: F).(\lambda (_: T).(let H2 \def H1 in (ex_3_ind B C T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(eq C c (CHead e0 (Bind b) u0))))) (ex_3 B C T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(eq C c (CHead e0 (Bind b) u0)))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H3: (eq C c (CHead x1 (Bind x0) x2))).(let H4 \def (eq_ind C c -(\lambda (c: C).(clear e c)) H0 (CHead x1 (Bind x0) x2) H3) in (eq_ind_r C +(\lambda (c0: C).(clear e c0)) H0 (CHead x1 (Bind x0) x2) H3) in (eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c0: C).(ex_3 B C T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(eq C c0 (CHead e0 (Bind b) u0))))))) (ex_3_intro B C T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(eq C (CHead x1 (Bind diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clear/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clear/props.ma index d6c135094..d2e2aa7fc 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clear/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clear/props.ma @@ -26,12 +26,12 @@ theorem clear_clear: (CSort n) c2)).(clear_gen_sort c2 n H (clear c2 c2))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).((clear c c2) \to (clear c2 c2))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (H0: (clear -(CHead c k t) c2)).((match k in K return (\lambda (k0: K).((clear (CHead c k0 -t) c2) \to (clear c2 c2))) with [(Bind b) \Rightarrow (\lambda (H1: (clear -(CHead c (Bind b) t) c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: -C).(clear c0 c0)) (clear_bind b c t) c2 (clear_gen_bind b c c2 t H1))) | -(Flat f) \Rightarrow (\lambda (H1: (clear (CHead c (Flat f) t) c2)).(H c2 -(clear_gen_flat f c c2 t H1)))]) H0))))))) c1). +(CHead c k t) c2)).(K_ind (\lambda (k0: K).((clear (CHead c k0 t) c2) \to +(clear c2 c2))) (\lambda (b: B).(\lambda (H1: (clear (CHead c (Bind b) t) +c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: C).(clear c0 c0)) +(clear_bind b c t) c2 (clear_gen_bind b c c2 t H1)))) (\lambda (f: +F).(\lambda (H1: (clear (CHead c (Flat f) t) c2)).(H c2 (clear_gen_flat f c +c2 t H1)))) k H0))))))) c1). theorem clear_mono: \forall (c: C).(\forall (c1: C).((clear c c1) \to (\forall (c2: C).((clear c @@ -44,17 +44,16 @@ C).(\lambda (H0: (clear (CSort n) c2)).(clear_gen_sort c2 n H0 (eq C c1 c2))))))) (\lambda (c0: C).(\lambda (H: ((\forall (c1: C).((clear c0 c1) \to (\forall (c2: C).((clear c0 c2) \to (eq C c1 c2))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c1: C).(\lambda (H0: (clear (CHead c0 k t) -c1)).(\lambda (c2: C).(\lambda (H1: (clear (CHead c0 k t) c2)).((match k in K -return (\lambda (k0: K).((clear (CHead c0 k0 t) c1) \to ((clear (CHead c0 k0 -t) c2) \to (eq C c1 c2)))) with [(Bind b) \Rightarrow (\lambda (H2: (clear -(CHead c0 (Bind b) t) c1)).(\lambda (H3: (clear (CHead c0 (Bind b) t) -c2)).(eq_ind_r C (CHead c0 (Bind b) t) (\lambda (c3: C).(eq C c1 c3)) -(eq_ind_r C (CHead c0 (Bind b) t) (\lambda (c3: C).(eq C c3 (CHead c0 (Bind -b) t))) (refl_equal C (CHead c0 (Bind b) t)) c1 (clear_gen_bind b c0 c1 t -H2)) c2 (clear_gen_bind b c0 c2 t H3)))) | (Flat f) \Rightarrow (\lambda (H2: -(clear (CHead c0 (Flat f) t) c1)).(\lambda (H3: (clear (CHead c0 (Flat f) t) -c2)).(H c1 (clear_gen_flat f c0 c1 t H2) c2 (clear_gen_flat f c0 c2 t -H3))))]) H0 H1))))))))) c). +c1)).(\lambda (c2: C).(\lambda (H1: (clear (CHead c0 k t) c2)).(K_ind +(\lambda (k0: K).((clear (CHead c0 k0 t) c1) \to ((clear (CHead c0 k0 t) c2) +\to (eq C c1 c2)))) (\lambda (b: B).(\lambda (H2: (clear (CHead c0 (Bind b) +t) c1)).(\lambda (H3: (clear (CHead c0 (Bind b) t) c2)).(eq_ind_r C (CHead c0 +(Bind b) t) (\lambda (c3: C).(eq C c1 c3)) (eq_ind_r C (CHead c0 (Bind b) t) +(\lambda (c3: C).(eq C c3 (CHead c0 (Bind b) t))) (refl_equal C (CHead c0 +(Bind b) t)) c1 (clear_gen_bind b c0 c1 t H2)) c2 (clear_gen_bind b c0 c2 t +H3))))) (\lambda (f: F).(\lambda (H2: (clear (CHead c0 (Flat f) t) +c1)).(\lambda (H3: (clear (CHead c0 (Flat f) t) c2)).(H c1 (clear_gen_flat f +c0 c1 t H2) c2 (clear_gen_flat f c0 c2 t H3))))) k H0 H1))))))))) c). theorem clear_trans: \forall (c1: C).(\forall (c: C).((clear c1 c) \to (\forall (c2: C).((clear c @@ -67,15 +66,14 @@ C).(\lambda (_: (clear c c2)).(clear_gen_sort c n H (clear (CSort n) c2))))))) (\lambda (c: C).(\lambda (H: ((\forall (c0: C).((clear c c0) \to (\forall (c2: C).((clear c0 c2) \to (clear c c2))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c0: C).(\lambda (H0: (clear (CHead c k t) -c0)).(\lambda (c2: C).(\lambda (H1: (clear c0 c2)).((match k in K return -(\lambda (k0: K).((clear (CHead c k0 t) c0) \to (clear (CHead c k0 t) c2))) -with [(Bind b) \Rightarrow (\lambda (H2: (clear (CHead c (Bind b) t) -c0)).(let H3 \def (eq_ind C c0 (\lambda (c: C).(clear c c2)) H1 (CHead c -(Bind b) t) (clear_gen_bind b c c0 t H2)) in (eq_ind_r C (CHead c (Bind b) t) -(\lambda (c3: C).(clear (CHead c (Bind b) t) c3)) (clear_bind b c t) c2 -(clear_gen_bind b c c2 t H3)))) | (Flat f) \Rightarrow (\lambda (H2: (clear -(CHead c (Flat f) t) c0)).(clear_flat c c2 (H c0 (clear_gen_flat f c c0 t H2) -c2 H1) f t))]) H0))))))))) c1). +c0)).(\lambda (c2: C).(\lambda (H1: (clear c0 c2)).(K_ind (\lambda (k0: +K).((clear (CHead c k0 t) c0) \to (clear (CHead c k0 t) c2))) (\lambda (b: +B).(\lambda (H2: (clear (CHead c (Bind b) t) c0)).(let H3 \def (eq_ind C c0 +(\lambda (c3: C).(clear c3 c2)) H1 (CHead c (Bind b) t) (clear_gen_bind b c +c0 t H2)) in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(clear (CHead +c (Bind b) t) c3)) (clear_bind b c t) c2 (clear_gen_bind b c c2 t H3))))) +(\lambda (f: F).(\lambda (H2: (clear (CHead c (Flat f) t) c0)).(clear_flat c +c2 (H c0 (clear_gen_flat f c c0 t H2) c2 H1) f t))) k H0))))))))) c1). theorem clear_ctail: \forall (b: B).(\forall (c1: C).(\forall (c2: C).(\forall (u2: T).((clear c1 @@ -87,41 +85,40 @@ C).(\forall (u2: T).((clear c (CHead c2 (Bind b) u2)) \to (\forall (k: K).(\forall (u1: T).(clear (CTail k u1 c) (CHead (CTail k u1 c2) (Bind b) u2)))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (u2: T).(\lambda (H: (clear (CSort n) (CHead c2 (Bind b) u2))).(\lambda (k: K).(\lambda (u1: -T).(match k in K return (\lambda (k0: K).(clear (CHead (CSort n) k0 u1) -(CHead (CTail k0 u1 c2) (Bind b) u2))) with [(Bind b0) \Rightarrow -(clear_gen_sort (CHead c2 (Bind b) u2) n H (clear (CHead (CSort n) (Bind b0) -u1) (CHead (CTail (Bind b0) u1 c2) (Bind b) u2))) | (Flat f) \Rightarrow -(clear_gen_sort (CHead c2 (Bind b) u2) n H (clear (CHead (CSort n) (Flat f) -u1) (CHead (CTail (Flat f) u1 c2) (Bind b) u2)))]))))))) (\lambda (c: -C).(\lambda (H: ((\forall (c2: C).(\forall (u2: T).((clear c (CHead c2 (Bind -b) u2)) \to (\forall (k: K).(\forall (u1: T).(clear (CTail k u1 c) (CHead -(CTail k u1 c2) (Bind b) u2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda -(c2: C).(\lambda (u2: T).(\lambda (H0: (clear (CHead c k t) (CHead c2 (Bind -b) u2))).(\lambda (k0: K).(\lambda (u1: T).((match k in K return (\lambda -(k1: K).((clear (CHead c k1 t) (CHead c2 (Bind b) u2)) \to (clear (CHead -(CTail k0 u1 c) k1 t) (CHead (CTail k0 u1 c2) (Bind b) u2)))) with [(Bind b0) -\Rightarrow (\lambda (H1: (clear (CHead c (Bind b0) t) (CHead c2 (Bind b) -u2))).(let H2 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda -(_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) -(CHead c2 (Bind b) u2) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 -(Bind b) u2) t H1)) in ((let H3 \def (f_equal C B (\lambda (e: C).(match e in -C return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) -\Rightarrow (match k in K return (\lambda (_: K).B) with [(Bind b) -\Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead c -(Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in ((let H4 -\def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) -with [(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 +T).(K_ind (\lambda (k0: K).(clear (CHead (CSort n) k0 u1) (CHead (CTail k0 u1 +c2) (Bind b) u2))) (\lambda (b0: B).(clear_gen_sort (CHead c2 (Bind b) u2) n +H (clear (CHead (CSort n) (Bind b0) u1) (CHead (CTail (Bind b0) u1 c2) (Bind +b) u2)))) (\lambda (f: F).(clear_gen_sort (CHead c2 (Bind b) u2) n H (clear +(CHead (CSort n) (Flat f) u1) (CHead (CTail (Flat f) u1 c2) (Bind b) u2)))) +k))))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (u2: +T).((clear c (CHead c2 (Bind b) u2)) \to (\forall (k: K).(\forall (u1: +T).(clear (CTail k u1 c) (CHead (CTail k u1 c2) (Bind b) u2))))))))).(\lambda +(k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (u2: T).(\lambda (H0: (clear +(CHead c k t) (CHead c2 (Bind b) u2))).(\lambda (k0: K).(\lambda (u1: +T).(K_ind (\lambda (k1: K).((clear (CHead c k1 t) (CHead c2 (Bind b) u2)) \to +(clear (CHead (CTail k0 u1 c) k1 t) (CHead (CTail k0 u1 c2) (Bind b) u2)))) +(\lambda (b0: B).(\lambda (H1: (clear (CHead c (Bind b0) t) (CHead c2 (Bind +b) u2))).(let H2 \def (f_equal C C (\lambda (e: C).(match e in C return +(\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c0 _ _) +\Rightarrow c0])) (CHead c2 (Bind b) u2) (CHead c (Bind b0) t) +(clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in ((let H3 \def (f_equal +C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with [(CSort _) +\Rightarrow b | (CHead _ k1 _) \Rightarrow (match k1 in K return (\lambda (_: +K).B) with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) -u2) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C c2 c)).(eq_ind_r -T t (\lambda (t0: T).(clear (CHead (CTail k0 u1 c) (Bind b0) t) (CHead (CTail -k0 u1 c2) (Bind b) t0))) (eq_ind_r C c (\lambda (c0: C).(clear (CHead (CTail -k0 u1 c) (Bind b0) t) (CHead (CTail k0 u1 c0) (Bind b) t))) (eq_ind B b -(\lambda (b1: B).(clear (CHead (CTail k0 u1 c) (Bind b1) t) (CHead (CTail k0 -u1 c) (Bind b) t))) (clear_bind b (CTail k0 u1 c) t) b0 H5) c2 H6) u2 H4)))) -H3)) H2))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead c (Flat f) t) -(CHead c2 (Bind b) u2))).(clear_flat (CTail k0 u1 c) (CHead (CTail k0 u1 c2) -(Bind b) u2) (H c2 u2 (clear_gen_flat f c (CHead c2 (Bind b) u2) t H1) k0 u1) -f t))]) H0)))))))))) c1)). +u2) t H1)) in ((let H4 \def (f_equal C T (\lambda (e: C).(match e in C return +(\lambda (_: C).T) with [(CSort _) \Rightarrow u2 | (CHead _ _ t0) +\Rightarrow t0])) (CHead c2 (Bind b) u2) (CHead c (Bind b0) t) +(clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in (\lambda (H5: (eq B b +b0)).(\lambda (H6: (eq C c2 c)).(eq_ind_r T t (\lambda (t0: T).(clear (CHead +(CTail k0 u1 c) (Bind b0) t) (CHead (CTail k0 u1 c2) (Bind b) t0))) (eq_ind_r +C c (\lambda (c0: C).(clear (CHead (CTail k0 u1 c) (Bind b0) t) (CHead (CTail +k0 u1 c0) (Bind b) t))) (eq_ind B b (\lambda (b1: B).(clear (CHead (CTail k0 +u1 c) (Bind b1) t) (CHead (CTail k0 u1 c) (Bind b) t))) (clear_bind b (CTail +k0 u1 c) t) b0 H5) c2 H6) u2 H4)))) H3)) H2)))) (\lambda (f: F).(\lambda (H1: +(clear (CHead c (Flat f) t) (CHead c2 (Bind b) u2))).(clear_flat (CTail k0 u1 +c) (CHead (CTail k0 u1 c2) (Bind b) u2) (H c2 u2 (clear_gen_flat f c (CHead +c2 (Bind b) u2) t H1) k0 u1) f t))) k H0)))))))))) c1)). theorem clear_cle: \forall (c1: C).(\forall (c2: C).((clear c1 c2) \to (cle c2 c1))) @@ -131,14 +128,13 @@ theorem clear_cle: (H: (clear (CSort n) c2)).(clear_gen_sort c2 n H (le (cweight c2) O))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).((clear c c2) \to (le (cweight c2) (cweight c)))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: -C).(\lambda (H0: (clear (CHead c k t) c2)).((match k in K return (\lambda -(k0: K).((clear (CHead c k0 t) c2) \to (le (cweight c2) (plus (cweight c) -(tweight t))))) with [(Bind b) \Rightarrow (\lambda (H1: (clear (CHead c -(Bind b) t) c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: C).(le -(cweight c0) (plus (cweight c) (tweight t)))) (le_n (plus (cweight c) -(tweight t))) c2 (clear_gen_bind b c c2 t H1))) | (Flat f) \Rightarrow -(\lambda (H1: (clear (CHead c (Flat f) t) c2)).(le_S_n (cweight c2) (plus -(cweight c) (tweight t)) (le_n_S (cweight c2) (plus (cweight c) (tweight t)) -(le_plus_trans (cweight c2) (cweight c) (tweight t) (H c2 (clear_gen_flat f c -c2 t H1))))))]) H0))))))) c1). +C).(\lambda (H0: (clear (CHead c k t) c2)).(K_ind (\lambda (k0: K).((clear +(CHead c k0 t) c2) \to (le (cweight c2) (plus (cweight c) (tweight t))))) +(\lambda (b: B).(\lambda (H1: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C +(CHead c (Bind b) t) (\lambda (c0: C).(le (cweight c0) (plus (cweight c) +(tweight t)))) (le_n (plus (cweight c) (tweight t))) c2 (clear_gen_bind b c +c2 t H1)))) (\lambda (f: F).(\lambda (H1: (clear (CHead c (Flat f) t) +c2)).(le_S_n (cweight c2) (plus (cweight c) (tweight t)) (le_n_S (cweight c2) +(plus (cweight c) (tweight t)) (le_plus_trans (cweight c2) (cweight c) +(tweight t) (H c2 (clear_gen_flat f c c2 t H1))))))) k H0))))))) c1). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clen/getl.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clen/getl.ma index 2e027fe83..d84bcf799 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clen/getl.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/clen/getl.ma @@ -34,16 +34,15 @@ K).(\lambda (t0: T).(let H0 \def H in (ex_ind nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort n) (Bind b) t))) (ex nat (\lambda (n: nat).(getl (s k (clen c0)) (CHead (CTail (Bind b) t c0) k t0) (CHead (CSort n) (Bind b) t)))) (\lambda (x: nat).(\lambda (H1: (getl (clen -c0) (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t))).(match k in K return -(\lambda (k0: K).(ex nat (\lambda (n: nat).(getl (s k0 (clen c0)) (CHead -(CTail (Bind b) t c0) k0 t0) (CHead (CSort n) (Bind b) t))))) with [(Bind b0) -\Rightarrow (ex_intro nat (\lambda (n: nat).(getl (S (clen c0)) (CHead (CTail -(Bind b) t c0) (Bind b0) t0) (CHead (CSort n) (Bind b) t))) x (getl_head -(Bind b0) (clen c0) (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t) H1 -t0)) | (Flat f) \Rightarrow (ex_intro nat (\lambda (n: nat).(getl (clen c0) -(CHead (CTail (Bind b) t c0) (Flat f) t0) (CHead (CSort n) (Bind b) t))) x -(getl_flat (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t) (clen c0) H1 f -t0))]))) H0)))))) c))). +c0) (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t))).(K_ind (\lambda (k0: +K).(ex nat (\lambda (n: nat).(getl (s k0 (clen c0)) (CHead (CTail (Bind b) t +c0) k0 t0) (CHead (CSort n) (Bind b) t))))) (\lambda (b0: B).(ex_intro nat +(\lambda (n: nat).(getl (S (clen c0)) (CHead (CTail (Bind b) t c0) (Bind b0) +t0) (CHead (CSort n) (Bind b) t))) x (getl_head (Bind b0) (clen c0) (CTail +(Bind b) t c0) (CHead (CSort x) (Bind b) t) H1 t0))) (\lambda (f: +F).(ex_intro nat (\lambda (n: nat).(getl (clen c0) (CHead (CTail (Bind b) t +c0) (Flat f) t0) (CHead (CSort n) (Bind b) t))) x (getl_flat (CTail (Bind b) +t c0) (CHead (CSort x) (Bind b) t) (clen c0) H1 f t0))) k))) H0)))))) c))). theorem getl_gen_tail: \forall (k: K).(\forall (b: B).(\forall (u1: T).(\forall (u2: T).(\forall @@ -59,210 +58,224 @@ nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))))))))) c2 (CTail k u1 e))) (\lambda (e: C).(getl i c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort -n)))))))) (\lambda (n: nat).(\lambda (i: nat).(match i in nat return (\lambda -(n0: nat).((getl n0 (CTail k u1 (CSort n)) (CHead c2 (Bind b) u2)) \to (or -(ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n0 -(CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n0 -(clen (CSort n)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq -T u1 u2)) (\lambda (n1: nat).(eq C c2 (CSort n1))))))) with [O \Rightarrow -(\lambda (H: (getl O (CHead (CSort n) k u1) (CHead c2 (Bind b) u2))).((match -k in K return (\lambda (k0: K).((clear (CHead (CSort n) k0 u1) (CHead c2 -(Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k0 u1 e))) -(\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda -(_: nat).(eq nat O O)) (\lambda (_: nat).(eq K k0 (Bind b))) (\lambda (_: -nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))))) with [(Bind -b0) \Rightarrow (\lambda (H0: (clear (CHead (CSort n) (Bind b0) u1) (CHead c2 -(Bind b) u2))).(let H1 \def (f_equal C C (\lambda (e: C).(match e in C return -(\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow -c])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) (clear_gen_bind b0 -(CSort n) (CHead c2 (Bind b) u2) u1 H0)) in ((let H2 \def (f_equal C B -(\lambda (e: C).(match e in C return (\lambda (_: C).B) with [(CSort _) -\Rightarrow b | (CHead _ k _) \Rightarrow (match k in K return (\lambda (_: -K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 +n)))))))) (\lambda (n: nat).(\lambda (i: nat).(nat_ind (\lambda (n0: +nat).((getl n0 (CTail k u1 (CSort n)) (CHead c2 (Bind b) u2)) \to (or (ex2 C +(\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n0 (CSort n) +(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n0 (clen (CSort +n)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) +(\lambda (n1: nat).(eq C c2 (CSort n1))))))) (\lambda (H: (getl O (CHead +(CSort n) k u1) (CHead c2 (Bind b) u2))).(K_ind (\lambda (k0: K).((clear +(CHead (CSort n) k0 u1) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: +C).(eq C c2 (CTail k0 u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e +(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: +nat).(eq K k0 (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: +nat).(eq C c2 (CSort n0))))))) (\lambda (b0: B).(\lambda (H0: (clear (CHead +(CSort n) (Bind b0) u1) (CHead c2 (Bind b) u2))).(let H1 \def (f_equal C C +(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind b) u2) (CHead +(CSort n) (Bind b0) u1) (clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) +u1 H0)) in ((let H2 \def (f_equal C B (\lambda (e: C).(match e in C return +(\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k0 _) \Rightarrow +(match k0 in K return (\lambda (_: K).B) with [(Bind b1) \Rightarrow b1 | +(Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) +u1) (clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in ((let H3 +\def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) +with [(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) (clear_gen_bind b0 (CSort n) -(CHead c2 (Bind b) u2) u1 H0)) in ((let H3 \def (f_equal C T (\lambda (e: -C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u2 | -(CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind -b0) u1) (clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in -(\lambda (H4: (eq B b b0)).(\lambda (H5: (eq C c2 (CSort n))).(eq_ind_r C -(CSort n) (\lambda (c: C).(or (ex2 C (\lambda (e: C).(eq C c (CTail (Bind b0) -u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat -(\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b))) -(\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c (CSort n0)))))) -(eq_ind_r T u1 (\lambda (t: T).(or (ex2 C (\lambda (e: C).(eq C (CSort n) -(CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) -t)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind -b0) (Bind b))) (\lambda (_: nat).(eq T u1 t)) (\lambda (n0: nat).(eq C (CSort -n) (CSort n0)))))) (eq_ind_r B b0 (\lambda (b1: B).(or (ex2 C (\lambda (e: -C).(eq C (CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) -(CHead e (Bind b1) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda -(_: nat).(eq K (Bind b0) (Bind b1))) (\lambda (_: nat).(eq T u1 u1)) (\lambda -(n0: nat).(eq C (CSort n) (CSort n0)))))) (or_intror (ex2 C (\lambda (e: -C).(eq C (CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) -(CHead e (Bind b0) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda -(_: nat).(eq K (Bind b0) (Bind b0))) (\lambda (_: nat).(eq T u1 u1)) (\lambda -(n0: nat).(eq C (CSort n) (CSort n0)))) (ex4_intro nat (\lambda (_: nat).(eq -nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b0))) (\lambda (_: nat).(eq -T u1 u1)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0))) n (refl_equal nat -O) (refl_equal K (Bind b0)) (refl_equal T u1) (refl_equal C (CSort n)))) b -H4) u2 H3) c2 H5)))) H2)) H1))) | (Flat f) \Rightarrow (\lambda (H0: (clear -(CHead (CSort n) (Flat f) u1) (CHead c2 (Bind b) u2))).(clear_gen_sort (CHead -c2 (Bind b) u2) n (clear_gen_flat f (CSort n) (CHead c2 (Bind b) u2) u1 H0) -(or (ex2 C (\lambda (e: C).(eq C c2 (CTail (Flat f) u1 e))) (\lambda (e: -C).(getl O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq -nat O O)) (\lambda (_: nat).(eq K (Flat f) (Bind b))) (\lambda (_: nat).(eq T -u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0)))))))]) (getl_gen_O (CHead -(CSort n) k u1) (CHead c2 (Bind b) u2) H))) | (S n0) \Rightarrow (\lambda (H: -(getl (S n0) (CHead (CSort n) k u1) (CHead c2 (Bind b) u2))).(getl_gen_sort n -(r k n0) (CHead c2 (Bind b) u2) (getl_gen_S k (CSort n) (CHead c2 (Bind b) -u2) u1 n0 H) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda -(e: C).(getl (S n0) (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: -nat).(eq nat (S n0) O)) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: -nat).(eq T u1 u2)) (\lambda (n1: nat).(eq C c2 (CSort n1)))))))]))) (\lambda -(c: C).(\lambda (H: ((\forall (i: nat).((getl i (CTail k u1 c) (CHead c2 +(CHead c2 (Bind b) u2) u1 H0)) in (\lambda (H4: (eq B b b0)).(\lambda (H5: +(eq C c2 (CSort n))).(eq_ind_r C (CSort n) (\lambda (c: C).(or (ex2 C +(\lambda (e: C).(eq C c (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O +(CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) +(\lambda (_: nat).(eq K (Bind b0) (Bind b))) (\lambda (_: nat).(eq T u1 u2)) +(\lambda (n0: nat).(eq C c (CSort n0)))))) (eq_ind_r T u1 (\lambda (t: T).(or +(ex2 C (\lambda (e: C).(eq C (CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: +C).(getl O (CSort n) (CHead e (Bind b) t)))) (ex4 nat (\lambda (_: nat).(eq +nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b))) (\lambda (_: nat).(eq +T u1 t)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0)))))) (eq_ind_r B b0 +(\lambda (b1: B).(or (ex2 C (\lambda (e: C).(eq C (CSort n) (CTail (Bind b0) +u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b1) u1)))) (ex4 nat +(\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b1))) +(\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort n) (CSort +n0)))))) (or_intror (ex2 C (\lambda (e: C).(eq C (CSort n) (CTail (Bind b0) +u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b0) u1)))) (ex4 nat +(\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b0))) +(\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort n) (CSort +n0)))) (ex4_intro nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K +(Bind b0) (Bind b0))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq +C (CSort n) (CSort n0))) n (refl_equal nat O) (refl_equal K (Bind b0)) +(refl_equal T u1) (refl_equal C (CSort n)))) b H4) u2 H3) c2 H5)))) H2)) +H1)))) (\lambda (f: F).(\lambda (H0: (clear (CHead (CSort n) (Flat f) u1) +(CHead c2 (Bind b) u2))).(clear_gen_sort (CHead c2 (Bind b) u2) n +(clear_gen_flat f (CSort n) (CHead c2 (Bind b) u2) u1 H0) (or (ex2 C (\lambda +(e: C).(eq C c2 (CTail (Flat f) u1 e))) (\lambda (e: C).(getl O (CSort n) +(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda +(_: nat).(eq K (Flat f) (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda +(n0: nat).(eq C c2 (CSort n0)))))))) k (getl_gen_O (CHead (CSort n) k u1) +(CHead c2 (Bind b) u2) H))) (\lambda (n0: nat).(\lambda (_: (((getl n0 (CHead +(CSort n) k u1) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C +c2 (CTail k u1 e))) (\lambda (e: C).(getl n0 (CSort n) (CHead e (Bind b) +u2)))) (ex4 nat (\lambda (_: nat).(eq nat n0 O)) (\lambda (_: nat).(eq K k +(Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n1: nat).(eq C c2 (CSort +n1)))))))).(\lambda (H0: (getl (S n0) (CHead (CSort n) k u1) (CHead c2 (Bind +b) u2))).(getl_gen_sort n (r k n0) (CHead c2 (Bind b) u2) (getl_gen_S k +(CSort n) (CHead c2 (Bind b) u2) u1 n0 H0) (or (ex2 C (\lambda (e: C).(eq C +c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n0) (CSort n) (CHead e (Bind b) +u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n0) O)) (\lambda (_: nat).(eq K +k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n1: nat).(eq C c2 +(CSort n1))))))))) i))) (\lambda (c: C).(\lambda (H: ((\forall (i: +nat).((getl i (CTail k u1 c) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda +(e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl i c (CHead e (Bind b) +u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) (\lambda (_: nat).(eq +K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 +(CSort n))))))))).(\lambda (k0: K).(\lambda (t: T).(\lambda (i: nat).(nat_ind +(\lambda (n: nat).((getl n (CTail k u1 (CHead c k0 t)) (CHead c2 (Bind b) +u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: +C).(getl n (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: +nat).(eq nat n (clen (CHead c k0 t)))) (\lambda (_: nat).(eq K k (Bind b))) +(\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))))) +(\lambda (H0: (getl O (CHead (CTail k u1 c) k0 t) (CHead c2 (Bind b) +u2))).(K_ind (\lambda (k1: K).((clear (CHead (CTail k u1 c) k1 t) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) -(\lambda (e: C).(getl i c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: -nat).(eq nat i (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: -nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))))))).(\lambda (k0: -K).(\lambda (t: T).(\lambda (i: nat).(match i in nat return (\lambda (n: -nat).((getl n (CTail k u1 (CHead c k0 t)) (CHead c2 (Bind b) u2)) \to (or -(ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n -(CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n -(clen (CHead c k0 t)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: -nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))))) with [O -\Rightarrow (\lambda (H0: (getl O (CHead (CTail k u1 c) k0 t) (CHead c2 (Bind -b) u2))).((match k0 in K return (\lambda (k1: K).((clear (CHead (CTail k u1 -c) k1 t) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 -(CTail k u1 e))) (\lambda (e: C).(getl O (CHead c k1 t) (CHead e (Bind b) -u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s k1 (clen c)))) (\lambda (_: +(\lambda (e: C).(getl O (CHead c k1 t) (CHead e (Bind b) u2)))) (ex4 nat +(\lambda (_: nat).(eq nat O (s k1 (clen c)))) (\lambda (_: nat).(eq K k (Bind +b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort +n))))))) (\lambda (b0: B).(\lambda (H1: (clear (CHead (CTail k u1 c) (Bind +b0) t) (CHead c2 (Bind b) u2))).(let H2 \def (f_equal C C (\lambda (e: +C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | +(CHead c0 _ _) \Rightarrow c0])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) +(Bind b0) t) (clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) +in ((let H3 \def (f_equal C B (\lambda (e: C).(match e in C return (\lambda +(_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k1 _) \Rightarrow (match +k1 in K return (\lambda (_: K).B) with [(Bind b1) \Rightarrow b1 | (Flat _) +\Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) +(clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in ((let H4 +\def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) +with [(CSort _) \Rightarrow u2 | (CHead _ _ t0) \Rightarrow t0])) (CHead c2 +(Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) (clear_gen_bind b0 (CTail k +u1 c) (CHead c2 (Bind b) u2) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda +(H6: (eq C c2 (CTail k u1 c))).(eq_ind T u2 (\lambda (t0: T).(or (ex2 C +(\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c +(Bind b0) t0) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O +(s (Bind b0) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: +nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))) (eq_ind B b +(\lambda (b1: B).(or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) +(\lambda (e: C).(getl O (CHead c (Bind b1) u2) (CHead e (Bind b) u2)))) (ex4 +nat (\lambda (_: nat).(eq nat O (s (Bind b1) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq -C c2 (CSort n))))))) with [(Bind b0) \Rightarrow (\lambda (H1: (clear (CHead -(CTail k u1 c) (Bind b0) t) (CHead c2 (Bind b) u2))).(let H2 \def (f_equal C -C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) -\Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind b) u2) (CHead -(CTail k u1 c) (Bind b0) t) (clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind -b) u2) t H1)) in ((let H3 \def (f_equal C B (\lambda (e: C).(match e in C -return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) -\Rightarrow (match k in K return (\lambda (_: K).B) with [(Bind b) -\Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead -(CTail k u1 c) (Bind b0) t) (clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind -b) u2) t H1)) in ((let H4 \def (f_equal C T (\lambda (e: C).(match e in C -return (\lambda (_: C).T) with [(CSort _) \Rightarrow u2 | (CHead _ _ t) -\Rightarrow t])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) -(clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in (\lambda -(H5: (eq B b b0)).(\lambda (H6: (eq C c2 (CTail k u1 c))).(eq_ind T u2 -(\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) -(\lambda (e: C).(getl O (CHead c (Bind b0) t0) (CHead e (Bind b) u2)))) (ex4 -nat (\lambda (_: nat).(eq nat O (s (Bind b0) (clen c)))) (\lambda (_: +C c2 (CSort n)))))) (let H7 \def (eq_ind C c2 (\lambda (c0: C).(\forall (i0: +nat).((getl i0 (CTail k u1 c) (CHead c0 (Bind b) u2)) \to (or (ex2 C (\lambda +(e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl i0 c (CHead e (Bind b) +u2)))) (ex4 nat (\lambda (_: nat).(eq nat i0 (clen c))) (\lambda (_: nat).(eq +K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 +(CSort n)))))))) H (CTail k u1 c) H6) in (eq_ind_r C (CTail k u1 c) (\lambda +(c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: +C).(getl O (CHead c (Bind b) u2) (CHead e (Bind b) u2)))) (ex4 nat (\lambda +(_: nat).(eq nat O (s (Bind b) (clen c)))) (\lambda (_: nat).(eq K k (Bind +b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort +n)))))) (or_introl (ex2 C (\lambda (e: C).(eq C (CTail k u1 c) (CTail k u1 +e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) (CHead e (Bind b) u2)))) +(ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq -C c2 (CSort n)))))) (eq_ind B b (\lambda (b1: B).(or (ex2 C (\lambda (e: -C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b1) u2) -(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b1) -(clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 -u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))) (let H7 \def (eq_ind C c2 -(\lambda (c0: C).(\forall (i: nat).((getl i (CTail k u1 c) (CHead c0 (Bind b) -u2)) \to (or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: -C).(getl i c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i -(clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 -u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))))) H (CTail k u1 c) H6) in -(eq_ind_r C (CTail k u1 c) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C -c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) (CHead e -(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b) (clen c)))) +C (CTail k u1 c) (CSort n)))) (ex_intro2 C (\lambda (e: C).(eq C (CTail k u1 +c) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) (CHead e +(Bind b) u2))) c (refl_equal C (CTail k u1 c)) (getl_refl b c u2))) c2 H6)) +b0 H5) t H4)))) H3)) H2)))) (\lambda (f: F).(\lambda (H1: (clear (CHead +(CTail k u1 c) (Flat f) t) (CHead c2 (Bind b) u2))).(let H2 \def (H O +(getl_intro O (CTail k u1 c) (CHead c2 (Bind b) u2) (CTail k u1 c) (drop_refl +(CTail k u1 c)) (clear_gen_flat f (CTail k u1 c) (CHead c2 (Bind b) u2) t +H1))) in (or_ind (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda +(e: C).(getl O c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat +O (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 +u2)) (\lambda (n: nat).(eq C c2 (CSort n)))) (or (ex2 C (\lambda (e: C).(eq C +c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e +(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda -(n: nat).(eq C c0 (CSort n)))))) (or_introl (ex2 C (\lambda (e: C).(eq C -(CTail k u1 c) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) -(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b) -(clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 -u2)) (\lambda (n: nat).(eq C (CTail k u1 c) (CSort n)))) (ex_intro2 C -(\lambda (e: C).(eq C (CTail k u1 c) (CTail k u1 e))) (\lambda (e: C).(getl O -(CHead c (Bind b) u2) (CHead e (Bind b) u2))) c (refl_equal C (CTail k u1 c)) -(getl_refl b c u2))) c2 H6)) b0 H5) t H4)))) H3)) H2))) | (Flat f) -\Rightarrow (\lambda (H1: (clear (CHead (CTail k u1 c) (Flat f) t) (CHead c2 -(Bind b) u2))).(let H2 \def (H O (getl_intro O (CTail k u1 c) (CHead c2 (Bind -b) u2) (CTail k u1 c) (drop_refl (CTail k u1 c)) (clear_gen_flat f (CTail k -u1 c) (CHead c2 (Bind b) u2) t H1))) in (or_ind (ex2 C (\lambda (e: C).(eq C -c2 (CTail k u1 e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2)))) (ex4 -nat (\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: nat).(eq K k (Bind -b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))) -(or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O +(n: nat).(eq C c2 (CSort n))))) (\lambda (H3: (ex2 C (\lambda (e: C).(eq C c2 +(CTail k u1 e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2))))).(ex2_ind +C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O c (CHead +e (Bind b) u2))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) +(\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 +nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq +K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 +(CSort n))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CTail k u1 +x))).(\lambda (H5: (getl O c (CHead x (Bind b) u2))).(eq_ind_r C (CTail k u1 +x) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) +(\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 +nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq +K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 +(CSort n)))))) (or_introl (ex2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail +k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) +u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda +(_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: +nat).(eq C (CTail k u1 x) (CSort n)))) (ex_intro2 C (\lambda (e: C).(eq C +(CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) +(CHead e (Bind b) u2))) x (refl_equal C (CTail k u1 x)) (getl_flat c (CHead x +(Bind b) u2) O H5 f t))) c2 H4)))) H3)) (\lambda (H3: (ex4 nat (\lambda (_: +nat).(eq nat O (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: +nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))).(ex4_ind nat +(\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: nat).(eq K k (Bind b))) +(\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))) (or +(ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda -(_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (H3: -(ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O c -(CHead e (Bind b) u2))))).(ex2_ind C (\lambda (e: C).(eq C c2 (CTail k u1 -e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2))) (or (ex2 C (\lambda -(e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) -(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) -(clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 -u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (x: C).(\lambda (H4: -(eq C c2 (CTail k u1 x))).(\lambda (H5: (getl O c (CHead x (Bind b) -u2))).(eq_ind_r C (CTail k u1 x) (\lambda (c0: C).(or (ex2 C (\lambda (e: -C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) -(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) -(clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 -u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (or_introl (ex2 C (\lambda (e: -C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c -(Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s -(Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: -nat).(eq T u1 u2)) (\lambda (n: nat).(eq C (CTail k u1 x) (CSort n)))) -(ex_intro2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda -(e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2))) x (refl_equal C -(CTail k u1 x)) (getl_flat c (CHead x (Bind b) u2) O H5 f t))) c2 H4)))) H3)) -(\lambda (H3: (ex4 nat (\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: -nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq -C c2 (CSort n))))).(ex4_ind nat (\lambda (_: nat).(eq nat O (clen c))) +(_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (x0: +nat).(\lambda (H4: (eq nat O (clen c))).(\lambda (H5: (eq K k (Bind +b))).(\lambda (H6: (eq T u1 u2)).(\lambda (H7: (eq C c2 (CSort +x0))).(eq_ind_r C (CSort x0) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq +C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e +(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda -(n: nat).(eq C c2 (CSort n))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 -e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) -(ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: -nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq -C c2 (CSort n))))) (\lambda (x0: nat).(\lambda (H4: (eq nat O (clen -c))).(\lambda (H5: (eq K k (Bind b))).(\lambda (H6: (eq T u1 u2)).(\lambda -(H7: (eq C c2 (CSort x0))).(eq_ind_r C (CSort x0) (\lambda (c0: C).(or (ex2 C -(\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c -(Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s -(Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: -nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (eq_ind T u1 -(\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k u1 e))) -(\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) t0)))) (ex4 -nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq -K k (Bind b))) (\lambda (_: nat).(eq T u1 t0)) (\lambda (n: nat).(eq C (CSort -x0) (CSort n)))))) (eq_ind_r K (Bind b) (\lambda (k1: K).(or (ex2 C (\lambda -(e: C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: C).(getl O (CHead c -(Flat f) t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O (s -(Flat f) (clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) (\lambda (_: -nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n)))))) -(or_intror (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) -(\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u1)))) (ex4 -nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq -K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n: nat).(eq C -(CSort x0) (CSort n)))) (ex4_intro nat (\lambda (_: nat).(eq nat O (s (Flat -f) (clen c)))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: -nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n))) x0 H4 -(refl_equal K (Bind b)) (refl_equal T u1) (refl_equal C (CSort x0)))) k H5) -u2 H6) c2 H7)))))) H3)) H2)))]) (getl_gen_O (CHead (CTail k u1 c) k0 t) -(CHead c2 (Bind b) u2) H0))) | (S n) \Rightarrow (\lambda (H0: (getl (S n) -(CHead (CTail k u1 c) k0 t) (CHead c2 (Bind b) u2))).(let H_x \def (H (r k0 -n) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind b) u2) t n H0)) in (let H1 -\def H_x in (or_ind (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda -(e: C).(getl (r k0 n) c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: -nat).(eq nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind b))) -(\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0)))) (or -(ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) -(CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S -n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: -nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (H2: -(ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (r k0 -n) c (CHead e (Bind b) u2))))).(ex2_ind C (\lambda (e: C).(eq C c2 (CTail k -u1 e))) (\lambda (e: C).(getl (r k0 n) c (CHead e (Bind b) u2))) (or (ex2 C -(\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead -c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s -k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T -u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (x: C).(\lambda -(H3: (eq C c2 (CTail k u1 x))).(\lambda (H4: (getl (r k0 n) c (CHead x (Bind -b) u2))).(let H5 \def (eq_ind C c2 (\lambda (c0: C).(getl (r k0 n) (CTail k -u1 c) (CHead c0 (Bind b) u2))) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind -b) u2) t n H0) (CTail k u1 x) H3) in (eq_ind_r C (CTail k u1 x) (\lambda (c0: +(n: nat).(eq C c0 (CSort n)))))) (eq_ind T u1 (\lambda (t0: T).(or (ex2 C +(\lambda (e: C).(eq C (CSort x0) (CTail k u1 e))) (\lambda (e: C).(getl O +(CHead c (Flat f) t) (CHead e (Bind b) t0)))) (ex4 nat (\lambda (_: nat).(eq +nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda +(_: nat).(eq T u1 t0)) (\lambda (n: nat).(eq C (CSort x0) (CSort n)))))) +(eq_ind_r K (Bind b) (\lambda (k1: K).(or (ex2 C (\lambda (e: C).(eq C (CSort +x0) (CTail k1 u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e +(Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) +(\lambda (_: nat).(eq K k1 (Bind b))) (\lambda (_: nat).(eq T u1 u1)) +(\lambda (n: nat).(eq C (CSort x0) (CSort n)))))) (or_intror (ex2 C (\lambda +(e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl O +(CHead c (Flat f) t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq +nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) +(\lambda (_: nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort +n)))) (ex4_intro nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) +(\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) +(\lambda (n: nat).(eq C (CSort x0) (CSort n))) x0 H4 (refl_equal K (Bind b)) +(refl_equal T u1) (refl_equal C (CSort x0)))) k H5) u2 H6) c2 H7)))))) H3)) +H2)))) k0 (getl_gen_O (CHead (CTail k u1 c) k0 t) (CHead c2 (Bind b) u2) +H0))) (\lambda (n: nat).(\lambda (H0: (((getl n (CHead (CTail k u1 c) k0 t) +(CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 +e))) (\lambda (e: C).(getl n (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat +(\lambda (_: nat).(eq nat n (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind +b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort +n0)))))))).(\lambda (H1: (getl (S n) (CHead (CTail k u1 c) k0 t) (CHead c2 +(Bind b) u2))).(let H_x \def (H (r k0 n) (getl_gen_S k0 (CTail k u1 c) (CHead +c2 (Bind b) u2) t n H1)) in (let H2 \def H_x in (or_ind (ex2 C (\lambda (e: +C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (r k0 n) c (CHead e (Bind +b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda (_: +nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: +nat).(eq C c2 (CSort n0)))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 +e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 +nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K +k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 +(CSort n0))))) (\lambda (H3: (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) +(\lambda (e: C).(getl (r k0 n) c (CHead e (Bind b) u2))))).(ex2_ind C +(\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (r k0 n) c +(CHead e (Bind b) u2))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) +(\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat +(\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k +(Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort +n0))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CTail k u1 x))).(\lambda (H5: +(getl (r k0 n) c (CHead x (Bind b) u2))).(let H6 \def (eq_ind C c2 (\lambda +(c0: C).(getl (r k0 n) (CTail k u1 c) (CHead c0 (Bind b) u2))) (getl_gen_S k0 +(CTail k u1 c) (CHead c2 (Bind b) u2) t n H1) (CTail k u1 x) H4) in (let H7 +\def (eq_ind C c2 (\lambda (c0: C).((getl n (CHead (CTail k u1 c) k0 t) +(CHead c0 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 +e))) (\lambda (e: C).(getl n (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat +(\lambda (_: nat).(eq nat n (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind +b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c0 (CSort +n0))))))) H0 (CTail k u1 x) H4) in (eq_ind_r C (CTail k u1 x) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: @@ -273,54 +286,72 @@ nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C (CTail k u1 x) (CSort n0)))) (ex_intro2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2))) x -(refl_equal C (CTail k u1 x)) (getl_head k0 n c (CHead x (Bind b) u2) H4 t))) -c2 H3))))) H2)) (\lambda (H2: (ex4 nat (\lambda (_: nat).(eq nat (r k0 n) +(refl_equal C (CTail k u1 x)) (getl_head k0 n c (CHead x (Bind b) u2) H5 t))) +c2 H4)))))) H3)) (\lambda (H3: (ex4 nat (\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 -u2)) (\lambda (n: nat).(eq C c2 (CSort n))))).(ex4_ind nat (\lambda (_: +u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))).(ex4_ind nat (\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (x0: -nat).(\lambda (H3: (eq nat (r k0 n) (clen c))).(\lambda (H4: (eq K k (Bind -b))).(\lambda (H5: (eq T u1 u2)).(\lambda (H6: (eq C c2 (CSort x0))).(let H7 +nat).(\lambda (H4: (eq nat (r k0 n) (clen c))).(\lambda (H5: (eq K k (Bind +b))).(\lambda (H6: (eq T u1 u2)).(\lambda (H7: (eq C c2 (CSort x0))).(let H8 \def (eq_ind C c2 (\lambda (c0: C).(getl (r k0 n) (CTail k u1 c) (CHead c0 -(Bind b) u2))) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind b) u2) t n H0) -(CSort x0) H6) in (eq_ind_r C (CSort x0) (\lambda (c0: C).(or (ex2 C (\lambda -(e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) -(CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen -c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) -(\lambda (n0: nat).(eq C c0 (CSort n0)))))) (let H8 \def (eq_ind_r T u2 -(\lambda (t: T).(getl (r k0 n) (CTail k u1 c) (CHead (CSort x0) (Bind b) t))) -H7 u1 H5) in (eq_ind T u1 (\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C -(CSort x0) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead -e (Bind b) t0)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) -(\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 t0)) (\lambda -(n0: nat).(eq C (CSort x0) (CSort n0)))))) (let H9 \def (eq_ind K k (\lambda -(k: K).(getl (r k0 n) (CTail k u1 c) (CHead (CSort x0) (Bind b) u1))) H8 -(Bind b) H4) in (eq_ind_r K (Bind b) (\lambda (k1: K).(or (ex2 C (\lambda (e: -C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 -t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 -(clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) (\lambda (_: nat).(eq T u1 -u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0)))))) (eq_ind nat (r k0 n) -(\lambda (n0: nat).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind -b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) -u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 n0))) (\lambda (_: -nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n1: -nat).(eq C (CSort x0) (CSort n1)))))) (eq_ind_r nat (S n) (\lambda (n0: -nat).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) -(\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat -(\lambda (_: nat).(eq nat (S n) n0)) (\lambda (_: nat).(eq K (Bind b) (Bind -b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n1: nat).(eq C (CSort x0) -(CSort n1)))))) (or_intror (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail -(Bind b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) -u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (S n))) (\lambda (_: nat).(eq -K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq -C (CSort x0) (CSort n0)))) (ex4_intro nat (\lambda (_: nat).(eq nat (S n) (S -n))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 -u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0))) x0 (refl_equal nat (S -n)) (refl_equal K (Bind b)) (refl_equal T u1) (refl_equal C (CSort x0)))) (s -k0 (r k0 n)) (s_r k0 n)) (clen c) H3) k H4)) u2 H5)) c2 H6))))))) H2)) -H1))))])))))) c1)))))). +(Bind b) u2))) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind b) u2) t n H1) +(CSort x0) H7) in (let H9 \def (eq_ind C c2 (\lambda (c0: C).((getl n (CHead +(CTail k u1 c) k0 t) (CHead c0 (Bind b) u2)) \to (or (ex2 C (\lambda (e: +C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl n (CHead c k0 t) (CHead e +(Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n (s k0 (clen c)))) +(\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda +(n0: nat).(eq C c0 (CSort n0))))))) H0 (CSort x0) H7) in (eq_ind_r C (CSort +x0) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) +(\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat +(\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k +(Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c0 (CSort +n0)))))) (let H10 \def (eq_ind_r T u2 (\lambda (t0: T).((getl n (CHead (CTail +k u1 c) k0 t) (CHead (CSort x0) (Bind b) t0)) \to (or (ex2 C (\lambda (e: +C).(eq C (CSort x0) (CTail k u1 e))) (\lambda (e: C).(getl n (CHead c k0 t) +(CHead e (Bind b) t0)))) (ex4 nat (\lambda (_: nat).(eq nat n (s k0 (clen +c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 t0)) +(\lambda (n0: nat).(eq C (CSort x0) (CSort n0))))))) H9 u1 H6) in (let H11 +\def (eq_ind_r T u2 (\lambda (t0: T).(getl (r k0 n) (CTail k u1 c) (CHead +(CSort x0) (Bind b) t0))) H8 u1 H6) in (eq_ind T u1 (\lambda (t0: T).(or (ex2 +C (\lambda (e: C).(eq C (CSort x0) (CTail k u1 e))) (\lambda (e: C).(getl (S +n) (CHead c k0 t) (CHead e (Bind b) t0)))) (ex4 nat (\lambda (_: nat).(eq nat +(S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: +nat).(eq T u1 t0)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0)))))) (let +H12 \def (eq_ind K k (\lambda (k1: K).((getl n (CHead (CTail k1 u1 c) k0 t) +(CHead (CSort x0) (Bind b) u1)) \to (or (ex2 C (\lambda (e: C).(eq C (CSort +x0) (CTail k1 u1 e))) (\lambda (e: C).(getl n (CHead c k0 t) (CHead e (Bind +b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat n (s k0 (clen c)))) (\lambda (_: +nat).(eq K k1 (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: +nat).(eq C (CSort x0) (CSort n0))))))) H10 (Bind b) H5) in (let H13 \def +(eq_ind K k (\lambda (k1: K).(getl (r k0 n) (CTail k1 u1 c) (CHead (CSort x0) +(Bind b) u1))) H11 (Bind b) H5) in (eq_ind_r K (Bind b) (\lambda (k1: K).(or +(ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: +C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: +nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) +(\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort +n0)))))) (eq_ind nat (r k0 n) (\lambda (n0: nat).(or (ex2 C (\lambda (e: +C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl (S n) +(CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S +n) (s k0 n0))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: +nat).(eq T u1 u1)) (\lambda (n1: nat).(eq C (CSort x0) (CSort n1)))))) +(eq_ind_r nat (S n) (\lambda (n0: nat).(or (ex2 C (\lambda (e: C).(eq C +(CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) +(CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) n0)) +(\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) +(\lambda (n1: nat).(eq C (CSort x0) (CSort n1)))))) (or_intror (ex2 C +(\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: +C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: +nat).(eq nat (S n) (S n))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) +(\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort +n0)))) (ex4_intro nat (\lambda (_: nat).(eq nat (S n) (S n))) (\lambda (_: +nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: +nat).(eq C (CSort x0) (CSort n0))) x0 (refl_equal nat (S n)) (refl_equal K +(Bind b)) (refl_equal T u1) (refl_equal C (CSort x0)))) (s k0 (r k0 n)) (s_r +k0 n)) (clen c) H4) k H5))) u2 H6))) c2 H7)))))))) H3)) H2)))))) i)))))) +c1)))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/clear.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/clear.ma index 70eeece9c..86b43ab7b 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/clear.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/clear.ma @@ -34,40 +34,39 @@ e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) C).(\lambda (H0: (csub3 g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: -(clear (CHead c3 k u) e1)).((match k in K return (\lambda (k0: K).((clear -(CHead c3 k0 u) e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda -(e2: C).(clear (CHead c4 k0 u) e2))))) with [(Bind b) \Rightarrow (\lambda -(H3: (clear (CHead c3 (Bind b) u) e1)).(eq_ind_r C (CHead c3 (Bind b) u) +(clear (CHead c3 k u) e1)).(K_ind (\lambda (k0: K).((clear (CHead c3 k0 u) +e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear +(CHead c4 k0 u) e2))))) (\lambda (b: B).(\lambda (H3: (clear (CHead c3 (Bind +b) u) e1)).(eq_ind_r C (CHead c3 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda +(e2: C).(csub3 g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)))) +(ex_intro2 C (\lambda (e2: C).(csub3 g (CHead c3 (Bind b) u) e2)) (\lambda +(e2: C).(clear (CHead c4 (Bind b) u) e2)) (CHead c4 (Bind b) u) (csub3_head g +c3 c4 H0 (Bind b) u) (clear_bind b c4 u)) e1 (clear_gen_bind b c3 e1 u H3)))) +(\lambda (f: F).(\lambda (H3: (clear (CHead c3 (Flat f) u) e1)).(let H4 \def +(H1 e1 (clear_gen_flat f c3 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csub3 g +e1 e2)) (\lambda (e2: C).(clear c4 e2)) (ex2 C (\lambda (e2: C).(csub3 g e1 +e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2))) (\lambda (x: +C).(\lambda (H5: (csub3 g e1 x)).(\lambda (H6: (clear c4 x)).(ex_intro2 C +(\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) +u) e2)) x H5 (clear_flat c4 x H6 f u))))) H4)))) k H2))))))))) (\lambda (c3: +C).(\lambda (c4: C).(\lambda (H0: (csub3 g c3 c4)).(\lambda (_: ((\forall +(e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda +(e2: C).(clear c4 e2))))))).(\lambda (b: B).(\lambda (H2: (not (eq B b +Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (e1: C).(\lambda (H3: +(clear (CHead c3 (Bind Void) u1) e1)).(eq_ind_r C (CHead c3 (Bind Void) u1) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csub3 g c e2)) (\lambda (e2: -C).(clear (CHead c4 (Bind b) u) e2)))) (ex_intro2 C (\lambda (e2: C).(csub3 g -(CHead c3 (Bind b) u) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)) -(CHead c4 (Bind b) u) (csub3_head g c3 c4 H0 (Bind b) u) (clear_bind b c4 u)) -e1 (clear_gen_bind b c3 e1 u H3))) | (Flat f) \Rightarrow (\lambda (H3: -(clear (CHead c3 (Flat f) u) e1)).(let H4 \def (H1 e1 (clear_gen_flat f c3 e1 -u H3)) in (ex2_ind C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: -C).(clear c4 e2)) (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: -C).(clear (CHead c4 (Flat f) u) e2))) (\lambda (x: C).(\lambda (H5: (csub3 g -e1 x)).(\lambda (H6: (clear c4 x)).(ex_intro2 C (\lambda (e2: C).(csub3 g e1 -e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2)) x H5 (clear_flat c4 x -H6 f u))))) H4)))]) H2))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda -(H0: (csub3 g c3 c4)).(\lambda (_: ((\forall (e1: C).((clear c3 e1) \to (ex2 -C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c4 -e2))))))).(\lambda (b: B).(\lambda (H2: (not (eq B b Void))).(\lambda (u1: -T).(\lambda (u2: T).(\lambda (e1: C).(\lambda (H3: (clear (CHead c3 (Bind -Void) u1) e1)).(eq_ind_r C (CHead c3 (Bind Void) u1) (\lambda (c: C).(ex2 C -(\lambda (e2: C).(csub3 g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) -u2) e2)))) (ex_intro2 C (\lambda (e2: C).(csub3 g (CHead c3 (Bind Void) u1) -e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u2) e2)) (CHead c4 (Bind b) -u2) (csub3_void g c3 c4 H0 b H2 u1 u2) (clear_bind b c4 u2)) e1 -(clear_gen_bind Void c3 e1 u1 H3)))))))))))) (\lambda (c3: C).(\lambda (c4: -C).(\lambda (H0: (csub3 g c3 c4)).(\lambda (_: ((\forall (e1: C).((clear c3 -e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c4 -e2))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H2: (ty3 g c4 u -t)).(\lambda (e1: C).(\lambda (H3: (clear (CHead c3 (Bind Abst) t) -e1)).(eq_ind_r C (CHead c3 (Bind Abst) t) (\lambda (c: C).(ex2 C (\lambda -(e2: C).(csub3 g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) -e2)))) (ex_intro2 C (\lambda (e2: C).(csub3 g (CHead c3 (Bind Abst) t) e2)) -(\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)) (CHead c4 (Bind Abbr) -u) (csub3_abst g c3 c4 H0 u t H2) (clear_bind Abbr c4 u)) e1 (clear_gen_bind -Abst c3 e1 t H3))))))))))) c1 c2 H)))). +C).(clear (CHead c4 (Bind b) u2) e2)))) (ex_intro2 C (\lambda (e2: C).(csub3 +g (CHead c3 (Bind Void) u1) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) +u2) e2)) (CHead c4 (Bind b) u2) (csub3_void g c3 c4 H0 b H2 u1 u2) +(clear_bind b c4 u2)) e1 (clear_gen_bind Void c3 e1 u1 H3)))))))))))) +(\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csub3 g c3 c4)).(\lambda (_: +((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) +(\lambda (e2: C).(clear c4 e2))))))).(\lambda (u: T).(\lambda (t: T).(\lambda +(H2: (ty3 g c4 u t)).(\lambda (e1: C).(\lambda (H3: (clear (CHead c3 (Bind +Abst) t) e1)).(eq_ind_r C (CHead c3 (Bind Abst) t) (\lambda (c: C).(ex2 C +(\lambda (e2: C).(csub3 g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind +Abbr) u) e2)))) (ex_intro2 C (\lambda (e2: C).(csub3 g (CHead c3 (Bind Abst) +t) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)) (CHead c4 (Bind +Abbr) u) (csub3_abst g c3 c4 H0 u t H2) (clear_bind Abbr c4 u)) e1 +(clear_gen_bind Abst c3 e1 t H3))))))))))) c1 c2 H)))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/getl.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/getl.ma index 68f1d825e..acb352ea3 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/getl.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csub3/getl.ma @@ -37,105 +37,108 @@ C).(drop n O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u))) (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))) (\lambda (x: C).(\lambda (H1: (drop n O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind -Abbr) u))).((match x in C return (\lambda (c: C).((drop n O c1 c) \to ((clear -c (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C +Abbr) u))).(C_ind (\lambda (c: C).((drop n O c1 c) \to ((clear c (CHead d1 +(Bind Abbr) u)) \to (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda +(d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) +u))))))))) (\lambda (n0: nat).(\lambda (_: (drop n O c1 (CSort n0))).(\lambda +(H4: (clear (CSort n0) (CHead d1 (Bind Abbr) u))).(clear_gen_sort (CHead d1 +(Bind Abbr) u) n0 H4 (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda +(d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) +u)))))))))) (\lambda (x0: C).(\lambda (_: (((drop n O c1 x0) \to ((clear x0 +(CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind -Abbr) u))))))))) with [(CSort n0) \Rightarrow (\lambda (_: (drop n O c1 -(CSort n0))).(\lambda (H4: (clear (CSort n0) (CHead d1 (Bind Abbr) -u))).(clear_gen_sort (CHead d1 (Bind Abbr) u) n0 H4 (\forall (c2: C).((csub3 -g c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl -n c2 (CHead d2 (Bind Abbr) u))))))))) | (CHead c k t) \Rightarrow (\lambda -(H3: (drop n O c1 (CHead c k t))).(\lambda (H4: (clear (CHead c k t) (CHead -d1 (Bind Abbr) u))).((match k in K return (\lambda (k0: K).((drop n O c1 -(CHead c k0 t)) \to ((clear (CHead c k0 t) (CHead d1 (Bind Abbr) u)) \to -(\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 -d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))))))))) with [(Bind -b) \Rightarrow (\lambda (H5: (drop n O c1 (CHead c (Bind b) t))).(\lambda -(H6: (clear (CHead c (Bind b) t) (CHead d1 (Bind Abbr) u))).(let H7 \def -(f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with -[(CSort _) \Rightarrow d1 | (CHead c0 _ _) \Rightarrow c0])) (CHead d1 (Bind -Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t -H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e in C return -(\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k0 _) -\Rightarrow (match k0 in K return (\lambda (_: K).B) with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d1 (Bind Abbr) u) -(CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t H6)) in -((let H9 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: -C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead -d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind -Abbr) u) t H6)) in (\lambda (H10: (eq B Abbr b)).(\lambda (H11: (eq C d1 -c)).(\lambda (c2: C).(\lambda (H12: (csub3 g c1 c2)).(let H13 \def (eq_ind_r -T t (\lambda (t0: T).(drop n O c1 (CHead c (Bind b) t0))) H5 u H9) in (let -H14 \def (eq_ind_r B b (\lambda (b0: B).(drop n O c1 (CHead c (Bind b0) u))) -H13 Abbr H10) in (let H15 \def (eq_ind_r C c (\lambda (c0: C).(drop n O c1 -(CHead c0 (Bind Abbr) u))) H14 d1 H11) in (ex2_ind C (\lambda (d2: C).(csub3 -g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u))) (ex2 C -(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind -Abbr) u)))) (\lambda (x0: C).(\lambda (H16: (csub3 g d1 x0)).(\lambda (H17: -(drop n O c2 (CHead x0 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csub3 -g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) x0 H16 -(getl_intro n c2 (CHead x0 (Bind Abbr) u) (CHead x0 (Bind Abbr) u) H17 -(clear_bind Abbr x0 u)))))) (csub3_drop_abbr g n c1 c2 H12 d1 u H15)))))))))) -H8)) H7)))) | (Flat f) \Rightarrow (\lambda (H5: (drop n O c1 (CHead c (Flat -f) t))).(\lambda (H6: (clear (CHead c (Flat f) t) (CHead d1 (Bind Abbr) -u))).(let H7 \def H5 in (unintro C c1 (\lambda (c0: C).((drop n O c0 (CHead c -(Flat f) t)) \to (\forall (c2: C).((csub3 g c0 c2) \to (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) -u)))))))) (nat_ind (\lambda (n0: nat).(\forall (x0: C).((drop n0 O x0 (CHead -c (Flat f) t)) \to (\forall (c2: C).((csub3 g x0 c2) \to (ex2 C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abbr) -u))))))))) (\lambda (x0: C).(\lambda (H8: (drop O O x0 (CHead c (Flat f) -t))).(\lambda (c2: C).(\lambda (H9: (csub3 g x0 c2)).(let H10 \def (eq_ind C -x0 (\lambda (c0: C).(csub3 g c0 c2)) H9 (CHead c (Flat f) t) (drop_gen_refl -x0 (CHead c (Flat f) t) H8)) in (let H_y \def (clear_flat c (CHead d1 (Bind -Abbr) u) (clear_gen_flat f c (CHead d1 (Bind Abbr) u) t H6) f t) in (let H11 -\def (csub3_clear_conf g (CHead c (Flat f) t) c2 H10 (CHead d1 (Bind Abbr) u) +Abbr) u)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (H3: (drop n O c1 +(CHead x0 k t))).(\lambda (H4: (clear (CHead x0 k t) (CHead d1 (Bind Abbr) +u))).(K_ind (\lambda (k0: K).((drop n O c1 (CHead x0 k0 t)) \to ((clear +(CHead x0 k0 t) (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csub3 g c1 +c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 +(CHead d2 (Bind Abbr) u))))))))) (\lambda (b: B).(\lambda (H5: (drop n O c1 +(CHead x0 (Bind b) t))).(\lambda (H6: (clear (CHead x0 (Bind b) t) (CHead d1 +(Bind Abbr) u))).(let H7 \def (f_equal C C (\lambda (e: C).(match e in C +return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) +\Rightarrow c])) (CHead d1 (Bind Abbr) u) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) t H6)) in ((let H8 \def +(f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with +[(CSort _) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow (match k0 in K +return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) +\Rightarrow Abbr])])) (CHead d1 (Bind Abbr) u) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) t H6)) in ((let H9 \def +(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with +[(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d1 (Bind +Abbr) u) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) +t H6)) in (\lambda (H10: (eq B Abbr b)).(\lambda (H11: (eq C d1 x0)).(\lambda +(c2: C).(\lambda (H12: (csub3 g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda +(t0: T).(drop n O c1 (CHead x0 (Bind b) t0))) H5 u H9) in (let H14 \def +(eq_ind_r B b (\lambda (b0: B).(drop n O c1 (CHead x0 (Bind b0) u))) H13 Abbr +H10) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(drop n O c1 (CHead c +(Bind Abbr) u))) H14 d1 H11) in (ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) +(\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: +C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))) +(\lambda (x1: C).(\lambda (H16: (csub3 g d1 x1)).(\lambda (H17: (drop n O c2 +(CHead x1 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) +(\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) x1 H16 (getl_intro n +c2 (CHead x1 (Bind Abbr) u) (CHead x1 (Bind Abbr) u) H17 (clear_bind Abbr x1 +u)))))) (csub3_drop_abbr g n c1 c2 H12 d1 u H15)))))))))) H8)) H7))))) +(\lambda (f: F).(\lambda (H5: (drop n O c1 (CHead x0 (Flat f) t))).(\lambda +(H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind Abbr) u))).(let H7 \def H5 +in (unintro C c1 (\lambda (c: C).((drop n O c (CHead x0 (Flat f) t)) \to +(\forall (c2: C).((csub3 g c c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))))) (nat_ind (\lambda +(n0: nat).(\forall (x1: C).((drop n0 O x1 (CHead x0 (Flat f) t)) \to (\forall +(c2: C).((csub3 g x1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abbr) u))))))))) (\lambda (x1: +C).(\lambda (H8: (drop O O x1 (CHead x0 (Flat f) t))).(\lambda (c2: +C).(\lambda (H9: (csub3 g x1 c2)).(let H10 \def (eq_ind C x1 (\lambda (c: +C).(csub3 g c c2)) H9 (CHead x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat +f) t) H8)) in (let H_y \def (clear_flat x0 (CHead d1 (Bind Abbr) u) +(clear_gen_flat f x0 (CHead d1 (Bind Abbr) u) t H6) f t) in (let H11 \def +(csub3_clear_conf g (CHead x0 (Flat f) t) c2 H10 (CHead d1 (Bind Abbr) u) H_y) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead d1 (Bind Abbr) u) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) -(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x1: -C).(\lambda (H12: (csub3 g (CHead d1 (Bind Abbr) u) x1)).(\lambda (H13: -(clear c2 x1)).(let H14 \def (csub3_gen_abbr g d1 x1 u H12) in (ex2_ind C -(\lambda (e2: C).(eq C x1 (CHead e2 (Bind Abbr) u))) (\lambda (e2: C).(csub3 +(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x2: +C).(\lambda (H12: (csub3 g (CHead d1 (Bind Abbr) u) x2)).(\lambda (H13: +(clear c2 x2)).(let H14 \def (csub3_gen_abbr g d1 x2 u H12) in (ex2_ind C +(\lambda (e2: C).(eq C x2 (CHead e2 (Bind Abbr) u))) (\lambda (e2: C).(csub3 g d1 e2)) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O -c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x2: C).(\lambda (H15: (eq C x1 -(CHead x2 (Bind Abbr) u))).(\lambda (H16: (csub3 g d1 x2)).(let H17 \def -(eq_ind C x1 (\lambda (c0: C).(clear c2 c0)) H13 (CHead x2 (Bind Abbr) u) -H15) in (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl -O c2 (CHead d2 (Bind Abbr) u))) x2 H16 (getl_intro O c2 (CHead x2 (Bind Abbr) -u) c2 (drop_refl c2) H17)))))) H14))))) H11)))))))) (\lambda (n0: -nat).(\lambda (H8: ((\forall (x0: C).((drop n0 O x0 (CHead c (Flat f) t)) \to -(\forall (c2: C).((csub3 g x0 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 -d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abbr) u)))))))))).(\lambda -(x0: C).(\lambda (H9: (drop (S n0) O x0 (CHead c (Flat f) t))).(\lambda (c2: -C).(\lambda (H10: (csub3 g x0 c2)).(let H11 \def (drop_clear x0 (CHead c +c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x3: C).(\lambda (H15: (eq C x2 +(CHead x3 (Bind Abbr) u))).(\lambda (H16: (csub3 g d1 x3)).(let H17 \def +(eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abbr) u) H15) +in (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 +(CHead d2 (Bind Abbr) u))) x3 H16 (getl_intro O c2 (CHead x3 (Bind Abbr) u) +c2 (drop_refl c2) H17)))))) H14))))) H11)))))))) (\lambda (n0: nat).(\lambda +(H8: ((\forall (x1: C).((drop n0 O x1 (CHead x0 (Flat f) t)) \to (\forall +(c2: C).((csub3 g x1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abbr) u)))))))))).(\lambda (x1: +C).(\lambda (H9: (drop (S n0) O x1 (CHead x0 (Flat f) t))).(\lambda (c2: +C).(\lambda (H10: (csub3 g x1 c2)).(let H11 \def (drop_clear x1 (CHead x0 (Flat f) t) n0 H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: -C).(\lambda (v: T).(clear x0 (CHead e (Bind b) v))))) (\lambda (_: -B).(\lambda (e: C).(\lambda (_: T).(drop n0 O e (CHead c (Flat f) t))))) (ex2 -C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead -d2 (Bind Abbr) u)))) (\lambda (x1: B).(\lambda (x2: C).(\lambda (x3: -T).(\lambda (H12: (clear x0 (CHead x2 (Bind x1) x3))).(\lambda (H13: (drop n0 -O x2 (CHead c (Flat f) t))).(let H14 \def (csub3_clear_conf g x0 c2 H10 -(CHead x2 (Bind x1) x3) H12) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead -x2 (Bind x1) x3) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: +C).(\lambda (v: T).(clear x1 (CHead e (Bind b) v))))) (\lambda (_: +B).(\lambda (e: C).(\lambda (_: T).(drop n0 O e (CHead x0 (Flat f) t))))) +(ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 +(CHead d2 (Bind Abbr) u)))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: +T).(\lambda (H12: (clear x1 (CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n0 +O x3 (CHead x0 (Flat f) t))).(let H14 \def (csub3_clear_conf g x1 c2 H10 +(CHead x3 (Bind x2) x4) H12) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead +x3 (Bind x2) x4) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) -u)))) (\lambda (x4: C).(\lambda (H15: (csub3 g (CHead x2 (Bind x1) x3) -x4)).(\lambda (H16: (clear c2 x4)).(let H17 \def (csub3_gen_bind g x1 x2 x4 -x3 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: -T).(eq C x4 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csub3 g x2 e2)))) (ex2 C (\lambda (d2: C).(csub3 g d1 +u)))) (\lambda (x5: C).(\lambda (H15: (csub3 g (CHead x3 (Bind x2) x4) +x5)).(\lambda (H16: (clear c2 x5)).(let H17 \def (csub3_gen_bind g x2 x3 x5 +x4 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: +T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (_: T).(csub3 g x3 e2)))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda -(x5: B).(\lambda (x6: C).(\lambda (x7: T).(\lambda (H18: (eq C x4 (CHead x6 -(Bind x5) x7))).(\lambda (H19: (csub3 g x2 x6)).(let H20 \def (eq_ind C x4 -(\lambda (c0: C).(clear c2 c0)) H16 (CHead x6 (Bind x5) x7) H18) in (let H21 -\def (H8 x2 H13 x6 H19) in (ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) -(\lambda (d2: C).(getl n0 x6 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: +(x6: B).(\lambda (x7: C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 +(Bind x6) x8))).(\lambda (H19: (csub3 g x3 x7)).(let H20 \def (eq_ind C x5 +(\lambda (c: C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 +\def (H8 x3 H13 x7 H19) in (ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) +(\lambda (d2: C).(getl n0 x7 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) -u)))) (\lambda (x8: C).(\lambda (H22: (csub3 g d1 x8)).(\lambda (H23: (getl -n0 x6 (CHead x8 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 -d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u))) x8 H22 -(getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abbr) u) n0 H23))))) -H21)))))))) H17))))) H14))))))) H11)))))))) n) H7))))]) H3 H4)))]) H1 H2)))) -H0))))))). +u)))) (\lambda (x9: C).(\lambda (H22: (csub3 g d1 x9)).(\lambda (H23: (getl +n0 x7 (CHead x9 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 +d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u))) x9 H22 +(getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abbr) u) n0 H23))))) +H21)))))))) H17))))) H14))))))) H11)))))))) n) H7))))) k H3 H4))))))) x H1 +H2)))) H0))))))). theorem csub3_getl_abst: \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (t: T).(\forall @@ -155,69 +158,74 @@ d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))) (\lambda (x: C).(\lambda (H1: (drop n O c1 -x)).(\lambda (H2: (clear x (CHead d1 (Bind Abst) t))).((match x in C return -(\lambda (c: C).((drop n O c1 c) \to ((clear c (CHead d1 (Bind Abst) t)) \to -(\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 -d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T -(\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: -T).(ty3 g d2 u t)))))))))) with [(CSort n0) \Rightarrow (\lambda (_: (drop n -O c1 (CSort n0))).(\lambda (H4: (clear (CSort n0) (CHead d1 (Bind Abst) +x)).(\lambda (H2: (clear x (CHead d1 (Bind Abst) t))).(C_ind (\lambda (c: +C).((drop n O c1 c) \to ((clear c (CHead d1 (Bind Abst) t)) \to (\forall (c2: +C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +(d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: +C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n +c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u +t)))))))))) (\lambda (n0: nat).(\lambda (_: (drop n O c1 (CSort +n0))).(\lambda (H4: (clear (CSort n0) (CHead d1 (Bind Abst) t))).(clear_gen_sort (CHead d1 (Bind Abst) t) n0 H4 (\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u -t)))))))))) | (CHead c k t0) \Rightarrow (\lambda (H3: (drop n O c1 (CHead c -k t0))).(\lambda (H4: (clear (CHead c k t0) (CHead d1 (Bind Abst) -t))).((match k in K return (\lambda (k0: K).((drop n O c1 (CHead c k0 t0)) -\to ((clear (CHead c k0 t0) (CHead d1 (Bind Abst) t)) \to (\forall (c2: -C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda -(d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n -c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u -t)))))))))) with [(Bind b) \Rightarrow (\lambda (H5: (drop n O c1 (CHead c -(Bind b) t0))).(\lambda (H6: (clear (CHead c (Bind b) t0) (CHead d1 (Bind -Abst) t))).(let H7 \def (f_equal C C (\lambda (e: C).(match e in C return -(\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c0 _ _) -\Rightarrow c0])) (CHead d1 (Bind Abst) t) (CHead c (Bind b) t0) -(clear_gen_bind b c (CHead d1 (Bind Abst) t) t0 H6)) in ((let H8 \def +t))))))))))) (\lambda (x0: C).(\lambda (_: (((drop n O c1 x0) \to ((clear x0 +(CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 +C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 +(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 +d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) +(\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))))).(\lambda (k: +K).(\lambda (t0: T).(\lambda (H3: (drop n O c1 (CHead x0 k t0))).(\lambda +(H4: (clear (CHead x0 k t0) (CHead d1 (Bind Abst) t))).(K_ind (\lambda (k0: +K).((drop n O c1 (CHead x0 k0 t0)) \to ((clear (CHead x0 k0 t0) (CHead d1 +(Bind Abst) t)) \to (\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 C (\lambda +(d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) +t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda +(d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: +C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (b: B).(\lambda (H5: +(drop n O c1 (CHead x0 (Bind b) t0))).(\lambda (H6: (clear (CHead x0 (Bind b) +t0) (CHead d1 (Bind Abst) t))).(let H7 \def (f_equal C C (\lambda (e: +C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | +(CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abst) t) (CHead x0 (Bind b) +t0) (clear_gen_bind b x0 (CHead d1 (Bind Abst) t) t0 H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abst | (CHead _ k0 _) \Rightarrow (match k0 in K return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) -\Rightarrow Abst])])) (CHead d1 (Bind Abst) t) (CHead c (Bind b) t0) -(clear_gen_bind b c (CHead d1 (Bind Abst) t) t0 H6)) in ((let H9 \def +\Rightarrow Abst])])) (CHead d1 (Bind Abst) t) (CHead x0 (Bind b) t0) +(clear_gen_bind b x0 (CHead d1 (Bind Abst) t) t0 H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | (CHead _ _ t1) \Rightarrow t1])) (CHead d1 (Bind -Abst) t) (CHead c (Bind b) t0) (clear_gen_bind b c (CHead d1 (Bind Abst) t) -t0 H6)) in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq C d1 c)).(\lambda -(c2: C).(\lambda (H12: (csub3 g c1 c2)).(let H13 \def (eq_ind_r T t0 (\lambda -(t1: T).(drop n O c1 (CHead c (Bind b) t1))) H5 t H9) in (let H14 \def -(eq_ind_r B b (\lambda (b0: B).(drop n O c1 (CHead c (Bind b0) t))) H13 Abst -H10) in (let H15 \def (eq_ind_r C c (\lambda (c0: C).(drop n O c1 (CHead c0 -(Bind Abst) t))) H14 d1 H11) in (or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 -d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T +Abst) t) (CHead x0 (Bind b) t0) (clear_gen_bind b x0 (CHead d1 (Bind Abst) t) +t0 H6)) in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq C d1 +x0)).(\lambda (c2: C).(\lambda (H12: (csub3 g c1 c2)).(let H13 \def (eq_ind_r +T t0 (\lambda (t1: T).(drop n O c1 (CHead x0 (Bind b) t1))) H5 t H9) in (let +H14 \def (eq_ind_r B b (\lambda (b0: B).(drop n O c1 (CHead x0 (Bind b0) t))) +H13 Abst H10) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(drop n O c1 +(CHead c (Bind Abst) t))) H14 d1 H11) in (or_ind (ex2 C (\lambda (d2: +C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t)))) +(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: +C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: +C).(\lambda (u: T).(ty3 g d2 u t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 +d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: -T).(ty3 g d2 u t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda -(d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: +(u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: +T).(ty3 g d2 u t))))) (\lambda (H16: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t))))).(ex2_ind C +(\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 +(Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u -t))))) (\lambda (H16: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: -C).(drop n O c2 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t))) -(or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 -(CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 -(Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) -(\lambda (x0: C).(\lambda (H17: (csub3 g d1 x0)).(\lambda (H18: (drop n O c2 -(CHead x0 (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 -d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T +t))))) (\lambda (x1: C).(\lambda (H17: (csub3 g d1 x1)).(\lambda (H18: (drop +n O c2 (CHead x1 (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g +d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda -(d2: C).(getl n c2 (CHead d2 (Bind Abst) t))) x0 H17 (getl_intro n c2 (CHead -x0 (Bind Abst) t) (CHead x0 (Bind Abst) t) H18 (clear_bind Abst x0 t))))))) +(d2: C).(getl n c2 (CHead d2 (Bind Abst) t))) x1 H17 (getl_intro n c2 (CHead +x1 (Bind Abst) t) (CHead x1 (Bind Abst) t) H18 (clear_bind Abst x1 t))))))) H16)) (\lambda (H16: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T @@ -227,164 +235,164 @@ T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u -t))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H17: (csub3 g d1 -x0)).(\lambda (H18: (drop n O c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H19: -(ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda +t))))) (\lambda (x1: C).(\lambda (x2: T).(\lambda (H17: (csub3 g d1 +x1)).(\lambda (H18: (drop n O c2 (CHead x1 (Bind Abbr) x2))).(\lambda (H19: +(ty3 g x1 x2 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) -(\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x0 x1 H17 (getl_intro n c2 -(CHead x0 (Bind Abbr) x1) (CHead x0 (Bind Abbr) x1) H18 (clear_bind Abbr x0 -x1)) H19))))))) H16)) (csub3_drop_abst g n c1 c2 H12 d1 t H15)))))))))) H8)) -H7)))) | (Flat f) \Rightarrow (\lambda (H5: (drop n O c1 (CHead c (Flat f) -t0))).(\lambda (H6: (clear (CHead c (Flat f) t0) (CHead d1 (Bind Abst) -t))).(let H7 \def H5 in (unintro C c1 (\lambda (c0: C).((drop n O c0 (CHead c -(Flat f) t0)) \to (\forall (c2: C).((csub3 g c0 c2) \to (or (ex2 C (\lambda +(\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x1 x2 H17 (getl_intro n c2 +(CHead x1 (Bind Abbr) x2) (CHead x1 (Bind Abbr) x2) H18 (clear_bind Abbr x1 +x2)) H19))))))) H16)) (csub3_drop_abst g n c1 c2 H12 d1 t H15)))))))))) H8)) +H7))))) (\lambda (f: F).(\lambda (H5: (drop n O c1 (CHead x0 (Flat f) +t0))).(\lambda (H6: (clear (CHead x0 (Flat f) t0) (CHead d1 (Bind Abst) +t))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop n O c (CHead x0 +(Flat f) t0)) \to (\forall (c2: C).((csub3 g c c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))) (nat_ind (\lambda (n0: -nat).(\forall (x0: C).((drop n0 O x0 (CHead c (Flat f) t0)) \to (\forall (c2: -C).((csub3 g x0 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda -(d2: C).(getl n0 c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl -n0 c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 -u t)))))))))) (\lambda (x0: C).(\lambda (H8: (drop O O x0 (CHead c (Flat f) -t0))).(\lambda (c2: C).(\lambda (H9: (csub3 g x0 c2)).(let H10 \def (eq_ind C -x0 (\lambda (c0: C).(csub3 g c0 c2)) H9 (CHead c (Flat f) t0) (drop_gen_refl -x0 (CHead c (Flat f) t0) H8)) in (let H_y \def (clear_flat c (CHead d1 (Bind -Abst) t) (clear_gen_flat f c (CHead d1 (Bind Abst) t) t0 H6) f t0) in (let -H11 \def (csub3_clear_conf g (CHead c (Flat f) t0) c2 H10 (CHead d1 (Bind -Abst) t) H_y) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead d1 (Bind Abst) -t) e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(csub3 g -d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T -(\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: -T).(ty3 g d2 u t))))) (\lambda (x1: C).(\lambda (H12: (csub3 g (CHead d1 -(Bind Abst) t) x1)).(\lambda (H13: (clear c2 x1)).(let H14 \def -(csub3_gen_abst g d1 x1 t H12) in (or_ind (ex2 C (\lambda (e2: C).(eq C x1 +nat).(\forall (x1: C).((drop n0 O x1 (CHead x0 (Flat f) t0)) \to (\forall +(c2: C).((csub3 g x1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda +(d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: +T).(getl n0 c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: +T).(ty3 g d2 u t)))))))))) (\lambda (x1: C).(\lambda (H8: (drop O O x1 (CHead +x0 (Flat f) t0))).(\lambda (c2: C).(\lambda (H9: (csub3 g x1 c2)).(let H10 +\def (eq_ind C x1 (\lambda (c: C).(csub3 g c c2)) H9 (CHead x0 (Flat f) t0) +(drop_gen_refl x1 (CHead x0 (Flat f) t0) H8)) in (let H_y \def (clear_flat x0 +(CHead d1 (Bind Abst) t) (clear_gen_flat f x0 (CHead d1 (Bind Abst) t) t0 H6) +f t0) in (let H11 \def (csub3_clear_conf g (CHead x0 (Flat f) t0) c2 H10 +(CHead d1 (Bind Abst) t) H_y) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead +d1 (Bind Abst) t) e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda +(d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) +t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda +(d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: +C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x2: C).(\lambda (H12: (csub3 +g (CHead d1 (Bind Abst) t) x2)).(\lambda (H13: (clear c2 x2)).(let H14 \def +(csub3_gen_abst g d1 x2 t H12) in (or_ind (ex2 C (\lambda (e2: C).(eq C x2 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csub3 g d1 e2))) (ex3_2 C T -(\lambda (e2: C).(\lambda (v2: T).(eq C x1 (CHead e2 (Bind Abbr) v2)))) +(\lambda (e2: C).(\lambda (v2: T).(eq C x2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g d1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: -T).(ty3 g d2 u t))))) (\lambda (H15: (ex2 C (\lambda (e2: C).(eq C x1 (CHead +T).(ty3 g d2 u t))))) (\lambda (H15: (ex2 C (\lambda (e2: C).(eq C x2 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csub3 g d1 e2)))).(ex2_ind C (\lambda -(e2: C).(eq C x1 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csub3 g d1 e2)) +(e2: C).(eq C x2 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csub3 g d1 e2)) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) -(\lambda (x2: C).(\lambda (H16: (eq C x1 (CHead x2 (Bind Abst) t))).(\lambda -(H17: (csub3 g d1 x2)).(let H18 \def (eq_ind C x1 (\lambda (c0: C).(clear c2 -c0)) H13 (CHead x2 (Bind Abst) t) H16) in (or_introl (ex2 C (\lambda (d2: +(\lambda (x3: C).(\lambda (H16: (eq C x2 (CHead x3 (Bind Abst) t))).(\lambda +(H17: (csub3 g d1 x3)).(let H18 \def (eq_ind C x2 (\lambda (c: C).(clear c2 +c)) H13 (CHead x3 (Bind Abst) t) H16) in (or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g -d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t))) x2 H17 -(getl_intro O c2 (CHead x2 (Bind Abst) t) c2 (drop_refl c2) H18))))))) H15)) -(\lambda (H15: (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C x1 (CHead +d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t))) x3 H17 +(getl_intro O c2 (CHead x3 (Bind Abst) t) c2 (drop_refl c2) H18))))))) H15)) +(\lambda (H15: (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C x2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g d1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 t))))).(ex3_2_ind C T (\lambda -(e2: C).(\lambda (v2: T).(eq C x1 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: +(e2: C).(\lambda (v2: T).(eq C x2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g d1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u -t))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (H16: (eq C x1 (CHead x2 -(Bind Abbr) x3))).(\lambda (H17: (csub3 g d1 x2)).(\lambda (H18: (ty3 g x2 x3 -t)).(let H19 \def (eq_ind C x1 (\lambda (c0: C).(clear c2 c0)) H13 (CHead x2 -(Bind Abbr) x3) H16) in (or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +t))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (H16: (eq C x2 (CHead x3 +(Bind Abbr) x4))).(\lambda (H17: (csub3 g d1 x3)).(\lambda (H18: (ty3 g x3 x4 +t)).(let H19 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 (CHead x3 +(Bind Abbr) x4) H16) in (or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) -u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x2 x3 H17 (getl_intro -O c2 (CHead x2 (Bind Abbr) x3) c2 (drop_refl c2) H19) H18)))))))) H15)) -H14))))) H11)))))))) (\lambda (n0: nat).(\lambda (H8: ((\forall (x0: -C).((drop n0 O x0 (CHead c (Flat f) t0)) \to (\forall (c2: C).((csub3 g x0 +u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x3 x4 H17 (getl_intro +O c2 (CHead x3 (Bind Abbr) x4) c2 (drop_refl c2) H19) H18)))))))) H15)) +H14))))) H11)))))))) (\lambda (n0: nat).(\lambda (H8: ((\forall (x1: +C).((drop n0 O x1 (CHead x0 (Flat f) t0)) \to (\forall (c2: C).((csub3 g x1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u -t))))))))))).(\lambda (x0: C).(\lambda (H9: (drop (S n0) O x0 (CHead c (Flat -f) t0))).(\lambda (c2: C).(\lambda (H10: (csub3 g x0 c2)).(let H11 \def -(drop_clear x0 (CHead c (Flat f) t0) n0 H9) in (ex2_3_ind B C T (\lambda (b: -B).(\lambda (e: C).(\lambda (v: T).(clear x0 (CHead e (Bind b) v))))) -(\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n0 O e (CHead c (Flat +t))))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S n0) O x1 (CHead x0 (Flat +f) t0))).(\lambda (c2: C).(\lambda (H10: (csub3 g x1 c2)).(let H11 \def +(drop_clear x1 (CHead x0 (Flat f) t0) n0 H9) in (ex2_3_ind B C T (\lambda (b: +B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind b) v))))) +(\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n0 O e (CHead x0 (Flat f) t0))))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g -d2 u t))))) (\lambda (x1: B).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: -(clear x0 (CHead x2 (Bind x1) x3))).(\lambda (H13: (drop n0 O x2 (CHead c -(Flat f) t0))).(let H14 \def (csub3_clear_conf g x0 c2 H10 (CHead x2 (Bind -x1) x3) H12) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead x2 (Bind x1) x3) +d2 u t))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H12: +(clear x1 (CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n0 O x3 (CHead x0 +(Flat f) t0))).(let H14 \def (csub3_clear_conf g x1 c2 H10 (CHead x3 (Bind +x2) x4) H12) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead x3 (Bind x2) x4) e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda -(u: T).(ty3 g d2 u t))))) (\lambda (x4: C).(\lambda (H15: (csub3 g (CHead x2 -(Bind x1) x3) x4)).(\lambda (H16: (clear c2 x4)).(let H17 \def -(csub3_gen_bind g x1 x2 x4 x3 H15) in (ex2_3_ind B C T (\lambda (b2: -B).(\lambda (e2: C).(\lambda (v2: T).(eq C x4 (CHead e2 (Bind b2) v2))))) -(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g x2 e2)))) (or (ex2 +(u: T).(ty3 g d2 u t))))) (\lambda (x5: C).(\lambda (H15: (csub3 g (CHead x3 +(Bind x2) x4) x5)).(\lambda (H16: (clear c2 x5)).(let H17 \def +(csub3_gen_bind g x2 x3 x5 x4 H15) in (ex2_3_ind B C T (\lambda (b2: +B).(\lambda (e2: C).(\lambda (v2: T).(eq C x5 (CHead e2 (Bind b2) v2))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g x3 e2)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) -u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x5: -B).(\lambda (x6: C).(\lambda (x7: T).(\lambda (H18: (eq C x4 (CHead x6 (Bind -x5) x7))).(\lambda (H19: (csub3 g x2 x6)).(let H20 \def (eq_ind C x4 (\lambda -(c0: C).(clear c2 c0)) H16 (CHead x6 (Bind x5) x7) H18) in (let H21 \def (H8 -x2 H13 x6 H19) in (or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda -(d2: C).(getl n0 x6 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: +u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x6: +B).(\lambda (x7: C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind +x6) x8))).(\lambda (H19: (csub3 g x3 x7)).(let H20 \def (eq_ind C x5 (\lambda +(c: C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 +H13 x7 H19) in (or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: +C).(getl n0 x7 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl -n0 x6 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 +n0 x7 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H22: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: -C).(getl n0 x6 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: -C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 x6 (CHead d2 (Bind Abst) t))) +C).(getl n0 x7 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: +C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 x7 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) -(\lambda (x8: C).(\lambda (H23: (csub3 g d1 x8)).(\lambda (H24: (getl n0 x6 -(CHead x8 (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 +(\lambda (x9: C).(\lambda (H23: (csub3 g d1 x9)).(\lambda (H24: (getl n0 x7 +(CHead x9 (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) -(\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t))) x8 H23 -(getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abst) t) n0 H24)))))) H22)) +(\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t))) x9 H23 +(getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abst) t) n0 H24)))))) H22)) (\lambda (H22: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) -(\lambda (d2: C).(\lambda (u: T).(getl n0 x6 (CHead d2 (Bind Abbr) u)))) +(\lambda (d2: C).(\lambda (u: T).(getl n0 x7 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: -T).(getl n0 x6 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: +T).(getl n0 x7 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g -d2 u t))))) (\lambda (x8: C).(\lambda (x9: T).(\lambda (H23: (csub3 g d1 -x8)).(\lambda (H24: (getl n0 x6 (CHead x8 (Bind Abbr) x9))).(\lambda (H25: -(ty3 g x8 x9 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda -(d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl -(S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g -d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 -d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) -u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x8 x9 H23 -(getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abbr) x9) n0 H24) H25))))))) -H22)) H21)))))))) H17))))) H14))))))) H11)))))))) n) H7))))]) H3 H4)))]) H1 -H2)))) H0))))))). +d2 u t))))) (\lambda (x9: C).(\lambda (x10: T).(\lambda (H23: (csub3 g d1 +x9)).(\lambda (H24: (getl n0 x7 (CHead x9 (Bind Abbr) x10))).(\lambda (H25: +(ty3 g x9 x10 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) +(\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T +(\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda +(u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda +(u: T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: +T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead +d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x9 x10 +H23 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abbr) x10) n0 H24) +H25))))))) H22)) H21)))))))) H17))))) H14))))))) H11)))))))) n) H7))))) k H3 +H4))))))) x H1 H2)))) H0))))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/arity.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/arity.ma index acd564afb..fe9436497 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/arity.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/arity.ma @@ -103,10 +103,83 @@ g c2 t0 a1))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (c2: C).(\lambda (H3: (csuba g c c2)).(arity_repl g c2 t0 a1 (H1 c2 H3) a2 H2)))))))))) c1 t a H))))). -axiom csuba_arity_rev: +theorem csuba_arity_rev: \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 t a) \to (\forall (c2: C).((csuba g c2 c1) \to (arity g c2 t a))))))) -. +\def + \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: +(arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: +A).(\forall (c2: C).((csuba g c2 c) \to (arity g c2 t0 a0)))))) (\lambda (c: +C).(\lambda (n: nat).(\lambda (c2: C).(\lambda (_: (csuba g c2 +c)).(arity_sort g c2 n))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: +T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) +u))).(\lambda (a0: A).(\lambda (H1: (arity g d u a0)).(\lambda (H2: ((\forall +(c2: C).((csuba g c2 d) \to (arity g c2 u a0))))).(\lambda (c2: C).(\lambda +(H3: (csuba g c2 c)).(let H4 \def (csuba_getl_abbr_rev g c d u i H0 c2 H3) in +(or_ind (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d2 d))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 (asucc g a1))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d u a1))))) (arity g c2 +(TLRef i) a0) (\lambda (H5: (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d2 d)))).(ex2_ind C (\lambda (d2: +C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d2 d)) +(arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H6: (getl i c2 (CHead x +(Bind Abbr) u))).(\lambda (H7: (csuba g x d)).(arity_abbr g c2 x u i H6 a0 +(H2 x H7))))) H5)) (\lambda (H5: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 (asucc g a1))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d u a1)))))).(ex4_3_ind C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a1: A).(arity g d2 u2 +(asucc g a1))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a1: A).(arity g d +u a1)))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: T).(\lambda +(x2: A).(\lambda (H6: (getl i c2 (CHead x0 (Bind Abst) x1))).(\lambda (_: +(csuba g x0 d)).(\lambda (H8: (arity g x0 x1 (asucc g x2))).(\lambda (H9: +(arity g d u x2)).(arity_repl g c2 (TLRef i) x2 (arity_abst g c2 x0 x1 i H6 +x2 H8) a0 (arity_mono g d u x2 H9 a0 H1))))))))) H5)) H4)))))))))))) (\lambda +(c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl +i c (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u +(asucc g a0))).(\lambda (H2: ((\forall (c2: C).((csuba g c2 d) \to (arity g +c2 u (asucc g a0)))))).(\lambda (c2: C).(\lambda (H3: (csuba g c2 c)).(let H4 +\def (csuba_getl_abst_rev g c d u i H0 c2 H3) in (ex2_ind C (\lambda (d2: +C).(getl i c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d)) +(arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H5: (getl i c2 (CHead x +(Bind Abst) u))).(\lambda (H6: (csuba g x d)).(arity_abst g c2 x u i H5 a0 +(H2 x H6))))) H4)))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b +Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity +g c u a1)).(\lambda (H2: ((\forall (c2: C).((csuba g c2 c) \to (arity g c2 u +a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c +(Bind b) u) t0 a2)).(\lambda (H4: ((\forall (c2: C).((csuba g c2 (CHead c +(Bind b) u)) \to (arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H5: (csuba +g c2 c)).(arity_bind g b H0 c2 u a1 (H2 c2 H5) t0 a2 (H4 (CHead c2 (Bind b) +u) (csuba_head g c2 c H5 (Bind b) u)))))))))))))))) (\lambda (c: C).(\lambda +(u: T).(\lambda (a1: A).(\lambda (_: (arity g c u (asucc g a1))).(\lambda +(H1: ((\forall (c2: C).((csuba g c2 c) \to (arity g c2 u (asucc g +a1)))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c +(Bind Abst) u) t0 a2)).(\lambda (H3: ((\forall (c2: C).((csuba g c2 (CHead c +(Bind Abst) u)) \to (arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H4: +(csuba g c2 c)).(arity_head g c2 u a1 (H1 c2 H4) t0 a2 (H3 (CHead c2 (Bind +Abst) u) (csuba_head g c2 c H4 (Bind Abst) u)))))))))))))) (\lambda (c: +C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda +(H1: ((\forall (c2: C).((csuba g c2 c) \to (arity g c2 u a1))))).(\lambda +(t0: T).(\lambda (a2: A).(\lambda (_: (arity g c t0 (AHead a1 a2))).(\lambda +(H3: ((\forall (c2: C).((csuba g c2 c) \to (arity g c2 t0 (AHead a1 +a2)))))).(\lambda (c2: C).(\lambda (H4: (csuba g c2 c)).(arity_appl g c2 u a1 +(H1 c2 H4) t0 a2 (H3 c2 H4))))))))))))) (\lambda (c: C).(\lambda (u: +T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g a0))).(\lambda (H1: +((\forall (c2: C).((csuba g c2 c) \to (arity g c2 u (asucc g +a0)))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 a0)).(\lambda (H3: +((\forall (c2: C).((csuba g c2 c) \to (arity g c2 t0 a0))))).(\lambda (c2: +C).(\lambda (H4: (csuba g c2 c)).(arity_cast g c2 u a0 (H1 c2 H4) t0 (H3 c2 +H4)))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: +(arity g c t0 a1)).(\lambda (H1: ((\forall (c2: C).((csuba g c2 c) \to (arity +g c2 t0 a1))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (c2: +C).(\lambda (H3: (csuba g c2 c)).(arity_repl g c2 t0 a1 (H1 c2 H3) a2 +H2)))))))))) c1 t a H))))). theorem arity_appls_appl: \forall (g: G).(\forall (c: C).(\forall (v: T).(\forall (a1: A).((arity g c diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/clear.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/clear.ma index 8e22a5484..a7eb560d7 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/clear.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/clear.ma @@ -34,31 +34,30 @@ e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csuba g e1 e2)) C).(\lambda (H0: (csuba g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: -(clear (CHead c3 k u) e1)).((match k in K return (\lambda (k0: K).((clear -(CHead c3 k0 u) e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda -(e2: C).(clear (CHead c4 k0 u) e2))))) with [(Bind b) \Rightarrow (\lambda -(H3: (clear (CHead c3 (Bind b) u) e1)).(eq_ind_r C (CHead c3 (Bind b) u) -(\lambda (c: C).(ex2 C (\lambda (e2: C).(csuba g c e2)) (\lambda (e2: -C).(clear (CHead c4 (Bind b) u) e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g -(CHead c3 (Bind b) u) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)) -(CHead c4 (Bind b) u) (csuba_head g c3 c4 H0 (Bind b) u) (clear_bind b c4 u)) -e1 (clear_gen_bind b c3 e1 u H3))) | (Flat f) \Rightarrow (\lambda (H3: -(clear (CHead c3 (Flat f) u) e1)).(let H4 \def (H1 e1 (clear_gen_flat f c3 e1 -u H3)) in (ex2_ind C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: -C).(clear c4 e2)) (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: -C).(clear (CHead c4 (Flat f) u) e2))) (\lambda (x: C).(\lambda (H5: (csuba g -e1 x)).(\lambda (H6: (clear c4 x)).(ex_intro2 C (\lambda (e2: C).(csuba g e1 -e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2)) x H5 (clear_flat c4 x -H6 f u))))) H4)))]) H2))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda -(H0: (csuba g c3 c4)).(\lambda (_: ((\forall (e1: C).((clear c3 e1) \to (ex2 -C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c4 -e2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (H2: (arity g c3 t (asucc -g a))).(\lambda (u: T).(\lambda (H3: (arity g c4 u a)).(\lambda (e1: -C).(\lambda (H4: (clear (CHead c3 (Bind Abst) t) e1)).(eq_ind_r C (CHead c3 -(Bind Abst) t) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csuba g c e2)) -(\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)))) (ex_intro2 C (\lambda -(e2: C).(csuba g (CHead c3 (Bind Abst) t) e2)) (\lambda (e2: C).(clear (CHead -c4 (Bind Abbr) u) e2)) (CHead c4 (Bind Abbr) u) (csuba_abst g c3 c4 H0 t a H2 -u H3) (clear_bind Abbr c4 u)) e1 (clear_gen_bind Abst c3 e1 t H4))))))))))))) -c1 c2 H)))). +(clear (CHead c3 k u) e1)).(K_ind (\lambda (k0: K).((clear (CHead c3 k0 u) +e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear +(CHead c4 k0 u) e2))))) (\lambda (b: B).(\lambda (H3: (clear (CHead c3 (Bind +b) u) e1)).(eq_ind_r C (CHead c3 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda +(e2: C).(csuba g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)))) +(ex_intro2 C (\lambda (e2: C).(csuba g (CHead c3 (Bind b) u) e2)) (\lambda +(e2: C).(clear (CHead c4 (Bind b) u) e2)) (CHead c4 (Bind b) u) (csuba_head g +c3 c4 H0 (Bind b) u) (clear_bind b c4 u)) e1 (clear_gen_bind b c3 e1 u H3)))) +(\lambda (f: F).(\lambda (H3: (clear (CHead c3 (Flat f) u) e1)).(let H4 \def +(H1 e1 (clear_gen_flat f c3 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csuba g +e1 e2)) (\lambda (e2: C).(clear c4 e2)) (ex2 C (\lambda (e2: C).(csuba g e1 +e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2))) (\lambda (x: +C).(\lambda (H5: (csuba g e1 x)).(\lambda (H6: (clear c4 x)).(ex_intro2 C +(\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) +u) e2)) x H5 (clear_flat c4 x H6 f u))))) H4)))) k H2))))))))) (\lambda (c3: +C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (_: ((\forall +(e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda +(e2: C).(clear c4 e2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (H2: +(arity g c3 t (asucc g a))).(\lambda (u: T).(\lambda (H3: (arity g c4 u +a)).(\lambda (e1: C).(\lambda (H4: (clear (CHead c3 (Bind Abst) t) +e1)).(eq_ind_r C (CHead c3 (Bind Abst) t) (\lambda (c: C).(ex2 C (\lambda +(e2: C).(csuba g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) +e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g (CHead c3 (Bind Abst) t) e2)) +(\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)) (CHead c4 (Bind Abbr) +u) (csuba_abst g c3 c4 H0 t a H2 u H3) (clear_bind Abbr c4 u)) e1 +(clear_gen_bind Abst c3 e1 t H4))))))))))))) c1 c2 H)))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/drop.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/drop.ma index c3a51fe8f..ac8e3fae8 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/drop.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/drop.ma @@ -34,16 +34,16 @@ G).(\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d1 (Bind Abbr) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: (csuba g c1 c2)).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csuba g c c2)) H0 (CHead d1 (Bind Abbr) u) (drop_gen_refl c1 (CHead d1 (Bind Abbr) u) H)) in -(let H2 \def (csuba_gen_abbr g d1 c2 u H1) in (ex2_ind C (\lambda (d2: C).(eq -C c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C -(\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: -C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H3: (eq C c2 (CHead x (Bind -Abbr) u))).(\lambda (H4: (csuba g d1 x)).(eq_ind_r C (CHead x (Bind Abbr) u) -(\lambda (c: C).(ex2 C (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abbr) -u))) (\lambda (d2: C).(csuba g d1 d2)))) (ex_intro2 C (\lambda (d2: C).(drop -O O (CHead x (Bind Abbr) u) (CHead d2 (Bind Abbr) u))) (\lambda (d2: -C).(csuba g d1 d2)) x (drop_refl (CHead x (Bind Abbr) u)) H4) c2 H3)))) -H2)))))))))) (\lambda (n: nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: +(let H_x \def (csuba_gen_abbr g d1 c2 u H1) in (let H2 \def H_x in (ex2_ind C +(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba +g d1 d2)) (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H3: (eq C c2 +(CHead x (Bind Abbr) u))).(\lambda (H4: (csuba g d1 x)).(eq_ind_r C (CHead x +(Bind Abbr) u) (\lambda (c: C).(ex2 C (\lambda (d2: C).(drop O O c (CHead d2 +(Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (ex_intro2 C (\lambda +(d2: C).(drop O O (CHead x (Bind Abbr) u) (CHead d2 (Bind Abbr) u))) (\lambda +(d2: C).(csuba g d1 d2)) x (drop_refl (CHead x (Bind Abbr) u)) H4) c2 H3)))) +H2))))))))))) (\lambda (n: nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abbr) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 @@ -82,12 +82,12 @@ u))).(B_ind (\lambda (b0: B).((csuba g (CHead c (Bind b0) t) c2) \to ((drop (r (Bind b0) n) O c (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda (H5: (csuba g (CHead c (Bind Abbr) t) c2)).(\lambda (H6: -(drop (r (Bind Abbr) n) O c (CHead d1 (Bind Abbr) u))).(let H7 \def -(csuba_gen_abbr g c c2 t H5) in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead -d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g c d2)) (ex2 C (\lambda (d2: -C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 -d2))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Abbr) -t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abbr) t) +(drop (r (Bind Abbr) n) O c (CHead d1 (Bind Abbr) u))).(let H_x \def +(csuba_gen_abbr g c c2 t H5) in (let H7 \def H_x in (ex2_ind C (\lambda (d2: +C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g c d2)) (ex2 +C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: +C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind +Abbr) t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abbr) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H10 \def (H c d1 u H6 g x H9) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u))) @@ -99,22 +99,22 @@ Abbr) n)) in (let H14 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abbr) u))) H11 (r (Bind Abbr) n) H13) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abbr) n x (CHead -x0 (Bind Abbr) u) H14 t) H12)))))) H10)) c2 H8)))) H7)))) (\lambda (H5: +x0 (Bind Abbr) u) H14 t) H12)))))) H10)) c2 H8)))) H7))))) (\lambda (H5: (csuba g (CHead c (Bind Abst) t) c2)).(\lambda (H6: (drop (r (Bind Abst) n) O -c (CHead d1 (Bind Abbr) u))).(let H7 \def (csuba_gen_abst g c c2 t H5) in -(or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda -(d2: C).(csuba g c d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex2 C (\lambda (d2: C).(drop -(S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) -(\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) -(\lambda (d2: C).(csuba g c d2)))).(ex2_ind C (\lambda (d2: C).(eq C c2 -(CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)) (ex2 C (\lambda -(d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g -d1 d2))) (\lambda (x: C).(\lambda (H9: (eq C c2 (CHead x (Bind Abst) -t))).(\lambda (H10: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abst) t) +c (CHead d1 (Bind Abbr) u))).(let H_x \def (csuba_gen_abst g c c2 t H5) in +(let H7 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind +Abst) t))) (\lambda (d2: C).(csuba g c d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: +C).(csuba g d1 d2))) (\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 +(Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)))).(ex2_ind C (\lambda (d2: +C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)) (ex2 +C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: +C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H9: (eq C c2 (CHead x (Bind +Abst) t))).(\lambda (H10: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abst) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H11 \def (H c d1 u H6 g x H10) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u))) @@ -151,28 +151,29 @@ C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H14: (drop n O x0 (CHead x O x0 (CHead x (Bind Abbr) u))) H14 (r (Bind Abbr) n) H16) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Bind Abbr) n x0 -(CHead x (Bind Abbr) u) H17 x1) H15)))))) H13)) c2 H9)))))))) H8)) H7)))) +(CHead x (Bind Abbr) u) H17 x1) H15)))))) H13)) c2 H9)))))))) H8)) H7))))) (\lambda (H5: (csuba g (CHead c (Bind Void) t) c2)).(\lambda (H6: (drop (r -(Bind Void) n) O c (CHead d1 (Bind Abbr) u))).(let H7 \def (csuba_gen_void g -c c2 t H5) in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Void) t))) -(\lambda (d2: C).(csuba g c d2)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 -(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: -C).(\lambda (H8: (eq C c2 (CHead x (Bind Void) t))).(\lambda (H9: (csuba g c -x)).(eq_ind_r C (CHead x (Bind Void) t) (\lambda (c0: C).(ex2 C (\lambda (d2: -C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 -d2)))) (let H10 \def (H c d1 u H6 g x H9) in (ex2_ind C (\lambda (d2: -C).(drop n O x (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) -(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind -Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (H11: -(drop n O x (CHead x0 (Bind Abbr) u))).(\lambda (H12: (csuba g d1 x0)).(let -H13 \def (refl_equal nat (r (Bind Abbr) n)) in (let H14 \def (eq_ind nat n -(\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abbr) u))) H11 (r (Bind Abbr) -n) H13) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) -t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop -(Bind Void) n x (CHead x0 (Bind Abbr) u) H14 t) H12)))))) H10)) c2 H8)))) -H7)))) b H3 H4)))) (\lambda (f: F).(\lambda (H3: (csuba g (CHead c (Flat f) -t) c2)).(\lambda (H4: (drop (r (Flat f) n) O c (CHead d1 (Bind Abbr) -u))).(let H5 \def (csuba_gen_flat g c c2 t f H3) in (ex2_2_ind C T (\lambda +(Bind Void) n) O c (CHead d1 (Bind Abbr) u))).(let H_x \def (csuba_gen_void g +c c2 t H5) in (let H7 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead +d2 (Bind Void) t))) (\lambda (d2: C).(csuba g c d2)) (ex2 C (\lambda (d2: +C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 +d2))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Void) +t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Void) t) +(\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H10 \def (H c d1 u H6 g x +H9) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S n) O +(CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g +d1 d2))) (\lambda (x0: C).(\lambda (H11: (drop n O x (CHead x0 (Bind Abbr) +u))).(\lambda (H12: (csuba g d1 x0)).(let H13 \def (refl_equal nat (r (Bind +Abbr) n)) in (let H14 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x +(CHead x0 (Bind Abbr) u))) H11 (r (Bind Abbr) n) H13) in (ex_intro2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) +u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Void) n x (CHead +x0 (Bind Abbr) u) H14 t) H12)))))) H10)) c2 H8)))) H7))))) b H3 H4)))) +(\lambda (f: F).(\lambda (H3: (csuba g (CHead c (Flat f) t) c2)).(\lambda +(H4: (drop (r (Flat f) n) O c (CHead d1 (Bind Abbr) u))).(let H_x \def +(csuba_gen_flat g c c2 t f H3) in (let H5 \def H_x in (ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g c d2))) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x0: @@ -187,7 +188,7 @@ x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (H10: (csuba g d1 x)).(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Flat f) n x0 (CHead x (Bind Abbr) u) H9 x1) H10)))) H8)) c2 -H6))))) H5))))) k H2 (drop_gen_drop k c (CHead d1 (Bind Abbr) u) t n +H6))))) H5)))))) k H2 (drop_gen_drop k c (CHead d1 (Bind Abbr) u) t n H1)))))))))))) c1)))) i). theorem csuba_drop_abst: @@ -213,89 +214,90 @@ u2 a)))))))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: T).(\lambda (H: (drop O O c1 (CHead d1 (Bind Abst) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: (csuba g c1 c2)).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csuba g c c2)) H0 (CHead d1 (Bind Abst) u1) (drop_gen_refl -c1 (CHead d1 (Bind Abst) u1) H)) in (let H2 \def (csuba_gen_abst g d1 c2 u1 -H1) in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) +c1 (CHead d1 (Bind Abst) u1) H)) in (let H_x \def (csuba_gen_abst g d1 c2 u1 +H1) in (let H2 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))) (or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +(u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C -(\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop O O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H3: +(ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: +C).(drop O O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 +d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O +O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: +A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda +(a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CHead x +(Bind Abst) u1))).(\lambda (H5: (csuba g d1 x)).(eq_ind_r C (CHead x (Bind +Abst) u1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))))) (or_introl (ex2 C (\lambda (d2: C).(drop O O (CHead x (Bind Abst) +u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x (Bind +Abst) u1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H3: (ex2 C (\lambda -(d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 -d2)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop O O c2 -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: +C).(drop O O (CHead x (Bind Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2)) x (drop_refl (CHead x (Bind Abst) u1)) H5)) c2 +H4)))) H3)) (\lambda (H3: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CHead x (Bind Abst) -u1))).(\lambda (H5: (csuba g d1 x)).(eq_ind_r C (CHead x (Bind Abst) u1) -(\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) -(or_introl (ex2 C (\lambda (d2: C).(drop O O (CHead x (Bind Abst) u1) (CHead -d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x (Bind Abst) u1) -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(drop O O (CHead x -(Bind Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) -x (drop_refl (CHead x (Bind Abst) u1)) H5)) c2 H4)))) H3)) (\lambda (H3: -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +u2 a)))) (or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C -(\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop O O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H4: (eq C c2 (CHead x0 (Bind +Abbr) x1))).(\lambda (H5: (csuba g d1 x0)).(\lambda (H6: (arity g d1 u1 +(asucc g x2))).(\lambda (H7: (arity g x0 x1 x2)).(eq_ind_r C (CHead x0 (Bind +Abbr) x1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))))) (or_intror (ex2 C (\lambda (d2: C).(drop O O (CHead x0 (Bind Abbr) +x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind +Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (x2: A).(\lambda (H4: (eq C c2 (CHead x0 (Bind Abbr) -x1))).(\lambda (H5: (csuba g d1 x0)).(\lambda (H6: (arity g d1 u1 (asucc g -x2))).(\lambda (H7: (arity g x0 x1 x2)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) -(\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) -(or_intror (ex2 C (\lambda (d2: C).(drop O O (CHead x0 (Bind Abbr) x1) (CHead -d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop O O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) -x0 x1 x2 (drop_refl (CHead x0 (Bind Abbr) x1)) H5 H6 H7)) c2 H4)))))))) H3)) -H2)))))))))) (\lambda (n: nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: -C).(\forall (u1: T).((drop n O c1 (CHead d1 (Bind Abst) u1)) \to (\forall (g: -G).(\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(drop n -O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O c2 (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a))))))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: +A).(arity g d2 u2 a)))) x0 x1 x2 (drop_refl (CHead x0 (Bind Abbr) x1)) H5 H6 +H7)) c2 H4)))))))) H3)) H2))))))))))) (\lambda (n: nat).(\lambda (H: +((\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop n O c1 (CHead d1 +(Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c1 c2) \to +(or (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop n O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c c2) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) @@ -362,63 +364,63 @@ Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))) (\lambda (H5: (csuba g (CHead c (Bind Abbr) t) c2)).(\lambda (H6: -(drop (r (Bind Abbr) n) O c (CHead d1 (Bind Abst) u1))).(let H7 \def -(csuba_gen_abbr g c c2 t H5) in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead -d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g c d2)) (or (ex2 C (\lambda (d2: -C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 -d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +(drop (r (Bind Abbr) n) O c (CHead d1 (Bind Abst) u1))).(let H_x \def +(csuba_gen_abbr g c c2 t H5) in (let H7 \def H_x in (ex2_ind C (\lambda (d2: +C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g c d2)) (or +(ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: +C).(\lambda (H8: (eq C c2 (CHead x (Bind Abbr) t))).(\lambda (H9: (csuba g c +x)).(eq_ind_r C (CHead x (Bind Abbr) t) (\lambda (c0: C).(or (ex2 C (\lambda +(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba +g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H8: -(eq C c2 (CHead x (Bind Abbr) t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C -(CHead x (Bind Abbr) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S -n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 -C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H10 \def (H c d1 u1 H6 g +x H9) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or +(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a))))))) (let H10 \def (H c d1 u1 H6 g x H9) in (or_ind -(ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: +A).(arity g d2 u2 a)))))) (\lambda (H11: (ex2 C (\lambda (d2: C).(drop n O x +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C +(\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind +Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +(CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: +C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abst) u1))).(\lambda (H13: +(csuba g d1 x0)).(let H14 \def (refl_equal nat (r (Bind Abbr) n)) in (let H15 +\def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abst) +u1))) H12 (r (Bind Abbr) n) H14) in (or_introl (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind -Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 -d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc -g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (H11: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind -Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: -C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) -(or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 -(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) -t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: -A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda -(a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x -(CHead x0 (Bind Abst) u1))).(\lambda (H13: (csuba g d1 x0)).(let H14 \def -(refl_equal nat (r (Bind Abbr) n)) in (let H15 \def (eq_ind nat n (\lambda -(n0: nat).(drop n0 O x (CHead x0 (Bind Abst) u1))) H12 (r (Bind Abbr) n) H14) -in (or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x -(Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abbr) n x (CHead x0 (Bind Abst) -u1) H15 t) H13))))))) H11)) (\lambda (H11: (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) +(_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) +(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abbr) +n x (CHead x0 (Bind Abst) u1) H15 t) H13))))))) H11)) (\lambda (H11: (ex4_3 C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda @@ -447,16 +449,16 @@ T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (drop_drop (Bind Abbr) n x (CHead x0 (Bind Abbr) x1) H17 t) H13 H14 H15))))))))))) H11)) H10)) c2 -H8)))) H7)))) (\lambda (H5: (csuba g (CHead c (Bind Abst) t) c2)).(\lambda -(H6: (drop (r (Bind Abst) n) O c (CHead d1 (Bind Abst) u1))).(let H7 \def -(csuba_gen_abst g c c2 t H5) in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 -(CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind -Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c -d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +H8)))) H7))))) (\lambda (H5: (csuba g (CHead c (Bind Abst) t) c2)).(\lambda +(H6: (drop (r (Bind Abst) n) O c (CHead d1 (Bind Abst) u1))).(let H_x \def +(csuba_gen_abst g c c2 t H5) in (let H7 \def H_x in (or_ind (ex2 C (\lambda +(d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g +c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity +g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g @@ -639,17 +641,17 @@ C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x3 x4 x5 (drop_drop (Bind Abbr) n x0 (CHead x3 (Bind Abbr) x4) H20 x1) H16 H17 -H18))))))))))) H14)) H13)) c2 H9)))))))) H8)) H7)))) (\lambda (H5: (csuba g +H18))))))))))) H14)) H13)) c2 H9)))))))) H8)) H7))))) (\lambda (H5: (csuba g (CHead c (Bind Void) t) c2)).(\lambda (H6: (drop (r (Bind Void) n) O c (CHead -d1 (Bind Abst) u1))).(let H7 \def (csuba_gen_void g c c2 t H5) in (ex2_ind C -(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Void) t))) (\lambda (d2: C).(csuba -g c d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Void) +d1 (Bind Abst) u1))).(let H_x \def (csuba_gen_void g c c2 t H5) in (let H7 +\def H_x in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Void) t))) +(\lambda (d2: C).(csuba g c d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Void) t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Void) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: @@ -726,63 +728,63 @@ T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (drop_drop (Bind Void) n x (CHead x0 (Bind Abbr) x1) H17 t) H13 H14 H15))))))))))) H11)) H10)) c2 -H8)))) H7)))) b H3 H4)))) (\lambda (f: F).(\lambda (H3: (csuba g (CHead c +H8)))) H7))))) b H3 H4)))) (\lambda (f: F).(\lambda (H3: (csuba g (CHead c (Flat f) t) c2)).(\lambda (H4: (drop (r (Flat f) n) O c (CHead d1 (Bind Abst) -u1))).(let H5 \def (csuba_gen_flat g c c2 t f H3) in (ex2_2_ind C T (\lambda -(d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g c d2))) (or (ex2 C (\lambda (d2: C).(drop (S n) O -c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead -d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq -C c2 (CHead x0 (Flat f) x1))).(\lambda (H7: (csuba g c x0)).(eq_ind_r C -(CHead x0 (Flat f) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S -n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 -C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a))))))) (let H8 \def (H0 d1 u1 H4 g x0 H7) in (or_ind (ex2 -C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a)))))) (\lambda (H9: (ex2 C (\lambda (d2: C).(drop (S n) O -x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C -(\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat -f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 -C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead -x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +u1))).(let H_x \def (csuba_gen_flat g c c2 t f H3) in (let H5 \def H_x in +(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g c d2))) (or (ex2 C (\lambda +(d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba +g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H10: -(drop (S n) O x0 (CHead x (Bind Abst) u1))).(\lambda (H11: (csuba g d1 -x)).(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (H6: (eq C c2 (CHead x0 (Flat f) x1))).(\lambda (H7: (csuba g c +x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c0: C).(or (ex2 C (\lambda +(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba +g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H8 \def (H0 d1 u1 H4 g +x0 H7) in (or_ind (ex2 C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H9: (ex2 C (\lambda +(d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba +g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2)) x (drop_drop (Flat f) n x0 (CHead x (Bind Abst) u1) -H10 x1) H11))))) H9)) (\lambda (H9: (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abbr) u2))))) +(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))) (\lambda (x: C).(\lambda (H10: (drop (S n) O x0 (CHead x (Bind Abst) +u1))).(\lambda (H11: (csuba g d1 x)).(or_introl (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) +(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Flat f) n +x0 (CHead x (Bind Abst) u1) H10 x1) H11))))) H9)) (\lambda (H9: (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda @@ -808,6 +810,6 @@ T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x2 x3 x4 (drop_drop (Flat f) n x0 (CHead x2 (Bind -Abbr) x3) H10 x1) H11 H12 H13))))))))) H9)) H8)) c2 H6))))) H5))))) k H2 +Abbr) x3) H10 x1) H11 H12 H13))))))))) H9)) H8)) c2 H6))))) H5)))))) k H2 (drop_gen_drop k c (CHead d1 (Bind Abst) u1) t n H1)))))))))))) c1)))) i). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/getl.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/getl.ma index 2bb976390..137b41453 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/getl.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csuba/getl.ma @@ -35,104 +35,108 @@ C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u))) (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))) (\lambda (x: C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind -Abbr) u))).((match x in C return (\lambda (c: C).((drop i O c1 c) \to ((clear -c (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csuba g c1 c2) \to (ex2 C +Abbr) u))).(C_ind (\lambda (c: C).((drop i O c1 c) \to ((clear c (CHead d1 +(Bind Abbr) u)) \to (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 +d2)))))))) (\lambda (n: nat).(\lambda (_: (drop i O c1 (CSort n))).(\lambda +(H4: (clear (CSort n) (CHead d1 (Bind Abbr) u))).(clear_gen_sort (CHead d1 +(Bind Abbr) u) n H4 (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda +(d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 +d2))))))))) (\lambda (x0: C).(\lambda (_: (((drop i O c1 x0) \to ((clear x0 +(CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: -C).(csuba g d1 d2)))))))) with [(CSort n) \Rightarrow (\lambda (_: (drop i O -c1 (CSort n))).(\lambda (H4: (clear (CSort n) (CHead d1 (Bind Abbr) -u))).(clear_gen_sort (CHead d1 (Bind Abbr) u) n H4 (\forall (c2: C).((csuba g -c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) -(\lambda (d2: C).(csuba g d1 d2)))))))) | (CHead c k t) \Rightarrow (\lambda -(H3: (drop i O c1 (CHead c k t))).(\lambda (H4: (clear (CHead c k t) (CHead -d1 (Bind Abbr) u))).((match k in K return (\lambda (k0: K).((drop i O c1 -(CHead c k0 t)) \to ((clear (CHead c k0 t) (CHead d1 (Bind Abbr) u)) \to -(\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) with -[(Bind b) \Rightarrow (\lambda (H5: (drop i O c1 (CHead c (Bind b) -t))).(\lambda (H6: (clear (CHead c (Bind b) t) (CHead d1 (Bind Abbr) -u))).(let H7 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda -(_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c0 _ _) \Rightarrow c0])) -(CHead d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 -(Bind Abbr) u) t H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e -in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k0 -_) \Rightarrow (match k0 in K return (\lambda (_: K).B) with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d1 (Bind Abbr) u) -(CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t H6)) in -((let H9 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: -C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead -d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind -Abbr) u) t H6)) in (\lambda (H10: (eq B Abbr b)).(\lambda (H11: (eq C d1 -c)).(\lambda (c2: C).(\lambda (H12: (csuba g c1 c2)).(let H13 \def (eq_ind_r -T t (\lambda (t0: T).(drop i O c1 (CHead c (Bind b) t0))) H5 u H9) in (let -H14 \def (eq_ind_r B b (\lambda (b0: B).(drop i O c1 (CHead c (Bind b0) u))) -H13 Abbr H10) in (let H15 \def (eq_ind_r C c (\lambda (c0: C).(drop i O c1 -(CHead c0 (Bind Abbr) u))) H14 d1 H11) in (let H16 \def (csuba_drop_abbr i c1 -d1 u H15 g c2 H12) in (ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 +C).(csuba g d1 d2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (H3: +(drop i O c1 (CHead x0 k t))).(\lambda (H4: (clear (CHead x0 k t) (CHead d1 +(Bind Abbr) u))).(K_ind (\lambda (k0: K).((drop i O c1 (CHead x0 k0 t)) \to +((clear (CHead x0 k0 t) (CHead d1 (Bind Abbr) u)) \to (\forall (c2: +C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) (\lambda (b: B).(\lambda +(H5: (drop i O c1 (CHead x0 (Bind b) t))).(\lambda (H6: (clear (CHead x0 +(Bind b) t) (CHead d1 (Bind Abbr) u))).(let H7 \def (f_equal C C (\lambda (e: +C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | +(CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abbr) u) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) t H6)) in ((let H8 \def +(f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with +[(CSort _) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow (match k0 in K +return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) +\Rightarrow Abbr])])) (CHead d1 (Bind Abbr) u) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) t H6)) in ((let H9 \def +(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with +[(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead d1 (Bind +Abbr) u) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abbr) u) +t H6)) in (\lambda (H10: (eq B Abbr b)).(\lambda (H11: (eq C d1 x0)).(\lambda +(c2: C).(\lambda (H12: (csuba g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda +(t0: T).(drop i O c1 (CHead x0 (Bind b) t0))) H5 u H9) in (let H14 \def +(eq_ind_r B b (\lambda (b0: B).(drop i O c1 (CHead x0 (Bind b0) u))) H13 Abbr +H10) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(drop i O c1 (CHead c +(Bind Abbr) u))) H14 d1 H11) in (let H16 \def (csuba_drop_abbr i c1 d1 u H15 +g c2 H12) in (ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) +u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x1: +C).(\lambda (H17: (drop i O c2 (CHead x1 (Bind Abbr) u))).(\lambda (H18: +(csuba g d1 x1)).(ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x1 (getl_intro i c2 (CHead x1 +(Bind Abbr) u) (CHead x1 (Bind Abbr) u) H17 (clear_bind Abbr x1 u)) H18)))) +H16)))))))))) H8)) H7))))) (\lambda (f: F).(\lambda (H5: (drop i O c1 (CHead +x0 (Flat f) t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind +Abbr) u))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop i O c +(CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g c c2) \to (ex2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: +C).(csuba g d1 d2))))))) (nat_ind (\lambda (n: nat).(\forall (x1: C).((drop n +O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g x1 c2) \to (ex2 C +(\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: +C).(csuba g d1 d2)))))))) (\lambda (x1: C).(\lambda (H8: (drop O O x1 (CHead +x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g x1 c2)).(let H10 +\def (eq_ind C x1 (\lambda (c: C).(csuba g c c2)) H9 (CHead x0 (Flat f) t) +(drop_gen_refl x1 (CHead x0 (Flat f) t) H8)) in (let H_y \def (clear_flat x0 +(CHead d1 (Bind Abbr) u) (clear_gen_flat f x0 (CHead d1 (Bind Abbr) u) t H6) +f t) in (let H11 \def (csuba_clear_conf g (CHead x0 (Flat f) t) c2 H10 (CHead +d1 (Bind Abbr) u) H_y) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead d1 +(Bind Abbr) u) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: +C).(getl O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) +(\lambda (x2: C).(\lambda (H12: (csuba g (CHead d1 (Bind Abbr) u) +x2)).(\lambda (H13: (clear c2 x2)).(let H_x \def (csuba_gen_abbr g d1 x2 u +H12) in (let H14 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: -C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) -(\lambda (x0: C).(\lambda (H17: (drop i O c2 (CHead x0 (Bind Abbr) -u))).(\lambda (H18: (csuba g d1 x0)).(ex_intro2 C (\lambda (d2: C).(getl i c2 -(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (getl_intro i -c2 (CHead x0 (Bind Abbr) u) (CHead x0 (Bind Abbr) u) H17 (clear_bind Abbr x0 -u)) H18)))) H16)))))))))) H8)) H7)))) | (Flat f) \Rightarrow (\lambda (H5: -(drop i O c1 (CHead c (Flat f) t))).(\lambda (H6: (clear (CHead c (Flat f) t) -(CHead d1 (Bind Abbr) u))).(let H7 \def H5 in (unintro C c1 (\lambda (c0: -C).((drop i O c0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g c0 c2) -\to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda -(d2: C).(csuba g d1 d2))))))) (nat_ind (\lambda (n: nat).(\forall (x0: -C).((drop n O x0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g x0 c2) +C).(getl O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) +(\lambda (x3: C).(\lambda (H15: (eq C x2 (CHead x3 (Bind Abbr) u))).(\lambda +(H16: (csuba g d1 x3)).(let H17 \def (eq_ind C x2 (\lambda (c: C).(clear c2 +c)) H13 (CHead x3 (Bind Abbr) u) H15) in (ex_intro2 C (\lambda (d2: C).(getl +O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x3 +(getl_intro O c2 (CHead x3 (Bind Abbr) u) c2 (drop_refl c2) H17) H16))))) +H14)))))) H11)))))))) (\lambda (n: nat).(\lambda (H8: ((\forall (x1: +C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g x1 c2) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda -(d2: C).(csuba g d1 d2)))))))) (\lambda (x0: C).(\lambda (H8: (drop O O x0 -(CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g x0 c2)).(let -H10 \def (eq_ind C x0 (\lambda (c0: C).(csuba g c0 c2)) H9 (CHead c (Flat f) -t) (drop_gen_refl x0 (CHead c (Flat f) t) H8)) in (let H_y \def (clear_flat c -(CHead d1 (Bind Abbr) u) (clear_gen_flat f c (CHead d1 (Bind Abbr) u) t H6) f -t) in (let H11 \def (csuba_clear_conf g (CHead c (Flat f) t) c2 H10 (CHead d1 -(Bind Abbr) u) H_y) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead d1 (Bind -Abbr) u) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(getl O -c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda -(x1: C).(\lambda (H12: (csuba g (CHead d1 (Bind Abbr) u) x1)).(\lambda (H13: -(clear c2 x1)).(let H14 \def (csuba_gen_abbr g d1 x1 u H12) in (ex2_ind C -(\lambda (d2: C).(eq C x1 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba -g d1 d2)) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u))) -(\lambda (d2: C).(csuba g d1 d2))) (\lambda (x2: C).(\lambda (H15: (eq C x1 -(CHead x2 (Bind Abbr) u))).(\lambda (H16: (csuba g d1 x2)).(let H17 \def -(eq_ind C x1 (\lambda (c0: C).(clear c2 c0)) H13 (CHead x2 (Bind Abbr) u) -H15) in (ex_intro2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u))) -(\lambda (d2: C).(csuba g d1 d2)) x2 (getl_intro O c2 (CHead x2 (Bind Abbr) -u) c2 (drop_refl c2) H17) H16))))) H14))))) H11)))))))) (\lambda (n: -nat).(\lambda (H8: ((\forall (x0: C).((drop n O x0 (CHead c (Flat f) t)) \to -(\forall (c2: C).((csuba g x0 c2) \to (ex2 C (\lambda (d2: C).(getl n c2 -(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))))).(\lambda -(x0: C).(\lambda (H9: (drop (S n) O x0 (CHead c (Flat f) t))).(\lambda (c2: -C).(\lambda (H10: (csuba g x0 c2)).(let H11 \def (drop_clear x0 (CHead c -(Flat f) t) n H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: -C).(\lambda (v: T).(clear x0 (CHead e (Bind b) v))))) (\lambda (_: -B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead c (Flat f) t))))) (ex2 -C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: -C).(csuba g d1 d2))) (\lambda (x1: B).(\lambda (x2: C).(\lambda (x3: -T).(\lambda (H12: (clear x0 (CHead x2 (Bind x1) x3))).(\lambda (H13: (drop n -O x2 (CHead c (Flat f) t))).(let H14 \def (csuba_clear_conf g x0 c2 H10 -(CHead x2 (Bind x1) x3) H12) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead -x2 (Bind x1) x3) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: -C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 -d2))) (\lambda (x4: C).(\lambda (H15: (csuba g (CHead x2 (Bind x1) x3) -x4)).(\lambda (H16: (clear c2 x4)).(let H17 \def (csuba_gen_bind g x1 x2 x4 -x3 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: -T).(eq C x4 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csuba g x2 e2)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 -(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x5: -B).(\lambda (x6: C).(\lambda (x7: T).(\lambda (H18: (eq C x4 (CHead x6 (Bind -x5) x7))).(\lambda (H19: (csuba g x2 x6)).(let H20 \def (eq_ind C x4 (\lambda -(c0: C).(clear c2 c0)) H16 (CHead x6 (Bind x5) x7) H18) in (let H21 \def (H8 -x2 H13 x6 H19) in (ex2_ind C (\lambda (d2: C).(getl n x6 (CHead d2 (Bind -Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(getl (S -n) c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda -(x8: C).(\lambda (H22: (getl n x6 (CHead x8 (Bind Abbr) u))).(\lambda (H23: -(csuba g d1 x8)).(ex_intro2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x8 (getl_clear_bind x5 c2 x6 x7 -H20 (CHead x8 (Bind Abbr) u) n H22) H23)))) H21)))))))) H17))))) H14))))))) -H11)))))))) i) H7))))]) H3 H4)))]) H1 H2)))) H0))))))). +(d2: C).(csuba g d1 d2))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S n) O +x1 (CHead x0 (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g x1 +c2)).(let H11 \def (drop_clear x1 (CHead x0 (Flat f) t) n H9) in (ex2_3_ind B +C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind +b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead +x0 (Flat f) t))))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x2: B).(\lambda (x3: +C).(\lambda (x4: T).(\lambda (H12: (clear x1 (CHead x3 (Bind x2) +x4))).(\lambda (H13: (drop n O x3 (CHead x0 (Flat f) t))).(let H14 \def +(csuba_clear_conf g x1 c2 H10 (CHead x3 (Bind x2) x4) H12) in (ex2_ind C +(\lambda (e2: C).(csuba g (CHead x3 (Bind x2) x4) e2)) (\lambda (e2: +C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x5: C).(\lambda (H15: +(csuba g (CHead x3 (Bind x2) x4) x5)).(\lambda (H16: (clear c2 x5)).(let H_x +\def (csuba_gen_bind g x2 x3 x5 x4 H15) in (let H17 \def H_x in (ex2_3_ind B +C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x5 (CHead e2 +(Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g +x3 e2)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2))) (\lambda (x6: B).(\lambda (x7: C).(\lambda +(x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind x6) x8))).(\lambda (H19: +(csuba g x3 x7)).(let H20 \def (eq_ind C x5 (\lambda (c: C).(clear c2 c)) H16 +(CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 H13 x7 H19) in (ex2_ind +C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abbr) u))) (\lambda (d2: +C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x9: C).(\lambda (H22: +(getl n x7 (CHead x9 (Bind Abbr) u))).(\lambda (H23: (csuba g d1 +x9)).(ex_intro2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) +(\lambda (d2: C).(csuba g d1 d2)) x9 (getl_clear_bind x6 c2 x7 x8 H20 (CHead +x9 (Bind Abbr) u) n H22) H23)))) H21)))))))) H17)))))) H14))))))) H11)))))))) +i) H7))))) k H3 H4))))))) x H1 H2)))) H0))))))). theorem csuba_getl_abst: \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).(\forall @@ -156,136 +160,142 @@ Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))) (\lambda (x: C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear -x (CHead d1 (Bind Abst) u1))).((match x in C return (\lambda (c: C).((drop i -O c1 c) \to ((clear c (CHead d1 (Bind Abst) u1)) \to (\forall (c2: C).((csuba -g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) -with [(CSort n) \Rightarrow (\lambda (_: (drop i O c1 (CSort n))).(\lambda -(H4: (clear (CSort n) (CHead d1 (Bind Abst) u1))).(clear_gen_sort (CHead d1 -(Bind Abst) u1) n H4 (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) | (CHead c k t) -\Rightarrow (\lambda (H3: (drop i O c1 (CHead c k t))).(\lambda (H4: (clear -(CHead c k t) (CHead d1 (Bind Abst) u1))).((match k in K return (\lambda (k0: -K).((drop i O c1 (CHead c k0 t)) \to ((clear (CHead c k0 t) (CHead d1 (Bind -Abst) u1)) \to (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: -C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a))))))))))) with [(Bind b) \Rightarrow (\lambda (H5: (drop -i O c1 (CHead c (Bind b) t))).(\lambda (H6: (clear (CHead c (Bind b) t) -(CHead d1 (Bind Abst) u1))).(let H7 \def (f_equal C C (\lambda (e: C).(match -e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c0 _ -_) \Rightarrow c0])) (CHead d1 (Bind Abst) u1) (CHead c (Bind b) t) -(clear_gen_bind b c (CHead d1 (Bind Abst) u1) t H6)) in ((let H8 \def -(f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with -[(CSort _) \Rightarrow Abst | (CHead _ k0 _) \Rightarrow (match k0 in K -return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) -\Rightarrow Abst])])) (CHead d1 (Bind Abst) u1) (CHead c (Bind b) t) -(clear_gen_bind b c (CHead d1 (Bind Abst) u1) t H6)) in ((let H9 \def -(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with -[(CSort _) \Rightarrow u1 | (CHead _ _ t0) \Rightarrow t0])) (CHead d1 (Bind -Abst) u1) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abst) u1) -t H6)) in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq C d1 c)).(\lambda -(c2: C).(\lambda (H12: (csuba g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda -(t0: T).(drop i O c1 (CHead c (Bind b) t0))) H5 u1 H9) in (let H14 \def -(eq_ind_r B b (\lambda (b0: B).(drop i O c1 (CHead c (Bind b0) u1))) H13 Abst -H10) in (let H15 \def (eq_ind_r C c (\lambda (c0: C).(drop i O c1 (CHead c0 -(Bind Abst) u1))) H14 d1 H11) in (let H16 \def (csuba_drop_abst i c1 d1 u1 -H15 g c2 H12) in (or_ind (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind -Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) +x (CHead d1 (Bind Abst) u1))).(C_ind (\lambda (c: C).((drop i O c1 c) \to +((clear c (CHead d1 (Bind Abst) u1)) \to (\forall (c2: C).((csuba g c1 c2) +\to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda -(H17: (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop i O c2 -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C -(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) (\lambda +(n: nat).(\lambda (_: (drop i O c1 (CSort n))).(\lambda (H4: (clear (CSort n) +(CHead d1 (Bind Abst) u1))).(clear_gen_sort (CHead d1 (Bind Abst) u1) n H4 +(\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind +Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 +d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc +g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))))))))) (\lambda (x0: C).(\lambda (_: (((drop i O c1 x0) \to ((clear x0 +(CHead d1 (Bind Abst) u1)) \to (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 +C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda -(H18: (drop i O c2 (CHead x0 (Bind Abst) u1))).(\lambda (H19: (csuba g d1 -x0)).(or_introl (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) -(ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2)) x0 (getl_intro i c2 (CHead x0 (Bind Abst) u1) (CHead -x0 (Bind Abst) u1) H18 (clear_bind Abst x0 u1)) H19))))) H17)) (\lambda (H17: -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))))).(\lambda (k: K).(\lambda +(t: T).(\lambda (H3: (drop i O c1 (CHead x0 k t))).(\lambda (H4: (clear +(CHead x0 k t) (CHead d1 (Bind Abst) u1))).(K_ind (\lambda (k0: K).((drop i O +c1 (CHead x0 k0 t)) \to ((clear (CHead x0 k0 t) (CHead d1 (Bind Abst) u1)) +\to (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i +c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a))))))))))) (\lambda (b: B).(\lambda (H5: (drop i O c1 (CHead x0 (Bind b) +t))).(\lambda (H6: (clear (CHead x0 (Bind b) t) (CHead d1 (Bind Abst) +u1))).(let H7 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda +(_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) +(CHead d1 (Bind Abst) u1) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead +d1 (Bind Abst) u1) t H6)) in ((let H8 \def (f_equal C B (\lambda (e: +C).(match e in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abst | +(CHead _ k0 _) \Rightarrow (match k0 in K return (\lambda (_: K).B) with +[(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abst])])) (CHead d1 (Bind +Abst) u1) (CHead x0 (Bind b) t) (clear_gen_bind b x0 (CHead d1 (Bind Abst) +u1) t H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e in C return +(\lambda (_: C).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ t0) +\Rightarrow t0])) (CHead d1 (Bind Abst) u1) (CHead x0 (Bind b) t) +(clear_gen_bind b x0 (CHead d1 (Bind Abst) u1) t H6)) in (\lambda (H10: (eq B +Abst b)).(\lambda (H11: (eq C d1 x0)).(\lambda (c2: C).(\lambda (H12: (csuba +g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda (t0: T).(drop i O c1 (CHead x0 +(Bind b) t0))) H5 u1 H9) in (let H14 \def (eq_ind_r B b (\lambda (b0: +B).(drop i O c1 (CHead x0 (Bind b0) u1))) H13 Abst H10) in (let H15 \def +(eq_ind_r C x0 (\lambda (c: C).(drop i O c1 (CHead c (Bind Abst) u1))) H14 d1 +H11) in (let H16 \def (csuba_drop_abst i c1 d1 u1 H15 g c2 H12) in (or_ind +(ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (x2: A).(\lambda (H18: (drop i O c2 (CHead x0 (Bind Abbr) -x1))).(\lambda (H19: (csuba g d1 x0)).(\lambda (H20: (arity g d1 u1 (asucc g -x2))).(\lambda (H21: (arity g x0 x1 x2)).(or_intror (ex2 C (\lambda (d2: +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H17: (ex2 C (\lambda +(d2: C).(drop i O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 +d2)))).(ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(getl i c2 +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind +Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 +d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc +g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))) (\lambda (x1: C).(\lambda (H18: (drop i O c2 (CHead x1 (Bind Abst) +u1))).(\lambda (H19: (csuba g d1 x1)).(or_introl (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x1 (getl_intro i c2 +(CHead x1 (Bind Abst) u1) (CHead x1 (Bind Abst) u1) H18 (clear_bind Abst x1 +u1)) H19))))) H17)) (\lambda (H17: (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda +(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 -(getl_intro i c2 (CHead x0 (Bind Abbr) x1) (CHead x0 (Bind Abbr) x1) H18 -(clear_bind Abbr x0 x1)) H19 H20 H21))))))))) H17)) H16)))))))))) H8)) H7)))) -| (Flat f) \Rightarrow (\lambda (H5: (drop i O c1 (CHead c (Flat f) -t))).(\lambda (H6: (clear (CHead c (Flat f) t) (CHead d1 (Bind Abst) -u1))).(let H7 \def H5 in (unintro C c1 (\lambda (c0: C).((drop i O c0 (CHead -c (Flat f) t)) \to (\forall (c2: C).((csuba g c0 c2) \to (or (ex2 C (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x1: +C).(\lambda (x2: T).(\lambda (x3: A).(\lambda (H18: (drop i O c2 (CHead x1 +(Bind Abbr) x2))).(\lambda (H19: (csuba g d1 x1)).(\lambda (H20: (arity g d1 +u1 (asucc g x3))).(\lambda (H21: (arity g x1 x2 x3)).(or_intror (ex2 C +(\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) +x1 x2 x3 (getl_intro i c2 (CHead x1 (Bind Abbr) x2) (CHead x1 (Bind Abbr) x2) +H18 (clear_bind Abbr x1 x2)) H19 H20 H21))))))))) H17)) H16)))))))))) H8)) +H7))))) (\lambda (f: F).(\lambda (H5: (drop i O c1 (CHead x0 (Flat f) +t))).(\lambda (H6: (clear (CHead x0 (Flat f) t) (CHead d1 (Bind Abst) +u1))).(let H7 \def H5 in (unintro C c1 (\lambda (c: C).((drop i O c (CHead x0 +(Flat f) t)) \to (\forall (c2: C).((csuba g c c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda -(a: A).(arity g d2 u2 a)))))))))) (nat_ind (\lambda (n: nat).(\forall (x0: -C).((drop n O x0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g x0 c2) +(a: A).(arity g d2 u2 a)))))))))) (nat_ind (\lambda (n: nat).(\forall (x1: +C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g x1 c2) \to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) (\lambda -(x0: C).(\lambda (H8: (drop O O x0 (CHead c (Flat f) t))).(\lambda (c2: -C).(\lambda (H9: (csuba g x0 c2)).(let H10 \def (eq_ind C x0 (\lambda (c0: -C).(csuba g c0 c2)) H9 (CHead c (Flat f) t) (drop_gen_refl x0 (CHead c (Flat -f) t) H8)) in (let H_y \def (clear_flat c (CHead d1 (Bind Abst) u1) -(clear_gen_flat f c (CHead d1 (Bind Abst) u1) t H6) f t) in (let H11 \def -(csuba_clear_conf g (CHead c (Flat f) t) c2 H10 (CHead d1 (Bind Abst) u1) +(x1: C).(\lambda (H8: (drop O O x1 (CHead x0 (Flat f) t))).(\lambda (c2: +C).(\lambda (H9: (csuba g x1 c2)).(let H10 \def (eq_ind C x1 (\lambda (c: +C).(csuba g c c2)) H9 (CHead x0 (Flat f) t) (drop_gen_refl x1 (CHead x0 (Flat +f) t) H8)) in (let H_y \def (clear_flat x0 (CHead d1 (Bind Abst) u1) +(clear_gen_flat f x0 (CHead d1 (Bind Abst) u1) t H6) f t) in (let H11 \def +(csuba_clear_conf g (CHead x0 (Flat f) t) c2 H10 (CHead d1 (Bind Abst) u1) H_y) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead d1 (Bind Abst) u1) e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda @@ -293,162 +303,164 @@ d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (x1: C).(\lambda (H12: (csuba g (CHead d1 (Bind Abst) u1) -x1)).(\lambda (H13: (clear c2 x1)).(let H14 \def (csuba_gen_abst g d1 x1 u1 -H12) in (or_ind (ex2 C (\lambda (d2: C).(eq C x1 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(eq C x1 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C -(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H15: (ex2 C (\lambda -(d2: C).(eq C x1 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 -d2)))).(ex2_ind C (\lambda (d2: C).(eq C x1 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(getl O c2 -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind -Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 -d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc -g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (x2: C).(\lambda (H16: (eq C x1 (CHead x2 (Bind Abst) -u1))).(\lambda (H17: (csuba g d1 x2)).(let H18 \def (eq_ind C x1 (\lambda -(c0: C).(clear c2 c0)) H13 (CHead x2 (Bind Abst) u1) H16) in (or_introl (ex2 -C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: -C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) -x2 (getl_intro O c2 (CHead x2 (Bind Abst) u1) c2 (drop_refl c2) H18) -H17)))))) H15)) (\lambda (H15: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(eq C x1 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C x1 (CHead d2 -(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) +a)))))) (\lambda (x2: C).(\lambda (H12: (csuba g (CHead d1 (Bind Abst) u1) +x2)).(\lambda (H13: (clear c2 x2)).(let H_x \def (csuba_gen_abst g d1 x2 u1 +H12) in (let H14 \def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C x2 (CHead +d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a))))) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x2: -C).(\lambda (x3: T).(\lambda (x4: A).(\lambda (H16: (eq C x1 (CHead x2 (Bind -Abbr) x3))).(\lambda (H17: (csuba g d1 x2)).(\lambda (H18: (arity g d1 u1 -(asucc g x4))).(\lambda (H19: (arity g x2 x3 x4)).(let H20 \def (eq_ind C x1 -(\lambda (c0: C).(clear c2 c0)) H13 (CHead x2 (Bind Abbr) x3) H16) in -(or_intror (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda +(H15: (ex2 C (\lambda (d2: C).(eq C x2 (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(eq C x2 (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: +C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a)))))) (\lambda (x3: C).(\lambda (H16: (eq C x2 (CHead x3 +(Bind Abst) u1))).(\lambda (H17: (csuba g d1 x3)).(let H18 \def (eq_ind C x2 +(\lambda (c: C).(clear c2 c)) H13 (CHead x3 (Bind Abst) u1) H16) in +(or_introl (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C +(\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2)) x3 (getl_intro O c2 (CHead x3 (Bind Abst) u1) c2 +(drop_refl c2) H18) H17)))))) H15)) (\lambda (H15: (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(eq C x2 (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(eq C x2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: +C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: +A).(\lambda (H16: (eq C x2 (CHead x3 (Bind Abbr) x4))).(\lambda (H17: (csuba +g d1 x3)).(\lambda (H18: (arity g d1 u1 (asucc g x5))).(\lambda (H19: (arity +g x3 x4 x5)).(let H20 \def (eq_ind C x2 (\lambda (c: C).(clear c2 c)) H13 +(CHead x3 (Bind Abbr) x4) H16) in (or_intror (ex2 C (\lambda (d2: C).(getl O +c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))) x2 x3 x4 (getl_intro O c2 (CHead x2 (Bind Abbr) x3) c2 (drop_refl -c2) H20) H17 H18 H19)))))))))) H15)) H14))))) H11)))))))) (\lambda (n: -nat).(\lambda (H8: ((\forall (x0: C).((drop n O x0 (CHead c (Flat f) t)) \to -(\forall (c2: C).((csuba g x0 c2) \to (or (ex2 C (\lambda (d2: C).(getl n c2 -(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind -Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 -d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc -g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))))))))).(\lambda (x0: C).(\lambda (H9: (drop (S n) O x0 (CHead c (Flat -f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g x0 c2)).(let H11 \def -(drop_clear x0 (CHead c (Flat f) t) n H9) in (ex2_3_ind B C T (\lambda (b: -B).(\lambda (e: C).(\lambda (v: T).(clear x0 (CHead e (Bind b) v))))) -(\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead c (Flat f) -t))))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) +u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x3 x4 x5 (getl_intro O c2 (CHead +x3 (Bind Abbr) x4) c2 (drop_refl c2) H20) H17 H18 H19)))))))))) H15)) +H14)))))) H11)))))))) (\lambda (n: nat).(\lambda (H8: ((\forall (x1: +C).((drop n O x1 (CHead x0 (Flat f) t)) \to (\forall (c2: C).((csuba g x1 c2) +\to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda +(u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x1: -B).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (clear x0 (CHead x2 (Bind -x1) x3))).(\lambda (H13: (drop n O x2 (CHead c (Flat f) t))).(let H14 \def -(csuba_clear_conf g x0 c2 H10 (CHead x2 (Bind x1) x3) H12) in (ex2_ind C -(\lambda (e2: C).(csuba g (CHead x2 (Bind x1) x3) e2)) (\lambda (e2: -C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind -Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))))))))).(\lambda (x1: C).(\lambda (H9: (drop (S n) O x1 (CHead x0 (Flat +f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g x1 c2)).(let H11 \def +(drop_clear x1 (CHead x0 (Flat f) t) n H9) in (ex2_3_ind B C T (\lambda (b: +B).(\lambda (e: C).(\lambda (v: T).(clear x1 (CHead e (Bind b) v))))) +(\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead x0 (Flat +f) t))))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (x4: C).(\lambda (H15: (csuba g (CHead x2 (Bind x1) x3) -x4)).(\lambda (H16: (clear c2 x4)).(let H17 \def (csuba_gen_bind g x1 x2 x4 -x3 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: -T).(eq C x4 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: -C).(\lambda (_: T).(csuba g x2 e2)))) (or (ex2 C (\lambda (d2: C).(getl (S n) -c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 +a)))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: T).(\lambda (H12: +(clear x1 (CHead x3 (Bind x2) x4))).(\lambda (H13: (drop n O x3 (CHead x0 +(Flat f) t))).(let H14 \def (csuba_clear_conf g x1 c2 H10 (CHead x3 (Bind x2) +x4) H12) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead x3 (Bind x2) x4) e2)) +(\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 -u2 a)))))) (\lambda (x5: B).(\lambda (x6: C).(\lambda (x7: T).(\lambda (H18: -(eq C x4 (CHead x6 (Bind x5) x7))).(\lambda (H19: (csuba g x2 x6)).(let H20 -\def (eq_ind C x4 (\lambda (c0: C).(clear c2 c0)) H16 (CHead x6 (Bind x5) x7) -H18) in (let H21 \def (H8 x2 H13 x6 H19) in (or_ind (ex2 C (\lambda (d2: -C).(getl n x6 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x6 -(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity -g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 -(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))) (\lambda (H22: (ex2 C (\lambda (d2: C).(getl n x6 (CHead d2 (Bind -Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: -C).(getl n x6 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) -(or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) -(\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x8: -C).(\lambda (H23: (getl n x6 (CHead x8 (Bind Abst) u1))).(\lambda (H24: -(csuba g d1 x8)).(or_introl (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 -(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g -a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a))))) (ex_intro2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) -u1))) (\lambda (d2: C).(csuba g d1 d2)) x8 (getl_clear_bind x5 c2 x6 x7 H20 -(CHead x8 (Bind Abst) u1) n H23) H24))))) H22)) (\lambda (H22: (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x6 (CHead d2 (Bind -Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 -d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc -g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(getl n x6 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +u2 a)))))) (\lambda (x5: C).(\lambda (H15: (csuba g (CHead x3 (Bind x2) x4) +x5)).(\lambda (H16: (clear c2 x5)).(let H_x \def (csuba_gen_bind g x2 x3 x5 +x4 H15) in (let H17 \def H_x in (ex2_3_ind B C T (\lambda (b2: B).(\lambda +(e2: C).(\lambda (v2: T).(eq C x5 (CHead e2 (Bind b2) v2))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (_: T).(csuba g x3 e2)))) (or (ex2 C (\lambda +(d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g +d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl +(S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x6: B).(\lambda (x7: +C).(\lambda (x8: T).(\lambda (H18: (eq C x5 (CHead x7 (Bind x6) +x8))).(\lambda (H19: (csuba g x3 x7)).(let H20 \def (eq_ind C x5 (\lambda (c: +C).(clear c2 c)) H16 (CHead x7 (Bind x6) x8) H18) in (let H21 \def (H8 x3 H13 +x7 H19) in (or_ind (ex2 C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abbr) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or +(ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda +(H22: (ex2 C (\lambda (d2: C).(getl n x7 (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(getl n x7 (CHead d2 +(Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda -(a: A).(arity g d2 u2 a)))))) (\lambda (x8: C).(\lambda (x9: T).(\lambda -(x10: A).(\lambda (H23: (getl n x6 (CHead x8 (Bind Abbr) x9))).(\lambda (H24: -(csuba g d1 x8)).(\lambda (H25: (arity g d1 u1 (asucc g x10))).(\lambda (H26: -(arity g x8 x9 x10)).(or_intror (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead -d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) +(a: A).(arity g d2 u2 a)))))) (\lambda (x9: C).(\lambda (H23: (getl n x7 +(CHead x9 (Bind Abst) u1))).(\lambda (H24: (csuba g d1 x9)).(or_introl (ex2 C +(\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: +C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: +C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 +d2)) x9 (getl_clear_bind x6 c2 x7 x8 H20 (CHead x9 (Bind Abst) u1) n H23) +H24))))) H22)) (\lambda (H22: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(getl n x7 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C +T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x7 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g +a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +a)))))) (\lambda (x9: C).(\lambda (x10: T).(\lambda (x11: A).(\lambda (H23: +(getl n x7 (CHead x9 (Bind Abbr) x10))).(\lambda (H24: (csuba g d1 +x9)).(\lambda (H25: (arity g d1 u1 (asucc g x11))).(\lambda (H26: (arity g x9 +x10 x11)).(or_intror (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind +Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 @@ -456,8 +468,8 @@ a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x8 x9 x10 (getl_clear_bind x5 c2 -x6 x7 H20 (CHead x8 (Bind Abbr) x9) n H23) H24 H25 H26))))))))) H22)) -H21)))))))) H17))))) H14))))))) H11)))))))) i) H7))))]) H3 H4)))]) H1 H2)))) -H0))))))). +(u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x9 x10 x11 (getl_clear_bind x6 +c2 x7 x8 H20 (CHead x9 (Bind Abbr) x10) n H23) H24 H25 H26))))))))) H22)) +H21)))))))) H17)))))) H14))))))) H11)))))))) i) H7))))) k H3 H4))))))) x H1 +H2)))) H0))))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/clear.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/clear.ma index 23e5560c2..ede2bd16f 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/clear.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/clear.ma @@ -50,39 +50,38 @@ j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (clear c2 c0) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H3: (eq nat O (s k x1))).(\lambda (H4: (eq C c2 (CHead c k x0))).(\lambda (H5: (subst0 x1 v t x0)).(eq_ind_r C (CHead c k -x0) (\lambda (c3: C).(clear c3 c0)) ((match k in K return (\lambda (k0: -K).((clear (CHead c k0 t) c0) \to ((eq nat O (s k0 x1)) \to (clear (CHead c -k0 x0) c0)))) with [(Bind b) \Rightarrow (\lambda (_: (clear (CHead c (Bind -b) t) c0)).(\lambda (H7: (eq nat O (s (Bind b) x1))).(let H8 \def (eq_ind nat -O (\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O -\Rightarrow True | (S _) \Rightarrow False])) I (S x1) H7) in (False_ind -(clear (CHead c (Bind b) x0) c0) H8)))) | (Flat f) \Rightarrow (\lambda (H6: -(clear (CHead c (Flat f) t) c0)).(\lambda (H7: (eq nat O (s (Flat f) -x1))).(let H8 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n v t x0)) H5 O -H7) in (clear_flat c c0 (clear_gen_flat f c c0 t H6) f x0))))]) H1 H3) c2 -H4)))))) H2)) (\lambda (H2: (ex3_2 C nat (\lambda (_: C).(\lambda (j: -nat).(eq nat O (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead -c3 k t)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c -c2))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat O (s k -j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (clear c2 c0) (\lambda (x0: -C).(\lambda (x1: nat).(\lambda (H3: (eq nat O (s k x1))).(\lambda (H4: (eq C -c2 (CHead x0 k t))).(\lambda (H5: (csubst0 x1 v c x0)).(eq_ind_r C (CHead x0 -k t) (\lambda (c3: C).(clear c3 c0)) ((match k in K return (\lambda (k0: -K).((clear (CHead c k0 t) c0) \to ((eq nat O (s k0 x1)) \to (clear (CHead x0 -k0 t) c0)))) with [(Bind b) \Rightarrow (\lambda (_: (clear (CHead c (Bind b) -t) c0)).(\lambda (H7: (eq nat O (s (Bind b) x1))).(let H8 \def (eq_ind nat O -(\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O -\Rightarrow True | (S _) \Rightarrow False])) I (S x1) H7) in (False_ind -(clear (CHead x0 (Bind b) t) c0) H8)))) | (Flat f) \Rightarrow (\lambda (H6: -(clear (CHead c (Flat f) t) c0)).(\lambda (H7: (eq nat O (s (Flat f) -x1))).(let H8 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c x0)) H5 -O H7) in (clear_flat x0 c0 (H x0 v H8 c0 (clear_gen_flat f c c0 t H6)) f -t))))]) H1 H3) c2 H4)))))) H2)) (\lambda (H2: (ex4_3 T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: +x0) (\lambda (c3: C).(clear c3 c0)) (K_ind (\lambda (k0: K).((clear (CHead c +k0 t) c0) \to ((eq nat O (s k0 x1)) \to (clear (CHead c k0 x0) c0)))) +(\lambda (b: B).(\lambda (_: (clear (CHead c (Bind b) t) c0)).(\lambda (H7: +(eq nat O (s (Bind b) x1))).(let H8 \def (eq_ind nat O (\lambda (ee: +nat).(match ee in nat return (\lambda (_: nat).Prop) with [O \Rightarrow True +| (S _) \Rightarrow False])) I (S x1) H7) in (False_ind (clear (CHead c (Bind +b) x0) c0) H8))))) (\lambda (f: F).(\lambda (H6: (clear (CHead c (Flat f) t) +c0)).(\lambda (H7: (eq nat O (s (Flat f) x1))).(let H8 \def (eq_ind_r nat x1 +(\lambda (n: nat).(subst0 n v t x0)) H5 O H7) in (clear_flat c c0 +(clear_gen_flat f c c0 t H6) f x0))))) k H1 H3) c2 H4)))))) H2)) (\lambda +(H2: (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j)))) +(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3))))).(ex3_2_ind C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j +v c c3))) (clear c2 c0) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H3: (eq +nat O (s k x1))).(\lambda (H4: (eq C c2 (CHead x0 k t))).(\lambda (H5: +(csubst0 x1 v c x0)).(eq_ind_r C (CHead x0 k t) (\lambda (c3: C).(clear c3 +c0)) (K_ind (\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat O (s k0 +x1)) \to (clear (CHead x0 k0 t) c0)))) (\lambda (b: B).(\lambda (_: (clear +(CHead c (Bind b) t) c0)).(\lambda (H7: (eq nat O (s (Bind b) x1))).(let H8 +\def (eq_ind nat O (\lambda (ee: nat).(match ee in nat return (\lambda (_: +nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x1) H7) +in (False_ind (clear (CHead x0 (Bind b) t) c0) H8))))) (\lambda (f: +F).(\lambda (H6: (clear (CHead c (Flat f) t) c0)).(\lambda (H7: (eq nat O (s +(Flat f) x1))).(let H8 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c +x0)) H5 O H7) in (clear_flat x0 c0 (H x0 v H8 c0 (clear_gen_flat f c c0 t +H6)) f t))))) k H1 H3) c2 H4)))))) H2)) (\lambda (H2: (ex4_3 T C nat (\lambda +(_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: -T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c c2)))))).(ex4_3_ind T C +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t @@ -90,19 +89,19 @@ u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (clear c2 c0) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: nat).(\lambda (H3: (eq nat O (s k x2))).(\lambda (H4: (eq C c2 (CHead x1 k x0))).(\lambda (H5: (subst0 x2 v t x0)).(\lambda (H6: (csubst0 x2 v c -x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c3: C).(clear c3 c0)) ((match k in -K return (\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat O (s k0 -x2)) \to (clear (CHead x1 k0 x0) c0)))) with [(Bind b) \Rightarrow (\lambda -(_: (clear (CHead c (Bind b) t) c0)).(\lambda (H8: (eq nat O (s (Bind b) -x2))).(let H9 \def (eq_ind nat O (\lambda (ee: nat).(match ee in nat return -(\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) -I (S x2) H8) in (False_ind (clear (CHead x1 (Bind b) x0) c0) H9)))) | (Flat -f) \Rightarrow (\lambda (H7: (clear (CHead c (Flat f) t) c0)).(\lambda (H8: -(eq nat O (s (Flat f) x2))).(let H9 \def (eq_ind_r nat x2 (\lambda (n: -nat).(csubst0 n v c x1)) H6 O H8) in (let H10 \def (eq_ind_r nat x2 (\lambda -(n: nat).(subst0 n v t x0)) H5 O H8) in (clear_flat x1 c0 (H x1 v H9 c0 -(clear_gen_flat f c c0 t H7)) f x0)))))]) H1 H3) c2 H4)))))))) H2)) -(csubst0_gen_head k c c2 t v O H0))))))))))) c1). +x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c3: C).(clear c3 c0)) (K_ind +(\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat O (s k0 x2)) \to +(clear (CHead x1 k0 x0) c0)))) (\lambda (b: B).(\lambda (_: (clear (CHead c +(Bind b) t) c0)).(\lambda (H8: (eq nat O (s (Bind b) x2))).(let H9 \def +(eq_ind nat O (\lambda (ee: nat).(match ee in nat return (\lambda (_: +nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x2) H8) +in (False_ind (clear (CHead x1 (Bind b) x0) c0) H9))))) (\lambda (f: +F).(\lambda (H7: (clear (CHead c (Flat f) t) c0)).(\lambda (H8: (eq nat O (s +(Flat f) x2))).(let H9 \def (eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n v c +x1)) H6 O H8) in (let H10 \def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 n v +t x0)) H5 O H8) in (clear_flat x1 c0 (H x1 v H9 c0 (clear_gen_flat f c c0 t +H7)) f x0)))))) k H1 H3) c2 H4)))))))) H2)) (csubst0_gen_head k c c2 t v O +H0))))))))))) c1). theorem csubst0_clear_O_back: \forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 O v c1 c2) \to @@ -134,40 +133,39 @@ nat).(eq nat O (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (clear (CHead c k t) c0) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H3: (eq nat O (s k x1))).(\lambda (H4: (eq C c2 (CHead c k x0))).(\lambda (H5: (subst0 x1 v -t x0)).(let H6 \def (eq_ind C c2 (\lambda (c: C).(clear c c0)) H1 (CHead c k -x0) H4) in ((match k in K return (\lambda (k0: K).((eq nat O (s k0 x1)) \to -((clear (CHead c k0 x0) c0) \to (clear (CHead c k0 t) c0)))) with [(Bind b) -\Rightarrow (\lambda (H7: (eq nat O (s (Bind b) x1))).(\lambda (_: (clear -(CHead c (Bind b) x0) c0)).(let H9 \def (eq_ind nat O (\lambda (ee: -nat).(match ee in nat return (\lambda (_: nat).Prop) with [O \Rightarrow True -| (S _) \Rightarrow False])) I (S x1) H7) in (False_ind (clear (CHead c (Bind -b) t) c0) H9)))) | (Flat f) \Rightarrow (\lambda (H7: (eq nat O (s (Flat f) -x1))).(\lambda (H8: (clear (CHead c (Flat f) x0) c0)).(let H9 \def (eq_ind_r -nat x1 (\lambda (n: nat).(subst0 n v t x0)) H5 O H7) in (clear_flat c c0 -(clear_gen_flat f c c0 x0 H8) f t))))]) H3 H6))))))) H2)) (\lambda (H2: -(ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda -(c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c2: -C).(\lambda (j: nat).(csubst0 j v c c2))))).(ex3_2_ind C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j -v c c3))) (clear (CHead c k t) c0) (\lambda (x0: C).(\lambda (x1: -nat).(\lambda (H3: (eq nat O (s k x1))).(\lambda (H4: (eq C c2 (CHead x0 k -t))).(\lambda (H5: (csubst0 x1 v c x0)).(let H6 \def (eq_ind C c2 (\lambda -(c: C).(clear c c0)) H1 (CHead x0 k t) H4) in ((match k in K return (\lambda -(k0: K).((eq nat O (s k0 x1)) \to ((clear (CHead x0 k0 t) c0) \to (clear -(CHead c k0 t) c0)))) with [(Bind b) \Rightarrow (\lambda (H7: (eq nat O (s -(Bind b) x1))).(\lambda (_: (clear (CHead x0 (Bind b) t) c0)).(let H9 \def -(eq_ind nat O (\lambda (ee: nat).(match ee in nat return (\lambda (_: +t x0)).(let H6 \def (eq_ind C c2 (\lambda (c3: C).(clear c3 c0)) H1 (CHead c +k x0) H4) in (K_ind (\lambda (k0: K).((eq nat O (s k0 x1)) \to ((clear (CHead +c k0 x0) c0) \to (clear (CHead c k0 t) c0)))) (\lambda (b: B).(\lambda (H7: +(eq nat O (s (Bind b) x1))).(\lambda (_: (clear (CHead c (Bind b) x0) +c0)).(let H9 \def (eq_ind nat O (\lambda (ee: nat).(match ee in nat return +(\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) +I (S x1) H7) in (False_ind (clear (CHead c (Bind b) t) c0) H9))))) (\lambda +(f: F).(\lambda (H7: (eq nat O (s (Flat f) x1))).(\lambda (H8: (clear (CHead +c (Flat f) x0) c0)).(let H9 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n +v t x0)) H5 O H7) in (clear_flat c c0 (clear_gen_flat f c c0 x0 H8) f t))))) +k H3 H6))))))) H2)) (\lambda (H2: (ex3_2 C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat O (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead +c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat O (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (clear (CHead c k t) c0) +(\lambda (x0: C).(\lambda (x1: nat).(\lambda (H3: (eq nat O (s k +x1))).(\lambda (H4: (eq C c2 (CHead x0 k t))).(\lambda (H5: (csubst0 x1 v c +x0)).(let H6 \def (eq_ind C c2 (\lambda (c3: C).(clear c3 c0)) H1 (CHead x0 k +t) H4) in (K_ind (\lambda (k0: K).((eq nat O (s k0 x1)) \to ((clear (CHead x0 +k0 t) c0) \to (clear (CHead c k0 t) c0)))) (\lambda (b: B).(\lambda (H7: (eq +nat O (s (Bind b) x1))).(\lambda (_: (clear (CHead x0 (Bind b) t) c0)).(let +H9 \def (eq_ind nat O (\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x1) H7) -in (False_ind (clear (CHead c (Bind b) t) c0) H9)))) | (Flat f) \Rightarrow -(\lambda (H7: (eq nat O (s (Flat f) x1))).(\lambda (H8: (clear (CHead x0 +in (False_ind (clear (CHead c (Bind b) t) c0) H9))))) (\lambda (f: +F).(\lambda (H7: (eq nat O (s (Flat f) x1))).(\lambda (H8: (clear (CHead x0 (Flat f) t) c0)).(let H9 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c x0)) H5 O H7) in (clear_flat c c0 (H x0 v H9 c0 (clear_gen_flat f x0 c0 t -H8)) f t))))]) H3 H6))))))) H2)) (\lambda (H2: (ex4_3 T C nat (\lambda (_: +H8)) f t))))) k H3 H6))))))) H2)) (\lambda (H2: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: -T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c c2)))))).(ex4_3_ind T C +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t @@ -175,19 +173,19 @@ u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (clear (CHead c k t) c0) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: nat).(\lambda (H3: (eq nat O (s k x2))).(\lambda (H4: (eq C c2 (CHead x1 k x0))).(\lambda (H5: (subst0 x2 v t x0)).(\lambda (H6: (csubst0 x2 v c -x1)).(let H7 \def (eq_ind C c2 (\lambda (c: C).(clear c c0)) H1 (CHead x1 k -x0) H4) in ((match k in K return (\lambda (k0: K).((eq nat O (s k0 x2)) \to -((clear (CHead x1 k0 x0) c0) \to (clear (CHead c k0 t) c0)))) with [(Bind b) -\Rightarrow (\lambda (H8: (eq nat O (s (Bind b) x2))).(\lambda (_: (clear -(CHead x1 (Bind b) x0) c0)).(let H10 \def (eq_ind nat O (\lambda (ee: -nat).(match ee in nat return (\lambda (_: nat).Prop) with [O \Rightarrow True -| (S _) \Rightarrow False])) I (S x2) H8) in (False_ind (clear (CHead c (Bind -b) t) c0) H10)))) | (Flat f) \Rightarrow (\lambda (H8: (eq nat O (s (Flat f) -x2))).(\lambda (H9: (clear (CHead x1 (Flat f) x0) c0)).(let H10 \def -(eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n v c x1)) H6 O H8) in (let H11 -\def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 n v t x0)) H5 O H8) in -(clear_flat c c0 (H x1 v H10 c0 (clear_gen_flat f x1 c0 x0 H9)) f t)))))]) H3 -H7))))))))) H2)) (csubst0_gen_head k c c2 t v O H0))))))))))) c1). +x1)).(let H7 \def (eq_ind C c2 (\lambda (c3: C).(clear c3 c0)) H1 (CHead x1 k +x0) H4) in (K_ind (\lambda (k0: K).((eq nat O (s k0 x2)) \to ((clear (CHead +x1 k0 x0) c0) \to (clear (CHead c k0 t) c0)))) (\lambda (b: B).(\lambda (H8: +(eq nat O (s (Bind b) x2))).(\lambda (_: (clear (CHead x1 (Bind b) x0) +c0)).(let H10 \def (eq_ind nat O (\lambda (ee: nat).(match ee in nat return +(\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) +I (S x2) H8) in (False_ind (clear (CHead c (Bind b) t) c0) H10))))) (\lambda +(f: F).(\lambda (H8: (eq nat O (s (Flat f) x2))).(\lambda (H9: (clear (CHead +x1 (Flat f) x0) c0)).(let H10 \def (eq_ind_r nat x2 (\lambda (n: +nat).(csubst0 n v c x1)) H6 O H8) in (let H11 \def (eq_ind_r nat x2 (\lambda +(n: nat).(subst0 n v t x0)) H5 O H8) in (clear_flat c c0 (H x1 v H10 c0 +(clear_gen_flat f x1 c0 x0 H9)) f t)))))) k H3 H7))))))))) H2)) +(csubst0_gen_head k c c2 t v O H0))))))))))) c1). theorem csubst0_clear_S: \forall (c1: C).(\forall (c2: C).(\forall (v: T).(\forall (i: nat).((csubst0 @@ -325,193 +323,193 @@ C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear c3 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2))))))))) ((match k in K return (\lambda (k0: K).((clear (CHead c k0 t) c0) -\to ((eq nat (S i) (s k0 x1)) \to (or4 (clear (CHead c k0 x0) c0) (ex3_4 B C -T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: -T).(\lambda (u2: T).(clear (CHead c k0 x0) (CHead e (Bind b) u2)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v -u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead c k0 x0) -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead c k0 x0) (CHead e2 (Bind b) -u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2))))))))))) with [(Bind b) \Rightarrow (\lambda (H6: (clear (CHead c (Bind -b) t) c0)).(\lambda (H7: (eq nat (S i) (s (Bind b) x1))).(let H8 \def -(f_equal nat nat (\lambda (e: nat).(match e in nat return (\lambda (_: -nat).nat) with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S x1) H7) in -(let H9 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n v t x0)) H5 i H8) -in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(or4 (clear (CHead c -(Bind b) x0) c3) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda -(u1: T).(\lambda (_: T).(eq C c3 (CHead e (Bind b0) u1)))))) (\lambda (b0: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead c (Bind b) -x0) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b0: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Bind -b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear (CHead c (Bind b) x0) (CHead e2 (Bind b0) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C c3 (CHead e1 (Bind b0) u1))))))) (\lambda (b0: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead c (Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) (or4_intro1 (clear (CHead c -(Bind b) x0) (CHead c (Bind b) t)) (ex3_4 B C T T (\lambda (b0: B).(\lambda -(e: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e -(Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead c (Bind b) x0) (CHead e (Bind b0) u2)))))) (\lambda (_: +e2))))))))) (K_ind (\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat +(S i) (s k0 x1)) \to (or4 (clear (CHead c k0 x0) c0) (ex3_4 B C T T (\lambda +(b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e +(Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead c k0 x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) u)))))) (\lambda (b0: +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead c k0 x0) (CHead e2 (Bind b) +u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind +b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead c k0 x0) (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))))) +(\lambda (b: B).(\lambda (H6: (clear (CHead c (Bind b) t) c0)).(\lambda (H7: +(eq nat (S i) (s (Bind b) x1))).(let H8 \def (f_equal nat nat (\lambda (e: +nat).(match e in nat return (\lambda (_: nat).nat) with [O \Rightarrow i | (S +n) \Rightarrow n])) (S i) (S x1) H7) in (let H9 \def (eq_ind_r nat x1 +(\lambda (n: nat).(subst0 n v t x0)) H5 i H8) in (eq_ind_r C (CHead c (Bind +b) t) (\lambda (c3: C).(or4 (clear (CHead c (Bind b) x0) c3) (ex3_4 B C T T +(\lambda (b0: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c3 +(CHead e (Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead c (Bind b) x0) (CHead e (Bind b0) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c3 (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead c (Bind b) x0) (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq -C (CHead c (Bind b) t) (CHead e1 (Bind b0) u1))))))) (\lambda (b0: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead c (Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C T T (\lambda -(b0: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind -b) t) (CHead e (Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda -(_: T).(\lambda (u2: T).(clear (CHead c (Bind b) x0) (CHead e (Bind b0) -u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2))))) b c t x0 (refl_equal C (CHead c (Bind b) t)) -(clear_bind b c x0) H9)) c0 (clear_gen_bind b c c0 t H6)))))) | (Flat f) -\Rightarrow (\lambda (H6: (clear (CHead c (Flat f) t) c0)).(\lambda (H7: (eq -nat (S i) (s (Flat f) x1))).(let H8 \def (f_equal nat nat (\lambda (e: -nat).e) (S i) (s (Flat f) x1) H7) in (let H9 \def (eq_ind_r nat x1 (\lambda -(n: nat).(subst0 n v t x0)) H5 (S i) H8) in (or4_intro0 (clear (CHead c (Flat -f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead c (Flat f) -x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +C c3 (CHead e1 (Bind b0) u1))))))) (\lambda (b0: B).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead c (Bind b) x0) (CHead +e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +i v e1 e2))))))))) (or4_intro1 (clear (CHead c (Bind b) x0) (CHead c (Bind b) +t)) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda (u1: T).(\lambda +(_: T).(eq C (CHead c (Bind b) t) (CHead e (Bind b0) u1)))))) (\lambda (b0: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead c (Bind b) +x0) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c (Bind b) +t) (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead c (Bind b) x0) (CHead e2 (Bind b0) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e1 +(Bind b0) u1))))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead c (Bind b) x0) (CHead e2 +(Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))) (ex3_4_intro B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e (Bind b0) u1)))))) +(\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead c (Bind b) x0) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2))))) b c t x0 +(refl_equal C (CHead c (Bind b) t)) (clear_bind b c x0) H9)) c0 +(clear_gen_bind b c c0 t H6))))))) (\lambda (f: F).(\lambda (H6: (clear +(CHead c (Flat f) t) c0)).(\lambda (H7: (eq nat (S i) (s (Flat f) x1))).(let +H8 \def (f_equal nat nat (\lambda (e: nat).e) (S i) (s (Flat f) x1) H7) in +(let H9 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n v t x0)) H5 (S i) +H8) in (or4_intro0 (clear (CHead c (Flat f) x0) c0) (ex3_4 B C T T (\lambda +(b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e +(Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead c (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead c (Flat f) x0) (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear (CHead c (Flat f) x0) (CHead e2 (Bind b) +u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) +(clear_flat c c0 (clear_gen_flat f c c0 t H6) f x0))))))) k H1 H3) c2 +H4)))))) H2)) (\lambda (H2: (ex3_2 C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat (S i) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 +(CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (or4 (clear c2 c0) (ex3_4 B C +T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear c2 (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear c2 (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v e1 e2)))))))) (\lambda (x0: C).(\lambda (x1: +nat).(\lambda (H3: (eq nat (S i) (s k x1))).(\lambda (H4: (eq C c2 (CHead x0 +k t))).(\lambda (H5: (csubst0 x1 v c x0)).(eq_ind_r C (CHead x0 k t) (\lambda +(c3: C).(or4 (clear c3 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c3 +(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear (CHead c (Flat f) x0) (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead c (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (clear_flat c c0 (clear_gen_flat -f c c0 t H6) f x0))))))]) H1 H3) c2 H4)))))) H2)) (\lambda (H2: (ex3_2 C nat -(\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k j)))) (\lambda (c3: -C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c2: C).(\lambda (j: -nat).(csubst0 j v c c2))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: -nat).(eq nat (S i) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 -(CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))) -(or4 (clear c2 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda -(u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind -b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda -(x0: C).(\lambda (x1: nat).(\lambda (H3: (eq nat (S i) (s k x1))).(\lambda -(H4: (eq C c2 (CHead x0 k t))).(\lambda (H5: (csubst0 x1 v c x0)).(eq_ind_r C -(CHead x0 k t) (\lambda (c3: C).(or4 (clear c3 c0) (ex3_4 B C T T (\lambda -(b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e -(Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda -(u2: T).(clear c3 (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear c3 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -c3 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -i v e1 e2))))))))) ((match k in K return (\lambda (k0: K).((clear (CHead c k0 -t) c0) \to ((eq nat (S i) (s k0 x1)) \to (or4 (clear (CHead x0 k0 t) c0) -(ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: -T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: -C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 k0 t) (CHead e (Bind b) -u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear -(CHead x0 k0 t) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +T).(clear c3 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 k0 t) -(CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -i v e1 e2))))))))))) with [(Bind b) \Rightarrow (\lambda (H6: (clear (CHead c -(Bind b) t) c0)).(\lambda (H7: (eq nat (S i) (s (Bind b) x1))).(let H8 \def -(f_equal nat nat (\lambda (e: nat).(match e in nat return (\lambda (_: -nat).nat) with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S x1) H7) in -(let H9 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c x0)) H5 i H8) -in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(or4 (clear (CHead x0 -(Bind b) t) c3) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c3 (CHead e (Bind b0) u1)))))) (\lambda (b0: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Bind b) -t) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b0: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Bind -b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear (CHead x0 (Bind b) t) (CHead e2 (Bind b0) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C c3 (CHead e1 (Bind b0) u1))))))) (\lambda (b0: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x0 (Bind b) t) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) (or4_intro2 (clear (CHead x0 -(Bind b) t) (CHead c (Bind b) t)) (ex3_4 B C T T (\lambda (b0: B).(\lambda -(e: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e -(Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead x0 (Bind b) t) (CHead e (Bind b0) u2)))))) (\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear c3 (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))))) (K_ind (\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat +(S i) (s k0 x1)) \to (or4 (clear (CHead x0 k0 t) c0) (ex3_4 B C T T (\lambda +(b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e +(Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x0 k0 t) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) u)))))) (\lambda (b0: +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 k0 t) (CHead e2 (Bind b) +u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind +b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead x0 k0 t) (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))))) +(\lambda (b: B).(\lambda (H6: (clear (CHead c (Bind b) t) c0)).(\lambda (H7: +(eq nat (S i) (s (Bind b) x1))).(let H8 \def (f_equal nat nat (\lambda (e: +nat).(match e in nat return (\lambda (_: nat).nat) with [O \Rightarrow i | (S +n) \Rightarrow n])) (S i) (S x1) H7) in (let H9 \def (eq_ind_r nat x1 +(\lambda (n: nat).(csubst0 n v c x0)) H5 i H8) in (eq_ind_r C (CHead c (Bind +b) t) (\lambda (c3: C).(or4 (clear (CHead x0 (Bind b) t) c3) (ex3_4 B C T T +(\lambda (b0: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c3 +(CHead e (Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead x0 (Bind b) t) (CHead e (Bind b0) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c3 (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Bind b) t) (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C -(CHead c (Bind b) t) (CHead e1 (Bind b0) u1))))))) (\lambda (b0: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 -(Bind b) t) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C C T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c3 +(CHead e1 (Bind b0) u1))))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Bind b) t) (CHead e2 +(Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))))) (or4_intro2 (clear (CHead x0 (Bind b) t) (CHead c (Bind b) t)) +(ex3_4 B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: +T).(eq C (CHead c (Bind b) t) (CHead e (Bind b0) u1)))))) (\lambda (b0: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Bind b) +t) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Bind b) t) (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v e1 e2))))) b c x0 t (refl_equal C (CHead c (Bind b) t)) (clear_bind b x0 t) -H9)) c0 (clear_gen_bind b c c0 t H6)))))) | (Flat f) \Rightarrow (\lambda -(H6: (clear (CHead c (Flat f) t) c0)).(\lambda (H7: (eq nat (S i) (s (Flat f) -x1))).(let H8 \def (f_equal nat nat (\lambda (e: nat).e) (S i) (s (Flat f) -x1) H7) in (let H9 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c -x0)) H5 (S i) H8) in (let H10 \def (H x0 v i H9 c0 (clear_gen_flat f c c0 t -H6)) in (or4_ind (clear x0 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e1 +(Bind b0) u1))))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Bind b) t) (CHead e2 +(Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))) (ex3_4_intro B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) u)))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear +(CHead x0 (Bind b) t) (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2))))) b c x0 t +(refl_equal C (CHead c (Bind b) t)) (clear_bind b x0 t) H9)) c0 +(clear_gen_bind b c c0 t H6))))))) (\lambda (f: F).(\lambda (H6: (clear +(CHead c (Flat f) t) c0)).(\lambda (H7: (eq nat (S i) (s (Flat f) x1))).(let +H8 \def (f_equal nat nat (\lambda (e: nat).e) (S i) (s (Flat f) x1) H7) in +(let H9 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c x0)) H5 (S i) +H8) in (let H10 \def (H x0 v i H9 c0 (clear_gen_flat f c c0 t H6)) in +(or4_ind (clear x0 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: @@ -712,12 +710,12 @@ B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))) x2 x3 x4 x5 x6 H12 (clear_flat x0 -(CHead x4 (Bind x2) x6) H13 f t) H14 H15))))))))))) H11)) H10))))))]) H1 H3) +(CHead x4 (Bind x2) x6) H13 f t) H14 H15))))))))))) H11)) H10))))))) k H1 H3) c2 H4)))))) H2)) (\lambda (H2: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda -(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c2: -C).(\lambda (j: nat).(csubst0 j v c c2)))))).(ex4_3_ind T C nat (\lambda (_: +(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: @@ -754,135 +752,93 @@ B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 C).(\lambda (_: T).(\lambda (u2: T).(clear c3 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) ((match k -in K return (\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat (S i) (s -k0 x2)) \to (or4 (clear (CHead x1 k0 x0) c0) (ex3_4 B C T T (\lambda (b: -B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind -b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: -T).(clear (CHead x1 k0 x0) (CHead e (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 k0 x0) (CHead e2 (Bind -b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind -b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(clear (CHead x1 k0 x0) (CHead e2 (Bind b) u2))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))))) with -[(Bind b) \Rightarrow (\lambda (H7: (clear (CHead c (Bind b) t) c0)).(\lambda -(H8: (eq nat (S i) (s (Bind b) x2))).(let H9 \def (f_equal nat nat (\lambda -(e: nat).(match e in nat return (\lambda (_: nat).nat) with [O \Rightarrow i -| (S n) \Rightarrow n])) (S i) (S x2) H8) in (let H10 \def (eq_ind_r nat x2 -(\lambda (n: nat).(csubst0 n v c x1)) H6 i H9) in (let H11 \def (eq_ind_r nat -x2 (\lambda (n: nat).(subst0 n v t x0)) H5 i H9) in (eq_ind_r C (CHead c -(Bind b) t) (\lambda (c3: C).(or4 (clear (CHead x1 (Bind b) x0) c3) (ex3_4 B -C T T (\lambda (b0: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C -c3 (CHead e (Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda (_: -T).(\lambda (u2: T).(clear (CHead x1 (Bind b) x0) (CHead e (Bind b0) u2)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v -u1 u2)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c3 (CHead e1 (Bind b0) u)))))) (\lambda (b0: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Bind b) -x0) (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda -(b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq -C c3 (CHead e1 (Bind b0) u1))))))) (\lambda (b0: B).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Bind b) x0) (CHead -e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -i v e1 e2))))))))) (or4_intro3 (clear (CHead x1 (Bind b) x0) (CHead c (Bind -b) t)) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e (Bind b0) u1)))))) -(\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x1 (Bind b) x0) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C -T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C -(CHead c (Bind b) t) (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Bind b) x0) (CHead -e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C -(CHead c (Bind b) t) (CHead e1 (Bind b0) u1))))))) (\lambda (b0: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 -(Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 i v e1 e2))))))) (ex4_5_intro B C C T T (\lambda (b0: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C -(CHead c (Bind b) t) (CHead e1 (Bind b0) u1))))))) (\lambda (b0: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 -(Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 i v e1 e2)))))) b c x1 t x0 (refl_equal C (CHead c (Bind b) -t)) (clear_bind b x1 x0) H11 H10)) c0 (clear_gen_bind b c c0 t H7))))))) | -(Flat f) \Rightarrow (\lambda (H7: (clear (CHead c (Flat f) t) c0)).(\lambda -(H8: (eq nat (S i) (s (Flat f) x2))).(let H9 \def (f_equal nat nat (\lambda -(e: nat).e) (S i) (s (Flat f) x2) H8) in (let H10 \def (eq_ind_r nat x2 -(\lambda (n: nat).(csubst0 n v c x1)) H6 (S i) H9) in (let H11 \def (eq_ind_r -nat x2 (\lambda (n: nat).(subst0 n v t x0)) H5 (S i) H9) in (let H12 \def (H -x1 v i H10 c0 (clear_gen_flat f c c0 t H7)) in (or4_ind (clear x1 c0) (ex3_4 -B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq -C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: -T).(\lambda (u2: T).(clear x1 (CHead e (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(clear x1 (CHead e2 (Bind b) u)))))) +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) (K_ind +(\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat (S i) (s k0 x2)) \to +(or4 (clear (CHead x1 k0 x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 k0 x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x1 k0 x0) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(clear x1 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 i v e1 e2))))))) (or4 (clear (CHead x1 (Flat f) x0) c0) -(ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: -T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: -C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e -(Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear -(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C -C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (H13: (clear x1 -c0)).(or4_intro0 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda -(b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e -(Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) -(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 -(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) +(u2: T).(clear (CHead x1 k0 x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))))) (\lambda (b: B).(\lambda +(H7: (clear (CHead c (Bind b) t) c0)).(\lambda (H8: (eq nat (S i) (s (Bind b) +x2))).(let H9 \def (f_equal nat nat (\lambda (e: nat).(match e in nat return +(\lambda (_: nat).nat) with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) +(S x2) H8) in (let H10 \def (eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n v c +x1)) H6 i H9) in (let H11 \def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 n v +t x0)) H5 i H9) in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(or4 +(clear (CHead x1 (Bind b) x0) c3) (ex3_4 B C T T (\lambda (b0: B).(\lambda +(e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c3 (CHead e (Bind b0) u1)))))) +(\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Bind b) x0) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C +T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 +(CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x1 (Bind b) x0) (CHead e2 (Bind b0) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c3 (CHead e1 (Bind b0) u1))))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x1 (Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda +(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) (or4_intro3 +(clear (CHead x1 (Bind b) x0) (CHead c (Bind b) t)) (ex3_4 B C T T (\lambda +(b0: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind +b) t) (CHead e (Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda +(_: T).(\lambda (u2: T).(clear (CHead x1 (Bind b) x0) (CHead e (Bind b0) +u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind +b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear (CHead x1 (Bind b) x0) (CHead e2 (Bind b0) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) +u1))))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead x1 (Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) -(clear_flat x1 c0 H13 f x0))) (\lambda (H13: (ex3_4 B C T T (\lambda (b: -B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind -b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: -T).(clear x1 (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2))))))).(ex3_4_ind B C -T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 -(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: -T).(\lambda (u2: T).(clear x1 (CHead e (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2))))) -(or4 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: +(ex4_5_intro B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e1 +(Bind b0) u1))))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Bind b) x0) (CHead e2 +(Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))) b c x1 t x0 (refl_equal C (CHead c (Bind b) t)) (clear_bind b x1 x0) +H11 H10)) c0 (clear_gen_bind b c c0 t H7)))))))) (\lambda (f: F).(\lambda +(H7: (clear (CHead c (Flat f) t) c0)).(\lambda (H8: (eq nat (S i) (s (Flat f) +x2))).(let H9 \def (f_equal nat nat (\lambda (e: nat).e) (S i) (s (Flat f) +x2) H8) in (let H10 \def (eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n v c +x1)) H6 (S i) H9) in (let H11 \def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 +n v t x0)) H5 (S i) H9) in (let H12 \def (H x1 v i H10 c0 (clear_gen_flat f c +c0 t H7)) in (or4_ind (clear x1 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 +(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear x1 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))) (or4 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: @@ -898,40 +854,100 @@ C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 -e2)))))))) (\lambda (x3: B).(\lambda (x4: C).(\lambda (x5: T).(\lambda (x6: -T).(\lambda (H14: (eq C c0 (CHead x4 (Bind x3) x5))).(\lambda (H15: (clear x1 -(CHead x4 (Bind x3) x6))).(\lambda (H16: (subst0 i v x5 x6)).(or4_intro1 -(clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +e2)))))))) (\lambda (H13: (clear x1 c0)).(or4_intro0 (clear (CHead x1 (Flat +f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) +x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (clear_flat x1 c0 H13 f x0))) +(\lambda (H13: (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 (CHead e (Bind +b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C -T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda -(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 +(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2))))) (or4 (clear (CHead x1 (Flat f) x0) +c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e +(Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear +(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C +C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (x3: B).(\lambda (x4: +C).(\lambda (x5: T).(\lambda (x6: T).(\lambda (H14: (eq C c0 (CHead x4 (Bind +x3) x5))).(\lambda (H15: (clear x1 (CHead x4 (Bind x3) x6))).(\lambda (H16: +(subst0 i v x5 x6)).(or4_intro1 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v -u1 u2))))) x3 x4 x5 x6 H14 (clear_flat x1 (CHead x4 (Bind x3) x6) H15 f x0) -H16))))))))) H13)) (\lambda (H13: (ex3_4 B C C T (\lambda (b: B).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x1 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 i v e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear x1 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2))))) (or4 (clear -(CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) +x0) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))) (ex3_4_intro B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) +x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2))))) x3 x4 x5 x6 H14 (clear_flat x1 +(CHead x4 (Bind x3) x6) H15 f x0) H16))))))))) H13)) (\lambda (H13: (ex3_4 B +C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C +c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear x1 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 +e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x1 (CHead e2 (Bind +b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 i v e1 e2))))) (or4 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C +T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) +x0) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))))) (\lambda (x3: B).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: +T).(\lambda (H14: (eq C c0 (CHead x4 (Bind x3) x6))).(\lambda (H15: (clear x1 +(CHead x5 (Bind x3) x6))).(\lambda (H16: (csubst0 i v x4 x5)).(or4_intro2 +(clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda @@ -946,35 +962,16 @@ C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (x3: -B).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (H14: (eq C c0 -(CHead x4 (Bind x3) x6))).(\lambda (H15: (clear x1 (CHead x5 (Bind x3) -x6))).(\lambda (H16: (csubst0 i v x4 x5)).(or4_intro2 (clear (CHead x1 (Flat -f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: -T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) -x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear -(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 -u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C C T (\lambda -(b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 -(Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2))))) -x3 x4 x5 x6 H14 (clear_flat x1 (CHead x5 (Bind x3) x6) H15 f x0) H16))))))))) -H13)) (\lambda (H13: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind -b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(clear x1 (CHead e2 (Bind b) u2))))))) (\lambda (_: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C +C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2))))) x3 x4 x5 x6 H14 (clear_flat x1 (CHead x5 (Bind x3) x6) H15 f x0) +H16))))))))) H13)) (\lambda (H13: (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear x1 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))).(ex4_5_ind B C C T T @@ -1027,6 +1024,6 @@ B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))) x3 x4 x5 x6 x7 H14 (clear_flat x1 -(CHead x5 (Bind x3) x7) H15 f x0) H16 H17))))))))))) H13)) H12)))))))]) H1 +(CHead x5 (Bind x3) x7) H15 f x0) H16 H17))))))))))) H13)) H12)))))))) k H1 H3) c2 H4)))))))) H2)) (csubst0_gen_head k c c2 t v (S i) H0)))))))))))) c1). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/drop.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/drop.ma index 14e0bb2c8..a1e7b2291 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/drop.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/drop.ma @@ -32,8 +32,8 @@ c1 e) \to (drop n O c2 e))))))))) \to (\forall (e: C).((drop n0 O c1 e) \to (drop n0 O c2 e)))))))))) (\lambda (i: nat).(\lambda (H: (lt i O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda (_: (csubst0 i v c1 c2)).(\lambda (e: C).(\lambda (_: (drop O -O c1 e)).(let H2 \def (match H in le return (\lambda (n: nat).(\lambda (_: -(le ? n)).((eq nat n O) \to (drop O O c2 e)))) with [le_n \Rightarrow +O c1 e)).(let H2 \def (match H in le return (\lambda (n0: nat).(\lambda (_: +(le ? n0)).((eq nat n0 O) \to (drop O O c2 e)))) with [le_n \Rightarrow (\lambda (H2: (eq nat (S i) O)).(let H3 \def (eq_ind nat (S i) (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind (drop O O c2 e) H3))) @@ -78,21 +78,21 @@ c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (drop (S n0) O c2 e) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H5: (eq nat i (s k x1))).(\lambda (H6: (eq C c2 (CHead c k x0))).(\lambda (_: (subst0 x1 v t x0)).(eq_ind_r C (CHead c k x0) (\lambda (c0: C).(drop (S n0) O c0 e)) (let -H8 \def (eq_ind nat i (\lambda (n: nat).(\forall (c2: C).(\forall (v: -T).((csubst0 n v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S -n0) O c2 e))))))) H1 (s k x1) H5) in (let H9 \def (eq_ind nat i (\lambda (n: -nat).(lt n (S n0))) H0 (s k x1) H5) in ((match k in K return (\lambda (k0: -K).((drop (r k0 n0) O c e) \to (((\forall (c2: C).(\forall (v: T).((csubst0 -(s k0 x1) v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O -c2 e))))))) \to ((lt (s k0 x1) (S n0)) \to (drop (S n0) O (CHead c k0 x0) -e))))) with [(Bind b) \Rightarrow (\lambda (H10: (drop (r (Bind b) n0) O c -e)).(\lambda (_: ((\forall (c2: C).(\forall (v: T).((csubst0 (s (Bind b) x1) -v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 -e)))))))).(\lambda (_: (lt (s (Bind b) x1) (S n0))).(drop_drop (Bind b) n0 c -e H10 x0)))) | (Flat f) \Rightarrow (\lambda (H10: (drop (r (Flat f) n0) O c -e)).(\lambda (_: ((\forall (c2: C).(\forall (v: T).((csubst0 (s (Flat f) x1) -v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 -e)))))))).(\lambda (H12: (lt (s (Flat f) x1) (S n0))).(or_ind (eq nat x1 O) +H8 \def (eq_ind nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: +T).((csubst0 n1 v0 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop +(S n0) O c3 e0))))))) H1 (s k x1) H5) in (let H9 \def (eq_ind nat i (\lambda +(n1: nat).(lt n1 (S n0))) H0 (s k x1) H5) in (K_ind (\lambda (k0: K).((drop +(r k0 n0) O c e) \to (((\forall (c3: C).(\forall (v0: T).((csubst0 (s k0 x1) +v0 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 +e0))))))) \to ((lt (s k0 x1) (S n0)) \to (drop (S n0) O (CHead c k0 x0) +e))))) (\lambda (b: B).(\lambda (H10: (drop (r (Bind b) n0) O c e)).(\lambda +(_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to +(\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 +e0)))))))).(\lambda (_: (lt (s (Bind b) x1) (S n0))).(drop_drop (Bind b) n0 c +e H10 x0))))) (\lambda (f: F).(\lambda (H10: (drop (r (Flat f) n0) O c +e)).(\lambda (_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Flat f) x1) +v0 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 +e0)))))))).(\lambda (H12: (lt (s (Flat f) x1) (S n0))).(or_ind (eq nat x1 O) (ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0))) (drop (S n0) O (CHead c (Flat f) x0) e) (\lambda (_: (eq nat x1 O)).(drop_drop (Flat f) n0 c e H10 x0)) (\lambda (H13: (ex2 nat (\lambda (m: @@ -100,68 +100,68 @@ nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O (CHead c (Flat f) x0) e) (\lambda (x: nat).(\lambda (_: (eq nat x1 (S x))).(\lambda (_: (lt x n0)).(drop_drop (Flat f) n0 c e H10 x0)))) H13)) -(lt_gen_xS x1 n0 H12)))))]) (drop_gen_drop k c e t n0 H3) H8 H9))) c2 +(lt_gen_xS x1 n0 H12)))))) k (drop_gen_drop k c e t n0 H3) H8 H9))) c2 H6)))))) H4)) (\lambda (H4: (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead -c3 k t)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c -c2))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k +c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (drop (S n0) O c2 e) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H5: (eq nat i (s k x1))).(\lambda (H6: (eq C c2 (CHead x0 k t))).(\lambda (H7: (csubst0 x1 v c x0)).(eq_ind_r C (CHead x0 k t) (\lambda (c0: C).(drop (S n0) O c0 e)) (let H8 \def (eq_ind -nat i (\lambda (n: nat).(\forall (c2: C).(\forall (v: T).((csubst0 n v c c2) -\to (\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 e))))))) H1 (s -k x1) H5) in (let H9 \def (eq_ind nat i (\lambda (n: nat).(lt n (S n0))) H0 -(s k x1) H5) in ((match k in K return (\lambda (k0: K).((drop (r k0 n0) O c -e) \to (((\forall (c2: C).(\forall (v: T).((csubst0 (s k0 x1) v c c2) \to -(\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 e))))))) \to ((lt -(s k0 x1) (S n0)) \to (drop (S n0) O (CHead x0 k0 t) e))))) with [(Bind b) -\Rightarrow (\lambda (H10: (drop (r (Bind b) n0) O c e)).(\lambda (_: -((\forall (c2: C).(\forall (v: T).((csubst0 (s (Bind b) x1) v c c2) \to -(\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 e)))))))).(\lambda -(H12: (lt (s (Bind b) x1) (S n0))).(drop_drop (Bind b) n0 x0 e (H x1 (lt_S_n -x1 n0 H12) c x0 v H7 e H10) t)))) | (Flat f) \Rightarrow (\lambda (H10: (drop -(r (Flat f) n0) O c e)).(\lambda (H11: ((\forall (c2: C).(\forall (v: -T).((csubst0 (s (Flat f) x1) v c c2) \to (\forall (e: C).((drop (S n0) O c e) -\to (drop (S n0) O c2 e)))))))).(\lambda (H12: (lt (s (Flat f) x1) (S -n0))).(or_ind (eq nat x1 O) (ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) -(\lambda (m: nat).(lt m n0))) (drop (S n0) O (CHead x0 (Flat f) t) e) -(\lambda (_: (eq nat x1 O)).(drop_drop (Flat f) n0 x0 e (H11 x0 v H7 e H10) -t)) (\lambda (H13: (ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: -nat).(lt m n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda -(m: nat).(lt m n0)) (drop (S n0) O (CHead x0 (Flat f) t) e) (\lambda (x: -nat).(\lambda (_: (eq nat x1 (S x))).(\lambda (_: (lt x n0)).(drop_drop (Flat -f) n0 x0 e (H11 x0 v H7 e H10) t)))) H13)) (lt_gen_xS x1 n0 H12)))))]) -(drop_gen_drop k c e t n0 H3) H8 H9))) c2 H6)))))) H4)) (\lambda (H4: (ex4_3 -T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k -j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 -k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t -u2)))) (\lambda (_: T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c -c2)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c +c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 +e0))))))) H1 (s k x1) H5) in (let H9 \def (eq_ind nat i (\lambda (n1: +nat).(lt n1 (S n0))) H0 (s k x1) H5) in (K_ind (\lambda (k0: K).((drop (r k0 +n0) O c e) \to (((\forall (c3: C).(\forall (v0: T).((csubst0 (s k0 x1) v0 c +c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 +e0))))))) \to ((lt (s k0 x1) (S n0)) \to (drop (S n0) O (CHead x0 k0 t) +e))))) (\lambda (b: B).(\lambda (H10: (drop (r (Bind b) n0) O c e)).(\lambda +(_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to +(\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 +e0)))))))).(\lambda (H12: (lt (s (Bind b) x1) (S n0))).(drop_drop (Bind b) n0 +x0 e (H x1 (lt_S_n x1 n0 H12) c x0 v H7 e H10) t))))) (\lambda (f: +F).(\lambda (H10: (drop (r (Flat f) n0) O c e)).(\lambda (H11: ((\forall (c3: +C).(\forall (v0: T).((csubst0 (s (Flat f) x1) v0 c c3) \to (\forall (e0: +C).((drop (S n0) O c e0) \to (drop (S n0) O c3 e0)))))))).(\lambda (H12: (lt +(s (Flat f) x1) (S n0))).(or_ind (eq nat x1 O) (ex2 nat (\lambda (m: nat).(eq +nat x1 (S m))) (\lambda (m: nat).(lt m n0))) (drop (S n0) O (CHead x0 (Flat +f) t) e) (\lambda (_: (eq nat x1 O)).(drop_drop (Flat f) n0 x0 e (H11 x0 v H7 +e H10) t)) (\lambda (H13: (ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) +(\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x1 (S +m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O (CHead x0 (Flat f) t) e) +(\lambda (x: nat).(\lambda (_: (eq nat x1 (S x))).(\lambda (_: (lt x +n0)).(drop_drop (Flat f) n0 x0 e (H11 x0 v H7 e H10) t)))) H13)) (lt_gen_xS +x1 n0 H12)))))) k (drop_gen_drop k c e t n0 H3) H8 H9))) c2 H6)))))) H4)) +(\lambda (H4: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c c3)))) (drop (S n0) O c2 e) (\lambda (x0: T).(\lambda -(x1: C).(\lambda (x2: nat).(\lambda (H5: (eq nat i (s k x2))).(\lambda (H6: -(eq C c2 (CHead x1 k x0))).(\lambda (_: (subst0 x2 v t x0)).(\lambda (H8: -(csubst0 x2 v c x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c0: C).(drop (S -n0) O c0 e)) (let H9 \def (eq_ind nat i (\lambda (n: nat).(\forall (c2: -C).(\forall (v: T).((csubst0 n v c c2) \to (\forall (e: C).((drop (S n0) O c -e) \to (drop (S n0) O c2 e))))))) H1 (s k x2) H5) in (let H10 \def (eq_ind -nat i (\lambda (n: nat).(lt n (S n0))) H0 (s k x2) H5) in ((match k in K -return (\lambda (k0: K).((drop (r k0 n0) O c e) \to (((\forall (c2: -C).(\forall (v: T).((csubst0 (s k0 x2) v c c2) \to (\forall (e: C).((drop (S -n0) O c e) \to (drop (S n0) O c2 e))))))) \to ((lt (s k0 x2) (S n0)) \to -(drop (S n0) O (CHead x1 k0 x0) e))))) with [(Bind b) \Rightarrow (\lambda -(H11: (drop (r (Bind b) n0) O c e)).(\lambda (_: ((\forall (c2: C).(\forall -(v: T).((csubst0 (s (Bind b) x2) v c c2) \to (\forall (e: C).((drop (S n0) O -c e) \to (drop (S n0) O c2 e)))))))).(\lambda (H13: (lt (s (Bind b) x2) (S +nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda +(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3)))) (drop (S n0) O c2 e) (\lambda (x0: +T).(\lambda (x1: C).(\lambda (x2: nat).(\lambda (H5: (eq nat i (s k +x2))).(\lambda (H6: (eq C c2 (CHead x1 k x0))).(\lambda (_: (subst0 x2 v t +x0)).(\lambda (H8: (csubst0 x2 v c x1)).(eq_ind_r C (CHead x1 k x0) (\lambda +(c0: C).(drop (S n0) O c0 e)) (let H9 \def (eq_ind nat i (\lambda (n1: +nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c c3) \to (\forall +(e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 e0))))))) H1 (s k x2) H5) +in (let H10 \def (eq_ind nat i (\lambda (n1: nat).(lt n1 (S n0))) H0 (s k x2) +H5) in (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to (((\forall (c3: +C).(\forall (v0: T).((csubst0 (s k0 x2) v0 c c3) \to (\forall (e0: C).((drop +(S n0) O c e0) \to (drop (S n0) O c3 e0))))))) \to ((lt (s k0 x2) (S n0)) \to +(drop (S n0) O (CHead x1 k0 x0) e))))) (\lambda (b: B).(\lambda (H11: (drop +(r (Bind b) n0) O c e)).(\lambda (_: ((\forall (c3: C).(\forall (v0: +T).((csubst0 (s (Bind b) x2) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c +e0) \to (drop (S n0) O c3 e0)))))))).(\lambda (H13: (lt (s (Bind b) x2) (S n0))).(drop_drop (Bind b) n0 x1 e (H x2 (lt_S_n x2 n0 H13) c x1 v H8 e H11) -x0)))) | (Flat f) \Rightarrow (\lambda (H11: (drop (r (Flat f) n0) O c -e)).(\lambda (H12: ((\forall (c2: C).(\forall (v: T).((csubst0 (s (Flat f) -x2) v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 -e)))))))).(\lambda (H13: (lt (s (Flat f) x2) (S n0))).(or_ind (eq nat x2 O) +x0))))) (\lambda (f: F).(\lambda (H11: (drop (r (Flat f) n0) O c e)).(\lambda +(H12: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s (Flat f) x2) v0 c c3) +\to (\forall (e0: C).((drop (S n0) O c e0) \to (drop (S n0) O c3 +e0)))))))).(\lambda (H13: (lt (s (Flat f) x2) (S n0))).(or_ind (eq nat x2 O) (ex2 nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0))) (drop (S n0) O (CHead x1 (Flat f) x0) e) (\lambda (_: (eq nat x2 O)).(drop_drop (Flat f) n0 x1 e (H12 x1 v H8 e H11) x0)) (\lambda (H14: (ex2 @@ -169,7 +169,7 @@ nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O (CHead x1 (Flat f) x0) e) (\lambda (x: nat).(\lambda (_: (eq nat x2 (S x))).(\lambda (_: (lt x n0)).(drop_drop (Flat -f) n0 x1 e (H12 x1 v H8 e H11) x0)))) H14)) (lt_gen_xS x2 n0 H13)))))]) +f) n0 x1 e (H12 x1 v H8 e H11) x0)))) H14)) (lt_gen_xS x2 n0 H13)))))) k (drop_gen_drop k c e t n0 H3) H9 H10))) c2 H6)))))))) H4)) (csubst0_gen_head k c c2 t v i H2))))))))))) c1)))))) n). @@ -183,8 +183,8 @@ c2 e) \to (drop n O c1 e))))))))) \to (\forall (e: C).((drop n0 O c2 e) \to (drop n0 O c1 e)))))))))) (\lambda (i: nat).(\lambda (H: (lt i O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda (_: (csubst0 i v c1 c2)).(\lambda (e: C).(\lambda (_: (drop O -O c2 e)).(let H2 \def (match H in le return (\lambda (n: nat).(\lambda (_: -(le ? n)).((eq nat n O) \to (drop O O c1 e)))) with [le_n \Rightarrow +O c2 e)).(let H2 \def (match H in le return (\lambda (n0: nat).(\lambda (_: +(le ? n0)).((eq nat n0 O) \to (drop O O c1 e)))) with [le_n \Rightarrow (\lambda (H2: (eq nat (S i) O)).(let H3 \def (eq_ind nat (S i) (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind (drop O O c1 e) H3))) @@ -222,54 +222,54 @@ T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (drop (S n0) O (CHead c k t) e) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H5: (eq nat i (s k x1))).(\lambda (H6: (eq C c2 (CHead c k -x0))).(\lambda (_: (subst0 x1 v t x0)).(let H8 \def (eq_ind C c2 (\lambda (c: -C).(drop (S n0) O c e)) H3 (CHead c k x0) H6) in (let H9 \def (eq_ind nat i -(\lambda (n: nat).(\forall (c2: C).(\forall (v: T).((csubst0 n v c c2) \to -(\forall (e: C).((drop (S n0) O c2 e) \to (drop (S n0) O c e))))))) H1 (s k -x1) H5) in (let H10 \def (eq_ind nat i (\lambda (n: nat).(lt n (S n0))) H0 (s -k x1) H5) in ((match k in K return (\lambda (k0: K).(((\forall (c2: -C).(\forall (v: T).((csubst0 (s k0 x1) v c c2) \to (\forall (e: C).((drop (S -n0) O c2 e) \to (drop (S n0) O c e))))))) \to ((lt (s k0 x1) (S n0)) \to -((drop (r k0 n0) O c e) \to (drop (S n0) O (CHead c k0 t) e))))) with [(Bind -b) \Rightarrow (\lambda (_: ((\forall (c2: C).(\forall (v: T).((csubst0 (s -(Bind b) x1) v c c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (drop (S -n0) O c e)))))))).(\lambda (_: (lt (s (Bind b) x1) (S n0))).(\lambda (H13: -(drop (r (Bind b) n0) O c e)).(drop_drop (Bind b) n0 c e H13 t)))) | (Flat f) -\Rightarrow (\lambda (_: ((\forall (c2: C).(\forall (v: T).((csubst0 (s (Flat -f) x1) v c c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (drop (S n0) O c -e)))))))).(\lambda (H12: (lt (s (Flat f) x1) (S n0))).(\lambda (H13: (drop (r -(Flat f) n0) O c e)).(or_ind (eq nat x1 O) (ex2 nat (\lambda (m: nat).(eq nat -x1 (S m))) (\lambda (m: nat).(lt m n0))) (drop (S n0) O (CHead c (Flat f) t) -e) (\lambda (_: (eq nat x1 O)).(drop_drop (Flat f) n0 c e H13 t)) (\lambda -(H14: (ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m -n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: -nat).(lt m n0)) (drop (S n0) O (CHead c (Flat f) t) e) (\lambda (x: -nat).(\lambda (_: (eq nat x1 (S x))).(\lambda (_: (lt x n0)).(drop_drop (Flat -f) n0 c e H13 t)))) H14)) (lt_gen_xS x1 n0 H12)))))]) H9 H10 (drop_gen_drop k -c e x0 n0 H8)))))))))) H4)) (\lambda (H4: (ex3_2 C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: -nat).(eq C c2 (CHead c3 k t)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j -v c c2))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k -j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (drop (S n0) O (CHead c k t) -e) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H5: (eq nat i (s k -x1))).(\lambda (H6: (eq C c2 (CHead x0 k t))).(\lambda (H7: (csubst0 x1 v c -x0)).(let H8 \def (eq_ind C c2 (\lambda (c: C).(drop (S n0) O c e)) H3 (CHead -x0 k t) H6) in (let H9 \def (eq_ind nat i (\lambda (n: nat).(\forall (c2: -C).(\forall (v: T).((csubst0 n v c c2) \to (\forall (e: C).((drop (S n0) O c2 -e) \to (drop (S n0) O c e))))))) H1 (s k x1) H5) in (let H10 \def (eq_ind nat -i (\lambda (n: nat).(lt n (S n0))) H0 (s k x1) H5) in ((match k in K return -(\lambda (k0: K).(((\forall (c2: C).(\forall (v: T).((csubst0 (s k0 x1) v c -c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (drop (S n0) O c e))))))) -\to ((lt (s k0 x1) (S n0)) \to ((drop (r k0 n0) O x0 e) \to (drop (S n0) O -(CHead c k0 t) e))))) with [(Bind b) \Rightarrow (\lambda (_: ((\forall (c2: -C).(\forall (v: T).((csubst0 (s (Bind b) x1) v c c2) \to (\forall (e: -C).((drop (S n0) O c2 e) \to (drop (S n0) O c e)))))))).(\lambda (H12: (lt (s -(Bind b) x1) (S n0))).(\lambda (H13: (drop (r (Bind b) n0) O x0 +x0))).(\lambda (_: (subst0 x1 v t x0)).(let H8 \def (eq_ind C c2 (\lambda +(c0: C).(drop (S n0) O c0 e)) H3 (CHead c k x0) H6) in (let H9 \def (eq_ind +nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c +c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop (S n0) O c +e0))))))) H1 (s k x1) H5) in (let H10 \def (eq_ind nat i (\lambda (n1: +nat).(lt n1 (S n0))) H0 (s k x1) H5) in (K_ind (\lambda (k0: K).(((\forall +(c3: C).(\forall (v0: T).((csubst0 (s k0 x1) v0 c c3) \to (\forall (e0: +C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0))))))) \to ((lt (s k0 x1) +(S n0)) \to ((drop (r k0 n0) O c e) \to (drop (S n0) O (CHead c k0 t) e))))) +(\lambda (b: B).(\lambda (_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s +(Bind b) x1) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop +(S n0) O c e0)))))))).(\lambda (_: (lt (s (Bind b) x1) (S n0))).(\lambda +(H13: (drop (r (Bind b) n0) O c e)).(drop_drop (Bind b) n0 c e H13 t))))) +(\lambda (f: F).(\lambda (_: ((\forall (c3: C).(\forall (v0: T).((csubst0 (s +(Flat f) x1) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop +(S n0) O c e0)))))))).(\lambda (H12: (lt (s (Flat f) x1) (S n0))).(\lambda +(H13: (drop (r (Flat f) n0) O c e)).(or_ind (eq nat x1 O) (ex2 nat (\lambda +(m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0))) (drop (S n0) O +(CHead c (Flat f) t) e) (\lambda (_: (eq nat x1 O)).(drop_drop (Flat f) n0 c +e H13 t)) (\lambda (H14: (ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) +(\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x1 (S +m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O (CHead c (Flat f) t) e) +(\lambda (x: nat).(\lambda (_: (eq nat x1 (S x))).(\lambda (_: (lt x +n0)).(drop_drop (Flat f) n0 c e H13 t)))) H14)) (lt_gen_xS x1 n0 H12)))))) k +H9 H10 (drop_gen_drop k c e x0 n0 H8)))))))))) H4)) (\lambda (H4: (ex3_2 C +nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead +c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (drop (S +n0) O (CHead c k t) e) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H5: (eq +nat i (s k x1))).(\lambda (H6: (eq C c2 (CHead x0 k t))).(\lambda (H7: +(csubst0 x1 v c x0)).(let H8 \def (eq_ind C c2 (\lambda (c0: C).(drop (S n0) +O c0 e)) H3 (CHead x0 k t) H6) in (let H9 \def (eq_ind nat i (\lambda (n1: +nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c c3) \to (\forall +(e0: C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0))))))) H1 (s k x1) H5) +in (let H10 \def (eq_ind nat i (\lambda (n1: nat).(lt n1 (S n0))) H0 (s k x1) +H5) in (K_ind (\lambda (k0: K).(((\forall (c3: C).(\forall (v0: T).((csubst0 +(s k0 x1) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop (S +n0) O c e0))))))) \to ((lt (s k0 x1) (S n0)) \to ((drop (r k0 n0) O x0 e) \to +(drop (S n0) O (CHead c k0 t) e))))) (\lambda (b: B).(\lambda (_: ((\forall +(c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x1) v0 c c3) \to (\forall (e0: +C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0)))))))).(\lambda (H12: (lt +(s (Bind b) x1) (S n0))).(\lambda (H13: (drop (r (Bind b) n0) O x0 e)).(drop_drop (Bind b) n0 c e (H x1 (lt_S_n x1 n0 H12) c x0 v H7 e H13) -t)))) | (Flat f) \Rightarrow (\lambda (H11: ((\forall (c2: C).(\forall (v: -T).((csubst0 (s (Flat f) x1) v c c2) \to (\forall (e: C).((drop (S n0) O c2 -e) \to (drop (S n0) O c e)))))))).(\lambda (H12: (lt (s (Flat f) x1) (S +t))))) (\lambda (f: F).(\lambda (H11: ((\forall (c3: C).(\forall (v0: +T).((csubst0 (s (Flat f) x1) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 +e0) \to (drop (S n0) O c e0)))))))).(\lambda (H12: (lt (s (Flat f) x1) (S n0))).(\lambda (H13: (drop (r (Flat f) n0) O x0 e)).(or_ind (eq nat x1 O) (ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0))) (drop (S n0) O (CHead c (Flat f) t) e) (\lambda (_: (eq nat x1 O)).(drop_drop @@ -278,12 +278,12 @@ nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O (CHead c (Flat f) t) e) (\lambda (x: nat).(\lambda (_: (eq nat x1 (S x))).(\lambda (_: (lt x n0)).(drop_drop (Flat f) n0 c e (H11 x0 v H7 e H13) -t)))) H14)) (lt_gen_xS x1 n0 H12)))))]) H9 H10 (drop_gen_drop k x0 e t n0 +t)))) H14)) (lt_gen_xS x1 n0 H12)))))) k H9 H10 (drop_gen_drop k x0 e t n0 H8)))))))))) H4)) (\lambda (H4: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda -(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c2: -C).(\lambda (j: nat).(csubst0 j v c c2)))))).(ex4_3_ind T C nat (\lambda (_: +(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: @@ -291,22 +291,22 @@ T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (drop (S n0) O (CHead c k t) e) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: nat).(\lambda (H5: (eq nat i (s k x2))).(\lambda (H6: (eq C c2 (CHead x1 k x0))).(\lambda (_: (subst0 x2 v t x0)).(\lambda (H8: (csubst0 x2 v c -x1)).(let H9 \def (eq_ind C c2 (\lambda (c: C).(drop (S n0) O c e)) H3 (CHead -x1 k x0) H6) in (let H10 \def (eq_ind nat i (\lambda (n: nat).(\forall (c2: -C).(\forall (v: T).((csubst0 n v c c2) \to (\forall (e: C).((drop (S n0) O c2 -e) \to (drop (S n0) O c e))))))) H1 (s k x2) H5) in (let H11 \def (eq_ind nat -i (\lambda (n: nat).(lt n (S n0))) H0 (s k x2) H5) in ((match k in K return -(\lambda (k0: K).(((\forall (c2: C).(\forall (v: T).((csubst0 (s k0 x2) v c -c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (drop (S n0) O c e))))))) -\to ((lt (s k0 x2) (S n0)) \to ((drop (r k0 n0) O x1 e) \to (drop (S n0) O -(CHead c k0 t) e))))) with [(Bind b) \Rightarrow (\lambda (_: ((\forall (c2: -C).(\forall (v: T).((csubst0 (s (Bind b) x2) v c c2) \to (\forall (e: -C).((drop (S n0) O c2 e) \to (drop (S n0) O c e)))))))).(\lambda (H13: (lt (s -(Bind b) x2) (S n0))).(\lambda (H14: (drop (r (Bind b) n0) O x1 +x1)).(let H9 \def (eq_ind C c2 (\lambda (c0: C).(drop (S n0) O c0 e)) H3 +(CHead x1 k x0) H6) in (let H10 \def (eq_ind nat i (\lambda (n1: +nat).(\forall (c3: C).(\forall (v0: T).((csubst0 n1 v0 c c3) \to (\forall +(e0: C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0))))))) H1 (s k x2) H5) +in (let H11 \def (eq_ind nat i (\lambda (n1: nat).(lt n1 (S n0))) H0 (s k x2) +H5) in (K_ind (\lambda (k0: K).(((\forall (c3: C).(\forall (v0: T).((csubst0 +(s k0 x2) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 e0) \to (drop (S +n0) O c e0))))))) \to ((lt (s k0 x2) (S n0)) \to ((drop (r k0 n0) O x1 e) \to +(drop (S n0) O (CHead c k0 t) e))))) (\lambda (b: B).(\lambda (_: ((\forall +(c3: C).(\forall (v0: T).((csubst0 (s (Bind b) x2) v0 c c3) \to (\forall (e0: +C).((drop (S n0) O c3 e0) \to (drop (S n0) O c e0)))))))).(\lambda (H13: (lt +(s (Bind b) x2) (S n0))).(\lambda (H14: (drop (r (Bind b) n0) O x1 e)).(drop_drop (Bind b) n0 c e (H x2 (lt_S_n x2 n0 H13) c x1 v H8 e H14) -t)))) | (Flat f) \Rightarrow (\lambda (H12: ((\forall (c2: C).(\forall (v: -T).((csubst0 (s (Flat f) x2) v c c2) \to (\forall (e: C).((drop (S n0) O c2 -e) \to (drop (S n0) O c e)))))))).(\lambda (H13: (lt (s (Flat f) x2) (S +t))))) (\lambda (f: F).(\lambda (H12: ((\forall (c3: C).(\forall (v0: +T).((csubst0 (s (Flat f) x2) v0 c c3) \to (\forall (e0: C).((drop (S n0) O c3 +e0) \to (drop (S n0) O c e0)))))))).(\lambda (H13: (lt (s (Flat f) x2) (S n0))).(\lambda (H14: (drop (r (Flat f) n0) O x1 e)).(or_ind (eq nat x2 O) (ex2 nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0))) (drop (S n0) O (CHead c (Flat f) t) e) (\lambda (_: (eq nat x2 O)).(drop_drop @@ -315,7 +315,7 @@ nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O (CHead c (Flat f) t) e) (\lambda (x: nat).(\lambda (_: (eq nat x2 (S x))).(\lambda (_: (lt x n0)).(drop_drop (Flat f) n0 c e (H12 x1 v H8 e H14) -t)))) H15)) (lt_gen_xS x2 n0 H13)))))]) H10 H11 (drop_gen_drop k x1 e x0 n0 +t)))) H15)) (lt_gen_xS x2 n0 H13)))))) k H10 H11 (drop_gen_drop k x1 e x0 n0 H9)))))))))))) H4)) (csubst0_gen_head k c c2 t v i H2))))))))))) c1)))))) n). theorem csubst0_drop_lt: @@ -392,7 +392,7 @@ C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n0 (s k O)) t u w)))))) (_: T).(csubst0 (minus n0 (s k O)) t e1 e2)))))))))))) (\lambda (k: K).(\lambda (i0: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 i0 v0 u1 u2)).(\lambda (c: C).(let H3 \def (eq_ind_r -nat i0 (\lambda (n: nat).(subst0 n v0 u1 u2)) H2 (minus (s k i0) (s k O)) +nat i0 (\lambda (n0: nat).(subst0 n0 v0 u1 u2)) H2 (minus (s k i0) (s k O)) (s_arith0 k i0)) in (or4_intro1 (drop O O (CHead c k u2) (CHead c k u1)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c k u1) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: @@ -419,87 +419,88 @@ T).(subst0 (minus (s k i0) (s k0 O)) v0 u w))))) k c u1 u2 (refl_equal C (CHead c k u1)) (drop_refl (CHead c k u2)) H3)))))))))) (\lambda (k: K).(\lambda (i0: nat).(\lambda (c3: C).(\lambda (c4: C).(\lambda (v0: T).(\lambda (H2: (csubst0 i0 v0 c3 c4)).(\lambda (H3: (or4 (drop O O c4 c3) -(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C c3 (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop O O c4 (CHead e0 k w)))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k O)) v0 u -w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c3 (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 k u)))))) (\lambda -(k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 -(s k O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop O O c4 (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k -O)) v0 u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus i0 (s k O)) v0 e1 e2))))))))).(\lambda -(u: T).(let H4 \def (eq_ind_r nat i0 (\lambda (n: nat).(csubst0 n v0 c3 c4)) -H2 (minus (s k i0) (s k O)) (s_arith0 k i0)) in (let H5 \def (eq_ind_r nat i0 -(\lambda (n: nat).(or4 (drop O O c4 c3) (ex3_4 K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop O O c4 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus n (s k O)) v0 u w)))))) (ex3_4 K C C T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 -(CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(drop O O c4 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n (s k O)) v0 e1 e2)))))) -(ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C c3 (CHead e1 k u))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead -e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus n (s k O)) v0 u w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus n (s k O)) v0 e1 e2))))))))) H3 (minus (s k i0) (s k O)) (s_arith0 k -i0)) in (or4_intro2 (drop O O (CHead c4 k u) (CHead c3 k u)) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C -(CHead c3 k u) (CHead e0 k0 u0)))))) (\lambda (k0: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 k u) (CHead e0 k0 -w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s k i0) (s k0 O)) v0 u0 w)))))) (ex3_4 K C C T (\lambda -(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead c3 k -u) (CHead e1 k0 u0)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop O O (CHead c4 k u) (CHead e2 k0 u0)))))) (\lambda -(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s -k i0) (s k0 O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 k u) -(CHead e1 k0 u0))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 k u) (CHead e2 k0 -w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: -T).(\lambda (w: T).(subst0 (minus (s k i0) (s k0 O)) v0 u0 w)))))) (\lambda -(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: -T).(csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2))))))) (ex3_4_intro K C C T -(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C -(CHead c3 k u) (CHead e1 k0 u0)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u0: T).(drop O O (CHead c4 k u) (CHead e2 k0 -u0)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2))))) k c3 c4 u (refl_equal C -(CHead c3 k u)) (drop_refl (CHead c4 k u)) H4)))))))))))) (\lambda (k: -K).(\lambda (i0: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: -T).(\lambda (H2: (subst0 i0 v0 u1 u2)).(\lambda (c3: C).(\lambda (c4: -C).(\lambda (H3: (csubst0 i0 v0 c3 c4)).(\lambda (_: (or4 (drop O O c4 c3) -(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C c3 (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop O O c4 (CHead e0 k w)))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k O)) v0 u -w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c3 (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 k u)))))) (\lambda -(k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 -(s k O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop O O c4 (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k -O)) v0 u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus i0 (s k O)) v0 e1 e2))))))))).(let H5 -\def (eq_ind_r nat i0 (\lambda (n: nat).(subst0 n v0 u1 u2)) H2 (minus (s k -i0) (s k O)) (s_arith0 k i0)) in (let H6 \def (eq_ind_r nat i0 (\lambda (n: -nat).(csubst0 n v0 c3 c4)) H3 (minus (s k i0) (s k O)) (s_arith0 k i0)) in -(or4_intro3 (drop O O (CHead c4 k u2) (CHead c3 k u1)) (ex3_4 K C T T -(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead c3 k u1) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C c3 (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop O O c4 (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k0 +O)) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C c3 (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i0 (s k0 O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i0 (s k0 O)) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k0 +O)) v0 e1 e2))))))))).(\lambda (u: T).(let H4 \def (eq_ind_r nat i0 (\lambda +(n0: nat).(csubst0 n0 v0 c3 c4)) H2 (minus (s k i0) (s k O)) (s_arith0 k i0)) +in (let H5 \def (eq_ind_r nat i0 (\lambda (n0: nat).(or4 (drop O O c4 c3) +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda +(_: T).(eq C c3 (CHead e0 k0 u0)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e0 k0 w)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus n0 (s +k0 O)) v0 u0 w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C c3 (CHead e1 k0 u0)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop O O c4 (CHead +e2 k0 u0)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus n0 (s k0 O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C c3 (CHead e1 k0 u0))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus n0 (s k0 O)) v0 u0 w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n0 +(s k0 O)) v0 e1 e2))))))))) H3 (minus (s k i0) (s k O)) (s_arith0 k i0)) in +(or4_intro2 (drop O O (CHead c4 k u) (CHead c3 k u)) (ex3_4 K C T T (\lambda +(k0: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 k +u) (CHead e0 k0 u0)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop O O (CHead c4 k u) (CHead e0 k0 w)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k +i0) (s k0 O)) v0 u0 w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead c3 k u) (CHead e1 k0 +u0)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop O O (CHead c4 k u) (CHead e2 k0 u0)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k0 O)) +v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 k u) (CHead e1 k0 +u0))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop O O (CHead c4 k u) (CHead e2 k0 w))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k0 O)) v0 u0 w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k +i0) (s k0 O)) v0 e1 e2))))))) (ex3_4_intro K C C T (\lambda (k0: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead c3 k u) (CHead e1 k0 +u0)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop O O (CHead c4 k u) (CHead e2 k0 u0)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k0 O)) +v0 e1 e2))))) k c3 c4 u (refl_equal C (CHead c3 k u)) (drop_refl (CHead c4 k +u)) H4)))))))))))) (\lambda (k: K).(\lambda (i0: nat).(\lambda (v0: +T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 i0 v0 u1 +u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (H3: (csubst0 i0 v0 c3 +c4)).(\lambda (_: (or4 (drop O O c4 c3) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e0 k0 +u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop O O c4 (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k0 O)) v0 u w)))))) +(ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c3 (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k0 +O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop O O c4 (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i0 (s k0 O)) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k0 O)) v0 e1 +e2))))))))).(let H5 \def (eq_ind_r nat i0 (\lambda (n0: nat).(subst0 n0 v0 u1 +u2)) H2 (minus (s k i0) (s k O)) (s_arith0 k i0)) in (let H6 \def (eq_ind_r +nat i0 (\lambda (n0: nat).(csubst0 n0 v0 c3 c4)) H3 (minus (s k i0) (s k O)) +(s_arith0 k i0)) in (or4_intro3 (drop O O (CHead c4 k u2) (CHead c3 k u1)) +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C (CHead c3 k u1) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 k u2) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k0 O)) v0 u w)))))) (ex3_4 K C C T (\lambda @@ -635,1837 +636,1879 @@ K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 e2))))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (v: T).(\lambda (H1: (csubst0 i v (CHead c k t) c2)).(\lambda (e: C).(\lambda (H2: (drop (S n0) O (CHead c k t) e)).(let H3 \def (match H1 in csubst0 -return (\lambda (n: nat).(\lambda (t0: T).(\lambda (c0: C).(\lambda (c1: -C).(\lambda (_: (csubst0 n t0 c0 c1)).((eq nat n i) \to ((eq T t0 v) \to ((eq -C c0 (CHead c k t)) \to ((eq C c1 c2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K -C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus i (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k (S -n0))) v e1 e2))))))))))))))))) with [(csubst0_snd k0 i0 v0 u1 u2 H3 c0) +return (\lambda (n1: nat).(\lambda (t0: T).(\lambda (c0: C).(\lambda (c3: +C).(\lambda (_: (csubst0 n1 t0 c0 c3)).((eq nat n1 i) \to ((eq T t0 v) \to +((eq C c0 (CHead c k t)) \to ((eq C c3 c2) \to (or4 (drop (S n0) O c2 e) +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k0 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k0 +(S n0))) v e1 e2))))))))))))))))) with [(csubst0_snd k0 i0 v0 u1 u2 H3 c0) \Rightarrow (\lambda (H4: (eq nat (s k0 i0) i)).(\lambda (H5: (eq T v0 v)).(\lambda (H6: (eq C (CHead c0 k0 u1) (CHead c k t))).(\lambda (H7: (eq C -(CHead c0 k0 u2) c2)).(eq_ind nat (s k0 i0) (\lambda (n: nat).((eq T v0 v) +(CHead c0 k0 u2) c2)).(eq_ind nat (s k0 i0) (\lambda (n1: nat).((eq T v0 v) \to ((eq C (CHead c0 k0 u1) (CHead c k t)) \to ((eq C (CHead c0 k0 u2) c2) \to ((subst0 i0 v0 u1 u2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n (s k (S n0))) v u w)))))) -(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n (s k -(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus n (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n (s k (S n0))) v e1 -e2))))))))))))) (\lambda (H8: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq -C (CHead c0 k0 u1) (CHead c k t)) \to ((eq C (CHead c0 k0 u2) c2) \to -((subst0 i0 t0 u1 u2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda -(k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s k0 i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k0 i0) (s k (S n0))) v u w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s k0 i0) (s k (S n0))) v e1 e2)))))))))))) (\lambda (H9: (eq C (CHead -c0 k0 u1) (CHead c k t))).(let H10 \def (f_equal C T (\lambda (e0: C).(match -e0 in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ -t) \Rightarrow t])) (CHead c0 k0 u1) (CHead c k t) H9) in ((let H11 \def -(f_equal C K (\lambda (e0: C).(match e0 in C return (\lambda (_: C).K) with -[(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c0 k0 u1) -(CHead c k t) H9) in ((let H12 \def (f_equal C C (\lambda (e0: C).(match e0 -in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) -\Rightarrow c])) (CHead c0 k0 u1) (CHead c k t) H9) in (eq_ind C c (\lambda -(c: C).((eq K k0 k) \to ((eq T u1 t) \to ((eq C (CHead c k0 u2) c2) \to -((subst0 i0 v u1 u2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda -(k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s k0 i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k0 i0) (s k (S n0))) v u w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s k0 i0) (s k (S n0))) v e1 e2))))))))))))) (\lambda (H13: (eq K k0 -k)).(eq_ind K k (\lambda (k: K).((eq T u1 t) \to ((eq C (CHead c k u2) c2) -\to ((subst0 i0 v u1 u2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k1 w)))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s -k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n1 (s k1 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k1 +u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus n1 (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus n1 (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 +(s k1 (S n0))) v e1 e2))))))))))))) (\lambda (H8: (eq T v0 v)).(eq_ind T v +(\lambda (t0: T).((eq C (CHead c0 k0 u1) (CHead c k t)) \to ((eq C (CHead c0 +k0 u2) c2) \to ((subst0 i0 t0 u1 u2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C +T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 i0) +(s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T +T).(csubst0 (minus (s k0 i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) +T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2)))))))))))) (\lambda -(H14: (eq T u1 t)).(eq_ind T t (\lambda (t: T).((eq C (CHead c k u2) c2) \to -((subst0 i0 v t u2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k1: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) -(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s k i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: +(_: T).(csubst0 (minus (s k0 i0) (s k1 (S n0))) v e1 e2)))))))))))) (\lambda +(H9: (eq C (CHead c0 k0 u1) (CHead c k t))).(let H10 \def (f_equal C T +(\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) with [(CSort _) +\Rightarrow u1 | (CHead _ _ t0) \Rightarrow t0])) (CHead c0 k0 u1) (CHead c k +t) H9) in ((let H11 \def (f_equal C K (\lambda (e0: C).(match e0 in C return +(\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) +\Rightarrow k1])) (CHead c0 k0 u1) (CHead c k t) H9) in ((let H12 \def +(f_equal C C (\lambda (e0: C).(match e0 in C return (\lambda (_: C).C) with +[(CSort _) \Rightarrow c0 | (CHead c3 _ _) \Rightarrow c3])) (CHead c0 k0 u1) +(CHead c k t) H9) in (eq_ind C c (\lambda (c3: C).((eq K k0 k) \to ((eq T u1 +t) \to ((eq C (CHead c3 k0 u2) c2) \to ((subst0 i0 v u1 u2) \to (or4 (drop (S +n0) O c2 e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k1 +w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k0 i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k1 u)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k0 +i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k1 +u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s k0 i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k0 i0) +(s k1 (S n0))) v e1 e2))))))))))))) (\lambda (H13: (eq K k0 k)).(eq_ind K k +(\lambda (k1: K).((eq T u1 t) \to ((eq C (CHead c k1 u2) c2) \to ((subst0 i0 +v u1 u2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k2: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k2 +u)))))) (\lambda (k2: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e0 k2 w)))))) (\lambda (k2: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k1 i0) (s k2 (S n0))) v +u w)))))) (ex3_4 K C C T (\lambda (k2: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k2 u)))))) (\lambda (k2: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k2 u)))))) +(\lambda (k2: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k1 i0) (s k2 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k2: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) -(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: +(CHead e1 k2 u))))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k2 w))))))) +(\lambda (k2: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k1 i0) (s k2 (S n0))) v u w)))))) (\lambda (k2: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s k i0) (s k1 (S n0))) v e1 e2))))))))))) (\lambda (H15: (eq C (CHead -c k u2) c2)).(eq_ind C (CHead c k u2) (\lambda (c: C).((subst0 i0 v t u2) \to -(or4 (drop (S n0) O c e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c (CHead -e0 k w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +(minus (s k1 i0) (s k2 (S n0))) v e1 e2)))))))))))) (\lambda (H14: (eq T u1 +t)).(eq_ind T t (\lambda (t0: T).((eq C (CHead c k u2) c2) \to ((subst0 i0 v +t0 u2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k1: K).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda +(k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) (ex3_4 +K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k1 u)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k i0) +(s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k1 +u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s k i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k i0) +(s k1 (S n0))) v e1 e2))))))))))) (\lambda (H15: (eq C (CHead c k u2) +c2)).(eq_ind C (CHead c k u2) (\lambda (c3: C).((subst0 i0 v t u2) \to (or4 +(drop (S n0) O c3 e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead +e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda -(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k -u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O c (CHead e2 k u)))))) (\lambda (k1: K).(\lambda (e1: +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 +u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c3 (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v -e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O c (CHead e2 k w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u -w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2)))))))))) -(\lambda (_: (subst0 i0 v t u2)).(let H1 \def (eq_ind K k0 (\lambda (k: -K).(eq nat (s k i0) i)) H4 k H13) in (let H17 \def (eq_ind_r nat i (\lambda -(n: nat).(\forall (c2: C).(\forall (v: T).((csubst0 n v c c2) \to (\forall -(e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n (s k (S n0))) v u w)))))) -(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n (s k -(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus n (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n (s k (S n0))) v e1 -e2)))))))))))))) H0 (s k i0) H1) in (let H18 \def (eq_ind_r nat i (\lambda -(n: nat).(lt (S n0) n)) H (s k i0) H1) in (K_ind (\lambda (k: K).((drop (r k -n0) O c e) \to (((\forall (c2: C).(\forall (v: T).((csubst0 (s k i0) v c c2) -\to (\forall (e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 -K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq -C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s -k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead -e2 k u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s k i0) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k i0) (s k0 (S n0))) v u w)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s k i0) (s k0 (S n0))) v e1 e2)))))))))))))) \to ((lt (S n0) (s k -i0)) \to (or4 (drop (S n0) O (CHead c k u2) e) (ex3_4 K C T T (\lambda (k1: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 -u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead c k u2) (CHead e0 k1 w)))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s -k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c k -u2) (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2)))))) -(ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c k u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v -e1 e2)))))))))))) (\lambda (b: B).(\lambda (H2: (drop (r (Bind b) n0) O c -e)).(\lambda (_: ((\forall (c2: C).(\forall (v: T).((csubst0 (s (Bind b) i0) -v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 -e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead -e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T -T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k -w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Bind b) i0))).(or4_intro0 (drop -(S n0) O (CHead c (Bind b) u2) e) (ex3_4 K C T T (\lambda (k: K).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda -(k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead -c (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) u2) -(CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S -n0))) v e1 e2))))))) (drop_drop (Bind b) n0 c e H2 u2)))))) (\lambda (f: -F).(\lambda (H2: (drop (r (Flat f) n0) O c e)).(\lambda (_: ((\forall (c2: -C).(\forall (v: T).((csubst0 (s (Flat f) i0) v c c2) \to (\forall (e: -C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda -(k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: +e1 e2)))))))))) (\lambda (_: (subst0 i0 v t u2)).(let H17 \def (eq_ind K k0 +(\lambda (k1: K).(eq nat (s k1 i0) i)) H4 k H13) in (let H18 \def (eq_ind_r +nat i (\lambda (n1: nat).(\forall (c3: C).(\forall (v1: T).((csubst0 n1 v1 c +c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) +(ex3_4 K C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: +T).(eq C e0 (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n1 (s k1 (S +n0))) v1 u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e0 (CHead e1 k1 u)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead +e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus n1 (s k1 (S n0))) v1 e1 e2)))))) (ex4_5 K C C T T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C e0 (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus n1 (s k1 (S n0))) v1 u w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 +(s k1 (S n0))) v1 e1 e2)))))))))))))) H0 (s k i0) H17) in (let H19 \def +(eq_ind_r nat i (\lambda (n1: nat).(lt (S n0) n1)) H (s k i0) H17) in (K_ind +(\lambda (k1: K).((drop (r k1 n0) O c e) \to (((\forall (c3: C).(\forall (v1: +T).((csubst0 (s k1 i0) v1 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) +\to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T (\lambda (k2: K).(\lambda (e1: +C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k2 u)))))) (\lambda +(k2: K).(\lambda (e1: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 +(CHead e1 k2 w)))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k1 i0) (s k2 (S n0))) v1 u w)))))) +(ex3_4 K C C T (\lambda (k2: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e0 (CHead e1 k2 u)))))) (\lambda (k2: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead e2 k2 u)))))) (\lambda (k2: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k1 +i0) (s k2 (S n0))) v1 e1 e2)))))) (ex4_5 K C C T T (\lambda (k2: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k2 +u))))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k2 w))))))) (\lambda (k2: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s k1 i0) (s k2 (S n0))) v1 u w)))))) (\lambda (k2: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k1 i0) +(s k2 (S n0))) v1 e1 e2)))))))))))))) \to ((lt (S n0) (s k1 i0)) \to (or4 +(drop (S n0) O (CHead c k1 u2) e) (ex3_4 K C T T (\lambda (k2: K).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k2 u)))))) (\lambda +(k2: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead c k1 u2) (CHead e0 k2 w)))))) (\lambda (k2: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k1 i0) (s k2 (S n0))) v +u w)))))) (ex3_4 K C C T (\lambda (k2: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k2 u)))))) (\lambda (k2: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c k1 u2) (CHead e2 +k2 u)))))) (\lambda (k2: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s k1 i0) (s k2 (S n0))) v e1 e2)))))) (ex4_5 K C C T T +(\lambda (k2: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e1 k2 u))))))) (\lambda (k2: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c +k1 u2) (CHead e2 k2 w))))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k1 i0) (s k2 (S n0))) v +u w)))))) (\lambda (k2: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s k1 i0) (s k2 (S n0))) v e1 +e2)))))))))))) (\lambda (b: B).(\lambda (H20: (drop (r (Bind b) n0) O c +e)).(\lambda (_: ((\forall (c3: C).(\forall (v1: T).((csubst0 (s (Bind b) i0) +v1 c c3) \to (\forall (e0: C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O +c3 e0) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (u: +T).(\lambda (_: T).(eq C e0 (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k1 +w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v1 u w)))))) (ex3_4 K C C T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e0 +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c3 (CHead e2 k1 u)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k1 (S n0))) v1 e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v1 u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))))))))))).(\lambda (_: (lt -(S n0) (s (Flat f) i0))).(or4_intro0 (drop (S n0) O (CHead c (Flat f) u2) e) -(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c (Flat f) u2) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k -u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead c (Flat f) u2) (CHead e2 k u)))))) (\lambda (k: +(minus (s (Bind b) i0) (s k1 (S n0))) v1 e1 e2))))))))))))))).(\lambda (_: +(lt (S n0) (s (Bind b) i0))).(or4_intro0 (drop (S n0) O (CHead c (Bind b) u2) +e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c (Bind b) u2) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) u2) (CHead e2 k1 +u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +c (Bind b) u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 +(S n0))) v e1 e2))))))) (drop_drop (Bind b) n0 c e H20 u2)))))) (\lambda (f: +F).(\lambda (H20: (drop (r (Flat f) n0) O c e)).(\lambda (_: ((\forall (c3: +C).(\forall (v1: T).((csubst0 (s (Flat f) i0) v1 c c3) \to (\forall (e0: +C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +i0) (s k1 (S n0))) v1 u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k1 u)))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 +(CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v1 e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k1 u))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +i0) (s k1 (S n0))) v1 u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 +(S n0))) v1 e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) +i0))).(or4_intro0 (drop (S n0) O (CHead c (Flat f) u2) e) (ex3_4 K C T T +(\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c (Flat f) u2) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 +u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Flat f) u2) (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat -f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c (Flat f) u2) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))) (drop_drop (Flat f) n0 c -e H2 u2)))))) k (drop_gen_drop k c e t n0 H2) H17 H18))))) c2 H15)) u1 -(sym_eq T u1 t H14))) k0 (sym_eq K k0 k H13))) c0 (sym_eq C c0 c H12))) H11)) -H10))) v0 (sym_eq T v0 v H8))) i H4 H5 H6 H7 H3))))) | (csubst0_fst k0 i0 c1 -c0 v0 H3 u) \Rightarrow (\lambda (H4: (eq nat (s k0 i0) i)).(\lambda (H5: (eq -T v0 v)).(\lambda (H6: (eq C (CHead c1 k0 u) (CHead c k t))).(\lambda (H7: -(eq C (CHead c0 k0 u) c2)).(eq_ind nat (s k0 i0) (\lambda (n: nat).((eq T v0 -v) \to ((eq C (CHead c1 k0 u) (CHead c k t)) \to ((eq C (CHead c0 k0 u) c2) -\to ((csubst0 i0 v0 c1 c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e -(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus n (s k (S -n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 (CHead e2 k -u0)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus n (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq -C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus n (s k (S n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n (s k (S -n0))) v e1 e2))))))))))))) (\lambda (H8: (eq T v0 v)).(eq_ind T v (\lambda -(t0: T).((eq C (CHead c1 k0 u) (CHead c k t)) \to ((eq C (CHead c0 k0 u) c2) -\to ((csubst0 i0 t0 c1 c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e -(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k0 i0) -(s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 (CHead -e2 k u0)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s k0 i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda -(_: T).(eq C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k -w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: -T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k (S n0))) v u0 w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s k0 i0) (s k (S n0))) v e1 e2)))))))))))) (\lambda -(H9: (eq C (CHead c1 k0 u) (CHead c k t))).(let H10 \def (f_equal C T +f) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c (Flat f) u2) +(CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2))))))) (drop_drop (Flat f) n0 c e H20 u2)))))) k (drop_gen_drop k c e t n0 +H2) H18 H19))))) c2 H15)) u1 (sym_eq T u1 t H14))) k0 (sym_eq K k0 k H13))) +c0 (sym_eq C c0 c H12))) H11)) H10))) v0 (sym_eq T v0 v H8))) i H4 H5 H6 H7 +H3))))) | (csubst0_fst k0 i0 c0 c3 v0 H3 u) \Rightarrow (\lambda (H4: (eq nat +(s k0 i0) i)).(\lambda (H5: (eq T v0 v)).(\lambda (H6: (eq C (CHead c0 k0 u) +(CHead c k t))).(\lambda (H7: (eq C (CHead c3 k0 u) c2)).(eq_ind nat (s k0 +i0) (\lambda (n1: nat).((eq T v0 v) \to ((eq C (CHead c0 k0 u) (CHead c k t)) +\to ((eq C (CHead c3 k0 u) c2) \to ((csubst0 i0 v0 c0 c3) \to (or4 (drop (S +n0) O c2 e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k1 +w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus n1 (s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k1 +u0)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O c2 (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus n1 (s k1 +(S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k1 (S n0))) v e1 +e2))))))))))))) (\lambda (H8: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq +C (CHead c0 k0 u) (CHead c k t)) \to ((eq C (CHead c3 k0 u) c2) \to ((csubst0 +i0 t0 c0 c3) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k1 +u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k1 (S n0))) v +u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 (CHead e2 k1 +u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s k0 i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(_: T).(eq C e (CHead e1 k1 u0))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k1 (S n0))) v u0 w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s k0 i0) (s k1 (S n0))) v e1 e2)))))))))))) (\lambda +(H9: (eq C (CHead c0 k0 u) (CHead c k t))).(let H10 \def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) with [(CSort _) -\Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k0 u) (CHead c k t) -H9) in ((let H11 \def (f_equal C K (\lambda (e0: C).(match e0 in C return -(\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow -k])) (CHead c1 k0 u) (CHead c k t) H9) in ((let H12 \def (f_equal C C -(\lambda (e0: C).(match e0 in C return (\lambda (_: C).C) with [(CSort _) -\Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k0 u) (CHead c k t) -H9) in (eq_ind C c (\lambda (c: C).((eq K k0 k) \to ((eq T u t) \to ((eq C -(CHead c0 k0 u) c2) \to ((csubst0 i0 v c c0) \to (or4 (drop (S n0) O c2 e) -(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: -T).(eq C e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k0 i0) -(s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 (CHead -e2 k u0)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s k0 i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda -(_: T).(eq C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k -w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: -T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k (S n0))) v u0 w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s k0 i0) (s k (S n0))) v e1 e2))))))))))))) (\lambda -(H13: (eq K k0 k)).(eq_ind K k (\lambda (k: K).((eq T u t) \to ((eq C (CHead -c0 k u) c2) \to ((csubst0 i0 v c c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C -T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C -e (CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k1 w)))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k i0) -(s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) (\lambda -(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 -(CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2)))))) -(ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 u0))))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O c2 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead c0 k0 u) (CHead c k +t) H9) in ((let H11 \def (f_equal C K (\lambda (e0: C).(match e0 in C return +(\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) +\Rightarrow k1])) (CHead c0 k0 u) (CHead c k t) H9) in ((let H12 \def +(f_equal C C (\lambda (e0: C).(match e0 in C return (\lambda (_: C).C) with +[(CSort _) \Rightarrow c0 | (CHead c4 _ _) \Rightarrow c4])) (CHead c0 k0 u) +(CHead c k t) H9) in (eq_ind C c (\lambda (c4: C).((eq K k0 k) \to ((eq T u +t) \to ((eq C (CHead c3 k0 u) c2) \to ((csubst0 i0 v c4 c3) \to (or4 (drop (S +n0) O c2 e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k1 +w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s k0 i0) (s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O c2 (CHead e2 k1 u0)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k0 +i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 +u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s k0 i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k0 i0) +(s k1 (S n0))) v e1 e2))))))))))))) (\lambda (H13: (eq K k0 k)).(eq_ind K k +(\lambda (k1: K).((eq T u t) \to ((eq C (CHead c3 k1 u) c2) \to ((csubst0 i0 +v c c3) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k2: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k2 +u0)))))) (\lambda (k2: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e0 k2 w)))))) (\lambda (k2: K).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k1 i0) (s k2 (S n0))) v +u0 w)))))) (ex3_4 K C C T (\lambda (k2: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 k2 u0)))))) (\lambda (k2: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 (CHead e2 k2 +u0)))))) (\lambda (k2: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s k1 i0) (s k2 (S n0))) v e1 e2)))))) (ex4_5 K C C T T +(\lambda (k2: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(_: T).(eq C e (CHead e1 k2 u0))))))) (\lambda (k2: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e2 k2 w))))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s k1 i0) (s k2 (S n0))) v u0 w)))))) +(\lambda (k2: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s k1 i0) (s k2 (S n0))) v e1 e2)))))))))))) (\lambda +(H14: (eq T u t)).(eq_ind T t (\lambda (t0: T).((eq C (CHead c3 k t0) c2) \to +((csubst0 i0 v c c3) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda +(k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 +k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v -u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 -e2)))))))))))) (\lambda (H14: (eq T u t)).(eq_ind T t (\lambda (t: T).((eq C -(CHead c0 k t) c2) \to ((csubst0 i0 v c c0) \to (or4 (drop (S n0) O c2 e) -(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: -T).(eq C e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k i0) -(s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 (CHead -e2 k u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 (CHead e2 k1 +u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda -(_: T).(eq C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k -w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(_: T).(eq C e (CHead e1 k1 u0))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2))))))))))) (\lambda -(H15: (eq C (CHead c0 k t) c2)).(eq_ind C (CHead c0 k t) (\lambda (c2: -C).((csubst0 i0 v c c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda -(k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k -u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k1: K).(\lambda (_: +(H15: (eq C (CHead c3 k t) c2)).(eq_ind C (CHead c3 k t) (\lambda (c4: +C).((csubst0 i0 v c c3) \to (or4 (drop (S n0) O c4 e) (ex3_4 K C T T (\lambda +(k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 +k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c4 (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v -u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 (CHead e2 k u0)))))) -(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s k i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e -(CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) -(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda -(w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s k i0) (s k1 (S n0))) v e1 e2)))))))))) (\lambda (H16: (csubst0 i0 v -c c0)).(let H1 \def (eq_ind K k0 (\lambda (k: K).(eq nat (s k i0) i)) H4 k -H13) in (let H17 \def (eq_ind_r nat i (\lambda (n: nat).(\forall (c2: -C).(\forall (v: T).((csubst0 n v c c2) \to (\forall (e: C).((drop (S n0) O c -e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead -e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus n (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k -u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c4 (CHead e2 k1 +u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(_: T).(eq C e (CHead e1 k1 u0))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c4 (CHead +e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u0 w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2)))))))))) (\lambda +(H16: (csubst0 i0 v c c3)).(let H17 \def (eq_ind K k0 (\lambda (k1: K).(eq +nat (s k1 i0) i)) H4 k H13) in (let H18 \def (eq_ind_r nat i (\lambda (n1: +nat).(\forall (c4: C).(\forall (v1: T).((csubst0 n1 v1 c c4) \to (\forall +(e0: C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c4 e0) (ex3_4 K C T T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (u0: T).(\lambda (_: T).(eq C e0 +(CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c4 (CHead e1 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus n1 (s k1 +(S n0))) v1 u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C e0 (CHead e1 k1 u0)))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c4 +(CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus n1 (s k1 (S n0))) v1 e1 e2)))))) (ex4_5 K +C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e0 (CHead e1 k1 u0))))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c4 +(CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus n1 (s k1 (S n0))) v1 u0 +w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus n1 (s k1 (S n0))) v1 e1 e2)))))))))))))) +H0 (s k i0) H17) in (let H19 \def (eq_ind_r nat i (\lambda (n1: nat).(lt (S +n0) n1)) H (s k i0) H17) in (K_ind (\lambda (k1: K).((drop (r k1 n0) O c e) +\to (((\forall (c4: C).(\forall (v1: T).((csubst0 (s k1 i0) v1 c c4) \to +(\forall (e0: C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c4 e0) (ex3_4 +K C T T (\lambda (k2: K).(\lambda (e1: C).(\lambda (u0: T).(\lambda (_: +T).(eq C e0 (CHead e1 k2 u0)))))) (\lambda (k2: K).(\lambda (e1: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O c4 (CHead e1 k2 w)))))) (\lambda (k2: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k1 i0) +(s k2 (S n0))) v1 u0 w)))))) (ex3_4 K C C T (\lambda (k2: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C e0 (CHead e1 k2 u0)))))) (\lambda +(k2: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c4 +(CHead e2 k2 u0)))))) (\lambda (k2: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s k1 i0) (s k2 (S n0))) v1 e1 e2)))))) +(ex4_5 K C C T T (\lambda (k2: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e0 (CHead e1 k2 u0))))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n (s k (S n0))) v u w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus n (s k (S n0))) v e1 e2)))))))))))))) H0 (s k i0) H1) -in (let H18 \def (eq_ind_r nat i (\lambda (n: nat).(lt (S n0) n)) H (s k i0) -H1) in (K_ind (\lambda (k: K).((drop (r k n0) O c e) \to (((\forall (c2: -C).(\forall (v: T).((csubst0 (s k i0) v c c2) \to (\forall (e: C).((drop (S -n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k0: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k0 (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) -(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s k i0) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k i0) (s k0 (S n0))) v u w)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s k i0) (s k0 (S n0))) v e1 e2)))))))))))))) \to ((lt (S n0) (s k -i0)) \to (or4 (drop (S n0) O (CHead c0 k t) e) (ex3_4 K C T T (\lambda (k1: +n0) O c4 (CHead e2 k2 w))))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k1 i0) (s k2 (S n0))) +v1 u0 w)))))) (\lambda (k2: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s k1 i0) (s k2 (S n0))) v1 e1 +e2)))))))))))))) \to ((lt (S n0) (s k1 i0)) \to (or4 (drop (S n0) O (CHead c3 +k1 t) e) (ex3_4 K C T T (\lambda (k2: K).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e0 k2 u0)))))) (\lambda (k2: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 k1 t) (CHead +e0 k2 w)))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s k1 i0) (s k2 (S n0))) v u0 w)))))) (ex3_4 K C C T +(\lambda (k2: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 k2 u0)))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c3 k1 t) (CHead e2 k2 u0)))))) +(\lambda (k2: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k1 i0) (s k2 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k2: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e1 k2 u0))))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 k1 t) (CHead e2 +k2 w))))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s k1 i0) (s k2 (S n0))) v u0 w)))))) +(\lambda (k2: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s k1 i0) (s k2 (S n0))) v e1 e2)))))))))))) (\lambda +(b: B).(\lambda (H20: (drop (r (Bind b) n0) O c e)).(\lambda (_: ((\forall +(c4: C).(\forall (v1: T).((csubst0 (s (Bind b) i0) v1 c c4) \to (\forall (e0: +C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c4 e0) (ex3_4 K C T T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (u0: T).(\lambda (_: T).(eq C e0 +(CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c4 (CHead e1 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind +b) i0) (s k1 (S n0))) v1 u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e0 (CHead e1 k1 u0)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S +n0) O c4 (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v1 e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e0 (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c4 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind +b) i0) (s k1 (S n0))) v1 u0 w)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k1 (S n0))) v1 e1 e2))))))))))))))).(\lambda (H22: (lt (S n0) (s +(Bind b) i0))).(let H23 \def (IHn i0 (le_S_n (S n0) i0 H22) c c3 v H16 e H20) +in (or4_ind (drop n0 O c3 e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k1 u0)))))) (\lambda +(k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c3 (CHead +e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus i0 (s k1 n0)) v u0 w)))))) (ex3_4 K C C T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k1 +u0)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop n0 O c3 (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k1 n0)) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop n0 O c3 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus i0 (s k1 +n0)) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus i0 (s k1 n0)) v e1 e2))))))) (or4 +(drop (S n0) O (CHead c3 (Bind b) t) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead c0 k t) (CHead e0 k1 w)))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k i0) -(s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) (\lambda -(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O -(CHead c0 k t) (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v -e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e0 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind +b) i0) (s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S +n0) O (CHead c3 (Bind b) t) (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s +k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 +u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) (\lambda +(k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))))) (\lambda +(H24: (drop n0 O c3 e)).(or4_intro0 (drop (S n0) O (CHead c3 (Bind b) t) e) +(ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda +(_: T).(eq C e (CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) t) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(eq C e (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) t) +(CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead c0 k t) (CHead e2 k1 w))))))) (\lambda (k1: +T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s k i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k i0) -(s k1 (S n0))) v e1 e2)))))))))))) (\lambda (b: B).(\lambda (H2: (drop (r -(Bind b) n0) O c e)).(\lambda (_: ((\forall (c2: C).(\forall (v: T).((csubst0 -(s (Bind b) i0) v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (or4 -(drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k -u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S -n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda +(minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s -(Bind b) i0) (s k (S n0))) v e1 e2))))))))))))))).(\lambda (H: (lt (S n0) (s -(Bind b) i0))).(let H19 \def (IHn i0 (le_S_n (S n0) i0 H) c c0 v H16 e H2) in -(or4_ind (drop n0 O c0 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: -C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k u0)))))) (\lambda (k: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e0 k -w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus i0 (s k n0)) v u0 w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k -u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop n0 O c0 (CHead e2 k u0)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k n0)) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k u0))))))) (\lambda -(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop -n0 O c0 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus i0 (s k n0)) v u0 w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i0 (s k n0)) v e1 e2))))))) (or4 (drop (S n0) O (CHead -c0 (Bind b) t) e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda -(u0: T).(\lambda (_: T).(eq C e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) -(CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda -(w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C -T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e -(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq -C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) -(CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda -(u0: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 -w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2)))))))) (\lambda (H20: (drop n0 O c0 e)).(or4_intro0 (drop (S n0) O (CHead -c0 (Bind b) t) e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda -(u0: T).(\lambda (_: T).(eq C e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) -(CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda -(w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C -T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e -(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq -C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) -(CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda -(u0: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 -w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2))))))) (drop_drop (Bind b) n0 c0 e H20 t))) (\lambda (H20: (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop n0 O c0 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k n0)) v u -w))))))).(ex3_4_ind K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: -T).(\lambda (_: T).(eq C e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e0 k w)))))) (\lambda -(k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus i0 (s -k n0)) v u0 w))))) (or4 (drop (S n0) O (CHead c0 (Bind b) t) e) (ex3_4 K C T -T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e -(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k -u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind -b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: -K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H21: (eq C e -(CHead x1 x0 x2))).(\lambda (H22: (drop n0 O c0 (CHead x1 x0 x3))).(\lambda -(H23: (subst0 (minus i0 (s x0 n0)) v x2 x3)).(eq_ind_r C (CHead x1 x0 x2) -(\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Bind b) t) c) (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c -(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c (CHead e1 k -u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind -b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S -n0) O (CHead c0 (Bind b) t) (CHead x1 x0 x2)) (ex3_4 K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) -(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 x2) -(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq -C (CHead x1 x0 x2) (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 -(Bind b) t) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S -n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2))))))) (ex3_4_intro K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: -T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e0 k u0)))))) (\lambda (k: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 -(Bind b) t) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: -T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w))))) -x0 x1 x2 x3 (refl_equal C (CHead x1 x0 x2)) (drop_drop (Bind b) n0 c0 (CHead -x1 x0 x3) H22 t) (eq_ind_r nat (S (s x0 n0)) (\lambda (n: nat).(subst0 (minus -(s (Bind b) i0) n) v x2 x3)) H23 (s x0 (S n0)) (s_S x0 n0)))) e H21)))))))) -H20)) (\lambda (H20: (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c0 (CHead e2 k u)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus i0 (s k n0)) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k -u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop n0 O c0 (CHead e2 k u0)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k n0)) v e1 e2))))) -(or4 (drop (S n0) O (CHead c0 (Bind b) t) e) (ex3_4 K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k -u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) (\lambda (k: +(Bind b) i0) (s k1 (S n0))) v e1 e2))))))) (drop_drop (Bind b) n0 c3 e H24 +t))) (\lambda (H24: (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e (CHead e0 k1 u0)))))) (\lambda (k1: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c3 (CHead e0 +k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus i0 (s k1 n0)) v u0 w))))))).(ex3_4_ind K C T T (\lambda +(k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 +k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop n0 O c3 (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus i0 (s k1 n0)) v u0 w))))) +(or4 (drop (S n0) O (CHead c3 (Bind b) t) e) (ex3_4 K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k1 +u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind -b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S -n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) (\lambda (k: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k -(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: -K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H21: (eq C e -(CHead x1 x0 x3))).(\lambda (H22: (drop n0 O c0 (CHead x2 x0 x3))).(\lambda -(H23: (csubst0 (minus i0 (s x0 n0)) v x1 x2)).(eq_ind_r C (CHead x1 x0 x3) -(\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Bind b) t) c) (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c -(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c (CHead e1 k -u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind -b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S -n0) O (CHead c0 (Bind b) t) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) -(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 x3) -(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq -C (CHead x1 x0 x3) (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 -(Bind b) t) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S -n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2))))))) (ex3_4_intro K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(eq C (CHead x1 x0 x3) (CHead e1 k u0)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O (CHead c0 -(Bind b) t) (CHead e2 k u0)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2))))) x0 x1 x2 x3 (refl_equal C (CHead x1 x0 x3)) (drop_drop (Bind b) n0 c0 -(CHead x2 x0 x3) H22 t) (eq_ind_r nat (S (s x0 n0)) (\lambda (n: -nat).(csubst0 (minus (s (Bind b) i0) n) v x1 x2)) H23 (s x0 (S n0)) (s_S x0 -n0)))) e H21)))))))) H20)) (\lambda (H20: (ex4_5 K C C T T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i0 (s k n0)) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k -n0)) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop n0 O c0 (CHead e2 k w))))))) (\lambda (k: +b) i0) (s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S +n0) O (CHead c3 (Bind b) t) (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s +k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 +u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) (\lambda +(k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))))) (\lambda +(x0: K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H25: (eq +C e (CHead x1 x0 x2))).(\lambda (H26: (drop n0 O c3 (CHead x1 x0 +x3))).(\lambda (H27: (subst0 (minus i0 (s x0 n0)) v x2 x3)).(eq_ind_r C +(CHead x1 x0 x2) (\lambda (c4: C).(or4 (drop (S n0) O (CHead c3 (Bind b) t) +c4) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C c4 (CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) t) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(eq C c4 (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) t) +(CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus i0 (s k n0)) v u0 w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k n0)) v e1 -e2)))))) (or4 (drop (S n0) O (CHead c0 (Bind b) t) e) (ex3_4 K C T T (\lambda -(k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k -u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind -b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S -n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) (\lambda (k: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k -(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: -K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (H21: (eq C e (CHead x1 x0 x3))).(\lambda (H22: (drop n0 O c0 -(CHead x2 x0 x4))).(\lambda (H23: (subst0 (minus i0 (s x0 n0)) v x3 -x4)).(\lambda (H24: (csubst0 (minus i0 (s x0 n0)) v x1 x2)).(eq_ind_r C -(CHead x1 x0 x3) (\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Bind b) t) c) -(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: -T).(eq C c (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c (CHead e1 k -u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind -b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro3 (drop (S -n0) O (CHead c0 (Bind b) t) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k: +(minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) i0) (s k1 (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S n0) O +(CHead c3 (Bind b) t) (CHead x1 x0 x2)) (ex3_4 K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) +(CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 +x2) (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 +u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) i0) (s k1 (S n0))) v e1 e2))))))) (ex3_4_intro K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) +(CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u0 w))))) x0 x1 x2 x3 (refl_equal C +(CHead x1 x0 x2)) (drop_drop (Bind b) n0 c3 (CHead x1 x0 x3) H26 t) (eq_ind_r +nat (S (s x0 n0)) (\lambda (n1: nat).(subst0 (minus (s (Bind b) i0) n1) v x2 +x3)) H27 (s x0 (S n0)) (s_S x0 n0)))) e H25)))))))) H24)) (\lambda (H24: +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(eq C e (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop n0 O c3 (CHead e2 k1 u0)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i0 (s k1 n0)) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k1 +u0)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop n0 O c3 (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k1 n0)) v e1 +e2))))) (or4 (drop (S n0) O (CHead c3 (Bind b) t) e) (ex3_4 K C T T (\lambda +(k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 +k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e0 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind +b) i0) (s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S +n0) O (CHead c3 (Bind b) t) (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s +k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 +u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) (\lambda +(k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))))) (\lambda +(x0: K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H25: (eq +C e (CHead x1 x0 x3))).(\lambda (H26: (drop n0 O c3 (CHead x2 x0 +x3))).(\lambda (H27: (csubst0 (minus i0 (s x0 n0)) v x1 x2)).(eq_ind_r C +(CHead x1 x0 x3) (\lambda (c4: C).(or4 (drop (S n0) O (CHead c3 (Bind b) t) +c4) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C c4 (CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) t) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(eq C c4 (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) t) +(CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) i0) (s k1 (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S n0) O +(CHead c3 (Bind b) t) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) -(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +(CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 +x3) (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 +u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) i0) (s k1 (S n0))) v e1 e2))))))) (ex3_4_intro K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 x3) -(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq -C (CHead x1 x0 x3) (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 -(Bind b) t) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S -n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2))))))) (ex4_5_intro K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) x0 x1 x2 x3 x4 (refl_equal -C (CHead x1 x0 x3)) (drop_drop (Bind b) n0 c0 (CHead x2 x0 x4) H22 t) -(eq_ind_r nat (S (s x0 n0)) (\lambda (n: nat).(subst0 (minus (s (Bind b) i0) -n) v x3 x4)) H23 (s x0 (S n0)) (s_S x0 n0)) (eq_ind_r nat (S (s x0 n0)) -(\lambda (n: nat).(csubst0 (minus (s (Bind b) i0) n) v x1 x2)) H24 (s x0 (S -n0)) (s_S x0 n0)))) e H21)))))))))) H20)) H19)))))) (\lambda (f: F).(\lambda -(H2: (drop (r (Flat f) n0) O c e)).(\lambda (H0: ((\forall (c2: C).(\forall -(v: T).((csubst0 (s (Flat f) i0) v c c2) \to (\forall (e: C).((drop (S n0) O -c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda -(k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 -(CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (ex3_4 K C C -T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S -n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda +(CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 +u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2))))) x0 x1 x2 x3 +(refl_equal C (CHead x1 x0 x3)) (drop_drop (Bind b) n0 c3 (CHead x2 x0 x3) +H26 t) (eq_ind_r nat (S (s x0 n0)) (\lambda (n1: nat).(csubst0 (minus (s +(Bind b) i0) n1) v x1 x2)) H27 (s x0 (S n0)) (s_S x0 n0)))) e H25)))))))) +H24)) (\lambda (H24: (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 +u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 O c3 (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus i0 (s k1 n0)) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k1 n0)) v e1 +e2)))))))).(ex4_5_ind K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 u0))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop n0 O c3 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus i0 (s k1 +n0)) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus i0 (s k1 n0)) v e1 e2)))))) (or4 (drop +(S n0) O (CHead c3 (Bind b) t) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda +(e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k1 u0)))))) +(\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c3 (Bind b) t) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 +(S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O +(CHead c3 (Bind b) t) (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S +n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 +u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) (\lambda +(k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))))) (\lambda +(x0: K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H25: (eq C e (CHead x1 x0 x3))).(\lambda (H26: (drop n0 O c3 +(CHead x2 x0 x4))).(\lambda (H27: (subst0 (minus i0 (s x0 n0)) v x3 +x4)).(\lambda (H28: (csubst0 (minus i0 (s x0 n0)) v x1 x2)).(eq_ind_r C +(CHead x1 x0 x3) (\lambda (c4: C).(or4 (drop (S n0) O (CHead c3 (Bind b) t) +c4) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C c4 (CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) t) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(eq C c4 (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) t) +(CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s -(Flat f) i0) (s k (S n0))) v e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s -(Flat f) i0))).(let H19 \def (H0 c0 v H16 e H2) in (or4_ind (drop (S n0) O c0 -e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda -(_: T).(eq C e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus i0 (s k (S -n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c0 (CHead e2 k -u0)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus i0 (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq -C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus i0 (s k (S n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k -(S n0))) v e1 e2))))))) (or4 (drop (S n0) O (CHead c0 (Flat f) t) e) (ex3_4 K -C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C -e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k -u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) (\lambda (k: +(Bind b) i0) (s k1 (S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O +(CHead c3 (Bind b) t) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) +(CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 +x3) (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 +u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Bind b) t) (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) i0) (s k1 (S n0))) v e1 e2))))))) (ex4_5_intro K C C T T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C (CHead x1 x0 x3) (CHead e1 k1 u0))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 +(Bind b) t) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 +(S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S +n0))) v e1 e2)))))) x0 x1 x2 x3 x4 (refl_equal C (CHead x1 x0 x3)) (drop_drop +(Bind b) n0 c3 (CHead x2 x0 x4) H26 t) (eq_ind_r nat (S (s x0 n0)) (\lambda +(n1: nat).(subst0 (minus (s (Bind b) i0) n1) v x3 x4)) H27 (s x0 (S n0)) (s_S +x0 n0)) (eq_ind_r nat (S (s x0 n0)) (\lambda (n1: nat).(csubst0 (minus (s +(Bind b) i0) n1) v x1 x2)) H28 (s x0 (S n0)) (s_S x0 n0)))) e H25)))))))))) +H24)) H23)))))) (\lambda (f: F).(\lambda (H20: (drop (r (Flat f) n0) O c +e)).(\lambda (H21: ((\forall (c4: C).(\forall (v1: T).((csubst0 (s (Flat f) +i0) v1 c c4) \to (\forall (e0: C).((drop (S n0) O c e0) \to (or4 (drop (S n0) +O c4 e0) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e0 (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c4 (CHead e1 k1 +w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v1 u0 w)))))) (ex3_4 K C C T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e0 +(CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O c4 (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat -f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +f) i0) (s k1 (S n0))) v1 e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e0 +(CHead e1 k1 u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c4 (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v1 u0 w)))))) (\lambda +(k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v1 e1 +e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) i0))).(let H23 \def +(H21 c3 v H16 e H20) in (or4_ind (drop (S n0) O c3 e) (ex3_4 K C T T (\lambda +(k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 +k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus i0 (s k1 (S n0))) v u0 +w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c3 (CHead e2 k1 +u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i0 (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C e (CHead e1 k1 u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus i0 (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (H20: (drop (S -n0) O c0 e)).(or4_intro0 (drop (S n0) O (CHead c0 (Flat f) t) e) (ex3_4 K C T -T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e -(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k -u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) (\lambda (k: +(minus i0 (s k1 (S n0))) v e1 e2))))))) (or4 (drop (S n0) O (CHead c3 (Flat +f) t) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(eq C e (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) t) +(CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) i0) (s k1 (S n0))) v e1 e2)))))))) (\lambda (H24: (drop (S n0) O c3 +e)).(or4_intro0 (drop (S n0) O (CHead c3 (Flat f) t) e) (ex3_4 K C T T +(\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 +k1 u0)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat -f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))) (drop_drop (Flat f) n0 c0 -e H20 t))) (\lambda (H20: (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead -e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i0 (s k (S n0))) v u w))))))).(ex3_4_ind K C T T (\lambda -(k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k -u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c0 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus i0 (s k (S n0))) v u0 -w))))) (or4 (drop (S n0) O (CHead c0 (Flat f) t) e) (ex3_4 K C T T (\lambda -(k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k -u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) (\lambda (k: +f) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e1 k1 u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) +(CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v e1 e2))))))) (drop_drop (Flat f) n0 c3 e H24 t))) (\lambda (H24: +(ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda +(_: T).(eq C e (CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus i0 (s k1 (S n0))) v u0 w))))))).(ex3_4_ind K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k1 +u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus i0 (s k1 (S n0))) v u0 +w))))) (or4 (drop (S n0) O (CHead c3 (Flat f) t) e) (ex3_4 K C T T (\lambda +(k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 +k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Flat -f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S -n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) (\lambda (k: K).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k -(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: -K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H21: (eq C e -(CHead x1 x0 x2))).(\lambda (H22: (drop (S n0) O c0 (CHead x1 x0 -x3))).(\lambda (H23: (subst0 (minus i0 (s x0 (S n0))) v x2 x3)).(eq_ind_r C -(CHead x1 x0 x2) (\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Flat f) t) c) -(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: -T).(eq C c (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c (CHead e1 k -u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat -f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S -n0) O (CHead c0 (Flat f) t) (CHead x1 x0 x2)) (ex3_4 K C T T (\lambda (k: +f) i0) (s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S +n0) O (CHead c3 (Flat f) t) (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s +k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 +u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) (\lambda +(k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 e2)))))))) (\lambda +(x0: K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H25: (eq +C e (CHead x1 x0 x2))).(\lambda (H26: (drop (S n0) O c3 (CHead x1 x0 +x3))).(\lambda (H27: (subst0 (minus i0 (s x0 (S n0))) v x2 x3)).(eq_ind_r C +(CHead x1 x0 x2) (\lambda (c4: C).(or4 (drop (S n0) O (CHead c3 (Flat f) t) +c4) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C c4 (CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(eq C c4 (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) t) +(CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) i0) (s k1 (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S n0) O +(CHead c3 (Flat f) t) (CHead x1 x0 x2)) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) -(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 x2) -(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq -C (CHead x1 x0 x2) (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 -(Flat f) t) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S -n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2))))))) (ex3_4_intro K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: -T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e0 k u0)))))) (\lambda (k: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 -(Flat f) t) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: -T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w))))) -x0 x1 x2 x3 (refl_equal C (CHead x1 x0 x2)) (drop_drop (Flat f) n0 c0 (CHead -x1 x0 x3) H22 t) H23)) e H21)))))))) H20)) (\lambda (H20: (ex3_4 K C C T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(drop (S n0) O c0 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k (S n0))) v e1 -e2))))))).(ex3_4_ind K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c0 (CHead e2 k u0)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus i0 (s k (S n0))) v e1 e2))))) (or4 (drop (S n0) O (CHead c0 (Flat f) -t) e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: -T).(\lambda (_: T).(eq C e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) -(CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda -(w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C -T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e -(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq -C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) -(CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda -(u0: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 -w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2)))))))) (\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: -T).(\lambda (H21: (eq C e (CHead x1 x0 x3))).(\lambda (H22: (drop (S n0) O c0 -(CHead x2 x0 x3))).(\lambda (H23: (csubst0 (minus i0 (s x0 (S n0))) v x1 -x2)).(eq_ind_r C (CHead x1 x0 x3) (\lambda (c: C).(or4 (drop (S n0) O (CHead -c0 (Flat f) t) c) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda -(u0: T).(\lambda (_: T).(eq C c (CHead e0 k u0)))))) (\lambda (k: K).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) -(CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda -(w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C -T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c -(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq -C c (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) -(CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda -(u0: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 -w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2))))))))) (or4_intro2 (drop (S n0) O (CHead c0 (Flat f) t) (CHead x1 x0 -x3)) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: -T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e0 k u0)))))) (\lambda (k: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 -(Flat f) t) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: -T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) -(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: -T).(eq C (CHead x1 x0 x3) (CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Flat f) t) -(CHead e2 k u0)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))) (ex3_4_intro K C C T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C -(CHead x1 x0 x3) (CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Flat f) t) -(CHead e2 k u0)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))) -x0 x1 x2 x3 (refl_equal C (CHead x1 x0 x3)) (drop_drop (Flat f) n0 c0 (CHead -x2 x0 x3) H22 t) H23)) e H21)))))))) H20)) (\lambda (H20: (ex4_5 K C C T T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i0 (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k -(S n0))) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 k w))))))) (\lambda (k: +(CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 +x2) (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e2 k1 +u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) i0) (s k1 (S n0))) v e1 e2))))))) (ex3_4_intro K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) +(CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v u0 w))))) x0 x1 x2 x3 (refl_equal C +(CHead x1 x0 x2)) (drop_drop (Flat f) n0 c3 (CHead x1 x0 x3) H26 t) H27)) e +H25)))))))) H24)) (\lambda (H24: (ex3_4 K C C T (\lambda (k1: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S +n0) O c3 (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k1 (S n0))) v e1 +e2))))))).(ex3_4_ind K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c3 (CHead e2 k1 +u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i0 (s k1 (S n0))) v e1 e2))))) (or4 (drop (S n0) O (CHead +c3 (Flat f) t) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e (CHead e0 k1 u0)))))) (\lambda (k1: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 +(Flat f) t) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u0 +w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) t) +(CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus i0 (s k (S n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k -(S n0))) v e1 e2)))))) (or4 (drop (S n0) O (CHead c0 (Flat f) t) e) (ex3_4 K -C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C -e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k -u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) (\lambda (k: +(minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) i0) (s k1 (S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: +C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H25: (eq C e (CHead x1 x0 +x3))).(\lambda (H26: (drop (S n0) O c3 (CHead x2 x0 x3))).(\lambda (H27: +(csubst0 (minus i0 (s x0 (S n0))) v x1 x2)).(eq_ind_r C (CHead x1 x0 x3) +(\lambda (c4: C).(or4 (drop (S n0) O (CHead c3 (Flat f) t) c4) (ex3_4 K C T T +(\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 +(CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c4 (CHead e1 +k1 u0)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat -f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: -K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (H21: (eq C e (CHead x1 x0 x3))).(\lambda (H22: (drop (S n0) O c0 -(CHead x2 x0 x4))).(\lambda (H23: (subst0 (minus i0 (s x0 (S n0))) v x3 -x4)).(\lambda (H24: (csubst0 (minus i0 (s x0 (S n0))) v x1 x2)).(eq_ind_r C -(CHead x1 x0 x3) (\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Flat f) t) c) -(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: -T).(eq C c (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c (CHead e1 k -u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) (\lambda (k: +f) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 +(CHead e1 k1 u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) +(CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c3 (Flat f) t) +(CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e0 k1 u0)))))) (\lambda +(k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead c3 (Flat f) t) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u0: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 u0)))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O +(CHead c3 (Flat f) t) (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) +(CHead e1 k1 u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) +(CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v e1 e2))))))) (ex3_4_intro K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 +u0)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat -f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro3 (drop (S -n0) O (CHead c0 (Flat f) t) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) -(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 x3) -(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda -(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq -C (CHead x1 x0 x3) (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 -(Flat f) t) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S -n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2))))))) (ex4_5_intro K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k -u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))) x0 x1 x2 x3 x4 (refl_equal -C (CHead x1 x0 x3)) (drop_drop (Flat f) n0 c0 (CHead x2 x0 x4) H22 t) H23 -H24)) e H21)))))))))) H20)) H19)))))) k (drop_gen_drop k c e t n0 H2) H17 -H18))))) c2 H15)) u (sym_eq T u t H14))) k0 (sym_eq K k0 k H13))) c1 (sym_eq -C c1 c H12))) H11)) H10))) v0 (sym_eq T v0 v H8))) i H4 H5 H6 H7 H3))))) | -(csubst0_both k0 i0 v0 u1 u2 H3 c1 c0 H4) \Rightarrow (\lambda (H5: (eq nat -(s k0 i0) i)).(\lambda (H6: (eq T v0 v)).(\lambda (H7: (eq C (CHead c1 k0 u1) -(CHead c k t))).(\lambda (H8: (eq C (CHead c0 k0 u2) c2)).(eq_ind nat (s k0 -i0) (\lambda (n: nat).((eq T v0 v) \to ((eq C (CHead c1 k0 u1) (CHead c k t)) -\to ((eq C (CHead c0 k0 u2) c2) \to ((subst0 i0 v0 u1 u2) \to ((csubst0 i0 v0 -c1 c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda -(k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 -(CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 (minus n (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k -u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n (s k (S n0))) v u w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus n (s k (S n0))) v e1 e2)))))))))))))) (\lambda (H9: -(eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq C (CHead c1 k0 u1) (CHead c k -t)) \to ((eq C (CHead c0 k0 u2) c2) \to ((subst0 i0 t0 u1 u2) \to ((csubst0 -i0 t0 c1 c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s k0 i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k0 i0) (s k (S n0))) v u w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s k0 i0) (s k (S n0))) v e1 e2))))))))))))) (\lambda (H10: (eq C -(CHead c1 k0 u1) (CHead c k t))).(let H11 \def (f_equal C T (\lambda (e0: -C).(match e0 in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u1 | -(CHead _ _ t) \Rightarrow t])) (CHead c1 k0 u1) (CHead c k t) H10) in ((let -H12 \def (f_equal C K (\lambda (e0: C).(match e0 in C return (\lambda (_: -C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead -c1 k0 u1) (CHead c k t) H10) in ((let H13 \def (f_equal C C (\lambda (e0: -C).(match e0 in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | -(CHead c _ _) \Rightarrow c])) (CHead c1 k0 u1) (CHead c k t) H10) in (eq_ind -C c (\lambda (c: C).((eq K k0 k) \to ((eq T u1 t) \to ((eq C (CHead c0 k0 u2) -c2) \to ((subst0 i0 v u1 u2) \to ((csubst0 i0 v c c0) \to (or4 (drop (S n0) O -c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s k0 i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k -u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k0 i0) (s k (S n0))) v -e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k (S n0))) v u -w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus (s k0 i0) (s k (S n0))) v e1 -e2)))))))))))))) (\lambda (H14: (eq K k0 k)).(eq_ind K k (\lambda (k: K).((eq -T u1 t) \to ((eq C (CHead c0 k u2) c2) \to ((subst0 i0 v u1 u2) \to ((csubst0 -i0 v c c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k1: +f) i0) (s k1 (S n0))) v e1 e2))))) x0 x1 x2 x3 (refl_equal C (CHead x1 x0 +x3)) (drop_drop (Flat f) n0 c3 (CHead x2 x0 x3) H26 t) H27)) e H25)))))))) +H24)) (\lambda (H24: (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 +u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus i0 (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k1 +(S n0))) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 +u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus i0 (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k1 +(S n0))) v e1 e2)))))) (or4 (drop (S n0) O (CHead c3 (Flat f) t) e) (ex3_4 K +C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq +C e (CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 +k1 u0)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e2 k1 u0)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e1 k1 u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) +(CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: +C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H25: (eq C e (CHead x1 x0 +x3))).(\lambda (H26: (drop (S n0) O c3 (CHead x2 x0 x4))).(\lambda (H27: +(subst0 (minus i0 (s x0 (S n0))) v x3 x4)).(\lambda (H28: (csubst0 (minus i0 +(s x0 (S n0))) v x1 x2)).(eq_ind_r C (CHead x1 x0 x3) (\lambda (c4: C).(or4 +(drop (S n0) O (CHead c3 (Flat f) t) c4) (ex3_4 K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 (CHead e0 k1 +u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e0 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Flat +f) i0) (s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c4 (CHead e1 k1 u0)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S +n0) O (CHead c3 (Flat f) t) (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s +k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 (CHead e1 k1 +u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) (\lambda +(k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 e2))))))))) +(or4_intro3 (drop (S n0) O (CHead c3 (Flat f) t) (CHead x1 x0 x3)) (ex3_4 K C +T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C +(CHead x1 x0 x3) (CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 u0)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 +(Flat f) t) (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 +u0))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) (\lambda +(k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 e2))))))) (ex4_5_intro +K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Flat f) t) (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) i0) (s k1 (S n0))) v e1 e2)))))) x0 x1 x2 x3 x4 (refl_equal C (CHead +x1 x0 x3)) (drop_drop (Flat f) n0 c3 (CHead x2 x0 x4) H26 t) H27 H28)) e +H25)))))))))) H24)) H23)))))) k (drop_gen_drop k c e t n0 H2) H18 H19))))) c2 +H15)) u (sym_eq T u t H14))) k0 (sym_eq K k0 k H13))) c0 (sym_eq C c0 c +H12))) H11)) H10))) v0 (sym_eq T v0 v H8))) i H4 H5 H6 H7 H3))))) | +(csubst0_both k0 i0 v0 u1 u2 H3 c0 c3 H4) \Rightarrow (\lambda (H5: (eq nat +(s k0 i0) i)).(\lambda (H6: (eq T v0 v)).(\lambda (H7: (eq C (CHead c0 k0 u1) +(CHead c k t))).(\lambda (H8: (eq C (CHead c3 k0 u2) c2)).(eq_ind nat (s k0 +i0) (\lambda (n1: nat).((eq T v0 v) \to ((eq C (CHead c0 k0 u1) (CHead c k +t)) \to ((eq C (CHead c3 k0 u2) c2) \to ((subst0 i0 v0 u1 u2) \to ((csubst0 +i0 v0 c0 c3) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n1 (s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s k i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +(minus n1 (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s k i0) (s k1 (S n0))) v e1 e2))))))))))))) (\lambda (H15: (eq T u1 -t)).(eq_ind T t (\lambda (t: T).((eq C (CHead c0 k u2) c2) \to ((subst0 i0 v -t u2) \to ((csubst0 i0 v c c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k1: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) -(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s k i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) -(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s k i0) (s k1 (S n0))) v e1 e2)))))))))))) (\lambda (H16: (eq C -(CHead c0 k u2) c2)).(eq_ind C (CHead c0 k u2) (\lambda (c2: C).((subst0 i0 v -t u2) \to ((csubst0 i0 v c c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k1: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) -(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s k i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) -(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s k i0) (s k1 (S n0))) v e1 e2))))))))))) (\lambda (_: (subst0 i0 v t -u2)).(\lambda (H18: (csubst0 i0 v c c0)).(let H1 \def (eq_ind K k0 (\lambda -(k: K).(eq nat (s k i0) i)) H5 k H14) in (let H19 \def (eq_ind_r nat i -(\lambda (n: nat).(\forall (c2: C).(\forall (v: T).((csubst0 n v c c2) \to -(\forall (e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C -T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n (s k (S n0))) v u w)))))) -(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n (s k -(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) (\lambda (k: +T).(subst0 (minus n1 (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 +(s k1 (S n0))) v e1 e2)))))))))))))) (\lambda (H9: (eq T v0 v)).(eq_ind T v +(\lambda (t0: T).((eq C (CHead c0 k0 u1) (CHead c k t)) \to ((eq C (CHead c3 +k0 u2) c2) \to ((subst0 i0 t0 u1 u2) \to ((csubst0 i0 t0 c0 c3) \to (or4 +(drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k0 i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k1 u)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k0 +i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k1 +u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus n (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n (s k (S n0))) v e1 -e2)))))))))))))) H0 (s k i0) H1) in (let H20 \def (eq_ind_r nat i (\lambda -(n: nat).(lt (S n0) n)) H (s k i0) H1) in (K_ind (\lambda (k: K).((drop (r k -n0) O c e) \to (((\forall (c2: C).(\forall (v: T).((csubst0 (s k i0) v c c2) -\to (\forall (e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 -K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq -C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k0: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s -k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: +(minus (s k0 i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k0 i0) +(s k1 (S n0))) v e1 e2))))))))))))) (\lambda (H10: (eq C (CHead c0 k0 u1) +(CHead c k t))).(let H11 \def (f_equal C T (\lambda (e0: C).(match e0 in C +return (\lambda (_: C).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ t0) +\Rightarrow t0])) (CHead c0 k0 u1) (CHead c k t) H10) in ((let H12 \def +(f_equal C K (\lambda (e0: C).(match e0 in C return (\lambda (_: C).K) with +[(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead c0 k0 u1) +(CHead c k t) H10) in ((let H13 \def (f_equal C C (\lambda (e0: C).(match e0 +in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c4 _ +_) \Rightarrow c4])) (CHead c0 k0 u1) (CHead c k t) H10) in (eq_ind C c +(\lambda (c4: C).((eq K k0 k) \to ((eq T u1 t) \to ((eq C (CHead c3 k0 u2) +c2) \to ((subst0 i0 v u1 u2) \to ((csubst0 i0 v c4 c3) \to (or4 (drop (S n0) +O c2 e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k1 +w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k0 i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k1 u)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k0 +i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k1 +u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s k0 i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k0 i0) +(s k1 (S n0))) v e1 e2)))))))))))))) (\lambda (H14: (eq K k0 k)).(eq_ind K k +(\lambda (k1: K).((eq T u1 t) \to ((eq C (CHead c3 k1 u2) c2) \to ((subst0 i0 +v u1 u2) \to ((csubst0 i0 v c c3) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T +T (\lambda (k2: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k2 u)))))) (\lambda (k2: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k2 w)))))) (\lambda (k2: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k1 i0) +(s k2 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k2: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k2 u)))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead -e2 k u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s k i0) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) -(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s k i0) (s k0 (S n0))) v u w)))))) (\lambda (k0: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s k i0) (s k0 (S n0))) v e1 e2)))))))))))))) \to ((lt (S n0) (s k -i0)) \to (or4 (drop (S n0) O (CHead c0 k u2) e) (ex3_4 K C T T (\lambda (k1: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 -u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead c0 k u2) (CHead e0 k1 w)))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s -k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 -k u2) (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2)))))) -(ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda (k1: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 k u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +e2 k2 u)))))) (\lambda (k2: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s k1 i0) (s k2 (S n0))) v e1 e2)))))) (ex4_5 K C C T T +(\lambda (k2: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e1 k2 u))))))) (\lambda (k2: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e2 k2 w))))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k1 i0) (s k2 (S n0))) v u w)))))) +(\lambda (k2: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s k1 i0) (s k2 (S n0))) v e1 e2))))))))))))) (\lambda +(H15: (eq T u1 t)).(eq_ind T t (\lambda (t0: T).((eq C (CHead c3 k u2) c2) +\to ((subst0 i0 v t0 u2) \to ((csubst0 i0 v c c3) \to (or4 (drop (S n0) O c2 +e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s k i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 +u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c2 (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v +e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v -e1 e2)))))))))))) (\lambda (b: B).(\lambda (H2: (drop (r (Bind b) n0) O c -e)).(\lambda (_: ((\forall (c2: C).(\forall (v: T).((csubst0 (s (Bind b) i0) -v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 -e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead -e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T -T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k -w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2))))))))))))))).(\lambda (H: (lt (S n0) (s (Bind b) i0))).(let H21 \def -(IHn i0 (le_S_n (S n0) i0 H) c c0 v H18 e H2) in (or4_ind (drop n0 O c0 e) -(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop n0 O c0 (CHead e0 k w)))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k n0)) v u -w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c0 (CHead e2 k u)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus i0 (s k n0)) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop n0 O c0 (CHead e2 k w))))))) (\lambda (k: +e1 e2)))))))))))) (\lambda (H16: (eq C (CHead c3 k u2) c2)).(eq_ind C (CHead +c3 k u2) (\lambda (c4: C).((subst0 i0 v t u2) \to ((csubst0 i0 v c c3) \to +(or4 (drop (S n0) O c4 e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c4 (CHead +e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 +u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c4 (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v +e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c4 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s +k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v +e1 e2))))))))))) (\lambda (_: (subst0 i0 v t u2)).(\lambda (H18: (csubst0 i0 +v c c3)).(let H19 \def (eq_ind K k0 (\lambda (k1: K).(eq nat (s k1 i0) i)) H5 +k H14) in (let H20 \def (eq_ind_r nat i (\lambda (n1: nat).(\forall (c4: +C).(\forall (v1: T).((csubst0 n1 v1 c c4) \to (\forall (e0: C).((drop (S n0) +O c e0) \to (or4 (drop (S n0) O c4 e0) (ex3_4 K C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k1 +u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c4 (CHead e1 k1 w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n1 (s k1 (S n0))) v1 u +w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e0 (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c4 (CHead e2 k1 +u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus n1 (s k1 (S n0))) v1 e1 e2)))))) (ex4_5 K C C T T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C e0 (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c4 (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus n1 (s k1 (S n0))) v1 u w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 +(s k1 (S n0))) v1 e1 e2)))))))))))))) H0 (s k i0) H19) in (let H21 \def +(eq_ind_r nat i (\lambda (n1: nat).(lt (S n0) n1)) H (s k i0) H19) in (K_ind +(\lambda (k1: K).((drop (r k1 n0) O c e) \to (((\forall (c4: C).(\forall (v1: +T).((csubst0 (s k1 i0) v1 c c4) \to (\forall (e0: C).((drop (S n0) O c e0) +\to (or4 (drop (S n0) O c4 e0) (ex3_4 K C T T (\lambda (k2: K).(\lambda (e1: +C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k2 u)))))) (\lambda +(k2: K).(\lambda (e1: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c4 +(CHead e1 k2 w)))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k1 i0) (s k2 (S n0))) v1 u w)))))) +(ex3_4 K C C T (\lambda (k2: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e0 (CHead e1 k2 u)))))) (\lambda (k2: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O c4 (CHead e2 k2 u)))))) (\lambda (k2: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k1 +i0) (s k2 (S n0))) v1 e1 e2)))))) (ex4_5 K C C T T (\lambda (k2: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k2 +u))))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c4 (CHead e2 k2 w))))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i0 (s k n0)) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k n0)) v e1 -e2))))))) (or4 (drop (S n0) O (CHead c0 (Bind b) u2) e) (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 -(Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s -(Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind -b) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (H22: (drop n0 O c0 -e)).(or4_intro0 (drop (S n0) O (CHead c0 (Bind b) u2) e) (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 -(Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s -(Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind -b) i0) (s k (S n0))) v e1 e2))))))) (drop_drop (Bind b) n0 c0 e H22 u2))) -(\lambda (H22: (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e0 k w)))))) (\lambda -(k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k -n0)) v u w))))))).(ex3_4_ind K C T T (\lambda (k: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: -K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e0 k -w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i0 (s k n0)) v u w))))) (or4 (drop (S n0) O (CHead c0 (Bind -b) u2) e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) u2) -(CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u w)))))) (ex3_4 K C C -T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e2 k u)))))) (\lambda (k: +(minus (s k1 i0) (s k2 (S n0))) v1 u w)))))) (\lambda (k2: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k1 i0) +(s k2 (S n0))) v1 e1 e2)))))))))))))) \to ((lt (S n0) (s k1 i0)) \to (or4 +(drop (S n0) O (CHead c3 k1 u2) e) (ex3_4 K C T T (\lambda (k2: K).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k2 u)))))) (\lambda +(k2: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead c3 k1 u2) (CHead e0 k2 w)))))) (\lambda (k2: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k1 i0) (s k2 (S n0))) v +u w)))))) (ex3_4 K C C T (\lambda (k2: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k2 u)))))) (\lambda (k2: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 k1 u2) (CHead e2 +k2 u)))))) (\lambda (k2: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s k1 i0) (s k2 (S n0))) v e1 e2)))))) (ex4_5 K C C T T +(\lambda (k2: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e1 k2 u))))))) (\lambda (k2: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 +k1 u2) (CHead e2 k2 w))))))) (\lambda (k2: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k1 i0) (s k2 (S n0))) v +u w)))))) (\lambda (k2: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s k1 i0) (s k2 (S n0))) v e1 +e2)))))))))))) (\lambda (b: B).(\lambda (H22: (drop (r (Bind b) n0) O c +e)).(\lambda (_: ((\forall (c4: C).(\forall (v1: T).((csubst0 (s (Bind b) i0) +v1 c c4) \to (\forall (e0: C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O +c4 e0) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (u: +T).(\lambda (_: T).(eq C e0 (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c4 (CHead e1 k1 +w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v1 u w)))))) (ex3_4 K C C T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e0 +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c4 (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind -b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: -K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H23: (eq C e -(CHead x1 x0 x2))).(\lambda (H24: (drop n0 O c0 (CHead x1 x0 x3))).(\lambda -(H25: (subst0 (minus i0 (s x0 n0)) v x2 x3)).(eq_ind_r C (CHead x1 x0 x2) -(\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Bind b) u2) c) (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 -(Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s -(Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind -b) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead c0 -(Bind b) u2) (CHead x1 x0 x2)) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e0 k u)))))) -(\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C (CHead x1 x0 x2) (CHead e1 k u)))))) (\lambda -(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead -c0 (Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2))))))) (ex3_4_intro K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead -x1 x0 x2) (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Bind b) i0) (s k (S n0))) v u w))))) x0 x1 x2 x3 (refl_equal C -(CHead x1 x0 x2)) (drop_drop (Bind b) n0 c0 (CHead x1 x0 x3) H24 u2) -(eq_ind_r nat (S (s x0 n0)) (\lambda (n: nat).(subst0 (minus (s (Bind b) i0) -n) v x2 x3)) H25 (s x0 (S n0)) (s_S x0 n0)))) e H23)))))))) H22)) (\lambda -(H22: (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c0 (CHead e2 k u)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus i0 (s k n0)) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k -u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop n0 O c0 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k n0)) v e1 e2))))) -(or4 (drop (S n0) O (CHead c0 (Bind b) u2) e) (ex3_4 K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 -(Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s -(Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind -b) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: -C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H23: (eq C e (CHead x1 x0 -x3))).(\lambda (H24: (drop n0 O c0 (CHead x2 x0 x3))).(\lambda (H25: (csubst0 -(minus i0 (s x0 n0)) v x1 x2)).(eq_ind_r C (CHead x1 x0 x3) (\lambda (c: -C).(or4 (drop (S n0) O (CHead c0 (Bind b) u2) c) (ex3_4 K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 -(Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s -(Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind -b) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c0 -(Bind b) u2) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e0 k u)))))) -(\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C (CHead x1 x0 x3) (CHead e1 k u)))))) (\lambda -(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead -c0 (Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: +b) i0) (s k1 (S n0))) v1 e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c4 (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v1 u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2))))))) (ex3_4_intro K C C T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead -x1 x0 x3) (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e2 k u)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2))))) x0 x1 x2 x3 (refl_equal C -(CHead x1 x0 x3)) (drop_drop (Bind b) n0 c0 (CHead x2 x0 x3) H24 u2) -(eq_ind_r nat (S (s x0 n0)) (\lambda (n: nat).(csubst0 (minus (s (Bind b) i0) -n) v x1 x2)) H25 (s x0 (S n0)) (s_S x0 n0)))) e H23)))))))) H22)) (\lambda -(H22: (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 -O c0 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k n0)) v u w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i0 (s k n0)) v e1 e2)))))))).(ex4_5_ind K C C T T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i0 (s k n0)) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k -n0)) v e1 e2)))))) (or4 (drop (S n0) O (CHead c0 (Bind b) u2) e) (ex3_4 K C T -T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 -(Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s -(Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind -b) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: -C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H23: (eq C e -(CHead x1 x0 x3))).(\lambda (H24: (drop n0 O c0 (CHead x2 x0 x4))).(\lambda -(H25: (subst0 (minus i0 (s x0 n0)) v x3 x4)).(\lambda (H26: (csubst0 (minus -i0 (s x0 n0)) v x1 x2)).(eq_ind_r C (CHead x1 x0 x3) (\lambda (c: C).(or4 -(drop (S n0) O (CHead c0 (Bind b) u2) c) (ex3_4 K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: +(minus (s (Bind b) i0) (s k1 (S n0))) v1 e1 e2))))))))))))))).(\lambda (H24: +(lt (S n0) (s (Bind b) i0))).(let H25 \def (IHn i0 (le_S_n (S n0) i0 H24) c +c3 v H18 e H22) in (or4_ind (drop n0 O c3 e) (ex3_4 K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 +u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop n0 O c3 (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k1 n0)) v u w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop n0 O c3 (CHead e2 k1 u)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k1 +n0)) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k1 +u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 O c3 (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i0 (s k1 n0)) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k1 n0)) v e1 +e2))))))) (or4 (drop (S n0) O (CHead c3 (Bind b) u2) e) (ex3_4 K C T T +(\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 +u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e2 k1 u)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) u2) +(CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S +n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 +e2)))))))) (\lambda (H26: (drop n0 O c3 e)).(or4_intro0 (drop (S n0) O (CHead +c3 (Bind b) u2) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) u2) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e2 k1 +u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +c3 (Bind b) u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 +(S n0))) v e1 e2))))))) (drop_drop (Bind b) n0 c3 e H26 u2))) (\lambda (H26: +(ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop n0 O c3 (CHead e0 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k1 +n0)) v u w))))))).(ex3_4_ind K C T T (\lambda (k1: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c3 (CHead e0 +k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i0 (s k1 n0)) v u w))))) (or4 (drop (S n0) O (CHead c3 +(Bind b) u2) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) u2) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e2 k1 +u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +c3 (Bind b) u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 +(S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: +T).(\lambda (x3: T).(\lambda (H27: (eq C e (CHead x1 x0 x2))).(\lambda (H28: +(drop n0 O c3 (CHead x1 x0 x3))).(\lambda (H29: (subst0 (minus i0 (s x0 n0)) +v x2 x3)).(eq_ind_r C (CHead x1 x0 x2) (\lambda (c4: C).(or4 (drop (S n0) O +(CHead c3 (Bind b) u2) c4) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c4 (CHead e0 k1 u)))))) (\lambda +(k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead c3 (Bind b) u2) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C c4 (CHead e1 k1 u)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 +(Bind b) u2) (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c4 (CHead e1 k1 u))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) i0) (s k1 (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S n0) O +(CHead c3 (Bind b) u2) (CHead x1 x0 x2)) (ex3_4 K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) +(CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 x0 +x2) (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e2 k1 u)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C (CHead x1 x0 x2) (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 +(Bind b) u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 +(S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S +n0))) v e1 e2))))))) (ex3_4_intro K C T T (\lambda (k1: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e0 k1 +u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 -(Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s -(Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind -b) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead c0 -(Bind b) u2) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e0 k u)))))) -(\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C (CHead x1 x0 x3) (CHead e1 k u)))))) (\lambda -(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead -c0 (Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: +i0) (s k1 (S n0))) v u w))))) x0 x1 x2 x3 (refl_equal C (CHead x1 x0 x2)) +(drop_drop (Bind b) n0 c3 (CHead x1 x0 x3) H28 u2) (eq_ind_r nat (S (s x0 +n0)) (\lambda (n1: nat).(subst0 (minus (s (Bind b) i0) n1) v x2 x3)) H29 (s +x0 (S n0)) (s_S x0 n0)))) e H27)))))))) H26)) (\lambda (H26: (ex3_4 K C C T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop n0 O c3 (CHead e2 k1 u)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k1 +n0)) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c3 (CHead e2 +k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i0 (s k1 n0)) v e1 e2))))) (or4 (drop (S n0) O (CHead c3 +(Bind b) u2) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) u2) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e2 k1 +u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +c3 (Bind b) u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 +(S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: +C).(\lambda (x3: T).(\lambda (H27: (eq C e (CHead x1 x0 x3))).(\lambda (H28: +(drop n0 O c3 (CHead x2 x0 x3))).(\lambda (H29: (csubst0 (minus i0 (s x0 n0)) +v x1 x2)).(eq_ind_r C (CHead x1 x0 x3) (\lambda (c4: C).(or4 (drop (S n0) O +(CHead c3 (Bind b) u2) c4) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c4 (CHead e0 k1 u)))))) (\lambda +(k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead c3 (Bind b) u2) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C c4 (CHead e1 k1 u)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 +(Bind b) u2) (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c4 (CHead e1 k1 u))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) i0) (s k1 (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S n0) O +(CHead c3 (Bind b) u2) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) +(CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 x0 +x3) (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e2 k1 u)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C (CHead x1 x0 x3) (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 +(Bind b) u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 +(S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S +n0))) v e1 e2))))))) (ex3_4_intro K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 +u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e2 k1 u)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k1 (S n0))) v e1 e2))))) x0 x1 x2 x3 (refl_equal C (CHead x1 x0 +x3)) (drop_drop (Bind b) n0 c3 (CHead x2 x0 x3) H28 u2) (eq_ind_r nat (S (s +x0 n0)) (\lambda (n1: nat).(csubst0 (minus (s (Bind b) i0) n1) v x1 x2)) H29 +(s x0 (S n0)) (s_S x0 n0)))) e H27)))))))) H26)) (\lambda (H26: (ex4_5 K C C +T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c3 (CHead +e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i0 (s k1 n0)) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Bind b) i0) (s k (S n0))) v e1 e2))))))) (ex4_5_intro K C C T T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C (CHead x1 x0 x3) (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 -(Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S -n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 -e2)))))) x0 x1 x2 x3 x4 (refl_equal C (CHead x1 x0 x3)) (drop_drop (Bind b) -n0 c0 (CHead x2 x0 x4) H24 u2) (eq_ind_r nat (S (s x0 n0)) (\lambda (n: -nat).(subst0 (minus (s (Bind b) i0) n) v x3 x4)) H25 (s x0 (S n0)) (s_S x0 -n0)) (eq_ind_r nat (S (s x0 n0)) (\lambda (n: nat).(csubst0 (minus (s (Bind -b) i0) n) v x1 x2)) H26 (s x0 (S n0)) (s_S x0 n0)))) e H23)))))))))) H22)) -H21)))))) (\lambda (f: F).(\lambda (H2: (drop (r (Flat f) n0) O c -e)).(\lambda (H0: ((\forall (c2: C).(\forall (v: T).((csubst0 (s (Flat f) i0) -v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 -e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead -e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T -T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k -w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) i0))).(let H21 \def (H0 -c0 v H18 e H2) in (or4_ind (drop (S n0) O c0 e) (ex3_4 K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c0 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c0 (CHead e2 k u)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus i0 (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: +(minus i0 (s k1 n0)) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i0 (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k -(S n0))) v e1 e2))))))) (or4 (drop (S n0) O (CHead c0 (Flat f) u2) e) (ex3_4 -K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq -C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: -K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k -u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e2 k u)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat -f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (H22: (drop (S -n0) O c0 e)).(or4_intro0 (drop (S n0) O (CHead c0 (Flat f) u2) e) (ex3_4 K C -T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: +(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c3 (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i0 (s k1 n0)) v u w)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k1 +n0)) v e1 e2)))))) (or4 (drop (S n0) O (CHead c3 (Bind b) u2) e) (ex3_4 K C T +T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 +u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e2 k1 u)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) u2) +(CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S +n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 +e2)))))))) (\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: +T).(\lambda (x4: T).(\lambda (H27: (eq C e (CHead x1 x0 x3))).(\lambda (H28: +(drop n0 O c3 (CHead x2 x0 x4))).(\lambda (H29: (subst0 (minus i0 (s x0 n0)) +v x3 x4)).(\lambda (H30: (csubst0 (minus i0 (s x0 n0)) v x1 x2)).(eq_ind_r C +(CHead x1 x0 x3) (\lambda (c4: C).(or4 (drop (S n0) O (CHead c3 (Bind b) u2) +c4) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C c4 (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) u2) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c4 (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e2 k1 +u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C c4 (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +c3 (Bind b) u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 +(S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead c3 (Bind b) u2) +(CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e0 k1 u)))))) (\lambda +(k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead c3 (Bind b) u2) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 u)))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O +(CHead c3 (Bind b) u2) (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S +n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) +(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) u2) +(CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S +n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 +e2))))))) (ex4_5_intro K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 +u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead e2 k1 +w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k1 (S n0))) v u w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Bind b) i0) (s k1 (S n0))) v e1 e2)))))) x0 x1 x2 +x3 x4 (refl_equal C (CHead x1 x0 x3)) (drop_drop (Bind b) n0 c3 (CHead x2 x0 +x4) H28 u2) (eq_ind_r nat (S (s x0 n0)) (\lambda (n1: nat).(subst0 (minus (s +(Bind b) i0) n1) v x3 x4)) H29 (s x0 (S n0)) (s_S x0 n0)) (eq_ind_r nat (S (s +x0 n0)) (\lambda (n1: nat).(csubst0 (minus (s (Bind b) i0) n1) v x1 x2)) H30 +(s x0 (S n0)) (s_S x0 n0)))) e H27)))))))))) H26)) H25)))))) (\lambda (f: +F).(\lambda (H22: (drop (r (Flat f) n0) O c e)).(\lambda (H23: ((\forall (c4: +C).(\forall (v1: T).((csubst0 (s (Flat f) i0) v1 c c4) \to (\forall (e0: +C).((drop (S n0) O c e0) \to (or4 (drop (S n0) O c4 e0) (ex3_4 K C T T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c4 (CHead e1 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 -(Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s -(Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat -f) i0) (s k (S n0))) v e1 e2))))))) (drop_drop (Flat f) n0 c0 e H22 u2))) -(\lambda (H22: (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i0 (s k (S n0))) v u w))))))).(ex3_4_ind K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O c0 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k (S n0))) v u w))))) -(or4 (drop (S n0) O (CHead c0 (Flat f) u2) e) (ex3_4 K C T T (\lambda (k: -K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: +i0) (s k1 (S n0))) v1 u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k1 u)))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c4 +(CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v1 e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k1 u))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c4 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +i0) (s k1 (S n0))) v1 u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 +(S n0))) v1 e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) +i0))).(let H25 \def (H23 c3 v H18 e H22) in (or4_ind (drop (S n0) O c3 e) +(ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead e0 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k1 (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead e2 k1 +u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i0 (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i0 (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 +(s k1 (S n0))) v e1 e2))))))) (or4 (drop (S n0) O (CHead c3 (Flat f) u2) e) +(ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e0 k1 +w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T +(\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e2 k1 u)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) u2) +(CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2)))))))) (\lambda (H26: (drop (S n0) O c3 e)).(or4_intro0 (drop (S n0) O +(CHead c3 (Flat f) u2) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 +(Flat f) u2) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Flat f) u2) +(CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) i0) (s k1 (S n0))) v e1 e2))))))) (drop_drop (Flat f) n0 c3 e H26 +u2))) (\lambda (H26: (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead +e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i0 (s k1 (S n0))) v u w))))))).(ex3_4_ind K C T T (\lambda +(k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 +u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k1 (S n0))) v u +w))))) (or4 (drop (S n0) O (CHead c3 (Flat f) u2) e) (ex3_4 K C T T (\lambda +(k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 +u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 -(Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s -(Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat -f) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: -C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H23: (eq C e (CHead x1 x0 -x2))).(\lambda (H24: (drop (S n0) O c0 (CHead x1 x0 x3))).(\lambda (H25: +i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 +(Flat f) u2) (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) i0) (s k1 (S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: +C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H27: (eq C e (CHead x1 x0 +x2))).(\lambda (H28: (drop (S n0) O c3 (CHead x1 x0 x3))).(\lambda (H29: (subst0 (minus i0 (s x0 (S n0))) v x2 x3)).(eq_ind_r C (CHead x1 x0 x2) -(\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Flat f) u2) c) (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 -(Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s -(Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat -f) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead c0 -(Flat f) u2) (CHead x1 x0 x2)) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e0 k u)))))) -(\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C (CHead x1 x0 x2) (CHead e1 k u)))))) (\lambda -(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead -c0 (Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))) (ex3_4_intro K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead -x1 x0 x2) (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus (s (Flat f) i0) (s k (S n0))) v u w))))) x0 x1 x2 x3 (refl_equal C -(CHead x1 x0 x2)) (drop_drop (Flat f) n0 c0 (CHead x1 x0 x3) H24 u2) H25)) e -H23)))))))) H22)) (\lambda (H22: (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c0 (CHead -e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus i0 (s k (S n0))) v e1 e2))))))).(ex3_4_ind K C C T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(drop (S n0) O c0 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k (S n0))) v e1 -e2))))) (or4 (drop (S n0) O (CHead c0 (Flat f) u2) e) (ex3_4 K C T T (\lambda -(k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k -u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 -(Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s -(Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat -f) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: -C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H23: (eq C e (CHead x1 x0 -x3))).(\lambda (H24: (drop (S n0) O c0 (CHead x2 x0 x3))).(\lambda (H25: -(csubst0 (minus i0 (s x0 (S n0))) v x1 x2)).(eq_ind_r C (CHead x1 x0 x3) -(\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Flat f) u2) c) (ex3_4 K C T T -(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: +(\lambda (c4: C).(or4 (drop (S n0) O (CHead c3 (Flat f) u2) c4) (ex3_4 K C T +T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c4 +(CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c4 (CHead e1 +k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e2 k1 u)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c4 +(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) u2) +(CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2))))))))) (or4_intro1 (drop (S n0) O (CHead c3 (Flat f) u2) (CHead x1 x0 +x2)) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e0 k1 u)))))) (\lambda (k1: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 +(Flat f) u2) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x1 x0 x2) (CHead e1 k1 u)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 +(Flat f) u2) (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e1 k1 +u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e2 k1 +w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 e2))))))) +(ex3_4_intro K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e0 k1 u)))))) (\lambda (k1: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 +(Flat f) u2) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u +w))))) x0 x1 x2 x3 (refl_equal C (CHead x1 x0 x2)) (drop_drop (Flat f) n0 c3 +(CHead x1 x0 x3) H28 u2) H29)) e H27)))))))) H26)) (\lambda (H26: (ex3_4 K C +C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c3 (CHead e2 k1 u)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k1 +(S n0))) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead +e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i0 (s k1 (S n0))) v e1 e2))))) (or4 (drop (S n0) O (CHead +c3 (Flat f) u2) e) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) u2) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e2 k1 +u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +c3 (Flat f) u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 +(S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: +C).(\lambda (x3: T).(\lambda (H27: (eq C e (CHead x1 x0 x3))).(\lambda (H28: +(drop (S n0) O c3 (CHead x2 x0 x3))).(\lambda (H29: (csubst0 (minus i0 (s x0 +(S n0))) v x1 x2)).(eq_ind_r C (CHead x1 x0 x3) (\lambda (c4: C).(or4 (drop +(S n0) O (CHead c3 (Flat f) u2) c4) (ex3_4 K C T T (\lambda (k1: K).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c4 (CHead e0 k1 u)))))) +(\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c3 (Flat f) u2) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 +(S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c4 (CHead e1 k1 u)))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O +(CHead c3 (Flat f) u2) (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c4 (CHead e1 k1 +u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e2 k1 +w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 e2))))))))) +(or4_intro2 (drop (S n0) O (CHead c3 (Flat f) u2) (CHead x1 x0 x3)) (ex3_4 K +C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x1 x0 x3) (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) u2) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C (CHead x1 x0 x3) (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Flat f) u2) +(CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 +u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e2 k1 +w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 e2))))))) +(ex3_4_intro K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 u)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 +(Flat f) u2) (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2))))) x0 x1 x2 x3 (refl_equal C (CHead x1 x0 x3)) (drop_drop (Flat f) n0 c3 +(CHead x2 x0 x3) H28 u2) H29)) e H27)))))))) H26)) (\lambda (H26: (ex4_5 K C +C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 +(CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k1 (S n0))) v u +w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i0 (s k1 (S n0))) v e1 +e2)))))))).(ex4_5_ind K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k1 (S +n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus i0 (s k1 (S n0))) v e1 e2)))))) (or4 +(drop (S n0) O (CHead c3 (Flat f) u2) e) (ex3_4 K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 +u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 -(Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s -(Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat -f) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c0 -(Flat f) u2) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e0 k u)))))) -(\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C (CHead x1 x0 x3) (CHead e1 k u)))))) (\lambda -(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead -c0 (Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))) (ex3_4_intro K C C T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead -x1 x0 x3) (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e2 k u)))))) -(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))) x0 x1 x2 x3 (refl_equal C -(CHead x1 x0 x3)) (drop_drop (Flat f) n0 c0 (CHead x2 x0 x3) H24 u2) H25)) e -H23)))))))) H22)) (\lambda (H22: (ex4_5 K C C T T (\lambda (k: K).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 k w))))))) (\lambda (k: +i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 +(Flat f) u2) (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i0 (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k (S n0))) v e1 -e2)))))))).(ex4_5_ind K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O c0 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k (S n0))) v u -w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i0 (s k (S n0))) v e1 e2)))))) (or4 (drop -(S n0) O (CHead c0 (Flat f) u2) e) (ex3_4 K C T T (\lambda (k: K).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda -(k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead -c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u -w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 (Flat f) u2) -(CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s -(Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat -f) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: -C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H23: (eq C e -(CHead x1 x0 x3))).(\lambda (H24: (drop (S n0) O c0 (CHead x2 x0 -x4))).(\lambda (H25: (subst0 (minus i0 (s x0 (S n0))) v x3 x4)).(\lambda -(H26: (csubst0 (minus i0 (s x0 (S n0))) v x1 x2)).(eq_ind_r C (CHead x1 x0 -x3) (\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Flat f) u2) c) (ex3_4 K C -T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c -(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) -i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k u)))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 -(Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: -K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s -(Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat -f) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead c0 -(Flat f) u2) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e0 k u)))))) -(\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) -O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S -n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C (CHead x1 x0 x3) (CHead e1 k u)))))) (\lambda -(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead -c0 (Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k -u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) -(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: -K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))) (ex4_5_intro K C C T T -(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C (CHead x1 x0 x3) (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 -(Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S -n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 -e2)))))) x0 x1 x2 x3 x4 (refl_equal C (CHead x1 x0 x3)) (drop_drop (Flat f) -n0 c0 (CHead x2 x0 x4) H24 u2) H25 H26)) e H23)))))))))) H22)) H21)))))) k -(drop_gen_drop k c e t n0 H2) H19 H20)))))) c2 H16)) u1 (sym_eq T u1 t H15))) -k0 (sym_eq K k0 k H14))) c1 (sym_eq C c1 c H13))) H12)) H11))) v0 (sym_eq T -v0 v H9))) i H5 H6 H7 H8 H3 H4)))))]) in (H3 (refl_equal nat i) (refl_equal T -v) (refl_equal C (CHead c k t)) (refl_equal C c2)))))))))))) c1)))))) n). +(minus (s (Flat f) i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) i0) (s k1 (S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: +C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H27: (eq C e +(CHead x1 x0 x3))).(\lambda (H28: (drop (S n0) O c3 (CHead x2 x0 +x4))).(\lambda (H29: (subst0 (minus i0 (s x0 (S n0))) v x3 x4)).(\lambda +(H30: (csubst0 (minus i0 (s x0 (S n0))) v x1 x2)).(eq_ind_r C (CHead x1 x0 +x3) (\lambda (c4: C).(or4 (drop (S n0) O (CHead c3 (Flat f) u2) c4) (ex3_4 K +C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +c4 (CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e0 k1 w)))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c4 (CHead e1 +k1 u)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e2 k1 u)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c4 +(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) u2) +(CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S +n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2))))))))) (or4_intro3 (drop (S n0) O (CHead c3 (Flat f) u2) (CHead x1 x0 +x3)) (ex3_4 K C T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e0 k1 u)))))) (\lambda (k1: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c3 +(Flat f) u2) (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 u)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 +(Flat f) u2) (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 +u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e2 k1 +w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 e2))))))) +(ex4_5_intro K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k1 +u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c3 (Flat f) u2) (CHead e2 k1 +w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k1 (S n0))) v u w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) i0) (s k1 (S n0))) v e1 e2)))))) x0 x1 x2 +x3 x4 (refl_equal C (CHead x1 x0 x3)) (drop_drop (Flat f) n0 c3 (CHead x2 x0 +x4) H28 u2) H29 H30)) e H27)))))))))) H26)) H25)))))) k (drop_gen_drop k c e +t n0 H2) H20 H21)))))) c2 H16)) u1 (sym_eq T u1 t H15))) k0 (sym_eq K k0 k +H14))) c0 (sym_eq C c0 c H13))) H12)) H11))) v0 (sym_eq T v0 v H9))) i H5 H6 +H7 H8 H3 H4)))))]) in (H3 (refl_equal nat i) (refl_equal T v) (refl_equal C +(CHead c k t)) (refl_equal C c2)))))))))))) c1)))))) n). theorem csubst0_drop_eq: \forall (n: nat).(\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 @@ -2596,8 +2639,8 @@ C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (_: T).(csubst0 O v0 e1 e2)))))))) H4)))))))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 i v0 u1 u2)).(\lambda (c: C).(\lambda (H3: (eq nat i O)).(let H4 \def (eq_ind -nat i (\lambda (n: nat).(subst0 n v0 u1 u2)) H2 O H3) in (or4_intro1 (drop O -O (CHead c (Flat f) u2) (CHead c (Flat f) u1)) (ex3_4 F C T T (\lambda (f0: +nat i (\lambda (n0: nat).(subst0 n0 v0 u1 u2)) H2 O H3) in (or4_intro1 (drop +O O (CHead c (Flat f) u2) (CHead c (Flat f) u1)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c (Flat f) u1) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c (Flat f) u2) (CHead e0 (Flat f0) @@ -2694,39 +2737,39 @@ C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v0 u0 w)))))) (_: T).(csubst0 O v0 e1 e2)))))))) H5))))))))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (c3: C).(\lambda (c4: C).(\lambda (v0: T).(\lambda (H2: (csubst0 i v0 c3 c4)).(\lambda (H3: (((eq nat i O) \to (or4 (drop O O c4 c3) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C c3 (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e0 (Flat f) w)))))) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C c3 (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 -u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat f) u)))))) (\lambda (f: +u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 -(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop O O c4 (CHead e2 (Flat f) w))))))) (\lambda (_: +(Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop O O c4 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2))))))))))).(\lambda (u: T).(\lambda -(H4: (eq nat i O)).(let H5 \def (eq_ind nat i (\lambda (n: nat).((eq nat n O) -\to (or4 (drop O O c4 c3) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 -(CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v0 u w)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat -f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop O O c4 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +(H4: (eq nat i O)).(let H5 \def (eq_ind nat i (\lambda (n0: nat).((eq nat n0 +O) \to (or4 (drop O O c4 c3) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C c3 (CHead e0 (Flat f0) u0)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O +c4 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 O v0 u0 w)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c3 (CHead e1 (Flat +f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop O O c4 (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T -T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C c3 (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: +T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(_: T).(eq C c3 (CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e2 -(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (\lambda (_: F).(\lambda (e1: +(Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 O v0 u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 -e2)))))))))) H3 O H4) in (let H6 \def (eq_ind nat i (\lambda (n: -nat).(csubst0 n v0 c3 c4)) H2 O H4) in (or4_intro2 (drop O O (CHead c4 (Flat +e2)))))))))) H3 O H4) in (let H6 \def (eq_ind nat i (\lambda (n0: +nat).(csubst0 n0 v0 c3 c4)) H2 O H4) in (or4_intro2 (drop O O (CHead c4 (Flat f) u) (CHead c3 (Flat f) u)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 (Flat f) u) (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda @@ -2827,39 +2870,39 @@ e2)))))))) H6))))))))))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 i v0 u1 u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (H3: (csubst0 i v0 c3 c4)).(\lambda (H4: (((eq nat i O) \to (or4 (drop O O c4 c3) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 -(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop O O c4 (CHead e0 (Flat f) w)))))) (\lambda (_: +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 +(CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop O O c4 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c3 (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 (Flat f) u)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c3 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 (Flat f) u))))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop O O c4 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 (Flat f0) u))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop O O c4 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2))))))))))).(\lambda (H5: (eq nat i O)).(let H6 -\def (eq_ind nat i (\lambda (n: nat).((eq nat n O) \to (or4 (drop O O c4 c3) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C c3 (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e0 (Flat f) w)))))) +\def (eq_ind nat i (\lambda (n0: nat).((eq nat n0 O) \to (or4 (drop O O c4 +c3) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C c3 (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 -u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat f) u)))))) (\lambda (f: +u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 -(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop O O c4 (CHead e2 (Flat f) w))))))) (\lambda (_: +(Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop O O c4 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))))))) H4 O H5) in (let H7 \def -(eq_ind nat i (\lambda (n: nat).(csubst0 n v0 c3 c4)) H3 O H5) in (let H8 -\def (eq_ind nat i (\lambda (n: nat).(subst0 n v0 u1 u2)) H2 O H5) in +(eq_ind nat i (\lambda (n0: nat).(csubst0 n0 v0 c3 c4)) H3 O H5) in (let H8 +\def (eq_ind nat i (\lambda (n0: nat).(subst0 n0 v0 u1 u2)) H2 O H5) in (or4_intro3 (drop O O (CHead c4 (Flat f) u2) (CHead c3 (Flat f) u1)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Flat f) u1) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda @@ -2994,11 +3037,11 @@ v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 (S n0) v (CHead c k t) c2)).(\lambda (e: C).(\lambda (H1: (drop (S n0) O (CHead c k t) -e)).(let H2 \def (match H0 in csubst0 return (\lambda (n: nat).(\lambda (t0: -T).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csubst0 n t0 c0 c1)).((eq -nat n (S n0)) \to ((eq T t0 v) \to ((eq C c0 (CHead c k t)) \to ((eq C c1 c2) -\to (or4 (drop (S n0) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +e)).(let H2 \def (match H0 in csubst0 return (\lambda (n1: nat).(\lambda (t0: +T).(\lambda (c0: C).(\lambda (c3: C).(\lambda (_: (csubst0 n1 t0 c0 c3)).((eq +nat n1 (S n0)) \to ((eq T t0 v) \to ((eq C c0 (CHead c k t)) \to ((eq C c3 +c2) \to (or4 (drop (S n0) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: @@ -3016,20 +3059,20 @@ e2))))))))))))))))) with [(csubst0_snd k0 i v0 u1 u2 H2 c0) \Rightarrow (\lambda (H3: (eq nat (s k0 i) (S n0))).(\lambda (H4: (eq T v0 v)).(\lambda (H5: (eq C (CHead c0 k0 u1) (CHead c k t))).(\lambda (H6: (eq C (CHead c0 k0 u2) c2)).((let H7 \def (f_equal nat nat (\lambda (e0: nat).e0) (s k0 i) (S -n0) H3) in (eq_ind nat (s k0 i) (\lambda (n: nat).((eq T v0 v) \to ((eq C +n0) H3) in (eq_ind nat (s k0 i) (\lambda (n1: nat).((eq T v0 v) \to ((eq C (CHead c0 k0 u1) (CHead c k t)) \to ((eq C (CHead c0 k0 u2) c2) \to ((subst0 -i v0 u1 u2) \to (or4 (drop n O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda +i v0 u1 u2) \to (or4 (drop n1 O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 -(CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n1 O +c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop n O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +T).(drop n1 O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e2 +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n1 O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 @@ -3053,117 +3096,118 @@ T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))) (\lambda (H9: (eq C (CHead c0 k0 u1) (CHead c k t))).(let H10 \def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) with [(CSort _) -\Rightarrow u1 | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u1) (CHead c k +\Rightarrow u1 | (CHead _ _ t0) \Rightarrow t0])) (CHead c0 k0 u1) (CHead c k t) H9) in ((let H11 \def (f_equal C K (\lambda (e0: C).(match e0 in C return -(\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow -k])) (CHead c0 k0 u1) (CHead c k t) H9) in ((let H12 \def (f_equal C C -(\lambda (e0: C).(match e0 in C return (\lambda (_: C).C) with [(CSort _) -\Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 u1) (CHead c k -t) H9) in (eq_ind C c (\lambda (c: C).((eq K k0 k) \to ((eq T u1 t) \to ((eq -C (CHead c k0 u2) c2) \to ((subst0 i v u1 u2) \to (or4 (drop (s k0 i) O c2 e) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e0 (Flat f) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s k0 -i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))))))) (\lambda (H13: (eq K k0 k)).(eq_ind K k (\lambda (k: K).((eq -T u1 t) \to ((eq C (CHead c k u2) c2) \to ((subst0 i v u1 u2) \to (or4 (drop -(s k i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +(\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) +\Rightarrow k1])) (CHead c0 k0 u1) (CHead c k t) H9) in ((let H12 \def +(f_equal C C (\lambda (e0: C).(match e0 in C return (\lambda (_: C).C) with +[(CSort _) \Rightarrow c0 | (CHead c3 _ _) \Rightarrow c3])) (CHead c0 k0 u1) +(CHead c k t) H9) in (eq_ind C c (\lambda (c3: C).((eq K k0 k) \to ((eq T u1 +t) \to ((eq C (CHead c3 k0 u2) c2) \to ((subst0 i v u1 u2) \to (or4 (drop (s +k0 i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O c2 (CHead -e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s k -i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O c2 (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))))))) (\lambda (H14: (eq T u1 t)).(eq_ind T t (\lambda (t: T).((eq C -(CHead c k u2) c2) \to ((subst0 i v t u2) \to (or4 (drop (s k i) O c2 e) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O c2 (CHead e0 (Flat f) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s k -i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O c2 (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))))) (\lambda (H15: (eq C (CHead c k u2) c2)).(eq_ind C (CHead c k -u2) (\lambda (c: C).((subst0 i v t u2) \to (or4 (drop (s k i) O c e) (ex3_4 F -C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (s k i) O c (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (s k i) O c (CHead e2 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) -u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (s k i) O c (CHead e2 (Flat f) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))) (\lambda (H16: (subst0 i v t -u2)).(let H0 \def (eq_ind K k0 (\lambda (k: K).(eq nat (s k i) (S n0))) H7 k -H13) in (K_ind (\lambda (k: K).((drop (r k n0) O c e) \to ((eq nat (s k i) (S -n0)) \to (or4 (drop (s k i) O (CHead c k u2) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) O c2 +(CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (s k0 i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +k0 i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))))))) (\lambda (H13: (eq K k0 k)).(eq_ind K +k (\lambda (k1: K).((eq T u1 t) \to ((eq C (CHead c k1 u2) c2) \to ((subst0 i +v u1 u2) \to (or4 (drop (s k1 i) O c2 e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s k1 i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (s k1 i) O c2 (CHead e2 (Flat f) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (s k1 i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))))))) (\lambda (H14: (eq T u1 t)).(eq_ind T t +(\lambda (t0: T).((eq C (CHead c k u2) c2) \to ((subst0 i v t0 u2) \to (or4 +(drop (s k i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k +i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (s k i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +k i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))))) (\lambda (H15: (eq C (CHead c k u2) +c2)).(eq_ind C (CHead c k u2) (\lambda (c3: C).((subst0 i v t u2) \to (or4 +(drop (s k i) O c3 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k +i) O c3 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (s k i) O c3 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +k i) O c3 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))))) (\lambda (H16: (subst0 i v t u2)).(let +H17 \def (eq_ind K k0 (\lambda (k1: K).(eq nat (s k1 i) (S n0))) H7 k H13) in +(K_ind (\lambda (k1: K).((drop (r k1 n0) O c e) \to ((eq nat (s k1 i) (S n0)) +\to (or4 (drop (s k1 i) O (CHead c k1 u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (s k i) O (CHead c k u2) (CHead e0 (Flat f) w)))))) (\lambda (_: +T).(drop (s k1 i) O (CHead c k1 u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (s k i) O (CHead c k u2) (CHead e2 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 -(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (s k i) O (CHead c k u2) (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (u: T).(drop (s k1 i) O (CHead c k1 u2) (CHead +e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s k1 i) O (CHead c k1 u2) (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))))) (\lambda (b: B).(\lambda (H1: (drop (r (Bind b) n0) O c -e)).(\lambda (H17: (eq nat (s (Bind b) i) (S n0))).(let H18 \def (f_equal nat +e2))))))))))) (\lambda (b: B).(\lambda (H18: (drop (r (Bind b) n0) O c +e)).(\lambda (H19: (eq nat (s (Bind b) i) (S n0))).(let H20 \def (f_equal nat nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).nat) with [O -\Rightarrow i | (S n) \Rightarrow n])) (S i) (S n0) H17) in (let H19 \def -(eq_ind nat i (\lambda (n: nat).(subst0 n v t u2)) H16 n0 H18) in (eq_ind_r -nat n0 (\lambda (n: nat).(or4 (drop (s (Bind b) n) O (CHead c (Bind b) u2) e) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n) O (CHead c (Bind b) +\Rightarrow i | (S n1) \Rightarrow n1])) (S i) (S n0) H19) in (let H21 \def +(eq_ind nat i (\lambda (n1: nat).(subst0 n1 v t u2)) H16 n0 H20) in (eq_ind_r +nat n0 (\lambda (n1: nat).(or4 (drop (s (Bind b) n1) O (CHead c (Bind b) u2) +e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n1) O (CHead c (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (s (Bind b) n) O (CHead c (Bind b) u2) (CHead e2 (Flat f) u)))))) +T).(drop (s (Bind b) n1) O (CHead c (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (s (Bind b) n) O (CHead c (Bind b) u2) (CHead e2 (Flat f) w))))))) +T).(drop (s (Bind b) n1) O (CHead c (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro0 @@ -3183,97 +3227,98 @@ F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c e H1 -u2)) i H18)))))) (\lambda (f: F).(\lambda (H1: (drop (r (Flat f) n0) O c -e)).(\lambda (H17: (eq nat (s (Flat f) i) (S n0))).(let H18 \def (f_equal nat -nat (\lambda (e0: nat).e0) i (S n0) H17) in (let H19 \def (eq_ind nat i -(\lambda (n: nat).(subst0 n v t u2)) H16 (S n0) H18) in (eq_ind_r nat (S n0) -(\lambda (n: nat).(or4 (drop (s (Flat f) n) O (CHead c (Flat f) u2) e) (ex3_4 -F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq -C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (s (Flat f) n) O (CHead c (Flat f) u2) (CHead e0 -(Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s -(Flat f) n) O (CHead c (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Flat f) n) O (CHead c (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro0 (drop (s (Flat f) -(S n0)) O (CHead c (Flat f) u2) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Flat f) (S n0)) O (CHead c (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c -(Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) -O (CHead c (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))) (drop_drop (Flat f) n0 c e H1 u2)) i -H18)))))) k (drop_gen_drop k c e t n0 H1) H0))) c2 H15)) u1 (sym_eq T u1 t -H14))) k0 (sym_eq K k0 k H13))) c0 (sym_eq C c0 c H12))) H11)) H10))) v0 -(sym_eq T v0 v H8))) (S n0) H7)) H4 H5 H6 H2))))) | (csubst0_fst k0 i c1 c0 -v0 H2 u) \Rightarrow (\lambda (H3: (eq nat (s k0 i) (S n0))).(\lambda (H4: -(eq T v0 v)).(\lambda (H5: (eq C (CHead c1 k0 u) (CHead c k t))).(\lambda -(H6: (eq C (CHead c0 k0 u) c2)).((let H7 \def (f_equal nat nat (\lambda (e0: -nat).e0) (s k0 i) (S n0) H3) in (eq_ind nat (s k0 i) (\lambda (n: nat).((eq T -v0 v) \to ((eq C (CHead c1 k0 u) (CHead c k t)) \to ((eq C (CHead c0 k0 u) -c2) \to ((csubst0 i v0 c1 c0) \to (or4 (drop n O c2 e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e -(CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop n O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: -T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u0: T).(drop n O c2 (CHead e2 (Flat f) u0)))))) +T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c e H18 +u2)) i H20)))))) (\lambda (f: F).(\lambda (H18: (drop (r (Flat f) n0) O c +e)).(\lambda (H19: (eq nat (s (Flat f) i) (S n0))).(let H20 \def (f_equal nat +nat (\lambda (e0: nat).e0) i (S n0) H19) in (let H21 \def (eq_ind nat i +(\lambda (n1: nat).(subst0 n1 v t u2)) H16 (S n0) H20) in (eq_ind_r nat (S +n0) (\lambda (n1: nat).(or4 (drop (s (Flat f) n1) O (CHead c (Flat f) u2) e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) n1) O (CHead c (Flat f) +u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (s (Flat f) n1) O (CHead c (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop n O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))))))))) (\lambda (H8: (eq T v0 v)).(eq_ind T v -(\lambda (t0: T).((eq C (CHead c1 k0 u) (CHead c k t)) \to ((eq C (CHead c0 -k0 u) c2) \to ((csubst0 i t0 c1 c0) \to (or4 (drop (s k0 i) O c2 e) (ex3_4 F -C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C -e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e0 (Flat f) w)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 -w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s k0 i) O c2 -(CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e -(CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: -T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Flat f) n1) O (CHead c (Flat f) u2) (CHead e2 (Flat f0) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))))))) (\lambda (H9: (eq C (CHead c1 k0 u) (CHead c k t))).(let H10 -\def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) -with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k0 -u) (CHead c k t) H9) in ((let H11 \def (f_equal C K (\lambda (e0: C).(match -e0 in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k -_) \Rightarrow k])) (CHead c1 k0 u) (CHead c k t) H9) in ((let H12 \def +e2))))))))) (or4_intro0 (drop (s (Flat f) (S n0)) O (CHead c (Flat f) u2) e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c (Flat +f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (s (Flat f) (S n0)) O (CHead c (Flat f) u2) (CHead e2 (Flat f0) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat +f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c (Flat f) u2) (CHead +e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (drop_drop (Flat f) n0 c e H18 u2)) i H20)))))) k +(drop_gen_drop k c e t n0 H1) H17))) c2 H15)) u1 (sym_eq T u1 t H14))) k0 +(sym_eq K k0 k H13))) c0 (sym_eq C c0 c H12))) H11)) H10))) v0 (sym_eq T v0 v +H8))) (S n0) H7)) H4 H5 H6 H2))))) | (csubst0_fst k0 i c0 c3 v0 H2 u) +\Rightarrow (\lambda (H3: (eq nat (s k0 i) (S n0))).(\lambda (H4: (eq T v0 +v)).(\lambda (H5: (eq C (CHead c0 k0 u) (CHead c k t))).(\lambda (H6: (eq C +(CHead c3 k0 u) c2)).((let H7 \def (f_equal nat nat (\lambda (e0: nat).e0) (s +k0 i) (S n0) H3) in (eq_ind nat (s k0 i) (\lambda (n1: nat).((eq T v0 v) \to +((eq C (CHead c0 k0 u) (CHead c k t)) \to ((eq C (CHead c3 k0 u) c2) \to +((csubst0 i v0 c0 c3) \to (or4 (drop n1 O c2 e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop n1 O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop n1 O c2 (CHead e2 (Flat f) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n1 +O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))))))) (\lambda (H8: (eq T v0 v)).(eq_ind T v (\lambda (t0: +T).((eq C (CHead c0 k0 u) (CHead c k t)) \to ((eq C (CHead c3 k0 u) c2) \to +((csubst0 i t0 c0 c3) \to (or4 (drop (s k0 i) O c2 e) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 +(Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (s k0 i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (s k0 i) O c2 (CHead e2 (Flat f) +u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat +f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e2 (Flat f) w))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))) (\lambda +(H9: (eq C (CHead c0 k0 u) (CHead c k t))).(let H10 \def (f_equal C T +(\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) with [(CSort _) +\Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead c0 k0 u) (CHead c k +t) H9) in ((let H11 \def (f_equal C K (\lambda (e0: C).(match e0 in C return +(\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) +\Rightarrow k1])) (CHead c0 k0 u) (CHead c k t) H9) in ((let H12 \def (f_equal C C (\lambda (e0: C).(match e0 in C return (\lambda (_: C).C) with -[(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k0 u) -(CHead c k t) H9) in (eq_ind C c (\lambda (c: C).((eq K k0 k) \to ((eq T u t) -\to ((eq C (CHead c0 k0 u) c2) \to ((csubst0 i v c c0) \to (or4 (drop (s k0 -i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: +[(CSort _) \Rightarrow c0 | (CHead c4 _ _) \Rightarrow c4])) (CHead c0 k0 u) +(CHead c k t) H9) in (eq_ind C c (\lambda (c4: C).((eq K k0 k) \to ((eq T u +t) \to ((eq C (CHead c3 k0 u) c2) \to ((csubst0 i v c4 c3) \to (or4 (drop (s +k0 i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: @@ -3289,8 +3334,25 @@ k0 i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))))) (\lambda (H13: (eq K k0 k)).(eq_ind K -k (\lambda (k: K).((eq T u t) \to ((eq C (CHead c0 k u) c2) \to ((csubst0 i v -c c0) \to (or4 (drop (s k i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda +k (\lambda (k1: K).((eq T u t) \to ((eq C (CHead c3 k1 u) c2) \to ((csubst0 i +v c c3) \to (or4 (drop (s k1 i) O c2 e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s k1 i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (s k1 i) O c2 (CHead e2 (Flat f) u0)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (s k1 i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 +w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))) (\lambda (H14: (eq T u +t)).(eq_ind T t (\lambda (t0: T).((eq C (CHead c3 k t0) c2) \to ((csubst0 i v +c c3) \to (or4 (drop (s k i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda @@ -3305,335 +3367,319 @@ F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))))))) (\lambda (H14: (eq T u t)).(eq_ind T t -(\lambda (t: T).((eq C (CHead c0 k t) c2) \to ((csubst0 i v c c0) \to (or4 -(drop (s k i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k -i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda -(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat -f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (s k i) O c2 (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: -T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -k i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))))))) (\lambda (H15: (eq C (CHead c0 k t) -c2)).(eq_ind C (CHead c0 k t) (\lambda (c2: C).((csubst0 i v c c0) \to (or4 -(drop (s k i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +(_: T).(csubst0 O v e1 e2))))))))))) (\lambda (H15: (eq C (CHead c3 k t) +c2)).(eq_ind C (CHead c3 k t) (\lambda (c4: C).((csubst0 i v c c3) \to (or4 +(drop (s k i) O c4 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k -i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +i) O c4 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (s k i) O c2 (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda +T).(drop (s k i) O c4 (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -k i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +k i) O c4 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))))) (\lambda (H16: (csubst0 i v c c0)).(let -H0 \def (eq_ind K k0 (\lambda (k: K).(eq nat (s k i) (S n0))) H7 k H13) in -(K_ind (\lambda (k: K).((drop (r k n0) O c e) \to ((eq nat (s k i) (S n0)) -\to (or4 (drop (s k i) O (CHead c0 k t) e) (ex3_4 F C T T (\lambda (f: +(_: T).(csubst0 O v e1 e2)))))))))) (\lambda (H16: (csubst0 i v c c3)).(let +H17 \def (eq_ind K k0 (\lambda (k1: K).(eq nat (s k1 i) (S n0))) H7 k H13) in +(K_ind (\lambda (k1: K).((drop (r k1 n0) O c e) \to ((eq nat (s k1 i) (S n0)) +\to (or4 (drop (s k1 i) O (CHead c3 k1 t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (s k i) O (CHead c0 k t) (CHead e0 (Flat f) w)))))) (\lambda (_: +T).(drop (s k1 i) O (CHead c3 k1 t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u0: T).(drop (s k i) O (CHead c0 k t) (CHead e2 +C).(\lambda (e2: C).(\lambda (u0: T).(drop (s k1 i) O (CHead c3 k1 t) (CHead +e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s k1 i) O (CHead c3 k1 t) (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))) (\lambda (b: B).(\lambda (H18: (drop (r (Bind b) n0) O c +e)).(\lambda (H19: (eq nat (s (Bind b) i) (S n0))).(let H20 \def (f_equal nat +nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).nat) with [O +\Rightarrow i | (S n1) \Rightarrow n1])) (S i) (S n0) H19) in (let H21 \def +(eq_ind nat i (\lambda (n1: nat).(csubst0 n1 v c c3)) H16 n0 H20) in +(eq_ind_r nat n0 (\lambda (n1: nat).(or4 (drop (s (Bind b) n1) O (CHead c3 +(Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n1) O +(CHead c3 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (s (Bind b) n1) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (s k i) O (CHead c0 k t) (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: -T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: +(_: T).(\lambda (w: T).(drop (s (Bind b) n1) O (CHead c3 (Bind b) t) (CHead +e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))))) (\lambda (b: B).(\lambda (H1: (drop (r (Bind b) n0) O c -e)).(\lambda (H17: (eq nat (s (Bind b) i) (S n0))).(let H18 \def (f_equal nat -nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).nat) with [O -\Rightarrow i | (S n) \Rightarrow n])) (S i) (S n0) H17) in (let H19 \def -(eq_ind nat i (\lambda (n: nat).(csubst0 n v c c0)) H16 n0 H18) in (eq_ind_r -nat n0 (\lambda (n: nat).(or4 (drop (s (Bind b) n) O (CHead c0 (Bind b) t) e) +e2))))))))) (let H22 \def (IHn c c3 v H21 e H18) in (or4_ind (drop n0 O c3 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n) O (CHead c0 (Bind b) -t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: -T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat -f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (s (Bind b) n) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) u0)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (s (Bind b) n) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) w))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (let H \def -(IHn c c0 v H19 e H1) in (or4_ind (drop n0 O c0 e) (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 -(Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop n0 O c0 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e -(CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop n0 O c0 (CHead e2 (Flat f) u0)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 -O c0 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (or4 (drop (s (Bind b) n0) O (CHead c0 (Bind b) t) e) (ex3_4 -F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq -C e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e0 -(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda -(w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c3 (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v +u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop n0 O c3 (CHead e2 +(Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 +(Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop n0 O c3 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H20: (drop n0 O c0 -e)).(or4_intro0 (drop (s (Bind b) n0) O (CHead c0 (Bind b) t) e) (ex3_4 F C T +T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (or4 (drop (s (Bind b) n0) O +(CHead c3 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c3 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c3 (Bind +b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C e (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 +(Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (H23: (drop n0 O c3 +e)).(or4_intro0 (drop (s (Bind b) n0) O (CHead c3 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e0 +T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: +(Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: +(Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c0 e H20 -t))) (\lambda (H20: (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e0 -(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) +T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c3 e H23 +t))) (\lambda (H23: (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c3 (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 O v u0 w))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O -c0 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: +c3 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w))))) (or4 (drop (s (Bind b) n0) O (CHead -c0 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +c3 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O -(CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +(CHead c3 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 +C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead +(_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (H21: (eq C e (CHead x1 (Flat x0) x2))).(\lambda (H22: (drop n0 O -c0 (CHead x1 (Flat x0) x3))).(\lambda (H23: (subst0 O v x2 x3)).(eq_ind_r C -(CHead x1 (Flat x0) x2) (\lambda (c: C).(or4 (drop (s (Bind b) n0) O (CHead -c0 (Bind b) t) c) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda -(u0: T).(\lambda (_: T).(eq C c (CHead e0 (Flat f) u0)))))) (\lambda (f: +T).(\lambda (H24: (eq C e (CHead x1 (Flat x0) x2))).(\lambda (H25: (drop n0 O +c3 (CHead x1 (Flat x0) x3))).(\lambda (H26: (subst0 O v x2 x3)).(eq_ind_r C +(CHead x1 (Flat x0) x2) (\lambda (c4: C).(or4 (drop (s (Bind b) n0) O (CHead +c3 (Bind b) t) c4) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (_: T).(eq C c4 (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O -(CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +(CHead c3 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c4 (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 +C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead +(_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro1 (drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead +e2))))))))) (or4_intro1 (drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead x1 (Flat x0) x2)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) +T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 (Flat x0) x2) (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: +(Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 +T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: +(Bind b) n0) O (CHead c3 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w))))) x0 -x1 x2 x3 (refl_equal C (CHead x1 (Flat x0) x2)) (drop_drop (Bind b) n0 c0 -(CHead x1 (Flat x0) x3) H22 t) H23)) e H21)))))))) H20)) (\lambda (H20: -(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c0 (CHead e2 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop n0 O c0 (CHead e2 -(Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2))))) (or4 (drop (s (Bind b) n0) O (CHead c0 (Bind -b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: -T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O -(CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e -(CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 -(Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 -(Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead -e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: -T).(\lambda (H21: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H22: (drop n0 O -c0 (CHead x2 (Flat x0) x3))).(\lambda (H23: (csubst0 O v x1 x2)).(eq_ind_r C -(CHead x1 (Flat x0) x3) (\lambda (c: C).(or4 (drop (s (Bind b) n0) O (CHead -c0 (Bind b) t) c) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda -(u0: T).(\lambda (_: T).(eq C c (CHead e0 (Flat f) u0)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O -(CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c -(CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 -(Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 -(Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead -e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro2 (drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead -x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda -(u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e0 (Flat f) -u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v -u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u0)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) -u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 -(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(ex3_4_intro F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u0)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) -x0 x1 x2 x3 (refl_equal C (CHead x1 (Flat x0) x3)) (drop_drop (Bind b) n0 c0 -(CHead x2 (Flat x0) x3) H22 t) H23)) e H21)))))))) H20)) (\lambda (H20: -(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 -O c0 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat -f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop n0 O c0 (CHead e2 (Flat f) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O -v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (s (Bind b) n0) O -(CHead c0 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +x1 x2 x3 (refl_equal C (CHead x1 (Flat x0) x2)) (drop_drop (Bind b) n0 c3 +(CHead x1 (Flat x0) x3) H25 t) H26)) e H24)))))))) H23)) (\lambda (H23: +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop n0 O c3 (CHead e2 (Flat f) +u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop n0 O +c3 (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (s (Bind b) n0) O +(CHead c3 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: +(Bind b) n0) O (CHead c3 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda -(x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H21: (eq C e (CHead x1 -(Flat x0) x3))).(\lambda (H22: (drop n0 O c0 (CHead x2 (Flat x0) -x4))).(\lambda (H23: (subst0 O v x3 x4)).(\lambda (H24: (csubst0 O v x1 -x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c: C).(or4 (drop (s (Bind -b) n0) O (CHead c0 (Bind b) t) c) (ex3_4 F C T T (\lambda (f: F).(\lambda -(e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e0 (Flat f) u0)))))) +(x2: C).(\lambda (x3: T).(\lambda (H24: (eq C e (CHead x1 (Flat x0) +x3))).(\lambda (H25: (drop n0 O c3 (CHead x2 (Flat x0) x3))).(\lambda (H26: +(csubst0 O v x1 x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c4: +C).(or4 (drop (s (Bind b) n0) O (CHead c3 (Bind b) t) c4) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 +(CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C c4 (CHead e1 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s +(Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(eq C c4 (CHead e1 (Flat f) u0))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O +v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (s (Bind b) +n0) O (CHead c3 (Bind b) t) (CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 +(Flat x0) x3) (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) +t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 (Flat +x0) x3) (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead +e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C +(CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) +O (CHead c3 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 +w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C C T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 +(Flat x0) x3) (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c3 (Bind +b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) x0 x1 x2 x3 (refl_equal C +(CHead x1 (Flat x0) x3)) (drop_drop (Bind b) n0 c3 (CHead x2 (Flat x0) x3) +H25 t) H26)) e H24)))))))) H23)) (\lambda (H23: (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c3 (CHead e2 (Flat f) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C +C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 +O c3 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))) (or4 (drop (s (Bind b) n0) O (CHead c3 (Bind b) t) e) (ex3_4 +F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq +C e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s +(Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O +v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: F).(\lambda (x1: +C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H24: (eq C e +(CHead x1 (Flat x0) x3))).(\lambda (H25: (drop n0 O c3 (CHead x2 (Flat x0) +x4))).(\lambda (H26: (subst0 O v x3 x4)).(\lambda (H27: (csubst0 O v x1 +x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c4: C).(or4 (drop (s (Bind +b) n0) O (CHead c3 (Bind b) t) c4) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: +(Bind b) n0) O (CHead c3 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: -T).(eq C c (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +T).(eq C c4 (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq -C c (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 +C c4 (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (s (Bind b) n0) O (CHead -c0 (Bind b) t) (CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f: +c3 (Bind b) t) (CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead +(_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u0: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) +(u0: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda @@ -3641,383 +3687,401 @@ C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) -O (CHead c0 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda +O (CHead c3 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x0 x1 x2 x3 x4 (refl_equal C -(CHead x1 (Flat x0) x3)) (drop_drop (Bind b) n0 c0 (CHead x2 (Flat x0) x4) -H22 t) H23 H24)) e H21)))))))))) H20)) H)) i H18)))))) (\lambda (f: -F).(\lambda (H1: (drop (r (Flat f) n0) O c e)).(\lambda (H17: (eq nat (s -(Flat f) i) (S n0))).(let H18 \def (f_equal nat nat (\lambda (e0: nat).e0) i -(S n0) H17) in (let H19 \def (eq_ind nat i (\lambda (n: nat).(csubst0 n v c -c0)) H16 (S n0) H18) in (eq_ind_r nat (S n0) (\lambda (n: nat).(or4 (drop (s -(Flat f) n) O (CHead c0 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat -f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (s (Flat f) n) O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) w)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v -u0 w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f0) u0)))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Flat f) n) O -(CHead c0 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: -T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Flat f) n) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O -v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (let H20 \def (H c0 v H19 e -H1) in (or4_ind (drop (S n0) O c0 e) (ex3_4 F C T T (\lambda (f0: F).(\lambda -(e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u0)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O c0 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda -(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat -f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (S n0) O c0 (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: -T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S -n0) O c0 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))) (or4 (drop (s (Flat f) (S n0)) O (CHead c0 -(Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: -T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u0)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) -O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e -(CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead -e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e -(CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 -(Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))) (\lambda (H21: (drop (S n0) O c0 -e)).(or4_intro0 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) e) (ex3_4 F -C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq -C e (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) -(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: -T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat -f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) -u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat -f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead -e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (drop_drop (Flat f) n0 c0 e H21 t))) (\lambda (H21: (ex3_4 F -C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u -w))))))).(ex3_4_ind F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: -T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u0)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead -e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: -T).(\lambda (w: T).(subst0 O v u0 w))))) (or4 (drop (s (Flat f) (S n0)) O -(CHead c0 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x0 x1 x2 x3 x4 (refl_equal C +(CHead x1 (Flat x0) x3)) (drop_drop (Bind b) n0 c3 (CHead x2 (Flat x0) x4) +H25 t) H26 H27)) e H24)))))))))) H23)) H22)) i H20)))))) (\lambda (f: +F).(\lambda (H18: (drop (r (Flat f) n0) O c e)).(\lambda (H19: (eq nat (s +(Flat f) i) (S n0))).(let H20 \def (f_equal nat nat (\lambda (e0: nat).e0) i +(S n0) H19) in (let H21 \def (eq_ind nat i (\lambda (n1: nat).(csubst0 n1 v c +c3)) H16 (S n0) H20) in (eq_ind_r nat (S n0) (\lambda (n1: nat).(or4 (drop (s +(Flat f) n1) O (CHead c3 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s (Flat f) n1) O (CHead c3 (Flat f) t) (CHead e0 (Flat f0) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v +u0 w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Flat f) n1) O +(CHead c3 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Flat f) n1) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (let H22 \def +(H c3 v H21 e H18) in (or4_ind (drop (S n0) O c3 e) (ex3_4 F C T T (\lambda +(f0: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 +(Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O c3 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O c3 (CHead e2 (Flat f0) u0)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O c3 (CHead e2 (Flat f0) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O +v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (or4 (drop (s (Flat f) (S n0)) O +(CHead c3 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda +(Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Flat f) (S -n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: +n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) w))))))) +(Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: -F).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H22: (eq C e -(CHead x1 (Flat x0) x2))).(\lambda (H23: (drop (S n0) O c0 (CHead x1 (Flat -x0) x3))).(\lambda (H24: (subst0 O v x2 x3)).(eq_ind_r C (CHead x1 (Flat x0) -x2) (\lambda (c: C).(or4 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) c) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda -(_: T).(eq C c (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 -(Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H23: +(drop (S n0) O c3 e)).(or4_intro0 (drop (s (Flat f) (S n0)) O (CHead c3 (Flat +f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) +O (CHead c3 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead +C).(\lambda (u0: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))))) (or4_intro1 (drop (s (Flat f) (S n0)) O -(CHead c0 (Flat f) t) (CHead x1 (Flat x0) x2)) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat -x0) x2) (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 -(Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C -(CHead x1 (Flat x0) x2) (CHead e1 (Flat f0) u0)))))) (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Flat f) (S -n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e1 (Flat f0) -u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead -e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e0 -(Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: -T).(subst0 O v u0 w))))) x0 x1 x2 x3 (refl_equal C (CHead x1 (Flat x0) x2)) -(drop_drop (Flat f) n0 c0 (CHead x1 (Flat x0) x3) H23 t) H24)) e H22)))))))) -H21)) (\lambda (H21: (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c0 (CHead -e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat -f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: -T).(drop (S n0) O c0 (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop -(s (Flat f) (S n0)) O (CHead c0 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: +(_: T).(csubst0 O v e1 e2))))))) (drop_drop (Flat f) n0 c3 e H23 t))) +(\lambda (H23: (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead +e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 O v u0 w))))))).(ex3_4_ind F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w))))) (or4 (drop (s (Flat +f) (S n0)) O (CHead c3 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) +T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s -(Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) u0)))))) +(Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) +(w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: -T).(\lambda (H22: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H23: (drop (S -n0) O c0 (CHead x2 (Flat x0) x3))).(\lambda (H24: (csubst0 O v x1 -x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c: C).(or4 (drop (s (Flat -f) (S n0)) O (CHead c0 (Flat f) t) c) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e0 (Flat +e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (H24: (eq C e (CHead x1 (Flat x0) x2))).(\lambda (H25: (drop (S +n0) O c3 (CHead x1 (Flat x0) x3))).(\lambda (H26: (subst0 O v x2 +x3)).(eq_ind_r C (CHead x1 (Flat x0) x2) (\lambda (c4: C).(or4 (drop (s (Flat +f) (S n0)) O (CHead c3 (Flat f) t) c4) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) +T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(eq C c (CHead e1 (Flat f0) u0)))))) +C).(\lambda (_: C).(\lambda (u0: T).(eq C c4 (CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s -(Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) u0)))))) +(Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 (Flat f0) u0))))))) +C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 (CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) +(w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro2 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) -(CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e0 +e2))))))))) (or4_intro1 (drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) +(CHead x1 (Flat x0) x2)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) +(w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 +C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 (Flat x0) x2) (CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u0: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) +(u0: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) -x3) (CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +x2) (CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 (Flat -x0) x3) (CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Flat f) (S n0)) O (CHead c0 -(Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) x0 x1 x2 x3 -(refl_equal C (CHead x1 (Flat x0) x3)) (drop_drop (Flat f) n0 c0 (CHead x2 -(Flat x0) x3) H23 t) H24)) e H22)))))))) H21)) (\lambda (H21: (ex4_5 F C C T -T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead -e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))).(ex4_5_ind F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O c0 (CHead e2 (Flat f0) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O -v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (s (Flat f) (S n0)) O -(CHead c0 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat +x0) x2) (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 +(Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w))))) x0 x1 x2 x3 +(refl_equal C (CHead x1 (Flat x0) x2)) (drop_drop (Flat f) n0 c3 (CHead x1 +(Flat x0) x3) H25 t) H26)) e H24)))))))) H23)) (\lambda (H23: (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O c3 (CHead e2 (Flat f0) u0)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2))))))).(ex3_4_ind F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c3 (CHead +e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (s (Flat f) (S n0)) O +(CHead c3 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda +(Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Flat f) (S -n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: +n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) w))))))) +(Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: -F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (H22: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H23: (drop (S -n0) O c0 (CHead x2 (Flat x0) x4))).(\lambda (H24: (subst0 O v x3 -x4)).(\lambda (H25: (csubst0 O v x1 x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) -(\lambda (c: C).(or4 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) c) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda -(_: T).(eq C c (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 -(Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c +F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H24: (eq C e +(CHead x1 (Flat x0) x3))).(\lambda (H25: (drop (S n0) O c3 (CHead x2 (Flat +x0) x3))).(\lambda (H26: (csubst0 O v x1 x2)).(eq_ind_r C (CHead x1 (Flat x0) +x3) (\lambda (c4: C).(or4 (drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) +c4) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C c4 (CHead e0 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) +O (CHead c3 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c4 (CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u0: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead +C).(\lambda (u0: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 (CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (s (Flat f) (S n0)) O -(CHead c0 (Flat f) t) (CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f0: +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (s (Flat f) (S n0)) O +(CHead c3 (Flat f) t) (CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Flat f) (S -n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: +n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead +T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (ex4_5_intro F C C T T (\lambda (f0: F).(\lambda (e1: +O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 +(Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u0: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) +u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2))))) x0 x1 x2 x3 (refl_equal C (CHead x1 (Flat x0) x3)) +(drop_drop (Flat f) n0 c3 (CHead x2 (Flat x0) x3) H25 t) H26)) e H24)))))))) +H23)) (\lambda (H23: (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat +f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 (Flat f0) w))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C +C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c3 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (or4 (drop (s (Flat f) (S n0)) O (CHead c3 +(Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) +O (CHead c3 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead +e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 +(Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda +(x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H24: (eq C e (CHead x1 +(Flat x0) x3))).(\lambda (H25: (drop (S n0) O c3 (CHead x2 (Flat x0) +x4))).(\lambda (H26: (subst0 O v x3 x4)).(\lambda (H27: (csubst0 O v x1 +x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c4: C).(or4 (drop (s (Flat +f) (S n0)) O (CHead c3 (Flat f) t) c4) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 (CHead e0 (Flat +f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C c4 (CHead e1 (Flat f0) u0)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s +(Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) u0)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C c4 (CHead e1 (Flat f0) u0))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro3 (drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) +(CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e0 +(Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 +(Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u0: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) +u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))) x0 x1 x2 x3 x4 (refl_equal C (CHead x1 (Flat -x0) x3)) (drop_drop (Flat f) n0 c0 (CHead x2 (Flat x0) x4) H23 t) H24 H25)) e -H22)))))))))) H21)) H20)) i H18)))))) k (drop_gen_drop k c e t n0 H1) H0))) -c2 H15)) u (sym_eq T u t H14))) k0 (sym_eq K k0 k H13))) c1 (sym_eq C c1 c -H12))) H11)) H10))) v0 (sym_eq T v0 v H8))) (S n0) H7)) H4 H5 H6 H2))))) | -(csubst0_both k0 i v0 u1 u2 H2 c1 c0 H3) \Rightarrow (\lambda (H4: (eq nat (s -k0 i) (S n0))).(\lambda (H5: (eq T v0 v)).(\lambda (H6: (eq C (CHead c1 k0 -u1) (CHead c k t))).(\lambda (H7: (eq C (CHead c0 k0 u2) c2)).((let H8 \def -(f_equal nat nat (\lambda (e0: nat).e0) (s k0 i) (S n0) H4) in (eq_ind nat (s -k0 i) (\lambda (n: nat).((eq T v0 v) \to ((eq C (CHead c1 k0 u1) (CHead c k -t)) \to ((eq C (CHead c0 k0 u2) c2) \to ((subst0 i v0 u1 u2) \to ((csubst0 i -v0 c1 c0) \to (or4 (drop n O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (ex4_5_intro F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C +(CHead x1 (Flat x0) x3) (CHead e1 (Flat f0) u0))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Flat f) (S n0)) O (CHead c3 (Flat f) t) (CHead e2 (Flat f0) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x0 x1 x2 x3 x4 +(refl_equal C (CHead x1 (Flat x0) x3)) (drop_drop (Flat f) n0 c3 (CHead x2 +(Flat x0) x4) H25 t) H26 H27)) e H24)))))))))) H23)) H22)) i H20)))))) k +(drop_gen_drop k c e t n0 H1) H17))) c2 H15)) u (sym_eq T u t H14))) k0 +(sym_eq K k0 k H13))) c0 (sym_eq C c0 c H12))) H11)) H10))) v0 (sym_eq T v0 v +H8))) (S n0) H7)) H4 H5 H6 H2))))) | (csubst0_both k0 i v0 u1 u2 H2 c0 c3 H3) +\Rightarrow (\lambda (H4: (eq nat (s k0 i) (S n0))).(\lambda (H5: (eq T v0 +v)).(\lambda (H6: (eq C (CHead c0 k0 u1) (CHead c k t))).(\lambda (H7: (eq C +(CHead c3 k0 u2) c2)).((let H8 \def (f_equal nat nat (\lambda (e0: nat).e0) +(s k0 i) (S n0) H4) in (eq_ind nat (s k0 i) (\lambda (n1: nat).((eq T v0 v) +\to ((eq C (CHead c0 k0 u1) (CHead c k t)) \to ((eq C (CHead c3 k0 u2) c2) +\to ((subst0 i v0 u1 u2) \to ((csubst0 i v0 c0 c3) \to (or4 (drop n1 O c2 e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop n1 O c2 (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n1 O c2 (CHead e2 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop n1 O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))) (\lambda (H9: (eq T v0 +v)).(eq_ind T v (\lambda (t0: T).((eq C (CHead c0 k0 u1) (CHead c k t)) \to +((eq C (CHead c3 k0 u2) c2) \to ((subst0 i t0 u1 u2) \to ((csubst0 i t0 c0 +c3) \to (or4 (drop (s k0 i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 +i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (s k0 i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +k0 i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))))))) (\lambda (H10: (eq C (CHead c0 k0 u1) +(CHead c k t))).(let H11 \def (f_equal C T (\lambda (e0: C).(match e0 in C +return (\lambda (_: C).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ t0) +\Rightarrow t0])) (CHead c0 k0 u1) (CHead c k t) H10) in ((let H12 \def +(f_equal C K (\lambda (e0: C).(match e0 in C return (\lambda (_: C).K) with +[(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead c0 k0 u1) +(CHead c k t) H10) in ((let H13 \def (f_equal C C (\lambda (e0: C).(match e0 +in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c4 _ +_) \Rightarrow c4])) (CHead c0 k0 u1) (CHead c k t) H10) in (eq_ind C c +(\lambda (c4: C).((eq K k0 k) \to ((eq T u1 t) \to ((eq C (CHead c3 k0 u2) +c2) \to ((subst0 i v u1 u2) \to ((csubst0 i v c4 c3) \to (or4 (drop (s k0 i) +O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop n O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e2 -(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))))))))) (\lambda (H9: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq -C (CHead c1 k0 u1) (CHead c k t)) \to ((eq C (CHead c0 k0 u2) c2) \to -((subst0 i t0 u1 u2) \to ((csubst0 i t0 c1 c0) \to (or4 (drop (s k0 i) O c2 -e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e0 (Flat f) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s k0 -i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e2 (Flat f) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))))))) (\lambda (H10: (eq C (CHead c1 k0 u1) (CHead c k t))).(let -H11 \def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: -C).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ t) \Rightarrow t])) (CHead -c1 k0 u1) (CHead c k t) H10) in ((let H12 \def (f_equal C K (\lambda (e0: -C).(match e0 in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | -(CHead _ k _) \Rightarrow k])) (CHead c1 k0 u1) (CHead c k t) H10) in ((let -H13 \def (f_equal C C (\lambda (e0: C).(match e0 in C return (\lambda (_: -C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead -c1 k0 u1) (CHead c k t) H10) in (eq_ind C c (\lambda (c: C).((eq K k0 k) \to -((eq T u1 t) \to ((eq C (CHead c0 k0 u2) c2) \to ((subst0 i v u1 u2) \to -((csubst0 i v c c0) \to (or4 (drop (s k0 i) O c2 e) (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 -(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (s k0 i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +T).(drop (s k0 i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +k0 i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))))))))) (\lambda (H14: (eq K k0 k)).(eq_ind K +k (\lambda (k1: K).((eq T u1 t) \to ((eq C (CHead c3 k1 u2) c2) \to ((subst0 +i v u1 u2) \to ((csubst0 i v c c3) \to (or4 (drop (s k1 i) O c2 e) (ex3_4 F C +T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (s k1 i) O c2 (CHead e0 (Flat f) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (s k0 i) O c2 (CHead e2 (Flat f) +C).(\lambda (e2: C).(\lambda (u: T).(drop (s k1 i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e2 (Flat f) w))))))) (\lambda +T).(\lambda (w: T).(drop (s k1 i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))) (\lambda -(H14: (eq K k0 k)).(eq_ind K k (\lambda (k: K).((eq T u1 t) \to ((eq C (CHead -c0 k u2) c2) \to ((subst0 i v u1 u2) \to ((csubst0 i v c c0) \to (or4 (drop -(s k i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O c2 (CHead -e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))))) (\lambda +(H15: (eq T u1 t)).(eq_ind T t (\lambda (t0: T).((eq C (CHead c3 k u2) c2) +\to ((subst0 i v t0 u2) \to ((csubst0 i v c c3) \to (or4 (drop (s k i) O c2 +e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O c2 (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s k i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda @@ -4028,647 +4092,631 @@ C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))))))) (\lambda (H15: (eq T u1 t)).(eq_ind T t (\lambda (t: T).((eq -C (CHead c0 k u2) c2) \to ((subst0 i v t u2) \to ((csubst0 i v c c0) \to (or4 -(drop (s k i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +e2)))))))))))) (\lambda (H16: (eq C (CHead c3 k u2) c2)).(eq_ind C (CHead c3 +k u2) (\lambda (c4: C).((subst0 i v t u2) \to ((csubst0 i v c c3) \to (or4 +(drop (s k i) O c4 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k -i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +i) O c4 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (s k i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda +T).(drop (s k i) O c4 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -k i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))))))) (\lambda (H16: (eq C (CHead c0 k u2) -c2)).(eq_ind C (CHead c0 k u2) (\lambda (c2: C).((subst0 i v t u2) \to -((csubst0 i v c c0) \to (or4 (drop (s k i) O c2 e) (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 -(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (s k i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (s k i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -k i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +k i) O c4 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))) (\lambda (H17: (subst0 i v t -u2)).(\lambda (H18: (csubst0 i v c c0)).(let H0 \def (eq_ind K k0 (\lambda -(k: K).(eq nat (s k i) (S n0))) H8 k H14) in (K_ind (\lambda (k: K).((drop (r -k n0) O c e) \to ((eq nat (s k i) (S n0)) \to (or4 (drop (s k i) O (CHead c0 -k u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O (CHead c0 -k u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat -f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (s k i) O (CHead c0 k u2) (CHead e2 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -k i) O (CHead c0 k u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))))))) (\lambda (b: B).(\lambda (H1: (drop (r -(Bind b) n0) O c e)).(\lambda (H19: (eq nat (s (Bind b) i) (S n0))).(let H20 -\def (f_equal nat nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: -nat).nat) with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S n0) H19) in -(let H21 \def (eq_ind nat i (\lambda (n: nat).(csubst0 n v c c0)) H18 n0 H20) -in (let H22 \def (eq_ind nat i (\lambda (n: nat).(subst0 n v t u2)) H17 n0 -H20) in (eq_ind_r nat n0 (\lambda (n: nat).(or4 (drop (s (Bind b) n) O (CHead -c0 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +u2)).(\lambda (H18: (csubst0 i v c c3)).(let H19 \def (eq_ind K k0 (\lambda +(k1: K).(eq nat (s k1 i) (S n0))) H8 k H14) in (K_ind (\lambda (k1: K).((drop +(r k1 n0) O c e) \to ((eq nat (s k1 i) (S n0)) \to (or4 (drop (s k1 i) O +(CHead c3 k1 u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n) O -(CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (s (Bind b) n) O (CHead c0 (Bind b) u2) (CHead e2 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 -(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (s (Bind b) n) O (CHead c0 (Bind b) u2) (CHead -e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (let H \def (IHn c c0 v H21 e H1) in (or4_ind (drop n0 O c0 e) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e0 (Flat f) w)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u -w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c0 (CHead e2 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 -(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop n0 O c0 (CHead e2 (Flat f) w))))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O -v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (or4 (drop (s (Bind b) n0) O -(CHead c0 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k1 i) O (CHead +c3 k1 u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (s k1 i) O (CHead c3 k1 u2) (CHead e2 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +k1 i) O (CHead c3 k1 u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))))) (\lambda (b: B).(\lambda (H20: (drop (r +(Bind b) n0) O c e)).(\lambda (H21: (eq nat (s (Bind b) i) (S n0))).(let H22 +\def (f_equal nat nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: +nat).nat) with [O \Rightarrow i | (S n1) \Rightarrow n1])) (S i) (S n0) H21) +in (let H23 \def (eq_ind nat i (\lambda (n1: nat).(csubst0 n1 v c c3)) H18 n0 +H22) in (let H24 \def (eq_ind nat i (\lambda (n1: nat).(subst0 n1 v t u2)) +H17 n0 H22) in (eq_ind_r nat n0 (\lambda (n1: nat).(or4 (drop (s (Bind b) n1) +O (CHead c3 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind -b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) -u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))) (\lambda (H23: (drop n0 O c0 e)).(or4_intro0 (drop (s (Bind -b) n0) O (CHead c0 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: +(Bind b) n1) O (CHead c3 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n1) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n1) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (drop_drop (Bind b) n0 c0 e H23 u2))) (\lambda (H23: (ex3_4 -F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq -C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop n0 O c0 (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u -w))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +O v e1 e2))))))))) (let H25 \def (IHn c c3 v H23 e H20) in (or4_ind (drop n0 +O c3 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e0 +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c3 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w))))) (or4 (drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O +c3 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c3 (CHead e2 (Flat f) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (or4 (drop (s +(Bind b) n0) O (CHead c3 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O +(CHead c3 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H26: +(drop n0 O c3 e)).(or4_intro0 (drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) u)))))) +T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) w))))))) +T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: -F).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H24: (eq C e -(CHead x1 (Flat x0) x2))).(\lambda (H25: (drop n0 O c0 (CHead x1 (Flat x0) -x3))).(\lambda (H26: (subst0 O v x2 x3)).(eq_ind_r C (CHead x1 (Flat x0) x2) -(\lambda (c: C).(or4 (drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) c) (ex3_4 -F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq -C c (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 -(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Flat f) u)))))) -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C c (CHead e1 (Flat f) u))))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro1 -(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead x1 (Flat x0) x2)) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C (CHead x1 (Flat x0) x2) (CHead e0 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O -(CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead -x1 (Flat x0) x2) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind +b) n0 c3 e H26 u2))) (\lambda (H26: (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O +c3 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w))))))).(ex3_4_ind F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop n0 O c3 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w))))) (or4 (drop (s (Bind +b) n0) O (CHead c3 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead x1 (Flat x0) x2) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) -O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) -x2) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 -(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) +u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda (x2: T).(\lambda +(x3: T).(\lambda (H27: (eq C e (CHead x1 (Flat x0) x2))).(\lambda (H28: (drop +n0 O c3 (CHead x1 (Flat x0) x3))).(\lambda (H29: (subst0 O v x2 +x3)).(eq_ind_r C (CHead x1 (Flat x0) x2) (\lambda (c4: C).(or4 (drop (s (Bind +b) n0) O (CHead c3 (Bind b) u2) c4) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c4 (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c4 (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c3 (Bind +b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +c4 (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) +u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))) (or4_intro1 (drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) +(CHead x1 (Flat x0) x2)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e0 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Flat x0) x2) (CHead e1 +(Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) +x2) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) +u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e0 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w))))) x0 x1 x2 x3 (refl_equal C (CHead x1 (Flat x0) x2)) -(drop_drop (Bind b) n0 c0 (CHead x1 (Flat x0) x3) H25 u2) H26)) e H24)))))))) -H23)) (\lambda (H23: (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda +(drop_drop (Bind b) n0 c3 (CHead x1 (Flat x0) x3) H28 u2) H29)) e H27)))))))) +H26)) (\lambda (H26: (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c0 (CHead e2 +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c3 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O -c0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +c3 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (s (Bind b) n0) O -(CHead c0 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +(CHead c3 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: +(Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda (x2: C).(\lambda -(x3: T).(\lambda (H24: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H25: (drop -n0 O c0 (CHead x2 (Flat x0) x3))).(\lambda (H26: (csubst0 O v x1 -x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c: C).(or4 (drop (s (Bind -b) n0) O (CHead c0 (Bind b) u2) c) (ex3_4 F C T T (\lambda (f: F).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Flat f) u)))))) +(x3: T).(\lambda (H27: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H28: (drop +n0 O c3 (CHead x2 (Flat x0) x3))).(\lambda (H29: (csubst0 O v x1 +x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c4: C).(or4 (drop (s (Bind +b) n0) O (CHead c3 (Bind b) u2) c4) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c4 (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: +(Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(eq C c (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +T).(eq C c4 (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C -c (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) +c4 (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))))) (or4_intro2 (drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) +O v e1 e2))))))))) (or4_intro2 (drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 (Flat f) +(w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) +(u: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) +(u: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) x0 x1 x2 x3 (refl_equal C (CHead x1 (Flat x0) x3)) -(drop_drop (Bind b) n0 c0 (CHead x2 (Flat x0) x3) H25 u2) H26)) e H24)))))))) -H23)) (\lambda (H23: (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +(drop_drop (Bind b) n0 c3 (CHead x2 (Flat x0) x3) H28 u2) H29)) e H27)))))))) +H26)) (\lambda (H26: (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop n0 O c0 (CHead e2 (Flat f) w))))))) (\lambda (_: +T).(\lambda (w: T).(drop n0 O c3 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e2 (Flat f) w))))))) +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c3 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (s -(Bind b) n0) O (CHead c0 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: +(Bind b) n0) O (CHead c3 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) +T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O -(CHead c0 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda +(CHead c3 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda +(Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (H24: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H25: (drop n0 O -c0 (CHead x2 (Flat x0) x4))).(\lambda (H26: (subst0 O v x3 x4)).(\lambda -(H27: (csubst0 O v x1 x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c: -C).(or4 (drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) c) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c +T).(\lambda (H27: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H28: (drop n0 O +c3 (CHead x2 (Flat x0) x4))).(\lambda (H29: (subst0 O v x3 x4)).(\lambda +(H30: (csubst0 O v x1 x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c4: +C).(or4 (drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) c4) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c4 (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 +T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Flat f) u)))))) +C).(\lambda (_: C).(\lambda (u: T).(eq C c4 (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: +(Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C c (CHead e1 (Flat f) u))))))) (\lambda (f: +(u: T).(\lambda (_: T).(eq C c4 (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda +(Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 -(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead x1 (Flat x0) x3)) +(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O -(CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(CHead c3 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) -O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda +O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex4_5_intro F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) -O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda +O (CHead c3 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x0 x1 x2 x3 x4 (refl_equal C (CHead x1 (Flat -x0) x3)) (drop_drop (Bind b) n0 c0 (CHead x2 (Flat x0) x4) H25 u2) H26 H27)) -e H24)))))))))) H23)) H)) i H20))))))) (\lambda (f: F).(\lambda (H1: (drop (r -(Flat f) n0) O c e)).(\lambda (H19: (eq nat (s (Flat f) i) (S n0))).(let H20 -\def (f_equal nat nat (\lambda (e0: nat).e0) i (S n0) H19) in (let H21 \def -(eq_ind nat i (\lambda (n: nat).(csubst0 n v c c0)) H18 (S n0) H20) in (let -H22 \def (eq_ind nat i (\lambda (n: nat).(subst0 n v t u2)) H17 (S n0) H20) -in (eq_ind_r nat (S n0) (\lambda (n: nat).(or4 (drop (s (Flat f) n) O (CHead -c0 (Flat f) u2) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) n) O -(CHead c0 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (s (Flat f) n) O (CHead c0 (Flat f) u2) (CHead e2 -(Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 -(Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(drop (s (Flat f) n) O (CHead c0 (Flat f) u2) (CHead -e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))))) (let H23 \def (H c0 v H21 e H1) in (or4_ind (drop (S n0) O -c0 e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: +x0) x3)) (drop_drop (Bind b) n0 c3 (CHead x2 (Flat x0) x4) H28 u2) H29 H30)) +e H27)))))))))) H26)) H25)) i H22))))))) (\lambda (f: F).(\lambda (H20: (drop +(r (Flat f) n0) O c e)).(\lambda (H21: (eq nat (s (Flat f) i) (S n0))).(let +H22 \def (f_equal nat nat (\lambda (e0: nat).e0) i (S n0) H21) in (let H23 +\def (eq_ind nat i (\lambda (n1: nat).(csubst0 n1 v c c3)) H18 (S n0) H22) in +(let H24 \def (eq_ind nat i (\lambda (n1: nat).(subst0 n1 v t u2)) H17 (S n0) +H22) in (eq_ind_r nat (S n0) (\lambda (n1: nat).(or4 (drop (s (Flat f) n1) O +(CHead c3 (Flat f) u2) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Flat f) n1) O (CHead c3 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Flat f) n1) O (CHead c3 (Flat +f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) n1) O (CHead c3 +(Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (let H25 \def (H c3 v H23 e H20) in +(or4_ind (drop (S n0) O c3 e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c3 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c3 (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c3 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (or4 (drop (s (Flat f) (S n0)) O (CHead c3 +(Flat f) u2) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead -e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S -n0) O c0 (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead -e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (or4 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) e) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 -(Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) +O (CHead c3 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead +C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))) (\lambda (H24: (drop (S n0) O c0 -e)).(or4_intro0 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) e) (ex3_4 +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (H26: (drop (S n0) O c3 +e)).(or4_intro0 (drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) +(_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) +T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead +T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (drop_drop (Flat f) n0 c0 e H24 u2))) (\lambda (H24: (ex3_4 -F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq -C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 (Flat f) w)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +O v e1 e2))))))) (drop_drop (Flat f) n0 c3 e H26 u2))) (\lambda (H26: (ex3_4 +F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead e0 (Flat f0) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w))))))).(ex3_4_ind F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda -(w: T).(subst0 O v u w))))) (or4 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat +(w: T).(subst0 O v u w))))) (or4 (drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) -O (CHead c0 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +O (CHead c3 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead +C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda -(x2: T).(\lambda (x3: T).(\lambda (H25: (eq C e (CHead x1 (Flat x0) -x2))).(\lambda (H26: (drop (S n0) O c0 (CHead x1 (Flat x0) x3))).(\lambda -(H27: (subst0 O v x2 x3)).(eq_ind_r C (CHead x1 (Flat x0) x2) (\lambda (c: -C).(or4 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) c) (ex3_4 F C T T -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c +(x2: T).(\lambda (x3: T).(\lambda (H27: (eq C e (CHead x1 (Flat x0) +x2))).(\lambda (H28: (drop (S n0) O c3 (CHead x1 (Flat x0) x3))).(\lambda +(H29: (subst0 O v x2 x3)).(eq_ind_r C (CHead x1 (Flat x0) x2) (\lambda (c4: +C).(or4 (drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) c4) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c4 (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead +T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Flat f0) u)))))) +C).(\lambda (_: C).(\lambda (u: T).(eq C c4 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s -(Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) u)))))) +(Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Flat f0) u))))))) +C).(\lambda (u: T).(\lambda (_: T).(eq C c4 (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) +(w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro1 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) +e2))))))))) (or4_intro1 (drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead x1 (Flat x0) x2)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e0 (Flat f0) +(w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Flat x0) x2) (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) +(u: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) +(_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w))))) x0 x1 x2 x3 (refl_equal C (CHead x1 -(Flat x0) x2)) (drop_drop (Flat f) n0 c0 (CHead x1 (Flat x0) x3) H26 u2) -H27)) e H25)))))))) H24)) (\lambda (H24: (ex3_4 F C C T (\lambda (f: +(Flat x0) x2)) (drop_drop (Flat f) n0 c3 (CHead x1 (Flat x0) x3) H28 u2) +H29)) e H27)))))))) H26)) (\lambda (H26: (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat -f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(drop (S n0) O c0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C -C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c3 (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind +F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead e2 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2))))) (or4 (drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 +(Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (S n0) O c0 (CHead e2 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) -(or4 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) e) (ex3_4 F C T T -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead +e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 +(Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda +(x2: C).(\lambda (x3: T).(\lambda (H27: (eq C e (CHead x1 (Flat x0) +x3))).(\lambda (H28: (drop (S n0) O c3 (CHead x2 (Flat x0) x3))).(\lambda +(H29: (csubst0 O v x1 x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c4: +C).(or4 (drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) c4) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c4 (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead +T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s -(Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) -w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: -T).(\lambda (H25: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H26: (drop (S -n0) O c0 (CHead x2 (Flat x0) x3))).(\lambda (H27: (csubst0 O v x1 -x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c: C).(or4 (drop (s (Flat -f) (S n0)) O (CHead c0 (Flat f) u2) c) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Flat -f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e0 (Flat f0) -w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Flat f0) u)))))) +C).(\lambda (_: C).(\lambda (u: T).(eq C c4 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s -(Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) u)))))) +(Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Flat f0) u))))))) +C).(\lambda (u: T).(\lambda (_: T).(eq C c4 (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) +(w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro2 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) +e2))))))))) (or4_intro2 (drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e0 (Flat f0) +(w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) +(u: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) +(e2: C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) x0 x1 x2 x3 (refl_equal C (CHead -x1 (Flat x0) x3)) (drop_drop (Flat f) n0 c0 (CHead x2 (Flat x0) x3) H26 u2) -H27)) e H25)))))))) H24)) (\lambda (H24: (ex4_5 F C C T T (\lambda (f: +x1 (Flat x0) x3)) (drop_drop (Flat f) n0 c3 (CHead x2 (Flat x0) x3) H28 u2) +H29)) e H27)))))))) H26)) (\lambda (H26: (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 (Flat f) +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop (S n0) O c0 (CHead e2 (Flat f0) w))))))) (\lambda (_: +(w: T).(drop (S n0) O c3 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (s (Flat f) (S n0)) O -(CHead c0 (Flat f) u2) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +(CHead c3 (Flat f) u2) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e0 (Flat f0) w)))))) +(Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Flat f) (S n0)) -O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda +O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) w))))))) +(Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -T).(\lambda (H25: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H26: (drop (S -n0) O c0 (CHead x2 (Flat x0) x4))).(\lambda (H27: (subst0 O v x3 -x4)).(\lambda (H28: (csubst0 O v x1 x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) -(\lambda (c: C).(or4 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) c) +T).(\lambda (H27: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H28: (drop (S +n0) O c3 (CHead x2 (Flat x0) x4))).(\lambda (H29: (subst0 O v x3 +x4)).(\lambda (H30: (csubst0 O v x1 x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) +(\lambda (c4: C).(or4 (drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) c4) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C c (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +T).(eq C c4 (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c4 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead +C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c4 (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (s (Flat f) (S n0)) O -(CHead c0 (Flat f) u2) (CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f0: +(CHead c3 (Flat f) u2) (CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda -(_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) +(_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) +(e2: C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s -(Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) w))))))) +(Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex4_5_intro F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) +(w: T).(drop (s (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x0 x1 x2 x3 x4 (refl_equal C (CHead x1 (Flat x0) x3)) (drop_drop (Flat f) n0 -c0 (CHead x2 (Flat x0) x4) H26 u2) H27 H28)) e H25)))))))))) H24)) H23)) i -H20))))))) k (drop_gen_drop k c e t n0 H1) H0)))) c2 H16)) u1 (sym_eq T u1 t -H15))) k0 (sym_eq K k0 k H14))) c1 (sym_eq C c1 c H13))) H12)) H11))) v0 +c3 (CHead x2 (Flat x0) x4) H28 u2) H29 H30)) e H27)))))))))) H26)) H25)) i +H22))))))) k (drop_gen_drop k c e t n0 H1) H19)))) c2 H16)) u1 (sym_eq T u1 t +H15))) k0 (sym_eq K k0 k H14))) c0 (sym_eq C c0 c H13))) H12)) H11))) v0 (sym_eq T v0 v H9))) (S n0) H8)) H5 H6 H7 H2 H3)))))]) in (H2 (refl_equal nat (S n0)) (refl_equal T v) (refl_equal C (CHead c k t)) (refl_equal C c2)))))))))))) c1)))) n). @@ -4802,7 +4850,7 @@ T).(subst0 O v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))))) H4)))))))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 i v0 u1 u2)).(\lambda (c: C).(\lambda (H3: (eq -nat i O)).(let H4 \def (eq_ind nat i (\lambda (n: nat).(subst0 n v0 u1 u2)) +nat i O)).(let H4 \def (eq_ind nat i (\lambda (n0: nat).(subst0 n0 v0 u1 u2)) H2 O H3) in (or4_intro1 (drop O O (CHead c (Flat f) u1) (CHead c (Flat f) u2)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c (Flat f) u2) (CHead e0 (Flat f0) u4)))))) @@ -4901,78 +4949,79 @@ C).(\lambda (u1: T).(\lambda (_: T).(drop O O (CHead c3 (Bind b) u) (CHead e1 e2)))))))) H5))))))))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (c3: C).(\lambda (c4: C).(\lambda (v0: T).(\lambda (H2: (csubst0 i v0 c3 c4)).(\lambda (H3: (((eq nat i O) \to (or4 (drop O O c3 c4) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop O O c3 (CHead e0 (Flat f) u1)))))) (\lambda (_: +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 +(CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop O O c3 (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 (CHead e1 (Flat f) u)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C c4 (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 (Flat f) u2))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop O O c3 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v0 e1 e2))))))))))).(\lambda (u: T).(\lambda (H4: (eq nat i -O)).(let H5 \def (eq_ind nat i (\lambda (n: nat).((eq nat n O) \to (or4 (drop -O O c3 c4) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C c4 (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop O O c3 (CHead e0 -(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 -(CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 -(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop O O c3 (CHead e1 (Flat f) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v0 u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))))))) H3 O -H4) in (let H6 \def (eq_ind nat i (\lambda (n: nat).(csubst0 n v0 c3 c4)) H2 -O H4) in (or4_intro2 (drop O O (CHead c3 (Flat f) u) (CHead c4 (Flat f) u)) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(u2: T).(eq C (CHead c4 (Flat f) u) (CHead e0 (Flat f0) u2)))))) (\lambda -(f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop O O (CHead c3 -(Flat f) u) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 (Flat f0) +u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop O O c3 (CHead e1 (Flat f0) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v0 u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v0 e1 e2))))))))))).(\lambda (u: +T).(\lambda (H4: (eq nat i O)).(let H5 \def (eq_ind nat i (\lambda (n0: +nat).((eq nat n0 O) \to (or4 (drop O O c3 c4) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e0 (Flat +f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop O O c3 (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C -(CHead c4 (Flat f) u) (CHead e2 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u0: T).(drop O O (CHead c3 (Flat f) u) -(CHead e1 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C -(CHead c4 (Flat f) u) (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop O O (CHead c3 -(Flat f) u) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v0 e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C c4 +(CHead e2 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(drop O O c3 (CHead e1 (Flat f0) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 (Flat f0) u2))))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop O O c3 (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 +u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))))))) H3 O H4) in (let H6 \def +(eq_ind nat i (\lambda (n0: nat).(csubst0 n0 v0 c3 c4)) H2 O H4) in +(or4_intro2 (drop O O (CHead c3 (Flat f) u) (CHead c4 (Flat f) u)) (ex3_4 F C +T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C +(CHead c4 (Flat f) u) (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(drop O O (CHead c3 (Flat f) u) +(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C (CHead c4 (Flat f) u) (CHead e2 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(drop O O (CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v0 e1 e2))))) f c3 c4 u (refl_equal C (CHead c4 (Flat f) u)) -(drop_refl (CHead c3 (Flat f) u)) H6))))))))))))) k)) (\lambda (k: K).(K_ind -(\lambda (k0: K).(\forall (i: nat).(\forall (v0: T).(\forall (u1: T).(\forall -(u2: T).((subst0 i v0 u1 u2) \to (\forall (c3: C).(\forall (c4: C).((csubst0 -i v0 c3 c4) \to ((((eq nat i O) \to (or4 (drop O O c3 c4) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop O O c3 (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 (Flat f) u2))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop O O c3 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) +T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead c4 (Flat f) +u) (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (_: T).(drop O O (CHead c3 (Flat f) u) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v0 e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(eq C (CHead c4 (Flat f) u) (CHead e2 +(Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(drop O O (CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 +e2))))) f c3 c4 u (refl_equal C (CHead c4 (Flat f) u)) (drop_refl (CHead c3 +(Flat f) u)) H6))))))))))))) k)) (\lambda (k: K).(K_ind (\lambda (k0: +K).(\forall (i: nat).(\forall (v0: T).(\forall (u1: T).(\forall (u2: +T).((subst0 i v0 u1 u2) \to (\forall (c3: C).(\forall (c4: C).((csubst0 i v0 +c3 c4) \to ((((eq nat i O) \to (or4 (drop O O c3 c4) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 (CHead e0 +(Flat f) u4)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u3: T).(\lambda +(_: T).(drop O O c3 (CHead e0 (Flat f) u3)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c4 +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop O O c3 (CHead e1 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 (CHead e2 (Flat f) u4))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda +(_: T).(drop O O c3 (CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))))))) \to ((eq nat (s k0 i) O) \to (or4 (drop O O (CHead c3 k0 u1) (CHead c4 k0 u2)) (ex3_4 F C T T (\lambda (f: @@ -4995,19 +5044,19 @@ O v0 e1 e2))))))))))))))))))) (\lambda (b: B).(\lambda (i: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (subst0 i v0 u1 u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (_: (csubst0 i v0 c3 c4)).(\lambda (_: (((eq nat i O) \to (or4 (drop O O c3 c4) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop O O c3 (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 +(CHead e0 (Flat f) u4)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u3: +T).(\lambda (_: T).(drop O O c3 (CHead e0 (Flat f) u3)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 (Flat f) u2))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop O O c3 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) +C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 (CHead e2 (Flat f) u4))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda +(_: T).(drop O O c3 (CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2))))))))))).(\lambda (H5: (eq nat (S i) O)).(let H6 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee in nat return (\lambda @@ -5023,283 +5072,199 @@ c4 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop O O (CHead c3 (Bind b) u1) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 -(Bind b) u2) (CHead e2 (Flat f) u4))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c3 (Bind -b) u1) (CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda -(_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda -(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: -T).(csubst0 O v0 e1 e2)))))))) H6))))))))))))) (\lambda (f: F).(\lambda (i: -nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 -i v0 u1 u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (H3: (csubst0 i v0 c3 -c4)).(\lambda (H4: (((eq nat i O) \to (or4 (drop O O c3 c4) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop O O c3 (CHead e0 (Flat f) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) -(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 (CHead e1 (Flat f) u)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O -v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 (Flat f) u2))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop O O c3 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v0 e1 e2))))))))))).(\lambda (H5: (eq nat i O)).(let H6 -\def (eq_ind nat i (\lambda (n: nat).((eq nat n O) \to (or4 (drop O O c3 c4) -(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: -T).(eq C c4 (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: -C).(\lambda (u1: T).(\lambda (_: T).(drop O O c3 (CHead e0 (Flat f) u1)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O -v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 (CHead e1 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda -(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 -(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(drop O O c3 (CHead e1 (Flat f) u1))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v0 u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))))))) H4 O H5) in -(let H7 \def (eq_ind nat i (\lambda (n: nat).(csubst0 n v0 c3 c4)) H3 O H5) -in (let H8 \def (eq_ind nat i (\lambda (n: nat).(subst0 n v0 u1 u2)) H2 O H5) -in (or4_intro3 (drop O O (CHead c3 (Flat f) u1) (CHead c4 (Flat f) u2)) -(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda -(u4: T).(eq C (CHead c4 (Flat f) u2) (CHead e0 (Flat f0) u4)))))) (\lambda -(f0: F).(\lambda (e0: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c3 -(Flat f) u1) (CHead e0 (Flat f0) u3)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C -(CHead c4 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u: T).(drop O O (CHead c3 (Flat f) u1) -(CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C -(CHead c4 (Flat f) u2) (CHead e2 (Flat f0) u4))))))) (\lambda (f0: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda (_: T).(drop O -O (CHead c3 (Flat f) u1) (CHead e1 (Flat f0) u3))))))) (\lambda (_: +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 +(Bind b) u2) (CHead e2 (Flat f) u4))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c3 (Bind +b) u1) (CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 O v0 e1 e2)))))))) H6))))))))))))) (\lambda (f: F).(\lambda (i: +nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 +i v0 u1 u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (H3: (csubst0 i v0 c3 +c4)).(\lambda (H4: (((eq nat i O) \to (or4 (drop O O c3 c4) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 +(CHead e0 (Flat f0) u4)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u3: +T).(\lambda (_: T).(drop O O c3 (CHead e0 (Flat f0) u3)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C c4 (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 (CHead e1 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 (CHead e2 (Flat f0) +u4))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: +T).(\lambda (_: T).(drop O O c3 (CHead e1 (Flat f0) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v0 e1 e2))))))) (ex4_5_intro F C C T T -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u4: T).(eq C (CHead c4 (Flat f) u2) (CHead e2 (Flat f0) u4))))))) (\lambda -(f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda (_: -T).(drop O O (CHead c3 (Flat f) u1) (CHead e1 (Flat f0) u3))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: -T).(subst0 O v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) f c3 c4 u1 u2 -(refl_equal C (CHead c4 (Flat f) u2)) (drop_refl (CHead c3 (Flat f) u1)) H8 -H7)))))))))))))))) k)) y v c1 c2 H1))) H) e (drop_gen_refl c2 e H0)))))))) -(\lambda (n0: nat).(\lambda (IHn: ((\forall (c1: C).(\forall (c2: C).(\forall -(v: T).((csubst0 n0 v c1 c2) \to (\forall (e: C).((drop n0 O c2 e) \to (or4 -(drop n0 O c1 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c1 (CHead e0 -(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 O -c1 (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c1 (CHead e1 (Flat f) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: -C).(\forall (v: T).((csubst0 (S n0) v c c2) \to (\forall (e: C).((drop (S n0) -O c2 e) \to (or4 (drop (S n0) O c e) (ex3_4 F C T T (\lambda (f: F).(\lambda -(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead -e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +(_: T).(\lambda (_: T).(csubst0 O v0 e1 e2))))))))))).(\lambda (H5: (eq nat i +O)).(let H6 \def (eq_ind nat i (\lambda (n0: nat).((eq nat n0 O) \to (or4 +(drop O O c3 c4) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (u4: T).(eq C c4 (CHead e0 (Flat f0) u4)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u3: T).(\lambda (_: T).(drop O O c3 (CHead e0 +(Flat f0) u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda +(u4: T).(subst0 O v0 u3 u4)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop O O +c3 (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C c4 +(CHead e2 (Flat f0) u4))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (_: T).(drop O O c3 (CHead e1 (Flat f0) +u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: +T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 +e2)))))))))) H4 O H5) in (let H7 \def (eq_ind nat i (\lambda (n0: +nat).(csubst0 n0 v0 c3 c4)) H3 O H5) in (let H8 \def (eq_ind nat i (\lambda +(n0: nat).(subst0 n0 v0 u1 u2)) H2 O H5) in (or4_intro3 (drop O O (CHead c3 +(Flat f) u1) (CHead c4 (Flat f) u2)) (ex3_4 F C T T (\lambda (f0: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 (Flat f) u2) (CHead +e0 (Flat f0) u4)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u3: +T).(\lambda (_: T).(drop O O (CHead c3 (Flat f) u1) (CHead e0 (Flat f0) +u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: +T).(subst0 O v0 u3 u4)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead c4 (Flat f) u2) (CHead e2 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop O O (CHead c3 (Flat f) u1) (CHead e1 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 (Flat f) u2) (CHead e2 +(Flat f0) u4))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c3 (Flat f) u1) (CHead +e1 (Flat f0) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))))))))) (\lambda (n1: nat).(\lambda (c2: C).(\lambda (v: -T).(\lambda (H: (csubst0 (S n0) v (CSort n1) c2)).(\lambda (e: C).(\lambda -(_: (drop (S n0) O c2 e)).(csubst0_gen_sort c2 v (S n0) n1 H (or4 (drop (S -n0) O (CSort n1) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda -(_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CSort -n1) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O (CSort n1) (CHead e1 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CSort n1) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))))))))))) (\lambda (c: C).(\lambda (H: -((\forall (c2: C).(\forall (v: T).((csubst0 (S n0) v c c2) \to (\forall (e: -C).((drop (S n0) O c2 e) \to (or4 (drop (S n0) O c e) (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 -(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C -T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O c (CHead e1 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda -(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +O v0 e1 e2))))))) (ex4_5_intro F C C T T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 (Flat f) +u2) (CHead e2 (Flat f0) u4))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c3 (Flat f) u1) +(CHead e1 (Flat f0) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: -C).(\lambda (v: T).(\lambda (H0: (csubst0 (S n0) v (CHead c k t) -c2)).(\lambda (e: C).(\lambda (H1: (drop (S n0) O c2 e)).(or3_ind (ex3_2 T -nat (\lambda (_: T).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (u2: -T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat (S n0) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k -t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat -(\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j))))) -(\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k -u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t -u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c -c3))))) (or4 (drop (S n0) O (CHead c k t) e) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat -f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +O v0 e1 e2)))))) f c3 c4 u1 u2 (refl_equal C (CHead c4 (Flat f) u2)) +(drop_refl (CHead c3 (Flat f) u1)) H8 H7)))))))))))))))) k)) y v c1 c2 H1))) +H) e (drop_gen_refl c2 e H0)))))))) (\lambda (n0: nat).(\lambda (IHn: +((\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 n0 v c1 c2) \to +(\forall (e: C).((drop n0 O c2 e) \to (or4 (drop n0 O c1 e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop n0 O c1 (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c k t) (CHead e1 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c1 (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop n0 O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))))).(\lambda (c1: C).(C_ind +(\lambda (c: C).(\forall (c2: C).(\forall (v: T).((csubst0 (S n0) v c c2) \to +(\forall (e: C).((drop (S n0) O c2 e) \to (or4 (drop (S n0) O c e) (ex3_4 F C +T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O c (CHead e1 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda -(H2: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (S n0) (s k j)))) -(\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: -T).(\lambda (j: nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (u2: T).(\lambda (_: -nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j -v t u2))) (or4 (drop (S n0) O (CHead c k t) e) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat -f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))) (\lambda (n1: +nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (H: (csubst0 (S n0) v (CSort +n1) c2)).(\lambda (e: C).(\lambda (_: (drop (S n0) O c2 e)).(csubst0_gen_sort +c2 v (S n0) n1 H (or4 (drop (S n0) O (CSort n1) e) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CSort n1) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c k t) (CHead e1 -(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead e1 (Flat +f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) +T).(\lambda (_: T).(drop (S n0) O (CSort n1) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda -(x0: T).(\lambda (x1: nat).(\lambda (H3: (eq nat (S n0) (s k x1))).(\lambda -(H4: (eq C c2 (CHead c k x0))).(\lambda (H5: (subst0 x1 v t x0)).(let H6 \def -(eq_ind C c2 (\lambda (c: C).(drop (S n0) O c e)) H1 (CHead c k x0) H4) in -((match k in K return (\lambda (k0: K).((eq nat (S n0) (s k0 x1)) \to ((drop -(r k0 n0) O c e) \to (or4 (drop (S n0) O (CHead c k0 t) e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c k0 t) (CHead e0 (Flat f) u1)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v -u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -k0 t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda -(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda -(f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq -C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c k0 t) (CHead -e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))))))) with [(Bind b) \Rightarrow (\lambda (H7: (eq nat (S n0) -(s (Bind b) x1))).(\lambda (H8: (drop (r (Bind b) n0) O c e)).(let H9 \def -(f_equal nat nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: -nat).nat) with [O \Rightarrow n0 | (S n) \Rightarrow n])) (S n0) (S x1) H7) -in (let H10 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n v t x0)) H5 n0 -H9) in (or4_intro0 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T -(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))))))) +(\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (v: T).((csubst0 (S +n0) v c c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (or4 (drop (S n0) O +c e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) -O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C -C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: +O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda +(v: T).(\lambda (H0: (csubst0 (S n0) v (CHead c k t) c2)).(\lambda (e: +C).(\lambda (H1: (drop (S n0) O c2 e)).(or3_ind (ex3_2 T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (u2: T).(\lambda (_: +nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j +v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))) (or4 (drop (S +n0) O (CHead c k t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c e -H8 t)))))) | (Flat f) \Rightarrow (\lambda (H7: (eq nat (S n0) (s (Flat f) -x1))).(\lambda (H8: (drop (r (Flat f) n0) O c e)).(let H9 \def (f_equal nat -nat (\lambda (e0: nat).e0) (S n0) x1 H7) in (let H10 \def (eq_ind_r nat x1 -(\lambda (n: nat).(subst0 n v t x0)) H5 (S n0) H9) in (or4_intro0 (drop (S -n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead -e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e -(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))) (drop_drop (Flat f) n0 c e H8 t))))))]) H3 (drop_gen_drop k -c e x0 n0 H6)))))))) H2)) (\lambda (H2: (ex3_2 C nat (\lambda (_: C).(\lambda -(j: nat).(eq nat (S n0) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C -c2 (CHead c3 k t)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c -c2))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s -k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) -(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (or4 (drop (S n0) O -(CHead c k t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: C).(\lambda (x1: -nat).(\lambda (H3: (eq nat (S n0) (s k x1))).(\lambda (H4: (eq C c2 (CHead x0 -k t))).(\lambda (H5: (csubst0 x1 v c x0)).(let H6 \def (eq_ind C c2 (\lambda -(c: C).(drop (S n0) O c e)) H1 (CHead x0 k t) H4) in ((match k in K return -(\lambda (k0: K).((eq nat (S n0) (s k0 x1)) \to ((drop (r k0 n0) O x0 e) \to +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H2: (ex3_2 T nat +(\lambda (_: T).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (u2: +T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: +nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: +nat).(eq nat (S n0) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 +(CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (or4 +(drop (S n0) O (CHead c k t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: T).(\lambda +(x1: nat).(\lambda (H3: (eq nat (S n0) (s k x1))).(\lambda (H4: (eq C c2 +(CHead c k x0))).(\lambda (H5: (subst0 x1 v t x0)).(let H6 \def (eq_ind C c2 +(\lambda (c0: C).(drop (S n0) O c0 e)) H1 (CHead c k x0) H4) in (K_ind +(\lambda (k0: K).((eq nat (S n0) (s k0 x1)) \to ((drop (r k0 n0) O c e) \to (or4 (drop (S n0) O (CHead c k0 t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S @@ -5315,139 +5280,154 @@ C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (_: T).(drop (S n0) O (CHead c k0 t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))) with [(Bind -b) \Rightarrow (\lambda (H7: (eq nat (S n0) (s (Bind b) x1))).(\lambda (H8: -(drop (r (Bind b) n0) O x0 e)).(let H9 \def (f_equal nat nat (\lambda (e0: -nat).(match e0 in nat return (\lambda (_: nat).nat) with [O \Rightarrow n0 | -(S n) \Rightarrow n])) (S n0) (S x1) H7) in (let H10 \def (eq_ind_r nat x1 -(\lambda (n: nat).(csubst0 n v c x0)) H5 n0 H9) in (let H11 \def (IHn c x0 v -H10 e H8) in (or4_ind (drop n0 O c e) (ex3_4 F C T T (\lambda (f: F).(\lambda -(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O -c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))) (\lambda (b: +B).(\lambda (H7: (eq nat (S n0) (s (Bind b) x1))).(\lambda (H8: (drop (r +(Bind b) n0) O c e)).(let H9 \def (f_equal nat nat (\lambda (e0: nat).(match +e0 in nat return (\lambda (_: nat).nat) with [O \Rightarrow n0 | (S n1) +\Rightarrow n1])) (S n0) (S x1) H7) in (let H10 \def (eq_ind_r nat x1 +(\lambda (n1: nat).(subst0 n1 v t x0)) H5 n0 H9) in (or4_intro0 (drop (S n0) +O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead +e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (drop_drop (Bind b) n0 c e H8 t))))))) (\lambda (f: +F).(\lambda (H7: (eq nat (S n0) (s (Flat f) x1))).(\lambda (H8: (drop (r +(Flat f) n0) O c e)).(let H9 \def (f_equal nat nat (\lambda (e0: nat).e0) (S +n0) x1 H7) in (let H10 \def (eq_ind_r nat x1 (\lambda (n1: nat).(subst0 n1 v +t x0)) H5 (S n0) H9) in (or4_intro0 (drop (S n0) O (CHead c (Flat f) t) e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e1 +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop +(Flat f) n0 c e H8 t))))))) k H3 (drop_gen_drop k c e x0 n0 H6)))))))) H2)) +(\lambda (H2: (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) +(s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) +(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))))).(ex3_2_ind C nat +(\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3))) (or4 (drop (S n0) O (CHead c k t) e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c k t) (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c k +t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 -(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) +e2)))))))) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H3: (eq nat (S n0) +(s k x1))).(\lambda (H4: (eq C c2 (CHead x0 k t))).(\lambda (H5: (csubst0 x1 +v c x0)).(let H6 \def (eq_ind C c2 (\lambda (c0: C).(drop (S n0) O c0 e)) H1 +(CHead x0 k t) H4) in (K_ind (\lambda (k0: K).((eq nat (S n0) (s k0 x1)) \to +((drop (r k0 n0) O x0 e) \to (or4 (drop (S n0) O (CHead c k0 t) e) (ex3_4 F C +T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c k0 t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v -u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))) (\lambda (H12: (drop n0 O c e)).(or4_intro0 -(drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat -f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 -u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c e H12 t))) (\lambda -(H12: (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e0 -(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda -(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O -c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2))))) (or4 (drop (S n0) O (CHead c (Bind -b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat -f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: -T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) x5))).(\lambda (H14: (drop n0 O -c (CHead x3 (Flat x2) x4))).(\lambda (H15: (subst0 O v x4 x5)).(eq_ind_r C -(CHead x3 (Flat x2) x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Bind -b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat -f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro1 (drop (S n0) O (CHead c (Bind b) t) (CHead x3 (Flat -x2) x5)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +k0 t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq +C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c k0 t) (CHead +e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))))) (\lambda (b: B).(\lambda (H7: (eq nat (S n0) (s (Bind b) +x1))).(\lambda (H8: (drop (r (Bind b) n0) O x0 e)).(let H9 \def (f_equal nat +nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).nat) with [O +\Rightarrow n0 | (S n1) \Rightarrow n1])) (S n0) (S x1) H7) in (let H10 \def +(eq_ind_r nat x1 (\lambda (n1: nat).(csubst0 n1 v c x0)) H5 n0 H9) in (let +H11 \def (IHn c x0 v H10 e H8) in (or4_ind (drop n0 O c e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop n0 O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 (Flat f) u2))))))) (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C -T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C -(CHead x3 (Flat x2) x5) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop n0 O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2))))) x2 x3 x4 x5 (refl_equal C (CHead -x3 (Flat x2) x5)) (drop_drop (Bind b) n0 c (CHead x3 (Flat x2) x4) H14 t) -H15)) e H13)))))))) H12)) (\lambda (H12: (ex3_4 F C C T (\lambda (f: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C -C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(H12: (drop n0 O c e)).(or4_intro0 (drop (S n0) O (CHead c (Bind b) t) e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop +(Bind b) n0 c e H12 t))) (\lambda (H12: (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop n0 O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C +T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop n0 O c (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: @@ -5465,10 +5445,10 @@ C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda -(x4: C).(\lambda (x5: T).(\lambda (H13: (eq C e (CHead x4 (Flat x2) -x5))).(\lambda (H14: (drop n0 O c (CHead x3 (Flat x2) x5))).(\lambda (H15: -(csubst0 O v x3 x4)).(eq_ind_r C (CHead x4 (Flat x2) x5) (\lambda (c0: -C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T (\lambda (f: +(x4: T).(\lambda (x5: T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) +x5))).(\lambda (H14: (drop n0 O c (CHead x3 (Flat x2) x4))).(\lambda (H15: +(subst0 O v x4 x5)).(eq_ind_r C (CHead x3 (Flat x2) x5) (\lambda (c0: C).(or4 +(drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda @@ -5484,24 +5464,93 @@ C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c (Bind -b) t) (CHead x4 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e0 +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead c (Bind +b) t) (CHead x3 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 (Flat f) u)))))) +C).(\lambda (u: T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 (Flat f) +T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex3_4_intro F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))) +x2 x3 x4 x5 (refl_equal C (CHead x3 (Flat x2) x5)) (drop_drop (Bind b) n0 c +(CHead x3 (Flat x2) x4) H14 t) H15)) e H13)))))))) H12)) (\lambda (H12: +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: T).(\lambda (H13: (eq +C e (CHead x4 (Flat x2) x5))).(\lambda (H14: (drop n0 O c (CHead x3 (Flat x2) +x5))).(\lambda (H15: (csubst0 O v x3 x4)).(eq_ind_r C (CHead x4 (Flat x2) x5) +(\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O +(CHead c (Bind b) t) (CHead x4 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat +x2) x5) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat +f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 +(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat +f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) @@ -5584,11 +5633,11 @@ f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x2 x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x2) x6)) (drop_drop (Bind b) n0 -c (CHead x3 (Flat x2) x5) H14 t) H15 H16)) e H13)))))))))) H12)) H11)))))) | -(Flat f) \Rightarrow (\lambda (H7: (eq nat (S n0) (s (Flat f) x1))).(\lambda -(H8: (drop (r (Flat f) n0) O x0 e)).(let H9 \def (f_equal nat nat (\lambda -(e0: nat).e0) (S n0) x1 H7) in (let H10 \def (eq_ind_r nat x1 (\lambda (n: -nat).(csubst0 n v c x0)) H5 (S n0) H9) in (let H11 \def (H x0 v H10 e H8) in +c (CHead x3 (Flat x2) x5) H14 t) H15 H16)) e H13)))))))))) H12)) H11))))))) +(\lambda (f: F).(\lambda (H7: (eq nat (S n0) (s (Flat f) x1))).(\lambda (H8: +(drop (r (Flat f) n0) O x0 e)).(let H9 \def (f_equal nat nat (\lambda (e0: +nat).e0) (S n0) x1 H7) in (let H10 \def (eq_ind_r nat x1 (\lambda (n1: +nat).(csubst0 n1 v c x0)) H5 (S n0) H9) in (let H11 \def (H x0 v H10 e H8) in (or4_ind (drop (S n0) O c e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S @@ -5638,10 +5687,10 @@ n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Flat f) n0 c e -H12 t))) (\lambda (H12: (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +H12 t))) (\lambda (H12: (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O c (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: @@ -5708,10 +5757,10 @@ T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))) x2 x3 x4 x5 (refl_equal C (CHead x3 (Flat x2) x5)) (drop_drop (Flat f) n0 c (CHead x3 (Flat x2) x4) H14 t) H15)) e H13)))))))) -H12)) (\lambda (H12: (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +H12)) (\lambda (H12: (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O c (CHead -e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: @@ -5778,58 +5827,58 @@ n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead x4 (Flat x2) x5)) (drop_drop (Flat f) n0 c (CHead x3 (Flat x2) x5) H14 t) H15)) e H13)))))))) H12)) (\lambda (H12: -(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda -(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat -f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) -O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) +n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f0) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(or4 (drop (S n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda +(x4: C).(\lambda (x5: T).(\lambda (x6: T).(\lambda (H13: (eq C e (CHead x4 +(Flat x2) x6))).(\lambda (H14: (drop (S n0) O c (CHead x3 (Flat x2) +x5))).(\lambda (H15: (subst0 O v x5 x6)).(\lambda (H16: (csubst0 O v x3 +x4)).(eq_ind_r C (CHead x4 (Flat x2) x6) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead c (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: +T).(eq C c0 (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda -(x5: T).(\lambda (x6: T).(\lambda (H13: (eq C e (CHead x4 (Flat x2) -x6))).(\lambda (H14: (drop (S n0) O c (CHead x3 (Flat x2) x5))).(\lambda -(H15: (subst0 O v x5 x6)).(\lambda (H16: (csubst0 O v x3 x4)).(eq_ind_r C -(CHead x4 (Flat x2) x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Flat -f) t) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f0) u2)))))) (\lambda (f0: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 -(CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat -f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro3 (drop (S n0) O (CHead c (Flat f) t) (CHead x4 (Flat -x2) x6)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +O v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead c (Flat f) t) (CHead x4 +(Flat x2) x6)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda @@ -5855,12 +5904,12 @@ C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x2 x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x2) x6)) (drop_drop (Flat f) n0 c (CHead x3 (Flat x2) x5) H14 t) H15 H16)) e -H13)))))))))) H12)) H11))))))]) H3 (drop_gen_drop k x0 e t n0 H6)))))))) H2)) -(\lambda (H2: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat (S n0) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda -(_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: -C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c2: -C).(\lambda (j: nat).(csubst0 j v c c2)))))).(ex4_3_ind T C nat (\lambda (_: +H13)))))))))) H12)) H11))))))) k H3 (drop_gen_drop k x0 e t n0 H6)))))))) +H2)) (\lambda (H2: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda +(j: nat).(eq nat (S n0) (s k j))))) (\lambda (u2: T).(\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda +(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: @@ -5873,168 +5922,98 @@ k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: T).(\lambda (x1: C).(\lambda -(x2: nat).(\lambda (H3: (eq nat (S n0) (s k x2))).(\lambda (H4: (eq C c2 -(CHead x1 k x0))).(\lambda (H5: (subst0 x2 v t x0)).(\lambda (H6: (csubst0 x2 -v c x1)).(let H7 \def (eq_ind C c2 (\lambda (c: C).(drop (S n0) O c e)) H1 -(CHead x1 k x0) H4) in ((match k in K return (\lambda (k0: K).((eq nat (S n0) -(s k0 x2)) \to ((drop (r k0 n0) O x1 e) \to (or4 (drop (S n0) O (CHead c k0 -t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -k0 t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O (CHead c k0 t) (CHead e1 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c k0 t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 -u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))) with [(Bind b) \Rightarrow -(\lambda (H8: (eq nat (S n0) (s (Bind b) x2))).(\lambda (H9: (drop (r (Bind -b) n0) O x1 e)).(let H10 \def (f_equal nat nat (\lambda (e0: nat).(match e0 -in nat return (\lambda (_: nat).nat) with [O \Rightarrow n0 | (S n) -\Rightarrow n])) (S n0) (S x2) H8) in (let H11 \def (eq_ind_r nat x2 (\lambda -(n: nat).(csubst0 n v c x1)) H6 n0 H10) in (let H12 \def (eq_ind_r nat x2 -(\lambda (n: nat).(subst0 n v t x0)) H5 n0 H10) in (let H13 \def (IHn c x1 v -H11 e H9) in (or4_ind (drop n0 O c e) (ex3_4 F C T T (\lambda (f: F).(\lambda -(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O -c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e1 -(Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda -(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda -(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 -(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v -u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))) (\lambda (H14: (drop n0 O c e)).(or4_intro0 -(drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat -f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 -u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: T).(\lambda (x1: C).(\lambda +(x2: nat).(\lambda (H3: (eq nat (S n0) (s k x2))).(\lambda (H4: (eq C c2 +(CHead x1 k x0))).(\lambda (H5: (subst0 x2 v t x0)).(\lambda (H6: (csubst0 x2 +v c x1)).(let H7 \def (eq_ind C c2 (\lambda (c0: C).(drop (S n0) O c0 e)) H1 +(CHead x1 k x0) H4) in (K_ind (\lambda (k0: K).((eq nat (S n0) (s k0 x2)) \to +((drop (r k0 n0) O x1 e) \to (or4 (drop (S n0) O (CHead c k0 t) e) (ex3_4 F C +T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c k0 t) (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c e H14 t))) (\lambda -(H14: (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e0 -(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda -(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O -c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2))))) (or4 (drop (S n0) O (CHead c (Bind -b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat -f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: T).(\lambda (x6: -T).(\lambda (H15: (eq C e (CHead x4 (Flat x3) x6))).(\lambda (H16: (drop n0 O -c (CHead x4 (Flat x3) x5))).(\lambda (H17: (subst0 O v x5 x6)).(eq_ind_r C -(CHead x4 (Flat x3) x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Bind -b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f) u2)))))) (\lambda (f: -F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat -f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 -e2))))))))) (or4_intro1 (drop (S n0) O (CHead c (Bind b) t) (CHead x4 (Flat -x3) x6)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 (Flat f) u2)))))) -(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +k0 t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq +C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c k0 t) (CHead +e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))))) (\lambda (b: B).(\lambda (H8: (eq nat (S n0) (s (Bind b) +x2))).(\lambda (H9: (drop (r (Bind b) n0) O x1 e)).(let H10 \def (f_equal nat +nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).nat) with [O +\Rightarrow n0 | (S n1) \Rightarrow n1])) (S n0) (S x2) H8) in (let H11 \def +(eq_ind_r nat x2 (\lambda (n1: nat).(csubst0 n1 v c x1)) H6 n0 H10) in (let +H12 \def (eq_ind_r nat x2 (\lambda (n1: nat).(subst0 n1 v t x0)) H5 n0 H10) +in (let H13 \def (IHn c x1 v H11 e H9) in (or4_ind (drop n0 O c e) (ex3_4 F C +T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop n0 O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C (CHead x4 (Flat x3) x6) (CHead e2 (Flat f) u)))))) (\lambda (f: -F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c -(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T -(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e2 (Flat f) u2))))))) (\lambda -(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: -T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C -T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C -(CHead x4 (Flat x3) x6) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop n0 O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2))))) x3 x4 x5 x6 (refl_equal C (CHead -x4 (Flat x3) x6)) (drop_drop (Bind b) n0 c (CHead x4 (Flat x3) x5) H16 t) -H17)) e H15)))))))) H14)) (\lambda (H14: (ex3_4 F C C T (\lambda (f: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C -C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e -(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(H14: (drop n0 O c e)).(or4_intro0 (drop (S n0) O (CHead c (Bind b) t) e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop +(Bind b) n0 c e H14 t))) (\lambda (H14: (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop n0 O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C +T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop n0 O c (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: @@ -6052,10 +6031,10 @@ C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda -(x5: C).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x5 (Flat x3) -x6))).(\lambda (H16: (drop n0 O c (CHead x4 (Flat x3) x6))).(\lambda (H17: -(csubst0 O v x4 x5)).(eq_ind_r C (CHead x5 (Flat x3) x6) (\lambda (c0: -C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T (\lambda (f: +(x5: T).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x4 (Flat x3) +x6))).(\lambda (H16: (drop n0 O c (CHead x4 (Flat x3) x5))).(\lambda (H17: +(subst0 O v x5 x6)).(eq_ind_r C (CHead x4 (Flat x3) x6) (\lambda (c0: C).(or4 +(drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda @@ -6071,24 +6050,93 @@ C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c (Bind -b) t) (CHead x5 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x6) (CHead e0 +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead c (Bind +b) t) (CHead x4 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 (Flat f) u)))))) +C).(\lambda (u: T).(eq C (CHead x4 (Flat x3) x6) (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 (Flat f) +T).(\lambda (u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex3_4_intro F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))) +x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x3) x6)) (drop_drop (Bind b) n0 c +(CHead x4 (Flat x3) x5) H16 t) H17)) e H15)))))))) H14)) (\lambda (H14: +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 O c (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (H15: (eq +C e (CHead x5 (Flat x3) x6))).(\lambda (H16: (drop n0 O c (CHead x4 (Flat x3) +x6))).(\lambda (H17: (csubst0 O v x4 x5)).(eq_ind_r C (CHead x5 (Flat x3) x6) +(\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O +(CHead c (Bind b) t) (CHead x5 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat +x3) x6) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat +f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 +(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat +f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) @@ -6171,13 +6219,13 @@ f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x3 x4 x5 x6 x7 (refl_equal C (CHead x5 (Flat x3) x7)) (drop_drop (Bind b) n0 -c (CHead x4 (Flat x3) x6) H16 t) H17 H18)) e H15)))))))))) H14)) H13))))))) | -(Flat f) \Rightarrow (\lambda (H8: (eq nat (S n0) (s (Flat f) x2))).(\lambda -(H9: (drop (r (Flat f) n0) O x1 e)).(let H10 \def (f_equal nat nat (\lambda -(e0: nat).e0) (S n0) x2 H8) in (let H11 \def (eq_ind_r nat x2 (\lambda (n: -nat).(csubst0 n v c x1)) H6 (S n0) H10) in (let H12 \def (eq_ind_r nat x2 -(\lambda (n: nat).(subst0 n v t x0)) H5 (S n0) H10) in (let H13 \def (H x1 v -H11 e H9) in (or4_ind (drop (S n0) O c e) (ex3_4 F C T T (\lambda (f0: +c (CHead x4 (Flat x3) x6) H16 t) H17 H18)) e H15)))))))))) H14)) H13)))))))) +(\lambda (f: F).(\lambda (H8: (eq nat (S n0) (s (Flat f) x2))).(\lambda (H9: +(drop (r (Flat f) n0) O x1 e)).(let H10 \def (f_equal nat nat (\lambda (e0: +nat).e0) (S n0) x2 H8) in (let H11 \def (eq_ind_r nat x2 (\lambda (n1: +nat).(csubst0 n1 v c x1)) H6 (S n0) H10) in (let H12 \def (eq_ind_r nat x2 +(\lambda (n1: nat).(subst0 n1 v t x0)) H5 (S n0) H10) in (let H13 \def (H x1 +v H11 e H9) in (or4_ind (drop (S n0) O c e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: @@ -6226,10 +6274,10 @@ C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop -(Flat f) n0 c e H14 t))) (\lambda (H14: (ex3_4 F C T T (\lambda (f: +(Flat f) n0 c e H14 t))) (\lambda (H14: (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat -f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda @@ -6296,10 +6344,10 @@ C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))) x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x3) x6)) (drop_drop (Flat f) n0 c (CHead x4 (Flat x3) x5) H16 t) -H17)) e H15)))))))) H14)) (\lambda (H14: (ex3_4 F C C T (\lambda (f: +H17)) e H15)))))))) H14)) (\lambda (H14: (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat -f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: -T).(drop (S n0) O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O c (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: @@ -6366,83 +6414,83 @@ C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) x3 x4 x5 x6 (refl_equal C (CHead x5 (Flat x3) x6)) (drop_drop (Flat f) n0 c (CHead x4 (Flat x3) x6) H16 t) H17)) e H15)))))))) H14)) -(\lambda (H14: (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) -(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(drop (S n0) O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda -(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 -u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda -(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq -C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f0) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(or4 (drop (S n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: -F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +(\lambda (H14: (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) +u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C +C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) O (CHead c (Flat f) t) e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (x7: +T).(\lambda (H15: (eq C e (CHead x5 (Flat x3) x7))).(\lambda (H16: (drop (S +n0) O c (CHead x4 (Flat x3) x6))).(\lambda (H17: (subst0 O v x6 x7)).(\lambda +(H18: (csubst0 O v x4 x5)).(eq_ind_r C (CHead x5 (Flat x3) x7) (\lambda (c0: +C).(or4 (drop (S n0) O (CHead c (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: +C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: +(u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda -(x5: C).(\lambda (x6: T).(\lambda (x7: T).(\lambda (H15: (eq C e (CHead x5 -(Flat x3) x7))).(\lambda (H16: (drop (S n0) O c (CHead x4 (Flat x3) -x6))).(\lambda (H17: (subst0 O v x6 x7)).(\lambda (H18: (csubst0 O v x4 -x5)).(eq_ind_r C (CHead x5 (Flat x3) x7) (\lambda (c0: C).(or4 (drop (S n0) O -(CHead c (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: -C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f0) u2)))))) -(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S -n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: -F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) -(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(eq C c0 (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead -e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: -F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 -(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) -(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead c (Flat f) t) (CHead x5 -(Flat x3) x7)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: -T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e0 (Flat f0) -u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda -(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 -u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 (Flat f0) u)))))) -(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S -n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: -F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) -(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 (Flat f0) -u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) -u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) -(ex4_5_intro F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead c (Flat +f) t) (CHead x5 (Flat x3) x7)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e0 +(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -O v e1 e2)))))) x3 x4 x5 x6 x7 (refl_equal C (CHead x5 (Flat x3) x7)) -(drop_drop (Flat f) n0 c (CHead x4 (Flat x3) x6) H16 t) H17 H18)) e -H15)))))))))) H14)) H13)))))))]) H3 (drop_gen_drop k x1 e x0 n0 H7)))))))))) +O v e1 e2))))))) (ex4_5_intro F C C T T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat +x3) x7) (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))) x3 x4 x5 x6 x7 (refl_equal C (CHead x5 (Flat +x3) x7)) (drop_drop (Flat f) n0 c (CHead x4 (Flat x3) x6) H16 t) H17 H18)) e +H15)))))))))) H14)) H13)))))))) k H3 (drop_gen_drop k x1 e x0 n0 H7)))))))))) H2)) (csubst0_gen_head k c c2 t v (S n0) H0))))))))))) c1)))) n). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/fwd.ma index ba0cadc7a..0866400a0 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/fwd.ma @@ -123,10 +123,10 @@ c2)))))))))) (\lambda (H6: (eq C (CHead c k0 u0) (CHead c1 k u1))).(let H7 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c k0 u0) (CHead c1 k u1) H6) in ((let H8 \def (f_equal C K (\lambda (e: C).(match -e in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k -_) \Rightarrow k])) (CHead c k0 u0) (CHead c1 k u1) H6) in ((let H9 \def +e in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k1 +_) \Rightarrow k1])) (CHead c k0 u0) (CHead c1 k u1) H6) in ((let H9 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with -[(CSort _) \Rightarrow c | (CHead c _ _) \Rightarrow c])) (CHead c k0 u0) +[(CSort _) \Rightarrow c | (CHead c0 _ _) \Rightarrow c0])) (CHead c k0 u0) (CHead c1 k u1) H6) in (eq_ind C c1 (\lambda (c0: C).((eq K k0 k) \to ((eq T u0 u1) \to ((eq C (CHead c0 k0 u2) x) \to ((subst0 i0 v u0 u2) \to (or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) @@ -172,8 +172,8 @@ nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j))))) (\lambda (u3: T).(\lambda (c2: C).(\lambda (_: nat).(eq C c0 (CHead c2 k u3))))) (\lambda (u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v u1 u3)))) (\lambda (_: T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c1 -c2)))))))) (\lambda (H13: (subst0 i0 v u1 u2)).(let H \def (eq_ind K k0 -(\lambda (k: K).(eq nat (s k i0) i)) H1 k H10) in (or3_intro0 (ex3_2 T nat +c2)))))))) (\lambda (H13: (subst0 i0 v u1 u2)).(let H14 \def (eq_ind K k0 +(\lambda (k1: K).(eq nat (s k1 i0) i)) H1 k H10) in (or3_intro0 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (u3: T).(\lambda (_: nat).(eq C (CHead c1 k u2) (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: nat).(subst0 j v u1 u3)))) (ex3_2 C nat (\lambda (_: @@ -219,8 +219,8 @@ c3)))))))))) (\lambda (H6: (eq C (CHead c0 k0 u) (CHead c1 k u1))).(let H7 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u) (CHead c1 k u1) H6) in ((let H8 \def (f_equal C K (\lambda (e: C).(match e -in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) -\Rightarrow k])) (CHead c0 k0 u) (CHead c1 k u1) H6) in ((let H9 \def +in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k1 +_) \Rightarrow k1])) (CHead c0 k0 u) (CHead c1 k u1) H6) in ((let H9 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 u) (CHead c1 k u1) H6) in (eq_ind C c1 (\lambda (c: C).((eq K k0 k) \to ((eq T u @@ -268,8 +268,8 @@ nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v u1 u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c1 -c3)))))))) (\lambda (H13: (csubst0 i0 v c1 c2)).(let H \def (eq_ind K k0 -(\lambda (k: K).(eq nat (s k i0) i)) H1 k H10) in (or3_intro1 (ex3_2 T nat +c3)))))))) (\lambda (H13: (csubst0 i0 v c1 c2)).(let H14 \def (eq_ind K k0 +(\lambda (k1: K).(eq nat (s k1 i0) i)) H1 k H10) in (or3_intro1 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C (CHead c2 k u1) (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: @@ -316,8 +316,8 @@ c3))))))))))) (\lambda (H7: (eq C (CHead c0 k0 u0) (CHead c1 k u1))).(let H8 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u0) (CHead c1 k u1) H7) in ((let H9 \def (f_equal C K (\lambda (e: C).(match -e in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k -_) \Rightarrow k])) (CHead c0 k0 u0) (CHead c1 k u1) H7) in ((let H10 \def +e in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k1 +_) \Rightarrow k1])) (CHead c0 k0 u0) (CHead c1 k u1) H7) in ((let H10 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 u0) (CHead c1 k u1) H7) in (eq_ind C c1 (\lambda (c: C).((eq K k0 k) \to ((eq T @@ -367,8 +367,8 @@ C).(\lambda (j: nat).(eq nat (s k i0) (s k j))))) (\lambda (u3: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c (CHead c3 k u3))))) (\lambda (u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v u1 u3)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c1 c3))))))))) (\lambda -(H14: (subst0 i0 v u1 u2)).(\lambda (H15: (csubst0 i0 v c1 c2)).(let H \def -(eq_ind K k0 (\lambda (k: K).(eq nat (s k i0) i)) H2 k H11) in (or3_intro2 +(H14: (subst0 i0 v u1 u2)).(\lambda (H15: (csubst0 i0 v c1 c2)).(let H16 \def +(eq_ind K k0 (\lambda (k1: K).(eq nat (s k1 i0) i)) H2 k H11) in (or3_intro2 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (u3: T).(\lambda (_: nat).(eq C (CHead c2 k u2) (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: nat).(subst0 j v u1 u3)))) (ex3_2 C nat diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/getl.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/getl.ma index ed3f9b4c7..745f1ba27 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/getl.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/getl.ma @@ -34,9 +34,9 @@ c1 e n H1) in (ex2_ind C (\lambda (e0: C).(drop n O c1 e0)) (\lambda (e0: C).(clear e0 e)) (getl n c2 e) (\lambda (x: C).(\lambda (H3: (drop n O c1 x)).(\lambda (H4: (clear x e)).(lt_eq_gt_e i n (getl n c2 e) (\lambda (H5: (lt i n)).(getl_intro n c2 e x (csubst0_drop_gt n i H5 c1 c2 v H0 x H3) H4)) -(\lambda (H5: (eq nat i n)).(let H6 \def (eq_ind_r nat n (\lambda (n: -nat).(drop n O c1 x)) H3 i H5) in (let H7 \def (eq_ind_r nat n (\lambda (n: -nat).(le i n)) H i H5) in (eq_ind nat i (\lambda (n0: nat).(getl n0 c2 e)) +(\lambda (H5: (eq nat i n)).(let H6 \def (eq_ind_r nat n (\lambda (n0: +nat).(drop n0 O c1 x)) H3 i H5) in (let H7 \def (eq_ind_r nat n (\lambda (n0: +nat).(le i n0)) H i H5) in (eq_ind nat i (\lambda (n0: nat).(getl n0 c2 e)) (let H8 \def (csubst0_drop_eq i c1 c2 v H0 x H6) in (or4_ind (drop i O c2 x) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C x (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: @@ -221,70 +221,9 @@ T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq C x (CHead x1 x0 x2))).(\lambda (H8: (drop n O c2 (CHead x1 x0 x3))).(\lambda (H9: (subst0 (minus i (s x0 n)) v x2 x3)).(let H10 \def (eq_ind C x (\lambda -(c: C).(clear c e)) H4 (CHead x1 x0 x2) H7) in ((match x0 in K return -(\lambda (k: K).((drop n O c2 (CHead x1 k x3)) \to ((subst0 (minus i (s k n)) -v x2 x3) \to ((clear (CHead x1 k x2) e) \to (or4 (getl n c2 e) (ex3_4 B C T T -(\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 -(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))))))))) with [(Bind b) \Rightarrow (\lambda (H11: (drop n O c2 -(CHead x1 (Bind b) x3))).(\lambda (H12: (subst0 (minus i (s (Bind b) n)) v x2 -x3)).(\lambda (H13: (clear (CHead x1 (Bind b) x2) e)).(eq_ind_r C (CHead x1 -(Bind b) x2) (\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b0: -B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind -b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 -B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C c (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b0) u))))))) -(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro1 -(getl n c2 (CHead x1 (Bind b) x2)) (ex3_4 B C T T (\lambda (b0: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x2) (CHead -e0 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead x1 (Bind b) x2) (CHead e1 (Bind b0) u)))))) -(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 -(CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T -(\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C (CHead x1 (Bind b) x2) (CHead e1 (Bind b0) u))))))) (\lambda -(b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (ex3_4_intro B C T -T (\lambda (b0: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C -(CHead x1 (Bind b) x2) (CHead e0 (Bind b0) u)))))) (\lambda (b0: B).(\lambda -(e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b0) -w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w))))) b x1 x2 x3 (refl_equal C (CHead x1 -(Bind b) x2)) (getl_intro n c2 (CHead x1 (Bind b) x3) (CHead x1 (Bind b) x3) -H11 (clear_bind b x1 x3)) H12)) e (clear_gen_bind b x1 e x2 H13))))) | (Flat -f) \Rightarrow (\lambda (H11: (drop n O c2 (CHead x1 (Flat f) x3))).(\lambda -(_: (subst0 (minus i (s (Flat f) n)) v x2 x3)).(\lambda (H13: (clear (CHead -x1 (Flat f) x2) e)).(or4_intro0 (getl n c2 e) (ex3_4 B C T T (\lambda (b: +(c: C).(clear c e)) H4 (CHead x1 x0 x2) H7) in (K_ind (\lambda (k: K).((drop +n O c2 (CHead x1 k x3)) \to ((subst0 (minus i (s k n)) v x2 x3) \to ((clear +(CHead x1 k x2) e) \to (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: @@ -299,9 +238,70 @@ C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (getl_intro n c2 e -(CHead x1 (Flat f) x3) H11 (clear_flat x1 e (clear_gen_flat f x1 e x2 H13) f -x3))))))]) H8 H9 H10))))))))) H6)) (\lambda (H6: (ex3_4 K C C T (\lambda (k: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))))))) (\lambda (b: +B).(\lambda (H11: (drop n O c2 (CHead x1 (Bind b) x3))).(\lambda (H12: +(subst0 (minus i (s (Bind b) n)) v x2 x3)).(\lambda (H13: (clear (CHead x1 +(Bind b) x2) e)).(eq_ind_r C (CHead x1 (Bind b) x2) (\lambda (c: C).(or4 +(getl n c2 c) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c (CHead e0 (Bind b0) u)))))) (\lambda (b0: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b0) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind +b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b0) u))))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n +c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro1 (getl n c2 +(CHead x1 (Bind b) x2)) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x2) (CHead e0 +(Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C (CHead x1 (Bind b) x2) (CHead e1 (Bind b0) u)))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x1 (Bind b) x2) (CHead e1 (Bind b0) u))))))) (\lambda (b0: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b0) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2))))))) (ex3_4_intro B C T T (\lambda (b0: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x2) (CHead +e0 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w))))) b x1 x2 x3 (refl_equal C (CHead x1 (Bind b) x2)) (getl_intro n c2 +(CHead x1 (Bind b) x3) (CHead x1 (Bind b) x3) H11 (clear_bind b x1 x3)) H12)) +e (clear_gen_bind b x1 e x2 H13)))))) (\lambda (f: F).(\lambda (H11: (drop n +O c2 (CHead x1 (Flat f) x3))).(\lambda (_: (subst0 (minus i (s (Flat f) n)) v +x2 x3)).(\lambda (H13: (clear (CHead x1 (Flat f) x2) e)).(or4_intro0 (getl n +c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n +c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (getl_intro n c2 e (CHead x1 +(Flat f) x3) H11 (clear_flat x1 e (clear_gen_flat f x1 e x2 H13) f x3))))))) +x0 H8 H9 H10))))))))) H6)) (\lambda (H6: (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C x (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda @@ -329,9 +329,88 @@ T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H7: (eq C x (CHead x1 x0 x3))).(\lambda (H8: (drop n O c2 (CHead x2 x0 x3))).(\lambda (H9: (csubst0 (minus i (s x0 n)) v x1 x2)).(let H10 \def (eq_ind C x (\lambda -(c: C).(clear c e)) H4 (CHead x1 x0 x3) H7) in ((match x0 in K return -(\lambda (k: K).((drop n O c2 (CHead x2 k x3)) \to ((csubst0 (minus i (s k -n)) v x1 x2) \to ((clear (CHead x1 k x3) e) \to (or4 (getl n c2 e) (ex3_4 B C +(c: C).(clear c e)) H4 (CHead x1 x0 x3) H7) in (K_ind (\lambda (k: K).((drop +n O c2 (CHead x2 k x3)) \to ((csubst0 (minus i (s k n)) v x1 x2) \to ((clear +(CHead x1 k x3) e) \to (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind +b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C e (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))))))) (\lambda (b: +B).(\lambda (H11: (drop n O c2 (CHead x2 (Bind b) x3))).(\lambda (H12: +(csubst0 (minus i (s (Bind b) n)) v x1 x2)).(\lambda (H13: (clear (CHead x1 +(Bind b) x3) e)).(eq_ind_r C (CHead x1 (Bind b) x3) (\lambda (c: C).(or4 +(getl n c2 c) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c (CHead e0 (Bind b0) u)))))) (\lambda (b0: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b0) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind +b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b0) u))))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n +c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro2 (getl n c2 +(CHead x1 (Bind b) x3)) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x3) (CHead e0 +(Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u)))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u))))))) (\lambda (b0: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b0) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2))))))) (ex3_4_intro B C C T (\lambda (b0: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Bind b) x3) (CHead +e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))) b x1 x2 x3 (refl_equal C (CHead x1 (Bind b) x3)) (getl_intro n +c2 (CHead x2 (Bind b) x3) (CHead x2 (Bind b) x3) H11 (clear_bind b x2 x3)) +H12)) e (clear_gen_bind b x1 e x3 H13)))))) (\lambda (f: F).(\lambda (H11: +(drop n O c2 (CHead x2 (Flat f) x3))).(\lambda (H12: (csubst0 (minus i (s +(Flat f) n)) v x1 x2)).(\lambda (H13: (clear (CHead x1 (Flat f) x3) e)).(let +H14 \def (eq_ind nat (minus i n) (\lambda (n0: nat).(csubst0 n0 v x1 x2)) H12 +(S (minus i (S n))) (minus_x_Sy i n H)) in (let H15 \def (csubst0_clear_S x1 +x2 v (minus i (S n)) H14 e (clear_gen_flat f x1 e x3 H13)) in (or4_ind (clear +x2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e0 +(Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear x2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +x2 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: @@ -347,114 +426,9 @@ C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))))))))) with [(Bind b) \Rightarrow (\lambda (H11: (drop n O c2 -(CHead x2 (Bind b) x3))).(\lambda (H12: (csubst0 (minus i (s (Bind b) n)) v -x1 x2)).(\lambda (H13: (clear (CHead x1 (Bind b) x3) e)).(eq_ind_r C (CHead -x1 (Bind b) x3) (\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda -(b0: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 -(Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 -B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C c (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b0) u))))))) -(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(w: T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro2 -(getl n c2 (CHead x1 (Bind b) x3)) (ex3_4 B C T T (\lambda (b0: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x3) (CHead -e0 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: -T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(eq C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u)))))) -(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 -(CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T -(\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda -(_: T).(eq C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u))))))) (\lambda -(b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: -T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v -u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (ex3_4_intro B C C -T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C -(CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b0) -u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus i (S n)) v e1 e2))))) b x1 x2 x3 (refl_equal C (CHead x1 -(Bind b) x3)) (getl_intro n c2 (CHead x2 (Bind b) x3) (CHead x2 (Bind b) x3) -H11 (clear_bind b x2 x3)) H12)) e (clear_gen_bind b x1 e x3 H13))))) | (Flat -f) \Rightarrow (\lambda (H11: (drop n O c2 (CHead x2 (Flat f) x3))).(\lambda -(H12: (csubst0 (minus i (s (Flat f) n)) v x1 x2)).(\lambda (H13: (clear -(CHead x1 (Flat f) x3) e)).(let H14 \def (eq_ind nat (minus i n) (\lambda (n: -nat).(csubst0 n v x1 x2)) H12 (S (minus i (S n))) (minus_x_Sy i n H)) in (let -H15 \def (csubst0_clear_S x1 x2 v (minus i (S n)) H14 e (clear_gen_flat f x1 -e x3 H13)) in (or4_ind (clear x2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 -(CHead e0 (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear x2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u1))))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) -v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (or4 (getl n c2 e) -(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 -(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2)))))))) (\lambda (H16: (clear x2 e)).(or4_intro0 -(getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 -(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind -b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: -B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n -c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) -(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda -(_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (getl_intro n c2 e (CHead x2 -(Flat f) x3) H11 (clear_flat x2 e H16 f x3)))) (\lambda (H16: (ex3_4 B C T T -(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e -(CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: -T).(\lambda (u2: T).(clear x2 (CHead e (Bind b) u2)))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) -v u1 u2))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda -(u1: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) (\lambda (b: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e0 -(Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda -(u2: T).(subst0 (minus i (S n)) v u1 u2))))) (or4 (getl n c2 e) (ex3_4 B C T -T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e -(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +v e1 e2)))))))) (\lambda (H16: (clear x2 e)).(or4_intro0 (getl n c2 e) (ex3_4 +B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: @@ -468,59 +442,17 @@ C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))))) (\lambda (x4: B).(\lambda (x5: C).(\lambda (x6: T).(\lambda -(x7: T).(\lambda (H17: (eq C e (CHead x5 (Bind x4) x6))).(\lambda (H18: -(clear x2 (CHead x5 (Bind x4) x7))).(\lambda (H19: (subst0 (minus i (S n)) v -x6 x7)).(eq_ind_r C (CHead x5 (Bind x4) x6) (\lambda (c: C).(or4 (getl n c2 -c) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda -(_: T).(eq C c (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C c (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 -(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2))))))))) (or4_intro1 (getl n c2 (CHead x5 (Bind x4) -x6)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda -(_: T).(eq C (CHead x5 (Bind x4) x6) (CHead e0 (Bind b) u)))))) (\lambda (b: -B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 -(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: -T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: -B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x5 (Bind x4) -x6) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: -C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x6) (CHead e1 -(Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) -(ex3_4_intro B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: -T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x6) (CHead e0 (Bind b) u)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 -(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: -T).(\lambda (w: T).(subst0 (minus i (S n)) v u w))))) x4 x5 x6 x7 (refl_equal -C (CHead x5 (Bind x4) x6)) (getl_intro n c2 (CHead x5 (Bind x4) x7) (CHead x2 -(Flat f) x3) H11 (clear_flat x2 (CHead x5 (Bind x4) x7) H18 f x3)) H19)) e -H17)))))))) H16)) (\lambda (H16: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x2 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))).(ex3_4_ind B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e -(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(clear x2 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: +v e1 e2))))))) (getl_intro n c2 e (CHead x2 (Flat f) x3) H11 (clear_flat x2 e +H16 f x3)))) (\lambda (H16: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 +(CHead e0 (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2))))))).(ex3_4_ind B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(clear x2 (CHead e0 (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) +v u1 u2))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: @@ -536,10 +468,10 @@ T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x4: -B).(\lambda (x5: C).(\lambda (x6: C).(\lambda (x7: T).(\lambda (H17: (eq C e -(CHead x5 (Bind x4) x7))).(\lambda (H18: (clear x2 (CHead x6 (Bind x4) -x7))).(\lambda (H19: (csubst0 (minus i (S n)) v x5 x6)).(eq_ind_r C (CHead x5 -(Bind x4) x7) (\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b: +B).(\lambda (x5: C).(\lambda (x6: T).(\lambda (x7: T).(\lambda (H17: (eq C e +(CHead x5 (Bind x4) x6))).(\lambda (H18: (clear x2 (CHead x5 (Bind x4) +x7))).(\lambda (H19: (subst0 (minus i (S n)) v x6 x7)).(eq_ind_r C (CHead x5 +(Bind x4) x6) (\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: @@ -554,41 +486,109 @@ C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u))))))) T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro2 -(getl n c2 (CHead x5 (Bind x4) x7)) (ex3_4 B C T T (\lambda (b: B).(\lambda -(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x7) (CHead +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro1 +(getl n c2 (CHead x5 (Bind x4) x6)) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x6) (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C (CHead x5 (Bind x4) x7) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda +C (CHead x5 (Bind x4) x6) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) -x7) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +x6) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2))))))) (ex3_4_intro B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda -(_: C).(\lambda (u: T).(eq C (CHead x5 (Bind x4) x7) (CHead e1 (Bind b) -u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: -T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))) x4 -x5 x6 x7 (refl_equal C (CHead x5 (Bind x4) x7)) (getl_intro n c2 (CHead x6 -(Bind x4) x7) (CHead x2 (Flat f) x3) H11 (clear_flat x2 (CHead x6 (Bind x4) -x7) H18 f x3)) H19)) e H17)))))))) H16)) (\lambda (H16: (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda -(_: T).(eq C e (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e2 -(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (\lambda (_: +v e1 e2))))))) (ex3_4_intro B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x6) (CHead e0 (Bind b) +u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w))))) x4 x5 +x6 x7 (refl_equal C (CHead x5 (Bind x4) x6)) (getl_intro n c2 (CHead x5 (Bind +x4) x7) (CHead x2 (Flat f) x3) H11 (clear_flat x2 (CHead x5 (Bind x4) x7) H18 +f x3)) H19)) e H17)))))))) H16)) (\lambda (H16: (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear x2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 +e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x2 (CHead e2 (Bind +b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i (S n)) v e1 e2))))) (or4 (getl n c2 e) (ex3_4 B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))))) (\lambda (x4: B).(\lambda (x5: C).(\lambda (x6: C).(\lambda +(x7: T).(\lambda (H17: (eq C e (CHead x5 (Bind x4) x7))).(\lambda (H18: +(clear x2 (CHead x6 (Bind x4) x7))).(\lambda (H19: (csubst0 (minus i (S n)) v +x5 x6)).(eq_ind_r C (CHead x5 (Bind x4) x7) (\lambda (c: C).(or4 (getl n c2 +c) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C c (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C c (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda -(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e1 -(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(_: T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) (\lambda (_: +(minus i (S n)) v e1 e2))))))))) (or4_intro2 (getl n c2 (CHead x5 (Bind x4) +x7)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead x5 (Bind x4) x7) (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x5 (Bind x4) +x7) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x7) (CHead e1 +(Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) +(ex3_4_intro B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x5 (Bind x4) x7) (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))) x4 x5 x6 x7 +(refl_equal C (CHead x5 (Bind x4) x7)) (getl_intro n c2 (CHead x6 (Bind x4) +x7) (CHead x2 (Flat f) x3) H11 (clear_flat x2 (CHead x6 (Bind x4) x7) H18 f +x3)) H19)) e H17)))))))) H16)) (\lambda (H16: (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e1 (Bind +b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) @@ -654,7 +654,7 @@ C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) x4 x5 x6 x7 x8 (refl_equal C (CHead x5 (Bind x4) x7)) (getl_intro n c2 (CHead x6 (Bind x4) x8) (CHead x2 (Flat f) x3) H11 (clear_flat x2 (CHead x6 (Bind x4) x8) H18 f x3)) H19 H20)) e H17)))))))))) -H16)) H15))))))]) H8 H9 H10))))))))) H6)) (\lambda (H6: (ex4_5 K C C T T +H16)) H15))))))) x0 H8 H9 H10))))))))) H6)) (\lambda (H6: (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C x (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e2 k w))))))) (\lambda @@ -688,36 +688,36 @@ C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) C x (CHead x1 x0 x3))).(\lambda (H8: (drop n O c2 (CHead x2 x0 x4))).(\lambda (H9: (subst0 (minus i (s x0 n)) v x3 x4)).(\lambda (H10: (csubst0 (minus i (s x0 n)) v x1 x2)).(let H11 \def (eq_ind C x (\lambda (c: C).(clear c e)) H4 -(CHead x1 x0 x3) H7) in ((match x0 in K return (\lambda (k: K).((drop n O c2 -(CHead x2 k x4)) \to ((subst0 (minus i (s k n)) v x3 x4) \to ((csubst0 (minus -i (s k n)) v x1 x2) \to ((clear (CHead x1 k x3) e) \to (or4 (getl n c2 e) -(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 -(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) -(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 -(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: -T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 -(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda -(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2))))))))))))) with [(Bind b) \Rightarrow (\lambda -(H12: (drop n O c2 (CHead x2 (Bind b) x4))).(\lambda (H13: (subst0 (minus i -(s (Bind b) n)) v x3 x4)).(\lambda (H14: (csubst0 (minus i (s (Bind b) n)) v -x1 x2)).(\lambda (H15: (clear (CHead x1 (Bind b) x3) e)).(eq_ind_r C (CHead -x1 (Bind b) x3) (\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda -(b0: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 -(Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda -(w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 -B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq -C c (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda -(e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: +(CHead x1 x0 x3) H7) in (K_ind (\lambda (k: K).((drop n O c2 (CHead x2 k x4)) +\to ((subst0 (minus i (s k n)) v x3 x4) \to ((csubst0 (minus i (s k n)) v x1 +x2) \to ((clear (CHead x1 k x3) e) \to (or4 (getl n c2 e) (ex3_4 B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))))))))))) (\lambda (b: B).(\lambda (H12: (drop n O c2 (CHead x2 +(Bind b) x4))).(\lambda (H13: (subst0 (minus i (s (Bind b) n)) v x3 +x4)).(\lambda (H14: (csubst0 (minus i (s (Bind b) n)) v x1 x2)).(\lambda +(H15: (clear (CHead x1 (Bind b) x3) e)).(eq_ind_r C (CHead x1 (Bind b) x3) +(\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b0: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind b0) u)))))) +(\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c +(CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b0) u))))))) @@ -752,12 +752,12 @@ u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) b x1 x2 x3 x4 (refl_equal C (CHead x1 (Bind b) x3)) (getl_intro n c2 (CHead x2 (Bind b) x4) (CHead x2 (Bind b) x4) H12 (clear_bind b x2 x4)) H13 H14)) e (clear_gen_bind -b x1 e x3 H15)))))) | (Flat f) \Rightarrow (\lambda (H12: (drop n O c2 (CHead -x2 (Flat f) x4))).(\lambda (_: (subst0 (minus i (s (Flat f) n)) v x3 +b x1 e x3 H15))))))) (\lambda (f: F).(\lambda (H12: (drop n O c2 (CHead x2 +(Flat f) x4))).(\lambda (_: (subst0 (minus i (s (Flat f) n)) v x3 x4)).(\lambda (H14: (csubst0 (minus i (s (Flat f) n)) v x1 x2)).(\lambda (H15: (clear (CHead x1 (Flat f) x3) e)).(let H16 \def (eq_ind nat (minus i n) -(\lambda (n: nat).(csubst0 n v x1 x2)) H14 (S (minus i (S n))) (minus_x_Sy i -n H)) in (let H17 \def (csubst0_clear_S x1 x2 v (minus i (S n)) H16 e +(\lambda (n0: nat).(csubst0 n0 v x1 x2)) H14 (S (minus i (S n))) (minus_x_Sy +i n H)) in (let H17 \def (csubst0_clear_S x1 x2 v (minus i (S n)) H16 e (clear_gen_flat f x1 e x3 H15)) in (or4_ind (clear x2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: @@ -808,8 +808,8 @@ u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (getl_intro n c2 e (CHead x2 (Flat f) x4) H12 (clear_flat x2 e H18 f x4)))) (\lambda (H18: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: -T).(eq C e (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: -C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e (Bind b) u2)))))) +T).(eq C e (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e0 (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) @@ -1018,7 +1018,7 @@ C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) x5 x6 x7 x8 x9 (refl_equal C (CHead x6 (Bind x5) x8)) (getl_intro n c2 (CHead x7 (Bind x5) x9) (CHead x2 (Flat f) x4) H12 (clear_flat x2 (CHead x7 (Bind x5) x9) H20 f x4)) H21 H22)) e H19)))))))))) -H18)) H17)))))))]) H8 H9 H10 H11))))))))))) H6)) H5))))) H2)))))))))). +H18)) H17)))))))) x0 H8 H9 H10 H11))))))))))) H6)) H5))))) H2)))))))))). theorem csubst0_getl_ge_back: \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall @@ -1032,9 +1032,9 @@ c2 e n H1) in (ex2_ind C (\lambda (e0: C).(drop n O c2 e0)) (\lambda (e0: C).(clear e0 e)) (getl n c1 e) (\lambda (x: C).(\lambda (H3: (drop n O c2 x)).(\lambda (H4: (clear x e)).(lt_eq_gt_e i n (getl n c1 e) (\lambda (H5: (lt i n)).(getl_intro n c1 e x (csubst0_drop_gt_back n i H5 c1 c2 v H0 x H3) -H4)) (\lambda (H5: (eq nat i n)).(let H6 \def (eq_ind_r nat n (\lambda (n: -nat).(drop n O c2 x)) H3 i H5) in (let H7 \def (eq_ind_r nat n (\lambda (n: -nat).(le i n)) H i H5) in (eq_ind nat i (\lambda (n0: nat).(getl n0 c1 e)) +H4)) (\lambda (H5: (eq nat i n)).(let H6 \def (eq_ind_r nat n (\lambda (n0: +nat).(drop n0 O c2 x)) H3 i H5) in (let H7 \def (eq_ind_r nat n (\lambda (n0: +nat).(le i n0)) H i H5) in (eq_ind nat i (\lambda (n0: nat).(getl n0 c1 e)) (let H8 \def (csubst0_drop_eq_back i c1 c2 v H0 x H6) in (or4_ind (drop i O c1 x) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C x (CHead e0 (Flat f) u2)))))) (\lambda (f: diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/fwd.ma index 1706272e6..a627b70df 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/fwd.ma @@ -68,59 +68,59 @@ nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda T).(\lambda (j: nat).(subst0 j v u1 u2))) (ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C x (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 -c3)))) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H: (eq nat (s k i) (s k -x1))).(\lambda (H4: (eq C x (CHead c1 k x0))).(\lambda (H5: (subst0 x1 v u1 +c3)))) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H4: (eq nat (s k i) (s k +x1))).(\lambda (H5: (eq C x (CHead c1 k x0))).(\lambda (H6: (subst0 x1 v u1 x0)).(eq_ind_r C (CHead c1 k x0) (\lambda (c: C).(ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C c (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 -c3))))) (let H6 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n v u1 x0)) -H5 i (s_inj k i x1 H)) in (ex3_2_intro T C (\lambda (u2: T).(\lambda (c3: +c3))))) (let H7 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n v u1 x0)) +H6 i (s_inj k i x1 H4)) in (ex3_2_intro T C (\lambda (u2: T).(\lambda (c3: C).(eq C (CHead c1 k x0) (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 -c3))) x0 c1 (refl_equal C (CHead c1 k x0)) (subst1_single i v u1 x0 H6) -(csubst1_refl i v c1))) x H4)))))) H3)) (\lambda (H3: (ex3_2 C nat (\lambda -(_: C).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda (c2: C).(\lambda -(_: nat).(eq C x (CHead c2 k u1)))) (\lambda (c2: C).(\lambda (j: -nat).(csubst0 j v c1 c2))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: +c3))) x0 c1 (refl_equal C (CHead c1 k x0)) (subst1_single i v u1 x0 H7) +(csubst1_refl i v c1))) x H5)))))) H3)) (\lambda (H3: (ex3_2 C nat (\lambda +(_: C).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda (c3: C).(\lambda +(_: nat).(eq C x (CHead c3 k u1)))) (\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c1 c3))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C x (CHead c3 k u1)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c1 c3))) (ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C x (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 c3)))) (\lambda (x0: C).(\lambda (x1: -nat).(\lambda (H: (eq nat (s k i) (s k x1))).(\lambda (H4: (eq C x (CHead x0 -k u1))).(\lambda (H5: (csubst0 x1 v c1 x0)).(eq_ind_r C (CHead x0 k u1) +nat).(\lambda (H4: (eq nat (s k i) (s k x1))).(\lambda (H5: (eq C x (CHead x0 +k u1))).(\lambda (H6: (csubst0 x1 v c1 x0)).(eq_ind_r C (CHead x0 k u1) (\lambda (c: C).(ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C c (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda -(_: T).(\lambda (c3: C).(csubst1 i v c1 c3))))) (let H6 \def (eq_ind_r nat x1 -(\lambda (n: nat).(csubst0 n v c1 x0)) H5 i (s_inj k i x1 H)) in (ex3_2_intro -T C (\lambda (u2: T).(\lambda (c3: C).(eq C (CHead x0 k u1) (CHead c3 k +(_: T).(\lambda (c3: C).(csubst1 i v c1 c3))))) (let H7 \def (eq_ind_r nat x1 +(\lambda (n: nat).(csubst0 n v c1 x0)) H6 i (s_inj k i x1 H4)) in +(ex3_2_intro T C (\lambda (u2: T).(\lambda (c3: C).(eq C (CHead x0 k u1) +(CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) +(\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 c3))) u1 x0 (refl_equal C +(CHead x0 k u1)) (subst1_refl i v u1) (csubst1_sing i v c1 x0 H7))) x +H5)))))) H3)) (\lambda (H3: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat (s k i) (s k j))))) (\lambda (u2: T).(\lambda +(c3: C).(\lambda (_: nat).(eq C x (CHead c3 k u2))))) (\lambda (u2: +T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v u1 u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c1 c3)))))).(ex4_3_ind T C +nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i) (s k +j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C x (CHead c3 +k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v u1 +u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c1 +c3)))) (ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C x (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: -T).(\lambda (c3: C).(csubst1 i v c1 c3))) u1 x0 (refl_equal C (CHead x0 k -u1)) (subst1_refl i v u1) (csubst1_sing i v c1 x0 H6))) x H4)))))) H3)) -(\lambda (H3: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat (s k i) (s k j))))) (\lambda (u2: T).(\lambda (c2: C).(\lambda -(_: nat).(eq C x (CHead c2 k u2))))) (\lambda (u2: T).(\lambda (_: -C).(\lambda (j: nat).(subst0 j v u1 u2)))) (\lambda (_: T).(\lambda (c2: -C).(\lambda (j: nat).(csubst0 j v c1 c2)))))).(ex4_3_ind T C nat (\lambda (_: -T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i) (s k j))))) (\lambda -(u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C x (CHead c3 k u2))))) -(\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v u1 u2)))) -(\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c1 c3)))) -(ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C x (CHead c3 k u2)))) -(\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 c3)))) (\lambda (x0: T).(\lambda (x1: -C).(\lambda (x2: nat).(\lambda (H: (eq nat (s k i) (s k x2))).(\lambda (H4: -(eq C x (CHead x1 k x0))).(\lambda (H5: (subst0 x2 v u1 x0)).(\lambda (H6: +C).(\lambda (x2: nat).(\lambda (H4: (eq nat (s k i) (s k x2))).(\lambda (H5: +(eq C x (CHead x1 k x0))).(\lambda (H6: (subst0 x2 v u1 x0)).(\lambda (H7: (csubst0 x2 v c1 x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c: C).(ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C c (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: -C).(csubst1 i v c1 c3))))) (let H7 \def (eq_ind_r nat x2 (\lambda (n: -nat).(csubst0 n v c1 x1)) H6 i (s_inj k i x2 H)) in (let H8 \def (eq_ind_r -nat x2 (\lambda (n: nat).(subst0 n v u1 x0)) H5 i (s_inj k i x2 H)) in +C).(csubst1 i v c1 c3))))) (let H8 \def (eq_ind_r nat x2 (\lambda (n: +nat).(csubst0 n v c1 x1)) H7 i (s_inj k i x2 H4)) in (let H9 \def (eq_ind_r +nat x2 (\lambda (n: nat).(subst0 n v u1 x0)) H6 i (s_inj k i x2 H4)) in (ex3_2_intro T C (\lambda (u2: T).(\lambda (c3: C).(eq C (CHead x1 k x0) (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 c3))) x0 x1 (refl_equal C -(CHead x1 k x0)) (subst1_single i v u1 x0 H8) (csubst1_sing i v c1 x1 H7)))) -x H4)))))))) H3)) (csubst0_gen_head k c1 x u1 v (s k i) H2))) c2 (sym_eq C c2 +(CHead x1 k x0)) (subst1_single i v u1 x0 H9) (csubst1_sing i v c1 x1 H8)))) +x H5)))))))) H3)) (csubst0_gen_head k c1 x u1 v (s k i) H2))) c2 (sym_eq C c2 x H1) H0))]) in (H0 (refl_equal C x))))))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/getl.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/getl.ma index ff4f78530..0783b17a8 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/getl.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/getl.ma @@ -97,10 +97,10 @@ C).(getl n c3 e2)) (CHead x1 (Bind x0) x3) (csubst1_sing (S (minus i (S n))) v (CHead x1 (Bind x0) x2) (CHead x1 (Bind x0) x3) (csubst0_snd_bind x0 (minus i (S n)) v x2 x3 H7 x1)) H6) e1 H5)))))))) H4)) (\lambda (H4: (ex3_4 B C C T (\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(eq C e1 -(CHead e2 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: -C).(\lambda (u: T).(getl n c3 (CHead e2 (Bind b) u)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) -v e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e2: C).(\lambda +(CHead e2 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e3: +C).(\lambda (u: T).(getl n c3 (CHead e3 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e2: C).(\lambda (e3: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e2 e3))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(eq C e1 (CHead e2 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e3: C).(\lambda (u: T).(getl n c3 (CHead e3 (Bind b) u)))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (e3: C).(\lambda @@ -117,11 +117,11 @@ v (CHead x1 (Bind x0) x3) (CHead x2 (Bind x0) x3) (csubst0_fst_bind x0 (minus i (S n)) x1 x2 v H7 x3)) H6) e1 H5)))))))) H4)) (\lambda (H4: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e1 (CHead e2 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: -C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e2 +C).(\lambda (e3: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e3 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: -B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 -(minus i (S n)) v e1 e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda +B).(\lambda (e2: C).(\lambda (e3: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e2 e3)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e1 (CHead e2 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e3: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e3 (Bind b) w))))))) (\lambda (_: @@ -172,74 +172,74 @@ C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u (CSort n) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: T).((getl O c0 (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0 a0))) (\lambda -(a0: C).(\lambda (a: C).(drop (S O) O a0 a))))))))).(\lambda (k: K).(match k -in K return (\lambda (k0: K).(\forall (t: T).(\forall (e: C).(\forall (u: -T).((getl O (CHead c0 k0 t) (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda -(a0: C).(\lambda (_: C).(csubst1 O u (CHead c0 k0 t) a0))) (\lambda (a0: -C).(\lambda (a: C).(drop (S O) O a0 a))))))))) with [(Bind b) \Rightarrow -(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (H0: (getl O (CHead -c0 (Bind b) t) (CHead e (Bind Abbr) u))).(let H1 \def (f_equal C C (\lambda -(e0: C).(match e0 in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow -e | (CHead c _ _) \Rightarrow c])) (CHead e (Bind Abbr) u) (CHead c0 (Bind b) +(a0: C).(\lambda (a: C).(drop (S O) O a0 a))))))))).(\lambda (k: K).(K_ind +(\lambda (k0: K).(\forall (t: T).(\forall (e: C).(\forall (u: T).((getl O +(CHead c0 k0 t) (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: +C).(\lambda (_: C).(csubst1 O u (CHead c0 k0 t) a0))) (\lambda (a0: +C).(\lambda (a: C).(drop (S O) O a0 a))))))))) (\lambda (b: B).(\lambda (t: +T).(\lambda (e: C).(\lambda (u: T).(\lambda (H0: (getl O (CHead c0 (Bind b) +t) (CHead e (Bind Abbr) u))).(let H1 \def (f_equal C C (\lambda (e0: +C).(match e0 in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow e | +(CHead c1 _ _) \Rightarrow c1])) (CHead e (Bind Abbr) u) (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead e (Bind Abbr) u) t (getl_gen_O (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u) H0))) in ((let H2 \def (f_equal C B (\lambda (e0: C).(match e0 in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow -Abbr | (CHead _ k _) \Rightarrow (match k in K return (\lambda (_: K).B) with -[(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead e (Bind Abbr) -u) (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead e (Bind Abbr) u) t -(getl_gen_O (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u) H0))) in ((let H3 -\def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) -with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead e (Bind -Abbr) u) (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead e (Bind Abbr) u) t -(getl_gen_O (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u) H0))) in (\lambda -(H4: (eq B Abbr b)).(\lambda (_: (eq C e c0)).(eq_ind_r T t (\lambda (t0: -T).(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O t0 (CHead c0 (Bind -b) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a))))) (eq_ind -B Abbr (\lambda (b0: B).(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 -O t (CHead c0 (Bind b0) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) -O a0 a))))) (ex2_2_intro C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O t -(CHead c0 (Bind Abbr) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O -a0 a))) (CHead c0 (Bind Abbr) t) c0 (csubst1_refl O t (CHead c0 (Bind Abbr) -t)) (drop_drop (Bind Abbr) O c0 c0 (drop_refl c0) t)) b H4) u H3)))) H2)) -H1)))))) | (Flat f) \Rightarrow (\lambda (t: T).(\lambda (e: C).(\lambda (u: -T).(\lambda (H0: (getl O (CHead c0 (Flat f) t) (CHead e (Bind Abbr) u))).(let -H_x \def (subst1_ex u t O) in (let H1 \def H_x in (ex_ind T (\lambda (t2: -T).(subst1 O u t (lift (S O) O t2))) (ex2_2 C C (\lambda (a0: C).(\lambda (_: -C).(csubst1 O u (CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a: -C).(drop (S O) O a0 a)))) (\lambda (x: T).(\lambda (H2: (subst1 O u t (lift -(S O) O x))).(let H3 \def (H e u (getl_intro O c0 (CHead e (Bind Abbr) u) c0 -(drop_refl c0) (clear_gen_flat f c0 (CHead e (Bind Abbr) u) t (getl_gen_O -(CHead c0 (Flat f) t) (CHead e (Bind Abbr) u) H0)))) in (ex2_2_ind C C -(\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0 a0))) (\lambda (a0: -C).(\lambda (a: C).(drop (S O) O a0 a))) (ex2_2 C C (\lambda (a0: C).(\lambda -(_: C).(csubst1 O u (CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a: -C).(drop (S O) O a0 a)))) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H4: -(csubst1 O u c0 x0)).(\lambda (H5: (drop (S O) O x0 x1)).(ex2_2_intro C C -(\lambda (a0: C).(\lambda (_: C).(csubst1 O u (CHead c0 (Flat f) t) a0))) -(\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a))) (CHead x0 (Flat f) -(lift (S O) O x)) x1 (csubst1_flat f O u t (lift (S O) O x) H2 c0 x0 H4) -(drop_drop (Flat f) O x0 x1 H5 (lift (S O) O x))))))) H3)))) H1)))))))])))) -c)) (\lambda (n: nat).(\lambda (H: ((\forall (c: C).(\forall (e: C).(\forall -(u: T).((getl n c (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: -C).(\lambda (_: C).(csubst1 n u c a0))) (\lambda (a0: C).(\lambda (a: -C).(drop (S O) n a0 a)))))))))).(\lambda (c: C).(C_ind (\lambda (c0: -C).(\forall (e: C).(\forall (u: T).((getl (S n) c0 (CHead e (Bind Abbr) u)) -\to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u c0 a0))) -(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))))))) (\lambda (n0: -nat).(\lambda (e: C).(\lambda (u: T).(\lambda (H0: (getl (S n) (CSort n0) -(CHead e (Bind Abbr) u))).(getl_gen_sort n0 (S n) (CHead e (Bind Abbr) u) H0 -(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CSort n0) a0))) -(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a))))))))) (\lambda -(c0: C).(\lambda (H0: ((\forall (e: C).(\forall (u: T).((getl (S n) c0 (CHead -e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S -n) u c0 a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 -a))))))))).(\lambda (k: K).(match k in K return (\lambda (k0: K).(\forall (t: -T).(\forall (e: C).(\forall (u: T).((getl (S n) (CHead c0 k0 t) (CHead e +Abbr | (CHead _ k0 _) \Rightarrow (match k0 in K return (\lambda (_: K).B) +with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead e +(Bind Abbr) u) (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead e (Bind +Abbr) u) t (getl_gen_O (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u) H0))) in +((let H3 \def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda +(_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) +(CHead e (Bind Abbr) u) (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead e +(Bind Abbr) u) t (getl_gen_O (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u) +H0))) in (\lambda (H4: (eq B Abbr b)).(\lambda (_: (eq C e c0)).(eq_ind_r T t +(\lambda (t0: T).(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O t0 +(CHead c0 (Bind b) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 +a))))) (eq_ind B Abbr (\lambda (b0: B).(ex2_2 C C (\lambda (a0: C).(\lambda +(_: C).(csubst1 O t (CHead c0 (Bind b0) t) a0))) (\lambda (a0: C).(\lambda +(a: C).(drop (S O) O a0 a))))) (ex2_2_intro C C (\lambda (a0: C).(\lambda (_: +C).(csubst1 O t (CHead c0 (Bind Abbr) t) a0))) (\lambda (a0: C).(\lambda (a: +C).(drop (S O) O a0 a))) (CHead c0 (Bind Abbr) t) c0 (csubst1_refl O t (CHead +c0 (Bind Abbr) t)) (drop_drop (Bind Abbr) O c0 c0 (drop_refl c0) t)) b H4) u +H3)))) H2)) H1))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (e: +C).(\lambda (u: T).(\lambda (H0: (getl O (CHead c0 (Flat f) t) (CHead e (Bind +Abbr) u))).(let H_x \def (subst1_ex u t O) in (let H1 \def H_x in (ex_ind T +(\lambda (t2: T).(subst1 O u t (lift (S O) O t2))) (ex2_2 C C (\lambda (a0: +C).(\lambda (_: C).(csubst1 O u (CHead c0 (Flat f) t) a0))) (\lambda (a0: +C).(\lambda (a: C).(drop (S O) O a0 a)))) (\lambda (x: T).(\lambda (H2: +(subst1 O u t (lift (S O) O x))).(let H3 \def (H e u (getl_intro O c0 (CHead +e (Bind Abbr) u) c0 (drop_refl c0) (clear_gen_flat f c0 (CHead e (Bind Abbr) +u) t (getl_gen_O (CHead c0 (Flat f) t) (CHead e (Bind Abbr) u) H0)))) in +(ex2_2_ind C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0 a0))) +(\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a))) (ex2_2 C C (\lambda +(a0: C).(\lambda (_: C).(csubst1 O u (CHead c0 (Flat f) t) a0))) (\lambda +(a0: C).(\lambda (a: C).(drop (S O) O a0 a)))) (\lambda (x0: C).(\lambda (x1: +C).(\lambda (H4: (csubst1 O u c0 x0)).(\lambda (H5: (drop (S O) O x0 +x1)).(ex2_2_intro C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u (CHead c0 +(Flat f) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a))) +(CHead x0 (Flat f) (lift (S O) O x)) x1 (csubst1_flat f O u t (lift (S O) O +x) H2 c0 x0 H4) (drop_drop (Flat f) O x0 x1 H5 (lift (S O) O x))))))) H3)))) +H1)))))))) k)))) c)) (\lambda (n: nat).(\lambda (H: ((\forall (c: C).(\forall +(e: C).(\forall (u: T).((getl n c (CHead e (Bind Abbr) u)) \to (ex2_2 C C +(\lambda (a0: C).(\lambda (_: C).(csubst1 n u c a0))) (\lambda (a0: +C).(\lambda (a: C).(drop (S O) n a0 a)))))))))).(\lambda (c: C).(C_ind +(\lambda (c0: C).(\forall (e: C).(\forall (u: T).((getl (S n) c0 (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S -n) u (CHead c0 k0 t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) -a0 a))))))))) with [(Bind b) \Rightarrow (\lambda (t: T).(\lambda (e: -C).(\lambda (u: T).(\lambda (H1: (getl (S n) (CHead c0 (Bind b) t) (CHead e -(Bind Abbr) u))).(let H_x \def (subst1_ex u t n) in (let H2 \def H_x in +n) u c0 a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))))))) +(\lambda (n0: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (H0: (getl (S n) +(CSort n0) (CHead e (Bind Abbr) u))).(getl_gen_sort n0 (S n) (CHead e (Bind +Abbr) u) H0 (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u +(CSort n0) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 +a))))))))) (\lambda (c0: C).(\lambda (H0: ((\forall (e: C).(\forall (u: +T).((getl (S n) c0 (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: +C).(\lambda (_: C).(csubst1 (S n) u c0 a0))) (\lambda (a0: C).(\lambda (a: +C).(drop (S O) (S n) a0 a))))))))).(\lambda (k: K).(K_ind (\lambda (k0: +K).(\forall (t: T).(\forall (e: C).(\forall (u: T).((getl (S n) (CHead c0 k0 +t) (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: +C).(csubst1 (S n) u (CHead c0 k0 t) a0))) (\lambda (a0: C).(\lambda (a: +C).(drop (S O) (S n) a0 a))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda +(e: C).(\lambda (u: T).(\lambda (H1: (getl (S n) (CHead c0 (Bind b) t) (CHead +e (Bind Abbr) u))).(let H_x \def (subst1_ex u t n) in (let H2 \def H_x in (ex_ind T (\lambda (t2: T).(subst1 n u t (lift (S O) n t2))) (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Bind b) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))) (\lambda (x: @@ -254,7 +254,7 @@ C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Bind b) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a))) (CHead x0 (Bind b) (lift (S O) n x)) (CHead x1 (Bind b) x) (csubst1_bind b n u t (lift (S O) n x) H3 c0 x0 H5) (drop_skip_bind (S O) n x0 x1 H6 b x)))))) H4)))) -H2))))))) | (Flat f) \Rightarrow (\lambda (t: T).(\lambda (e: C).(\lambda (u: +H2)))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (H1: (getl (S n) (CHead c0 (Flat f) t) (CHead e (Bind Abbr) u))).(let H_x \def (subst1_ex u t (S n)) in (let H2 \def H_x in (ex_ind T (\lambda (t2: T).(subst1 (S n) u t (lift (S O) (S n) t2))) (ex2_2 C C @@ -271,5 +271,5 @@ x1)).(ex2_2_intro C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a))) (CHead x0 (Flat f) (lift (S O) (S n) x)) (CHead x1 (Flat f) x) (csubst1_flat f (S n) u t (lift (S O) (S n) x) H3 c0 x0 H5) (drop_skip_flat -(S O) n x0 x1 H6 f x)))))) H4)))) H2)))))))])))) c)))) d). +(S O) n x0 x1 H6 f x)))))) H4)))) H2)))))))) k)))) c)))) d). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd.ma index 33931e1e0..0b48e6344 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd.ma @@ -96,10 +96,10 @@ nat n (S h)) \to ((eq nat n0 O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) O c c1)))))))) (\lambda (c0: C).(\lambda (H3: (eq nat O (S h))).(\lambda (_: (eq nat O O)).(\lambda (_: (eq C c0 (CHead c k u))).(let H6 \def (match H3 in eq return (\lambda (n: nat).(\lambda (_: (eq ? ? n)).((eq nat n (S h)) -\to (drop (r k h) O c c0)))) with [refl_equal \Rightarrow (\lambda (H2: (eq -nat O (S h))).(let H3 \def (eq_ind nat O (\lambda (e: nat).(match e in nat +\to (drop (r k h) O c c0)))) with [refl_equal \Rightarrow (\lambda (H6: (eq +nat O (S h))).(let H7 \def (eq_ind nat O (\lambda (e: nat).(match e in nat return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow -False])) I (S h) H2) in (False_ind (drop (r k h) O c c0) H3)))]) in (H6 +False])) I (S h) H6) in (False_ind (drop (r k h) O c c0) H7)))]) in (H6 (refl_equal nat (S h)))))))) (\lambda (k0: K).(\lambda (h0: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (H3: (drop (r k0 h0) O c0 e)).(\lambda (_: (((eq nat (r k0 h0) (S h)) \to ((eq nat O O) \to ((eq C c0 (CHead c k u)) \to @@ -107,40 +107,41 @@ False])) I (S h) H2) in (False_ind (drop (r k h) O c c0) H3)))]) in (H6 h))).(\lambda (_: (eq nat O O)).(\lambda (H7: (eq C (CHead c0 k0 u0) (CHead c k u))).(let H8 \def (match H5 in eq return (\lambda (n: nat).(\lambda (_: (eq ? ? n)).((eq nat n (S h)) \to (drop (r k h) O c e)))) with [refl_equal -\Rightarrow (\lambda (H4: (eq nat (S h0) (S h))).(let H5 \def (f_equal nat +\Rightarrow (\lambda (H8: (eq nat (S h0) (S h))).(let H9 \def (f_equal nat nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).nat) with [O -\Rightarrow h0 | (S n) \Rightarrow n])) (S h0) (S h) H4) in (eq_ind nat h -(\lambda (_: nat).(drop (r k h) O c e)) (let H6 \def (match H7 in eq return -(\lambda (c0: C).(\lambda (_: (eq ? ? c0)).((eq C c0 (CHead c k u)) \to (drop -(r k h) O c e)))) with [refl_equal \Rightarrow (\lambda (H4: (eq C (CHead c0 -k0 u0) (CHead c k u))).(let H6 \def (f_equal C T (\lambda (e0: C).(match e0 +\Rightarrow h0 | (S n) \Rightarrow n])) (S h0) (S h) H8) in (eq_ind nat h +(\lambda (_: nat).(drop (r k h) O c e)) (let H10 \def (match H7 in eq return +(\lambda (c1: C).(\lambda (_: (eq ? ? c1)).((eq C c1 (CHead c k u)) \to (drop +(r k h) O c e)))) with [refl_equal \Rightarrow (\lambda (H10: (eq C (CHead c0 +k0 u0) (CHead c k u))).(let H11 \def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) -\Rightarrow t])) (CHead c0 k0 u0) (CHead c k u) H4) in ((let H7 \def (f_equal -C K (\lambda (e0: C).(match e0 in C return (\lambda (_: C).K) with [(CSort _) -\Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c0 k0 u0) (CHead c k -u) H4) in ((let H8 \def (f_equal C C (\lambda (e0: C).(match e0 in C return -(\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow -c])) (CHead c0 k0 u0) (CHead c k u) H4) in (eq_ind C c (\lambda (_: C).((eq K -k0 k) \to ((eq T u0 u) \to (drop (r k h) O c e)))) (\lambda (H9: (eq K k0 -k)).(eq_ind K k (\lambda (_: K).((eq T u0 u) \to (drop (r k h) O c e))) -(\lambda (H10: (eq T u0 u)).(eq_ind T u (\lambda (_: T).(drop (r k h) O c e)) -(eq_ind nat h0 (\lambda (n: nat).(drop (r k n) O c e)) (eq_ind C c0 (\lambda -(c: C).(drop (r k h0) O c e)) (eq_ind K k0 (\lambda (k: K).(drop (r k h0) O -c0 e)) H3 k H9) c H8) h H5) u0 (sym_eq T u0 u H10))) k0 (sym_eq K k0 k H9))) -c0 (sym_eq C c0 c H8))) H7)) H6)))]) in (H6 (refl_equal C (CHead c k u)))) h0 -(sym_eq nat h0 h H5))))]) in (H8 (refl_equal nat (S h)))))))))))))) (\lambda -(k0: K).(\lambda (h0: nat).(\lambda (d: nat).(\lambda (c0: C).(\lambda (e: -C).(\lambda (_: (drop h0 (r k0 d) c0 e)).(\lambda (_: (((eq nat h0 (S h)) \to -((eq nat (r k0 d) O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) O c -e)))))).(\lambda (u0: T).(\lambda (_: (eq nat h0 (S h))).(\lambda (H6: (eq -nat (S d) O)).(\lambda (_: (eq C (CHead c0 k0 (lift h0 (r k0 d) u0)) (CHead c -k u))).(let H8 \def (match H6 in eq return (\lambda (n: nat).(\lambda (_: (eq -? ? n)).((eq nat n O) \to (drop (r k h) O c (CHead e k0 u0))))) with -[refl_equal \Rightarrow (\lambda (H4: (eq nat (S d) O)).(let H5 \def (eq_ind -nat (S d) (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).Prop) -with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind -(drop (r k h) O c (CHead e k0 u0)) H5)))]) in (H8 (refl_equal nat -O)))))))))))))) y1 y0 y x H2))) H1))) H0))) H)))))). +\Rightarrow t])) (CHead c0 k0 u0) (CHead c k u) H10) in ((let H12 \def +(f_equal C K (\lambda (e0: C).(match e0 in C return (\lambda (_: C).K) with +[(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead c0 k0 u0) +(CHead c k u) H10) in ((let H13 \def (f_equal C C (\lambda (e0: C).(match e0 +in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c1 _ +_) \Rightarrow c1])) (CHead c0 k0 u0) (CHead c k u) H10) in (eq_ind C c +(\lambda (_: C).((eq K k0 k) \to ((eq T u0 u) \to (drop (r k h) O c e)))) +(\lambda (H14: (eq K k0 k)).(eq_ind K k (\lambda (_: K).((eq T u0 u) \to +(drop (r k h) O c e))) (\lambda (H15: (eq T u0 u)).(eq_ind T u (\lambda (_: +T).(drop (r k h) O c e)) (eq_ind nat h0 (\lambda (n: nat).(drop (r k n) O c +e)) (eq_ind C c0 (\lambda (c1: C).(drop (r k h0) O c1 e)) (eq_ind K k0 +(\lambda (k1: K).(drop (r k1 h0) O c0 e)) H3 k H14) c H13) h H9) u0 (sym_eq T +u0 u H15))) k0 (sym_eq K k0 k H14))) c0 (sym_eq C c0 c H13))) H12)) H11)))]) +in (H10 (refl_equal C (CHead c k u)))) h0 (sym_eq nat h0 h H9))))]) in (H8 +(refl_equal nat (S h)))))))))))))) (\lambda (k0: K).(\lambda (h0: +nat).(\lambda (d: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (_: (drop h0 +(r k0 d) c0 e)).(\lambda (_: (((eq nat h0 (S h)) \to ((eq nat (r k0 d) O) \to +((eq C c0 (CHead c k u)) \to (drop (r k h) O c e)))))).(\lambda (u0: +T).(\lambda (_: (eq nat h0 (S h))).(\lambda (H6: (eq nat (S d) O)).(\lambda +(_: (eq C (CHead c0 k0 (lift h0 (r k0 d) u0)) (CHead c k u))).(let H8 \def +(match H6 in eq return (\lambda (n: nat).(\lambda (_: (eq ? ? n)).((eq nat n +O) \to (drop (r k h) O c (CHead e k0 u0))))) with [refl_equal \Rightarrow +(\lambda (H8: (eq nat (S d) O)).(let H9 \def (eq_ind nat (S d) (\lambda (e0: +nat).(match e0 in nat return (\lambda (_: nat).Prop) with [O \Rightarrow +False | (S _) \Rightarrow True])) I O H8) in (False_ind (drop (r k h) O c +(CHead e k0 u0)) H9)))]) in (H8 (refl_equal nat O)))))))))))))) y1 y0 y x +H2))) H1))) H0))) H)))))). theorem drop_gen_skip_r: \forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).(\forall @@ -198,13 +199,13 @@ u0) (CHead c k u))).(let H9 \def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e k0 u0) (CHead c k u) H8) in ((let H10 \def (f_equal C K (\lambda (e0: C).(match e0 in C return (\lambda (_: C).K) with [(CSort _) -\Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead e k0 u0) (CHead c k u) -H8) in ((let H11 \def (f_equal C C (\lambda (e0: C).(match e0 in C return -(\lambda (_: C).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow -c])) (CHead e k0 u0) (CHead c k u) H8) in (eq_ind C c (\lambda (c1: C).((eq K -k0 k) \to ((eq T u0 u) \to ((drop h (r k0 d) c0 c1) \to (ex2 C (\lambda (e0: -C).(eq C (CHead c0 k0 (lift h (r k0 d) u0)) (CHead e0 k (lift h (r k d) u)))) -(\lambda (e0: C).(drop h (r k d) e0 c))))))) (\lambda (H12: (eq K k0 +\Rightarrow k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead e k0 u0) (CHead c k +u) H8) in ((let H11 \def (f_equal C C (\lambda (e0: C).(match e0 in C return +(\lambda (_: C).C) with [(CSort _) \Rightarrow e | (CHead c1 _ _) \Rightarrow +c1])) (CHead e k0 u0) (CHead c k u) H8) in (eq_ind C c (\lambda (c1: C).((eq +K k0 k) \to ((eq T u0 u) \to ((drop h (r k0 d) c0 c1) \to (ex2 C (\lambda +(e0: C).(eq C (CHead c0 k0 (lift h (r k0 d) u0)) (CHead e0 k (lift h (r k d) +u)))) (\lambda (e0: C).(drop h (r k d) e0 c))))))) (\lambda (H12: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T u0 u) \to ((drop h (r k1 d) c0 c) \to (ex2 C (\lambda (e0: C).(eq C (CHead c0 k1 (lift h (r k1 d) u0)) (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)))))) (\lambda @@ -213,9 +214,9 @@ k)).(eq_ind K k (\lambda (k1: K).((eq T u0 u) \to ((drop h (r k1 d) c0 c) \to (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c))))) (\lambda (H14: (drop h (r k d) c0 c)).(let H15 \def (eq_ind T u0 (\lambda (t: T).(eq C (CHead c0 k0 (lift h (r k0 d) t)) x)) H7 u H13) in (let H16 \def (eq_ind K k0 -(\lambda (k: K).(eq C (CHead c0 k (lift h (r k d) u)) x)) H15 k H12) in (let -H17 \def (eq_ind_r C x (\lambda (c0: C).(drop h (S d) c0 (CHead c k u))) H -(CHead c0 k (lift h (r k d) u)) H16) in (ex_intro2 C (\lambda (e0: C).(eq C +(\lambda (k1: K).(eq C (CHead c0 k1 (lift h (r k1 d) u)) x)) H15 k H12) in +(let H17 \def (eq_ind_r C x (\lambda (c1: C).(drop h (S d) c1 (CHead c k u))) +H (CHead c0 k (lift h (r k d) u)) H16) in (ex_intro2 C (\lambda (e0: C).(eq C (CHead c0 k (lift h (r k d) u)) (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)) c0 (refl_equal C (CHead c0 k (lift h (r k d) u))) H14))))) u0 (sym_eq T u0 u H13))) k0 (sym_eq K k0 k H12))) e (sym_eq C e @@ -281,45 +282,45 @@ k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))))) (\lambda (H7: (eq C (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u))).(let H8 \def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) with -[(CSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: +[(CSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d1: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) -\Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false -\Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) -(lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) (r k0 -d) u0) | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 (lift h (r k0 d) u0)) -(CHead c k u) H7) in ((let H9 \def (f_equal C K (\lambda (e0: C).(match e0 in -C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) -\Rightarrow k])) (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) in -((let H10 \def (f_equal C C (\lambda (e0: C).(match e0 in C return (\lambda -(_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) -(CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) in (eq_ind C c (\lambda -(c1: C).((eq K k0 k) \to ((eq T (lift h (r k0 d) u0) u) \to ((eq C (CHead e -k0 u0) x) \to ((drop h (r k0 d) c1 e) \to (ex3_2 C T (\lambda (e0: -C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: -T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r -k d) c e0))))))))) (\lambda (H11: (eq K k0 k)).(eq_ind K k (\lambda (k1: -K).((eq T (lift h (r k1 d) u0) u) \to ((eq C (CHead e k1 u0) x) \to ((drop h -(r k1 d) c e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead -e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) -(\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))))) (\lambda (H12: -(eq T (lift h (r k d) u0) u)).(eq_ind T (lift h (r k d) u0) (\lambda (t: -T).((eq C (CHead e k u0) x) \to ((drop h (r k d) c e) \to (ex3_2 C T (\lambda -(e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda -(v: T).(eq T t (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h -(r k d) c e0))))))) (\lambda (H13: (eq C (CHead e k u0) x)).(eq_ind C (CHead -e k u0) (\lambda (c1: C).((drop h (r k d) c e) \to (ex3_2 C T (\lambda (e0: -C).(\lambda (v: T).(eq C c1 (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: +\Rightarrow (TLRef (match (blt i d1) with [true \Rightarrow i | false +\Rightarrow (f i)])) | (THead k1 u1 t0) \Rightarrow (THead k1 (lref_map f d1 +u1) (lref_map f (s k1 d1) t0))]) in lref_map) (\lambda (x0: nat).(plus x0 h)) +(r k0 d) u0) | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 (lift h (r k0 d) +u0)) (CHead c k u) H7) in ((let H9 \def (f_equal C K (\lambda (e0: C).(match +e0 in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ +k1 _) \Rightarrow k1])) (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) +in ((let H10 \def (f_equal C C (\lambda (e0: C).(match e0 in C return +(\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c1 _ _) +\Rightarrow c1])) (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) in +(eq_ind C c (\lambda (c1: C).((eq K k0 k) \to ((eq T (lift h (r k0 d) u0) u) +\to ((eq C (CHead e k0 u0) x) \to ((drop h (r k0 d) c1 e) \to (ex3_2 C T +(\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: +C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda +(_: T).(drop h (r k d) c e0))))))))) (\lambda (H11: (eq K k0 k)).(eq_ind K k +(\lambda (k1: K).((eq T (lift h (r k1 d) u0) u) \to ((eq C (CHead e k1 u0) x) +\to ((drop h (r k1 d) c e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: +T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h +(r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))))) +(\lambda (H12: (eq T (lift h (r k d) u0) u)).(eq_ind T (lift h (r k d) u0) +(\lambda (t: T).((eq C (CHead e k u0) x) \to ((drop h (r k d) c e) \to (ex3_2 +C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: +C).(\lambda (v: T).(eq T t (lift h (r k d) v)))) (\lambda (e0: C).(\lambda +(_: T).(drop h (r k d) c e0))))))) (\lambda (H13: (eq C (CHead e k u0) +x)).(eq_ind C (CHead e k u0) (\lambda (c1: C).((drop h (r k d) c e) \to +(ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C c1 (CHead e0 k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T (lift h (r k d) u0) (lift h (r k d) +v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))) (\lambda +(H14: (drop h (r k d) c e)).(let H15 \def (eq_ind_r T u (\lambda (t: T).(drop +h (S d) (CHead c k t) x)) H (lift h (r k d) u0) H12) in (let H16 \def +(eq_ind_r C x (\lambda (c1: C).(drop h (S d) (CHead c k (lift h (r k d) u0)) +c1)) H15 (CHead e k u0) H13) in (ex3_2_intro C T (\lambda (e0: C).(\lambda +(v: T).(eq C (CHead e k u0) (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift h (r k d) u0) (lift h (r k d) v)))) (\lambda (e0: C).(\lambda -(_: T).(drop h (r k d) c e0)))))) (\lambda (H14: (drop h (r k d) c e)).(let -H15 \def (eq_ind_r T u (\lambda (t: T).(drop h (S d) (CHead c k t) x)) H -(lift h (r k d) u0) H12) in (let H16 \def (eq_ind_r C x (\lambda (c0: -C).(drop h (S d) (CHead c k (lift h (r k d) u0)) c0)) H15 (CHead e k u0) H13) -in (ex3_2_intro C T (\lambda (e0: C).(\lambda (v: T).(eq C (CHead e k u0) -(CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift h (r k d) u0) -(lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c -e0))) e u0 (refl_equal C (CHead e k u0)) (refl_equal T (lift h (r k d) u0)) -H14)))) x H13)) u H12)) k0 (sym_eq K k0 k H11))) c0 (sym_eq C c0 c H10))) -H9)) H8))) d0 (sym_eq nat d0 d H6)))) h0 (sym_eq nat h0 h H1) H2 H3 H4 -H0)))))]) in (H0 (refl_equal nat h) (refl_equal nat (S d)) (refl_equal C -(CHead c k u)) (refl_equal C x))))))))). +(_: T).(drop h (r k d) c e0))) e u0 (refl_equal C (CHead e k u0)) (refl_equal +T (lift h (r k d) u0)) H14)))) x H13)) u H12)) k0 (sym_eq K k0 k H11))) c0 +(sym_eq C c0 c H10))) H9)) H8))) d0 (sym_eq nat d0 d H6)))) h0 (sym_eq nat h0 +h H1) H2 H3 H4 H0)))))]) in (H0 (refl_equal nat h) (refl_equal nat (S d)) +(refl_equal C (CHead c k u)) (refl_equal C x))))))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/props.ma index 133d10413..0cb32f75c 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/props.ma @@ -494,28 +494,27 @@ j0) O e2 H)))))))) (\lambda (e2: C).(\lambda (IHe1: ((\forall (e3: C).((drop (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 e2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e3: C).(\lambda (H: (drop (S j0) O (CHead e2 k t) e3)).(\lambda (c2: C).(\lambda (i: -nat).(\lambda (H0: (drop i O c2 e3)).((match k in K return (\lambda (k0: -K).((drop (r k0 j0) O e2 e3) \to (ex2 C (\lambda (c1: C).(drop (S j0) O c1 -c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 k0 t)))))) with [(Bind b) -\Rightarrow (\lambda (H1: (drop (r (Bind b) j0) O e2 e3)).(let H_x \def (IHj -e2 e3 H1 c2 i H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c1: C).(drop j0 -O c1 c2)) (\lambda (c1: C).(drop i j0 c1 e2)) (ex2 C (\lambda (c1: C).(drop -(S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Bind b) t)))) -(\lambda (x: C).(\lambda (H3: (drop j0 O x c2)).(\lambda (H4: (drop i j0 x -e2)).(ex_intro2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: -C).(drop i (S j0) c1 (CHead e2 (Bind b) t))) (CHead x (Bind b) (lift i (r -(Bind b) j0) t)) (drop_drop (Bind b) j0 x c2 H3 (lift i (r (Bind b) j0) t)) -(drop_skip (Bind b) i j0 x e2 H4 t))))) H2)))) | (Flat f) \Rightarrow -(\lambda (H1: (drop (r (Flat f) j0) O e2 e3)).(let H_x \def (IHe1 e3 H1 c2 i -H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (S j0) O c1 c2)) -(\lambda (c1: C).(drop i (S j0) c1 e2)) (ex2 C (\lambda (c1: C).(drop (S j0) -O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Flat f) t)))) -(\lambda (x: C).(\lambda (H3: (drop (S j0) O x c2)).(\lambda (H4: (drop i (S -j0) x e2)).(ex_intro2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: -C).(drop i (S j0) c1 (CHead e2 (Flat f) t))) (CHead x (Flat f) (lift i (r -(Flat f) j0) t)) (drop_drop (Flat f) j0 x c2 H3 (lift i (r (Flat f) j0) t)) -(drop_skip (Flat f) i j0 x e2 H4 t))))) H2))))]) (drop_gen_drop k e2 e3 t j0 -H))))))))))) e1)))) j). +nat).(\lambda (H0: (drop i O c2 e3)).(K_ind (\lambda (k0: K).((drop (r k0 j0) +O e2 e3) \to (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: +C).(drop i (S j0) c1 (CHead e2 k0 t)))))) (\lambda (b: B).(\lambda (H1: (drop +(r (Bind b) j0) O e2 e3)).(let H_x \def (IHj e2 e3 H1 c2 i H0) in (let H2 +\def H_x in (ex2_ind C (\lambda (c1: C).(drop j0 O c1 c2)) (\lambda (c1: +C).(drop i j0 c1 e2)) (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda +(c1: C).(drop i (S j0) c1 (CHead e2 (Bind b) t)))) (\lambda (x: C).(\lambda +(H3: (drop j0 O x c2)).(\lambda (H4: (drop i j0 x e2)).(ex_intro2 C (\lambda +(c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 +(Bind b) t))) (CHead x (Bind b) (lift i (r (Bind b) j0) t)) (drop_drop (Bind +b) j0 x c2 H3 (lift i (r (Bind b) j0) t)) (drop_skip (Bind b) i j0 x e2 H4 +t))))) H2))))) (\lambda (f: F).(\lambda (H1: (drop (r (Flat f) j0) O e2 +e3)).(let H_x \def (IHe1 e3 H1 c2 i H0) in (let H2 \def H_x in (ex2_ind C +(\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 +e2)) (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i +(S j0) c1 (CHead e2 (Flat f) t)))) (\lambda (x: C).(\lambda (H3: (drop (S j0) +O x c2)).(\lambda (H4: (drop i (S j0) x e2)).(ex_intro2 C (\lambda (c1: +C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Flat +f) t))) (CHead x (Flat f) (lift i (r (Flat f) j0) t)) (drop_drop (Flat f) j0 +x c2 H3 (lift i (r (Flat f) j0) t)) (drop_skip (Flat f) i j0 x e2 H4 t))))) +H2))))) k (drop_gen_drop k e2 e3 t j0 H))))))))))) e1)))) j). theorem drop_trans_le: \forall (i: nat).(\forall (d: nat).((le i d) \to (\forall (c1: C).(\forall diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/props.ma index 359869780..dc61e4c29 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop1/props.ma @@ -37,17 +37,17 @@ drop1 return (\lambda (p: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda [(drop1_nil c0) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq C c0 e)).(eq_ind C c (\lambda (c1: C).((eq C c1 e) \to (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u)))) (\lambda -(H3: (eq C c e)).(eq_ind C e (\lambda (c: C).(drop1 PNil (CHead c (Bind b) u) -(CHead e (Bind b) u))) (drop1_nil (CHead e (Bind b) u)) c (sym_eq C c e H3))) -c0 (sym_eq C c0 c H1) H2)))) | (drop1_cons c1 c2 h d H0 c3 hds H1) -\Rightarrow (\lambda (H2: (eq PList (PCons h d hds) PNil)).(\lambda (H3: (eq +(H3: (eq C c e)).(eq_ind C e (\lambda (c1: C).(drop1 PNil (CHead c1 (Bind b) +u) (CHead e (Bind b) u))) (drop1_nil (CHead e (Bind b) u)) c (sym_eq C c e +H3))) c0 (sym_eq C c0 c H1) H2)))) | (drop1_cons c1 c2 h d H0 c3 hds0 H1) +\Rightarrow (\lambda (H2: (eq PList (PCons h d hds0) PNil)).(\lambda (H3: (eq C c1 c)).(\lambda (H4: (eq C c3 e)).((let H5 \def (eq_ind PList (PCons h d -hds) (\lambda (e0: PList).(match e0 in PList return (\lambda (_: PList).Prop) -with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H2) -in (False_ind ((eq C c1 c) \to ((eq C c3 e) \to ((drop h d c1 c2) \to ((drop1 -hds c2 c3) \to (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u)))))) -H5)) H3 H4 H0 H1))))]) in (H0 (refl_equal PList PNil) (refl_equal C c) -(refl_equal C e)))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: +hds0) (\lambda (e0: PList).(match e0 in PList return (\lambda (_: +PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) +I PNil H2) in (False_ind ((eq C c1 c) \to ((eq C c3 e) \to ((drop h d c1 c2) +\to ((drop1 hds0 c2 c3) \to (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind +b) u)))))) H5)) H3 H4 H0 H1))))]) in (H0 (refl_equal PList PNil) (refl_equal +C c) (refl_equal C e)))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: C).(\forall (u: T).((drop1 p c e) \to (drop1 (Ss p) (CHead c (Bind b) (lift1 p u)) (CHead e (Bind b) u))))))).(\lambda (c: C).(\lambda (u: T).(\lambda (H0: (drop1 (PCons n n0 p) @@ -61,40 +61,40 @@ p))).(\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq C c0 e)).((let H4 \def (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H1) in (False_ind ((eq C c0 c) \to ((eq C c0 e) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) -(CHead e (Bind b) u)))) H4)) H2 H3)))) | (drop1_cons c1 c2 h d H1 c3 hds H2) -\Rightarrow (\lambda (H3: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda -(H4: (eq C c1 c)).(\lambda (H5: (eq C c3 e)).((let H6 \def (f_equal PList -PList (\lambda (e0: PList).(match e0 in PList return (\lambda (_: -PList).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) -(PCons h d hds) (PCons n n0 p) H3) in ((let H7 \def (f_equal PList nat +(CHead e (Bind b) u)))) H4)) H2 H3)))) | (drop1_cons c1 c2 h d H1 c3 hds0 H2) +\Rightarrow (\lambda (H3: (eq PList (PCons h d hds0) (PCons n n0 +p))).(\lambda (H4: (eq C c1 c)).(\lambda (H5: (eq C c3 e)).((let H6 \def +(f_equal PList PList (\lambda (e0: PList).(match e0 in PList return (\lambda +(_: PList).PList) with [PNil \Rightarrow hds0 | (PCons _ _ p0) \Rightarrow +p0])) (PCons h d hds0) (PCons n n0 p) H3) in ((let H7 \def (f_equal PList nat (\lambda (e0: PList).(match e0 in PList return (\lambda (_: PList).nat) with -[PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n -n0 p) H3) in ((let H8 \def (f_equal PList nat (\lambda (e0: PList).(match e0 -in PList return (\lambda (_: PList).nat) with [PNil \Rightarrow h | (PCons n -_ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H3) in (eq_ind nat n -(\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c1 c) \to -((eq C c3 e) \to ((drop n1 d c1 c2) \to ((drop1 hds c2 c3) \to (drop1 (PCons -n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) -u))))))))) (\lambda (H9: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: -nat).((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n n1 c1 -c2) \to ((drop1 hds c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind -b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)))))))) (\lambda (H10: (eq -PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c1 c) \to ((eq C c3 -e) \to ((drop n n0 c1 c2) \to ((drop1 p0 c2 c3) \to (drop1 (PCons n (S n0) -(Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))))) -(\lambda (H11: (eq C c1 c)).(eq_ind C c (\lambda (c0: C).((eq C c3 e) \to -((drop n n0 c0 c2) \to ((drop1 p c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) -(CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)))))) (\lambda -(H12: (eq C c3 e)).(eq_ind C e (\lambda (c0: C).((drop n n0 c c2) \to ((drop1 -p c2 c0) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 -(lift1 p u))) (CHead e (Bind b) u))))) (\lambda (H13: (drop n n0 c -c2)).(\lambda (H14: (drop1 p c2 e)).(drop1_cons (CHead c (Bind b) (lift n n0 -(lift1 p u))) (CHead c2 (Bind b) (lift1 p u)) n (S n0) (drop_skip_bind n n0 c -c2 H13 b (lift1 p u)) (CHead e (Bind b) u) (Ss p) (H c2 u H14)))) c3 (sym_eq -C c3 e H12))) c1 (sym_eq C c1 c H11))) hds (sym_eq PList hds p H10))) d -(sym_eq nat d n0 H9))) h (sym_eq nat h n H8))) H7)) H6)) H4 H5 H1 H2))))]) in -(H1 (refl_equal PList (PCons n n0 p)) (refl_equal C c) (refl_equal C -e)))))))))) hds))). +[PNil \Rightarrow d | (PCons _ n1 _) \Rightarrow n1])) (PCons h d hds0) +(PCons n n0 p) H3) in ((let H8 \def (f_equal PList nat (\lambda (e0: +PList).(match e0 in PList return (\lambda (_: PList).nat) with [PNil +\Rightarrow h | (PCons n1 _ _) \Rightarrow n1])) (PCons h d hds0) (PCons n n0 +p) H3) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds0 +p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n1 d c1 c2) \to ((drop1 hds0 +c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 +p u))) (CHead e (Bind b) u))))))))) (\lambda (H9: (eq nat d n0)).(eq_ind nat +n0 (\lambda (n1: nat).((eq PList hds0 p) \to ((eq C c1 c) \to ((eq C c3 e) +\to ((drop n n1 c1 c2) \to ((drop1 hds0 c2 c3) \to (drop1 (PCons n (S n0) (Ss +p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)))))))) +(\lambda (H10: (eq PList hds0 p)).(eq_ind PList p (\lambda (p0: PList).((eq C +c1 c) \to ((eq C c3 e) \to ((drop n n0 c1 c2) \to ((drop1 p0 c2 c3) \to +(drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) +(CHead e (Bind b) u))))))) (\lambda (H11: (eq C c1 c)).(eq_ind C c (\lambda +(c0: C).((eq C c3 e) \to ((drop n n0 c0 c2) \to ((drop1 p c2 c3) \to (drop1 +(PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e +(Bind b) u)))))) (\lambda (H12: (eq C c3 e)).(eq_ind C e (\lambda (c0: +C).((drop n n0 c c2) \to ((drop1 p c2 c0) \to (drop1 (PCons n (S n0) (Ss p)) +(CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))) (\lambda +(H13: (drop n n0 c c2)).(\lambda (H14: (drop1 p c2 e)).(drop1_cons (CHead c +(Bind b) (lift n n0 (lift1 p u))) (CHead c2 (Bind b) (lift1 p u)) n (S n0) +(drop_skip_bind n n0 c c2 H13 b (lift1 p u)) (CHead e (Bind b) u) (Ss p) (H +c2 u H14)))) c3 (sym_eq C c3 e H12))) c1 (sym_eq C c1 c H11))) hds0 (sym_eq +PList hds0 p H10))) d (sym_eq nat d n0 H9))) h (sym_eq nat h n H8))) H7)) +H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList (PCons n n0 p)) (refl_equal C +c) (refl_equal C e)))))))))) hds))). theorem drop1_cons_tail: \forall (c2: C).(\forall (c3: C).(\forall (h: nat).(\forall (d: nat).((drop @@ -113,52 +113,53 @@ c1)).(\lambda (H3: (eq C c c2)).(eq_ind C c1 (\lambda (c0: C).((eq C c0 c2) \to (drop1 (PCons h d PNil) c1 c3))) (\lambda (H4: (eq C c1 c2)).(eq_ind C c2 (\lambda (c0: C).(drop1 (PCons h d PNil) c0 c3)) (drop1_cons c2 c3 h d H c3 PNil (drop1_nil c3)) c1 (sym_eq C c1 c2 H4))) c (sym_eq C c c1 H2) H3)))) | -(drop1_cons c0 c4 h0 d0 H1 c5 hds H2) \Rightarrow (\lambda (H3: (eq PList -(PCons h0 d0 hds) PNil)).(\lambda (H4: (eq C c0 c1)).(\lambda (H5: (eq C c5 -c2)).((let H6 \def (eq_ind PList (PCons h0 d0 hds) (\lambda (e: PList).(match -e in PList return (\lambda (_: PList).Prop) with [PNil \Rightarrow False | -(PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c0 c1) \to -((eq C c5 c2) \to ((drop h0 d0 c0 c4) \to ((drop1 hds c4 c5) \to (drop1 -(PCons h d PNil) c1 c3))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList -PNil) (refl_equal C c1) (refl_equal C c2))))) (\lambda (n: nat).(\lambda (n0: -nat).(\lambda (p: PList).(\lambda (H0: ((\forall (c1: C).((drop1 p c1 c2) \to -(drop1 (PConsTail p h d) c1 c3))))).(\lambda (c1: C).(\lambda (H1: (drop1 -(PCons n n0 p) c1 c2)).(let H2 \def (match H1 in drop1 return (\lambda (p0: -PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p0 c c0)).((eq -PList p0 (PCons n n0 p)) \to ((eq C c c1) \to ((eq C c0 c2) \to (drop1 (PCons -n n0 (PConsTail p h d)) c1 c3)))))))) with [(drop1_nil c) \Rightarrow -(\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c -c1)).(\lambda (H4: (eq C c c2)).((let H5 \def (eq_ind PList PNil (\lambda (e: +(drop1_cons c0 c4 h0 d0 H1 c5 hds0 H2) \Rightarrow (\lambda (H3: (eq PList +(PCons h0 d0 hds0) PNil)).(\lambda (H4: (eq C c0 c1)).(\lambda (H5: (eq C c5 +c2)).((let H6 \def (eq_ind PList (PCons h0 d0 hds0) (\lambda (e: PList).(match e in PList return (\lambda (_: PList).Prop) with [PNil -\Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in -(False_ind ((eq C c c1) \to ((eq C c c2) \to (drop1 (PCons n n0 (PConsTail p -h d)) c1 c3))) H5)) H3 H4)))) | (drop1_cons c0 c4 h0 d0 H2 c5 hds H3) -\Rightarrow (\lambda (H4: (eq PList (PCons h0 d0 hds) (PCons n n0 -p))).(\lambda (H5: (eq C c0 c1)).(\lambda (H6: (eq C c5 c2)).((let H7 \def -(f_equal PList PList (\lambda (e: PList).(match e in PList return (\lambda -(_: PList).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) -(PCons h0 d0 hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat -(\lambda (e: PList).(match e in PList return (\lambda (_: PList).nat) with -[PNil \Rightarrow d0 | (PCons _ n _) \Rightarrow n])) (PCons h0 d0 hds) -(PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: -PList).(match e in PList return (\lambda (_: PList).nat) with [PNil -\Rightarrow h0 | (PCons n _ _) \Rightarrow n])) (PCons h0 d0 hds) (PCons n n0 -p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d0 n0) \to ((eq PList hds -p) \to ((eq C c0 c1) \to ((eq C c5 c2) \to ((drop n1 d0 c0 c4) \to ((drop1 -hds c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3)))))))) (\lambda -(H10: (eq nat d0 n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to -((eq C c0 c1) \to ((eq C c5 c2) \to ((drop n n1 c0 c4) \to ((drop1 hds c4 c5) -\to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3))))))) (\lambda (H11: (eq -PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c0 c1) \to ((eq C -c5 c2) \to ((drop n n0 c0 c4) \to ((drop1 p0 c4 c5) \to (drop1 (PCons n n0 -(PConsTail p h d)) c1 c3)))))) (\lambda (H12: (eq C c0 c1)).(eq_ind C c1 -(\lambda (c: C).((eq C c5 c2) \to ((drop n n0 c c4) \to ((drop1 p c4 c5) \to -(drop1 (PCons n n0 (PConsTail p h d)) c1 c3))))) (\lambda (H13: (eq C c5 -c2)).(eq_ind C c2 (\lambda (c: C).((drop n n0 c1 c4) \to ((drop1 p c4 c) \to -(drop1 (PCons n n0 (PConsTail p h d)) c1 c3)))) (\lambda (H14: (drop n n0 c1 -c4)).(\lambda (H15: (drop1 p c4 c2)).(drop1_cons c1 c4 n n0 H14 c3 (PConsTail -p h d) (H0 c4 H15)))) c5 (sym_eq C c5 c2 H13))) c0 (sym_eq C c0 c1 H12))) hds -(sym_eq PList hds p H11))) d0 (sym_eq nat d0 n0 H10))) h0 (sym_eq nat h0 n -H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) +\Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in +(False_ind ((eq C c0 c1) \to ((eq C c5 c2) \to ((drop h0 d0 c0 c4) \to +((drop1 hds0 c4 c5) \to (drop1 (PCons h d PNil) c1 c3))))) H6)) H4 H5 H1 +H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c1) (refl_equal C +c2))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda +(H0: ((\forall (c1: C).((drop1 p c1 c2) \to (drop1 (PConsTail p h d) c1 +c3))))).(\lambda (c1: C).(\lambda (H1: (drop1 (PCons n n0 p) c1 c2)).(let H2 +\def (match H1 in drop1 return (\lambda (p0: PList).(\lambda (c: C).(\lambda +(c0: C).(\lambda (_: (drop1 p0 c c0)).((eq PList p0 (PCons n n0 p)) \to ((eq +C c c1) \to ((eq C c0 c2) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 +c3)))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil +(PCons n n0 p))).(\lambda (H3: (eq C c c1)).(\lambda (H4: (eq C c c2)).((let +H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e in PList return +(\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) +\Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c1) \to ((eq +C c c2) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3))) H5)) H3 H4)))) | +(drop1_cons c0 c4 h0 d0 H2 c5 hds0 H3) \Rightarrow (\lambda (H4: (eq PList +(PCons h0 d0 hds0) (PCons n n0 p))).(\lambda (H5: (eq C c0 c1)).(\lambda (H6: +(eq C c5 c2)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e +in PList return (\lambda (_: PList).PList) with [PNil \Rightarrow hds0 | +(PCons _ _ p0) \Rightarrow p0])) (PCons h0 d0 hds0) (PCons n n0 p) H4) in +((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e in PList return +(\lambda (_: PList).nat) with [PNil \Rightarrow d0 | (PCons _ n1 _) +\Rightarrow n1])) (PCons h0 d0 hds0) (PCons n n0 p) H4) in ((let H9 \def +(f_equal PList nat (\lambda (e: PList).(match e in PList return (\lambda (_: +PList).nat) with [PNil \Rightarrow h0 | (PCons n1 _ _) \Rightarrow n1])) +(PCons h0 d0 hds0) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: +nat).((eq nat d0 n0) \to ((eq PList hds0 p) \to ((eq C c0 c1) \to ((eq C c5 +c2) \to ((drop n1 d0 c0 c4) \to ((drop1 hds0 c4 c5) \to (drop1 (PCons n n0 +(PConsTail p h d)) c1 c3)))))))) (\lambda (H10: (eq nat d0 n0)).(eq_ind nat +n0 (\lambda (n1: nat).((eq PList hds0 p) \to ((eq C c0 c1) \to ((eq C c5 c2) +\to ((drop n n1 c0 c4) \to ((drop1 hds0 c4 c5) \to (drop1 (PCons n n0 +(PConsTail p h d)) c1 c3))))))) (\lambda (H11: (eq PList hds0 p)).(eq_ind +PList p (\lambda (p0: PList).((eq C c0 c1) \to ((eq C c5 c2) \to ((drop n n0 +c0 c4) \to ((drop1 p0 c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 +c3)))))) (\lambda (H12: (eq C c0 c1)).(eq_ind C c1 (\lambda (c: C).((eq C c5 +c2) \to ((drop n n0 c c4) \to ((drop1 p c4 c5) \to (drop1 (PCons n n0 +(PConsTail p h d)) c1 c3))))) (\lambda (H13: (eq C c5 c2)).(eq_ind C c2 +(\lambda (c: C).((drop n n0 c1 c4) \to ((drop1 p c4 c) \to (drop1 (PCons n n0 +(PConsTail p h d)) c1 c3)))) (\lambda (H14: (drop n n0 c1 c4)).(\lambda (H15: +(drop1 p c4 c2)).(drop1_cons c1 c4 n n0 H14 c3 (PConsTail p h d) (H0 c4 +H15)))) c5 (sym_eq C c5 c2 H13))) c0 (sym_eq C c0 c1 H12))) hds0 (sym_eq +PList hds0 p H11))) d0 (sym_eq nat d0 n0 H10))) h0 (sym_eq nat h0 n H9))) +H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c1) (refl_equal C c2))))))))) hds)))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/flt/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/flt/props.ma index 93edf9062..4602f2c6d 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/flt/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/flt/props.ma @@ -97,9 +97,9 @@ t2)) (S O)) H (le_S_n (plus (cweight c2) (S O)) (plus (plus (cweight c2) t2)) (le_n (S O)))))))))))))). theorem flt_wf__q_ind: - \forall (P: ((C \to (T \to Prop)))).(((\forall (n: nat).((\lambda (P: ((C + \forall (P: ((C \to (T \to Prop)))).(((\forall (n: nat).((\lambda (P0: ((C \to (T \to Prop)))).(\lambda (n0: nat).(\forall (c: C).(\forall (t: T).((eq -nat (fweight c t) n0) \to (P c t)))))) P n))) \to (\forall (c: C).(\forall +nat (fweight c t) n0) \to (P0 c t)))))) P n))) \to (\forall (c: C).(\forall (t: T).(P c t)))) \def let Q \def (\lambda (P: ((C \to (T \to Prop)))).(\lambda (n: nat).(\forall @@ -120,9 +120,9 @@ T).(((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 t2) \to (P c1 t1))))) \to (P c2 t2)))))).(\lambda (c: C).(\lambda (t: T).(flt_wf__q_ind P (\lambda (n: nat).(lt_wf_ind n (Q P) (\lambda (n0: nat).(\lambda (H0: ((\forall (m: nat).((lt m n0) \to (Q P m))))).(\lambda (c0: C).(\lambda (t0: T).(\lambda -(H1: (eq nat (fweight c0 t0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n: -nat).(\forall (m: nat).((lt m n) \to (\forall (c: C).(\forall (t: T).((eq nat -(fweight c t) m) \to (P c t))))))) H0 (fweight c0 t0) H1) in (H c0 t0 +(H1: (eq nat (fweight c0 t0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n1: +nat).(\forall (m: nat).((lt m n1) \to (\forall (c1: C).(\forall (t1: T).((eq +nat (fweight c1 t1) m) \to (P c1 t1))))))) H0 (fweight c0 t0) H1) in (H c0 t0 (\lambda (c1: C).(\lambda (t1: T).(\lambda (H3: (flt c1 t1 c0 t0)).(H2 (fweight c1 t1) H3 c1 t1 (refl_equal nat (fweight c1 t1))))))))))))))) c t))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/clear.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/clear.ma index 4ea8569d7..bc8c31cf9 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/clear.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/clear.ma @@ -38,18 +38,17 @@ C).(C_ind (\lambda (c: C).(\forall (c3: C).((getl (S n) c c3) \to (\forall c3))))))) (\lambda (c: C).(\lambda (_: ((\forall (c3: C).((getl (S n) c c3) \to (\forall (c1: C).((clear c1 c) \to (getl (S n) c1 c3))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: C).(\lambda (H1: (getl (S n) (CHead c k t) -c3)).(\lambda (c1: C).(\lambda (H2: (clear c1 (CHead c k t))).((match k in K -return (\lambda (k0: K).((getl (S n) (CHead c k0 t) c3) \to ((clear c1 (CHead -c k0 t)) \to (getl (S n) c1 c3)))) with [(Bind b) \Rightarrow (\lambda (H3: -(getl (S n) (CHead c (Bind b) t) c3)).(\lambda (H4: (clear c1 (CHead c (Bind -b) t))).(let H5 \def (getl_gen_all c c3 (r (Bind b) n) (getl_gen_S (Bind b) c -c3 t n H3)) in (ex2_ind C (\lambda (e: C).(drop n O c e)) (\lambda (e: -C).(clear e c3)) (getl (S n) c1 c3) (\lambda (x: C).(\lambda (H6: (drop n O c -x)).(\lambda (H7: (clear x c3)).(getl_intro (S n) c1 c3 x (drop_clear_O b c1 -c t H4 x n H6) H7)))) H5)))) | (Flat f) \Rightarrow (\lambda (_: (getl (S n) -(CHead c (Flat f) t) c3)).(\lambda (H4: (clear c1 (CHead c (Flat f) -t))).(clear_gen_flat_r f c1 c t H4 (getl (S n) c1 c3))))]) H1 H2))))))))) -c2)))) i). +c3)).(\lambda (c1: C).(\lambda (H2: (clear c1 (CHead c k t))).(K_ind (\lambda +(k0: K).((getl (S n) (CHead c k0 t) c3) \to ((clear c1 (CHead c k0 t)) \to +(getl (S n) c1 c3)))) (\lambda (b: B).(\lambda (H3: (getl (S n) (CHead c +(Bind b) t) c3)).(\lambda (H4: (clear c1 (CHead c (Bind b) t))).(let H5 \def +(getl_gen_all c c3 (r (Bind b) n) (getl_gen_S (Bind b) c c3 t n H3)) in +(ex2_ind C (\lambda (e: C).(drop n O c e)) (\lambda (e: C).(clear e c3)) +(getl (S n) c1 c3) (\lambda (x: C).(\lambda (H6: (drop n O c x)).(\lambda +(H7: (clear x c3)).(getl_intro (S n) c1 c3 x (drop_clear_O b c1 c t H4 x n +H6) H7)))) H5))))) (\lambda (f: F).(\lambda (_: (getl (S n) (CHead c (Flat f) +t) c3)).(\lambda (H4: (clear c1 (CHead c (Flat f) t))).(clear_gen_flat_r f c1 +c t H4 (getl (S n) c1 c3))))) k H1 H2))))))))) c2)))) i). theorem getl_clear_trans: \forall (i: nat).(\forall (c1: C).(\forall (c2: C).((getl i c1 c2) \to @@ -85,27 +84,27 @@ C).(\forall (v: T).((clear c0 (CHead e1 (Bind b) v)) \to (\forall (e2: C).(\forall (n: nat).((getl n e1 e2) \to (getl (S n) c0 e2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (v: T).(\lambda (H0: (clear (CHead c0 k t) (CHead e1 (Bind b) v))).(\lambda (e2: C).(\lambda (n: -nat).(\lambda (H1: (getl n e1 e2)).((match k in K return (\lambda (k0: -K).((clear (CHead c0 k0 t) (CHead e1 (Bind b) v)) \to (getl (S n) (CHead c0 -k0 t) e2))) with [(Bind b0) \Rightarrow (\lambda (H2: (clear (CHead c0 (Bind -b0) t) (CHead e1 (Bind b) v))).(let H3 \def (f_equal C C (\lambda (e: -C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow e1 | -(CHead c _ _) \Rightarrow c])) (CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) -(clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in ((let H4 \def (f_equal -C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with [(CSort _) -\Rightarrow b | (CHead _ k _) \Rightarrow (match k in K return (\lambda (_: -K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e1 +nat).(\lambda (H1: (getl n e1 e2)).(K_ind (\lambda (k0: K).((clear (CHead c0 +k0 t) (CHead e1 (Bind b) v)) \to (getl (S n) (CHead c0 k0 t) e2))) (\lambda +(b0: B).(\lambda (H2: (clear (CHead c0 (Bind b0) t) (CHead e1 (Bind b) +v))).(let H3 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda +(_: C).C) with [(CSort _) \Rightarrow e1 | (CHead c1 _ _) \Rightarrow c1])) +(CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 +(Bind b) v) t H2)) in ((let H4 \def (f_equal C B (\lambda (e: C).(match e in +C return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k0 _) +\Rightarrow (match k0 in K return (\lambda (_: K).B) with [(Bind b1) +\Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead e1 (Bind b) v) (CHead c0 +(Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in ((let H5 +\def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) +with [(CSort _) \Rightarrow v | (CHead _ _ t0) \Rightarrow t0])) (CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) -v) t H2)) in ((let H5 \def (f_equal C T (\lambda (e: C).(match e in C return -(\lambda (_: C).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow -t])) (CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 -(CHead e1 (Bind b) v) t H2)) in (\lambda (H6: (eq B b b0)).(\lambda (H7: (eq -C e1 c0)).(let H8 \def (eq_ind C e1 (\lambda (c: C).(getl n c e2)) H1 c0 H7) -in (eq_ind B b (\lambda (b1: B).(getl (S n) (CHead c0 (Bind b1) t) e2)) -(getl_head (Bind b) n c0 e2 H8 t) b0 H6))))) H4)) H3))) | (Flat f) -\Rightarrow (\lambda (H2: (clear (CHead c0 (Flat f) t) (CHead e1 (Bind b) -v))).(getl_flat c0 e2 (S n) (H e1 v (clear_gen_flat f c0 (CHead e1 (Bind b) -v) t H2) e2 n H1) f t))]) H0))))))))))) c)). +v) t H2)) in (\lambda (H6: (eq B b b0)).(\lambda (H7: (eq C e1 c0)).(let H8 +\def (eq_ind C e1 (\lambda (c1: C).(getl n c1 e2)) H1 c0 H7) in (eq_ind B b +(\lambda (b1: B).(getl (S n) (CHead c0 (Bind b1) t) e2)) (getl_head (Bind b) +n c0 e2 H8 t) b0 H6))))) H4)) H3)))) (\lambda (f: F).(\lambda (H2: (clear +(CHead c0 (Flat f) t) (CHead e1 (Bind b) v))).(getl_flat c0 e2 (S n) (H e1 v +(clear_gen_flat f c0 (CHead e1 (Bind b) v) t H2) e2 n H1) f t))) k +H0))))))))))) c)). theorem getl_clear_conf: \forall (i: nat).(\forall (c1: C).(\forall (c3: C).((getl i c1 c3) \to @@ -132,14 +131,13 @@ c2)).(getl_gen_sort n0 (S n) c3 H0 (getl (S n) c2 c3))))))) (\lambda (c: C).(\lambda (H0: ((\forall (c3: C).((getl (S n) c c3) \to (\forall (c2: C).((clear c c2) \to (getl (S n) c2 c3))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: C).(\lambda (H1: (getl (S n) (CHead c k t) c3)).(\lambda -(c2: C).(\lambda (H2: (clear (CHead c k t) c2)).((match k in K return -(\lambda (k0: K).((getl (S n) (CHead c k0 t) c3) \to ((clear (CHead c k0 t) -c2) \to (getl (S n) c2 c3)))) with [(Bind b) \Rightarrow (\lambda (H3: (getl -(S n) (CHead c (Bind b) t) c3)).(\lambda (H4: (clear (CHead c (Bind b) t) -c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: C).(getl (S n) c0 c3)) -(getl_head (Bind b) n c c3 (getl_gen_S (Bind b) c c3 t n H3) t) c2 -(clear_gen_bind b c c2 t H4)))) | (Flat f) \Rightarrow (\lambda (H3: (getl (S -n) (CHead c (Flat f) t) c3)).(\lambda (H4: (clear (CHead c (Flat f) t) -c2)).(H0 c3 (getl_gen_S (Flat f) c c3 t n H3) c2 (clear_gen_flat f c c2 t -H4))))]) H1 H2))))))))) c1)))) i). +(c2: C).(\lambda (H2: (clear (CHead c k t) c2)).(K_ind (\lambda (k0: +K).((getl (S n) (CHead c k0 t) c3) \to ((clear (CHead c k0 t) c2) \to (getl +(S n) c2 c3)))) (\lambda (b: B).(\lambda (H3: (getl (S n) (CHead c (Bind b) +t) c3)).(\lambda (H4: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C (CHead c +(Bind b) t) (\lambda (c0: C).(getl (S n) c0 c3)) (getl_head (Bind b) n c c3 +(getl_gen_S (Bind b) c c3 t n H3) t) c2 (clear_gen_bind b c c2 t H4))))) +(\lambda (f: F).(\lambda (H3: (getl (S n) (CHead c (Flat f) t) c3)).(\lambda +(H4: (clear (CHead c (Flat f) t) c2)).(H0 c3 (getl_gen_S (Flat f) c c3 t n +H3) c2 (clear_gen_flat f c c2 t H4))))) k H1 H2))))))))) c1)))) i). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/dec.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/dec.ma index 59c3775bb..6d892bdae 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/dec.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/dec.ma @@ -34,19 +34,18 @@ Prop).(getl_gen_sort n i d H P))))))) (\lambda (c0: C).(\lambda (H: ((\forall (i: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl i c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl i c0 d) \to (\forall (P: Prop).P))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (i: -nat).(match i in nat return (\lambda (n: nat).(or (ex_3 C B T (\lambda (e: -C).(\lambda (b: B).(\lambda (v: T).(getl n (CHead c0 k t) (CHead e (Bind b) -v)))))) (\forall (d: C).((getl n (CHead c0 k t) d) \to (\forall (P: -Prop).P))))) with [O \Rightarrow (match k in K return (\lambda (k0: K).(or -(ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 -k0 t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 k0 t) d) -\to (\forall (P: Prop).P))))) with [(Bind b) \Rightarrow (or_introl (ex_3 C B -T (\lambda (e: C).(\lambda (b0: B).(\lambda (v: T).(getl O (CHead c0 (Bind b) -t) (CHead e (Bind b0) v)))))) (\forall (d: C).((getl O (CHead c0 (Bind b) t) -d) \to (\forall (P: Prop).P))) (ex_3_intro C B T (\lambda (e: C).(\lambda -(b0: B).(\lambda (v: T).(getl O (CHead c0 (Bind b) t) (CHead e (Bind b0) -v))))) c0 b t (getl_refl b c0 t))) | (Flat f) \Rightarrow (let H_x \def (H O) -in (let H0 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: +nat).(nat_ind (\lambda (n: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: +B).(\lambda (v: T).(getl n (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall +(d: C).((getl n (CHead c0 k t) d) \to (\forall (P: Prop).P))))) (K_ind +(\lambda (k0: K).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: +T).(getl O (CHead c0 k0 t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O +(CHead c0 k0 t) d) \to (\forall (P: Prop).P))))) (\lambda (b: B).(or_introl +(ex_3 C B T (\lambda (e: C).(\lambda (b0: B).(\lambda (v: T).(getl O (CHead +c0 (Bind b) t) (CHead e (Bind b0) v)))))) (\forall (d: C).((getl O (CHead c0 +(Bind b) t) d) \to (\forall (P: Prop).P))) (ex_3_intro C B T (\lambda (e: +C).(\lambda (b0: B).(\lambda (v: T).(getl O (CHead c0 (Bind b) t) (CHead e +(Bind b0) v))))) c0 b t (getl_refl b c0 t)))) (\lambda (f: F).(let H_x \def +(H O) in (let H0 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl O c0 d) \to (\forall (P: Prop).P))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e @@ -69,29 +68,32 @@ B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P))) (\lambda (d: C).(\lambda (H2: (getl O (CHead c0 (Flat f) t) d)).(\lambda (P: Prop).(H1 d (getl_intro O c0 d c0 (drop_refl c0) (clear_gen_flat f c0 d t -(getl_gen_O (CHead c0 (Flat f) t) d H2))) P)))))) H0)))]) | (S n) \Rightarrow -(let H_x \def (H (r k n)) in (let H0 \def H_x in (or_ind (ex_3 C B T (\lambda -(e: C).(\lambda (b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) -v)))))) (\forall (d: C).((getl (r k n) c0 d) \to (\forall (P: Prop).P))) (or -(ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) -(CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead -c0 k t) d) \to (\forall (P: Prop).P)))) (\lambda (H1: (ex_3 C B T (\lambda -(e: C).(\lambda (b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) -v))))))).(ex_3_ind C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: -T).(getl (r k n) c0 (CHead e (Bind b) v))))) (or (ex_3 C B T (\lambda (e: -C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind -b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: -Prop).P)))) (\lambda (x0: C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H2: -(getl (r k n) c0 (CHead x0 (Bind x1) x2))).(or_introl (ex_3 C B T (\lambda -(e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e -(Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall -(P: Prop).P))) (ex_3_intro C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: -T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v))))) x0 x1 x2 (getl_head k -n c0 (CHead x0 (Bind x1) x2) H2 t))))))) H1)) (\lambda (H1: ((\forall (d: -C).((getl (r k n) c0 d) \to (\forall (P: Prop).P))))).(or_intror (ex_3 C B T +(getl_gen_O (CHead c0 (Flat f) t) d H2))) P)))))) H0)))) k) (\lambda (n: +nat).(\lambda (_: (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda +(v: T).(getl n (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: +C).((getl n (CHead c0 k t) d) \to (\forall (P: Prop).P))))).(let H_x \def (H +(r k n)) in (let H1 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda +(b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v)))))) (\forall +(d: C).((getl (r k n) c0 d) \to (\forall (P: Prop).P))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to -(\forall (P: Prop).P))) (\lambda (d: C).(\lambda (H2: (getl (S n) (CHead c0 k -t) d)).(\lambda (P: Prop).(H1 d (getl_gen_S k c0 d t n H2) P)))))) -H0)))])))))) c). +(\forall (P: Prop).P)))) (\lambda (H2: (ex_3 C B T (\lambda (e: C).(\lambda +(b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v))))))).(ex_3_ind +C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (r k n) c0 (CHead +e (Bind b) v))))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda +(v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: +C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P)))) (\lambda (x0: +C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H3: (getl (r k n) c0 (CHead x0 +(Bind x1) x2))).(or_introl (ex_3 C B T (\lambda (e: C).(\lambda (b: +B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) +(\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P))) +(ex_3_intro C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) +(CHead c0 k t) (CHead e (Bind b) v))))) x0 x1 x2 (getl_head k n c0 (CHead x0 +(Bind x1) x2) H3 t))))))) H2)) (\lambda (H2: ((\forall (d: C).((getl (r k n) +c0 d) \to (\forall (P: Prop).P))))).(or_intror (ex_3 C B T (\lambda (e: +C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind +b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: +Prop).P))) (\lambda (d: C).(\lambda (H3: (getl (S n) (CHead c0 k t) +d)).(\lambda (P: Prop).(H2 d (getl_gen_S k c0 d t n H3) P)))))) H1))))) +i)))))) c). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/drop.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/drop.ma index bfd400420..38d2f9dc7 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/drop.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/drop.ma @@ -40,21 +40,21 @@ T).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((getl n (CHead c0 k t) (CHead c0 k0 t) (CHead e (Bind b) u)) \to (drop (S O) O (CHead c0 k0 t) e))) (\lambda (b0: B).(\lambda (H1: (clear (CHead c0 (Bind b0) t) (CHead e (Bind b) u))).(let H2 \def (f_equal C C (\lambda (e0: C).(match e0 in C return -(\lambda (_: C).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow -c])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead -e (Bind b) u) t H1)) in ((let H3 \def (f_equal C B (\lambda (e0: C).(match e0 -in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) -\Rightarrow (match k in K return (\lambda (_: K).B) with [(Bind b) -\Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e (Bind b) u) (CHead c0 -(Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H4 -\def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) -with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead e (Bind -b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t -H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C e c0)).(eq_ind_r C c0 -(\lambda (c1: C).(drop (S O) O (CHead c0 (Bind b0) t) c1)) (eq_ind B b -(\lambda (b1: B).(drop (S O) O (CHead c0 (Bind b1) t) c0)) (drop_drop (Bind -b) O c0 c0 (drop_refl c0) t) b0 H5) e H6)))) H3)) H2)))) (\lambda (f: -F).(\lambda (H1: (clear (CHead c0 (Flat f) t) (CHead e (Bind b) +(\lambda (_: C).C) with [(CSort _) \Rightarrow e | (CHead c1 _ _) \Rightarrow +c1])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 +(CHead e (Bind b) u) t H1)) in ((let H3 \def (f_equal C B (\lambda (e0: +C).(match e0 in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | +(CHead _ k0 _) \Rightarrow (match k0 in K return (\lambda (_: K).B) with +[(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead e (Bind b) u) +(CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in +((let H4 \def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda +(_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) +(CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e +(Bind b) u) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C e +c0)).(eq_ind_r C c0 (\lambda (c1: C).(drop (S O) O (CHead c0 (Bind b0) t) +c1)) (eq_ind B b (\lambda (b1: B).(drop (S O) O (CHead c0 (Bind b1) t) c0)) +(drop_drop (Bind b) O c0 c0 (drop_refl c0) t) b0 H5) e H6)))) H3)) H2)))) +(\lambda (f: F).(\lambda (H1: (clear (CHead c0 (Flat f) t) (CHead e (Bind b) u))).(drop_clear_O b (CHead c0 (Flat f) t) e u (clear_flat c0 (CHead e (Bind b) u) (clear_gen_flat f c0 (CHead e (Bind b) u) t H1) f t) e O (drop_refl e)))) k (getl_gen_O (CHead c0 k t) (CHead e (Bind b) u) H0))) (\lambda (n: @@ -99,153 +99,240 @@ nat).(\lambda (H1: (drop h (S (plus i d)) (CHead c0 k t) e)).(let H2 \def (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x: C).(\lambda (H3: (drop i O (CHead c0 k t) x)).(\lambda (H4: (clear x (CHead -c1 (Bind b) u))).((match x in C return (\lambda (c2: C).((drop i O (CHead c0 -k t) c2) \to ((clear c2 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: -T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: -C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop -h d c1 e0))))))) with [(CSort n) \Rightarrow (\lambda (_: (drop i O (CHead c0 -k t) (CSort n))).(\lambda (H6: (clear (CSort n) (CHead c1 (Bind b) -u))).(clear_gen_sort (CHead c1 (Bind b) u) n H6 (ex3_2 T C (\lambda (v: -T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: -C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop -h d c1 e0))))))) | (CHead c2 k0 t0) \Rightarrow (\lambda (H5: (drop i O -(CHead c0 k t) (CHead c2 k0 t0))).(\lambda (H6: (clear (CHead c2 k0 t0) -(CHead c1 (Bind b) u))).((match k0 in K return (\lambda (k1: K).((drop i O -(CHead c0 k t) (CHead c2 k1 t0)) \to ((clear (CHead c2 k1 t0) (CHead c1 (Bind -b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) +c1 (Bind b) u))).(C_ind (\lambda (c2: C).((drop i O (CHead c0 k t) c2) \to +((clear c2 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: +C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead +e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) +(\lambda (n: nat).(\lambda (_: (drop i O (CHead c0 k t) (CSort n))).(\lambda +(H6: (clear (CSort n) (CHead c1 (Bind b) u))).(clear_gen_sort (CHead c1 (Bind +b) u) n H6 (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) +(\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda +(_: T).(\lambda (e0: C).(drop h d c1 e0)))))))) (\lambda (x0: C).(\lambda +(IHx: (((drop i O (CHead c0 k t) x0) \to ((clear x0 (CHead c1 (Bind b) u)) +\to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda -(_: T).(\lambda (e0: C).(drop h d c1 e0))))))) with [(Bind b0) \Rightarrow -(\lambda (H7: (drop i O (CHead c0 k t) (CHead c2 (Bind b0) t0))).(\lambda -(H8: (clear (CHead c2 (Bind b0) t0) (CHead c1 (Bind b) u))).(let H9 \def +(_: T).(\lambda (e0: C).(drop h d c1 e0)))))))).(\lambda (k0: K).(\lambda +(t0: T).(\lambda (H5: (drop i O (CHead c0 k t) (CHead x0 k0 t0))).(\lambda +(H6: (clear (CHead x0 k0 t0) (CHead c1 (Bind b) u))).(K_ind (\lambda (k1: +K).((drop i O (CHead c0 k t) (CHead x0 k1 t0)) \to ((clear (CHead x0 k1 t0) +(CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u +(lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) (\lambda (b0: +B).(\lambda (H7: (drop i O (CHead c0 k t) (CHead x0 (Bind b0) t0))).(\lambda +(H8: (clear (CHead x0 (Bind b0) t0) (CHead c1 (Bind b) u))).(let H9 \def (f_equal C C (\lambda (e0: C).(match e0 in C return (\lambda (_: C).C) with -[(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind b) -u) (CHead c2 (Bind b0) t0) (clear_gen_bind b0 c2 (CHead c1 (Bind b) u) t0 +[(CSort _) \Rightarrow c1 | (CHead c2 _ _) \Rightarrow c2])) (CHead c1 (Bind +b) u) (CHead x0 (Bind b0) t0) (clear_gen_bind b0 x0 (CHead c1 (Bind b) u) t0 H8)) in ((let H10 \def (f_equal C B (\lambda (e0: C).(match e0 in C return -(\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow -(match k in K return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat -_) \Rightarrow b])])) (CHead c1 (Bind b) u) (CHead c2 (Bind b0) t0) -(clear_gen_bind b0 c2 (CHead c1 (Bind b) u) t0 H8)) in ((let H11 \def +(\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k1 _) \Rightarrow +(match k1 in K return (\lambda (_: K).B) with [(Bind b1) \Rightarrow b1 | +(Flat _) \Rightarrow b])])) (CHead c1 (Bind b) u) (CHead x0 (Bind b0) t0) +(clear_gen_bind b0 x0 (CHead c1 (Bind b) u) t0 H8)) in ((let H11 \def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) with -[(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind b) -u) (CHead c2 (Bind b0) t0) (clear_gen_bind b0 c2 (CHead c1 (Bind b) u) t0 -H8)) in (\lambda (H12: (eq B b b0)).(\lambda (H13: (eq C c1 c2)).(let H14 -\def (eq_ind_r T t0 (\lambda (t0: T).(drop i O (CHead c0 k t) (CHead c2 (Bind -b0) t0))) H7 u H11) in (let H15 \def (eq_ind_r B b0 (\lambda (b: B).(drop i O -(CHead c0 k t) (CHead c2 (Bind b) u))) H14 b H12) in (let H16 \def (eq_ind_r -C c2 (\lambda (c: C).(drop i O (CHead c0 k t) (CHead c (Bind b) u))) H15 c1 -H13) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r -(Bind b) d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i O e (CHead e0 -(Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r (Bind b) d) c1 -e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) -(\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda -(_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x0: T).(\lambda (x1: -C).(\lambda (H17: (eq T u (lift h (r (Bind b) d) x0))).(\lambda (H18: (drop i -O e (CHead x1 (Bind b) x0))).(\lambda (H19: (drop h (r (Bind b) d) c1 -x1)).(eq_ind_r T (lift h (r (Bind b) d) x0) (\lambda (t1: T).(ex3_2 T C +[(CSort _) \Rightarrow u | (CHead _ _ t1) \Rightarrow t1])) (CHead c1 (Bind +b) u) (CHead x0 (Bind b0) t0) (clear_gen_bind b0 x0 (CHead c1 (Bind b) u) t0 +H8)) in (\lambda (H12: (eq B b b0)).(\lambda (H13: (eq C c1 x0)).(let H14 +\def (eq_ind_r T t0 (\lambda (t1: T).(drop i O (CHead c0 k t) (CHead x0 (Bind +b0) t1))) H7 u H11) in (let H15 \def (eq_ind_r B b0 (\lambda (b1: B).(drop i +O (CHead c0 k t) (CHead x0 (Bind b1) u))) H14 b H12) in (let H16 \def +(eq_ind_r C x0 (\lambda (c2: C).((drop i O (CHead c0 k t) c2) \to ((clear c2 +(CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u +(lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) IHx c1 H13) in +(let H17 \def (eq_ind_r C x0 (\lambda (c2: C).(drop i O (CHead c0 k t) (CHead +c2 (Bind b) u))) H15 c1 H13) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: +C).(eq T u (lift h (r (Bind b) d) v)))) (\lambda (v: T).(\lambda (e0: +C).(drop i O e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: +C).(drop h (r (Bind b) d) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: +C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead +e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) +(\lambda (x1: T).(\lambda (x2: C).(\lambda (H18: (eq T u (lift h (r (Bind b) +d) x1))).(\lambda (H19: (drop i O e (CHead x2 (Bind b) x1))).(\lambda (H20: +(drop h (r (Bind b) d) c1 x2)).(let H21 \def (eq_ind T u (\lambda (t1: +T).((drop i O (CHead c0 k t) c1) \to ((clear c1 (CHead c1 (Bind b) t1)) \to +(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda +(v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0))))))) H16 (lift h (r (Bind b) d) x1) +H18) in (eq_ind_r T (lift h (r (Bind b) d) x1) (\lambda (t1: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: -T).(\lambda (_: C).(eq T (lift h (r (Bind b) d) x0) (lift h d v)))) (\lambda +T).(\lambda (_: C).(eq T (lift h (r (Bind b) d) x1) (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0))) x0 x1 (refl_equal T (lift h d x0)) -(getl_intro i e (CHead x1 (Bind b) x0) (CHead x1 (Bind b) x0) H18 (clear_bind -b x1 x0)) H19) u H17)))))) (drop_conf_lt (Bind b) i u c1 (CHead c0 k t) H16 e -h d H1)))))))) H10)) H9)))) | (Flat f) \Rightarrow (\lambda (H7: (drop i O -(CHead c0 k t) (CHead c2 (Flat f) t0))).(\lambda (H8: (clear (CHead c2 (Flat -f) t0) (CHead c1 (Bind b) u))).((match i in nat return (\lambda (n: -nat).((drop h (S (plus n d)) (CHead c0 k t) e) \to ((drop n O (CHead c0 k t) -(CHead c2 (Flat f) t0)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T -u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl n e (CHead e0 (Bind -b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) with [O -\Rightarrow (\lambda (H9: (drop h (S (plus O d)) (CHead c0 k t) e)).(\lambda -(H10: (drop O O (CHead c0 k t) (CHead c2 (Flat f) t0))).(let H11 \def -(f_equal C C (\lambda (e0: C).(match e0 in C return (\lambda (_: C).C) with -[(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k t) -(CHead c2 (Flat f) t0) (drop_gen_refl (CHead c0 k t) (CHead c2 (Flat f) t0) -H10)) in ((let H12 \def (f_equal C K (\lambda (e0: C).(match e0 in C return -(\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow -k])) (CHead c0 k t) (CHead c2 (Flat f) t0) (drop_gen_refl (CHead c0 k t) -(CHead c2 (Flat f) t0) H10)) in ((let H13 \def (f_equal C T (\lambda (e0: -C).(match e0 in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | -(CHead _ _ t) \Rightarrow t])) (CHead c0 k t) (CHead c2 (Flat f) t0) -(drop_gen_refl (CHead c0 k t) (CHead c2 (Flat f) t0) H10)) in (\lambda (H14: -(eq K k (Flat f))).(\lambda (H15: (eq C c0 c2)).(let H16 \def (eq_ind_r C c2 -(\lambda (c: C).(clear c (CHead c1 (Bind b) u))) (clear_gen_flat f c2 (CHead -c1 (Bind b) u) t0 H8) c0 H15) in (let H17 \def (eq_ind K k (\lambda (k: -K).(drop h (S (plus O d)) (CHead c0 k t) e)) H9 (Flat f) H14) in (ex3_2_ind C -T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Flat f) v)))) (\lambda -(_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) (plus O d)) v)))) (\lambda -(e0: C).(\lambda (_: T).(drop h (r (Flat f) (plus O d)) c0 e0))) (ex3_2 T C +T).(\lambda (e0: C).(drop h d c1 e0))) x1 x2 (refl_equal T (lift h d x1)) +(getl_intro i e (CHead x2 (Bind b) x1) (CHead x2 (Bind b) x1) H19 (clear_bind +b x2 x1)) H20) u H18))))))) (drop_conf_lt (Bind b) i u c1 (CHead c0 k t) H17 +e h d H1))))))))) H10)) H9))))) (\lambda (f: F).(\lambda (H7: (drop i O +(CHead c0 k t) (CHead x0 (Flat f) t0))).(\lambda (H8: (clear (CHead x0 (Flat +f) t0) (CHead c1 (Bind b) u))).(nat_ind (\lambda (n: nat).((drop h (S (plus n +d)) (CHead c0 k t) e) \to ((drop n O (CHead c0 k t) (CHead x0 (Flat f) t0)) +\to ((((drop n O (CHead c0 k t) x0) \to ((clear x0 (CHead c1 (Bind b) u)) \to +(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda +(v: T).(\lambda (e0: C).(getl n e (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0))))))) \to (ex3_2 T C (\lambda (v: +T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: +C).(getl n e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop +h d c1 e0)))))))) (\lambda (H9: (drop h (S (plus O d)) (CHead c0 k t) +e)).(\lambda (H10: (drop O O (CHead c0 k t) (CHead x0 (Flat f) t0))).(\lambda +(IHx0: (((drop O O (CHead c0 k t) x0) \to ((clear x0 (CHead c1 (Bind b) u)) +\to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) +(\lambda (v: T).(\lambda (e0: C).(getl O e (CHead e0 (Bind b) v)))) (\lambda +(_: T).(\lambda (e0: C).(drop h d c1 e0)))))))).(let H11 \def (f_equal C C +(\lambda (e0: C).(match e0 in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow c0 | (CHead c2 _ _) \Rightarrow c2])) (CHead c0 k t) (CHead x0 +(Flat f) t0) (drop_gen_refl (CHead c0 k t) (CHead x0 (Flat f) t0) H10)) in +((let H12 \def (f_equal C K (\lambda (e0: C).(match e0 in C return (\lambda +(_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k1 _) \Rightarrow k1])) +(CHead c0 k t) (CHead x0 (Flat f) t0) (drop_gen_refl (CHead c0 k t) (CHead x0 +(Flat f) t0) H10)) in ((let H13 \def (f_equal C T (\lambda (e0: C).(match e0 +in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | (CHead _ _ t1) +\Rightarrow t1])) (CHead c0 k t) (CHead x0 (Flat f) t0) (drop_gen_refl (CHead +c0 k t) (CHead x0 (Flat f) t0) H10)) in (\lambda (H14: (eq K k (Flat +f))).(\lambda (H15: (eq C c0 x0)).(let H16 \def (eq_ind_r C x0 (\lambda (c2: +C).(clear c2 (CHead c1 (Bind b) u))) (clear_gen_flat f x0 (CHead c1 (Bind b) +u) t0 H8) c0 H15) in (let H17 \def (eq_ind_r C x0 (\lambda (c2: C).((drop O O +(CHead c0 k t) c2) \to ((clear c2 (CHead c1 (Bind b) u)) \to (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl O e (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0))))))) IHx0 c0 H15) in (let H18 \def +(eq_ind K k (\lambda (k1: K).((drop O O (CHead c0 k1 t) c0) \to ((clear c0 +(CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u +(lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O e (CHead e0 (Bind b) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) H17 (Flat f) +H14) in (let H19 \def (eq_ind K k (\lambda (k1: K).(drop h (S (plus O d)) +(CHead c0 k1 t) e)) H9 (Flat f) H14) in (ex3_2_ind C T (\lambda (e0: +C).(\lambda (v: T).(eq C e (CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda +(v: T).(eq T t (lift h (r (Flat f) (plus O d)) v)))) (\lambda (e0: +C).(\lambda (_: T).(drop h (r (Flat f) (plus O d)) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O e (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (H18: (eq C e (CHead x0 (Flat f) x1))).(\lambda (H19: (eq T t -(lift h (r (Flat f) (plus O d)) x1))).(\lambda (H20: (drop h (r (Flat f) -(plus O d)) c0 x0)).(let H21 \def (f_equal T T (\lambda (e0: T).e0) t (lift h -(r (Flat f) (plus O d)) x1) H19) in (eq_ind_r C (CHead x0 (Flat f) x1) -(\lambda (c3: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d -v)))) (\lambda (v: T).(\lambda (e0: C).(getl O c3 (CHead e0 (Bind b) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (let H22 \def (H c1 u O -(getl_intro O c0 (CHead c1 (Bind b) u) c0 (drop_refl c0) H16) x0 h d H20) in -(ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) -(\lambda (v: T).(\lambda (e0: C).(getl O x0 (CHead e0 (Bind b) v)))) (\lambda -(_: T).(\lambda (e0: C).(drop h d c1 e0))) (ex3_2 T C (\lambda (v: +T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x1: C).(\lambda (x2: +T).(\lambda (H20: (eq C e (CHead x1 (Flat f) x2))).(\lambda (H21: (eq T t +(lift h (r (Flat f) (plus O d)) x2))).(\lambda (H22: (drop h (r (Flat f) +(plus O d)) c0 x1)).(let H23 \def (f_equal T T (\lambda (e0: T).e0) t (lift h +(r (Flat f) (plus O d)) x2) H21) in (let H24 \def (eq_ind C e (\lambda (c2: +C).((drop O O (CHead c0 (Flat f) t) c0) \to ((clear c0 (CHead c1 (Bind b) u)) +\to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) +(\lambda (v: T).(\lambda (e0: C).(getl O c2 (CHead e0 (Bind b) v)))) (\lambda +(_: T).(\lambda (e0: C).(drop h d c1 e0))))))) H18 (CHead x1 (Flat f) x2) +H20) in (eq_ind_r C (CHead x1 (Flat f) x2) (\lambda (c2: C).(ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl O c2 (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0))))) (let H25 \def (eq_ind T t (\lambda +(t1: T).((drop O O (CHead c0 (Flat f) t1) c0) \to ((clear c0 (CHead c1 (Bind +b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) +(\lambda (v: T).(\lambda (e0: C).(getl O (CHead x1 (Flat f) x2) (CHead e0 +(Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) H24 +(lift h (S d) x2) H23) in (let H26 \def (H c1 u O (getl_intro O c0 (CHead c1 +(Bind b) u) c0 (drop_refl c0) H16) x1 h d H22) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: -C).(getl O (CHead x0 (Flat f) x1) (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x2: T).(\lambda (x3: -C).(\lambda (H23: (eq T u (lift h d x2))).(\lambda (H24: (getl O x0 (CHead x3 -(Bind b) x2))).(\lambda (H25: (drop h d c1 x3)).(let H26 \def (eq_ind T u -(\lambda (t: T).(clear c0 (CHead c1 (Bind b) t))) H16 (lift h d x2) H23) in -(eq_ind_r T (lift h d x2) (\lambda (t1: T).(ex3_2 T C (\lambda (v: -T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: T).(\lambda (e0: -C).(getl O (CHead x0 (Flat f) x1) (CHead e0 (Bind b) v)))) (\lambda (_: -T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: -T).(\lambda (_: C).(eq T (lift h d x2) (lift h d v)))) (\lambda (v: -T).(\lambda (e0: C).(getl O (CHead x0 (Flat f) x1) (CHead e0 (Bind b) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) x2 x3 (refl_equal T (lift -h d x2)) (getl_flat x0 (CHead x3 (Bind b) x2) O H24 f x1) H25) u H23))))))) -H22)) e H18))))))) (drop_gen_skip_l c0 e t h (plus O d) (Flat f) H17))))))) -H12)) H11)))) | (S n) \Rightarrow (\lambda (H9: (drop h (S (plus (S n) d)) -(CHead c0 k t) e)).(\lambda (H10: (drop (S n) O (CHead c0 k t) (CHead c2 -(Flat f) t0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead -e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k (plus (S n) -d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k (plus (S n) d)) c0 -e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) -(\lambda (v: T).(\lambda (e0: C).(getl (S n) e (CHead e0 (Bind b) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x0: -C).(\lambda (x1: T).(\lambda (H11: (eq C e (CHead x0 k x1))).(\lambda (H12: -(eq T t (lift h (r k (plus (S n) d)) x1))).(\lambda (H13: (drop h (r k (plus -(S n) d)) c0 x0)).(let H14 \def (f_equal T T (\lambda (e0: T).e0) t (lift h -(r k (plus (S n) d)) x1) H12) in (eq_ind_r C (CHead x0 k x1) (\lambda (c3: -C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) -(\lambda (v: T).(\lambda (e0: C).(getl (S n) c3 (CHead e0 (Bind b) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (let H15 \def (eq_ind -nat (r k (plus (S n) d)) (\lambda (n: nat).(drop h n c0 x0)) H13 (plus (r k -(S n)) d) (r_plus k (S n) d)) in (let H16 \def (eq_ind nat (r k (S n)) -(\lambda (n: nat).(drop h (plus n d) c0 x0)) H15 (S (r k n)) (r_S k n)) in -(let H17 \def (H c1 u (r k n) (getl_intro (r k n) c0 (CHead c1 (Bind b) u) -(CHead c2 (Flat f) t0) (drop_gen_drop k c0 (CHead c2 (Flat f) t0) t n H10) -(clear_flat c2 (CHead c1 (Bind b) u) (clear_gen_flat f c2 (CHead c1 (Bind b) -u) t0 H8) f t0)) x0 h d H16) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: -C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (r k n) x0 +C).(getl O x1 (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop +h d c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d +v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x1 (Flat f) x2) (CHead +e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) +(\lambda (x3: T).(\lambda (x4: C).(\lambda (H27: (eq T u (lift h d +x3))).(\lambda (H28: (getl O x1 (CHead x4 (Bind b) x3))).(\lambda (H29: (drop +h d c1 x4)).(let H30 \def (eq_ind T u (\lambda (t1: T).((drop O O (CHead c0 +(Flat f) (lift h (S d) x2)) c0) \to ((clear c0 (CHead c1 (Bind b) t1)) \to +(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda +(v: T).(\lambda (e0: C).(getl O (CHead x1 (Flat f) x2) (CHead e0 (Bind b) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) H25 (lift h d +x3) H27) in (let H31 \def (eq_ind T u (\lambda (t1: T).(clear c0 (CHead c1 +(Bind b) t1))) H16 (lift h d x3) H27) in (eq_ind_r T (lift h d x3) (\lambda +(t1: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) +(\lambda (v: T).(\lambda (e0: C).(getl O (CHead x1 (Flat f) x2) (CHead e0 +(Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) +(ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h d x3) (lift h +d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x1 (Flat f) x2) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) +x3 x4 (refl_equal T (lift h d x3)) (getl_flat x1 (CHead x4 (Bind b) x3) O H28 +f x2) H29) u H27)))))))) H26))) e H20)))))))) (drop_gen_skip_l c0 e t h (plus +O d) (Flat f) H19))))))))) H12)) H11))))) (\lambda (i0: nat).(\lambda (IHi: +(((drop h (S (plus i0 d)) (CHead c0 k t) e) \to ((drop i0 O (CHead c0 k t) +(CHead x0 (Flat f) t0)) \to ((((drop i0 O (CHead c0 k t) x0) \to ((clear x0 +(CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u +(lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i0 e (CHead e0 (Bind +b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) \to (ex3_2 T +C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl i0 e (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0))))))))).(\lambda (H9: (drop h (S (plus +(S i0) d)) (CHead c0 k t) e)).(\lambda (H10: (drop (S i0) O (CHead c0 k t) +(CHead x0 (Flat f) t0))).(\lambda (IHx0: (((drop (S i0) O (CHead c0 k t) x0) +\to ((clear x0 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda +(_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S i0) +e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 +e0)))))))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 +k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k (plus (S i0) d)) +v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k (plus (S i0) d)) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda -(v: T).(\lambda (e0: C).(getl (S n) (CHead x0 k x1) (CHead e0 (Bind b) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x2: -T).(\lambda (x3: C).(\lambda (H18: (eq T u (lift h d x2))).(\lambda (H19: -(getl (r k n) x0 (CHead x3 (Bind b) x2))).(\lambda (H20: (drop h d c1 -x3)).(let H21 \def (eq_ind T u (\lambda (t: T).(clear c2 (CHead c1 (Bind b) -t))) (clear_gen_flat f c2 (CHead c1 (Bind b) u) t0 H8) (lift h d x2) H18) in -(eq_ind_r T (lift h d x2) (\lambda (t1: T).(ex3_2 T C (\lambda (v: +(v: T).(\lambda (e0: C).(getl (S i0) e (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x1: C).(\lambda (x2: +T).(\lambda (H11: (eq C e (CHead x1 k x2))).(\lambda (H12: (eq T t (lift h (r +k (plus (S i0) d)) x2))).(\lambda (H13: (drop h (r k (plus (S i0) d)) c0 +x1)).(let H14 \def (f_equal T T (\lambda (e0: T).e0) t (lift h (r k (plus (S +i0) d)) x2) H12) in (let H15 \def (eq_ind C e (\lambda (c2: C).((drop h (S +(plus i0 d)) (CHead c0 k t) c2) \to ((drop i0 O (CHead c0 k t) (CHead x0 +(Flat f) t0)) \to ((((drop i0 O (CHead c0 k t) x0) \to ((clear x0 (CHead c1 +(Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d +v)))) (\lambda (v: T).(\lambda (e0: C).(getl i0 c2 (CHead e0 (Bind b) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) \to (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl i0 c2 (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0)))))))) IHi (CHead x1 k x2) H11) in (let +H16 \def (eq_ind C e (\lambda (c2: C).((drop (S i0) O (CHead c0 k t) x0) \to +((clear x0 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: +C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S i0) c2 +(CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 +e0))))))) IHx0 (CHead x1 k x2) H11) in (eq_ind_r C (CHead x1 k x2) (\lambda +(c2: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) +(\lambda (v: T).(\lambda (e0: C).(getl (S i0) c2 (CHead e0 (Bind b) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (let H17 \def (eq_ind T +t (\lambda (t1: T).((drop (S i0) O (CHead c0 k t1) x0) \to ((clear x0 (CHead +c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift +h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S i0) (CHead x1 k x2) +(CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 +e0))))))) H16 (lift h (r k (S (plus i0 d))) x2) H14) in (let H18 \def (eq_ind +T t (\lambda (t1: T).((drop h (S (plus i0 d)) (CHead c0 k t1) (CHead x1 k +x2)) \to ((drop i0 O (CHead c0 k t1) (CHead x0 (Flat f) t0)) \to ((((drop i0 +O (CHead c0 k t1) x0) \to ((clear x0 (CHead c1 (Bind b) u)) \to (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl i0 (CHead x1 k x2) (CHead e0 (Bind b) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) \to (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl i0 (CHead x1 k x2) (CHead e0 (Bind b) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))))))) H15 (lift h (r k (S +(plus i0 d))) x2) H14) in (let H19 \def (eq_ind nat (r k (plus (S i0) d)) +(\lambda (n: nat).(drop h n c0 x1)) H13 (plus (r k (S i0)) d) (r_plus k (S +i0) d)) in (let H20 \def (eq_ind nat (r k (S i0)) (\lambda (n: nat).(drop h +(plus n d) c0 x1)) H19 (S (r k i0)) (r_S k i0)) in (let H21 \def (H c1 u (r k +i0) (getl_intro (r k i0) c0 (CHead c1 (Bind b) u) (CHead x0 (Flat f) t0) +(drop_gen_drop k c0 (CHead x0 (Flat f) t0) t i0 H10) (clear_flat x0 (CHead c1 +(Bind b) u) (clear_gen_flat f x0 (CHead c1 (Bind b) u) t0 H8) f t0)) x1 h d +H20) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d +v)))) (\lambda (v: T).(\lambda (e0: C).(getl (r k i0) x1 (CHead e0 (Bind b) +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) (ex3_2 T C (\lambda +(v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: +C).(getl (S i0) (CHead x1 k x2) (CHead e0 (Bind b) v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x3: T).(\lambda (x4: +C).(\lambda (H22: (eq T u (lift h d x3))).(\lambda (H23: (getl (r k i0) x1 +(CHead x4 (Bind b) x3))).(\lambda (H24: (drop h d c1 x4)).(let H25 \def +(eq_ind T u (\lambda (t1: T).((drop (S i0) O (CHead c0 k (lift h (r k (S +(plus i0 d))) x2)) x0) \to ((clear x0 (CHead c1 (Bind b) t1)) \to (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl (S i0) (CHead x1 k x2) (CHead e0 (Bind b) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) H17 (lift h d x3) +H22) in (let H26 \def (eq_ind T u (\lambda (t1: T).(clear x0 (CHead c1 (Bind +b) t1))) (clear_gen_flat f x0 (CHead c1 (Bind b) u) t0 H8) (lift h d x3) H22) +in (eq_ind_r T (lift h d x3) (\lambda (t1: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: T).(\lambda (e0: -C).(getl (S n) (CHead x0 k x1) (CHead e0 (Bind b) v)))) (\lambda (_: +C).(getl (S i0) (CHead x1 k x2) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: -T).(\lambda (_: C).(eq T (lift h d x2) (lift h d v)))) (\lambda (v: -T).(\lambda (e0: C).(getl (S n) (CHead x0 k x1) (CHead e0 (Bind b) v)))) -(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) x2 x3 (refl_equal T (lift -h d x2)) (getl_head k n x0 (CHead x3 (Bind b) x2) H19 x1) H20) u H18))))))) -H17)))) e H11))))))) (drop_gen_skip_l c0 e t h (plus (S n) d) k H9))))]) H1 -H7)))]) H5 H6)))]) H3 H4)))) H2)))))))))))))) c)). +T).(\lambda (_: C).(eq T (lift h d x3) (lift h d v)))) (\lambda (v: +T).(\lambda (e0: C).(getl (S i0) (CHead x1 k x2) (CHead e0 (Bind b) v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) x3 x4 (refl_equal T (lift +h d x3)) (getl_head k i0 x1 (CHead x4 (Bind b) x3) H23 x2) H24) u H22)))))))) +H21)))))) e H11))))))))) (drop_gen_skip_l c0 e t h (plus (S i0) d) k +H9))))))) i H1 H7 IHx)))) k0 H5 H6))))))) x H3 H4)))) H2)))))))))))))) c)). theorem getl_drop_conf_ge: \forall (i: nat).(\forall (a: C).(\forall (c: C).((getl i c a) \to (\forall diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/flt.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/flt.ma index 589f2dd50..88150ce35 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/flt.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/flt.ma @@ -34,33 +34,33 @@ u))).(getl_gen_sort n i (CHead e (Bind b) u) H (flt e u (CSort n) (TLRef i)))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead e (Bind b) u)) \to (flt e u c0 (TLRef i)))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: -T).(\lambda (i: nat).(match i in nat return (\lambda (n: nat).((getl n (CHead -c0 k t) (CHead e (Bind b) u)) \to (flt e u (CHead c0 k t) (TLRef n)))) with -[O \Rightarrow (\lambda (H0: (getl O (CHead c0 k t) (CHead e (Bind b) -u))).((match k in K return (\lambda (k0: K).((clear (CHead c0 k0 t) (CHead e -(Bind b) u)) \to (flt e u (CHead c0 k0 t) (TLRef O)))) with [(Bind b0) -\Rightarrow (\lambda (H1: (clear (CHead c0 (Bind b0) t) (CHead e (Bind b) -u))).(let H2 \def (f_equal C C (\lambda (e0: C).(match e0 in C return -(\lambda (_: C).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow -c])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead -e (Bind b) u) t H1)) in ((let H3 \def (f_equal C B (\lambda (e0: C).(match e0 -in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) -\Rightarrow (match k in K return (\lambda (_: K).B) with [(Bind b) -\Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e (Bind b) u) (CHead c0 -(Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H4 -\def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) -with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead e (Bind -b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t -H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C e c0)).(eq_ind_r T t -(\lambda (t0: T).(flt e t0 (CHead c0 (Bind b0) t) (TLRef O))) (eq_ind_r C c0 -(\lambda (c1: C).(flt c1 t (CHead c0 (Bind b0) t) (TLRef O))) (eq_ind B b -(\lambda (b1: B).(flt c0 t (CHead c0 (Bind b1) t) (TLRef O))) (flt_arith0 -(Bind b) c0 t O) b0 H5) e H6) u H4)))) H3)) H2))) | (Flat f) \Rightarrow -(\lambda (H1: (clear (CHead c0 (Flat f) t) (CHead e (Bind b) u))).(flt_arith1 -(Bind b) e c0 u (clear_cle c0 (CHead e (Bind b) u) (clear_gen_flat f c0 -(CHead e (Bind b) u) t H1)) (Flat f) t O))]) (getl_gen_O (CHead c0 k t) -(CHead e (Bind b) u) H0))) | (S n) \Rightarrow (\lambda (H0: (getl (S n) -(CHead c0 k t) (CHead e (Bind b) u))).(let H_y \def (H e u (r k n) -(getl_gen_S k c0 (CHead e (Bind b) u) t n H0)) in (flt_arith2 e c0 u (r k n) -H_y k t (S n))))])))))))) c)). +T).(\lambda (i: nat).(nat_ind (\lambda (n: nat).((getl n (CHead c0 k t) +(CHead e (Bind b) u)) \to (flt e u (CHead c0 k t) (TLRef n)))) (\lambda (H0: +(getl O (CHead c0 k t) (CHead e (Bind b) u))).(K_ind (\lambda (k0: K).((clear +(CHead c0 k0 t) (CHead e (Bind b) u)) \to (flt e u (CHead c0 k0 t) (TLRef +O)))) (\lambda (b0: B).(\lambda (H1: (clear (CHead c0 (Bind b0) t) (CHead e +(Bind b) u))).(let H2 \def (f_equal C C (\lambda (e0: C).(match e0 in C +return (\lambda (_: C).C) with [(CSort _) \Rightarrow e | (CHead c1 _ _) +\Rightarrow c1])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind +b0 c0 (CHead e (Bind b) u) t H1)) in ((let H3 \def (f_equal C B (\lambda (e0: +C).(match e0 in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | +(CHead _ k0 _) \Rightarrow (match k0 in K return (\lambda (_: K).B) with +[(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b])])) (CHead e (Bind b) u) +(CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in +((let H4 \def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda +(_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) +(CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e +(Bind b) u) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C e +c0)).(eq_ind_r T t (\lambda (t0: T).(flt e t0 (CHead c0 (Bind b0) t) (TLRef +O))) (eq_ind_r C c0 (\lambda (c1: C).(flt c1 t (CHead c0 (Bind b0) t) (TLRef +O))) (eq_ind B b (\lambda (b1: B).(flt c0 t (CHead c0 (Bind b1) t) (TLRef +O))) (flt_arith0 (Bind b) c0 t O) b0 H5) e H6) u H4)))) H3)) H2)))) (\lambda +(f: F).(\lambda (H1: (clear (CHead c0 (Flat f) t) (CHead e (Bind b) +u))).(flt_arith1 (Bind b) e c0 u (clear_cle c0 (CHead e (Bind b) u) +(clear_gen_flat f c0 (CHead e (Bind b) u) t H1)) (Flat f) t O))) k +(getl_gen_O (CHead c0 k t) (CHead e (Bind b) u) H0))) (\lambda (n: +nat).(\lambda (_: (((getl n (CHead c0 k t) (CHead e (Bind b) u)) \to (flt e u +(CHead c0 k t) (TLRef n))))).(\lambda (H1: (getl (S n) (CHead c0 k t) (CHead +e (Bind b) u))).(let H_y \def (H e u (r k n) (getl_gen_S k c0 (CHead e (Bind +b) u) t n H1)) in (flt_arith2 e c0 u (r k n) H_y k t (S n)))))) i)))))))) c)). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/getl.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/getl.ma index 05749f811..414da7b21 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/getl.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/getl.ma @@ -43,10 +43,11 @@ nat).(\lambda (H: (getl h c1 c2)).(\lambda (e2: C).(\lambda (H0: (getl i c2 e2)).(let H1 \def (getl_gen_all c2 e2 i H0) in (ex2_ind C (\lambda (e: C).(drop i O c2 e)) (\lambda (e: C).(clear e e2)) (getl (plus i h) c1 e2) (\lambda (x: C).(\lambda (H2: (drop i O c2 x)).(\lambda (H3: (clear x -e2)).((match i in nat return (\lambda (n: nat).((drop n O c2 x) \to (getl -(plus n h) c1 e2))) with [O \Rightarrow (\lambda (H4: (drop O O c2 x)).(let -H5 \def (eq_ind_r C x (\lambda (c: C).(clear c e2)) H3 c2 (drop_gen_refl c2 x -H4)) in (getl_clear_trans (plus O h) c1 c2 H e2 H5))) | (S n) \Rightarrow -(\lambda (H4: (drop (S n) O c2 x)).(let H_y \def (getl_drop_trans c1 c2 h H x -n H4) in (getl_intro (plus (S n) h) c1 e2 x H_y H3)))]) H2)))) H1)))))))). +e2)).(nat_ind (\lambda (n: nat).((drop n O c2 x) \to (getl (plus n h) c1 +e2))) (\lambda (H4: (drop O O c2 x)).(let H5 \def (eq_ind_r C x (\lambda (c: +C).(clear c e2)) H3 c2 (drop_gen_refl c2 x H4)) in (getl_clear_trans (plus O +h) c1 c2 H e2 H5))) (\lambda (i0: nat).(\lambda (_: (((drop i0 O c2 x) \to +(getl (plus i0 h) c1 e2)))).(\lambda (H4: (drop (S i0) O c2 x)).(let H_y \def +(getl_drop_trans c1 c2 h H x i0 H4) in (getl_intro (plus (S i0) h) c1 e2 x +H_y H3))))) i H2)))) H1)))))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/props.ma index b93ced16d..5287d69b5 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/getl/props.ma @@ -49,14 +49,14 @@ theorem getl_flat: e)).(\lambda (f: F).(\lambda (u: T).(let H0 \def (getl_gen_all c e h H) in (ex2_ind C (\lambda (e0: C).(drop h O c e0)) (\lambda (e0: C).(clear e0 e)) (getl h (CHead c (Flat f) u) e) (\lambda (x: C).(\lambda (H1: (drop h O c -x)).(\lambda (H2: (clear x e)).((match h in nat return (\lambda (n: -nat).((drop n O c x) \to (getl n (CHead c (Flat f) u) e))) with [O -\Rightarrow (\lambda (H3: (drop O O c x)).(let H4 \def (eq_ind_r C x (\lambda -(c: C).(clear c e)) H2 c (drop_gen_refl c x H3)) in (getl_intro O (CHead c -(Flat f) u) e (CHead c (Flat f) u) (drop_refl (CHead c (Flat f) u)) -(clear_flat c e H4 f u)))) | (S n) \Rightarrow (\lambda (H3: (drop (S n) O c -x)).(getl_intro (S n) (CHead c (Flat f) u) e x (drop_drop (Flat f) n c x H3 -u) H2))]) H1)))) H0))))))). +x)).(\lambda (H2: (clear x e)).(nat_ind (\lambda (n: nat).((drop n O c x) \to +(getl n (CHead c (Flat f) u) e))) (\lambda (H3: (drop O O c x)).(let H4 \def +(eq_ind_r C x (\lambda (c0: C).(clear c0 e)) H2 c (drop_gen_refl c x H3)) in +(getl_intro O (CHead c (Flat f) u) e (CHead c (Flat f) u) (drop_refl (CHead c +(Flat f) u)) (clear_flat c e H4 f u)))) (\lambda (h0: nat).(\lambda (_: +(((drop h0 O c x) \to (getl h0 (CHead c (Flat f) u) e)))).(\lambda (H3: (drop +(S h0) O c x)).(getl_intro (S h0) (CHead c (Flat f) u) e x (drop_drop (Flat +f) h0 c x H3 u) H2)))) h H1)))) H0))))))). theorem getl_ctail: \forall (b: B).(\forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: @@ -86,6 +86,6 @@ C x1 x2) (\lambda (x0: C).(\lambda (H5: (drop h O c x0)).(\lambda (H6: (clear x0 x1)).(let H7 \def (eq_ind C x (\lambda (c0: C).(drop h O c c0)) H2 x0 (drop_mono c x O h H2 x0 H5)) in (let H8 \def (eq_ind_r C x0 (\lambda (c0: C).(drop h O c c0)) H7 x (drop_mono c x O h H2 x0 H5)) in (let H9 \def -(eq_ind_r C x0 (\lambda (c: C).(clear c x1)) H6 x (drop_mono c x O h H2 x0 +(eq_ind_r C x0 (\lambda (c0: C).(clear c0 x1)) H6 x (drop_mono c x O h H2 x0 H5)) in (clear_mono x x1 H9 x2 H3))))))) H4))))) H1))))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/defs.ma index cf815b7bc..41de14215 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/defs.ma @@ -21,6 +21,6 @@ include "T/defs.ma". inductive iso: T \to (T \to Prop) \def | iso_sort: \forall (n1: nat).(\forall (n2: nat).(iso (TSort n1) (TSort n2))) | iso_lref: \forall (i1: nat).(\forall (i2: nat).(iso (TLRef i1) (TLRef i2))) -| iso_head: \forall (k: K).(\forall (v1: T).(\forall (v2: T).(\forall (t1: -T).(\forall (t2: T).(iso (THead k v1 t1) (THead k v2 t2)))))). +| iso_head: \forall (v1: T).(\forall (v2: T).(\forall (t1: T).(\forall (t2: +T).(\forall (k: K).(iso (THead k v1 t1) (THead k v2 t2)))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/fwd.ma index 526a3f603..038a53cf8 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/fwd.ma @@ -44,7 +44,7 @@ t)) \to P)) (\lambda (H3: (eq T (TLRef i2) (THead (Bind b) v t))).(let H4 \def (eq_ind T (TLRef i2) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) v t) H3) in (False_ind P -H4))) i1 (sym_eq nat i1 i H2))) H1))) | (iso_head k v1 v2 t1 t2) \Rightarrow +H4))) i1 (sym_eq nat i1 i H2))) H1))) | (iso_head v1 v2 t1 t2 k) \Rightarrow (\lambda (H0: (eq T (THead k v1 t1) (TLRef i))).(\lambda (H1: (eq T (THead k v2 t2) (THead (Bind b) v t))).((let H2 \def (eq_ind T (THead k v1 t1) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) @@ -70,19 +70,19 @@ H3)) H2))) | (iso_lref i1 i2) \Rightarrow (\lambda (H1: (eq T (TLRef i1) (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) H1) in (False_ind ((eq T -(TLRef i2) (THead (Bind b) v t)) \to P) H3)) H2))) | (iso_head k v1 v2 t2 t3) +(TLRef i2) (THead (Bind b) v t)) \to P) H3)) H2))) | (iso_head v1 v2 t2 t3 k) \Rightarrow (\lambda (H1: (eq T (THead k v1 t2) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))))).(\lambda (H2: (eq T (THead k v2 t3) (THead (Bind b) v t))).((let H3 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t2 | (TLRef _) \Rightarrow t2 -| (THead _ _ t) \Rightarrow t])) (THead k v1 t2) (THead (Flat f) t0 (THeads +| (THead _ _ t4) \Rightarrow t4])) (THead k v1 t2) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | -(TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead k v1 t2) +(TLRef _) \Rightarrow v1 | (THead _ t4 _) \Rightarrow t4])) (THead k v1 t2) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) H1) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with -[(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) -\Rightarrow k])) (THead k v1 t2) (THead (Flat f) t0 (THeads (Flat f) t1 +[(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) +\Rightarrow k0])) (THead k v1 t2) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) H1) in (eq_ind K (Flat f) (\lambda (k0: K).((eq T v1 t0) \to ((eq T t2 (THeads (Flat f) t1 (TLRef i))) \to ((eq T (THead k0 v2 t3) (THead (Bind b) v t)) \to P)))) (\lambda (H6: (eq T v1 t0)).(eq_ind T t0 (\lambda (_: @@ -92,8 +92,8 @@ t3) (THead (Bind b) v t)) \to P))) (\lambda (H7: (eq T t2 (THeads (Flat f) t1 (THead (Flat f) v2 t3) (THead (Bind b) v t)) \to P)) (\lambda (H8: (eq T (THead (Flat f) v2 t3) (THead (Bind b) v t))).(let H9 \def (eq_ind T (THead (Flat f) v2 t3) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) -with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ -_) \Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind _) +with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ +_) \Rightarrow (match k0 in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) v t) H8) in (False_ind P H9))) t2 (sym_eq T t2 (THeads (Flat f) t1 (TLRef i)) H7))) v1 (sym_eq T v1 t0 H6))) k (sym_eq K k (Flat f) H5))) H4)) H3)) H2)))]) in (H1 @@ -125,17 +125,17 @@ t))).((let H2 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat f2) v2 t2) H0) in (False_ind ((eq T (TLRef i2) (THead (Bind b) v t)) \to P) H2)) -H1))) | (iso_head k v1 v0 t1 t0) \Rightarrow (\lambda (H0: (eq T (THead k v1 +H1))) | (iso_head v1 v0 t1 t0 k) \Rightarrow (\lambda (H0: (eq T (THead k v1 t1) (THead (Flat f2) v2 t2))).(\lambda (H1: (eq T (THead k v0 t0) (THead (Bind b) v t))).((let H2 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t1 | (TLRef _) -\Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k v1 t1) (THead (Flat -f2) v2 t2) H0) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e in T -return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) -\Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead k v1 t1) (THead (Flat -f2) v2 t2) H0) in ((let H4 \def (f_equal T K (\lambda (e: T).(match e in T -return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) -\Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v1 t1) (THead (Flat +\Rightarrow t1 | (THead _ _ t3) \Rightarrow t3])) (THead k v1 t1) (THead +(Flat f2) v2 t2) H0) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e +in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) +\Rightarrow v1 | (THead _ t3 _) \Rightarrow t3])) (THead k v1 t1) (THead +(Flat f2) v2 t2) H0) in ((let H4 \def (f_equal T K (\lambda (e: T).(match e +in T return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) +\Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k v1 t1) (THead (Flat f2) v2 t2) H0) in (eq_ind K (Flat f2) (\lambda (k0: K).((eq T v1 v2) \to ((eq T t1 t2) \to ((eq T (THead k0 v0 t0) (THead (Bind b) v t)) \to P)))) (\lambda (H5: (eq T v1 v2)).(eq_ind T v2 (\lambda (_: T).((eq T t1 t2) \to ((eq T @@ -144,15 +144,15 @@ t2)).(eq_ind T t2 (\lambda (_: T).((eq T (THead (Flat f2) v0 t0) (THead (Bind b) v t)) \to P)) (\lambda (H7: (eq T (THead (Flat f2) v0 t0) (THead (Bind b) v t))).(let H8 \def (eq_ind T (THead (Flat f2) v0 t0) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k in K return -(\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow -True])])) I (THead (Bind b) v t) H7) in (False_ind P H8))) t1 (sym_eq T t1 t2 -H6))) v1 (sym_eq T v1 v2 H5))) k (sym_eq K k (Flat f2) H4))) H3)) H2)) -H1)))]) in (H0 (refl_equal T (THead (Flat f2) v2 t2)) (refl_equal T (THead -(Bind b) v t)))))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (_: (((iso -(THeads (Flat f1) t1 (THead (Flat f2) v2 t2)) (THead (Bind b) v t)) \to -(\forall (P: Prop).P)))).(\lambda (H0: (iso (THead (Flat f1) t0 (THeads (Flat -f1) t1 (THead (Flat f2) v2 t2))) (THead (Bind b) v t))).(\lambda (P: +(TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 in K +return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) +\Rightarrow True])])) I (THead (Bind b) v t) H7) in (False_ind P H8))) t1 +(sym_eq T t1 t2 H6))) v1 (sym_eq T v1 v2 H5))) k (sym_eq K k (Flat f2) H4))) +H3)) H2)) H1)))]) in (H0 (refl_equal T (THead (Flat f2) v2 t2)) (refl_equal T +(THead (Bind b) v t)))))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (_: +(((iso (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)) (THead (Bind b) v t)) +\to (\forall (P: Prop).P)))).(\lambda (H0: (iso (THead (Flat f1) t0 (THeads +(Flat f1) t1 (THead (Flat f2) v2 t2))) (THead (Bind b) v t))).(\lambda (P: Prop).(let H1 \def (match H0 in iso return (\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (iso t3 t4)).((eq T t3 (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)))) \to ((eq T t4 (THead (Bind b) v t)) \to P))))) @@ -170,18 +170,18 @@ t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))))).(\lambda (H2: (eq T False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in (False_ind ((eq T (TLRef i2) (THead (Bind b) v t)) \to P) H3)) H2))) | -(iso_head k v1 v0 t3 t4) \Rightarrow (\lambda (H1: (eq T (THead k v1 t3) +(iso_head v1 v0 t3 t4 k) \Rightarrow (\lambda (H1: (eq T (THead k v1 t3) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))))).(\lambda (H2: (eq T (THead k v0 t4) (THead (Bind b) v t))).((let H3 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) +\Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t5) \Rightarrow t5])) (THead k v1 t3) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 -| (THead _ t _) \Rightarrow t])) (THead k v1 t3) (THead (Flat f1) t0 (THeads -(Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in ((let H5 \def (f_equal T K -(\lambda (e: T).(match e in T return (\lambda (_: T).K) with [(TSort _) -\Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) +| (THead _ t5 _) \Rightarrow t5])) (THead k v1 t3) (THead (Flat f1) t0 +(THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in ((let H5 \def (f_equal +T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with [(TSort _) +\Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) \Rightarrow k0])) (THead k v1 t3) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in (eq_ind K (Flat f1) (\lambda (k0: K).((eq T v1 t0) \to ((eq T t3 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) \to ((eq T (THead k0 v0 t4) @@ -193,9 +193,9 @@ t2))) H1) in (eq_ind K (Flat f1) (\lambda (k0: K).((eq T v1 t0) \to ((eq T t3 v0 t4) (THead (Bind b) v t)) \to P)) (\lambda (H8: (eq T (THead (Flat f1) v0 t4) (THead (Bind b) v t))).(let H9 \def (eq_ind T (THead (Flat f1) v0 t4) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | -(Flat _) \Rightarrow True])])) I (THead (Bind b) v t) H8) in (False_ind P +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow +(match k0 in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False +| (Flat _) \Rightarrow True])])) I (THead (Bind b) v t) H8) in (False_ind P H9))) t3 (sym_eq T t3 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)) H7))) v1 (sym_eq T v1 t0 H6))) k (sym_eq K k (Flat f1) H5))) H4)) H3)) H2)))]) in (H1 (refl_equal T (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/props.ma index 817e15f80..2396280a3 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/iso/props.ma @@ -25,83 +25,20 @@ t3) \to (iso t1 t3))))) \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (iso t1 t2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).(\forall (t3: T).((iso t0 t3) \to (iso t t3))))) (\lambda (n1: nat).(\lambda (n2: nat).(\lambda (t3: T).(\lambda (H0: (iso -(TSort n2) t3)).(let H1 \def (match H0 in iso return (\lambda (t: T).(\lambda -(t0: T).(\lambda (_: (iso t t0)).((eq T t (TSort n2)) \to ((eq T t0 t3) \to -(iso (TSort n1) t3)))))) with [(iso_sort n0 n3) \Rightarrow (\lambda (H1: (eq -T (TSort n0) (TSort n2))).(\lambda (H2: (eq T (TSort n3) t3)).((let H3 \def -(f_equal T nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with -[(TSort n) \Rightarrow n | (TLRef _) \Rightarrow n0 | (THead _ _ _) -\Rightarrow n0])) (TSort n0) (TSort n2) H1) in (eq_ind nat n2 (\lambda (_: -nat).((eq T (TSort n3) t3) \to (iso (TSort n1) t3))) (\lambda (H4: (eq T -(TSort n3) t3)).(eq_ind T (TSort n3) (\lambda (t: T).(iso (TSort n1) t)) -(iso_sort n1 n3) t3 H4)) n0 (sym_eq nat n0 n2 H3))) H2))) | (iso_lref i1 i2) -\Rightarrow (\lambda (H1: (eq T (TLRef i1) (TSort n2))).(\lambda (H2: (eq T -(TLRef i2) t3)).((let H3 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e -in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef -_) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n2) H1) in -(False_ind ((eq T (TLRef i2) t3) \to (iso (TSort n1) t3)) H3)) H2))) | -(iso_head k v1 v2 t0 t4) \Rightarrow (\lambda (H1: (eq T (THead k v1 t0) -(TSort n2))).(\lambda (H2: (eq T (THead k v2 t4) t3)).((let H3 \def (eq_ind T -(THead k v1 t0) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) -with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ -_) \Rightarrow True])) I (TSort n2) H1) in (False_ind ((eq T (THead k v2 t4) -t3) \to (iso (TSort n1) t3)) H3)) H2)))]) in (H1 (refl_equal T (TSort n2)) -(refl_equal T t3))))))) (\lambda (i1: nat).(\lambda (i2: nat).(\lambda (t3: -T).(\lambda (H0: (iso (TLRef i2) t3)).(let H1 \def (match H0 in iso return -(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (iso t t0)).((eq T t (TLRef -i2)) \to ((eq T t0 t3) \to (iso (TLRef i1) t3)))))) with [(iso_sort n1 n2) -\Rightarrow (\lambda (H1: (eq T (TSort n1) (TLRef i2))).(\lambda (H2: (eq T -(TSort n2) t3)).((let H3 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e -in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef -_) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef i2) H1) in -(False_ind ((eq T (TSort n2) t3) \to (iso (TLRef i1) t3)) H3)) H2))) | -(iso_lref i0 i3) \Rightarrow (\lambda (H1: (eq T (TLRef i0) (TLRef -i2))).(\lambda (H2: (eq T (TLRef i3) t3)).((let H3 \def (f_equal T nat -(\lambda (e: T).(match e in T return (\lambda (_: T).nat) with [(TSort _) -\Rightarrow i0 | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i0])) -(TLRef i0) (TLRef i2) H1) in (eq_ind nat i2 (\lambda (_: nat).((eq T (TLRef -i3) t3) \to (iso (TLRef i1) t3))) (\lambda (H4: (eq T (TLRef i3) t3)).(eq_ind -T (TLRef i3) (\lambda (t: T).(iso (TLRef i1) t)) (iso_lref i1 i3) t3 H4)) i0 -(sym_eq nat i0 i2 H3))) H2))) | (iso_head k v1 v2 t0 t4) \Rightarrow (\lambda -(H1: (eq T (THead k v1 t0) (TLRef i2))).(\lambda (H2: (eq T (THead k v2 t4) -t3)).((let H3 \def (eq_ind T (THead k v1 t0) (\lambda (e: T).(match e in T -return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i2) H1) in -(False_ind ((eq T (THead k v2 t4) t3) \to (iso (TLRef i1) t3)) H3)) H2)))]) -in (H1 (refl_equal T (TLRef i2)) (refl_equal T t3))))))) (\lambda (k: -K).(\lambda (v1: T).(\lambda (v2: T).(\lambda (t3: T).(\lambda (t4: -T).(\lambda (t5: T).(\lambda (H0: (iso (THead k v2 t4) t5)).(let H1 \def -(match H0 in iso return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (iso t -t0)).((eq T t (THead k v2 t4)) \to ((eq T t0 t5) \to (iso (THead k v1 t3) -t5)))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H1: (eq T (TSort n1) -(THead k v2 t4))).(\lambda (H2: (eq T (TSort n2) t5)).((let H3 \def (eq_ind T -(TSort n1) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with -[(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow False])) I (THead k v2 t4) H1) in (False_ind ((eq T (TSort n2) -t5) \to (iso (THead k v1 t3) t5)) H3)) H2))) | (iso_lref i1 i2) \Rightarrow -(\lambda (H1: (eq T (TLRef i1) (THead k v2 t4))).(\lambda (H2: (eq T (TLRef -i2) t5)).((let H3 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e in T -return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k v2 t4) H1) -in (False_ind ((eq T (TLRef i2) t5) \to (iso (THead k v1 t3) t5)) H3)) H2))) -| (iso_head k0 v0 v3 t0 t6) \Rightarrow (\lambda (H1: (eq T (THead k0 v0 t0) -(THead k v2 t4))).(\lambda (H2: (eq T (THead k0 v3 t6) t5)).((let H3 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) -\Rightarrow t])) (THead k0 v0 t0) (THead k v2 t4) H1) in ((let H4 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | (THead _ t _) -\Rightarrow t])) (THead k0 v0 t0) (THead k v2 t4) H1) in ((let H5 \def -(f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with -[(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k1 _ _) -\Rightarrow k1])) (THead k0 v0 t0) (THead k v2 t4) H1) in (eq_ind K k -(\lambda (k1: K).((eq T v0 v2) \to ((eq T t0 t4) \to ((eq T (THead k1 v3 t6) -t5) \to (iso (THead k v1 t3) t5))))) (\lambda (H6: (eq T v0 v2)).(eq_ind T v2 -(\lambda (_: T).((eq T t0 t4) \to ((eq T (THead k v3 t6) t5) \to (iso (THead -k v1 t3) t5)))) (\lambda (H7: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).((eq -T (THead k v3 t6) t5) \to (iso (THead k v1 t3) t5))) (\lambda (H8: (eq T -(THead k v3 t6) t5)).(eq_ind T (THead k v3 t6) (\lambda (t: T).(iso (THead k -v1 t3) t)) (iso_head k v1 v3 t3 t6) t5 H8)) t0 (sym_eq T t0 t4 H7))) v0 -(sym_eq T v0 v2 H6))) k0 (sym_eq K k0 k H5))) H4)) H3)) H2)))]) in (H1 -(refl_equal T (THead k v2 t4)) (refl_equal T t5)))))))))) t1 t2 H))). +(TSort n2) t3)).(let H_x \def (iso_gen_sort t3 n2 H0) in (let H1 \def H_x in +(ex_ind nat (\lambda (n3: nat).(eq T t3 (TSort n3))) (iso (TSort n1) t3) +(\lambda (x: nat).(\lambda (H2: (eq T t3 (TSort x))).(eq_ind_r T (TSort x) +(\lambda (t: T).(iso (TSort n1) t)) (iso_sort n1 x) t3 H2))) H1))))))) +(\lambda (i1: nat).(\lambda (i2: nat).(\lambda (t3: T).(\lambda (H0: (iso +(TLRef i2) t3)).(let H_x \def (iso_gen_lref t3 i2 H0) in (let H1 \def H_x in +(ex_ind nat (\lambda (n2: nat).(eq T t3 (TLRef n2))) (iso (TLRef i1) t3) +(\lambda (x: nat).(\lambda (H2: (eq T t3 (TLRef x))).(eq_ind_r T (TLRef x) +(\lambda (t: T).(iso (TLRef i1) t)) (iso_lref i1 x) t3 H2))) H1))))))) +(\lambda (v1: T).(\lambda (v2: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda +(k: K).(\lambda (t5: T).(\lambda (H0: (iso (THead k v2 t4) t5)).(let H_x \def +(iso_gen_head k v2 t4 t5 H0) in (let H1 \def H_x in (ex_2_ind T T (\lambda +(v3: T).(\lambda (t6: T).(eq T t5 (THead k v3 t6)))) (iso (THead k v1 t3) t5) +(\lambda (x0: T).(\lambda (x1: T).(\lambda (H2: (eq T t5 (THead k x0 +x1))).(eq_ind_r T (THead k x0 x1) (\lambda (t: T).(iso (THead k v1 t3) t)) +(iso_head v1 x0 t3 x1 k) t5 H2)))) H1)))))))))) t1 t2 H))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/leq/asucc.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/leq/asucc.ma index 079e5c2db..f632b7519 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/leq/asucc.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/leq/asucc.ma @@ -28,58 +28,77 @@ theorem asucc_repl: a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(leq g (asucc g a) (asucc g a0)))) (\lambda (h1: nat).(\lambda (h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda (H0: (eq A (aplus g (ASort h1 n1) k) (aplus g -(ASort h2 n2) k))).((match h1 in nat return (\lambda (n: nat).((eq A (aplus g -(ASort n n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (match n with [O -\Rightarrow (ASort O (next g n1)) | (S h) \Rightarrow (ASort h n1)]) (match -h2 with [O \Rightarrow (ASort O (next g n2)) | (S h) \Rightarrow (ASort h -n2)])))) with [O \Rightarrow (\lambda (H1: (eq A (aplus g (ASort O n1) k) -(aplus g (ASort h2 n2) k))).((match h2 in nat return (\lambda (n: nat).((eq A -(aplus g (ASort O n1) k) (aplus g (ASort n n2) k)) \to (leq g (ASort O (next -g n1)) (match n with [O \Rightarrow (ASort O (next g n2)) | (S h) \Rightarrow -(ASort h n2)])))) with [O \Rightarrow (\lambda (H2: (eq A (aplus g (ASort O -n1) k) (aplus g (ASort O n2) k))).(leq_sort g O O (next g n1) (next g n2) k -(eq_ind A (aplus g (ASort O n1) (S k)) (\lambda (a: A).(eq A a (aplus g -(ASort O (next g n2)) k))) (eq_ind A (aplus g (ASort O n2) (S k)) (\lambda -(a: A).(eq A (aplus g (ASort O n1) (S k)) a)) (eq_ind_r A (aplus g (ASort O -n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort O n2) k)))) +(ASort h2 n2) k))).(nat_ind (\lambda (n: nat).((eq A (aplus g (ASort n n1) k) +(aplus g (ASort h2 n2) k)) \to (leq g (match n with [O \Rightarrow (ASort O +(next g n1)) | (S h) \Rightarrow (ASort h n1)]) (match h2 with [O \Rightarrow +(ASort O (next g n2)) | (S h) \Rightarrow (ASort h n2)])))) (\lambda (H1: (eq +A (aplus g (ASort O n1) k) (aplus g (ASort h2 n2) k))).(nat_ind (\lambda (n: +nat).((eq A (aplus g (ASort O n1) k) (aplus g (ASort n n2) k)) \to (leq g +(ASort O (next g n1)) (match n with [O \Rightarrow (ASort O (next g n2)) | (S +h) \Rightarrow (ASort h n2)])))) (\lambda (H2: (eq A (aplus g (ASort O n1) k) +(aplus g (ASort O n2) k))).(leq_sort g O O (next g n1) (next g n2) k (eq_ind +A (aplus g (ASort O n1) (S k)) (\lambda (a: A).(eq A a (aplus g (ASort O +(next g n2)) k))) (eq_ind A (aplus g (ASort O n2) (S k)) (\lambda (a: A).(eq +A (aplus g (ASort O n1) (S k)) a)) (eq_ind_r A (aplus g (ASort O n2) k) +(\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort O n2) k)))) (refl_equal A (asucc g (aplus g (ASort O n2) k))) (aplus g (ASort O n1) k) H2) (aplus g (ASort O (next g n2)) k) (aplus_sort_O_S_simpl g n2 k)) (aplus g -(ASort O (next g n1)) k) (aplus_sort_O_S_simpl g n1 k)))) | (S n) \Rightarrow -(\lambda (H2: (eq A (aplus g (ASort O n1) k) (aplus g (ASort (S n) n2) -k))).(leq_sort g O n (next g n1) n2 k (eq_ind A (aplus g (ASort O n1) (S k)) -(\lambda (a: A).(eq A a (aplus g (ASort n n2) k))) (eq_ind A (aplus g (ASort -(S n) n2) (S k)) (\lambda (a: A).(eq A (aplus g (ASort O n1) (S k)) a)) -(eq_ind_r A (aplus g (ASort (S n) n2) k) (\lambda (a: A).(eq A (asucc g a) -(asucc g (aplus g (ASort (S n) n2) k)))) (refl_equal A (asucc g (aplus g -(ASort (S n) n2) k))) (aplus g (ASort O n1) k) H2) (aplus g (ASort n n2) k) -(aplus_sort_S_S_simpl g n2 n k)) (aplus g (ASort O (next g n1)) k) -(aplus_sort_O_S_simpl g n1 k))))]) H1)) | (S n) \Rightarrow (\lambda (H1: (eq -A (aplus g (ASort (S n) n1) k) (aplus g (ASort h2 n2) k))).((match h2 in nat -return (\lambda (n0: nat).((eq A (aplus g (ASort (S n) n1) k) (aplus g (ASort -n0 n2) k)) \to (leq g (ASort n n1) (match n0 with [O \Rightarrow (ASort O -(next g n2)) | (S h) \Rightarrow (ASort h n2)])))) with [O \Rightarrow -(\lambda (H2: (eq A (aplus g (ASort (S n) n1) k) (aplus g (ASort O n2) -k))).(leq_sort g n O n1 (next g n2) k (eq_ind A (aplus g (ASort O n2) (S k)) -(\lambda (a: A).(eq A (aplus g (ASort n n1) k) a)) (eq_ind A (aplus g (ASort -(S n) n1) (S k)) (\lambda (a: A).(eq A a (aplus g (ASort O n2) (S k)))) -(eq_ind_r A (aplus g (ASort O n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc -g (aplus g (ASort O n2) k)))) (refl_equal A (asucc g (aplus g (ASort O n2) -k))) (aplus g (ASort (S n) n1) k) H2) (aplus g (ASort n n1) k) -(aplus_sort_S_S_simpl g n1 n k)) (aplus g (ASort O (next g n2)) k) -(aplus_sort_O_S_simpl g n2 k)))) | (S n0) \Rightarrow (\lambda (H2: (eq A -(aplus g (ASort (S n) n1) k) (aplus g (ASort (S n0) n2) k))).(leq_sort g n n0 -n1 n2 k (eq_ind A (aplus g (ASort (S n) n1) (S k)) (\lambda (a: A).(eq A a -(aplus g (ASort n0 n2) k))) (eq_ind A (aplus g (ASort (S n0) n2) (S k)) -(\lambda (a: A).(eq A (aplus g (ASort (S n) n1) (S k)) a)) (eq_ind_r A (aplus -g (ASort (S n0) n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g -(ASort (S n0) n2) k)))) (refl_equal A (asucc g (aplus g (ASort (S n0) n2) -k))) (aplus g (ASort (S n) n1) k) H2) (aplus g (ASort n0 n2) k) -(aplus_sort_S_S_simpl g n2 n0 k)) (aplus g (ASort n n1) k) -(aplus_sort_S_S_simpl g n1 n k))))]) H1))]) H0))))))) (\lambda (a3: -A).(\lambda (a4: A).(\lambda (H0: (leq g a3 a4)).(\lambda (_: (leq g (asucc g -a3) (asucc g a4))).(\lambda (a5: A).(\lambda (a6: A).(\lambda (_: (leq g a5 -a6)).(\lambda (H3: (leq g (asucc g a5) (asucc g a6))).(leq_head g a3 a4 H0 -(asucc g a5) (asucc g a6) H3))))))))) a1 a2 H)))). +(ASort O (next g n1)) k) (aplus_sort_O_S_simpl g n1 k)))) (\lambda (h3: +nat).(\lambda (_: (((eq A (aplus g (ASort O n1) k) (aplus g (ASort h3 n2) k)) +\to (leq g (ASort O (next g n1)) (match h3 with [O \Rightarrow (ASort O (next +g n2)) | (S h) \Rightarrow (ASort h n2)]))))).(\lambda (H2: (eq A (aplus g +(ASort O n1) k) (aplus g (ASort (S h3) n2) k))).(leq_sort g O h3 (next g n1) +n2 k (eq_ind A (aplus g (ASort O n1) (S k)) (\lambda (a: A).(eq A a (aplus g +(ASort h3 n2) k))) (eq_ind A (aplus g (ASort (S h3) n2) (S k)) (\lambda (a: +A).(eq A (aplus g (ASort O n1) (S k)) a)) (eq_ind_r A (aplus g (ASort (S h3) +n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort (S h3) n2) +k)))) (refl_equal A (asucc g (aplus g (ASort (S h3) n2) k))) (aplus g (ASort +O n1) k) H2) (aplus g (ASort h3 n2) k) (aplus_sort_S_S_simpl g n2 h3 k)) +(aplus g (ASort O (next g n1)) k) (aplus_sort_O_S_simpl g n1 k)))))) h2 H1)) +(\lambda (h3: nat).(\lambda (IHh1: (((eq A (aplus g (ASort h3 n1) k) (aplus g +(ASort h2 n2) k)) \to (leq g (match h3 with [O \Rightarrow (ASort O (next g +n1)) | (S h) \Rightarrow (ASort h n1)]) (match h2 with [O \Rightarrow (ASort +O (next g n2)) | (S h) \Rightarrow (ASort h n2)]))))).(\lambda (H1: (eq A +(aplus g (ASort (S h3) n1) k) (aplus g (ASort h2 n2) k))).(nat_ind (\lambda +(n: nat).((eq A (aplus g (ASort (S h3) n1) k) (aplus g (ASort n n2) k)) \to +((((eq A (aplus g (ASort h3 n1) k) (aplus g (ASort n n2) k)) \to (leq g +(match h3 with [O \Rightarrow (ASort O (next g n1)) | (S h) \Rightarrow +(ASort h n1)]) (match n with [O \Rightarrow (ASort O (next g n2)) | (S h) +\Rightarrow (ASort h n2)])))) \to (leq g (ASort h3 n1) (match n with [O +\Rightarrow (ASort O (next g n2)) | (S h) \Rightarrow (ASort h n2)]))))) +(\lambda (H2: (eq A (aplus g (ASort (S h3) n1) k) (aplus g (ASort O n2) +k))).(\lambda (_: (((eq A (aplus g (ASort h3 n1) k) (aplus g (ASort O n2) k)) +\to (leq g (match h3 with [O \Rightarrow (ASort O (next g n1)) | (S h) +\Rightarrow (ASort h n1)]) (ASort O (next g n2)))))).(leq_sort g h3 O n1 +(next g n2) k (eq_ind A (aplus g (ASort O n2) (S k)) (\lambda (a: A).(eq A +(aplus g (ASort h3 n1) k) a)) (eq_ind A (aplus g (ASort (S h3) n1) (S k)) +(\lambda (a: A).(eq A a (aplus g (ASort O n2) (S k)))) (eq_ind_r A (aplus g +(ASort O n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort O +n2) k)))) (refl_equal A (asucc g (aplus g (ASort O n2) k))) (aplus g (ASort +(S h3) n1) k) H2) (aplus g (ASort h3 n1) k) (aplus_sort_S_S_simpl g n1 h3 k)) +(aplus g (ASort O (next g n2)) k) (aplus_sort_O_S_simpl g n2 k))))) (\lambda +(h4: nat).(\lambda (_: (((eq A (aplus g (ASort (S h3) n1) k) (aplus g (ASort +h4 n2) k)) \to ((((eq A (aplus g (ASort h3 n1) k) (aplus g (ASort h4 n2) k)) +\to (leq g (match h3 with [O \Rightarrow (ASort O (next g n1)) | (S h) +\Rightarrow (ASort h n1)]) (match h4 with [O \Rightarrow (ASort O (next g +n2)) | (S h) \Rightarrow (ASort h n2)])))) \to (leq g (ASort h3 n1) (match h4 +with [O \Rightarrow (ASort O (next g n2)) | (S h) \Rightarrow (ASort h +n2)])))))).(\lambda (H2: (eq A (aplus g (ASort (S h3) n1) k) (aplus g (ASort +(S h4) n2) k))).(\lambda (_: (((eq A (aplus g (ASort h3 n1) k) (aplus g +(ASort (S h4) n2) k)) \to (leq g (match h3 with [O \Rightarrow (ASort O (next +g n1)) | (S h) \Rightarrow (ASort h n1)]) (ASort h4 n2))))).(leq_sort g h3 h4 +n1 n2 k (eq_ind A (aplus g (ASort (S h3) n1) (S k)) (\lambda (a: A).(eq A a +(aplus g (ASort h4 n2) k))) (eq_ind A (aplus g (ASort (S h4) n2) (S k)) +(\lambda (a: A).(eq A (aplus g (ASort (S h3) n1) (S k)) a)) (eq_ind_r A +(aplus g (ASort (S h4) n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g +(aplus g (ASort (S h4) n2) k)))) (refl_equal A (asucc g (aplus g (ASort (S +h4) n2) k))) (aplus g (ASort (S h3) n1) k) H2) (aplus g (ASort h4 n2) k) +(aplus_sort_S_S_simpl g n2 h4 k)) (aplus g (ASort h3 n1) k) +(aplus_sort_S_S_simpl g n1 h3 k))))))) h2 H1 IHh1)))) h1 H0))))))) (\lambda +(a3: A).(\lambda (a4: A).(\lambda (H0: (leq g a3 a4)).(\lambda (_: (leq g +(asucc g a3) (asucc g a4))).(\lambda (a5: A).(\lambda (a6: A).(\lambda (_: +(leq g a5 a6)).(\lambda (H3: (leq g (asucc g a5) (asucc g a6))).(leq_head g +a3 a4 H0 (asucc g a5) (asucc g a6) H3))))))))) a1 a2 H)))). theorem asucc_inj: \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g (asucc g a1) (asucc @@ -90,46 +109,45 @@ A).((leq g (asucc g a) (asucc g a2)) \to (leq g a a2)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (a2: A).(A_ind (\lambda (a: A).((leq g (asucc g (ASort n n0)) (asucc g a)) \to (leq g (ASort n n0) a))) (\lambda (n1: nat).(\lambda (n2: nat).(\lambda (H: (leq g (asucc g (ASort n n0)) -(asucc g (ASort n1 n2)))).((match n in nat return (\lambda (n3: nat).((leq g -(asucc g (ASort n3 n0)) (asucc g (ASort n1 n2))) \to (leq g (ASort n3 n0) -(ASort n1 n2)))) with [O \Rightarrow (\lambda (H0: (leq g (asucc g (ASort O -n0)) (asucc g (ASort n1 n2)))).((match n1 in nat return (\lambda (n3: -nat).((leq g (asucc g (ASort O n0)) (asucc g (ASort n3 n2))) \to (leq g -(ASort O n0) (ASort n3 n2)))) with [O \Rightarrow (\lambda (H1: (leq g (asucc -g (ASort O n0)) (asucc g (ASort O n2)))).(let H2 \def (match H1 in leq return -(\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (ASort O -(next g n0))) \to ((eq A a0 (ASort O (next g n2))) \to (leq g (ASort O n0) -(ASort O n2))))))) with [(leq_sort h1 h2 n3 n4 k H2) \Rightarrow (\lambda -(H3: (eq A (ASort h1 n3) (ASort O (next g n0)))).(\lambda (H4: (eq A (ASort -h2 n4) (ASort O (next g n2)))).((let H5 \def (f_equal A nat (\lambda (e: +(asucc g (ASort n1 n2)))).(nat_ind (\lambda (n3: nat).((leq g (asucc g (ASort +n3 n0)) (asucc g (ASort n1 n2))) \to (leq g (ASort n3 n0) (ASort n1 n2)))) +(\lambda (H0: (leq g (asucc g (ASort O n0)) (asucc g (ASort n1 +n2)))).(nat_ind (\lambda (n3: nat).((leq g (asucc g (ASort O n0)) (asucc g +(ASort n3 n2))) \to (leq g (ASort O n0) (ASort n3 n2)))) (\lambda (H1: (leq g +(asucc g (ASort O n0)) (asucc g (ASort O n2)))).(let H2 \def (match H1 in leq +return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a +(ASort O (next g n0))) \to ((eq A a0 (ASort O (next g n2))) \to (leq g (ASort +O n0) (ASort O n2))))))) with [(leq_sort h1 h2 n3 n4 k H2) \Rightarrow +(\lambda (H3: (eq A (ASort h1 n3) (ASort O (next g n0)))).(\lambda (H4: (eq A +(ASort h2 n4) (ASort O (next g n2)))).((let H5 \def (f_equal A nat (\lambda +(e: A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n5) +\Rightarrow n5 | (AHead _ _) \Rightarrow n3])) (ASort h1 n3) (ASort O (next g +n0)) H3) in ((let H6 \def (f_equal A nat (\lambda (e: A).(match e in A return +(\lambda (_: A).nat) with [(ASort n5 _) \Rightarrow n5 | (AHead _ _) +\Rightarrow h1])) (ASort h1 n3) (ASort O (next g n0)) H3) in (eq_ind nat O +(\lambda (n5: nat).((eq nat n3 (next g n0)) \to ((eq A (ASort h2 n4) (ASort O +(next g n2))) \to ((eq A (aplus g (ASort n5 n3) k) (aplus g (ASort h2 n4) k)) +\to (leq g (ASort O n0) (ASort O n2)))))) (\lambda (H7: (eq nat n3 (next g +n0))).(eq_ind nat (next g n0) (\lambda (n5: nat).((eq A (ASort h2 n4) (ASort +O (next g n2))) \to ((eq A (aplus g (ASort O n5) k) (aplus g (ASort h2 n4) +k)) \to (leq g (ASort O n0) (ASort O n2))))) (\lambda (H8: (eq A (ASort h2 +n4) (ASort O (next g n2)))).(let H9 \def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n5) \Rightarrow -n5 | (AHead _ _) \Rightarrow n3])) (ASort h1 n3) (ASort O (next g n0)) H3) in -((let H6 \def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda -(_: A).nat) with [(ASort n5 _) \Rightarrow n5 | (AHead _ _) \Rightarrow h1])) -(ASort h1 n3) (ASort O (next g n0)) H3) in (eq_ind nat O (\lambda (n5: -nat).((eq nat n3 (next g n0)) \to ((eq A (ASort h2 n4) (ASort O (next g n2))) -\to ((eq A (aplus g (ASort n5 n3) k) (aplus g (ASort h2 n4) k)) \to (leq g -(ASort O n0) (ASort O n2)))))) (\lambda (H7: (eq nat n3 (next g n0))).(eq_ind -nat (next g n0) (\lambda (n5: nat).((eq A (ASort h2 n4) (ASort O (next g -n2))) \to ((eq A (aplus g (ASort O n5) k) (aplus g (ASort h2 n4) k)) \to (leq -g (ASort O n0) (ASort O n2))))) (\lambda (H8: (eq A (ASort h2 n4) (ASort O -(next g n2)))).(let H9 \def (f_equal A nat (\lambda (e: A).(match e in A -return (\lambda (_: A).nat) with [(ASort _ n5) \Rightarrow n5 | (AHead _ _) -\Rightarrow n4])) (ASort h2 n4) (ASort O (next g n2)) H8) in ((let H10 \def -(f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with -[(ASort n5 _) \Rightarrow n5 | (AHead _ _) \Rightarrow h2])) (ASort h2 n4) -(ASort O (next g n2)) H8) in (eq_ind nat O (\lambda (n5: nat).((eq nat n4 -(next g n2)) \to ((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n5 -n4) k)) \to (leq g (ASort O n0) (ASort O n2))))) (\lambda (H11: (eq nat n4 -(next g n2))).(eq_ind nat (next g n2) (\lambda (n5: nat).((eq A (aplus g -(ASort O (next g n0)) k) (aplus g (ASort O n5) k)) \to (leq g (ASort O n0) -(ASort O n2)))) (\lambda (H12: (eq A (aplus g (ASort O (next g n0)) k) (aplus -g (ASort O (next g n2)) k))).(let H13 \def (eq_ind_r A (aplus g (ASort O -(next g n0)) k) (\lambda (a: A).(eq A a (aplus g (ASort O (next g n2)) k))) -H12 (aplus g (ASort O n0) (S k)) (aplus_sort_O_S_simpl g n0 k)) in (let H14 -\def (eq_ind_r A (aplus g (ASort O (next g n2)) k) (\lambda (a: A).(eq A -(aplus g (ASort O n0) (S k)) a)) H13 (aplus g (ASort O n2) (S k)) -(aplus_sort_O_S_simpl g n2 k)) in (leq_sort g O O n0 n2 (S k) H14)))) n4 +n5 | (AHead _ _) \Rightarrow n4])) (ASort h2 n4) (ASort O (next g n2)) H8) in +((let H10 \def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda +(_: A).nat) with [(ASort n5 _) \Rightarrow n5 | (AHead _ _) \Rightarrow h2])) +(ASort h2 n4) (ASort O (next g n2)) H8) in (eq_ind nat O (\lambda (n5: +nat).((eq nat n4 (next g n2)) \to ((eq A (aplus g (ASort O (next g n0)) k) +(aplus g (ASort n5 n4) k)) \to (leq g (ASort O n0) (ASort O n2))))) (\lambda +(H11: (eq nat n4 (next g n2))).(eq_ind nat (next g n2) (\lambda (n5: +nat).((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort O n5) k)) \to +(leq g (ASort O n0) (ASort O n2)))) (\lambda (H12: (eq A (aplus g (ASort O +(next g n0)) k) (aplus g (ASort O (next g n2)) k))).(let H13 \def (eq_ind_r A +(aplus g (ASort O (next g n0)) k) (\lambda (a: A).(eq A a (aplus g (ASort O +(next g n2)) k))) H12 (aplus g (ASort O n0) (S k)) (aplus_sort_O_S_simpl g n0 +k)) in (let H14 \def (eq_ind_r A (aplus g (ASort O (next g n2)) k) (\lambda +(a: A).(eq A (aplus g (ASort O n0) (S k)) a)) H13 (aplus g (ASort O n2) (S +k)) (aplus_sort_O_S_simpl g n2 k)) in (leq_sort g O O n0 n2 (S k) H14)))) n4 (sym_eq nat n4 (next g n2) H11))) h2 (sym_eq nat h2 O H10))) H9))) n3 (sym_eq nat n3 (next g n0) H7))) h1 (sym_eq nat h1 O H6))) H5)) H4 H2))) | (leq_head a0 a3 H2 a4 a5 H3) \Rightarrow (\lambda (H4: (eq A (AHead a0 a4) (ASort O @@ -140,161 +158,171 @@ _) \Rightarrow True])) I (ASort O (next g n0)) H4) in (False_ind ((eq A (AHead a3 a5) (ASort O (next g n2))) \to ((leq g a0 a3) \to ((leq g a4 a5) \to (leq g (ASort O n0) (ASort O n2))))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A (ASort O (next g n0))) (refl_equal A (ASort O (next g n2)))))) -| (S n3) \Rightarrow (\lambda (H1: (leq g (asucc g (ASort O n0)) (asucc g -(ASort (S n3) n2)))).(let H2 \def (match H1 in leq return (\lambda (a: -A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (ASort O (next g -n0))) \to ((eq A a0 (ASort n3 n2)) \to (leq g (ASort O n0) (ASort (S n3) -n2))))))) with [(leq_sort h1 h2 n4 n5 k H2) \Rightarrow (\lambda (H3: (eq A -(ASort h1 n4) (ASort O (next g n0)))).(\lambda (H4: (eq A (ASort h2 n5) -(ASort n3 n2))).((let H5 \def (f_equal A nat (\lambda (e: A).(match e in A -return (\lambda (_: A).nat) with [(ASort _ n6) \Rightarrow n6 | (AHead _ _) -\Rightarrow n4])) (ASort h1 n4) (ASort O (next g n0)) H3) in ((let H6 \def -(f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with -[(ASort n6 _) \Rightarrow n6 | (AHead _ _) \Rightarrow h1])) (ASort h1 n4) -(ASort O (next g n0)) H3) in (eq_ind nat O (\lambda (n6: nat).((eq nat n4 -(next g n0)) \to ((eq A (ASort h2 n5) (ASort n3 n2)) \to ((eq A (aplus g -(ASort n6 n4) k) (aplus g (ASort h2 n5) k)) \to (leq g (ASort O n0) (ASort (S -n3) n2)))))) (\lambda (H7: (eq nat n4 (next g n0))).(eq_ind nat (next g n0) -(\lambda (n6: nat).((eq A (ASort h2 n5) (ASort n3 n2)) \to ((eq A (aplus g -(ASort O n6) k) (aplus g (ASort h2 n5) k)) \to (leq g (ASort O n0) (ASort (S -n3) n2))))) (\lambda (H8: (eq A (ASort h2 n5) (ASort n3 n2))).(let H9 \def -(f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with -[(ASort _ n6) \Rightarrow n6 | (AHead _ _) \Rightarrow n5])) (ASort h2 n5) -(ASort n3 n2) H8) in ((let H10 \def (f_equal A nat (\lambda (e: A).(match e -in A return (\lambda (_: A).nat) with [(ASort n6 _) \Rightarrow n6 | (AHead _ -_) \Rightarrow h2])) (ASort h2 n5) (ASort n3 n2) H8) in (eq_ind nat n3 -(\lambda (n6: nat).((eq nat n5 n2) \to ((eq A (aplus g (ASort O (next g n0)) -k) (aplus g (ASort n6 n5) k)) \to (leq g (ASort O n0) (ASort (S n3) n2))))) -(\lambda (H11: (eq nat n5 n2)).(eq_ind nat n2 (\lambda (n6: nat).((eq A -(aplus g (ASort O (next g n0)) k) (aplus g (ASort n3 n6) k)) \to (leq g -(ASort O n0) (ASort (S n3) n2)))) (\lambda (H12: (eq A (aplus g (ASort O -(next g n0)) k) (aplus g (ASort n3 n2) k))).(let H13 \def (eq_ind_r A (aplus -g (ASort O (next g n0)) k) (\lambda (a: A).(eq A a (aplus g (ASort n3 n2) -k))) H12 (aplus g (ASort O n0) (S k)) (aplus_sort_O_S_simpl g n0 k)) in (let -H14 \def (eq_ind_r A (aplus g (ASort n3 n2) k) (\lambda (a: A).(eq A (aplus g -(ASort O n0) (S k)) a)) H13 (aplus g (ASort (S n3) n2) (S k)) -(aplus_sort_S_S_simpl g n2 n3 k)) in (leq_sort g O (S n3) n0 n2 (S k) H14)))) -n5 (sym_eq nat n5 n2 H11))) h2 (sym_eq nat h2 n3 H10))) H9))) n4 (sym_eq nat -n4 (next g n0) H7))) h1 (sym_eq nat h1 O H6))) H5)) H4 H2))) | (leq_head a0 -a3 H2 a4 a5 H3) \Rightarrow (\lambda (H4: (eq A (AHead a0 a4) (ASort O (next -g n0)))).(\lambda (H5: (eq A (AHead a3 a5) (ASort n3 n2))).((let H6 \def -(eq_ind A (AHead a0 a4) (\lambda (e: A).(match e in A return (\lambda (_: -A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow -True])) I (ASort O (next g n0)) H4) in (False_ind ((eq A (AHead a3 a5) (ASort -n3 n2)) \to ((leq g a0 a3) \to ((leq g a4 a5) \to (leq g (ASort O n0) (ASort -(S n3) n2))))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A (ASort O (next g n0))) -(refl_equal A (ASort n3 n2)))))]) H0)) | (S n3) \Rightarrow (\lambda (H0: -(leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort n1 n2)))).((match n1 in -nat return (\lambda (n4: nat).((leq g (asucc g (ASort (S n3) n0)) (asucc g -(ASort n4 n2))) \to (leq g (ASort (S n3) n0) (ASort n4 n2)))) with [O -\Rightarrow (\lambda (H1: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort -O n2)))).(let H2 \def (match H1 in leq return (\lambda (a: A).(\lambda (a0: -A).(\lambda (_: (leq ? a a0)).((eq A a (ASort n3 n0)) \to ((eq A a0 (ASort O -(next g n2))) \to (leq g (ASort (S n3) n0) (ASort O n2))))))) with [(leq_sort -h1 h2 n4 n5 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n4) (ASort n3 -n0))).(\lambda (H4: (eq A (ASort h2 n5) (ASort O (next g n2)))).((let H5 \def +(\lambda (n3: nat).(\lambda (_: (((leq g (asucc g (ASort O n0)) (asucc g +(ASort n3 n2))) \to (leq g (ASort O n0) (ASort n3 n2))))).(\lambda (H1: (leq +g (asucc g (ASort O n0)) (asucc g (ASort (S n3) n2)))).(let H2 \def (match H1 +in leq return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a +a0)).((eq A a (ASort O (next g n0))) \to ((eq A a0 (ASort n3 n2)) \to (leq g +(ASort O n0) (ASort (S n3) n2))))))) with [(leq_sort h1 h2 n4 n5 k H2) +\Rightarrow (\lambda (H3: (eq A (ASort h1 n4) (ASort O (next g +n0)))).(\lambda (H4: (eq A (ASort h2 n5) (ASort n3 n2))).((let H5 \def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n6) \Rightarrow n6 | (AHead _ _) \Rightarrow n4])) (ASort h1 n4) -(ASort n3 n0) H3) in ((let H6 \def (f_equal A nat (\lambda (e: A).(match e in -A return (\lambda (_: A).nat) with [(ASort n6 _) \Rightarrow n6 | (AHead _ _) -\Rightarrow h1])) (ASort h1 n4) (ASort n3 n0) H3) in (eq_ind nat n3 (\lambda -(n6: nat).((eq nat n4 n0) \to ((eq A (ASort h2 n5) (ASort O (next g n2))) \to -((eq A (aplus g (ASort n6 n4) k) (aplus g (ASort h2 n5) k)) \to (leq g (ASort -(S n3) n0) (ASort O n2)))))) (\lambda (H7: (eq nat n4 n0)).(eq_ind nat n0 -(\lambda (n6: nat).((eq A (ASort h2 n5) (ASort O (next g n2))) \to ((eq A -(aplus g (ASort n3 n6) k) (aplus g (ASort h2 n5) k)) \to (leq g (ASort (S n3) -n0) (ASort O n2))))) (\lambda (H8: (eq A (ASort h2 n5) (ASort O (next g -n2)))).(let H9 \def (f_equal A nat (\lambda (e: A).(match e in A return -(\lambda (_: A).nat) with [(ASort _ n6) \Rightarrow n6 | (AHead _ _) -\Rightarrow n5])) (ASort h2 n5) (ASort O (next g n2)) H8) in ((let H10 \def +(ASort O (next g n0)) H3) in ((let H6 \def (f_equal A nat (\lambda (e: +A).(match e in A return (\lambda (_: A).nat) with [(ASort n6 _) \Rightarrow +n6 | (AHead _ _) \Rightarrow h1])) (ASort h1 n4) (ASort O (next g n0)) H3) in +(eq_ind nat O (\lambda (n6: nat).((eq nat n4 (next g n0)) \to ((eq A (ASort +h2 n5) (ASort n3 n2)) \to ((eq A (aplus g (ASort n6 n4) k) (aplus g (ASort h2 +n5) k)) \to (leq g (ASort O n0) (ASort (S n3) n2)))))) (\lambda (H7: (eq nat +n4 (next g n0))).(eq_ind nat (next g n0) (\lambda (n6: nat).((eq A (ASort h2 +n5) (ASort n3 n2)) \to ((eq A (aplus g (ASort O n6) k) (aplus g (ASort h2 n5) +k)) \to (leq g (ASort O n0) (ASort (S n3) n2))))) (\lambda (H8: (eq A (ASort +h2 n5) (ASort n3 n2))).(let H9 \def (f_equal A nat (\lambda (e: A).(match e +in A return (\lambda (_: A).nat) with [(ASort _ n6) \Rightarrow n6 | (AHead _ +_) \Rightarrow n5])) (ASort h2 n5) (ASort n3 n2) H8) in ((let H10 \def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort n6 _) \Rightarrow n6 | (AHead _ _) \Rightarrow h2])) (ASort h2 n5) -(ASort O (next g n2)) H8) in (eq_ind nat O (\lambda (n6: nat).((eq nat n5 -(next g n2)) \to ((eq A (aplus g (ASort n3 n0) k) (aplus g (ASort n6 n5) k)) -\to (leq g (ASort (S n3) n0) (ASort O n2))))) (\lambda (H11: (eq nat n5 (next -g n2))).(eq_ind nat (next g n2) (\lambda (n6: nat).((eq A (aplus g (ASort n3 -n0) k) (aplus g (ASort O n6) k)) \to (leq g (ASort (S n3) n0) (ASort O n2)))) -(\lambda (H12: (eq A (aplus g (ASort n3 n0) k) (aplus g (ASort O (next g n2)) -k))).(let H13 \def (eq_ind_r A (aplus g (ASort n3 n0) k) (\lambda (a: A).(eq -A a (aplus g (ASort O (next g n2)) k))) H12 (aplus g (ASort (S n3) n0) (S k)) -(aplus_sort_S_S_simpl g n0 n3 k)) in (let H14 \def (eq_ind_r A (aplus g -(ASort O (next g n2)) k) (\lambda (a: A).(eq A (aplus g (ASort (S n3) n0) (S -k)) a)) H13 (aplus g (ASort O n2) (S k)) (aplus_sort_O_S_simpl g n2 k)) in -(leq_sort g (S n3) O n0 n2 (S k) H14)))) n5 (sym_eq nat n5 (next g n2) H11))) -h2 (sym_eq nat h2 O H10))) H9))) n4 (sym_eq nat n4 n0 H7))) h1 (sym_eq nat h1 -n3 H6))) H5)) H4 H2))) | (leq_head a0 a3 H2 a4 a5 H3) \Rightarrow (\lambda -(H4: (eq A (AHead a0 a4) (ASort n3 n0))).(\lambda (H5: (eq A (AHead a3 a5) -(ASort O (next g n2)))).((let H6 \def (eq_ind A (AHead a0 a4) (\lambda (e: -A).(match e in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow -False | (AHead _ _) \Rightarrow True])) I (ASort n3 n0) H4) in (False_ind -((eq A (AHead a3 a5) (ASort O (next g n2))) \to ((leq g a0 a3) \to ((leq g a4 -a5) \to (leq g (ASort (S n3) n0) (ASort O n2))))) H6)) H5 H2 H3)))]) in (H2 -(refl_equal A (ASort n3 n0)) (refl_equal A (ASort O (next g n2)))))) | (S n4) -\Rightarrow (\lambda (H1: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort -(S n4) n2)))).(let H2 \def (match H1 in leq return (\lambda (a: A).(\lambda -(a0: A).(\lambda (_: (leq ? a a0)).((eq A a (ASort n3 n0)) \to ((eq A a0 -(ASort n4 n2)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))))) with -[(leq_sort h1 h2 n5 n6 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n5) -(ASort n3 n0))).(\lambda (H4: (eq A (ASort h2 n6) (ASort n4 n2))).((let H5 -\def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) -with [(ASort _ n7) \Rightarrow n7 | (AHead _ _) \Rightarrow n5])) (ASort h1 -n5) (ASort n3 n0) H3) in ((let H6 \def (f_equal A nat (\lambda (e: A).(match -e in A return (\lambda (_: A).nat) with [(ASort n7 _) \Rightarrow n7 | (AHead -_ _) \Rightarrow h1])) (ASort h1 n5) (ASort n3 n0) H3) in (eq_ind nat n3 -(\lambda (n7: nat).((eq nat n5 n0) \to ((eq A (ASort h2 n6) (ASort n4 n2)) -\to ((eq A (aplus g (ASort n7 n5) k) (aplus g (ASort h2 n6) k)) \to (leq g -(ASort (S n3) n0) (ASort (S n4) n2)))))) (\lambda (H7: (eq nat n5 -n0)).(eq_ind nat n0 (\lambda (n7: nat).((eq A (ASort h2 n6) (ASort n4 n2)) -\to ((eq A (aplus g (ASort n3 n7) k) (aplus g (ASort h2 n6) k)) \to (leq g -(ASort (S n3) n0) (ASort (S n4) n2))))) (\lambda (H8: (eq A (ASort h2 n6) -(ASort n4 n2))).(let H9 \def (f_equal A nat (\lambda (e: A).(match e in A -return (\lambda (_: A).nat) with [(ASort _ n7) \Rightarrow n7 | (AHead _ _) -\Rightarrow n6])) (ASort h2 n6) (ASort n4 n2) H8) in ((let H10 \def (f_equal -A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort -n7 _) \Rightarrow n7 | (AHead _ _) \Rightarrow h2])) (ASort h2 n6) (ASort n4 -n2) H8) in (eq_ind nat n4 (\lambda (n7: nat).((eq nat n6 n2) \to ((eq A -(aplus g (ASort n3 n0) k) (aplus g (ASort n7 n6) k)) \to (leq g (ASort (S n3) -n0) (ASort (S n4) n2))))) (\lambda (H11: (eq nat n6 n2)).(eq_ind nat n2 -(\lambda (n7: nat).((eq A (aplus g (ASort n3 n0) k) (aplus g (ASort n4 n7) -k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2)))) (\lambda (H12: (eq A -(aplus g (ASort n3 n0) k) (aplus g (ASort n4 n2) k))).(let H13 \def (eq_ind_r -A (aplus g (ASort n3 n0) k) (\lambda (a: A).(eq A a (aplus g (ASort n4 n2) -k))) H12 (aplus g (ASort (S n3) n0) (S k)) (aplus_sort_S_S_simpl g n0 n3 k)) -in (let H14 \def (eq_ind_r A (aplus g (ASort n4 n2) k) (\lambda (a: A).(eq A -(aplus g (ASort (S n3) n0) (S k)) a)) H13 (aplus g (ASort (S n4) n2) (S k)) -(aplus_sort_S_S_simpl g n2 n4 k)) in (leq_sort g (S n3) (S n4) n0 n2 (S k) -H14)))) n6 (sym_eq nat n6 n2 H11))) h2 (sym_eq nat h2 n4 H10))) H9))) n5 -(sym_eq nat n5 n0 H7))) h1 (sym_eq nat h1 n3 H6))) H5)) H4 H2))) | (leq_head -a0 a3 H2 a4 a5 H3) \Rightarrow (\lambda (H4: (eq A (AHead a0 a4) (ASort n3 -n0))).(\lambda (H5: (eq A (AHead a3 a5) (ASort n4 n2))).((let H6 \def (eq_ind -A (AHead a0 a4) (\lambda (e: A).(match e in A return (\lambda (_: A).Prop) -with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I -(ASort n3 n0) H4) in (False_ind ((eq A (AHead a3 a5) (ASort n4 n2)) \to ((leq -g a0 a3) \to ((leq g a4 a5) \to (leq g (ASort (S n3) n0) (ASort (S n4) -n2))))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A (ASort n3 n0)) (refl_equal A -(ASort n4 n2)))))]) H0))]) H)))) (\lambda (a: A).(\lambda (H: (((leq g (asucc -g (ASort n n0)) (asucc g a)) \to (leq g (ASort n n0) a)))).(\lambda (a0: -A).(\lambda (H0: (((leq g (asucc g (ASort n n0)) (asucc g a0)) \to (leq g -(ASort n n0) a0)))).(\lambda (H1: (leq g (asucc g (ASort n n0)) (asucc g -(AHead a a0)))).((match n in nat return (\lambda (n1: nat).((((leq g (asucc g -(ASort n1 n0)) (asucc g a)) \to (leq g (ASort n1 n0) a))) \to ((((leq g -(asucc g (ASort n1 n0)) (asucc g a0)) \to (leq g (ASort n1 n0) a0))) \to -((leq g (asucc g (ASort n1 n0)) (asucc g (AHead a a0))) \to (leq g (ASort n1 -n0) (AHead a a0)))))) with [O \Rightarrow (\lambda (_: (((leq g (asucc g -(ASort O n0)) (asucc g a)) \to (leq g (ASort O n0) a)))).(\lambda (_: (((leq -g (asucc g (ASort O n0)) (asucc g a0)) \to (leq g (ASort O n0) -a0)))).(\lambda (H4: (leq g (asucc g (ASort O n0)) (asucc g (AHead a -a0)))).(let H5 \def (match H4 in leq return (\lambda (a3: A).(\lambda (a4: -A).(\lambda (_: (leq ? a3 a4)).((eq A a3 (ASort O (next g n0))) \to ((eq A a4 -(AHead a (asucc g a0))) \to (leq g (ASort O n0) (AHead a a0))))))) with -[(leq_sort h1 h2 n1 n2 k H5) \Rightarrow (\lambda (H6: (eq A (ASort h1 n1) -(ASort O (next g n0)))).(\lambda (H7: (eq A (ASort h2 n2) (AHead a (asucc g -a0)))).((let H8 \def (f_equal A nat (\lambda (e: A).(match e in A return -(\lambda (_: A).nat) with [(ASort _ n3) \Rightarrow n3 | (AHead _ _) -\Rightarrow n1])) (ASort h1 n1) (ASort O (next g n0)) H6) in ((let H9 \def +(ASort n3 n2) H8) in (eq_ind nat n3 (\lambda (n6: nat).((eq nat n5 n2) \to +((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n6 n5) k)) \to (leq +g (ASort O n0) (ASort (S n3) n2))))) (\lambda (H11: (eq nat n5 n2)).(eq_ind +nat n2 (\lambda (n6: nat).((eq A (aplus g (ASort O (next g n0)) k) (aplus g +(ASort n3 n6) k)) \to (leq g (ASort O n0) (ASort (S n3) n2)))) (\lambda (H12: +(eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n3 n2) k))).(let H13 +\def (eq_ind_r A (aplus g (ASort O (next g n0)) k) (\lambda (a: A).(eq A a +(aplus g (ASort n3 n2) k))) H12 (aplus g (ASort O n0) (S k)) +(aplus_sort_O_S_simpl g n0 k)) in (let H14 \def (eq_ind_r A (aplus g (ASort +n3 n2) k) (\lambda (a: A).(eq A (aplus g (ASort O n0) (S k)) a)) H13 (aplus g +(ASort (S n3) n2) (S k)) (aplus_sort_S_S_simpl g n2 n3 k)) in (leq_sort g O +(S n3) n0 n2 (S k) H14)))) n5 (sym_eq nat n5 n2 H11))) h2 (sym_eq nat h2 n3 +H10))) H9))) n4 (sym_eq nat n4 (next g n0) H7))) h1 (sym_eq nat h1 O H6))) +H5)) H4 H2))) | (leq_head a0 a3 H2 a4 a5 H3) \Rightarrow (\lambda (H4: (eq A +(AHead a0 a4) (ASort O (next g n0)))).(\lambda (H5: (eq A (AHead a3 a5) +(ASort n3 n2))).((let H6 \def (eq_ind A (AHead a0 a4) (\lambda (e: A).(match +e in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | +(AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H4) in (False_ind +((eq A (AHead a3 a5) (ASort n3 n2)) \to ((leq g a0 a3) \to ((leq g a4 a5) \to +(leq g (ASort O n0) (ASort (S n3) n2))))) H6)) H5 H2 H3)))]) in (H2 +(refl_equal A (ASort O (next g n0))) (refl_equal A (ASort n3 n2))))))) n1 +H0)) (\lambda (n3: nat).(\lambda (IHn: (((leq g (asucc g (ASort n3 n0)) +(asucc g (ASort n1 n2))) \to (leq g (ASort n3 n0) (ASort n1 n2))))).(\lambda +(H0: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort n1 n2)))).(nat_ind +(\lambda (n4: nat).((leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort n4 +n2))) \to ((((leq g (asucc g (ASort n3 n0)) (asucc g (ASort n4 n2))) \to (leq +g (ASort n3 n0) (ASort n4 n2)))) \to (leq g (ASort (S n3) n0) (ASort n4 +n2))))) (\lambda (H1: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort O +n2)))).(\lambda (_: (((leq g (asucc g (ASort n3 n0)) (asucc g (ASort O n2))) +\to (leq g (ASort n3 n0) (ASort O n2))))).(let H2 \def (match H1 in leq +return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a +(ASort n3 n0)) \to ((eq A a0 (ASort O (next g n2))) \to (leq g (ASort (S n3) +n0) (ASort O n2))))))) with [(leq_sort h1 h2 n4 n5 k H2) \Rightarrow (\lambda +(H3: (eq A (ASort h1 n4) (ASort n3 n0))).(\lambda (H4: (eq A (ASort h2 n5) +(ASort O (next g n2)))).((let H5 \def (f_equal A nat (\lambda (e: A).(match e +in A return (\lambda (_: A).nat) with [(ASort _ n6) \Rightarrow n6 | (AHead _ +_) \Rightarrow n4])) (ASort h1 n4) (ASort n3 n0) H3) in ((let H6 \def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with -[(ASort n3 _) \Rightarrow n3 | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) -(ASort O (next g n0)) H6) in (eq_ind nat O (\lambda (n3: nat).((eq nat n1 +[(ASort n6 _) \Rightarrow n6 | (AHead _ _) \Rightarrow h1])) (ASort h1 n4) +(ASort n3 n0) H3) in (eq_ind nat n3 (\lambda (n6: nat).((eq nat n4 n0) \to +((eq A (ASort h2 n5) (ASort O (next g n2))) \to ((eq A (aplus g (ASort n6 n4) +k) (aplus g (ASort h2 n5) k)) \to (leq g (ASort (S n3) n0) (ASort O n2)))))) +(\lambda (H7: (eq nat n4 n0)).(eq_ind nat n0 (\lambda (n6: nat).((eq A (ASort +h2 n5) (ASort O (next g n2))) \to ((eq A (aplus g (ASort n3 n6) k) (aplus g +(ASort h2 n5) k)) \to (leq g (ASort (S n3) n0) (ASort O n2))))) (\lambda (H8: +(eq A (ASort h2 n5) (ASort O (next g n2)))).(let H9 \def (f_equal A nat +(\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n6) +\Rightarrow n6 | (AHead _ _) \Rightarrow n5])) (ASort h2 n5) (ASort O (next g +n2)) H8) in ((let H10 \def (f_equal A nat (\lambda (e: A).(match e in A +return (\lambda (_: A).nat) with [(ASort n6 _) \Rightarrow n6 | (AHead _ _) +\Rightarrow h2])) (ASort h2 n5) (ASort O (next g n2)) H8) in (eq_ind nat O +(\lambda (n6: nat).((eq nat n5 (next g n2)) \to ((eq A (aplus g (ASort n3 n0) +k) (aplus g (ASort n6 n5) k)) \to (leq g (ASort (S n3) n0) (ASort O n2))))) +(\lambda (H11: (eq nat n5 (next g n2))).(eq_ind nat (next g n2) (\lambda (n6: +nat).((eq A (aplus g (ASort n3 n0) k) (aplus g (ASort O n6) k)) \to (leq g +(ASort (S n3) n0) (ASort O n2)))) (\lambda (H12: (eq A (aplus g (ASort n3 n0) +k) (aplus g (ASort O (next g n2)) k))).(let H13 \def (eq_ind_r A (aplus g +(ASort n3 n0) k) (\lambda (a: A).(eq A a (aplus g (ASort O (next g n2)) k))) +H12 (aplus g (ASort (S n3) n0) (S k)) (aplus_sort_S_S_simpl g n0 n3 k)) in +(let H14 \def (eq_ind_r A (aplus g (ASort O (next g n2)) k) (\lambda (a: +A).(eq A (aplus g (ASort (S n3) n0) (S k)) a)) H13 (aplus g (ASort O n2) (S +k)) (aplus_sort_O_S_simpl g n2 k)) in (leq_sort g (S n3) O n0 n2 (S k) +H14)))) n5 (sym_eq nat n5 (next g n2) H11))) h2 (sym_eq nat h2 O H10))) H9))) +n4 (sym_eq nat n4 n0 H7))) h1 (sym_eq nat h1 n3 H6))) H5)) H4 H2))) | +(leq_head a0 a3 H2 a4 a5 H3) \Rightarrow (\lambda (H4: (eq A (AHead a0 a4) +(ASort n3 n0))).(\lambda (H5: (eq A (AHead a3 a5) (ASort O (next g +n2)))).((let H6 \def (eq_ind A (AHead a0 a4) (\lambda (e: A).(match e in A +return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ +_) \Rightarrow True])) I (ASort n3 n0) H4) in (False_ind ((eq A (AHead a3 a5) +(ASort O (next g n2))) \to ((leq g a0 a3) \to ((leq g a4 a5) \to (leq g +(ASort (S n3) n0) (ASort O n2))))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A +(ASort n3 n0)) (refl_equal A (ASort O (next g n2))))))) (\lambda (n4: +nat).(\lambda (_: (((leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort n4 +n2))) \to ((((leq g (asucc g (ASort n3 n0)) (asucc g (ASort n4 n2))) \to (leq +g (ASort n3 n0) (ASort n4 n2)))) \to (leq g (ASort (S n3) n0) (ASort n4 +n2)))))).(\lambda (H1: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort (S +n4) n2)))).(\lambda (_: (((leq g (asucc g (ASort n3 n0)) (asucc g (ASort (S +n4) n2))) \to (leq g (ASort n3 n0) (ASort (S n4) n2))))).(let H2 \def (match +H1 in leq return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a +a0)).((eq A a (ASort n3 n0)) \to ((eq A a0 (ASort n4 n2)) \to (leq g (ASort +(S n3) n0) (ASort (S n4) n2))))))) with [(leq_sort h1 h2 n5 n6 k H2) +\Rightarrow (\lambda (H3: (eq A (ASort h1 n5) (ASort n3 n0))).(\lambda (H4: +(eq A (ASort h2 n6) (ASort n4 n2))).((let H5 \def (f_equal A nat (\lambda (e: +A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n7) \Rightarrow +n7 | (AHead _ _) \Rightarrow n5])) (ASort h1 n5) (ASort n3 n0) H3) in ((let +H6 \def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: +A).nat) with [(ASort n7 _) \Rightarrow n7 | (AHead _ _) \Rightarrow h1])) +(ASort h1 n5) (ASort n3 n0) H3) in (eq_ind nat n3 (\lambda (n7: nat).((eq nat +n5 n0) \to ((eq A (ASort h2 n6) (ASort n4 n2)) \to ((eq A (aplus g (ASort n7 +n5) k) (aplus g (ASort h2 n6) k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) +n2)))))) (\lambda (H7: (eq nat n5 n0)).(eq_ind nat n0 (\lambda (n7: nat).((eq +A (ASort h2 n6) (ASort n4 n2)) \to ((eq A (aplus g (ASort n3 n7) k) (aplus g +(ASort h2 n6) k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))) (\lambda +(H8: (eq A (ASort h2 n6) (ASort n4 n2))).(let H9 \def (f_equal A nat (\lambda +(e: A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n7) +\Rightarrow n7 | (AHead _ _) \Rightarrow n6])) (ASort h2 n6) (ASort n4 n2) +H8) in ((let H10 \def (f_equal A nat (\lambda (e: A).(match e in A return +(\lambda (_: A).nat) with [(ASort n7 _) \Rightarrow n7 | (AHead _ _) +\Rightarrow h2])) (ASort h2 n6) (ASort n4 n2) H8) in (eq_ind nat n4 (\lambda +(n7: nat).((eq nat n6 n2) \to ((eq A (aplus g (ASort n3 n0) k) (aplus g +(ASort n7 n6) k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))) (\lambda +(H11: (eq nat n6 n2)).(eq_ind nat n2 (\lambda (n7: nat).((eq A (aplus g +(ASort n3 n0) k) (aplus g (ASort n4 n7) k)) \to (leq g (ASort (S n3) n0) +(ASort (S n4) n2)))) (\lambda (H12: (eq A (aplus g (ASort n3 n0) k) (aplus g +(ASort n4 n2) k))).(let H13 \def (eq_ind_r A (aplus g (ASort n3 n0) k) +(\lambda (a: A).(eq A a (aplus g (ASort n4 n2) k))) H12 (aplus g (ASort (S +n3) n0) (S k)) (aplus_sort_S_S_simpl g n0 n3 k)) in (let H14 \def (eq_ind_r A +(aplus g (ASort n4 n2) k) (\lambda (a: A).(eq A (aplus g (ASort (S n3) n0) (S +k)) a)) H13 (aplus g (ASort (S n4) n2) (S k)) (aplus_sort_S_S_simpl g n2 n4 +k)) in (leq_sort g (S n3) (S n4) n0 n2 (S k) H14)))) n6 (sym_eq nat n6 n2 +H11))) h2 (sym_eq nat h2 n4 H10))) H9))) n5 (sym_eq nat n5 n0 H7))) h1 +(sym_eq nat h1 n3 H6))) H5)) H4 H2))) | (leq_head a0 a3 H2 a4 a5 H3) +\Rightarrow (\lambda (H4: (eq A (AHead a0 a4) (ASort n3 n0))).(\lambda (H5: +(eq A (AHead a3 a5) (ASort n4 n2))).((let H6 \def (eq_ind A (AHead a0 a4) +(\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with [(ASort _ _) +\Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n3 n0) H4) in +(False_ind ((eq A (AHead a3 a5) (ASort n4 n2)) \to ((leq g a0 a3) \to ((leq g +a4 a5) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))) H6)) H5 H2 H3)))]) +in (H2 (refl_equal A (ASort n3 n0)) (refl_equal A (ASort n4 n2)))))))) n1 H0 +IHn)))) n H)))) (\lambda (a: A).(\lambda (H: (((leq g (asucc g (ASort n n0)) +(asucc g a)) \to (leq g (ASort n n0) a)))).(\lambda (a0: A).(\lambda (H0: +(((leq g (asucc g (ASort n n0)) (asucc g a0)) \to (leq g (ASort n n0) +a0)))).(\lambda (H1: (leq g (asucc g (ASort n n0)) (asucc g (AHead a +a0)))).(nat_ind (\lambda (n1: nat).((((leq g (asucc g (ASort n1 n0)) (asucc g +a)) \to (leq g (ASort n1 n0) a))) \to ((((leq g (asucc g (ASort n1 n0)) +(asucc g a0)) \to (leq g (ASort n1 n0) a0))) \to ((leq g (asucc g (ASort n1 +n0)) (asucc g (AHead a a0))) \to (leq g (ASort n1 n0) (AHead a a0)))))) +(\lambda (_: (((leq g (asucc g (ASort O n0)) (asucc g a)) \to (leq g (ASort O +n0) a)))).(\lambda (_: (((leq g (asucc g (ASort O n0)) (asucc g a0)) \to (leq +g (ASort O n0) a0)))).(\lambda (H4: (leq g (asucc g (ASort O n0)) (asucc g +(AHead a a0)))).(let H5 \def (match H4 in leq return (\lambda (a3: +A).(\lambda (a4: A).(\lambda (_: (leq ? a3 a4)).((eq A a3 (ASort O (next g +n0))) \to ((eq A a4 (AHead a (asucc g a0))) \to (leq g (ASort O n0) (AHead a +a0))))))) with [(leq_sort h1 h2 n1 n2 k H5) \Rightarrow (\lambda (H6: (eq A +(ASort h1 n1) (ASort O (next g n0)))).(\lambda (H7: (eq A (ASort h2 n2) +(AHead a (asucc g a0)))).((let H8 \def (f_equal A nat (\lambda (e: A).(match +e in A return (\lambda (_: A).nat) with [(ASort _ n3) \Rightarrow n3 | (AHead +_ _) \Rightarrow n1])) (ASort h1 n1) (ASort O (next g n0)) H6) in ((let H9 +\def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) +with [(ASort n3 _) \Rightarrow n3 | (AHead _ _) \Rightarrow h1])) (ASort h1 +n1) (ASort O (next g n0)) H6) in (eq_ind nat O (\lambda (n3: nat).((eq nat n1 (next g n0)) \to ((eq A (ASort h2 n2) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort n3 n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort O n0) (AHead a a0)))))) (\lambda (H10: (eq nat n1 (next g n0))).(eq_ind nat (next g @@ -314,61 +342,64 @@ n0)))).(\lambda (H8: (eq A (AHead a4 a6) (AHead a (asucc g a0)))).((let H9 True])) I (ASort O (next g n0)) H7) in (False_ind ((eq A (AHead a4 a6) (AHead a (asucc g a0))) \to ((leq g a3 a4) \to ((leq g a5 a6) \to (leq g (ASort O n0) (AHead a a0))))) H9)) H8 H5 H6)))]) in (H5 (refl_equal A (ASort O (next g -n0))) (refl_equal A (AHead a (asucc g a0)))))))) | (S n1) \Rightarrow -(\lambda (_: (((leq g (asucc g (ASort (S n1) n0)) (asucc g a)) \to (leq g -(ASort (S n1) n0) a)))).(\lambda (_: (((leq g (asucc g (ASort (S n1) n0)) -(asucc g a0)) \to (leq g (ASort (S n1) n0) a0)))).(\lambda (H4: (leq g (asucc -g (ASort (S n1) n0)) (asucc g (AHead a a0)))).(let H5 \def (match H4 in leq -return (\lambda (a3: A).(\lambda (a4: A).(\lambda (_: (leq ? a3 a4)).((eq A -a3 (ASort n1 n0)) \to ((eq A a4 (AHead a (asucc g a0))) \to (leq g (ASort (S -n1) n0) (AHead a a0))))))) with [(leq_sort h1 h2 n2 n3 k H5) \Rightarrow -(\lambda (H6: (eq A (ASort h1 n2) (ASort n1 n0))).(\lambda (H7: (eq A (ASort -h2 n3) (AHead a (asucc g a0)))).((let H8 \def (f_equal A nat (\lambda (e: -A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n4) \Rightarrow -n4 | (AHead _ _) \Rightarrow n2])) (ASort h1 n2) (ASort n1 n0) H6) in ((let -H9 \def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: -A).nat) with [(ASort n4 _) \Rightarrow n4 | (AHead _ _) \Rightarrow h1])) -(ASort h1 n2) (ASort n1 n0) H6) in (eq_ind nat n1 (\lambda (n4: nat).((eq nat -n2 n0) \to ((eq A (ASort h2 n3) (AHead a (asucc g a0))) \to ((eq A (aplus g -(ASort n4 n2) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort (S n1) n0) -(AHead a a0)))))) (\lambda (H10: (eq nat n2 n0)).(eq_ind nat n0 (\lambda (n4: -nat).((eq A (ASort h2 n3) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort -n1 n4) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort (S n1) n0) (AHead a -a0))))) (\lambda (H11: (eq A (ASort h2 n3) (AHead a (asucc g a0)))).(let H12 -\def (eq_ind A (ASort h2 n3) (\lambda (e: A).(match e in A return (\lambda -(_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow -False])) I (AHead a (asucc g a0)) H11) in (False_ind ((eq A (aplus g (ASort -n1 n0) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort (S n1) n0) (AHead a -a0))) H12))) n2 (sym_eq nat n2 n0 H10))) h1 (sym_eq nat h1 n1 H9))) H8)) H7 -H5))) | (leq_head a3 a4 H5 a5 a6 H6) \Rightarrow (\lambda (H7: (eq A (AHead -a3 a5) (ASort n1 n0))).(\lambda (H8: (eq A (AHead a4 a6) (AHead a (asucc g -a0)))).((let H9 \def (eq_ind A (AHead a3 a5) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ -_) \Rightarrow True])) I (ASort n1 n0) H7) in (False_ind ((eq A (AHead a4 a6) -(AHead a (asucc g a0))) \to ((leq g a3 a4) \to ((leq g a5 a6) \to (leq g -(ASort (S n1) n0) (AHead a a0))))) H9)) H8 H5 H6)))]) in (H5 (refl_equal A -(ASort n1 n0)) (refl_equal A (AHead a (asucc g a0))))))))]) H H0 H1)))))) -a2)))) (\lambda (a: A).(\lambda (_: ((\forall (a2: A).((leq g (asucc g a) -(asucc g a2)) \to (leq g a a2))))).(\lambda (a0: A).(\lambda (H0: ((\forall -(a2: A).((leq g (asucc g a0) (asucc g a2)) \to (leq g a0 a2))))).(\lambda -(a2: A).(A_ind (\lambda (a3: A).((leq g (asucc g (AHead a a0)) (asucc g a3)) -\to (leq g (AHead a a0) a3))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda -(H1: (leq g (asucc g (AHead a a0)) (asucc g (ASort n n0)))).((match n in nat -return (\lambda (n1: nat).((leq g (asucc g (AHead a a0)) (asucc g (ASort n1 -n0))) \to (leq g (AHead a a0) (ASort n1 n0)))) with [O \Rightarrow (\lambda -(H2: (leq g (asucc g (AHead a a0)) (asucc g (ASort O n0)))).(let H3 \def -(match H2 in leq return (\lambda (a3: A).(\lambda (a4: A).(\lambda (_: (leq ? -a3 a4)).((eq A a3 (AHead a (asucc g a0))) \to ((eq A a4 (ASort O (next g -n0))) \to (leq g (AHead a a0) (ASort O n0))))))) with [(leq_sort h1 h2 n1 n2 -k H3) \Rightarrow (\lambda (H4: (eq A (ASort h1 n1) (AHead a (asucc g -a0)))).(\lambda (H5: (eq A (ASort h2 n2) (ASort O (next g n0)))).((let H6 -\def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e in A return (\lambda -(_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow -False])) I (AHead a (asucc g a0)) H4) in (False_ind ((eq A (ASort h2 n2) -(ASort O (next g n0))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort -h2 n2) k)) \to (leq g (AHead a a0) (ASort O n0)))) H6)) H5 H3))) | (leq_head -a3 a4 H3 a5 a6 H4) \Rightarrow (\lambda (H5: (eq A (AHead a3 a5) (AHead a -(asucc g a0)))).(\lambda (H6: (eq A (AHead a4 a6) (ASort O (next g +n0))) (refl_equal A (AHead a (asucc g a0)))))))) (\lambda (n1: nat).(\lambda +(_: (((((leq g (asucc g (ASort n1 n0)) (asucc g a)) \to (leq g (ASort n1 n0) +a))) \to ((((leq g (asucc g (ASort n1 n0)) (asucc g a0)) \to (leq g (ASort n1 +n0) a0))) \to ((leq g (asucc g (ASort n1 n0)) (asucc g (AHead a a0))) \to +(leq g (ASort n1 n0) (AHead a a0))))))).(\lambda (_: (((leq g (asucc g (ASort +(S n1) n0)) (asucc g a)) \to (leq g (ASort (S n1) n0) a)))).(\lambda (_: +(((leq g (asucc g (ASort (S n1) n0)) (asucc g a0)) \to (leq g (ASort (S n1) +n0) a0)))).(\lambda (H4: (leq g (asucc g (ASort (S n1) n0)) (asucc g (AHead a +a0)))).(let H5 \def (match H4 in leq return (\lambda (a3: A).(\lambda (a4: +A).(\lambda (_: (leq ? a3 a4)).((eq A a3 (ASort n1 n0)) \to ((eq A a4 (AHead +a (asucc g a0))) \to (leq g (ASort (S n1) n0) (AHead a a0))))))) with +[(leq_sort h1 h2 n2 n3 k H5) \Rightarrow (\lambda (H6: (eq A (ASort h1 n2) +(ASort n1 n0))).(\lambda (H7: (eq A (ASort h2 n3) (AHead a (asucc g +a0)))).((let H8 \def (f_equal A nat (\lambda (e: A).(match e in A return +(\lambda (_: A).nat) with [(ASort _ n4) \Rightarrow n4 | (AHead _ _) +\Rightarrow n2])) (ASort h1 n2) (ASort n1 n0) H6) in ((let H9 \def (f_equal A +nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort n4 +_) \Rightarrow n4 | (AHead _ _) \Rightarrow h1])) (ASort h1 n2) (ASort n1 n0) +H6) in (eq_ind nat n1 (\lambda (n4: nat).((eq nat n2 n0) \to ((eq A (ASort h2 +n3) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort n4 n2) k) (aplus g +(ASort h2 n3) k)) \to (leq g (ASort (S n1) n0) (AHead a a0)))))) (\lambda +(H10: (eq nat n2 n0)).(eq_ind nat n0 (\lambda (n4: nat).((eq A (ASort h2 n3) +(AHead a (asucc g a0))) \to ((eq A (aplus g (ASort n1 n4) k) (aplus g (ASort +h2 n3) k)) \to (leq g (ASort (S n1) n0) (AHead a a0))))) (\lambda (H11: (eq A +(ASort h2 n3) (AHead a (asucc g a0)))).(let H12 \def (eq_ind A (ASort h2 n3) +(\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with [(ASort _ _) +\Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a (asucc g a0)) +H11) in (False_ind ((eq A (aplus g (ASort n1 n0) k) (aplus g (ASort h2 n3) +k)) \to (leq g (ASort (S n1) n0) (AHead a a0))) H12))) n2 (sym_eq nat n2 n0 +H10))) h1 (sym_eq nat h1 n1 H9))) H8)) H7 H5))) | (leq_head a3 a4 H5 a5 a6 +H6) \Rightarrow (\lambda (H7: (eq A (AHead a3 a5) (ASort n1 n0))).(\lambda +(H8: (eq A (AHead a4 a6) (AHead a (asucc g a0)))).((let H9 \def (eq_ind A +(AHead a3 a5) (\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with +[(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 +n0) H7) in (False_ind ((eq A (AHead a4 a6) (AHead a (asucc g a0))) \to ((leq +g a3 a4) \to ((leq g a5 a6) \to (leq g (ASort (S n1) n0) (AHead a a0))))) +H9)) H8 H5 H6)))]) in (H5 (refl_equal A (ASort n1 n0)) (refl_equal A (AHead a +(asucc g a0)))))))))) n H H0 H1)))))) a2)))) (\lambda (a: A).(\lambda (_: +((\forall (a2: A).((leq g (asucc g a) (asucc g a2)) \to (leq g a +a2))))).(\lambda (a0: A).(\lambda (H0: ((\forall (a2: A).((leq g (asucc g a0) +(asucc g a2)) \to (leq g a0 a2))))).(\lambda (a2: A).(A_ind (\lambda (a3: +A).((leq g (asucc g (AHead a a0)) (asucc g a3)) \to (leq g (AHead a a0) a3))) +(\lambda (n: nat).(\lambda (n0: nat).(\lambda (H1: (leq g (asucc g (AHead a +a0)) (asucc g (ASort n n0)))).(nat_ind (\lambda (n1: nat).((leq g (asucc g +(AHead a a0)) (asucc g (ASort n1 n0))) \to (leq g (AHead a a0) (ASort n1 +n0)))) (\lambda (H2: (leq g (asucc g (AHead a a0)) (asucc g (ASort O +n0)))).(let H3 \def (match H2 in leq return (\lambda (a3: A).(\lambda (a4: +A).(\lambda (_: (leq ? a3 a4)).((eq A a3 (AHead a (asucc g a0))) \to ((eq A +a4 (ASort O (next g n0))) \to (leq g (AHead a a0) (ASort O n0))))))) with +[(leq_sort h1 h2 n1 n2 k H3) \Rightarrow (\lambda (H4: (eq A (ASort h1 n1) +(AHead a (asucc g a0)))).(\lambda (H5: (eq A (ASort h2 n2) (ASort O (next g +n0)))).((let H6 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e in A +return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) +\Rightarrow False])) I (AHead a (asucc g a0)) H4) in (False_ind ((eq A (ASort +h2 n2) (ASort O (next g n0))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g +(ASort h2 n2) k)) \to (leq g (AHead a a0) (ASort O n0)))) H6)) H5 H3))) | +(leq_head a3 a4 H3 a5 a6 H4) \Rightarrow (\lambda (H5: (eq A (AHead a3 a5) +(AHead a (asucc g a0)))).(\lambda (H6: (eq A (AHead a4 a6) (ASort O (next g n0)))).((let H7 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a5 | (AHead _ a7) \Rightarrow a7])) (AHead a3 a5) (AHead a (asucc g a0)) H5) in ((let H8 \def @@ -386,21 +417,23 @@ in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | ((leq g a a4) \to ((leq g (asucc g a0) a6) \to (leq g (AHead a a0) (ASort O n0)))) H11))) a5 (sym_eq A a5 (asucc g a0) H9))) a3 (sym_eq A a3 a H8))) H7)) H6 H3 H4)))]) in (H3 (refl_equal A (AHead a (asucc g a0))) (refl_equal A -(ASort O (next g n0)))))) | (S n1) \Rightarrow (\lambda (H2: (leq g (asucc g -(AHead a a0)) (asucc g (ASort (S n1) n0)))).(let H3 \def (match H2 in leq -return (\lambda (a3: A).(\lambda (a4: A).(\lambda (_: (leq ? a3 a4)).((eq A -a3 (AHead a (asucc g a0))) \to ((eq A a4 (ASort n1 n0)) \to (leq g (AHead a -a0) (ASort (S n1) n0))))))) with [(leq_sort h1 h2 n2 n3 k H3) \Rightarrow -(\lambda (H4: (eq A (ASort h1 n2) (AHead a (asucc g a0)))).(\lambda (H5: (eq -A (ASort h2 n3) (ASort n1 n0))).((let H6 \def (eq_ind A (ASort h1 n2) -(\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with [(ASort _ _) -\Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a (asucc g a0)) -H4) in (False_ind ((eq A (ASort h2 n3) (ASort n1 n0)) \to ((eq A (aplus g -(ASort h1 n2) k) (aplus g (ASort h2 n3) k)) \to (leq g (AHead a a0) (ASort (S -n1) n0)))) H6)) H5 H3))) | (leq_head a3 a4 H3 a5 a6 H4) \Rightarrow (\lambda -(H5: (eq A (AHead a3 a5) (AHead a (asucc g a0)))).(\lambda (H6: (eq A (AHead -a4 a6) (ASort n1 n0))).((let H7 \def (f_equal A A (\lambda (e: A).(match e in -A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a5 | (AHead _ a7) +(ASort O (next g n0)))))) (\lambda (n1: nat).(\lambda (_: (((leq g (asucc g +(AHead a a0)) (asucc g (ASort n1 n0))) \to (leq g (AHead a a0) (ASort n1 +n0))))).(\lambda (H2: (leq g (asucc g (AHead a a0)) (asucc g (ASort (S n1) +n0)))).(let H3 \def (match H2 in leq return (\lambda (a3: A).(\lambda (a4: +A).(\lambda (_: (leq ? a3 a4)).((eq A a3 (AHead a (asucc g a0))) \to ((eq A +a4 (ASort n1 n0)) \to (leq g (AHead a a0) (ASort (S n1) n0))))))) with +[(leq_sort h1 h2 n2 n3 k H3) \Rightarrow (\lambda (H4: (eq A (ASort h1 n2) +(AHead a (asucc g a0)))).(\lambda (H5: (eq A (ASort h2 n3) (ASort n1 +n0))).((let H6 \def (eq_ind A (ASort h1 n2) (\lambda (e: A).(match e in A +return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) +\Rightarrow False])) I (AHead a (asucc g a0)) H4) in (False_ind ((eq A (ASort +h2 n3) (ASort n1 n0)) \to ((eq A (aplus g (ASort h1 n2) k) (aplus g (ASort h2 +n3) k)) \to (leq g (AHead a a0) (ASort (S n1) n0)))) H6)) H5 H3))) | +(leq_head a3 a4 H3 a5 a6 H4) \Rightarrow (\lambda (H5: (eq A (AHead a3 a5) +(AHead a (asucc g a0)))).(\lambda (H6: (eq A (AHead a4 a6) (ASort n1 +n0))).((let H7 \def (f_equal A A (\lambda (e: A).(match e in A return +(\lambda (_: A).A) with [(ASort _ _) \Rightarrow a5 | (AHead _ a7) \Rightarrow a7])) (AHead a3 a5) (AHead a (asucc g a0)) H5) in ((let H8 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead a7 _) \Rightarrow a7])) (AHead a3 a5) @@ -416,7 +449,7 @@ _) \Rightarrow True])) I (ASort n1 n0) H10) in (False_ind ((leq g a a4) \to ((leq g (asucc g a0) a6) \to (leq g (AHead a a0) (ASort (S n1) n0)))) H11))) a5 (sym_eq A a5 (asucc g a0) H9))) a3 (sym_eq A a3 a H8))) H7)) H6 H3 H4)))]) in (H3 (refl_equal A (AHead a (asucc g a0))) (refl_equal A (ASort n1 -n0)))))]) H1)))) (\lambda (a3: A).(\lambda (_: (((leq g (asucc g (AHead a +n0))))))) n H1)))) (\lambda (a3: A).(\lambda (_: (((leq g (asucc g (AHead a a0)) (asucc g a3)) \to (leq g (AHead a a0) a3)))).(\lambda (a4: A).(\lambda (_: (((leq g (asucc g (AHead a a0)) (asucc g a4)) \to (leq g (AHead a a0) a4)))).(\lambda (H3: (leq g (asucc g (AHead a a0)) (asucc g (AHead a3 @@ -483,104 +516,106 @@ theorem leq_ahead_asucc_false: A).((leq g (AHead a a2) (asucc g a)) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (a2: A).(\lambda (H: (leq g (AHead (ASort n n0) a2) (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) -\Rightarrow (ASort h n0)]))).(\lambda (P: Prop).((match n in nat return -(\lambda (n1: nat).((leq g (AHead (ASort n1 n0) a2) (match n1 with [O -\Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)])) \to P)) -with [O \Rightarrow (\lambda (H0: (leq g (AHead (ASort O n0) a2) (ASort O -(next g n0)))).(let H1 \def (match H0 in leq return (\lambda (a: A).(\lambda -(a0: A).(\lambda (_: (leq ? a a0)).((eq A a (AHead (ASort O n0) a2)) \to ((eq -A a0 (ASort O (next g n0))) \to P))))) with [(leq_sort h1 h2 n1 n2 k H1) -\Rightarrow (\lambda (H2: (eq A (ASort h1 n1) (AHead (ASort O n0) -a2))).(\lambda (H3: (eq A (ASort h2 n2) (ASort O (next g n0)))).((let H4 \def -(eq_ind A (ASort h1 n1) (\lambda (e: A).(match e in A return (\lambda (_: -A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow -False])) I (AHead (ASort O n0) a2) H2) in (False_ind ((eq A (ASort h2 n2) -(ASort O (next g n0))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort -h2 n2) k)) \to P)) H4)) H3 H1))) | (leq_head a0 a3 H1 a4 a5 H2) \Rightarrow -(\lambda (H3: (eq A (AHead a0 a4) (AHead (ASort O n0) a2))).(\lambda (H4: (eq -A (AHead a3 a5) (ASort O (next g n0)))).((let H5 \def (f_equal A A (\lambda +\Rightarrow (ASort h n0)]))).(\lambda (P: Prop).(nat_ind (\lambda (n1: +nat).((leq g (AHead (ASort n1 n0) a2) (match n1 with [O \Rightarrow (ASort O +(next g n0)) | (S h) \Rightarrow (ASort h n0)])) \to P)) (\lambda (H0: (leq g +(AHead (ASort O n0) a2) (ASort O (next g n0)))).(let H1 \def (match H0 in leq +return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a +(AHead (ASort O n0) a2)) \to ((eq A a0 (ASort O (next g n0))) \to P))))) with +[(leq_sort h1 h2 n1 n2 k H1) \Rightarrow (\lambda (H2: (eq A (ASort h1 n1) +(AHead (ASort O n0) a2))).(\lambda (H3: (eq A (ASort h2 n2) (ASort O (next g +n0)))).((let H4 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e in A +return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) +\Rightarrow False])) I (AHead (ASort O n0) a2) H2) in (False_ind ((eq A +(ASort h2 n2) (ASort O (next g n0))) \to ((eq A (aplus g (ASort h1 n1) k) +(aplus g (ASort h2 n2) k)) \to P)) H4)) H3 H1))) | (leq_head a0 a3 H1 a4 a5 +H2) \Rightarrow (\lambda (H3: (eq A (AHead a0 a4) (AHead (ASort O n0) +a2))).(\lambda (H4: (eq A (AHead a3 a5) (ASort O (next g n0)))).((let H5 \def +(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with +[(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a0 a4) +(AHead (ASort O n0) a2) H3) in ((let H6 \def (f_equal A A (\lambda (e: +A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | +(AHead a _) \Rightarrow a])) (AHead a0 a4) (AHead (ASort O n0) a2) H3) in +(eq_ind A (ASort O n0) (\lambda (a: A).((eq A a4 a2) \to ((eq A (AHead a3 a5) +(ASort O (next g n0))) \to ((leq g a a3) \to ((leq g a4 a5) \to P))))) +(\lambda (H7: (eq A a4 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a3 a5) +(ASort O (next g n0))) \to ((leq g (ASort O n0) a3) \to ((leq g a a5) \to +P)))) (\lambda (H8: (eq A (AHead a3 a5) (ASort O (next g n0)))).(let H9 \def +(eq_ind A (AHead a3 a5) (\lambda (e: A).(match e in A return (\lambda (_: +A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow +True])) I (ASort O (next g n0)) H8) in (False_ind ((leq g (ASort O n0) a3) +\to ((leq g a2 a5) \to P)) H9))) a4 (sym_eq A a4 a2 H7))) a0 (sym_eq A a0 +(ASort O n0) H6))) H5)) H4 H1 H2)))]) in (H1 (refl_equal A (AHead (ASort O +n0) a2)) (refl_equal A (ASort O (next g n0)))))) (\lambda (n1: nat).(\lambda +(_: (((leq g (AHead (ASort n1 n0) a2) (match n1 with [O \Rightarrow (ASort O +(next g n0)) | (S h) \Rightarrow (ASort h n0)])) \to P))).(\lambda (H0: (leq +g (AHead (ASort (S n1) n0) a2) (ASort n1 n0))).(let H1 \def (match H0 in leq +return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a +(AHead (ASort (S n1) n0) a2)) \to ((eq A a0 (ASort n1 n0)) \to P))))) with +[(leq_sort h1 h2 n2 n3 k H1) \Rightarrow (\lambda (H2: (eq A (ASort h1 n2) +(AHead (ASort (S n1) n0) a2))).(\lambda (H3: (eq A (ASort h2 n3) (ASort n1 +n0))).((let H4 \def (eq_ind A (ASort h1 n2) (\lambda (e: A).(match e in A +return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) +\Rightarrow False])) I (AHead (ASort (S n1) n0) a2) H2) in (False_ind ((eq A +(ASort h2 n3) (ASort n1 n0)) \to ((eq A (aplus g (ASort h1 n2) k) (aplus g +(ASort h2 n3) k)) \to P)) H4)) H3 H1))) | (leq_head a0 a3 H1 a4 a5 H2) +\Rightarrow (\lambda (H3: (eq A (AHead a0 a4) (AHead (ASort (S n1) n0) +a2))).(\lambda (H4: (eq A (AHead a3 a5) (ASort n1 n0))).((let H5 \def +(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with +[(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a0 a4) +(AHead (ASort (S n1) n0) a2) H3) in ((let H6 \def (f_equal A A (\lambda (e: +A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | +(AHead a _) \Rightarrow a])) (AHead a0 a4) (AHead (ASort (S n1) n0) a2) H3) +in (eq_ind A (ASort (S n1) n0) (\lambda (a: A).((eq A a4 a2) \to ((eq A +(AHead a3 a5) (ASort n1 n0)) \to ((leq g a a3) \to ((leq g a4 a5) \to P))))) +(\lambda (H7: (eq A a4 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a3 a5) +(ASort n1 n0)) \to ((leq g (ASort (S n1) n0) a3) \to ((leq g a a5) \to P)))) +(\lambda (H8: (eq A (AHead a3 a5) (ASort n1 n0))).(let H9 \def (eq_ind A +(AHead a3 a5) (\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with +[(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 +n0) H8) in (False_ind ((leq g (ASort (S n1) n0) a3) \to ((leq g a2 a5) \to +P)) H9))) a4 (sym_eq A a4 a2 H7))) a0 (sym_eq A a0 (ASort (S n1) n0) H6))) +H5)) H4 H1 H2)))]) in (H1 (refl_equal A (AHead (ASort (S n1) n0) a2)) +(refl_equal A (ASort n1 n0))))))) n H)))))) (\lambda (a: A).(\lambda (_: +((\forall (a2: A).((leq g (AHead a a2) (asucc g a)) \to (\forall (P: +Prop).P))))).(\lambda (a0: A).(\lambda (_: ((\forall (a2: A).((leq g (AHead +a0 a2) (asucc g a0)) \to (\forall (P: Prop).P))))).(\lambda (a2: A).(\lambda +(H1: (leq g (AHead (AHead a a0) a2) (AHead a (asucc g a0)))).(\lambda (P: +Prop).(let H2 \def (match H1 in leq return (\lambda (a3: A).(\lambda (a4: +A).(\lambda (_: (leq ? a3 a4)).((eq A a3 (AHead (AHead a a0) a2)) \to ((eq A +a4 (AHead a (asucc g a0))) \to P))))) with [(leq_sort h1 h2 n1 n2 k H2) +\Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (AHead (AHead a a0) +a2))).(\lambda (H4: (eq A (ASort h2 n2) (AHead a (asucc g a0)))).((let H5 +\def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e in A return (\lambda +(_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow +False])) I (AHead (AHead a a0) a2) H3) in (False_ind ((eq A (ASort h2 n2) +(AHead a (asucc g a0))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort +h2 n2) k)) \to P)) H5)) H4 H2))) | (leq_head a3 a4 H2 a5 a6 H3) \Rightarrow +(\lambda (H4: (eq A (AHead a3 a5) (AHead (AHead a a0) a2))).(\lambda (H5: (eq +A (AHead a4 a6) (AHead a (asucc g a0)))).((let H6 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow -a4 | (AHead _ a) \Rightarrow a])) (AHead a0 a4) (AHead (ASort O n0) a2) H3) -in ((let H6 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda -(_: A).A) with [(ASort _ _) \Rightarrow a0 | (AHead a _) \Rightarrow a])) -(AHead a0 a4) (AHead (ASort O n0) a2) H3) in (eq_ind A (ASort O n0) (\lambda -(a: A).((eq A a4 a2) \to ((eq A (AHead a3 a5) (ASort O (next g n0))) \to -((leq g a a3) \to ((leq g a4 a5) \to P))))) (\lambda (H7: (eq A a4 -a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a3 a5) (ASort O (next g n0))) -\to ((leq g (ASort O n0) a3) \to ((leq g a a5) \to P)))) (\lambda (H8: (eq A -(AHead a3 a5) (ASort O (next g n0)))).(let H9 \def (eq_ind A (AHead a3 a5) -(\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with [(ASort _ _) -\Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) -H8) in (False_ind ((leq g (ASort O n0) a3) \to ((leq g a2 a5) \to P)) H9))) -a4 (sym_eq A a4 a2 H7))) a0 (sym_eq A a0 (ASort O n0) H6))) H5)) H4 H1 -H2)))]) in (H1 (refl_equal A (AHead (ASort O n0) a2)) (refl_equal A (ASort O -(next g n0)))))) | (S n1) \Rightarrow (\lambda (H0: (leq g (AHead (ASort (S -n1) n0) a2) (ASort n1 n0))).(let H1 \def (match H0 in leq return (\lambda (a: -A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (AHead (ASort (S n1) -n0) a2)) \to ((eq A a0 (ASort n1 n0)) \to P))))) with [(leq_sort h1 h2 n2 n3 -k H1) \Rightarrow (\lambda (H2: (eq A (ASort h1 n2) (AHead (ASort (S n1) n0) -a2))).(\lambda (H3: (eq A (ASort h2 n3) (ASort n1 n0))).((let H4 \def (eq_ind -A (ASort h1 n2) (\lambda (e: A).(match e in A return (\lambda (_: A).Prop) -with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I -(AHead (ASort (S n1) n0) a2) H2) in (False_ind ((eq A (ASort h2 n3) (ASort n1 -n0)) \to ((eq A (aplus g (ASort h1 n2) k) (aplus g (ASort h2 n3) k)) \to P)) -H4)) H3 H1))) | (leq_head a0 a3 H1 a4 a5 H2) \Rightarrow (\lambda (H3: (eq A -(AHead a0 a4) (AHead (ASort (S n1) n0) a2))).(\lambda (H4: (eq A (AHead a3 -a5) (ASort n1 n0))).((let H5 \def (f_equal A A (\lambda (e: A).(match e in A -return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead _ a) -\Rightarrow a])) (AHead a0 a4) (AHead (ASort (S n1) n0) a2) H3) in ((let H6 -\def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) -with [(ASort _ _) \Rightarrow a0 | (AHead a _) \Rightarrow a])) (AHead a0 a4) -(AHead (ASort (S n1) n0) a2) H3) in (eq_ind A (ASort (S n1) n0) (\lambda (a: -A).((eq A a4 a2) \to ((eq A (AHead a3 a5) (ASort n1 n0)) \to ((leq g a a3) -\to ((leq g a4 a5) \to P))))) (\lambda (H7: (eq A a4 a2)).(eq_ind A a2 -(\lambda (a: A).((eq A (AHead a3 a5) (ASort n1 n0)) \to ((leq g (ASort (S n1) -n0) a3) \to ((leq g a a5) \to P)))) (\lambda (H8: (eq A (AHead a3 a5) (ASort -n1 n0))).(let H9 \def (eq_ind A (AHead a3 a5) (\lambda (e: A).(match e in A -return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ -_) \Rightarrow True])) I (ASort n1 n0) H8) in (False_ind ((leq g (ASort (S -n1) n0) a3) \to ((leq g a2 a5) \to P)) H9))) a4 (sym_eq A a4 a2 H7))) a0 -(sym_eq A a0 (ASort (S n1) n0) H6))) H5)) H4 H1 H2)))]) in (H1 (refl_equal A -(AHead (ASort (S n1) n0) a2)) (refl_equal A (ASort n1 n0)))))]) H)))))) -(\lambda (a: A).(\lambda (_: ((\forall (a2: A).((leq g (AHead a a2) (asucc g -a)) \to (\forall (P: Prop).P))))).(\lambda (a0: A).(\lambda (_: ((\forall -(a2: A).((leq g (AHead a0 a2) (asucc g a0)) \to (\forall (P: -Prop).P))))).(\lambda (a2: A).(\lambda (H1: (leq g (AHead (AHead a a0) a2) -(AHead a (asucc g a0)))).(\lambda (P: Prop).(let H2 \def (match H1 in leq -return (\lambda (a3: A).(\lambda (a4: A).(\lambda (_: (leq ? a3 a4)).((eq A -a3 (AHead (AHead a a0) a2)) \to ((eq A a4 (AHead a (asucc g a0))) \to P))))) -with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 -n1) (AHead (AHead a a0) a2))).(\lambda (H4: (eq A (ASort h2 n2) (AHead a -(asucc g a0)))).((let H5 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match -e in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | -(AHead _ _) \Rightarrow False])) I (AHead (AHead a a0) a2) H3) in (False_ind -((eq A (ASort h2 n2) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort h1 -n1) k) (aplus g (ASort h2 n2) k)) \to P)) H5)) H4 H2))) | (leq_head a3 a4 H2 -a5 a6 H3) \Rightarrow (\lambda (H4: (eq A (AHead a3 a5) (AHead (AHead a a0) -a2))).(\lambda (H5: (eq A (AHead a4 a6) (AHead a (asucc g a0)))).((let H6 -\def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) -with [(ASort _ _) \Rightarrow a5 | (AHead _ a7) \Rightarrow a7])) (AHead a3 -a5) (AHead (AHead a a0) a2) H4) in ((let H7 \def (f_equal A A (\lambda (e: -A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | -(AHead a7 _) \Rightarrow a7])) (AHead a3 a5) (AHead (AHead a a0) a2) H4) in -(eq_ind A (AHead a a0) (\lambda (a7: A).((eq A a5 a2) \to ((eq A (AHead a4 -a6) (AHead a (asucc g a0))) \to ((leq g a7 a4) \to ((leq g a5 a6) \to P))))) -(\lambda (H8: (eq A a5 a2)).(eq_ind A a2 (\lambda (a7: A).((eq A (AHead a4 -a6) (AHead a (asucc g a0))) \to ((leq g (AHead a a0) a4) \to ((leq g a7 a6) -\to P)))) (\lambda (H9: (eq A (AHead a4 a6) (AHead a (asucc g a0)))).(let H10 -\def (f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) -with [(ASort _ _) \Rightarrow a6 | (AHead _ a7) \Rightarrow a7])) (AHead a4 -a6) (AHead a (asucc g a0)) H9) in ((let H11 \def (f_equal A A (\lambda (e: -A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | -(AHead a7 _) \Rightarrow a7])) (AHead a4 a6) (AHead a (asucc g a0)) H9) in -(eq_ind A a (\lambda (a7: A).((eq A a6 (asucc g a0)) \to ((leq g (AHead a a0) -a7) \to ((leq g a2 a6) \to P)))) (\lambda (H12: (eq A a6 (asucc g -a0))).(eq_ind A (asucc g a0) (\lambda (a7: A).((leq g (AHead a a0) a) \to -((leq g a2 a7) \to P))) (\lambda (H13: (leq g (AHead a a0) a)).(\lambda (_: -(leq g a2 (asucc g a0))).(leq_ahead_false g a a0 H13 P))) a6 (sym_eq A a6 -(asucc g a0) H12))) a4 (sym_eq A a4 a H11))) H10))) a5 (sym_eq A a5 a2 H8))) -a3 (sym_eq A a3 (AHead a a0) H7))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A -(AHead (AHead a a0) a2)) (refl_equal A (AHead a (asucc g a0)))))))))))) a1)). +a5 | (AHead _ a7) \Rightarrow a7])) (AHead a3 a5) (AHead (AHead a a0) a2) H4) +in ((let H7 \def (f_equal A A (\lambda (e: A).(match e in A return (\lambda +(_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead a7 _) \Rightarrow a7])) +(AHead a3 a5) (AHead (AHead a a0) a2) H4) in (eq_ind A (AHead a a0) (\lambda +(a7: A).((eq A a5 a2) \to ((eq A (AHead a4 a6) (AHead a (asucc g a0))) \to +((leq g a7 a4) \to ((leq g a5 a6) \to P))))) (\lambda (H8: (eq A a5 +a2)).(eq_ind A a2 (\lambda (a7: A).((eq A (AHead a4 a6) (AHead a (asucc g +a0))) \to ((leq g (AHead a a0) a4) \to ((leq g a7 a6) \to P)))) (\lambda (H9: +(eq A (AHead a4 a6) (AHead a (asucc g a0)))).(let H10 \def (f_equal A A +(\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) +\Rightarrow a6 | (AHead _ a7) \Rightarrow a7])) (AHead a4 a6) (AHead a (asucc +g a0)) H9) in ((let H11 \def (f_equal A A (\lambda (e: A).(match e in A +return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead a7 _) +\Rightarrow a7])) (AHead a4 a6) (AHead a (asucc g a0)) H9) in (eq_ind A a +(\lambda (a7: A).((eq A a6 (asucc g a0)) \to ((leq g (AHead a a0) a7) \to +((leq g a2 a6) \to P)))) (\lambda (H12: (eq A a6 (asucc g a0))).(eq_ind A +(asucc g a0) (\lambda (a7: A).((leq g (AHead a a0) a) \to ((leq g a2 a7) \to +P))) (\lambda (H13: (leq g (AHead a a0) a)).(\lambda (_: (leq g a2 (asucc g +a0))).(leq_ahead_false g a a0 H13 P))) a6 (sym_eq A a6 (asucc g a0) H12))) a4 +(sym_eq A a4 a H11))) H10))) a5 (sym_eq A a5 a2 H8))) a3 (sym_eq A a3 (AHead +a a0) H7))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A (AHead (AHead a a0) a2)) +(refl_equal A (AHead a (asucc g a0)))))))))))) a1)). theorem leq_asucc_false: \forall (g: G).(\forall (a: A).((leq g (asucc g a) a) \to (\forall (P: @@ -589,16 +624,16 @@ Prop).P))) \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).((leq g (asucc g a0) a0) \to (\forall (P: Prop).P))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (H: (leq g (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) -\Rightarrow (ASort h n0)]) (ASort n n0))).(\lambda (P: Prop).((match n in nat -return (\lambda (n1: nat).((leq g (match n1 with [O \Rightarrow (ASort O -(next g n0)) | (S h) \Rightarrow (ASort h n0)]) (ASort n1 n0)) \to P)) with -[O \Rightarrow (\lambda (H0: (leq g (ASort O (next g n0)) (ASort O n0))).(let -H1 \def (match H0 in leq return (\lambda (a0: A).(\lambda (a1: A).(\lambda -(_: (leq ? a0 a1)).((eq A a0 (ASort O (next g n0))) \to ((eq A a1 (ASort O -n0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H1) \Rightarrow (\lambda (H2: -(eq A (ASort h1 n1) (ASort O (next g n0)))).(\lambda (H3: (eq A (ASort h2 n2) -(ASort O n0))).((let H4 \def (f_equal A nat (\lambda (e: A).(match e in A -return (\lambda (_: A).nat) with [(ASort _ n3) \Rightarrow n3 | (AHead _ _) +\Rightarrow (ASort h n0)]) (ASort n n0))).(\lambda (P: Prop).(nat_ind +(\lambda (n1: nat).((leq g (match n1 with [O \Rightarrow (ASort O (next g +n0)) | (S h) \Rightarrow (ASort h n0)]) (ASort n1 n0)) \to P)) (\lambda (H0: +(leq g (ASort O (next g n0)) (ASort O n0))).(let H1 \def (match H0 in leq +return (\lambda (a0: A).(\lambda (a1: A).(\lambda (_: (leq ? a0 a1)).((eq A +a0 (ASort O (next g n0))) \to ((eq A a1 (ASort O n0)) \to P))))) with +[(leq_sort h1 h2 n1 n2 k H1) \Rightarrow (\lambda (H2: (eq A (ASort h1 n1) +(ASort O (next g n0)))).(\lambda (H3: (eq A (ASort h2 n2) (ASort O +n0))).((let H4 \def (f_equal A nat (\lambda (e: A).(match e in A return +(\lambda (_: A).nat) with [(ASort _ n3) \Rightarrow n3 | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort O (next g n0)) H2) in ((let H5 \def (f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with [(ASort n3 _) \Rightarrow n3 | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) @@ -630,16 +665,18 @@ in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H3) in (False_ind ((eq A (AHead a2 a4) (ASort O n0)) \to ((leq g a1 a2) \to ((leq g a3 a4) \to P))) H5)) H4 H1 H2)))]) in (H1 (refl_equal A (ASort O (next g n0))) -(refl_equal A (ASort O n0))))) | (S n1) \Rightarrow (\lambda (H0: (leq g -(ASort n1 n0) (ASort (S n1) n0))).(let H1 \def (match H0 in leq return -(\lambda (a0: A).(\lambda (a1: A).(\lambda (_: (leq ? a0 a1)).((eq A a0 -(ASort n1 n0)) \to ((eq A a1 (ASort (S n1) n0)) \to P))))) with [(leq_sort h1 -h2 n2 n3 k H1) \Rightarrow (\lambda (H2: (eq A (ASort h1 n2) (ASort n1 -n0))).(\lambda (H3: (eq A (ASort h2 n3) (ASort (S n1) n0))).((let H4 \def -(f_equal A nat (\lambda (e: A).(match e in A return (\lambda (_: A).nat) with -[(ASort _ n4) \Rightarrow n4 | (AHead _ _) \Rightarrow n2])) (ASort h1 n2) -(ASort n1 n0) H2) in ((let H5 \def (f_equal A nat (\lambda (e: A).(match e in -A return (\lambda (_: A).nat) with [(ASort n4 _) \Rightarrow n4 | (AHead _ _) +(refl_equal A (ASort O n0))))) (\lambda (n1: nat).(\lambda (_: (((leq g +(match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow +(ASort h n0)]) (ASort n1 n0)) \to P))).(\lambda (H0: (leq g (ASort n1 n0) +(ASort (S n1) n0))).(let H1 \def (match H0 in leq return (\lambda (a0: +A).(\lambda (a1: A).(\lambda (_: (leq ? a0 a1)).((eq A a0 (ASort n1 n0)) \to +((eq A a1 (ASort (S n1) n0)) \to P))))) with [(leq_sort h1 h2 n2 n3 k H1) +\Rightarrow (\lambda (H2: (eq A (ASort h1 n2) (ASort n1 n0))).(\lambda (H3: +(eq A (ASort h2 n3) (ASort (S n1) n0))).((let H4 \def (f_equal A nat (\lambda +(e: A).(match e in A return (\lambda (_: A).nat) with [(ASort _ n4) +\Rightarrow n4 | (AHead _ _) \Rightarrow n2])) (ASort h1 n2) (ASort n1 n0) +H2) in ((let H5 \def (f_equal A nat (\lambda (e: A).(match e in A return +(\lambda (_: A).nat) with [(ASort n4 _) \Rightarrow n4 | (AHead _ _) \Rightarrow h1])) (ASort h1 n2) (ASort n1 n0) H2) in (eq_ind nat n1 (\lambda (n4: nat).((eq nat n2 n0) \to ((eq A (ASort h2 n3) (ASort (S n1) n0)) \to ((eq A (aplus g (ASort n4 n2) k) (aplus g (ASort h2 n3) k)) \to P)))) @@ -669,10 +706,10 @@ return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 n0) H3) in (False_ind ((eq A (AHead a2 a4) (ASort (S n1) n0)) \to ((leq g a1 a2) \to ((leq g a3 a4) \to P))) H5)) H4 H1 H2)))]) in (H1 (refl_equal A (ASort n1 n0)) (refl_equal A (ASort (S n1) -n0)))))]) H))))) (\lambda (a0: A).(\lambda (_: (((leq g (asucc g a0) a0) \to -(\forall (P: Prop).P)))).(\lambda (a1: A).(\lambda (H0: (((leq g (asucc g a1) -a1) \to (\forall (P: Prop).P)))).(\lambda (H1: (leq g (AHead a0 (asucc g a1)) -(AHead a0 a1))).(\lambda (P: Prop).(let H2 \def (match H1 in leq return +n0))))))) n H))))) (\lambda (a0: A).(\lambda (_: (((leq g (asucc g a0) a0) +\to (\forall (P: Prop).P)))).(\lambda (a1: A).(\lambda (H0: (((leq g (asucc g +a1) a1) \to (\forall (P: Prop).P)))).(\lambda (H1: (leq g (AHead a0 (asucc g +a1)) (AHead a0 a1))).(\lambda (P: Prop).(let H2 \def (match H1 in leq return (\lambda (a2: A).(\lambda (a3: A).(\lambda (_: (leq ? a2 a3)).((eq A a2 (AHead a0 (asucc g a1))) \to ((eq A a3 (AHead a0 a1)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/leq/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/leq/props.ma index 386f49f8d..912d617f0 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/leq/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/leq/props.ma @@ -172,65 +172,65 @@ theorem leq_ahead_false: \lambda (g: G).(\lambda (a1: A).(A_ind (\lambda (a: A).(\forall (a2: A).((leq g (AHead a a2) a) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (a2: A).(\lambda (H: (leq g (AHead (ASort n -n0) a2) (ASort n n0))).(\lambda (P: Prop).((match n in nat return (\lambda -(n1: nat).((leq g (AHead (ASort n1 n0) a2) (ASort n1 n0)) \to P)) with [O -\Rightarrow (\lambda (H0: (leq g (AHead (ASort O n0) a2) (ASort O n0))).(let -H1 \def (match H0 in leq return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: -(leq ? a a0)).((eq A a (AHead (ASort O n0) a2)) \to ((eq A a0 (ASort O n0)) -\to P))))) with [(leq_sort h1 h2 n1 n2 k H1) \Rightarrow (\lambda (H2: (eq A -(ASort h1 n1) (AHead (ASort O n0) a2))).(\lambda (H3: (eq A (ASort h2 n2) -(ASort O n0))).((let H4 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e +n0) a2) (ASort n n0))).(\lambda (P: Prop).(nat_ind (\lambda (n1: nat).((leq g +(AHead (ASort n1 n0) a2) (ASort n1 n0)) \to P)) (\lambda (H0: (leq g (AHead +(ASort O n0) a2) (ASort O n0))).(let H1 \def (match H0 in leq return (\lambda +(a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (AHead (ASort O +n0) a2)) \to ((eq A a0 (ASort O n0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k +H1) \Rightarrow (\lambda (H2: (eq A (ASort h1 n1) (AHead (ASort O n0) +a2))).(\lambda (H3: (eq A (ASort h2 n2) (ASort O n0))).((let H4 \def (eq_ind +A (ASort h1 n1) (\lambda (e: A).(match e in A return (\lambda (_: A).Prop) +with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I +(AHead (ASort O n0) a2) H2) in (False_ind ((eq A (ASort h2 n2) (ASort O n0)) +\to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H4)) +H3 H1))) | (leq_head a0 a3 H1 a4 a5 H2) \Rightarrow (\lambda (H3: (eq A +(AHead a0 a4) (AHead (ASort O n0) a2))).(\lambda (H4: (eq A (AHead a3 a5) +(ASort O n0))).((let H5 \def (f_equal A A (\lambda (e: A).(match e in A +return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead _ a) +\Rightarrow a])) (AHead a0 a4) (AHead (ASort O n0) a2) H3) in ((let H6 \def +(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with +[(ASort _ _) \Rightarrow a0 | (AHead a _) \Rightarrow a])) (AHead a0 a4) +(AHead (ASort O n0) a2) H3) in (eq_ind A (ASort O n0) (\lambda (a: A).((eq A +a4 a2) \to ((eq A (AHead a3 a5) (ASort O n0)) \to ((leq g a a3) \to ((leq g +a4 a5) \to P))))) (\lambda (H7: (eq A a4 a2)).(eq_ind A a2 (\lambda (a: +A).((eq A (AHead a3 a5) (ASort O n0)) \to ((leq g (ASort O n0) a3) \to ((leq +g a a5) \to P)))) (\lambda (H8: (eq A (AHead a3 a5) (ASort O n0))).(let H9 +\def (eq_ind A (AHead a3 a5) (\lambda (e: A).(match e in A return (\lambda +(_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow +True])) I (ASort O n0) H8) in (False_ind ((leq g (ASort O n0) a3) \to ((leq g +a2 a5) \to P)) H9))) a4 (sym_eq A a4 a2 H7))) a0 (sym_eq A a0 (ASort O n0) +H6))) H5)) H4 H1 H2)))]) in (H1 (refl_equal A (AHead (ASort O n0) a2)) +(refl_equal A (ASort O n0))))) (\lambda (n1: nat).(\lambda (_: (((leq g +(AHead (ASort n1 n0) a2) (ASort n1 n0)) \to P))).(\lambda (H0: (leq g (AHead +(ASort (S n1) n0) a2) (ASort (S n1) n0))).(let H1 \def (match H0 in leq +return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a +(AHead (ASort (S n1) n0) a2)) \to ((eq A a0 (ASort (S n1) n0)) \to P))))) +with [(leq_sort h1 h2 n2 n3 k H1) \Rightarrow (\lambda (H2: (eq A (ASort h1 +n2) (AHead (ASort (S n1) n0) a2))).(\lambda (H3: (eq A (ASort h2 n3) (ASort +(S n1) n0))).((let H4 \def (eq_ind A (ASort h1 n2) (\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead -_ _) \Rightarrow False])) I (AHead (ASort O n0) a2) H2) in (False_ind ((eq A -(ASort h2 n2) (ASort O n0)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g -(ASort h2 n2) k)) \to P)) H4)) H3 H1))) | (leq_head a0 a3 H1 a4 a5 H2) -\Rightarrow (\lambda (H3: (eq A (AHead a0 a4) (AHead (ASort O n0) -a2))).(\lambda (H4: (eq A (AHead a3 a5) (ASort O n0))).((let H5 \def (f_equal -A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) -\Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a0 a4) (AHead (ASort O -n0) a2) H3) in ((let H6 \def (f_equal A A (\lambda (e: A).(match e in A -return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | (AHead a _) -\Rightarrow a])) (AHead a0 a4) (AHead (ASort O n0) a2) H3) in (eq_ind A -(ASort O n0) (\lambda (a: A).((eq A a4 a2) \to ((eq A (AHead a3 a5) (ASort O -n0)) \to ((leq g a a3) \to ((leq g a4 a5) \to P))))) (\lambda (H7: (eq A a4 -a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a3 a5) (ASort O n0)) \to -((leq g (ASort O n0) a3) \to ((leq g a a5) \to P)))) (\lambda (H8: (eq A -(AHead a3 a5) (ASort O n0))).(let H9 \def (eq_ind A (AHead a3 a5) (\lambda -(e: A).(match e in A return (\lambda (_: A).Prop) with [(ASort _ _) -\Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O n0) H8) in -(False_ind ((leq g (ASort O n0) a3) \to ((leq g a2 a5) \to P)) H9))) a4 -(sym_eq A a4 a2 H7))) a0 (sym_eq A a0 (ASort O n0) H6))) H5)) H4 H1 H2)))]) -in (H1 (refl_equal A (AHead (ASort O n0) a2)) (refl_equal A (ASort O n0))))) -| (S n1) \Rightarrow (\lambda (H0: (leq g (AHead (ASort (S n1) n0) a2) (ASort -(S n1) n0))).(let H1 \def (match H0 in leq return (\lambda (a: A).(\lambda -(a0: A).(\lambda (_: (leq ? a a0)).((eq A a (AHead (ASort (S n1) n0) a2)) \to -((eq A a0 (ASort (S n1) n0)) \to P))))) with [(leq_sort h1 h2 n2 n3 k H1) -\Rightarrow (\lambda (H2: (eq A (ASort h1 n2) (AHead (ASort (S n1) n0) -a2))).(\lambda (H3: (eq A (ASort h2 n3) (ASort (S n1) n0))).((let H4 \def -(eq_ind A (ASort h1 n2) (\lambda (e: A).(match e in A return (\lambda (_: -A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow -False])) I (AHead (ASort (S n1) n0) a2) H2) in (False_ind ((eq A (ASort h2 -n3) (ASort (S n1) n0)) \to ((eq A (aplus g (ASort h1 n2) k) (aplus g (ASort -h2 n3) k)) \to P)) H4)) H3 H1))) | (leq_head a0 a3 H1 a4 a5 H2) \Rightarrow -(\lambda (H3: (eq A (AHead a0 a4) (AHead (ASort (S n1) n0) a2))).(\lambda -(H4: (eq A (AHead a3 a5) (ASort (S n1) n0))).((let H5 \def (f_equal A A -(\lambda (e: A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) -\Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a0 a4) (AHead (ASort (S -n1) n0) a2) H3) in ((let H6 \def (f_equal A A (\lambda (e: A).(match e in A -return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | (AHead a _) -\Rightarrow a])) (AHead a0 a4) (AHead (ASort (S n1) n0) a2) H3) in (eq_ind A -(ASort (S n1) n0) (\lambda (a: A).((eq A a4 a2) \to ((eq A (AHead a3 a5) -(ASort (S n1) n0)) \to ((leq g a a3) \to ((leq g a4 a5) \to P))))) (\lambda -(H7: (eq A a4 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a3 a5) (ASort -(S n1) n0)) \to ((leq g (ASort (S n1) n0) a3) \to ((leq g a a5) \to P)))) -(\lambda (H8: (eq A (AHead a3 a5) (ASort (S n1) n0))).(let H9 \def (eq_ind A -(AHead a3 a5) (\lambda (e: A).(match e in A return (\lambda (_: A).Prop) with -[(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort (S -n1) n0) H8) in (False_ind ((leq g (ASort (S n1) n0) a3) \to ((leq g a2 a5) -\to P)) H9))) a4 (sym_eq A a4 a2 H7))) a0 (sym_eq A a0 (ASort (S n1) n0) -H6))) H5)) H4 H1 H2)))]) in (H1 (refl_equal A (AHead (ASort (S n1) n0) a2)) -(refl_equal A (ASort (S n1) n0)))))]) H)))))) (\lambda (a: A).(\lambda (H: -((\forall (a2: A).((leq g (AHead a a2) a) \to (\forall (P: +_ _) \Rightarrow False])) I (AHead (ASort (S n1) n0) a2) H2) in (False_ind +((eq A (ASort h2 n3) (ASort (S n1) n0)) \to ((eq A (aplus g (ASort h1 n2) k) +(aplus g (ASort h2 n3) k)) \to P)) H4)) H3 H1))) | (leq_head a0 a3 H1 a4 a5 +H2) \Rightarrow (\lambda (H3: (eq A (AHead a0 a4) (AHead (ASort (S n1) n0) +a2))).(\lambda (H4: (eq A (AHead a3 a5) (ASort (S n1) n0))).((let H5 \def +(f_equal A A (\lambda (e: A).(match e in A return (\lambda (_: A).A) with +[(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a0 a4) +(AHead (ASort (S n1) n0) a2) H3) in ((let H6 \def (f_equal A A (\lambda (e: +A).(match e in A return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | +(AHead a _) \Rightarrow a])) (AHead a0 a4) (AHead (ASort (S n1) n0) a2) H3) +in (eq_ind A (ASort (S n1) n0) (\lambda (a: A).((eq A a4 a2) \to ((eq A +(AHead a3 a5) (ASort (S n1) n0)) \to ((leq g a a3) \to ((leq g a4 a5) \to +P))))) (\lambda (H7: (eq A a4 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead +a3 a5) (ASort (S n1) n0)) \to ((leq g (ASort (S n1) n0) a3) \to ((leq g a a5) +\to P)))) (\lambda (H8: (eq A (AHead a3 a5) (ASort (S n1) n0))).(let H9 \def +(eq_ind A (AHead a3 a5) (\lambda (e: A).(match e in A return (\lambda (_: +A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow +True])) I (ASort (S n1) n0) H8) in (False_ind ((leq g (ASort (S n1) n0) a3) +\to ((leq g a2 a5) \to P)) H9))) a4 (sym_eq A a4 a2 H7))) a0 (sym_eq A a0 +(ASort (S n1) n0) H6))) H5)) H4 H1 H2)))]) in (H1 (refl_equal A (AHead (ASort +(S n1) n0) a2)) (refl_equal A (ASort (S n1) n0))))))) n H)))))) (\lambda (a: +A).(\lambda (H: ((\forall (a2: A).((leq g (AHead a a2) a) \to (\forall (P: Prop).P))))).(\lambda (a0: A).(\lambda (_: ((\forall (a2: A).((leq g (AHead a0 a2) a0) \to (\forall (P: Prop).P))))).(\lambda (a2: A).(\lambda (H1: (leq g (AHead (AHead a a0) a2) (AHead a a0))).(\lambda (P: Prop).(let H2 \def diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/nf2/dec.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/nf2/dec.ma index 9495a5ef8..b84c503d4 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/nf2/dec.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/nf2/dec.ma @@ -63,80 +63,79 @@ t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2))) (or (\forall (t2: T).((pr2 (CTail k t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t c0) t1 t2)))) (\lambda (H1: -((\forall (t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))))).(match k in K return -(\lambda (k0: K).(or (\forall (t2: T).((pr2 (CTail k0 t c0) t1 t2) \to (eq T -t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr2 (CTail k0 t c0) t1 t2))))) with [(Bind b) \Rightarrow -(match b in B return (\lambda (b0: B).(or (\forall (t2: T).((pr2 (CTail (Bind -b0) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind b0) t c0) t1 -t2))))) with [Abbr \Rightarrow (let H_x0 \def (dnf_dec t t1 (clen c0)) in -(let H2 \def H_x0 in (ex_ind T (\lambda (v: T).(or (subst0 (clen c0) t t1 -(lift (S O) (clen c0) v)) (eq T t1 (lift (S O) (clen c0) v)))) (or (\forall -(t2: T).((pr2 (CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T -(\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)))) (\lambda (x: T).(\lambda (H3: (or -(subst0 (clen c0) t t1 (lift (S O) (clen c0) x)) (eq T t1 (lift (S O) (clen -c0) x)))).(or_ind (subst0 (clen c0) t t1 (lift (S O) (clen c0) x)) (eq T t1 -(lift (S O) (clen c0) x)) (or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) -t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall -(P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)))) -(\lambda (H4: (subst0 (clen c0) t t1 (lift (S O) (clen c0) x))).(let H_x1 -\def (getl_ctail_clen Abbr t c0) in (let H5 \def H_x1 in (ex_ind nat (\lambda -(n: nat).(getl (clen c0) (CTail (Bind Abbr) t c0) (CHead (CSort n) (Bind -Abbr) t))) (or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t1 t2) \to (eq -T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)))) (\lambda (x0: -nat).(\lambda (H6: (getl (clen c0) (CTail (Bind Abbr) t c0) (CHead (CSort x0) -(Bind Abbr) t))).(or_intror (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) -t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall -(P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2))) -(ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)) (lift (S O) (clen c0) -x) (\lambda (H7: (eq T t1 (lift (S O) (clen c0) x))).(\lambda (P: Prop).(let -H8 \def (eq_ind T t1 (\lambda (t0: T).(subst0 (clen c0) t t0 (lift (S O) -(clen c0) x))) H4 (lift (S O) (clen c0) x) H7) in (subst0_gen_lift_false x t -(lift (S O) (clen c0) x) (S O) (clen c0) (clen c0) (le_n (clen c0)) (eq_ind_r -nat (plus (S O) (clen c0)) (\lambda (n: nat).(lt (clen c0) n)) (le_n (plus (S -O) (clen c0))) (plus (clen c0) (S O)) (plus_comm (clen c0) (S O))) H8 P)))) -(pr2_delta (CTail (Bind Abbr) t c0) (CSort x0) t (clen c0) H6 t1 t1 (pr0_refl -t1) (lift (S O) (clen c0) x) H4))))) H5)))) (\lambda (H4: (eq T t1 (lift (S -O) (clen c0) x))).(let H5 \def (eq_ind T t1 (\lambda (t0: T).(\forall (t2: -T).((pr2 c0 t0 t2) \to (eq T t0 t2)))) H1 (lift (S O) (clen c0) x) H4) in -(eq_ind_r T (lift (S O) (clen c0) x) (\lambda (t0: T).(or (\forall (t2: -T).((pr2 (CTail (Bind Abbr) t c0) t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda -(t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 -(CTail (Bind Abbr) t c0) t0 t2))))) (or_introl (\forall (t2: T).((pr2 (CTail -(Bind Abbr) t c0) (lift (S O) (clen c0) x) t2) \to (eq T (lift (S O) (clen -c0) x) t2))) (ex2 T (\lambda (t2: T).((eq T (lift (S O) (clen c0) x) t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) (lift -(S O) (clen c0) x) t2))) (\lambda (t2: T).(\lambda (H6: (pr2 (CTail (Bind -Abbr) t c0) (lift (S O) (clen c0) x) t2)).(let H_x1 \def (pr2_gen_ctail (Bind -Abbr) c0 t (lift (S O) (clen c0) x) t2 H6) in (let H7 \def H_x1 in (or_ind -(pr2 c0 (lift (S O) (clen c0) x) t2) (ex3 T (\lambda (_: T).(eq K (Bind Abbr) +((\forall (t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))))).(K_ind (\lambda (k0: +K).(or (\forall (t2: T).((pr2 (CTail k0 t c0) t1 t2) \to (eq T t1 t2))) (ex2 +T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr2 (CTail k0 t c0) t1 t2))))) (\lambda (b: B).(B_ind (\lambda (b0: +B).(or (\forall (t2: T).((pr2 (CTail (Bind b0) t c0) t1 t2) \to (eq T t1 +t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) +(\lambda (t2: T).(pr2 (CTail (Bind b0) t c0) t1 t2))))) (let H_x0 \def +(dnf_dec t t1 (clen c0)) in (let H2 \def H_x0 in (ex_ind T (\lambda (v: +T).(or (subst0 (clen c0) t t1 (lift (S O) (clen c0) v)) (eq T t1 (lift (S O) +(clen c0) v)))) (or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t1 t2) +\to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)))) (\lambda +(x: T).(\lambda (H3: (or (subst0 (clen c0) t t1 (lift (S O) (clen c0) x)) (eq +T t1 (lift (S O) (clen c0) x)))).(or_ind (subst0 (clen c0) t t1 (lift (S O) +(clen c0) x)) (eq T t1 (lift (S O) (clen c0) x)) (or (\forall (t2: T).((pr2 +(CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: +T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail +(Bind Abbr) t c0) t1 t2)))) (\lambda (H4: (subst0 (clen c0) t t1 (lift (S O) +(clen c0) x))).(let H_x1 \def (getl_ctail_clen Abbr t c0) in (let H5 \def +H_x1 in (ex_ind nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind Abbr) t +c0) (CHead (CSort n) (Bind Abbr) t))) (or (\forall (t2: T).((pr2 (CTail (Bind +Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) +\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 +t2)))) (\lambda (x0: nat).(\lambda (H6: (getl (clen c0) (CTail (Bind Abbr) t +c0) (CHead (CSort x0) (Bind Abbr) t))).(or_intror (\forall (t2: T).((pr2 +(CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: +T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail +(Bind Abbr) t c0) t1 t2))) (ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 +t2)) (lift (S O) (clen c0) x) (\lambda (H7: (eq T t1 (lift (S O) (clen c0) +x))).(\lambda (P: Prop).(let H8 \def (eq_ind T t1 (\lambda (t0: T).(subst0 +(clen c0) t t0 (lift (S O) (clen c0) x))) H4 (lift (S O) (clen c0) x) H7) in +(subst0_gen_lift_false x t (lift (S O) (clen c0) x) (S O) (clen c0) (clen c0) +(le_n (clen c0)) (eq_ind_r nat (plus (S O) (clen c0)) (\lambda (n: nat).(lt +(clen c0) n)) (le_n (plus (S O) (clen c0))) (plus (clen c0) (S O)) (plus_comm +(clen c0) (S O))) H8 P)))) (pr2_delta (CTail (Bind Abbr) t c0) (CSort x0) t +(clen c0) H6 t1 t1 (pr0_refl t1) (lift (S O) (clen c0) x) H4))))) H5)))) +(\lambda (H4: (eq T t1 (lift (S O) (clen c0) x))).(let H5 \def (eq_ind T t1 +(\lambda (t0: T).(\forall (t2: T).((pr2 c0 t0 t2) \to (eq T t0 t2)))) H1 +(lift (S O) (clen c0) x) H4) in (eq_ind_r T (lift (S O) (clen c0) x) (\lambda +(t0: T).(or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t0 t2) \to (eq T +t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) +(\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t0 t2))))) (or_introl (\forall +(t2: T).((pr2 (CTail (Bind Abbr) t c0) (lift (S O) (clen c0) x) t2) \to (eq T +(lift (S O) (clen c0) x) t2))) (ex2 T (\lambda (t2: T).((eq T (lift (S O) +(clen c0) x) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail +(Bind Abbr) t c0) (lift (S O) (clen c0) x) t2))) (\lambda (t2: T).(\lambda +(H6: (pr2 (CTail (Bind Abbr) t c0) (lift (S O) (clen c0) x) t2)).(let H_x1 +\def (pr2_gen_ctail (Bind Abbr) c0 t (lift (S O) (clen c0) x) t2 H6) in (let +H7 \def H_x1 in (or_ind (pr2 c0 (lift (S O) (clen c0) x) t2) (ex3 T (\lambda +(_: T).(eq K (Bind Abbr) (Bind Abbr))) (\lambda (t0: T).(pr0 (lift (S O) +(clen c0) x) t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) (eq T (lift +(S O) (clen c0) x) t2) (\lambda (H8: (pr2 c0 (lift (S O) (clen c0) x) +t2)).(H5 t2 H8)) (\lambda (H8: (ex3 T (\lambda (_: T).(eq K (Bind Abbr) (Bind +Abbr))) (\lambda (t0: T).(pr0 (lift (S O) (clen c0) x) t0)) (\lambda (t0: +T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq K (Bind Abbr) (Bind Abbr))) (\lambda (t0: T).(pr0 (lift (S O) (clen c0) x) t0)) (\lambda -(t0: T).(subst0 (clen c0) t t0 t2))) (eq T (lift (S O) (clen c0) x) t2) -(\lambda (H8: (pr2 c0 (lift (S O) (clen c0) x) t2)).(H5 t2 H8)) (\lambda (H8: -(ex3 T (\lambda (_: T).(eq K (Bind Abbr) (Bind Abbr))) (\lambda (t0: T).(pr0 -(lift (S O) (clen c0) x) t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 -t2)))).(ex3_ind T (\lambda (_: T).(eq K (Bind Abbr) (Bind Abbr))) (\lambda -(t0: T).(pr0 (lift (S O) (clen c0) x) t0)) (\lambda (t0: T).(subst0 (clen c0) -t t0 t2)) (eq T (lift (S O) (clen c0) x) t2) (\lambda (x0: T).(\lambda (_: -(eq K (Bind Abbr) (Bind Abbr))).(\lambda (H10: (pr0 (lift (S O) (clen c0) x) -x0)).(\lambda (H11: (subst0 (clen c0) t x0 t2)).(ex2_ind T (\lambda (t3: -T).(eq T x0 (lift (S O) (clen c0) t3))) (\lambda (t3: T).(pr0 x t3)) (eq T -(lift (S O) (clen c0) x) t2) (\lambda (x1: T).(\lambda (H12: (eq T x0 (lift -(S O) (clen c0) x1))).(\lambda (_: (pr0 x x1)).(let H14 \def (eq_ind T x0 -(\lambda (t0: T).(subst0 (clen c0) t t0 t2)) H11 (lift (S O) (clen c0) x1) -H12) in (subst0_gen_lift_false x1 t t2 (S O) (clen c0) (clen c0) (le_n (clen -c0)) (eq_ind_r nat (plus (S O) (clen c0)) (\lambda (n: nat).(lt (clen c0) n)) -(le_n (plus (S O) (clen c0))) (plus (clen c0) (S O)) (plus_comm (clen c0) (S -O))) H14 (eq T (lift (S O) (clen c0) x) t2)))))) (pr0_gen_lift x x0 (S O) -(clen c0) H10)))))) H8)) H7)))))) t1 H4))) H3))) H2))) | Abst \Rightarrow -(or_introl (\forall (t2: T).((pr2 (CTail (Bind Abst) t c0) t1 t2) \to (eq T -t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr2 (CTail (Bind Abst) t c0) t1 t2))) (\lambda (t2: -T).(\lambda (H2: (pr2 (CTail (Bind Abst) t c0) t1 t2)).(let H_x0 \def +(t0: T).(subst0 (clen c0) t t0 t2)) (eq T (lift (S O) (clen c0) x) t2) +(\lambda (x0: T).(\lambda (_: (eq K (Bind Abbr) (Bind Abbr))).(\lambda (H10: +(pr0 (lift (S O) (clen c0) x) x0)).(\lambda (H11: (subst0 (clen c0) t x0 +t2)).(ex2_ind T (\lambda (t3: T).(eq T x0 (lift (S O) (clen c0) t3))) +(\lambda (t3: T).(pr0 x t3)) (eq T (lift (S O) (clen c0) x) t2) (\lambda (x1: +T).(\lambda (H12: (eq T x0 (lift (S O) (clen c0) x1))).(\lambda (_: (pr0 x +x1)).(let H14 \def (eq_ind T x0 (\lambda (t0: T).(subst0 (clen c0) t t0 t2)) +H11 (lift (S O) (clen c0) x1) H12) in (subst0_gen_lift_false x1 t t2 (S O) +(clen c0) (clen c0) (le_n (clen c0)) (eq_ind_r nat (plus (S O) (clen c0)) +(\lambda (n: nat).(lt (clen c0) n)) (le_n (plus (S O) (clen c0))) (plus (clen +c0) (S O)) (plus_comm (clen c0) (S O))) H14 (eq T (lift (S O) (clen c0) x) +t2)))))) (pr0_gen_lift x x0 (S O) (clen c0) H10)))))) H8)) H7)))))) t1 H4))) +H3))) H2))) (or_introl (\forall (t2: T).((pr2 (CTail (Bind Abst) t c0) t1 t2) +\to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abst) t c0) t1 t2))) (\lambda +(t2: T).(\lambda (H2: (pr2 (CTail (Bind Abst) t c0) t1 t2)).(let H_x0 \def (pr2_gen_ctail (Bind Abst) c0 t t1 t2 H2) in (let H3 \def H_x0 in (or_ind (pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Bind Abst) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) @@ -151,12 +150,12 @@ K).(match ee in K return (\lambda (_: K).Prop) with [(Bind b0) \Rightarrow (match b0 in B return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) H4)) H3)))))) -| Void \Rightarrow (or_introl (\forall (t2: T).((pr2 (CTail (Bind Void) t c0) -t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall -(P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Void) t c0) t1 t2))) -(\lambda (t2: T).(\lambda (H2: (pr2 (CTail (Bind Void) t c0) t1 t2)).(let -H_x0 \def (pr2_gen_ctail (Bind Void) c0 t t1 t2 H2) in (let H3 \def H_x0 in -(or_ind (pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Bind Void) (Bind Abbr))) +(or_introl (\forall (t2: T).((pr2 (CTail (Bind Void) t c0) t1 t2) \to (eq T +t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) +(\lambda (t2: T).(pr2 (CTail (Bind Void) t c0) t1 t2))) (\lambda (t2: +T).(\lambda (H2: (pr2 (CTail (Bind Void) t c0) t1 t2)).(let H_x0 \def +(pr2_gen_ctail (Bind Void) c0 t t1 t2 H2) in (let H3 \def H_x0 in (or_ind +(pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Bind Void) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) (eq T t1 t2) (\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: (ex3 T (\lambda (_: T).(eq K (Bind Void) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) @@ -168,33 +167,33 @@ T).(subst0 (clen c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: K).(match ee in K return (\lambda (_: K).Prop) with [(Bind b0) \Rightarrow (match b0 in B return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow -False])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) H4)) -H3))))))]) | (Flat f) \Rightarrow (or_introl (\forall (t2: T).((pr2 (CTail -(Flat f) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 -t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Flat f) t c0) -t1 t2))) (\lambda (t2: T).(\lambda (H2: (pr2 (CTail (Flat f) t c0) t1 -t2)).(let H_x0 \def (pr2_gen_ctail (Flat f) c0 t t1 t2 H2) in (let H3 \def -H_x0 in (or_ind (pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Flat f) (Bind -Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 -t2))) (eq T t1 t2) (\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: -(ex3 T (\lambda (_: T).(eq K (Flat f) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 -t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: +False])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) H4)) H3)))))) +b)) (\lambda (f: F).(or_introl (\forall (t2: T).((pr2 (CTail (Flat f) t c0) +t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall +(P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Flat f) t c0) t1 t2))) (\lambda +(t2: T).(\lambda (H2: (pr2 (CTail (Flat f) t c0) t1 t2)).(let H_x0 \def +(pr2_gen_ctail (Flat f) c0 t t1 t2 H2) in (let H3 \def H_x0 in (or_ind (pr2 +c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Flat f) (Bind Abbr))) (\lambda (t0: +T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) (eq T t1 t2) +(\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: (ex3 T (\lambda (_: T).(eq K (Flat f) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: -T).(subst0 (clen c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: -(eq K (Flat f) (Bind Abbr))).(\lambda (_: (pr0 t1 x0)).(\lambda (_: (subst0 -(clen c0) t x0 t2)).(let H8 \def (eq_ind K (Flat f) (\lambda (ee: K).(match -ee in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat -_) \Rightarrow True])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) -H4)) H3))))))])) (\lambda (H1: (ex2 T (\lambda (t2: T).((eq T t1 t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2)))).(ex2_ind T +T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq K (Flat f) +(Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen +c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: (eq K (Flat f) +(Bind Abbr))).(\lambda (_: (pr0 t1 x0)).(\lambda (_: (subst0 (clen c0) t x0 +t2)).(let H8 \def (eq_ind K (Flat f) (\lambda (ee: K).(match ee in K return +(\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow +True])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) H4)) H3))))))) +k)) (\lambda (H1: (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2)))).(ex2_ind T (\lambda (t2: +T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2)) +(or (\forall (t2: T).((pr2 (CTail k t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr2 c0 t1 t2)) (or (\forall (t2: T).((pr2 (CTail k t c0) t1 t2) \to (eq T -t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr2 (CTail k t c0) t1 t2)))) (\lambda (x: T).(\lambda (H2: -(((eq T t1 x) \to (\forall (P: Prop).P)))).(\lambda (H3: (pr2 c0 t1 -x)).(or_intror (\forall (t2: T).((pr2 (CTail k t c0) t1 t2) \to (eq T t1 -t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr2 (CTail k t c0) t1 t2))) (ex_intro2 T (\lambda (t2: +T).(pr2 (CTail k t c0) t1 t2)))) (\lambda (x: T).(\lambda (H2: (((eq T t1 x) +\to (\forall (P: Prop).P)))).(\lambda (H3: (pr2 c0 t1 x)).(or_intror (\forall +(t2: T).((pr2 (CTail k t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t -c0) t1 t2)) x H2 (pr2_ctail c0 t1 x H3 k t)))))) H1)) H0)))))))) c). +c0) t1 t2))) (ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr2 (CTail k t c0) t1 t2)) x H2 (pr2_ctail c0 t1 +x H3 k t)))))) H1)) H0)))))))) c). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/nf2/iso.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/nf2/iso.ma index c95449423..61c56a0be 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/nf2/iso.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/nf2/iso.ma @@ -33,16 +33,16 @@ TList).(\forall (u: T).((pr3 c (THeads (Flat Appl) vs (TLRef i)) u) \to (iso (\lambda (u: T).(\lambda (H0: (pr3 c (TLRef i) u)).(let H_y \def (nf2_pr3_unfold c (TLRef i) u H0 H) in (let H1 \def (eq_ind_r T u (\lambda (t: T).(pr3 c (TLRef i) t)) H0 (TLRef i) H_y) in (eq_ind T (TLRef i) (\lambda -(t: T).(iso (TLRef i) t)) (iso_lref i i) u H_y))))) (\lambda (t: T).(\lambda -(t0: TList).(\lambda (H0: ((\forall (u: T).((pr3 c (THeads (Flat Appl) t0 -(TLRef i)) u) \to (iso (THeads (Flat Appl) t0 (TLRef i)) u))))).(\lambda (u: -T).(\lambda (H1: (pr3 c (THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef -i))) u)).(let H2 \def (pr3_gen_appl c t (THeads (Flat Appl) t0 (TLRef i)) u -H1) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T u (THead -(Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))) -(\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) -t2)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: -T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u2 t2) u))))) (\lambda (_: +(t: T).(iso (TLRef i) t)) (iso_refl (TLRef i)) u H_y))))) (\lambda (t: +T).(\lambda (t0: TList).(\lambda (H0: ((\forall (u: T).((pr3 c (THeads (Flat +Appl) t0 (TLRef i)) u) \to (iso (THeads (Flat Appl) t0 (TLRef i)) +u))))).(\lambda (u: T).(\lambda (H1: (pr3 c (THead (Flat Appl) t (THeads +(Flat Appl) t0 (TLRef i))) u)).(let H2 \def (pr3_gen_appl c t (THeads (Flat +Appl) t0 (TLRef i)) u H1) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda +(t2: T).(eq T u (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(pr3 c t u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) +t0 (TLRef i)) t2)))) (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda +(u2: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u2 t2) u))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))) (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda @@ -70,8 +70,8 @@ T).(\lambda (t2: T).(pr3 c (THeads (Flat Appl) t0 (TLRef i)) t2))) (iso T).(\lambda (x1: T).(\lambda (H4: (eq T u (THead (Flat Appl) x0 x1))).(\lambda (_: (pr3 c t x0)).(\lambda (_: (pr3 c (THeads (Flat Appl) t0 (TLRef i)) x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t1: T).(iso -(THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) t1)) (iso_head (Flat -Appl) t x0 (THeads (Flat Appl) t0 (TLRef i)) x1) u H4)))))) H3)) (\lambda +(THead (Flat Appl) t (THeads (Flat Appl) t0 (TLRef i))) t1)) (iso_head t x0 +(THeads (Flat Appl) t0 (TLRef i)) x1 (Flat Appl)) u H4)))))) H3)) (\lambda (H3: (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u2 t2) u))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr3 c t u2))))) (\lambda (y1: diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pc3/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pc3/props.ma index 3819b5d36..2d85fb1ca 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pc3/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pc3/props.ma @@ -332,30 +332,30 @@ t0)).(eq_ind T t0 (\lambda (t7: T).((eq T t6 t3) \to ((getl i0 (CHead c k u2) (H21: (pr0 t0 t5)).(\lambda (H22: (subst0 i0 u0 t5 t3)).(nat_ind (\lambda (n: nat).((getl n (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((subst0 n u0 t5 t3) \to (pc3 (CHead c k u1) t0 t3)))) (\lambda (H23: (getl O (CHead c k u2) -(CHead d0 (Bind Abbr) u0))).(\lambda (H24: (subst0 O u0 t5 t3)).((match k in -K return (\lambda (k0: K).((clear (CHead c k0 u2) (CHead d0 (Bind Abbr) u0)) -\to (pc3 (CHead c k0 u1) t0 t3))) with [(Bind b) \Rightarrow (\lambda (H25: -(clear (CHead c (Bind b) u2) (CHead d0 (Bind Abbr) u0))).(let H26 \def -(f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with -[(CSort _) \Rightarrow d0 | (CHead c2 _ _) \Rightarrow c2])) (CHead d0 (Bind +(CHead d0 (Bind Abbr) u0))).(\lambda (H24: (subst0 O u0 t5 t3)).(K_ind +(\lambda (k0: K).((clear (CHead c k0 u2) (CHead d0 (Bind Abbr) u0)) \to (pc3 +(CHead c k0 u1) t0 t3))) (\lambda (b: B).(\lambda (H25: (clear (CHead c (Bind +b) u2) (CHead d0 (Bind Abbr) u0))).(let H26 \def (f_equal C C (\lambda (e: +C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d0 | +(CHead c2 _ _) \Rightarrow c2])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) +u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H25)) in ((let H27 \def +(f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with +[(CSort _) \Rightarrow Abbr | (CHead _ k0 _) \Rightarrow (match k0 in K +return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _) +\Rightarrow Abbr])])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) +(clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H25)) in ((let H28 \def +(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with +[(CSort _) \Rightarrow u0 | (CHead _ _ t7) \Rightarrow t7])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) -u2 H25)) in ((let H27 \def (f_equal C B (\lambda (e: C).(match e in C return -(\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k0 _) -\Rightarrow (match k0 in K return (\lambda (_: K).B) with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d0 (Bind Abbr) u0) -(CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H25)) -in ((let H28 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda -(_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t7) \Rightarrow t7])) -(CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 -(Bind Abbr) u0) u2 H25)) in (\lambda (H29: (eq B Abbr b)).(\lambda (_: (eq C -d0 c)).(let H31 \def (eq_ind T u0 (\lambda (t7: T).(subst0 O t7 t5 t3)) H24 -u2 H28) in (eq_ind B Abbr (\lambda (b0: B).(pc3 (CHead c (Bind b0) u1) t0 -t3)) (ex2_ind T (\lambda (t7: T).(subst0 O t2 t5 t7)) (\lambda (t7: T).(pr0 -t3 t7)) (pc3 (CHead c (Bind Abbr) u1) t0 t3) (\lambda (x: T).(\lambda (H32: -(subst0 O t2 t5 x)).(\lambda (H33: (pr0 t3 x)).(ex2_ind T (\lambda (t7: -T).(subst0 O u1 t5 t7)) (\lambda (t7: T).(subst0 (S (plus i O)) u x t7)) (pc3 -(CHead c (Bind Abbr) u1) t0 t3) (\lambda (x0: T).(\lambda (H34: (subst0 O u1 -t5 x0)).(\lambda (H35: (subst0 (S (plus i O)) u x x0)).(let H36 \def (f_equal +u2 H25)) in (\lambda (H29: (eq B Abbr b)).(\lambda (_: (eq C d0 c)).(let H31 +\def (eq_ind T u0 (\lambda (t7: T).(subst0 O t7 t5 t3)) H24 u2 H28) in +(eq_ind B Abbr (\lambda (b0: B).(pc3 (CHead c (Bind b0) u1) t0 t3)) (ex2_ind +T (\lambda (t7: T).(subst0 O t2 t5 t7)) (\lambda (t7: T).(pr0 t3 t7)) (pc3 +(CHead c (Bind Abbr) u1) t0 t3) (\lambda (x: T).(\lambda (H32: (subst0 O t2 +t5 x)).(\lambda (H33: (pr0 t3 x)).(ex2_ind T (\lambda (t7: T).(subst0 O u1 t5 +t7)) (\lambda (t7: T).(subst0 (S (plus i O)) u x t7)) (pc3 (CHead c (Bind +Abbr) u1) t0 t3) (\lambda (x0: T).(\lambda (H34: (subst0 O u1 t5 +x0)).(\lambda (H35: (subst0 (S (plus i O)) u x x0)).(let H36 \def (f_equal nat nat S (plus i O) i (sym_eq nat i (plus i O) (plus_n_O i))) in (let H37 \def (eq_ind nat (S (plus i O)) (\lambda (n: nat).(subst0 n u x x0)) H35 (S i) H36) in (pc3_pr2_u (CHead c (Bind Abbr) u1) x0 t0 (pr2_delta (CHead c @@ -363,19 +363,19 @@ i) H36) in (pc3_pr2_u (CHead c (Bind Abbr) u1) x0 t0 (pr2_delta (CHead c (CHead c (Bind Abbr) u1) x0 t3 (pr2_delta (CHead c (Bind Abbr) u1) d u (S i) (getl_head (Bind Abbr) i c (CHead d (Bind Abbr) u) H8 u1) t3 x H33 x0 H37)))))))) (subst0_subst0_back t5 x t2 O H32 u1 u i H10))))) (pr0_subst0_fwd -u2 t5 t3 O H31 t2 H9)) b H29))))) H27)) H26))) | (Flat f) \Rightarrow -(\lambda (H25: (clear (CHead c (Flat f) u2) (CHead d0 (Bind Abbr) +u2 t5 t3 O H31 t2 H9)) b H29))))) H27)) H26)))) (\lambda (f: F).(\lambda +(H25: (clear (CHead c (Flat f) u2) (CHead d0 (Bind Abbr) u0))).(clear_pc3_trans (CHead d0 (Bind Abbr) u0) t0 t3 (pc3_pr2_r (CHead d0 (Bind Abbr) u0) t0 t3 (pr2_delta (CHead d0 (Bind Abbr) u0) d0 u0 O (getl_refl Abbr d0 u0) t0 t5 H21 t3 H24)) (CHead c (Flat f) u1) (clear_flat c (CHead d0 (Bind Abbr) u0) (clear_gen_flat f c (CHead d0 (Bind Abbr) u0) u2 H25) f -u1)))]) (getl_gen_O (CHead c k u2) (CHead d0 (Bind Abbr) u0) H23)))) (\lambda -(i1: nat).(\lambda (_: (((getl i1 (CHead c k u2) (CHead d0 (Bind Abbr) u0)) -\to ((subst0 i1 u0 t5 t3) \to (pc3 (CHead c k u1) t0 t3))))).(\lambda (H23: -(getl (S i1) (CHead c k u2) (CHead d0 (Bind Abbr) u0))).(\lambda (H24: -(subst0 (S i1) u0 t5 t3)).(K_ind (\lambda (k0: K).((getl (r k0 i1) c (CHead -d0 (Bind Abbr) u0)) \to (pc3 (CHead c k0 u1) t0 t3))) (\lambda (b: -B).(\lambda (H25: (getl (r (Bind b) i1) c (CHead d0 (Bind Abbr) +u1)))) k (getl_gen_O (CHead c k u2) (CHead d0 (Bind Abbr) u0) H23)))) +(\lambda (i1: nat).(\lambda (_: (((getl i1 (CHead c k u2) (CHead d0 (Bind +Abbr) u0)) \to ((subst0 i1 u0 t5 t3) \to (pc3 (CHead c k u1) t0 +t3))))).(\lambda (H23: (getl (S i1) (CHead c k u2) (CHead d0 (Bind Abbr) +u0))).(\lambda (H24: (subst0 (S i1) u0 t5 t3)).(K_ind (\lambda (k0: K).((getl +(r k0 i1) c (CHead d0 (Bind Abbr) u0)) \to (pc3 (CHead c k0 u1) t0 t3))) +(\lambda (b: B).(\lambda (H25: (getl (r (Bind b) i1) c (CHead d0 (Bind Abbr) u0))).(pc3_pr2_r (CHead c (Bind b) u1) t0 t3 (pr2_delta (CHead c (Bind b) u1) d0 u0 (S i1) (getl_head (Bind b) i1 c (CHead d0 (Bind Abbr) u0) H25 u1) t0 t5 H21 t3 H24)))) (\lambda (f: F).(\lambda (H25: (getl (r (Flat f) i1) c (CHead diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr0/dec.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr0/dec.ma index d95c98683..d44ef3186 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr0/dec.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr0/dec.ma @@ -46,31 +46,30 @@ T).(\lambda (H: (or (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))))).(\lambda (t0: T).(\lambda (H0: (or (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall -(P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))))).(match k in K return (\lambda -(k0: K).(or (\forall (t2: T).((pr0 (THead k0 t t0) t2) \to (eq T (THead k0 t -t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead k0 t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead k0 t t0) t2))))) with [(Bind b) -\Rightarrow (match b in B return (\lambda (b0: B).(or (\forall (t2: T).((pr0 -(THead (Bind b0) t t0) t2) \to (eq T (THead (Bind b0) t t0) t2))) (ex2 T -(\lambda (t2: T).((eq T (THead (Bind b0) t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind b0) t t0) t2))))) with [Abbr -\Rightarrow (or_intror (\forall (t2: T).((pr0 (THead (Bind Abbr) t t0) t2) -\to (eq T (THead (Bind Abbr) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T -(THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 (THead (Bind Abbr) t t0) t2))) (let H_x \def (dnf_dec t t0 O) in (let -H1 \def H_x in (ex_ind T (\lambda (v: T).(or (subst0 O t t0 (lift (S O) O v)) -(eq T t0 (lift (S O) O v)))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind -Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead -(Bind Abbr) t t0) t2))) (\lambda (x: T).(\lambda (H2: (or (subst0 O t t0 -(lift (S O) O x)) (eq T t0 (lift (S O) O x)))).(or_ind (subst0 O t t0 (lift -(S O) O x)) (eq T t0 (lift (S O) O x)) (ex2 T (\lambda (t2: T).((eq T (THead +(P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))))).(K_ind (\lambda (k0: K).(or +(\forall (t2: T).((pr0 (THead k0 t t0) t2) \to (eq T (THead k0 t t0) t2))) +(ex2 T (\lambda (t2: T).((eq T (THead k0 t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead k0 t t0) t2))))) (\lambda (b: +B).(B_ind (\lambda (b0: B).(or (\forall (t2: T).((pr0 (THead (Bind b0) t t0) +t2) \to (eq T (THead (Bind b0) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T +(THead (Bind b0) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 +(THead (Bind b0) t t0) t2))))) (or_intror (\forall (t2: T).((pr0 (THead (Bind +Abbr) t t0) t2) \to (eq T (THead (Bind Abbr) t t0) t2))) (ex2 T (\lambda (t2: +T).((eq T (THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda +(t2: T).(pr0 (THead (Bind Abbr) t t0) t2))) (let H_x \def (dnf_dec t t0 O) in +(let H1 \def H_x in (ex_ind T (\lambda (v: T).(or (subst0 O t t0 (lift (S O) +O v)) (eq T t0 (lift (S O) O v)))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 -(THead (Bind Abbr) t t0) t2))) (\lambda (H3: (subst0 O t t0 (lift (S O) O -x))).(ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t t0) t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t t0) t2)) -(THead (Bind Abbr) t (lift (S O) O x)) (\lambda (H4: (eq T (THead (Bind Abbr) -t t0) (THead (Bind Abbr) t (lift (S O) O x)))).(\lambda (P: Prop).(let H5 -\def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) +(THead (Bind Abbr) t t0) t2))) (\lambda (x: T).(\lambda (H2: (or (subst0 O t +t0 (lift (S O) O x)) (eq T t0 (lift (S O) O x)))).(or_ind (subst0 O t t0 +(lift (S O) O x)) (eq T t0 (lift (S O) O x)) (ex2 T (\lambda (t2: T).((eq T +(THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 (THead (Bind Abbr) t t0) t2))) (\lambda (H3: (subst0 O t t0 (lift (S +O) O x))).(ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t t0) t2) +\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t t0) +t2)) (THead (Bind Abbr) t (lift (S O) O x)) (\lambda (H4: (eq T (THead (Bind +Abbr) t t0) (THead (Bind Abbr) t (lift (S O) O x)))).(\lambda (P: Prop).(let +H5 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t2) \Rightarrow t2])) (THead (Bind Abbr) t t0) (THead (Bind Abbr) t (lift (S O) O x)) H4) in (let H6 \def (eq_ind T t0 (\lambda (t2: T).(subst0 O t t2 (lift (S @@ -84,63 +83,63 @@ O x)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t (lift (S O) O x)) t2)) x (\lambda (H4: (eq T (THead (Bind Abbr) t (lift (S O) O x)) x)).(\lambda (P: Prop).(thead_x_lift_y_y (Bind Abbr) x t (S O) O H4 P))) (pr0_zeta Abbr not_abbr_abst x x (pr0_refl x) t)) t0 H3)) H2))) -H1)))) | Abst \Rightarrow (let H1 \def H in (or_ind (\forall (t2: T).((pr0 t -t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 t t2))) (or (\forall (t2: T).((pr0 (THead -(Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T -(\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda -(H2: ((\forall (t2: T).((pr0 t t2) \to (eq T t t2))))).(let H3 \def H0 in -(or_ind (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: -T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))) -(or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead -(Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t -t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) -t t0) t2)))) (\lambda (H4: ((\forall (t2: T).((pr0 t0 t2) \to (eq T t0 -t2))))).(or_introl (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to -(eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead -(Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 -(THead (Bind Abst) t t0) t2))) (\lambda (t2: T).(\lambda (H5: (pr0 (THead -(Bind Abst) t t0) t2)).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T -t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) -(\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3))) (eq T (THead (Bind Abst) t t0) -t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T t2 (THead (Bind -Abst) x0 x1))).(\lambda (H7: (pr0 t x0)).(\lambda (H8: (pr0 t0 x1)).(let H_y -\def (H4 x1 H8) in (let H_y0 \def (H2 x0 H7) in (let H9 \def (eq_ind_r T x1 -(\lambda (t3: T).(pr0 t0 t3)) H8 t0 H_y) in (let H10 \def (eq_ind_r T x1 -(\lambda (t3: T).(eq T t2 (THead (Bind Abst) x0 t3))) H6 t0 H_y) in (let H11 -\def (eq_ind_r T x0 (\lambda (t3: T).(pr0 t t3)) H7 t H_y0) in (let H12 \def -(eq_ind_r T x0 (\lambda (t3: T).(eq T t2 (THead (Bind Abst) t3 t0))) H10 t -H_y0) in (eq_ind_r T (THead (Bind Abst) t t0) (\lambda (t3: T).(eq T (THead -(Bind Abst) t t0) t3)) (refl_equal T (THead (Bind Abst) t t0)) t2 -H12)))))))))))) (pr0_gen_abst t t0 t2 H5)))))) (\lambda (H4: (ex2 T (\lambda -(t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 -t2)))).(ex2_ind T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr0 t0 t2)) (or (\forall (t2: T).((pr0 (THead (Bind Abst) t +H1)))) (let H1 \def H in (or_ind (\forall (t2: T).((pr0 t t2) \to (eq T t +t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) +(\lambda (t2: T).(pr0 t t2))) (or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda (x: T).(\lambda (H5: (((eq T -t0 x) \to (\forall (P: Prop).P)))).(\lambda (H6: (pr0 t0 x)).(or_intror -(\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind -Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) -\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) -t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)) -(THead (Bind Abst) t x) (\lambda (H7: (eq T (THead (Bind Abst) t t0) (THead -(Bind Abst) t x))).(\lambda (P: Prop).(let H8 \def (f_equal T T (\lambda (e: -T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | -(TLRef _) \Rightarrow t0 | (THead _ _ t2) \Rightarrow t2])) (THead (Bind -Abst) t t0) (THead (Bind Abst) t x) H7) in (let H9 \def (eq_ind_r T x -(\lambda (t2: T).(pr0 t0 t2)) H6 t0 H8) in (let H10 \def (eq_ind_r T x -(\lambda (t2: T).((eq T t0 t2) \to (\forall (P0: Prop).P0))) H5 t0 H8) in -(H10 (refl_equal T t0) P)))))) (pr0_comp t t (pr0_refl t) t0 x H6 (Bind -Abst))))))) H4)) H3))) (\lambda (H2: (ex2 T (\lambda (t2: T).((eq T t t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)))).(ex2_ind T (\lambda -(t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)) +T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda (H2: ((\forall (t2: T).((pr0 +t t2) \to (eq T t t2))))).(let H3 \def H0 in (or_ind (\forall (t2: T).((pr0 +t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall +(P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 +(THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T +(\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda +(H4: ((\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))))).(or_introl (\forall +(t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2))) +(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Bind Abst) t t0) t2)).(ex3_2_ind +T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: +T).(pr0 t0 t3))) (eq T (THead (Bind Abst) t t0) t2) (\lambda (x0: T).(\lambda +(x1: T).(\lambda (H6: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H7: (pr0 +t x0)).(\lambda (H8: (pr0 t0 x1)).(let H_y \def (H4 x1 H8) in (let H_y0 \def +(H2 x0 H7) in (let H9 \def (eq_ind_r T x1 (\lambda (t3: T).(pr0 t0 t3)) H8 t0 +H_y) in (let H10 \def (eq_ind_r T x1 (\lambda (t3: T).(eq T t2 (THead (Bind +Abst) x0 t3))) H6 t0 H_y) in (let H11 \def (eq_ind_r T x0 (\lambda (t3: +T).(pr0 t t3)) H7 t H_y0) in (let H12 \def (eq_ind_r T x0 (\lambda (t3: +T).(eq T t2 (THead (Bind Abst) t3 t0))) H10 t H_y0) in (eq_ind_r T (THead +(Bind Abst) t t0) (\lambda (t3: T).(eq T (THead (Bind Abst) t t0) t3)) +(refl_equal T (THead (Bind Abst) t t0)) t2 H12)))))))))))) (pr0_gen_abst t t0 +t2 H5)))))) (\lambda (H4: (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall +(P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)))).(ex2_ind T (\lambda (t2: +T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)) (or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) -t t0) t2)))) (\lambda (x: T).(\lambda (H3: (((eq T t x) \to (\forall (P: +t t0) t2)))) (\lambda (x: T).(\lambda (H5: (((eq T t0 x) \to (\forall (P: +Prop).P)))).(\lambda (H6: (pr0 t0 x)).(or_intror (\forall (t2: T).((pr0 +(THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T +(\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2))) (ex_intro2 T +(\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)) (THead (Bind +Abst) t x) (\lambda (H7: (eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t +x))).(\lambda (P: Prop).(let H8 \def (f_equal T T (\lambda (e: T).(match e in +T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) +\Rightarrow t0 | (THead _ _ t2) \Rightarrow t2])) (THead (Bind Abst) t t0) +(THead (Bind Abst) t x) H7) in (let H9 \def (eq_ind_r T x (\lambda (t2: +T).(pr0 t0 t2)) H6 t0 H8) in (let H10 \def (eq_ind_r T x (\lambda (t2: +T).((eq T t0 t2) \to (\forall (P0: Prop).P0))) H5 t0 H8) in (H10 (refl_equal +T t0) P)))))) (pr0_comp t t (pr0_refl t) t0 x H6 (Bind Abst))))))) H4)) H3))) +(\lambda (H2: (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 t t2)))).(ex2_ind T (\lambda (t2: T).((eq T +t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)) (or (\forall +(t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) +(\lambda (x: T).(\lambda (H3: (((eq T t x) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr0 t x)).(or_intror (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: @@ -154,88 +153,88 @@ in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) (THead (Bind Abst) x t0) H5) in (let H7 \def (eq_ind_r T x (\lambda (t2: T).(pr0 t t2)) H4 t H6) in (let H8 \def (eq_ind_r T x (\lambda (t2: T).((eq T t t2) \to (\forall (P0: Prop).P0))) H3 t H6) in (H8 (refl_equal T t) P)))))) -(pr0_comp t x H4 t0 t0 (pr0_refl t0) (Bind Abst))))))) H2)) H1)) | Void -\Rightarrow (let H_x \def (dnf_dec t t0 O) in (let H1 \def H_x in (ex_ind T -(\lambda (v: T).(or (subst0 O t t0 (lift (S O) O v)) (eq T t0 (lift (S O) O -v)))) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T +(pr0_comp t x H4 t0 t0 (pr0_refl t0) (Bind Abst))))))) H2)) H1)) (let H_x +\def (dnf_dec t t0 O) in (let H1 \def H_x in (ex_ind T (\lambda (v: T).(or +(subst0 O t t0 (lift (S O) O v)) (eq T t0 (lift (S O) O v)))) (or (\forall +(t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) +(\lambda (x: T).(\lambda (H2: (or (subst0 O t t0 (lift (S O) O x)) (eq T t0 +(lift (S O) O x)))).(or_ind (subst0 O t t0 (lift (S O) O x)) (eq T t0 (lift +(S O) O x)) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead -(Bind Void) t t0) t2)))) (\lambda (x: T).(\lambda (H2: (or (subst0 O t t0 -(lift (S O) O x)) (eq T t0 (lift (S O) O x)))).(or_ind (subst0 O t t0 (lift -(S O) O x)) (eq T t0 (lift (S O) O x)) (or (\forall (t2: T).((pr0 (THead +(Bind Void) t t0) t2)))) (\lambda (H3: (subst0 O t t0 (lift (S O) O x))).(let +H4 \def H in (or_ind (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T +(\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 t t2))) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to +(eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead +(Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 +(THead (Bind Void) t t0) t2)))) (\lambda (H5: ((\forall (t2: T).((pr0 t t2) +\to (eq T t t2))))).(let H6 \def H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) +\to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda -(H3: (subst0 O t t0 (lift (S O) O x))).(let H4 \def H in (or_ind (\forall -(t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) -\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))) (or (\forall (t2: -T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) +(H7: ((\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))))).(or_introl (\forall +(t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) -(\lambda (H5: ((\forall (t2: T).((pr0 t t2) \to (eq T t t2))))).(let H6 \def -H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T -(\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to -(eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead -(Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 -(THead (Bind Void) t t0) t2)))) (\lambda (H7: ((\forall (t2: T).((pr0 t0 t2) -\to (eq T t0 t2))))).(or_introl (\forall (t2: T).((pr0 (THead (Bind Void) t -t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq -T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 (THead (Bind Void) t t0) t2))) (\lambda (t2: T).(\lambda (H8: (pr0 -(THead (Bind Void) t t0) t2)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3)))) (pr0 t0 (lift -(S O) O t2)) (eq T (THead (Bind Void) t t0) t2) (\lambda (H9: (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: -T).(pr0 t0 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2))) +(\lambda (t2: T).(\lambda (H8: (pr0 (THead (Bind Void) t t0) t2)).(or_ind +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda +(t3: T).(pr0 t0 t3)))) (pr0 t0 (lift (S O) O t2)) (eq T (THead (Bind Void) t +t0) t2) (\lambda (H9: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) -(\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3))) (eq T (THead (Bind Void) t t0) -t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H10: (eq T t2 (THead (Bind -Void) x0 x1))).(\lambda (H11: (pr0 t x0)).(\lambda (H12: (pr0 t0 x1)).(let -H_y \def (H7 x1 H12) in (let H_y0 \def (H5 x0 H11) in (let H13 \def (eq_ind_r -T x1 (\lambda (t3: T).(pr0 t0 t3)) H12 t0 H_y) in (let H14 \def (eq_ind_r T -x1 (\lambda (t3: T).(eq T t2 (THead (Bind Void) x0 t3))) H10 t0 H_y) in (let -H15 \def (eq_ind_r T x0 (\lambda (t3: T).(pr0 t t3)) H11 t H_y0) in (let H16 -\def (eq_ind_r T x0 (\lambda (t3: T).(eq T t2 (THead (Bind Void) t3 t0))) H14 -t H_y0) in (eq_ind_r T (THead (Bind Void) t t0) (\lambda (t3: T).(eq T (THead -(Bind Void) t t0) t3)) (refl_equal T (THead (Bind Void) t t0)) t2 -H16)))))))))))) H9)) (\lambda (H9: (pr0 t0 (lift (S O) O t2))).(let H_y \def -(H7 (lift (S O) O t2) H9) in (let H10 \def (eq_ind T t0 (\lambda (t3: -T).(subst0 O t t3 (lift (S O) O x))) H3 (lift (S O) O t2) H_y) in (eq_ind_r T -(lift (S O) O t2) (\lambda (t3: T).(eq T (THead (Bind Void) t t3) t2)) -(subst0_gen_lift_false t2 t (lift (S O) O x) (S O) O O (le_n O) (eq_ind_r nat -(plus (S O) O) (\lambda (n: nat).(lt O n)) (le_n (plus (S O) O)) (plus O (S -O)) (plus_comm O (S O))) H10 (eq T (THead (Bind Void) t (lift (S O) O t2)) -t2)) t0 H_y)))) (pr0_gen_void t t0 t2 H8)))))) (\lambda (H7: (ex2 T (\lambda -(t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 -t2)))).(ex2_ind T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) -(\lambda (t2: T).(pr0 t0 t2)) (or (\forall (t2: T).((pr0 (THead (Bind Void) t -t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq -T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda (x0: T).(\lambda (H8: (((eq -T t0 x0) \to (\forall (P: Prop).P)))).(\lambda (H9: (pr0 t0 x0)).(or_intror -(\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind -Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) -\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) -t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)) -(THead (Bind Void) t x0) (\lambda (H10: (eq T (THead (Bind Void) t t0) (THead -(Bind Void) t x0))).(\lambda (P: Prop).(let H11 \def (f_equal T T (\lambda -(e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 -| (TLRef _) \Rightarrow t0 | (THead _ _ t2) \Rightarrow t2])) (THead (Bind -Void) t t0) (THead (Bind Void) t x0) H10) in (let H12 \def (eq_ind_r T x0 -(\lambda (t2: T).(pr0 t0 t2)) H9 t0 H11) in (let H13 \def (eq_ind_r T x0 -(\lambda (t2: T).((eq T t0 t2) \to (\forall (P0: Prop).P0))) H8 t0 H11) in -(H13 (refl_equal T t0) P)))))) (pr0_comp t t (pr0_refl t) t0 x0 H9 (Bind -Void))))))) H7)) H6))) (\lambda (H5: (ex2 T (\lambda (t2: T).((eq T t t2) \to -(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)))).(ex2_ind T (\lambda -(t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)) -(or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead -(Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t -t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) -t t0) t2)))) (\lambda (x0: T).(\lambda (H6: (((eq T t x0) \to (\forall (P: +(\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 +t3))) (eq T (THead (Bind Void) t t0) t2) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H10: (eq T t2 (THead (Bind Void) x0 x1))).(\lambda (H11: (pr0 t +x0)).(\lambda (H12: (pr0 t0 x1)).(let H_y \def (H7 x1 H12) in (let H_y0 \def +(H5 x0 H11) in (let H13 \def (eq_ind_r T x1 (\lambda (t3: T).(pr0 t0 t3)) H12 +t0 H_y) in (let H14 \def (eq_ind_r T x1 (\lambda (t3: T).(eq T t2 (THead +(Bind Void) x0 t3))) H10 t0 H_y) in (let H15 \def (eq_ind_r T x0 (\lambda +(t3: T).(pr0 t t3)) H11 t H_y0) in (let H16 \def (eq_ind_r T x0 (\lambda (t3: +T).(eq T t2 (THead (Bind Void) t3 t0))) H14 t H_y0) in (eq_ind_r T (THead +(Bind Void) t t0) (\lambda (t3: T).(eq T (THead (Bind Void) t t0) t3)) +(refl_equal T (THead (Bind Void) t t0)) t2 H16)))))))))))) H9)) (\lambda (H9: +(pr0 t0 (lift (S O) O t2))).(let H_y \def (H7 (lift (S O) O t2) H9) in (let +H10 \def (eq_ind T t0 (\lambda (t3: T).(subst0 O t t3 (lift (S O) O x))) H3 +(lift (S O) O t2) H_y) in (eq_ind_r T (lift (S O) O t2) (\lambda (t3: T).(eq +T (THead (Bind Void) t t3) t2)) (subst0_gen_lift_false t2 t (lift (S O) O x) +(S O) O O (le_n O) (eq_ind_r nat (plus (S O) O) (\lambda (n: nat).(lt O n)) +(le_n (plus (S O) O)) (plus O (S O)) (plus_comm O (S O))) H10 (eq T (THead +(Bind Void) t (lift (S O) O t2)) t2)) t0 H_y)))) (pr0_gen_void t t0 t2 +H8)))))) (\lambda (H7: (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 t0 t2)))).(ex2_ind T (\lambda (t2: T).((eq T +t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)) (or (\forall +(t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) +(\lambda (x0: T).(\lambda (H8: (((eq T t0 x0) \to (\forall (P: +Prop).P)))).(\lambda (H9: (pr0 t0 x0)).(or_intror (\forall (t2: T).((pr0 +(THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T +(\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2))) (ex_intro2 T +(\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)) (THead (Bind +Void) t x0) (\lambda (H10: (eq T (THead (Bind Void) t t0) (THead (Bind Void) +t x0))).(\lambda (P: Prop).(let H11 \def (f_equal T T (\lambda (e: T).(match +e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) +\Rightarrow t0 | (THead _ _ t2) \Rightarrow t2])) (THead (Bind Void) t t0) +(THead (Bind Void) t x0) H10) in (let H12 \def (eq_ind_r T x0 (\lambda (t2: +T).(pr0 t0 t2)) H9 t0 H11) in (let H13 \def (eq_ind_r T x0 (\lambda (t2: +T).((eq T t0 t2) \to (\forall (P0: Prop).P0))) H8 t0 H11) in (H13 (refl_equal +T t0) P)))))) (pr0_comp t t (pr0_refl t) t0 x0 H9 (Bind Void))))))) H7)) +H6))) (\lambda (H5: (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 t t2)))).(ex2_ind T (\lambda (t2: T).((eq T +t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)) (or (\forall +(t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) +(\lambda (x0: T).(\lambda (H6: (((eq T t x0) \to (\forall (P: Prop).P)))).(\lambda (H7: (pr0 t x0)).(or_intror (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: @@ -266,123 +265,122 @@ O) O x)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Void) t (THead (Bind Void) t (lift (S O) O x)) t2)) x (\lambda (H5: (eq T (THead (Bind Void) t (lift (S O) O x)) x)).(\lambda (P: Prop).(thead_x_lift_y_y (Bind Void) x t (S O) O H5 P))) (pr0_zeta Void not_void_abst x x (pr0_refl x) -t))) t0 H3))) H2))) H1)))]) | (Flat f) \Rightarrow (match f in F return -(\lambda (f0: F).(or (\forall (t2: T).((pr0 (THead (Flat f0) t t0) t2) \to -(eq T (THead (Flat f0) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead -(Flat f0) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead -(Flat f0) t t0) t2))))) with [Appl \Rightarrow (let H_x \def (binder_dec t0) -in (let H1 \def H_x in (or_ind (ex_3 B T T (\lambda (b: B).(\lambda (w: -T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: -B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to -(\forall (P: Prop).P))))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) -t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T -(THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (H2: (ex_3 B T T (\lambda -(b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w -u))))))).(ex_3_ind B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq -T t0 (THead (Bind b) w u))))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t -t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq -T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (x0: B).(\lambda (x1: -T).(\lambda (x2: T).(\lambda (H3: (eq T t0 (THead (Bind x0) x1 x2))).(let H4 -\def (eq_ind T t0 (\lambda (t2: T).(or (\forall (t3: T).((pr0 t2 t3) \to (eq -T t2 t3))) (ex2 T (\lambda (t3: T).((eq T t2 t3) \to (\forall (P: Prop).P))) -(\lambda (t3: T).(pr0 t2 t3))))) H0 (THead (Bind x0) x1 x2) H3) in (eq_ind_r -T (THead (Bind x0) x1 x2) (\lambda (t2: T).(or (\forall (t3: T).((pr0 (THead -(Flat Appl) t t2) t3) \to (eq T (THead (Flat Appl) t t2) t3))) (ex2 T -(\lambda (t3: T).((eq T (THead (Flat Appl) t t2) t3) \to (\forall (P: -Prop).P))) (\lambda (t3: T).(pr0 (THead (Flat Appl) t t2) t3))))) ((match x0 -in B return (\lambda (b: B).((or (\forall (t2: T).((pr0 (THead (Bind b) x1 -x2) t2) \to (eq T (THead (Bind b) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T -(THead (Bind b) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 -(THead (Bind b) x1 x2) t2)))) \to (or (\forall (t2: T).((pr0 (THead (Flat -Appl) t (THead (Bind b) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead -(Bind b) x1 x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t -(THead (Bind b) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 -(THead (Flat Appl) t (THead (Bind b) x1 x2)) t2)))))) with [Abbr \Rightarrow -(\lambda (_: (or (\forall (t2: T).((pr0 (THead (Bind Abbr) x1 x2) t2) \to (eq -T (THead (Bind Abbr) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind -Abbr) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead -(Bind Abbr) x1 x2) t2))))).(or_intror (\forall (t2: T).((pr0 (THead (Flat -Appl) t (THead (Bind Abbr) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead -(Bind Abbr) x1 x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t -(THead (Bind Abbr) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2))) (ex_intro2 T -(\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2) -\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead -(Bind Abbr) x1 x2)) t2)) (THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S O) -O t) x2)) (\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) -(THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O t) x2)))).(\lambda (P: -Prop).(let H7 \def (eq_ind T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) +t))) t0 H3))) H2))) H1))) b)) (\lambda (f: F).(F_ind (\lambda (f0: F).(or +(\forall (t2: T).((pr0 (THead (Flat f0) t t0) t2) \to (eq T (THead (Flat f0) +t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat f0) t t0) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat f0) t t0) t2))))) +(let H_x \def (binder_dec t0) in (let H1 \def H_x in (or_ind (ex_3 B T T +(\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w +u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead +(Bind b) w u)) \to (\forall (P: Prop).P))))) (or (\forall (t2: T).((pr0 +(THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T +(\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda +(H2: (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 +(THead (Bind b) w u))))))).(ex_3_ind B T T (\lambda (b: B).(\lambda (w: +T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u))))) (or (\forall (t2: +T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) +(\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H3: (eq T t0 +(THead (Bind x0) x1 x2))).(let H4 \def (eq_ind T t0 (\lambda (t2: T).(or +(\forall (t3: T).((pr0 t2 t3) \to (eq T t2 t3))) (ex2 T (\lambda (t3: T).((eq +T t2 t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(pr0 t2 t3))))) H0 +(THead (Bind x0) x1 x2) H3) in (eq_ind_r T (THead (Bind x0) x1 x2) (\lambda +(t2: T).(or (\forall (t3: T).((pr0 (THead (Flat Appl) t t2) t3) \to (eq T +(THead (Flat Appl) t t2) t3))) (ex2 T (\lambda (t3: T).((eq T (THead (Flat +Appl) t t2) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(pr0 (THead +(Flat Appl) t t2) t3))))) (B_ind (\lambda (b: B).((or (\forall (t2: T).((pr0 +(THead (Bind b) x1 x2) t2) \to (eq T (THead (Bind b) x1 x2) t2))) (ex2 T +(\lambda (t2: T).((eq T (THead (Bind b) x1 x2) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind b) x1 x2) t2)))) \to (or +(\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind b) x1 x2)) t2) \to +(eq T (THead (Flat Appl) t (THead (Bind b) x1 x2)) t2))) (ex2 T (\lambda (t2: +T).((eq T (THead (Flat Appl) t (THead (Bind b) x1 x2)) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind b) x1 x2)) +t2)))))) (\lambda (_: (or (\forall (t2: T).((pr0 (THead (Bind Abbr) x1 x2) +t2) \to (eq T (THead (Bind Abbr) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T +(THead (Bind Abbr) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 (THead (Bind Abbr) x1 x2) t2))))).(or_intror (\forall (t2: T).((pr0 +(THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2) \to (eq T (THead (Flat +Appl) t (THead (Bind Abbr) x1 x2)) t2))) (ex2 T (\lambda (t2: T).((eq T +(THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Abbr) x1 +x2)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead +(Bind Abbr) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 +(THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2)) (THead (Bind Abbr) x1 +(THead (Flat Appl) (lift (S O) O t) x2)) (\lambda (H6: (eq T (THead (Flat +Appl) t (THead (Bind Abbr) x1 x2)) (THead (Bind Abbr) x1 (THead (Flat Appl) +(lift (S O) O t) x2)))).(\lambda (P: Prop).(let H7 \def (eq_ind T (THead +(Flat Appl) t (THead (Bind Abbr) x1 x2)) (\lambda (ee: T).(match ee in T +return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ t2) \Rightarrow (match t2 in T return (\lambda +(_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead k0 _ _) \Rightarrow (match k0 in K return (\lambda (_: K).Prop) with +[(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])])) I (THead (Bind +Abbr) x1 (THead (Flat Appl) (lift (S O) O t) x2)) H6) in (False_ind P H7)))) +(pr0_upsilon Abbr not_abbr_abst t t (pr0_refl t) x1 x1 (pr0_refl x1) x2 x2 +(pr0_refl x2))))) (\lambda (_: (or (\forall (t2: T).((pr0 (THead (Bind Abst) +x1 x2) t2) \to (eq T (THead (Bind Abst) x1 x2) t2))) (ex2 T (\lambda (t2: +T).((eq T (THead (Bind Abst) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda +(t2: T).(pr0 (THead (Bind Abst) x1 x2) t2))))).(or_intror (\forall (t2: +T).((pr0 (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2) \to (eq T (THead +(Flat Appl) t (THead (Bind Abst) x1 x2)) t2))) (ex2 T (\lambda (t2: T).((eq T +(THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Abst) x1 +x2)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead +(Bind Abst) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 +(THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2)) (THead (Bind Abbr) t x2) +(\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) (THead +(Bind Abbr) t x2))).(\lambda (P: Prop).(let H7 \def (eq_ind T (THead (Flat +Appl) t (THead (Bind Abst) x1 x2)) (\lambda (ee: T).(match ee in T return +(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 in K return (\lambda +(_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow +True])])) I (THead (Bind Abbr) t x2) H6) in (False_ind P H7)))) (pr0_beta x1 +t t (pr0_refl t) x2 x2 (pr0_refl x2))))) (\lambda (_: (or (\forall (t2: +T).((pr0 (THead (Bind Void) x1 x2) t2) \to (eq T (THead (Bind Void) x1 x2) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) x1 x2) t2) \to +(\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) x1 x2) +t2))))).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind +Void) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) +t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Void) +x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat +Appl) t (THead (Bind Void) x1 x2)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T +(THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2) \to (\forall (P: +Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Void) x1 +x2)) t2)) (THead (Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)) +(\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) (THead +(Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)))).(\lambda (P: +Prop).(let H7 \def (eq_ind T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ t2) \Rightarrow (match t2 in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) -\Rightarrow False])])])) I (THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S -O) O t) x2)) H6) in (False_ind P H7)))) (pr0_upsilon Abbr not_abbr_abst t t -(pr0_refl t) x1 x1 (pr0_refl x1) x2 x2 (pr0_refl x2))))) | Abst \Rightarrow -(\lambda (_: (or (\forall (t2: T).((pr0 (THead (Bind Abst) x1 x2) t2) \to (eq -T (THead (Bind Abst) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind -Abst) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead -(Bind Abst) x1 x2) t2))))).(or_intror (\forall (t2: T).((pr0 (THead (Flat -Appl) t (THead (Bind Abst) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead -(Bind Abst) x1 x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t -(THead (Bind Abst) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: -T).(pr0 (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2))) (ex_intro2 T -(\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2) -\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead -(Bind Abst) x1 x2)) t2)) (THead (Bind Abbr) t x2) (\lambda (H6: (eq T (THead -(Flat Appl) t (THead (Bind Abst) x1 x2)) (THead (Bind Abbr) t x2))).(\lambda -(P: Prop).(let H7 \def (eq_ind T (THead (Flat Appl) t (THead (Bind Abst) x1 -x2)) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k0 _ _) -\Rightarrow (match k0 in K return (\lambda (_: K).Prop) with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) t x2) -H6) in (False_ind P H7)))) (pr0_beta x1 t t (pr0_refl t) x2 x2 (pr0_refl -x2))))) | Void \Rightarrow (\lambda (_: (or (\forall (t2: T).((pr0 (THead -(Bind Void) x1 x2) t2) \to (eq T (THead (Bind Void) x1 x2) t2))) (ex2 T -(\lambda (t2: T).((eq T (THead (Bind Void) x1 x2) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) x1 x2) t2))))).(or_intror -(\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2) -\to (eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2))) (ex2 T -(\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2) -\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead -(Bind Void) x1 x2)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat -Appl) t (THead (Bind Void) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda -(t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2)) (THead -(Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (\lambda (H6: (eq T -(THead (Flat Appl) t (THead (Bind Void) x1 x2)) (THead (Bind Void) x1 (THead -(Flat Appl) (lift (S O) O t) x2)))).(\lambda (P: Prop).(let H7 \def (eq_ind T -(THead (Flat Appl) t (THead (Bind Void) x1 x2)) (\lambda (ee: T).(match ee in -T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ t2) \Rightarrow (match t2 in T return (\lambda -(_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead k0 _ _) \Rightarrow (match k0 in K return (\lambda (_: K).Prop) with -[(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])])) I (THead (Bind -Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)) H6) in (False_ind P H7)))) -(pr0_upsilon Void not_void_abst t t (pr0_refl t) x1 x1 (pr0_refl x1) x2 x2 -(pr0_refl x2)))))]) H4) t0 H3)))))) H2)) (\lambda (H2: ((\forall (b: -B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to -(\forall (P: Prop).P))))))).(let H3 \def H in (or_ind (\forall (t2: T).((pr0 -t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 t t2))) (or (\forall (t2: T).((pr0 (THead -(Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T -(\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: -Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda -(H4: ((\forall (t2: T).((pr0 t t2) \to (eq T t t2))))).(let H5 \def H0 in -(or_ind (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: -T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))) -(or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead -(Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t -t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) -t t0) t2)))) (\lambda (H6: ((\forall (t2: T).((pr0 t0 t2) \to (eq T t0 -t2))))).(or_introl (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to +\Rightarrow False])])])) I (THead (Bind Void) x1 (THead (Flat Appl) (lift (S +O) O t) x2)) H6) in (False_ind P H7)))) (pr0_upsilon Void not_void_abst t t +(pr0_refl t) x1 x1 (pr0_refl x1) x2 x2 (pr0_refl x2))))) x0 H4) t0 H3)))))) +H2)) (\lambda (H2: ((\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 +(THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(let H3 \def H in +(or_ind (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: +T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))) (or +(\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat +Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) +\to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) +t2)))) (\lambda (H4: ((\forall (t2: T).((pr0 t t2) \to (eq T t t2))))).(let +H5 \def H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T +(\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 -(THead (Flat Appl) t t0) t2))) (\lambda (t2: T).(\lambda (H7: (pr0 (THead -(Flat Appl) t t0) t2)).(or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: -T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: +(THead (Flat Appl) t t0) t2)))) (\lambda (H6: ((\forall (t2: T).((pr0 t0 t2) +\to (eq T t0 t2))))).(or_introl (\forall (t2: T).((pr0 (THead (Flat Appl) t +t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq +T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: +T).(pr0 (THead (Flat Appl) t t0) t2))) (\lambda (t2: T).(\lambda (H7: (pr0 +(THead (Flat Appl) t t0) t2)).(or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: @@ -519,12 +517,12 @@ in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) T).(pr0 t t2)) H6 t H8) in (let H10 \def (eq_ind_r T x (\lambda (t2: T).((eq T t t2) \to (\forall (P0: Prop).P0))) H5 t H8) in (H10 (refl_equal T t) P)))))) (pr0_comp t x H6 t0 t0 (pr0_refl t0) (Flat Appl))))))) H4)) H3))) -H1))) | Cast \Rightarrow (or_intror (\forall (t2: T).((pr0 (THead (Flat Cast) -t t0) t2) \to (eq T (THead (Flat Cast) t t0) t2))) (ex2 T (\lambda (t2: -T).((eq T (THead (Flat Cast) t t0) t2) \to (\forall (P: Prop).P))) (\lambda -(t2: T).(pr0 (THead (Flat Cast) t t0) t2))) (ex_intro2 T (\lambda (t2: -T).((eq T (THead (Flat Cast) t t0) t2) \to (\forall (P: Prop).P))) (\lambda -(t2: T).(pr0 (THead (Flat Cast) t t0) t2)) t0 (\lambda (H1: (eq T (THead -(Flat Cast) t t0) t0)).(\lambda (P: Prop).(thead_x_y_y (Flat Cast) t t0 H1 -P))) (pr0_epsilon t0 t0 (pr0_refl t0) t)))])])))))) t1). +H1))) (or_intror (\forall (t2: T).((pr0 (THead (Flat Cast) t t0) t2) \to (eq +T (THead (Flat Cast) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat +Cast) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead +(Flat Cast) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat +Cast) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead +(Flat Cast) t t0) t2)) t0 (\lambda (H1: (eq T (THead (Flat Cast) t t0) +t0)).(\lambda (P: Prop).(thead_x_y_y (Flat Cast) t t0 H1 P))) (pr0_epsilon t0 +t0 (pr0_refl t0) t))) f)) k)))))) t1). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr2/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr2/props.ma index fca780fee..a4de3fd63 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr2/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr2/props.ma @@ -92,82 +92,86 @@ b) u t2))))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CHead c (Bind b) u) (CHead d (Bind Abbr) u0)) \to ((pr0 t1 t3) \to ((subst0 i u0 t3 t4) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2)))))) (\lambda (H8: (getl i (CHead c (Bind b) u) (CHead d (Bind Abbr) -u0))).(\lambda (H9: (pr0 t1 t3)).(\lambda (H10: (subst0 i u0 t3 t2)).((match -i in nat return (\lambda (n: nat).((getl n (CHead c (Bind b) u) (CHead d -(Bind Abbr) u0)) \to ((subst0 n u0 t3 t2) \to (pr2 c (THead (Bind b) u t1) -(THead (Bind b) u t2))))) with [O \Rightarrow (\lambda (H11: (getl O (CHead c -(Bind b) u) (CHead d (Bind Abbr) u0))).(\lambda (H12: (subst0 O u0 t3 -t2)).(let H13 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda -(_: C).C) with [(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) -(CHead d (Bind Abbr) u0) (CHead c (Bind b) u) (clear_gen_bind b c (CHead d -(Bind Abbr) u0) u (getl_gen_O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0) -H11))) in ((let H14 \def (f_equal C B (\lambda (e: C).(match e in C return -(\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k0 _) -\Rightarrow (match k0 in K return (\lambda (_: K).B) with [(Bind b0) -\Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u0) -(CHead c (Bind b) u) (clear_gen_bind b c (CHead d (Bind Abbr) u0) u -(getl_gen_O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0) H11))) in ((let H15 -\def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) -with [(CSort _) \Rightarrow u0 | (CHead _ _ t4) \Rightarrow t4])) (CHead d +u0))).(\lambda (H9: (pr0 t1 t3)).(\lambda (H10: (subst0 i u0 t3 t2)).(nat_ind +(\lambda (n: nat).((getl n (CHead c (Bind b) u) (CHead d (Bind Abbr) u0)) \to +((subst0 n u0 t3 t2) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u +t2))))) (\lambda (H11: (getl O (CHead c (Bind b) u) (CHead d (Bind Abbr) +u0))).(\lambda (H12: (subst0 O u0 t3 t2)).(let H13 \def (f_equal C C (\lambda +(e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d +| (CHead c1 _ _) \Rightarrow c1])) (CHead d (Bind Abbr) u0) (CHead c (Bind b) +u) (clear_gen_bind b c (CHead d (Bind Abbr) u0) u (getl_gen_O (CHead c (Bind +b) u) (CHead d (Bind Abbr) u0) H11))) in ((let H14 \def (f_equal C B (\lambda +(e: C).(match e in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow +Abbr | (CHead _ k0 _) \Rightarrow (match k0 in K return (\lambda (_: K).B) +with [(Bind b0) \Rightarrow b0 | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u0) (CHead c (Bind b) u) (clear_gen_bind b c (CHead d (Bind Abbr) u0) u (getl_gen_O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0) H11))) in -(\lambda (H16: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H18 \def (eq_ind -T u0 (\lambda (t4: T).(subst0 O t4 t3 t2)) H12 u H15) in (eq_ind B Abbr -(\lambda (b0: B).(pr2 c (THead (Bind b0) u t1) (THead (Bind b0) u t2))) -(pr2_free c (THead (Bind Abbr) u t1) (THead (Bind Abbr) u t2) (pr0_delta u u -(pr0_refl u) t1 t3 H9 t2 H18)) b H16))))) H14)) H13)))) | (S n) \Rightarrow -(\lambda (H11: (getl (S n) (CHead c (Bind b) u) (CHead d (Bind Abbr) -u0))).(\lambda (H12: (subst0 (S n) u0 t3 t2)).(pr2_delta c d u0 (r (Bind b) -n) (getl_gen_S (Bind b) c (CHead d (Bind Abbr) u0) u n H11) (THead (Bind b) u -t1) (THead (Bind b) u t3) (pr0_comp u u (pr0_refl u) t1 t3 H9 (Bind b)) -(THead (Bind b) u t2) (subst0_snd (Bind b) u0 t2 t3 (r (Bind b) n) H12 -u))))]) H8 H10)))) t (sym_eq T t t2 H7))) t0 (sym_eq T t0 t1 H6))) c0 (sym_eq -C c0 (CHead c (Bind b) u) H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C -(CHead c (Bind b) u)) (refl_equal T t1) (refl_equal T t2))))) (\lambda (f: -F).(\lambda (H: (pr2 (CHead c (Flat f) u) t1 t2)).(let H0 \def (match H in -pr2 return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: -(pr2 c0 t t0)).((eq C c0 (CHead c (Flat f) u)) \to ((eq T t t1) \to ((eq T t0 -t2) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2))))))))) with -[(pr2_free c0 t0 t3 H0) \Rightarrow (\lambda (H1: (eq C c0 (CHead c (Flat f) -u))).(\lambda (H2: (eq T t0 t1)).(\lambda (H3: (eq T t3 t2)).(eq_ind C (CHead -c (Flat f) u) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 -t3) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2)))))) (\lambda (H4: -(eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to -(pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2))))) (\lambda (H5: (eq T t3 -t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr2 c (THead (Flat f) u -t1) (THead (Flat f) u t2)))) (\lambda (H6: (pr0 t1 t2)).(pr2_free c (THead -(Flat f) u t1) (THead (Flat f) u t2) (pr0_comp u u (pr0_refl u) t1 t2 H6 -(Flat f)))) t3 (sym_eq T t3 t2 H5))) t0 (sym_eq T t0 t1 H4))) c0 (sym_eq C c0 -(CHead c (Flat f) u) H1) H2 H3 H0)))) | (pr2_delta c0 d u0 i H0 t0 t3 H1 t -H2) \Rightarrow (\lambda (H3: (eq C c0 (CHead c (Flat f) u))).(\lambda (H4: -(eq T t0 t1)).(\lambda (H5: (eq T t t2)).(eq_ind C (CHead c (Flat f) u) -(\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d -(Bind Abbr) u0)) \to ((pr0 t0 t3) \to ((subst0 i u0 t3 t) \to (pr2 c (THead -(Flat f) u t1) (THead (Flat f) u t2)))))))) (\lambda (H6: (eq T t0 -t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CHead c (Flat -f) u) (CHead d (Bind Abbr) u0)) \to ((pr0 t4 t3) \to ((subst0 i u0 t3 t) \to -(pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2))))))) (\lambda (H7: (eq T -t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CHead c (Flat f) u) (CHead d -(Bind Abbr) u0)) \to ((pr0 t1 t3) \to ((subst0 i u0 t3 t4) \to (pr2 c (THead -(Flat f) u t1) (THead (Flat f) u t2)))))) (\lambda (H8: (getl i (CHead c -(Flat f) u) (CHead d (Bind Abbr) u0))).(\lambda (H9: (pr0 t1 t3)).(\lambda -(H10: (subst0 i u0 t3 t2)).((match i in nat return (\lambda (n: nat).((getl n -(CHead c (Flat f) u) (CHead d (Bind Abbr) u0)) \to ((subst0 n u0 t3 t2) \to -(pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2))))) with [O \Rightarrow -(\lambda (H11: (getl O (CHead c (Flat f) u) (CHead d (Bind Abbr) +((let H15 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: +C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t4) \Rightarrow t4])) +(CHead d (Bind Abbr) u0) (CHead c (Bind b) u) (clear_gen_bind b c (CHead d +(Bind Abbr) u0) u (getl_gen_O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0) +H11))) in (\lambda (H16: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H18 +\def (eq_ind T u0 (\lambda (t4: T).(subst0 O t4 t3 t2)) H12 u H15) in (eq_ind +B Abbr (\lambda (b0: B).(pr2 c (THead (Bind b0) u t1) (THead (Bind b0) u +t2))) (pr2_free c (THead (Bind Abbr) u t1) (THead (Bind Abbr) u t2) +(pr0_delta u u (pr0_refl u) t1 t3 H9 t2 H18)) b H16))))) H14)) H13)))) +(\lambda (i0: nat).(\lambda (_: (((getl i0 (CHead c (Bind b) u) (CHead d +(Bind Abbr) u0)) \to ((subst0 i0 u0 t3 t2) \to (pr2 c (THead (Bind b) u t1) +(THead (Bind b) u t2)))))).(\lambda (H11: (getl (S i0) (CHead c (Bind b) u) +(CHead d (Bind Abbr) u0))).(\lambda (H12: (subst0 (S i0) u0 t3 +t2)).(pr2_delta c d u0 (r (Bind b) i0) (getl_gen_S (Bind b) c (CHead d (Bind +Abbr) u0) u i0 H11) (THead (Bind b) u t1) (THead (Bind b) u t3) (pr0_comp u u +(pr0_refl u) t1 t3 H9 (Bind b)) (THead (Bind b) u t2) (subst0_snd (Bind b) u0 +t2 t3 (r (Bind b) i0) H12 u)))))) i H8 H10)))) t (sym_eq T t t2 H7))) t0 +(sym_eq T t0 t1 H6))) c0 (sym_eq C c0 (CHead c (Bind b) u) H3) H4 H5 H0 H1 +H2))))]) in (H0 (refl_equal C (CHead c (Bind b) u)) (refl_equal T t1) +(refl_equal T t2))))) (\lambda (f: F).(\lambda (H: (pr2 (CHead c (Flat f) u) +t1 t2)).(let H0 \def (match H in pr2 return (\lambda (c0: C).(\lambda (t: +T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 (CHead c (Flat f) +u)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr2 c (THead (Flat f) u t1) +(THead (Flat f) u t2))))))))) with [(pr2_free c0 t0 t3 H0) \Rightarrow +(\lambda (H1: (eq C c0 (CHead c (Flat f) u))).(\lambda (H2: (eq T t0 +t1)).(\lambda (H3: (eq T t3 t2)).(eq_ind C (CHead c (Flat f) u) (\lambda (_: +C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr2 c (THead (Flat +f) u t1) (THead (Flat f) u t2)))))) (\lambda (H4: (eq T t0 t1)).(eq_ind T t1 +(\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr2 c (THead (Flat f) u +t1) (THead (Flat f) u t2))))) (\lambda (H5: (eq T t3 t2)).(eq_ind T t2 +(\lambda (t: T).((pr0 t1 t) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) +u t2)))) (\lambda (H6: (pr0 t1 t2)).(pr2_free c (THead (Flat f) u t1) (THead +(Flat f) u t2) (pr0_comp u u (pr0_refl u) t1 t2 H6 (Flat f)))) t3 (sym_eq T +t3 t2 H5))) t0 (sym_eq T t0 t1 H4))) c0 (sym_eq C c0 (CHead c (Flat f) u) H1) +H2 H3 H0)))) | (pr2_delta c0 d u0 i H0 t0 t3 H1 t H2) \Rightarrow (\lambda +(H3: (eq C c0 (CHead c (Flat f) u))).(\lambda (H4: (eq T t0 t1)).(\lambda +(H5: (eq T t t2)).(eq_ind C (CHead c (Flat f) u) (\lambda (c1: C).((eq T t0 +t1) \to ((eq T t t2) \to ((getl i c1 (CHead d (Bind Abbr) u0)) \to ((pr0 t0 +t3) \to ((subst0 i u0 t3 t) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) +u t2)))))))) (\lambda (H6: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T +t t2) \to ((getl i (CHead c (Flat f) u) (CHead d (Bind Abbr) u0)) \to ((pr0 +t4 t3) \to ((subst0 i u0 t3 t) \to (pr2 c (THead (Flat f) u t1) (THead (Flat +f) u t2))))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (t4: +T).((getl i (CHead c (Flat f) u) (CHead d (Bind Abbr) u0)) \to ((pr0 t1 t3) +\to ((subst0 i u0 t3 t4) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u +t2)))))) (\lambda (H8: (getl i (CHead c (Flat f) u) (CHead d (Bind Abbr) +u0))).(\lambda (H9: (pr0 t1 t3)).(\lambda (H10: (subst0 i u0 t3 t2)).(nat_ind +(\lambda (n: nat).((getl n (CHead c (Flat f) u) (CHead d (Bind Abbr) u0)) \to +((subst0 n u0 t3 t2) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u +t2))))) (\lambda (H11: (getl O (CHead c (Flat f) u) (CHead d (Bind Abbr) u0))).(\lambda (H12: (subst0 O u0 t3 t2)).(pr2_delta c d u0 O (getl_intro O c (CHead d (Bind Abbr) u0) c (drop_refl c) (clear_gen_flat f c (CHead d (Bind Abbr) u0) u (getl_gen_O (CHead c (Flat f) u) (CHead d (Bind Abbr) u0) H11))) (THead (Flat f) u t1) (THead (Flat f) u t3) (pr0_comp u u (pr0_refl u) t1 t3 H9 (Flat f)) (THead (Flat f) u t2) (subst0_snd (Flat f) u0 t2 t3 O H12 u)))) -| (S n) \Rightarrow (\lambda (H11: (getl (S n) (CHead c (Flat f) u) (CHead d -(Bind Abbr) u0))).(\lambda (H12: (subst0 (S n) u0 t3 t2)).(pr2_delta c d u0 -(r (Flat f) n) (getl_gen_S (Flat f) c (CHead d (Bind Abbr) u0) u n H11) -(THead (Flat f) u t1) (THead (Flat f) u t3) (pr0_comp u u (pr0_refl u) t1 t3 -H9 (Flat f)) (THead (Flat f) u t2) (subst0_snd (Flat f) u0 t2 t3 (r (Flat f) -n) H12 u))))]) H8 H10)))) t (sym_eq T t t2 H7))) t0 (sym_eq T t0 t1 H6))) c0 -(sym_eq C c0 (CHead c (Flat f) u) H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal -C (CHead c (Flat f) u)) (refl_equal T t1) (refl_equal T t2))))) k))))). +(\lambda (i0: nat).(\lambda (_: (((getl i0 (CHead c (Flat f) u) (CHead d +(Bind Abbr) u0)) \to ((subst0 i0 u0 t3 t2) \to (pr2 c (THead (Flat f) u t1) +(THead (Flat f) u t2)))))).(\lambda (H11: (getl (S i0) (CHead c (Flat f) u) +(CHead d (Bind Abbr) u0))).(\lambda (H12: (subst0 (S i0) u0 t3 +t2)).(pr2_delta c d u0 (r (Flat f) i0) (getl_gen_S (Flat f) c (CHead d (Bind +Abbr) u0) u i0 H11) (THead (Flat f) u t1) (THead (Flat f) u t3) (pr0_comp u u +(pr0_refl u) t1 t3 H9 (Flat f)) (THead (Flat f) u t2) (subst0_snd (Flat f) u0 +t2 t3 (r (Flat f) i0) H12 u)))))) i H8 H10)))) t (sym_eq T t t2 H7))) t0 +(sym_eq T t0 t1 H6))) c0 (sym_eq C c0 (CHead c (Flat f) u) H3) H4 H5 H0 H1 +H2))))]) in (H0 (refl_equal C (CHead c (Flat f) u)) (refl_equal T t1) +(refl_equal T t2))))) k))))). theorem clear_pr2_trans: \forall (c2: C).(\forall (t1: T).(\forall (t2: T).((pr2 c2 t1 t2) \to diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/iso.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/iso.ma index fabf66145..4b3519cd9 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/iso.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/iso.ma @@ -45,9 +45,9 @@ T).(\lambda (x1: T).(\lambda (H3: (eq T u2 (THead (Flat Cast) x0 x1))).(\lambda (_: (pr3 c v x0)).(\lambda (_: (pr3 c t x1)).(let H6 \def (eq_ind T u2 (\lambda (t0: T).((iso (THead (Flat Cast) v t) t0) \to (\forall (P: Prop).P))) H0 (THead (Flat Cast) x0 x1) H3) in (eq_ind_r T (THead (Flat -Cast) x0 x1) (\lambda (t0: T).(pr3 c t t0)) (H6 (iso_head (Flat Cast) v x0 t -x1) (pr3 c t (THead (Flat Cast) x0 x1))) u2 H3))))))) H2)) (\lambda (H2: (pr3 -c t u2)).H2) H1))))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (H: +Cast) x0 x1) (\lambda (t0: T).(pr3 c t t0)) (H6 (iso_head v x0 t x1 (Flat +Cast)) (pr3 c t (THead (Flat Cast) x0 x1))) u2 H3))))))) H2)) (\lambda (H2: +(pr3 c t u2)).H2) H1))))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (H: ((\forall (u2: T).((pr3 c (THeads (Flat Appl) t1 (THead (Flat Cast) v t)) u2) \to ((((iso (THeads (Flat Appl) t1 (THead (Flat Cast) v t)) u2) \to (\forall (P: Prop).P))) \to (pr3 c (THeads (Flat Appl) t1 t) u2)))))).(\lambda (u2: @@ -91,8 +91,8 @@ t1 (THead (Flat Cast) v t)) x1)).(let H7 \def (eq_ind T u2 (\lambda (t2: T).((iso (THead (Flat Appl) t0 (THeads (Flat Appl) t1 (THead (Flat Cast) v t))) t2) \to (\forall (P: Prop).P))) H1 (THead (Flat Appl) x0 x1) H4) in (eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t2: T).(pr3 c (THead (Flat -Appl) t0 (THeads (Flat Appl) t1 t)) t2)) (H7 (iso_head (Flat Appl) t0 x0 -(THeads (Flat Appl) t1 (THead (Flat Cast) v t)) x1) (pr3 c (THead (Flat Appl) +Appl) t0 (THeads (Flat Appl) t1 t)) t2)) (H7 (iso_head t0 x0 (THeads (Flat +Appl) t1 (THead (Flat Cast) v t)) x1 (Flat Appl)) (pr3 c (THead (Flat Appl) t0 (THeads (Flat Appl) t1 t)) (THead (Flat Appl) x0 x1))) u2 H4))))))) H3)) (\lambda (H3: (ex4_4 T T T T (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t2: T).(pr3 c (THead (Bind Abbr) u3 t2) u2))))) (\lambda (_: diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/props.ma index d4b3d64ab..d77030f52 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/pr3/props.ma @@ -272,13 +272,12 @@ t3)).(eq_ind T t3 (\lambda (t7: T).((eq T t6 t0) \to ((getl i0 (CHead c k u2) (\lambda (t7: T).((getl i0 (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((pr0 t3 t5) \to ((subst0 i0 u0 t5 t7) \to (pr3 (CHead c k u1) t3 t0))))) (\lambda (H20: (getl i0 (CHead c k u2) (CHead d0 (Bind Abbr) u0))).(\lambda -(H21: (pr0 t3 t5)).(\lambda (H22: (subst0 i0 u0 t5 t0)).((match i0 in nat -return (\lambda (n: nat).((getl n (CHead c k u2) (CHead d0 (Bind Abbr) u0)) -\to ((subst0 n u0 t5 t0) \to (pr3 (CHead c k u1) t3 t0)))) with [O -\Rightarrow (\lambda (H23: (getl O (CHead c k u2) (CHead d0 (Bind Abbr) -u0))).(\lambda (H24: (subst0 O u0 t5 t0)).((match k in K return (\lambda (k0: -K).((clear (CHead c k0 u2) (CHead d0 (Bind Abbr) u0)) \to (pr3 (CHead c k0 -u1) t3 t0))) with [(Bind b) \Rightarrow (\lambda (H25: (clear (CHead c (Bind +(H21: (pr0 t3 t5)).(\lambda (H22: (subst0 i0 u0 t5 t0)).(nat_ind (\lambda (n: +nat).((getl n (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((subst0 n u0 t5 +t0) \to (pr3 (CHead c k u1) t3 t0)))) (\lambda (H23: (getl O (CHead c k u2) +(CHead d0 (Bind Abbr) u0))).(\lambda (H24: (subst0 O u0 t5 t0)).(K_ind +(\lambda (k0: K).((clear (CHead c k0 u2) (CHead d0 (Bind Abbr) u0)) \to (pr3 +(CHead c k0 u1) t3 t0))) (\lambda (b: B).(\lambda (H25: (clear (CHead c (Bind b) u2) (CHead d0 (Bind Abbr) u0))).(let H26 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d0 | (CHead c2 _ _) \Rightarrow c2])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) @@ -308,27 +307,28 @@ Abbr) u1) x0 t0 (pr2_delta (CHead c (Bind Abbr) u1) d u (S i) (getl_clear_bind Abbr (CHead c (Bind Abbr) u1) c u1 (clear_bind Abbr c u1) (CHead d (Bind Abbr) u) i H8) x0 x H37 t0 H35)))))) (pr0_subst0_back t2 t5 x O H32 u1 H9))))))) (subst0_subst0 t5 t0 u2 O H31 t2 u i H10)) b H29))))) -H27)) H26))) | (Flat f) \Rightarrow (\lambda (H25: (clear (CHead c (Flat f) -u2) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c (Flat f) u1) t3 t0 -(pr2_cflat c t3 t0 (pr2_delta c d0 u0 O (getl_intro O c (CHead d0 (Bind Abbr) -u0) c (drop_refl c) (clear_gen_flat f c (CHead d0 (Bind Abbr) u0) u2 H25)) t3 -t5 H21 t0 H24) f u1)))]) (getl_gen_O (CHead c k u2) (CHead d0 (Bind Abbr) u0) -H23)))) | (S n) \Rightarrow (\lambda (H23: (getl (S n) (CHead c k u2) (CHead -d0 (Bind Abbr) u0))).(\lambda (H24: (subst0 (S n) u0 t5 t0)).((match k in K -return (\lambda (k0: K).((getl (S n) (CHead c k0 u2) (CHead d0 (Bind Abbr) -u0)) \to (pr3 (CHead c k0 u1) t3 t0))) with [(Bind b) \Rightarrow (\lambda -(H25: (getl (S n) (CHead c (Bind b) u2) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 -(CHead c (Bind b) u1) t3 t0 (pr2_delta (CHead c (Bind b) u1) d0 u0 (S n) -(getl_head (Bind b) n c (CHead d0 (Bind Abbr) u0) (getl_gen_S (Bind b) c -(CHead d0 (Bind Abbr) u0) u2 n H25) u1) t3 t5 H21 t0 H24))) | (Flat f) -\Rightarrow (\lambda (H25: (getl (S n) (CHead c (Flat f) u2) (CHead d0 (Bind -Abbr) u0))).(pr3_pr2 (CHead c (Flat f) u1) t3 t0 (pr2_cflat c t3 t0 -(pr2_delta c d0 u0 (r (Flat f) n) (getl_gen_S (Flat f) c (CHead d0 (Bind -Abbr) u0) u2 n H25) t3 t5 H21 t0 H24) f u1)))]) H23)))]) H20 H22)))) t6 -(sym_eq T t6 t0 H19))) t4 (sym_eq T t4 t3 H18))) c1 (sym_eq C c1 (CHead c k -u2) H15) H16 H17 H12 H13 H14))))]) in (H12 (refl_equal C (CHead c k u2)) -(refl_equal T t3) (refl_equal T t0)))))))))) t (sym_eq T t u2 H7))) t1 -(sym_eq T t1 u1 H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 +H27)) H26)))) (\lambda (f: F).(\lambda (H25: (clear (CHead c (Flat f) u2) +(CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c (Flat f) u1) t3 t0 (pr2_cflat c +t3 t0 (pr2_delta c d0 u0 O (getl_intro O c (CHead d0 (Bind Abbr) u0) c +(drop_refl c) (clear_gen_flat f c (CHead d0 (Bind Abbr) u0) u2 H25)) t3 t5 +H21 t0 H24) f u1)))) k (getl_gen_O (CHead c k u2) (CHead d0 (Bind Abbr) u0) +H23)))) (\lambda (i1: nat).(\lambda (_: (((getl i1 (CHead c k u2) (CHead d0 +(Bind Abbr) u0)) \to ((subst0 i1 u0 t5 t0) \to (pr3 (CHead c k u1) t3 +t0))))).(\lambda (H23: (getl (S i1) (CHead c k u2) (CHead d0 (Bind Abbr) +u0))).(\lambda (H24: (subst0 (S i1) u0 t5 t0)).(K_ind (\lambda (k0: K).((getl +(S i1) (CHead c k0 u2) (CHead d0 (Bind Abbr) u0)) \to (pr3 (CHead c k0 u1) t3 +t0))) (\lambda (b: B).(\lambda (H25: (getl (S i1) (CHead c (Bind b) u2) +(CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c (Bind b) u1) t3 t0 (pr2_delta +(CHead c (Bind b) u1) d0 u0 (S i1) (getl_head (Bind b) i1 c (CHead d0 (Bind +Abbr) u0) (getl_gen_S (Bind b) c (CHead d0 (Bind Abbr) u0) u2 i1 H25) u1) t3 +t5 H21 t0 H24)))) (\lambda (f: F).(\lambda (H25: (getl (S i1) (CHead c (Flat +f) u2) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c (Flat f) u1) t3 t0 +(pr2_cflat c t3 t0 (pr2_delta c d0 u0 (r (Flat f) i1) (getl_gen_S (Flat f) c +(CHead d0 (Bind Abbr) u0) u2 i1 H25) t3 t5 H21 t0 H24) f u1)))) k H23))))) i0 +H20 H22)))) t6 (sym_eq T t6 t0 H19))) t4 (sym_eq T t4 t3 H18))) c1 (sym_eq C +c1 (CHead c k u2) H15) H16 H17 H12 H13 H14))))]) in (H12 (refl_equal C (CHead +c k u2)) (refl_equal T t3) (refl_equal T t0)))))))))) t (sym_eq T t u2 H7))) +t1 (sym_eq T t1 u1 H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T u1) (refl_equal T u2)))))). theorem pr3_pr2_pr3_t: diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/r/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/r/props.ma index 709e13bb8..fc8b29095 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/r/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/r/props.ma @@ -73,10 +73,9 @@ nat).(refl_equal nat i))))))) (\lambda (f: F).(\lambda (P: Prop).(\lambda (_: theorem s_r: \forall (k: K).(\forall (i: nat).(eq nat (s k (r k i)) (S i))) \def - \lambda (k: K).(match k in K return (\lambda (k0: K).(\forall (i: nat).(eq -nat (s k0 (r k0 i)) (S i)))) with [(Bind _) \Rightarrow (\lambda (i: -nat).(refl_equal nat (S i))) | (Flat _) \Rightarrow (\lambda (i: -nat).(refl_equal nat (S i)))]). + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(eq nat (s k0 (r k0 +i)) (S i)))) (\lambda (_: B).(\lambda (i: nat).(refl_equal nat (S i)))) +(\lambda (_: F).(\lambda (i: nat).(refl_equal nat (S i)))) k). theorem r_arith0: \forall (k: K).(\forall (i: nat).(eq nat (minus (r k (S i)) (S O)) (r k i))) diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sc3/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sc3/props.ma index 86a674344..23561082b 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sc3/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sc3/props.ma @@ -223,12 +223,75 @@ c2 (lift1 p t) (H c2 t H0 H15) c n n0 H14))) c3 (sym_eq C c3 e H13))) c1 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c) (refl_equal C e))))))))))) hds)))). -axiom sc3_abbr: +theorem sc3_abbr: \forall (g: G).(\forall (a: A).(\forall (vs: TList).(\forall (i: nat).(\forall (d: C).(\forall (v: T).(\forall (c: C).((sc3 g a c (THeads (Flat Appl) vs (lift (S i) O v))) \to ((getl i c (CHead d (Bind Abbr) v)) \to (sc3 g a c (THeads (Flat Appl) vs (TLRef i))))))))))) -. +\def + \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(\forall (vs: +TList).(\forall (i: nat).(\forall (d: C).(\forall (v: T).(\forall (c: +C).((sc3 g a0 c (THeads (Flat Appl) vs (lift (S i) O v))) \to ((getl i c +(CHead d (Bind Abbr) v)) \to (sc3 g a0 c (THeads (Flat Appl) vs (TLRef +i))))))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (vs: +TList).(\lambda (i: nat).(\lambda (d: C).(\lambda (v: T).(\lambda (c: +C).(\lambda (H: (land (arity g c (THeads (Flat Appl) vs (lift (S i) O v)) +(ASort n n0)) (sn3 c (THeads (Flat Appl) vs (lift (S i) O v))))).(\lambda +(H0: (getl i c (CHead d (Bind Abbr) v))).(let H1 \def H in (and_ind (arity g +c (THeads (Flat Appl) vs (lift (S i) O v)) (ASort n n0)) (sn3 c (THeads (Flat +Appl) vs (lift (S i) O v))) (land (arity g c (THeads (Flat Appl) vs (TLRef +i)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (TLRef i)))) (\lambda (H2: +(arity g c (THeads (Flat Appl) vs (lift (S i) O v)) (ASort n n0))).(\lambda +(H3: (sn3 c (THeads (Flat Appl) vs (lift (S i) O v)))).(conj (arity g c +(THeads (Flat Appl) vs (TLRef i)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs +(TLRef i))) (arity_appls_abbr g c d v i H0 vs (ASort n n0) H2) +(sn3_appls_abbr c d v i H0 vs H3)))) H1))))))))))) (\lambda (a0: A).(\lambda +(_: ((\forall (vs: TList).(\forall (i: nat).(\forall (d: C).(\forall (v: +T).(\forall (c: C).((sc3 g a0 c (THeads (Flat Appl) vs (lift (S i) O v))) \to +((getl i c (CHead d (Bind Abbr) v)) \to (sc3 g a0 c (THeads (Flat Appl) vs +(TLRef i)))))))))))).(\lambda (a1: A).(\lambda (H0: ((\forall (vs: +TList).(\forall (i: nat).(\forall (d: C).(\forall (v: T).(\forall (c: +C).((sc3 g a1 c (THeads (Flat Appl) vs (lift (S i) O v))) \to ((getl i c +(CHead d (Bind Abbr) v)) \to (sc3 g a1 c (THeads (Flat Appl) vs (TLRef +i)))))))))))).(\lambda (vs: TList).(\lambda (i: nat).(\lambda (d: C).(\lambda +(v: T).(\lambda (c: C).(\lambda (H1: (land (arity g c (THeads (Flat Appl) vs +(lift (S i) O v)) (AHead a0 a1)) (\forall (d0: C).(\forall (w: T).((sc3 g a0 +d0 w) \to (\forall (is: PList).((drop1 is d0 c) \to (sc3 g a1 d0 (THead (Flat +Appl) w (lift1 is (THeads (Flat Appl) vs (lift (S i) O v)))))))))))).(\lambda +(H2: (getl i c (CHead d (Bind Abbr) v))).(let H3 \def H1 in (and_ind (arity g +c (THeads (Flat Appl) vs (lift (S i) O v)) (AHead a0 a1)) (\forall (d0: +C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: PList).((drop1 is d0 c) +\to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (lift +(S i) O v)))))))))) (land (arity g c (THeads (Flat Appl) vs (TLRef i)) (AHead +a0 a1)) (\forall (d0: C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: +PList).((drop1 is d0 c) \to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is +(THeads (Flat Appl) vs (TLRef i))))))))))) (\lambda (H4: (arity g c (THeads +(Flat Appl) vs (lift (S i) O v)) (AHead a0 a1))).(\lambda (H5: ((\forall (d0: +C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall (is: PList).((drop1 is d0 c) +\to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (lift +(S i) O v)))))))))))).(conj (arity g c (THeads (Flat Appl) vs (TLRef i)) +(AHead a0 a1)) (\forall (d0: C).(\forall (w: T).((sc3 g a0 d0 w) \to (\forall +(is: PList).((drop1 is d0 c) \to (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is +(THeads (Flat Appl) vs (TLRef i)))))))))) (arity_appls_abbr g c d v i H2 vs +(AHead a0 a1) H4) (\lambda (d0: C).(\lambda (w: T).(\lambda (H6: (sc3 g a0 d0 +w)).(\lambda (is: PList).(\lambda (H7: (drop1 is d0 c)).(let H_x \def +(drop1_getl_trans is c d0 H7 Abbr d v i H2) in (let H8 \def H_x in (ex_ind C +(\lambda (e2: C).(getl (trans is i) d0 (CHead e2 (Bind Abbr) (ctrans is i +v)))) (sc3 g a1 d0 (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs +(TLRef i))))) (\lambda (x: C).(\lambda (H9: (getl (trans is i) d0 (CHead x +(Bind Abbr) (ctrans is i v)))).(let H_y \def (H0 (TCons w (lifts1 is vs))) in +(eq_ind_r T (THeads (Flat Appl) (lifts1 is vs) (lift1 is (TLRef i))) (\lambda +(t: T).(sc3 g a1 d0 (THead (Flat Appl) w t))) (eq_ind_r T (TLRef (trans is +i)) (\lambda (t: T).(sc3 g a1 d0 (THead (Flat Appl) w (THeads (Flat Appl) +(lifts1 is vs) t)))) (H_y (trans is i) x (ctrans is i v) d0 (eq_ind T (lift1 +is (lift (S i) O v)) (\lambda (t: T).(sc3 g a1 d0 (THead (Flat Appl) w +(THeads (Flat Appl) (lifts1 is vs) t)))) (eq_ind T (lift1 is (THeads (Flat +Appl) vs (lift (S i) O v))) (\lambda (t: T).(sc3 g a1 d0 (THead (Flat Appl) w +t))) (H5 d0 w H6 is H7) (THeads (Flat Appl) (lifts1 is vs) (lift1 is (lift (S +i) O v))) (lifts1_flat Appl is (lift (S i) O v) vs)) (lift (S (trans is i)) O +(ctrans is i v)) (lift1_free is i v)) H9) (lift1 is (TLRef i)) (lift1_lref is +i)) (lift1 is (THeads (Flat Appl) vs (TLRef i))) (lifts1_flat Appl is (TLRef +i) vs))))) H8))))))))))) H3))))))))))))) a)). theorem sc3_cast: \forall (g: G).(\forall (a: A).(\forall (vs: TList).(\forall (c: C).(\forall @@ -244,54 +307,58 @@ Appl) vs u)) \to (\forall (t: T).((sc3 g a0 c (THeads (Flat Appl) vs t)) \to T).(\lambda (H: (sc3 g (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) c (THeads (Flat Appl) vs u))).(\lambda (t: T).(\lambda (H0: (land (arity g c (THeads (Flat Appl) vs t) (ASort n n0)) -(sn3 c (THeads (Flat Appl) vs t)))).((match n in nat return (\lambda (n1: -nat).((sc3 g (match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) -\Rightarrow (ASort h n0)]) c (THeads (Flat Appl) vs u)) \to ((land (arity g c -(THeads (Flat Appl) vs t) (ASort n1 n0)) (sn3 c (THeads (Flat Appl) vs t))) -\to (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort -n1 n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))))))) with [O -\Rightarrow (\lambda (H1: (sc3 g (ASort O (next g n0)) c (THeads (Flat Appl) -vs u))).(\lambda (H2: (land (arity g c (THeads (Flat Appl) vs t) (ASort O -n0)) (sn3 c (THeads (Flat Appl) vs t)))).(let H3 \def H1 in (and_ind (arity g -c (THeads (Flat Appl) vs u) (ASort O (next g n0))) (sn3 c (THeads (Flat Appl) -vs u)) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) -(ASort O n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))) -(\lambda (H4: (arity g c (THeads (Flat Appl) vs u) (ASort O (next g -n0)))).(\lambda (H5: (sn3 c (THeads (Flat Appl) vs u))).(let H6 \def H2 in -(and_ind (arity g c (THeads (Flat Appl) vs t) (ASort O n0)) (sn3 c (THeads -(Flat Appl) vs t)) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) -u t)) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))) -(\lambda (H7: (arity g c (THeads (Flat Appl) vs t) (ASort O n0))).(\lambda -(H8: (sn3 c (THeads (Flat Appl) vs t))).(conj (arity g c (THeads (Flat Appl) -vs (THead (Flat Cast) u t)) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs -(THead (Flat Cast) u t))) (arity_appls_cast g c u t vs (ASort O n0) H4 H7) -(sn3_appls_cast c vs u H5 t H8)))) H6)))) H3)))) | (S n1) \Rightarrow -(\lambda (H1: (sc3 g (ASort n1 n0) c (THeads (Flat Appl) vs u))).(\lambda -(H2: (land (arity g c (THeads (Flat Appl) vs t) (ASort (S n1) n0)) (sn3 c -(THeads (Flat Appl) vs t)))).(let H3 \def H1 in (and_ind (arity g c (THeads -(Flat Appl) vs u) (ASort n1 n0)) (sn3 c (THeads (Flat Appl) vs u)) (land -(arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort (S n1) n0)) -(sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))) (\lambda (H4: (arity -g c (THeads (Flat Appl) vs u) (ASort n1 n0))).(\lambda (H5: (sn3 c (THeads -(Flat Appl) vs u))).(let H6 \def H2 in (and_ind (arity g c (THeads (Flat -Appl) vs t) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs t)) (land (arity -g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c -(THeads (Flat Appl) vs (THead (Flat Cast) u t)))) (\lambda (H7: (arity g c -(THeads (Flat Appl) vs t) (ASort (S n1) n0))).(\lambda (H8: (sn3 c (THeads -(Flat Appl) vs t))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat -Cast) u t)) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat -Cast) u t))) (arity_appls_cast g c u t vs (ASort (S n1) n0) H4 H7) -(sn3_appls_cast c vs u H5 t H8)))) H6)))) H3))))]) H H0))))))))) (\lambda -(a0: A).(\lambda (_: ((\forall (vs: TList).(\forall (c: C).(\forall (u: -T).((sc3 g (asucc g a0) c (THeads (Flat Appl) vs u)) \to (\forall (t: -T).((sc3 g a0 c (THeads (Flat Appl) vs t)) \to (sc3 g a0 c (THeads (Flat -Appl) vs (THead (Flat Cast) u t))))))))))).(\lambda (a1: A).(\lambda (H0: -((\forall (vs: TList).(\forall (c: C).(\forall (u: T).((sc3 g (asucc g a1) c -(THeads (Flat Appl) vs u)) \to (\forall (t: T).((sc3 g a1 c (THeads (Flat -Appl) vs t)) \to (sc3 g a1 c (THeads (Flat Appl) vs (THead (Flat Cast) u -t))))))))))).(\lambda (vs: TList).(\lambda (c: C).(\lambda (u: T).(\lambda -(H1: (land (arity g c (THeads (Flat Appl) vs u) (AHead a0 (asucc g a1))) -(\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: +(sn3 c (THeads (Flat Appl) vs t)))).(nat_ind (\lambda (n1: nat).((sc3 g +(match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow +(ASort h n0)]) c (THeads (Flat Appl) vs u)) \to ((land (arity g c (THeads +(Flat Appl) vs t) (ASort n1 n0)) (sn3 c (THeads (Flat Appl) vs t))) \to (land +(arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort n1 n0)) +(sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))))))) (\lambda (H1: +(sc3 g (ASort O (next g n0)) c (THeads (Flat Appl) vs u))).(\lambda (H2: +(land (arity g c (THeads (Flat Appl) vs t) (ASort O n0)) (sn3 c (THeads (Flat +Appl) vs t)))).(let H3 \def H1 in (and_ind (arity g c (THeads (Flat Appl) vs +u) (ASort O (next g n0))) (sn3 c (THeads (Flat Appl) vs u)) (land (arity g c +(THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort O n0)) (sn3 c (THeads +(Flat Appl) vs (THead (Flat Cast) u t)))) (\lambda (H4: (arity g c (THeads +(Flat Appl) vs u) (ASort O (next g n0)))).(\lambda (H5: (sn3 c (THeads (Flat +Appl) vs u))).(let H6 \def H2 in (and_ind (arity g c (THeads (Flat Appl) vs +t) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs t)) (land (arity g c (THeads +(Flat Appl) vs (THead (Flat Cast) u t)) (ASort O n0)) (sn3 c (THeads (Flat +Appl) vs (THead (Flat Cast) u t)))) (\lambda (H7: (arity g c (THeads (Flat +Appl) vs t) (ASort O n0))).(\lambda (H8: (sn3 c (THeads (Flat Appl) vs +t))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort +O n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))) +(arity_appls_cast g c u t vs (ASort O n0) H4 H7) (sn3_appls_cast c vs u H5 t +H8)))) H6)))) H3)))) (\lambda (n1: nat).(\lambda (_: (((sc3 g (match n1 with +[O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) c +(THeads (Flat Appl) vs u)) \to ((land (arity g c (THeads (Flat Appl) vs t) +(ASort n1 n0)) (sn3 c (THeads (Flat Appl) vs t))) \to (land (arity g c +(THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort n1 n0)) (sn3 c (THeads +(Flat Appl) vs (THead (Flat Cast) u t)))))))).(\lambda (H1: (sc3 g (ASort n1 +n0) c (THeads (Flat Appl) vs u))).(\lambda (H2: (land (arity g c (THeads +(Flat Appl) vs t) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs t)))).(let +H3 \def H1 in (and_ind (arity g c (THeads (Flat Appl) vs u) (ASort n1 n0)) +(sn3 c (THeads (Flat Appl) vs u)) (land (arity g c (THeads (Flat Appl) vs +(THead (Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs +(THead (Flat Cast) u t)))) (\lambda (H4: (arity g c (THeads (Flat Appl) vs u) +(ASort n1 n0))).(\lambda (H5: (sn3 c (THeads (Flat Appl) vs u))).(let H6 \def +H2 in (and_ind (arity g c (THeads (Flat Appl) vs t) (ASort (S n1) n0)) (sn3 c +(THeads (Flat Appl) vs t)) (land (arity g c (THeads (Flat Appl) vs (THead +(Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs (THead +(Flat Cast) u t)))) (\lambda (H7: (arity g c (THeads (Flat Appl) vs t) (ASort +(S n1) n0))).(\lambda (H8: (sn3 c (THeads (Flat Appl) vs t))).(conj (arity g +c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c +(THeads (Flat Appl) vs (THead (Flat Cast) u t))) (arity_appls_cast g c u t vs +(ASort (S n1) n0) H4 H7) (sn3_appls_cast c vs u H5 t H8)))) H6)))) H3)))))) n +H H0))))))))) (\lambda (a0: A).(\lambda (_: ((\forall (vs: TList).(\forall +(c: C).(\forall (u: T).((sc3 g (asucc g a0) c (THeads (Flat Appl) vs u)) \to +(\forall (t: T).((sc3 g a0 c (THeads (Flat Appl) vs t)) \to (sc3 g a0 c +(THeads (Flat Appl) vs (THead (Flat Cast) u t))))))))))).(\lambda (a1: +A).(\lambda (H0: ((\forall (vs: TList).(\forall (c: C).(\forall (u: T).((sc3 +g (asucc g a1) c (THeads (Flat Appl) vs u)) \to (\forall (t: T).((sc3 g a1 c +(THeads (Flat Appl) vs t)) \to (sc3 g a1 c (THeads (Flat Appl) vs (THead +(Flat Cast) u t))))))))))).(\lambda (vs: TList).(\lambda (c: C).(\lambda (u: +T).(\lambda (H1: (land (arity g c (THeads (Flat Appl) vs u) (AHead a0 (asucc +g a1))) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g (asucc g a1) d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs u))))))))))).(\lambda (t: T).(\lambda (H2: (land (arity g c (THeads (Flat Appl) vs t) (AHead a0 a1)) (\forall (d: C).(\forall @@ -338,22 +405,6 @@ is t vs))) (lift1 is (THead (Flat Cast) u t)) (lift1_flat Cast is u t)) (lift1 is (THeads (Flat Appl) vs (THead (Flat Cast) u t))) (lifts1_flat Appl is (THead (Flat Cast) u t) vs))))))))))) H6)))) H3)))))))))))) a)). -axiom sc3_bind: - \forall (g: G).(\forall (b: B).((not (eq B b Abst)) \to (\forall (a1: -A).(\forall (a2: A).(\forall (vs: TList).(\forall (c: C).(\forall (v: -T).(\forall (t: T).((sc3 g a2 (CHead c (Bind b) v) (THeads (Flat Appl) (lifts -(S O) O vs) t)) \to ((sc3 g a1 c v) \to (sc3 g a2 c (THeads (Flat Appl) vs -(THead (Bind b) v t))))))))))))) -. - -axiom sc3_appl: - \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (vs: -TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a2 c (THeads -(Flat Appl) vs (THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) \to (\forall (w: -T).((sc3 g (asucc g a1) c w) \to (sc3 g a2 c (THeads (Flat Appl) vs (THead -(Flat Appl) v (THead (Bind Abst) w t)))))))))))))) -. - theorem sc3_props__sc3_sn3_abst: \forall (g: G).(\forall (a: A).(land (\forall (c: C).(\forall (t: T).((sc3 g a c t) \to (sn3 c t)))) (\forall (vs: TList).(\forall (i: nat).(let t \def @@ -432,56 +483,56 @@ H13) (nf2_lref_abst (CHead x0 (Bind Abst) x1) x0 x1 O (getl_refl Abst x0 x1)) I) (PCons (S x2) O PNil)) in (let H_y1 \def (H6 (CHead x0 (Bind Abst) x1) (THead (Flat Appl) (TLRef O) (lift (S x2) O t)) (H_y0 (drop1_cons (CHead x0 (Bind Abst) x1) c (S x2) O (drop_drop (Bind Abst) x2 x0 c H12 x1) c PNil -(drop1_nil c)))) in (let H14 \def (sn3_gen_flat Appl (CHead x0 (Bind Abst) -x1) (TLRef O) (lift (S x2) O t) H_y1) in (and_ind (sn3 (CHead x0 (Bind Abst) -x1) (TLRef O)) (sn3 (CHead x0 (Bind Abst) x1) (lift (S x2) O t)) (sn3 c t) -(\lambda (_: (sn3 (CHead x0 (Bind Abst) x1) (TLRef O))).(\lambda (H16: (sn3 -(CHead x0 (Bind Abst) x1) (lift (S x2) O t))).(sn3_gen_lift (CHead x0 (Bind -Abst) x1) t (S x2) O H16 c (drop_drop (Bind Abst) x2 x0 c H12 x1)))) -H14))))))))) H11))))) H8)))) H5)))) H2))))) (\lambda (vs: TList).(\lambda (i: -nat).(\lambda (c: C).(\lambda (H1: (arity g c (THeads (Flat Appl) vs (TLRef -i)) (AHead a0 a1))).(\lambda (H2: (nf2 c (TLRef i))).(\lambda (H3: (sns3 c -vs)).(conj (arity g c (THeads (Flat Appl) vs (TLRef i)) (AHead a0 a1)) -(\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: -PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads -(Flat Appl) vs (TLRef i)))))))))) H1 (\lambda (d: C).(\lambda (w: T).(\lambda -(H4: (sc3 g a0 d w)).(\lambda (is: PList).(\lambda (H5: (drop1 is d c)).(let -H6 \def H in (and_ind (\forall (c0: C).(\forall (t: T).((sc3 g a0 c0 t) \to -(sn3 c0 t)))) (\forall (vs0: TList).(\forall (i0: nat).(\forall (c0: -C).((arity g c0 (THeads (Flat Appl) vs0 (TLRef i0)) a0) \to ((nf2 c0 (TLRef -i0)) \to ((sns3 c0 vs0) \to (sc3 g a0 c0 (THeads (Flat Appl) vs0 (TLRef -i0))))))))) (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs -(TLRef i))))) (\lambda (H7: ((\forall (c0: C).(\forall (t: T).((sc3 g a0 c0 -t) \to (sn3 c0 t)))))).(\lambda (_: ((\forall (vs0: TList).(\forall (i0: -nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) vs0 (TLRef i0)) a0) -\to ((nf2 c0 (TLRef i0)) \to ((sns3 c0 vs0) \to (sc3 g a0 c0 (THeads (Flat -Appl) vs0 (TLRef i0))))))))))).(let H9 \def H0 in (and_ind (\forall (c0: -C).(\forall (t: T).((sc3 g a1 c0 t) \to (sn3 c0 t)))) (\forall (vs0: +(drop1_nil c)))) in (let H_x \def (sn3_gen_flat Appl (CHead x0 (Bind Abst) +x1) (TLRef O) (lift (S x2) O t) H_y1) in (let H14 \def H_x in (and_ind (sn3 +(CHead x0 (Bind Abst) x1) (TLRef O)) (sn3 (CHead x0 (Bind Abst) x1) (lift (S +x2) O t)) (sn3 c t) (\lambda (_: (sn3 (CHead x0 (Bind Abst) x1) (TLRef +O))).(\lambda (H16: (sn3 (CHead x0 (Bind Abst) x1) (lift (S x2) O +t))).(sn3_gen_lift (CHead x0 (Bind Abst) x1) t (S x2) O H16 c (drop_drop +(Bind Abst) x2 x0 c H12 x1)))) H14)))))))))) H11))))) H8)))) H5)))) H2))))) +(\lambda (vs: TList).(\lambda (i: nat).(\lambda (c: C).(\lambda (H1: (arity g +c (THeads (Flat Appl) vs (TLRef i)) (AHead a0 a1))).(\lambda (H2: (nf2 c +(TLRef i))).(\lambda (H3: (sns3 c vs)).(conj (arity g c (THeads (Flat Appl) +vs (TLRef i)) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) +\to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w +(lift1 is (THeads (Flat Appl) vs (TLRef i)))))))))) H1 (\lambda (d: +C).(\lambda (w: T).(\lambda (H4: (sc3 g a0 d w)).(\lambda (is: +PList).(\lambda (H5: (drop1 is d c)).(let H6 \def H in (and_ind (\forall (c0: +C).(\forall (t: T).((sc3 g a0 c0 t) \to (sn3 c0 t)))) (\forall (vs0: TList).(\forall (i0: nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) -vs0 (TLRef i0)) a1) \to ((nf2 c0 (TLRef i0)) \to ((sns3 c0 vs0) \to (sc3 g a1 +vs0 (TLRef i0)) a0) \to ((nf2 c0 (TLRef i0)) \to ((sns3 c0 vs0) \to (sc3 g a0 c0 (THeads (Flat Appl) vs0 (TLRef i0))))))))) (sc3 g a1 d (THead (Flat Appl) -w (lift1 is (THeads (Flat Appl) vs (TLRef i))))) (\lambda (_: ((\forall (c0: -C).(\forall (t: T).((sc3 g a1 c0 t) \to (sn3 c0 t)))))).(\lambda (H11: +w (lift1 is (THeads (Flat Appl) vs (TLRef i))))) (\lambda (H7: ((\forall (c0: +C).(\forall (t: T).((sc3 g a0 c0 t) \to (sn3 c0 t)))))).(\lambda (_: ((\forall (vs0: TList).(\forall (i0: nat).(\forall (c0: C).((arity g c0 -(THeads (Flat Appl) vs0 (TLRef i0)) a1) \to ((nf2 c0 (TLRef i0)) \to ((sns3 -c0 vs0) \to (sc3 g a1 c0 (THeads (Flat Appl) vs0 (TLRef i0))))))))))).(let -H_y \def (H11 (TCons w (lifts1 is vs))) in (eq_ind_r T (THeads (Flat Appl) -(lifts1 is vs) (lift1 is (TLRef i))) (\lambda (t: T).(sc3 g a1 d (THead (Flat -Appl) w t))) (eq_ind_r T (TLRef (trans is i)) (\lambda (t: T).(sc3 g a1 d -(THead (Flat Appl) w (THeads (Flat Appl) (lifts1 is vs) t)))) (H_y (trans is -i) d (eq_ind T (lift1 is (TLRef i)) (\lambda (t: T).(arity g d (THead (Flat -Appl) w (THeads (Flat Appl) (lifts1 is vs) t)) a1)) (eq_ind T (lift1 is -(THeads (Flat Appl) vs (TLRef i))) (\lambda (t: T).(arity g d (THead (Flat -Appl) w t) a1)) (arity_appl g d w a0 (sc3_arity_gen g d w a0 H4) (lift1 is -(THeads (Flat Appl) vs (TLRef i))) a1 (arity_lift1 g (AHead a0 a1) c is d -(THeads (Flat Appl) vs (TLRef i)) H5 H1)) (THeads (Flat Appl) (lifts1 is vs) -(lift1 is (TLRef i))) (lifts1_flat Appl is (TLRef i) vs)) (TLRef (trans is -i)) (lift1_lref is i)) (eq_ind T (lift1 is (TLRef i)) (\lambda (t: T).(nf2 d -t)) (nf2_lift1 c is d (TLRef i) H5 H2) (TLRef (trans is i)) (lift1_lref is -i)) (conj (sn3 d w) (sns3 d (lifts1 is vs)) (H7 d w H4) (sns3_lifts1 c is d -H5 vs H3))) (lift1 is (TLRef i)) (lift1_lref is i)) (lift1 is (THeads (Flat -Appl) vs (TLRef i))) (lifts1_flat Appl is (TLRef i) vs))))) H9)))) -H6))))))))))))))))))) a)). +(THeads (Flat Appl) vs0 (TLRef i0)) a0) \to ((nf2 c0 (TLRef i0)) \to ((sns3 +c0 vs0) \to (sc3 g a0 c0 (THeads (Flat Appl) vs0 (TLRef i0))))))))))).(let H9 +\def H0 in (and_ind (\forall (c0: C).(\forall (t: T).((sc3 g a1 c0 t) \to +(sn3 c0 t)))) (\forall (vs0: TList).(\forall (i0: nat).(\forall (c0: +C).((arity g c0 (THeads (Flat Appl) vs0 (TLRef i0)) a1) \to ((nf2 c0 (TLRef +i0)) \to ((sns3 c0 vs0) \to (sc3 g a1 c0 (THeads (Flat Appl) vs0 (TLRef +i0))))))))) (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs +(TLRef i))))) (\lambda (_: ((\forall (c0: C).(\forall (t: T).((sc3 g a1 c0 t) +\to (sn3 c0 t)))))).(\lambda (H11: ((\forall (vs0: TList).(\forall (i0: +nat).(\forall (c0: C).((arity g c0 (THeads (Flat Appl) vs0 (TLRef i0)) a1) +\to ((nf2 c0 (TLRef i0)) \to ((sns3 c0 vs0) \to (sc3 g a1 c0 (THeads (Flat +Appl) vs0 (TLRef i0))))))))))).(let H_y \def (H11 (TCons w (lifts1 is vs))) +in (eq_ind_r T (THeads (Flat Appl) (lifts1 is vs) (lift1 is (TLRef i))) +(\lambda (t: T).(sc3 g a1 d (THead (Flat Appl) w t))) (eq_ind_r T (TLRef +(trans is i)) (\lambda (t: T).(sc3 g a1 d (THead (Flat Appl) w (THeads (Flat +Appl) (lifts1 is vs) t)))) (H_y (trans is i) d (eq_ind T (lift1 is (TLRef i)) +(\lambda (t: T).(arity g d (THead (Flat Appl) w (THeads (Flat Appl) (lifts1 +is vs) t)) a1)) (eq_ind T (lift1 is (THeads (Flat Appl) vs (TLRef i))) +(\lambda (t: T).(arity g d (THead (Flat Appl) w t) a1)) (arity_appl g d w a0 +(sc3_arity_gen g d w a0 H4) (lift1 is (THeads (Flat Appl) vs (TLRef i))) a1 +(arity_lift1 g (AHead a0 a1) c is d (THeads (Flat Appl) vs (TLRef i)) H5 H1)) +(THeads (Flat Appl) (lifts1 is vs) (lift1 is (TLRef i))) (lifts1_flat Appl is +(TLRef i) vs)) (TLRef (trans is i)) (lift1_lref is i)) (eq_ind T (lift1 is +(TLRef i)) (\lambda (t: T).(nf2 d t)) (nf2_lift1 c is d (TLRef i) H5 H2) +(TLRef (trans is i)) (lift1_lref is i)) (conj (sn3 d w) (sns3 d (lifts1 is +vs)) (H7 d w H4) (sns3_lifts1 c is d H5 vs H3))) (lift1 is (TLRef i)) +(lift1_lref is i)) (lift1 is (THeads (Flat Appl) vs (TLRef i))) (lifts1_flat +Appl is (TLRef i) vs))))) H9)))) H6))))))))))))))))))) a)). theorem sc3_sn3: \forall (g: G).(\forall (a: A).(\forall (c: C).(\forall (t: T).((sc3 g a c @@ -518,3 +569,163 @@ t)))))).(\lambda (H4: ((\forall (vs0: TList).(\forall (i0: nat).(let t \def ((nf2 c0 (TLRef i0)) \to ((sns3 c0 vs0) \to (sc3 g a c0 t)))))))))).(H4 vs i c H H0 H1))) H2)))))))))). +theorem sc3_bind: + \forall (g: G).(\forall (b: B).((not (eq B b Abst)) \to (\forall (a1: +A).(\forall (a2: A).(\forall (vs: TList).(\forall (c: C).(\forall (v: +T).(\forall (t: T).((sc3 g a2 (CHead c (Bind b) v) (THeads (Flat Appl) (lifts +(S O) O vs) t)) \to ((sc3 g a1 c v) \to (sc3 g a2 c (THeads (Flat Appl) vs +(THead (Bind b) v t))))))))))))) +\def + \lambda (g: G).(\lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda +(a1: A).(\lambda (a2: A).(A_ind (\lambda (a: A).(\forall (vs: TList).(\forall +(c: C).(\forall (v: T).(\forall (t: T).((sc3 g a (CHead c (Bind b) v) (THeads +(Flat Appl) (lifts (S O) O vs) t)) \to ((sc3 g a1 c v) \to (sc3 g a c (THeads +(Flat Appl) vs (THead (Bind b) v t)))))))))) (\lambda (n: nat).(\lambda (n0: +nat).(\lambda (vs: TList).(\lambda (c: C).(\lambda (v: T).(\lambda (t: +T).(\lambda (H0: (land (arity g (CHead c (Bind b) v) (THeads (Flat Appl) +(lifts (S O) O vs) t) (ASort n n0)) (sn3 (CHead c (Bind b) v) (THeads (Flat +Appl) (lifts (S O) O vs) t)))).(\lambda (H1: (sc3 g a1 c v)).(let H2 \def H0 +in (and_ind (arity g (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O +vs) t) (ASort n n0)) (sn3 (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S +O) O vs) t)) (land (arity g c (THeads (Flat Appl) vs (THead (Bind b) v t)) +(ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead (Bind b) v t)))) (\lambda +(H3: (arity g (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t) +(ASort n n0))).(\lambda (H4: (sn3 (CHead c (Bind b) v) (THeads (Flat Appl) +(lifts (S O) O vs) t))).(conj (arity g c (THeads (Flat Appl) vs (THead (Bind +b) v t)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead (Bind b) v t))) +(arity_appls_bind g b H c v a1 (sc3_arity_gen g c v a1 H1) t vs (ASort n n0) +H3) (sn3_appls_bind b H c v (sc3_sn3 g a1 c v H1) vs t H4)))) H2)))))))))) +(\lambda (a: A).(\lambda (_: ((\forall (vs: TList).(\forall (c: C).(\forall +(v: T).(\forall (t: T).((sc3 g a (CHead c (Bind b) v) (THeads (Flat Appl) +(lifts (S O) O vs) t)) \to ((sc3 g a1 c v) \to (sc3 g a c (THeads (Flat Appl) +vs (THead (Bind b) v t))))))))))).(\lambda (a0: A).(\lambda (H1: ((\forall +(vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a0 (CHead +c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t)) \to ((sc3 g a1 c v) +\to (sc3 g a0 c (THeads (Flat Appl) vs (THead (Bind b) v +t))))))))))).(\lambda (vs: TList).(\lambda (c: C).(\lambda (v: T).(\lambda +(t: T).(\lambda (H2: (land (arity g (CHead c (Bind b) v) (THeads (Flat Appl) +(lifts (S O) O vs) t) (AHead a a0)) (\forall (d: C).(\forall (w: T).((sc3 g a +d w) \to (\forall (is: PList).((drop1 is d (CHead c (Bind b) v)) \to (sc3 g +a0 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) (lifts (S O) O vs) +t))))))))))).(\lambda (H3: (sc3 g a1 c v)).(let H4 \def H2 in (and_ind (arity +g (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t) (AHead a +a0)) (\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: +PList).((drop1 is d (CHead c (Bind b) v)) \to (sc3 g a0 d (THead (Flat Appl) +w (lift1 is (THeads (Flat Appl) (lifts (S O) O vs) t))))))))) (land (arity g +c (THeads (Flat Appl) vs (THead (Bind b) v t)) (AHead a a0)) (\forall (d: +C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: PList).((drop1 is d c) +\to (sc3 g a0 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (THead +(Bind b) v t))))))))))) (\lambda (H5: (arity g (CHead c (Bind b) v) (THeads +(Flat Appl) (lifts (S O) O vs) t) (AHead a a0))).(\lambda (H6: ((\forall (d: +C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: PList).((drop1 is d +(CHead c (Bind b) v)) \to (sc3 g a0 d (THead (Flat Appl) w (lift1 is (THeads +(Flat Appl) (lifts (S O) O vs) t))))))))))).(conj (arity g c (THeads (Flat +Appl) vs (THead (Bind b) v t)) (AHead a a0)) (\forall (d: C).(\forall (w: +T).((sc3 g a d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a0 d +(THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (THead (Bind b) v +t)))))))))) (arity_appls_bind g b H c v a1 (sc3_arity_gen g c v a1 H3) t vs +(AHead a a0) H5) (\lambda (d: C).(\lambda (w: T).(\lambda (H7: (sc3 g a d +w)).(\lambda (is: PList).(\lambda (H8: (drop1 is d c)).(let H_y \def (H1 +(TCons w (lifts1 is vs))) in (eq_ind_r T (THeads (Flat Appl) (lifts1 is vs) +(lift1 is (THead (Bind b) v t))) (\lambda (t0: T).(sc3 g a0 d (THead (Flat +Appl) w t0))) (eq_ind_r T (THead (Bind b) (lift1 is v) (lift1 (Ss is) t)) +(\lambda (t0: T).(sc3 g a0 d (THead (Flat Appl) w (THeads (Flat Appl) (lifts1 +is vs) t0)))) (H_y d (lift1 is v) (lift1 (Ss is) t) (eq_ind TList (lifts1 (Ss +is) (lifts (S O) O vs)) (\lambda (t0: TList).(sc3 g a0 (CHead d (Bind b) +(lift1 is v)) (THead (Flat Appl) (lift (S O) O w) (THeads (Flat Appl) t0 +(lift1 (Ss is) t))))) (eq_ind T (lift1 (Ss is) (THeads (Flat Appl) (lifts (S +O) O vs) t)) (\lambda (t0: T).(sc3 g a0 (CHead d (Bind b) (lift1 is v)) +(THead (Flat Appl) (lift (S O) O w) t0))) (H6 (CHead d (Bind b) (lift1 is v)) +(lift (S O) O w) (sc3_lift g a d w H7 (CHead d (Bind b) (lift1 is v)) (S O) O +(drop_drop (Bind b) O d d (drop_refl d) (lift1 is v))) (Ss is) +(drop1_skip_bind b c is d v H8)) (THeads (Flat Appl) (lifts1 (Ss is) (lifts +(S O) O vs)) (lift1 (Ss is) t)) (lifts1_flat Appl (Ss is) t (lifts (S O) O +vs))) (lifts (S O) O (lifts1 is vs)) (lifts1_xhg is vs)) (sc3_lift1 g c a1 is +d v H3 H8)) (lift1 is (THead (Bind b) v t)) (lift1_bind b is v t)) (lift1 is +(THeads (Flat Appl) vs (THead (Bind b) v t))) (lifts1_flat Appl is (THead +(Bind b) v t) vs))))))))))) H4)))))))))))) a2))))). + +theorem sc3_appl: + \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (vs: +TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a2 c (THeads +(Flat Appl) vs (THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) \to (\forall (w: +T).((sc3 g (asucc g a1) c w) \to (sc3 g a2 c (THeads (Flat Appl) vs (THead +(Flat Appl) v (THead (Bind Abst) w t)))))))))))))) +\def + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(A_ind (\lambda (a: +A).(\forall (vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 +g a c (THeads (Flat Appl) vs (THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) +\to (\forall (w: T).((sc3 g (asucc g a1) c w) \to (sc3 g a c (THeads (Flat +Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w t))))))))))))) (\lambda +(n: nat).(\lambda (n0: nat).(\lambda (vs: TList).(\lambda (c: C).(\lambda (v: +T).(\lambda (t: T).(\lambda (H: (land (arity g c (THeads (Flat Appl) vs +(THead (Bind Abbr) v t)) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead +(Bind Abbr) v t))))).(\lambda (H0: (sc3 g a1 c v)).(\lambda (w: T).(\lambda +(H1: (sc3 g (asucc g a1) c w)).(let H2 \def H in (and_ind (arity g c (THeads +(Flat Appl) vs (THead (Bind Abbr) v t)) (ASort n n0)) (sn3 c (THeads (Flat +Appl) vs (THead (Bind Abbr) v t))) (land (arity g c (THeads (Flat Appl) vs +(THead (Flat Appl) v (THead (Bind Abst) w t))) (ASort n n0)) (sn3 c (THeads +(Flat Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w t))))) (\lambda (H3: +(arity g c (THeads (Flat Appl) vs (THead (Bind Abbr) v t)) (ASort n +n0))).(\lambda (H4: (sn3 c (THeads (Flat Appl) vs (THead (Bind Abbr) v +t)))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Appl) v (THead +(Bind Abst) w t))) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat +Appl) v (THead (Bind Abst) w t)))) (arity_appls_appl g c v a1 (sc3_arity_gen +g c v a1 H0) w (sc3_arity_gen g c w (asucc g a1) H1) t vs (ASort n n0) H3) +(sn3_appls_beta c v t vs H4 w (sc3_sn3 g (asucc g a1) c w H1))))) +H2)))))))))))) (\lambda (a: A).(\lambda (_: ((\forall (vs: TList).(\forall +(c: C).(\forall (v: T).(\forall (t: T).((sc3 g a c (THeads (Flat Appl) vs +(THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) \to (\forall (w: T).((sc3 g +(asucc g a1) c w) \to (sc3 g a c (THeads (Flat Appl) vs (THead (Flat Appl) v +(THead (Bind Abst) w t)))))))))))))).(\lambda (a0: A).(\lambda (H0: ((\forall +(vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a0 c +(THeads (Flat Appl) vs (THead (Bind Abbr) v t))) \to ((sc3 g a1 c v) \to +(\forall (w: T).((sc3 g (asucc g a1) c w) \to (sc3 g a0 c (THeads (Flat Appl) +vs (THead (Flat Appl) v (THead (Bind Abst) w t)))))))))))))).(\lambda (vs: +TList).(\lambda (c: C).(\lambda (v: T).(\lambda (t: T).(\lambda (H1: (land +(arity g c (THeads (Flat Appl) vs (THead (Bind Abbr) v t)) (AHead a a0)) +(\forall (d: C).(\forall (w: T).((sc3 g a d w) \to (\forall (is: +PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w (lift1 is (THeads +(Flat Appl) vs (THead (Bind Abbr) v t)))))))))))).(\lambda (H2: (sc3 g a1 c +v)).(\lambda (w: T).(\lambda (H3: (sc3 g (asucc g a1) c w)).(let H4 \def H1 +in (and_ind (arity g c (THeads (Flat Appl) vs (THead (Bind Abbr) v t)) (AHead +a a0)) (\forall (d: C).(\forall (w0: T).((sc3 g a d w0) \to (\forall (is: +PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w0 (lift1 is +(THeads (Flat Appl) vs (THead (Bind Abbr) v t)))))))))) (land (arity g c +(THeads (Flat Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w t))) (AHead +a a0)) (\forall (d: C).(\forall (w0: T).((sc3 g a d w0) \to (\forall (is: +PList).((drop1 is d c) \to (sc3 g a0 d (THead (Flat Appl) w0 (lift1 is +(THeads (Flat Appl) vs (THead (Flat Appl) v (THead (Bind Abst) w +t)))))))))))) (\lambda (H5: (arity g c (THeads (Flat Appl) vs (THead (Bind +Abbr) v t)) (AHead a a0))).(\lambda (H6: ((\forall (d: C).(\forall (w0: +T).((sc3 g a d w0) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a0 d +(THead (Flat Appl) w0 (lift1 is (THeads (Flat Appl) vs (THead (Bind Abbr) v +t)))))))))))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Appl) v +(THead (Bind Abst) w t))) (AHead a a0)) (\forall (d: C).(\forall (w0: +T).((sc3 g a d w0) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a0 d +(THead (Flat Appl) w0 (lift1 is (THeads (Flat Appl) vs (THead (Flat Appl) v +(THead (Bind Abst) w t))))))))))) (arity_appls_appl g c v a1 (sc3_arity_gen g +c v a1 H2) w (sc3_arity_gen g c w (asucc g a1) H3) t vs (AHead a a0) H5) +(\lambda (d: C).(\lambda (w0: T).(\lambda (H7: (sc3 g a d w0)).(\lambda (is: +PList).(\lambda (H8: (drop1 is d c)).(eq_ind_r T (THeads (Flat Appl) (lifts1 +is vs) (lift1 is (THead (Flat Appl) v (THead (Bind Abst) w t)))) (\lambda +(t0: T).(sc3 g a0 d (THead (Flat Appl) w0 t0))) (eq_ind_r T (THead (Flat +Appl) (lift1 is v) (lift1 is (THead (Bind Abst) w t))) (\lambda (t0: T).(sc3 +g a0 d (THead (Flat Appl) w0 (THeads (Flat Appl) (lifts1 is vs) t0)))) +(eq_ind_r T (THead (Bind Abst) (lift1 is w) (lift1 (Ss is) t)) (\lambda (t0: +T).(sc3 g a0 d (THead (Flat Appl) w0 (THeads (Flat Appl) (lifts1 is vs) +(THead (Flat Appl) (lift1 is v) t0))))) (let H_y \def (H0 (TCons w0 (lifts1 +is vs))) in (H_y d (lift1 is v) (lift1 (Ss is) t) (eq_ind T (lift1 is (THead +(Bind Abbr) v t)) (\lambda (t0: T).(sc3 g a0 d (THead (Flat Appl) w0 (THeads +(Flat Appl) (lifts1 is vs) t0)))) (eq_ind T (lift1 is (THeads (Flat Appl) vs +(THead (Bind Abbr) v t))) (\lambda (t0: T).(sc3 g a0 d (THead (Flat Appl) w0 +t0))) (H6 d w0 H7 is H8) (THeads (Flat Appl) (lifts1 is vs) (lift1 is (THead +(Bind Abbr) v t))) (lifts1_flat Appl is (THead (Bind Abbr) v t) vs)) (THead +(Bind Abbr) (lift1 is v) (lift1 (Ss is) t)) (lift1_bind Abbr is v t)) +(sc3_lift1 g c a1 is d v H2 H8) (lift1 is w) (sc3_lift1 g c (asucc g a1) is d +w H3 H8))) (lift1 is (THead (Bind Abst) w t)) (lift1_bind Abst is w t)) +(lift1 is (THead (Flat Appl) v (THead (Bind Abst) w t))) (lift1_flat Appl is +v (THead (Bind Abst) w t))) (lift1 is (THeads (Flat Appl) vs (THead (Flat +Appl) v (THead (Bind Abst) w t)))) (lifts1_flat Appl is (THead (Flat Appl) v +(THead (Bind Abst) w t)) vs)))))))))) H4)))))))))))))) a2))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/props.ma index dd51aca1d..6a21455d2 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/sn3/props.ma @@ -426,54 +426,52 @@ H33) in (eq_ind T x (\lambda (t3: T).(sn3 c (THead (Flat Appl) t3 (THead x x4 (refl_equal T (THead (Flat Appl) x x4)) x1 (sn3_sing c (THead (Flat Appl) x x1) H10)) x2 H33))) x5 H32)))) H31))) (\lambda (H30: (((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5)) \to (\forall (P: -Prop).P)))).(H11 (THead (Flat Appl) x2 x4) H28 (pr3_head_12 c x x2 (pr3_pr2 c -x x2 H18) (Flat Appl) x0 x4 (pr3_pr2 (CHead c (Flat Appl) x2) x0 x4 -(pr2_cflat c x0 x4 H24 Appl x2))) x2 x4 (refl_equal T (THead (Flat Appl) x2 -x4)) x5 (H10 (THead (Flat Appl) x2 x5) H30 (pr3_head_12 c x x2 (pr3_pr2 c x -x2 H18) (Flat Appl) x1 x5 (pr3_pr2 (CHead c (Flat Appl) x2) x1 x5 (pr2_cflat -c x1 x5 H25 Appl x2)))))) H29)))) H27))) x3 H23))))))) H22)) (\lambda (H22: -(pr2 c x1 x3)).(let H_x \def (term_dec (THead (Flat Appl) x x1) (THead (Flat -Appl) x2 x3)) in (let H23 \def H_x in (or_ind (eq T (THead (Flat Appl) x x1) -(THead (Flat Appl) x2 x3)) ((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) -x2 x3)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x2 x3)) (\lambda -(H24: (eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3))).(let H25 -\def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) -with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t3 _) -\Rightarrow t3])) (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3) H24) in -((let H26 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: -T).T) with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ -t3) \Rightarrow t3])) (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3) H24) -in (\lambda (H27: (eq T x x2)).(let H28 \def (eq_ind_r T x3 (\lambda (t3: -T).(pr2 c x1 t3)) H22 x1 H26) in (let H29 \def (eq_ind_r T x3 (\lambda (t3: -T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) -x2 t3)) \to (\forall (P: Prop).P))) H20 x1 H26) in (eq_ind T x1 (\lambda (t3: -T).(sn3 c (THead (Flat Appl) x2 t3))) (let H30 \def (eq_ind_r T x2 (\lambda -(t3: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat -Appl) t3 x1)) \to (\forall (P: Prop).P))) H29 x H27) in (let H31 \def -(eq_ind_r T x2 (\lambda (t3: T).(pr2 c x t3)) H18 x H27) in (eq_ind T x -(\lambda (t3: T).(sn3 c (THead (Flat Appl) t3 x1))) (sn3_sing c (THead (Flat -Appl) x x1) H10) x2 H27))) x3 H26))))) H25))) (\lambda (H24: (((eq T (THead -(Flat Appl) x x1) (THead (Flat Appl) x2 x3)) \to (\forall (P: -Prop).P)))).(H10 (THead (Flat Appl) x2 x3) H24 (pr3_head_12 c x x2 (pr3_pr2 c -x x2 H18) (Flat Appl) x1 x3 (pr3_pr2 (CHead c (Flat Appl) x2) x1 x3 -(pr2_cflat c x1 x3 H22 Appl x2))))) H23)))) H21)) t2 H17))))))) H16)) -(\lambda (H16: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: -T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead (Bind Abst) y1 -z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: -T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: -T).(pr2 (CHead c (Bind b) u0) z1 t3))))))))).(ex4_4_ind T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) -x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) -(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x -u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: -T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3))))))) -(sn3 c t2) (\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: -T).(\lambda (H17: (eq T (THead (Flat Cast) x0 x1) (THead (Bind Abst) x2 -x3))).(\lambda (H18: (eq T t2 (THead (Bind Abbr) x4 x5))).(\lambda (_: (pr2 c -x x4)).(\lambda (_: ((\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) +Prop).P)))).(H11 (THead (Flat Appl) x2 x4) H28 (pr3_flat c x x2 (pr3_pr2 c x +x2 H18) x0 x4 (pr3_pr2 c x0 x4 H24) Appl) x2 x4 (refl_equal T (THead (Flat +Appl) x2 x4)) x5 (H10 (THead (Flat Appl) x2 x5) H30 (pr3_flat c x x2 (pr3_pr2 +c x x2 H18) x1 x5 (pr3_pr2 c x1 x5 H25) Appl)))) H29)))) H27))) x3 H23))))))) +H22)) (\lambda (H22: (pr2 c x1 x3)).(let H_x \def (term_dec (THead (Flat +Appl) x x1) (THead (Flat Appl) x2 x3)) in (let H23 \def H_x in (or_ind (eq T +(THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3)) ((eq T (THead (Flat Appl) +x x1) (THead (Flat Appl) x2 x3)) \to (\forall (P: Prop).P)) (sn3 c (THead +(Flat Appl) x2 x3)) (\lambda (H24: (eq T (THead (Flat Appl) x x1) (THead +(Flat Appl) x2 x3))).(let H25 \def (f_equal T T (\lambda (e: T).(match e in T +return (\lambda (_: T).T) with [(TSort _) \Rightarrow x | (TLRef _) +\Rightarrow x | (THead _ t3 _) \Rightarrow t3])) (THead (Flat Appl) x x1) +(THead (Flat Appl) x2 x3) H24) in ((let H26 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow x1 | +(TLRef _) \Rightarrow x1 | (THead _ _ t3) \Rightarrow t3])) (THead (Flat +Appl) x x1) (THead (Flat Appl) x2 x3) H24) in (\lambda (H27: (eq T x +x2)).(let H28 \def (eq_ind_r T x3 (\lambda (t3: T).(pr2 c x1 t3)) H22 x1 H26) +in (let H29 \def (eq_ind_r T x3 (\lambda (t3: T).((eq T (THead (Flat Appl) x +(THead (Flat Cast) x0 x1)) (THead (Flat Appl) x2 t3)) \to (\forall (P: +Prop).P))) H20 x1 H26) in (eq_ind T x1 (\lambda (t3: T).(sn3 c (THead (Flat +Appl) x2 t3))) (let H30 \def (eq_ind_r T x2 (\lambda (t3: T).((eq T (THead +(Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) t3 x1)) \to +(\forall (P: Prop).P))) H29 x H27) in (let H31 \def (eq_ind_r T x2 (\lambda +(t3: T).(pr2 c x t3)) H18 x H27) in (eq_ind T x (\lambda (t3: T).(sn3 c +(THead (Flat Appl) t3 x1))) (sn3_sing c (THead (Flat Appl) x x1) H10) x2 +H27))) x3 H26))))) H25))) (\lambda (H24: (((eq T (THead (Flat Appl) x x1) +(THead (Flat Appl) x2 x3)) \to (\forall (P: Prop).P)))).(H10 (THead (Flat +Appl) x2 x3) H24 (pr3_flat c x x2 (pr3_pr2 c x x2 H18) x1 x3 (pr3_pr2 c x1 x3 +H22) Appl))) H23)))) H21)) t2 H17))))))) H16)) (\lambda (H16: (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T +(THead (Flat Cast) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind +Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda +(_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: +T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) +u0) z1 t3))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: +T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead +(Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: +B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3))))))) (sn3 c t2) +(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda +(H17: (eq T (THead (Flat Cast) x0 x1) (THead (Bind Abst) x2 x3))).(\lambda +(H18: (eq T t2 (THead (Bind Abbr) x4 x5))).(\lambda (_: (pr2 c x +x4)).(\lambda (_: ((\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) x3 x5))))).(let H21 \def (eq_ind T t2 (\lambda (t3: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t3) \to (\forall (P: Prop).P))) H13 (THead (Bind Abbr) x4 x5) H18) in (eq_ind_r T (THead (Bind Abbr) x4 x5) @@ -690,118 +688,117 @@ Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) t0 u2) (H7 u2 H35 H36) (THead u2) (pr2_head_1 c t0 x1 H15 (Flat Appl) u2)))))))) H33))) x3 H28))) x4 H27))))) H26))) (\lambda (H25: (((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) \to (\forall (P: Prop).P)))).(H8 (THead (Flat Appl) x3 x4) H25 -(pr3_head_12 c x x3 (pr3_pr2 c x x3 H21) (Flat Appl) x0 x4 (pr3_pr2 (CHead c -(Flat Appl) x3) x0 x4 (pr2_cflat c x0 x4 H22 Appl x3))) x3 x4 (refl_equal T -(THead (Flat Appl) x3 x4)) x1 (sn3_pr3_trans c t0 (sn3_sing c t0 H5) x1 -(pr3_pr2 c t0 x1 H15)) (\lambda (u2: T).(\lambda (H26: (pr3 c (THead (Flat -Appl) x3 x4) u2)).(\lambda (H27: (((iso (THead (Flat Appl) x3 x4) u2) \to -(\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) t0 u2) (H7 u2 -(pr3_sing c (THead (Flat Appl) x x4) (THead (Flat Appl) x x0) (pr2_thin_dx c -x0 x4 H22 x Appl) u2 (pr3_sing c (THead (Flat Appl) x3 x4) (THead (Flat Appl) -x x4) (pr2_head_1 c x x3 H21 (Flat Appl) x4) u2 H26)) (\lambda (H28: (iso -(THead (Flat Appl) x x0) u2)).(\lambda (P: Prop).(H27 (iso_trans (THead (Flat -Appl) x3 x4) (THead (Flat Appl) x x0) (iso_head (Flat Appl) x3 x x4 x0) u2 -H28) P)))) (THead (Flat Appl) x1 u2) (pr3_pr2 c (THead (Flat Appl) t0 u2) -(THead (Flat Appl) x1 u2) (pr2_head_1 c t0 x1 H15 (Flat Appl) u2)))))))) -H24))) x2 H20))))))) H19)) (\lambda (H19: (ex4_4 T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t4: T).(eq T x2 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 -(CHead c (Bind b) u) z1 t4))))))))).(ex4_4_ind T T T T (\lambda (y1: -T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind -Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda -(t4: T).(eq T x2 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: -T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda -(z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 -(CHead c (Bind b) u) z1 t4))))))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda -(x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (x6: T).(\lambda (H20: (eq -T x0 (THead (Bind Abst) x3 x4))).(\lambda (H21: (eq T x2 (THead (Bind Abbr) -x5 x6))).(\lambda (H22: (pr2 c x x5)).(\lambda (H23: ((\forall (b: -B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x4 x6))))).(let H24 \def (eq_ind -T x2 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) -(THead (Flat Appl) x1 t)) \to (\forall (P: Prop).P))) H17 (THead (Bind Abbr) -x5 x6) H21) in (eq_ind_r T (THead (Bind Abbr) x5 x6) (\lambda (t: T).(sn3 c -(THead (Flat Appl) x1 t))) (let H25 \def (eq_ind T x0 (\lambda (t: T).((eq T -(THead (Flat Appl) t0 (THead (Flat Appl) x t)) (THead (Flat Appl) x1 (THead -(Bind Abbr) x5 x6))) \to (\forall (P: Prop).P))) H24 (THead (Bind Abst) x3 -x4) H20) in (let H26 \def (eq_ind T x0 (\lambda (t: T).(\forall (t4: -T).((((eq T (THead (Flat Appl) x t) t4) \to (\forall (P: Prop).P))) \to ((pr3 -c (THead (Flat Appl) x t) t4) \to (sn3 c t4))))) H9 (THead (Bind Abst) x3 x4) -H20) in (let H27 \def (eq_ind T x0 (\lambda (t: T).(\forall (t4: T).((((eq T -(THead (Flat Appl) x t) t4) \to (\forall (P: Prop).P))) \to ((pr3 c (THead -(Flat Appl) x t) t4) \to (\forall (x7: T).(\forall (x8: T).((eq T t4 (THead -(Flat Appl) x7 x8)) \to (\forall (v3: T).((sn3 c v3) \to (((\forall (u2: -T).((pr3 c (THead (Flat Appl) x7 x8) u2) \to ((((iso (THead (Flat Appl) x7 -x8) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v3 u2)))))) -\to (sn3 c (THead (Flat Appl) v3 (THead (Flat Appl) x7 x8))))))))))))) H8 -(THead (Bind Abst) x3 x4) H20) in (let H28 \def (eq_ind T x0 (\lambda (t: -T).(\forall (u2: T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso (THead -(Flat Appl) x t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat -Appl) t0 u2)))))) H7 (THead (Bind Abst) x3 x4) H20) in (let H29 \def (eq_ind -T x0 (\lambda (t: T).(\forall (t4: T).((((eq T t0 t4) \to (\forall (P: -Prop).P))) \to ((pr3 c t0 t4) \to (((\forall (u2: T).((pr3 c (THead (Flat -Appl) x t) u2) \to ((((iso (THead (Flat Appl) x t) u2) \to (\forall (P: -Prop).P))) \to (sn3 c (THead (Flat Appl) t4 u2)))))) \to (sn3 c (THead (Flat -Appl) t4 (THead (Flat Appl) x t)))))))) H6 (THead (Bind Abst) x3 x4) H20) in -(sn3_pr3_trans c (THead (Flat Appl) t0 (THead (Bind Abbr) x5 x6)) (H28 (THead -(Bind Abbr) x5 x6) (pr3_sing c (THead (Bind Abbr) x x4) (THead (Flat Appl) x -(THead (Bind Abst) x3 x4)) (pr2_free c (THead (Flat Appl) x (THead (Bind -Abst) x3 x4)) (THead (Bind Abbr) x x4) (pr0_beta x3 x x (pr0_refl x) x4 x4 -(pr0_refl x4))) (THead (Bind Abbr) x5 x6) (pr3_head_12 c x x5 (pr3_pr2 c x x5 -H22) (Bind Abbr) x4 x6 (pr3_pr2 (CHead c (Bind Abbr) x5) x4 x6 (H23 Abbr -x5)))) (\lambda (H30: (iso (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) -(THead (Bind Abbr) x5 x6))).(\lambda (P: Prop).(let H31 \def (match H30 in -iso return (\lambda (t: T).(\lambda (t4: T).(\lambda (_: (iso t t4)).((eq T t -(THead (Flat Appl) x (THead (Bind Abst) x3 x4))) \to ((eq T t4 (THead (Bind -Abbr) x5 x6)) \to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H31: -(eq T (TSort n1) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)))).(\lambda -(H32: (eq T (TSort n2) (THead (Bind Abbr) x5 x6))).((let H33 \def (eq_ind T -(TSort n1) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with -[(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow False])) I (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H31) -in (False_ind ((eq T (TSort n2) (THead (Bind Abbr) x5 x6)) \to P) H33)) -H32))) | (iso_lref i1 i2) \Rightarrow (\lambda (H31: (eq T (TLRef i1) (THead -(Flat Appl) x (THead (Bind Abst) x3 x4)))).(\lambda (H32: (eq T (TLRef i2) -(THead (Bind Abbr) x5 x6))).((let H33 \def (eq_ind T (TLRef i1) (\lambda (e: +(pr3_flat c x x3 (pr3_pr2 c x x3 H21) x0 x4 (pr3_pr2 c x0 x4 H22) Appl) x3 x4 +(refl_equal T (THead (Flat Appl) x3 x4)) x1 (sn3_pr3_trans c t0 (sn3_sing c +t0 H5) x1 (pr3_pr2 c t0 x1 H15)) (\lambda (u2: T).(\lambda (H26: (pr3 c +(THead (Flat Appl) x3 x4) u2)).(\lambda (H27: (((iso (THead (Flat Appl) x3 +x4) u2) \to (\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) t0 +u2) (H7 u2 (pr3_sing c (THead (Flat Appl) x x4) (THead (Flat Appl) x x0) +(pr2_thin_dx c x0 x4 H22 x Appl) u2 (pr3_sing c (THead (Flat Appl) x3 x4) +(THead (Flat Appl) x x4) (pr2_head_1 c x x3 H21 (Flat Appl) x4) u2 H26)) +(\lambda (H28: (iso (THead (Flat Appl) x x0) u2)).(\lambda (P: Prop).(H27 +(iso_trans (THead (Flat Appl) x3 x4) (THead (Flat Appl) x x0) (iso_head x3 x +x4 x0 (Flat Appl)) u2 H28) P)))) (THead (Flat Appl) x1 u2) (pr3_pr2 c (THead +(Flat Appl) t0 u2) (THead (Flat Appl) x1 u2) (pr2_head_1 c t0 x1 H15 (Flat +Appl) u2)))))))) H24))) x2 H20))))))) H19)) (\lambda (H19: (ex4_4 T T T T +(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t4: T).(eq T x2 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))))).(ex4_4_ind T T T +T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 +(THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: +T).(\lambda (t4: T).(eq T x2 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: +T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda +(_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: +B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))) (sn3 c (THead (Flat +Appl) x1 x2)) (\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda +(x6: T).(\lambda (H20: (eq T x0 (THead (Bind Abst) x3 x4))).(\lambda (H21: +(eq T x2 (THead (Bind Abbr) x5 x6))).(\lambda (H22: (pr2 c x x5)).(\lambda +(H23: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x4 +x6))))).(let H24 \def (eq_ind T x2 (\lambda (t: T).((eq T (THead (Flat Appl) +t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 t)) \to (\forall (P: +Prop).P))) H17 (THead (Bind Abbr) x5 x6) H21) in (eq_ind_r T (THead (Bind +Abbr) x5 x6) (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 t))) (let H25 \def +(eq_ind T x0 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) +x t)) (THead (Flat Appl) x1 (THead (Bind Abbr) x5 x6))) \to (\forall (P: +Prop).P))) H24 (THead (Bind Abst) x3 x4) H20) in (let H26 \def (eq_ind T x0 +(\lambda (t: T).(\forall (t4: T).((((eq T (THead (Flat Appl) x t) t4) \to +(\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x t) t4) \to (sn3 c +t4))))) H9 (THead (Bind Abst) x3 x4) H20) in (let H27 \def (eq_ind T x0 +(\lambda (t: T).(\forall (t4: T).((((eq T (THead (Flat Appl) x t) t4) \to +(\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x t) t4) \to (\forall +(x7: T).(\forall (x8: T).((eq T t4 (THead (Flat Appl) x7 x8)) \to (\forall +(v3: T).((sn3 c v3) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x7 x8) +u2) \to ((((iso (THead (Flat Appl) x7 x8) u2) \to (\forall (P: Prop).P))) \to +(sn3 c (THead (Flat Appl) v3 u2)))))) \to (sn3 c (THead (Flat Appl) v3 (THead +(Flat Appl) x7 x8))))))))))))) H8 (THead (Bind Abst) x3 x4) H20) in (let H28 +\def (eq_ind T x0 (\lambda (t: T).(\forall (u2: T).((pr3 c (THead (Flat Appl) +x t) u2) \to ((((iso (THead (Flat Appl) x t) u2) \to (\forall (P: Prop).P))) +\to (sn3 c (THead (Flat Appl) t0 u2)))))) H7 (THead (Bind Abst) x3 x4) H20) +in (let H29 \def (eq_ind T x0 (\lambda (t: T).(\forall (t4: T).((((eq T t0 +t4) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t4) \to (((\forall (u2: +T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso (THead (Flat Appl) x t) +u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t4 u2)))))) \to +(sn3 c (THead (Flat Appl) t4 (THead (Flat Appl) x t)))))))) H6 (THead (Bind +Abst) x3 x4) H20) in (sn3_pr3_trans c (THead (Flat Appl) t0 (THead (Bind +Abbr) x5 x6)) (H28 (THead (Bind Abbr) x5 x6) (pr3_sing c (THead (Bind Abbr) x +x4) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) (pr2_free c (THead (Flat +Appl) x (THead (Bind Abst) x3 x4)) (THead (Bind Abbr) x x4) (pr0_beta x3 x x +(pr0_refl x) x4 x4 (pr0_refl x4))) (THead (Bind Abbr) x5 x6) (pr3_head_12 c x +x5 (pr3_pr2 c x x5 H22) (Bind Abbr) x4 x6 (pr3_pr2 (CHead c (Bind Abbr) x5) +x4 x6 (H23 Abbr x5)))) (\lambda (H30: (iso (THead (Flat Appl) x (THead (Bind +Abst) x3 x4)) (THead (Bind Abbr) x5 x6))).(\lambda (P: Prop).(let H31 \def +(match H30 in iso return (\lambda (t: T).(\lambda (t4: T).(\lambda (_: (iso t +t4)).((eq T t (THead (Flat Appl) x (THead (Bind Abst) x3 x4))) \to ((eq T t4 +(THead (Bind Abbr) x5 x6)) \to P))))) with [(iso_sort n1 n2) \Rightarrow +(\lambda (H31: (eq T (TSort n1) (THead (Flat Appl) x (THead (Bind Abst) x3 +x4)))).(\lambda (H32: (eq T (TSort n2) (THead (Bind Abbr) x5 x6))).((let H33 +\def (eq_ind T (TSort n1) (\lambda (e: T).(match e in T return (\lambda (_: +T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | +(THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) x (THead (Bind Abst) +x3 x4)) H31) in (False_ind ((eq T (TSort n2) (THead (Bind Abbr) x5 x6)) \to +P) H33)) H32))) | (iso_lref i1 i2) \Rightarrow (\lambda (H31: (eq T (TLRef +i1) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)))).(\lambda (H32: (eq T +(TLRef i2) (THead (Bind Abbr) x5 x6))).((let H33 \def (eq_ind T (TLRef i1) +(\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow +False])) I (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H31) in (False_ind +((eq T (TLRef i2) (THead (Bind Abbr) x5 x6)) \to P) H33)) H32))) | (iso_head +v4 v5 t4 t5 k) \Rightarrow (\lambda (H31: (eq T (THead k v4 t4) (THead (Flat +Appl) x (THead (Bind Abst) x3 x4)))).(\lambda (H32: (eq T (THead k v5 t5) +(THead (Bind Abbr) x5 x6))).((let H33 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t4 | +(TLRef _) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead k v4 t4) +(THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H31) in ((let H34 \def +(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with +[(TSort _) \Rightarrow v4 | (TLRef _) \Rightarrow v4 | (THead _ t _) +\Rightarrow t])) (THead k v4 t4) (THead (Flat Appl) x (THead (Bind Abst) x3 +x4)) H31) in ((let H35 \def (f_equal T K (\lambda (e: T).(match e in T return +(\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | +(THead k0 _ _) \Rightarrow k0])) (THead k v4 t4) (THead (Flat Appl) x (THead +(Bind Abst) x3 x4)) H31) in (eq_ind K (Flat Appl) (\lambda (k0: K).((eq T v4 +x) \to ((eq T t4 (THead (Bind Abst) x3 x4)) \to ((eq T (THead k0 v5 t5) +(THead (Bind Abbr) x5 x6)) \to P)))) (\lambda (H36: (eq T v4 x)).(eq_ind T x +(\lambda (_: T).((eq T t4 (THead (Bind Abst) x3 x4)) \to ((eq T (THead (Flat +Appl) v5 t5) (THead (Bind Abbr) x5 x6)) \to P))) (\lambda (H37: (eq T t4 +(THead (Bind Abst) x3 x4))).(eq_ind T (THead (Bind Abst) x3 x4) (\lambda (_: +T).((eq T (THead (Flat Appl) v5 t5) (THead (Bind Abbr) x5 x6)) \to P)) +(\lambda (H38: (eq T (THead (Flat Appl) v5 t5) (THead (Bind Abbr) x5 +x6))).(let H39 \def (eq_ind T (THead (Flat Appl) v5 t5) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I -(THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H31) in (False_ind ((eq T -(TLRef i2) (THead (Bind Abbr) x5 x6)) \to P) H33)) H32))) | (iso_head k v4 v5 -t4 t5) \Rightarrow (\lambda (H31: (eq T (THead k v4 t4) (THead (Flat Appl) x -(THead (Bind Abst) x3 x4)))).(\lambda (H32: (eq T (THead k v5 t5) (THead -(Bind Abbr) x5 x6))).((let H33 \def (f_equal T T (\lambda (e: T).(match e in -T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t4 | (TLRef _) -\Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead k v4 t4) (THead (Flat -Appl) x (THead (Bind Abst) x3 x4)) H31) in ((let H34 \def (f_equal T T -(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow v4 | (TLRef _) \Rightarrow v4 | (THead _ t _) \Rightarrow t])) -(THead k v4 t4) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H31) in ((let -H35 \def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) -with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k0 _ _) -\Rightarrow k0])) (THead k v4 t4) (THead (Flat Appl) x (THead (Bind Abst) x3 -x4)) H31) in (eq_ind K (Flat Appl) (\lambda (k0: K).((eq T v4 x) \to ((eq T -t4 (THead (Bind Abst) x3 x4)) \to ((eq T (THead k0 v5 t5) (THead (Bind Abbr) -x5 x6)) \to P)))) (\lambda (H36: (eq T v4 x)).(eq_ind T x (\lambda (_: -T).((eq T t4 (THead (Bind Abst) x3 x4)) \to ((eq T (THead (Flat Appl) v5 t5) -(THead (Bind Abbr) x5 x6)) \to P))) (\lambda (H37: (eq T t4 (THead (Bind -Abst) x3 x4))).(eq_ind T (THead (Bind Abst) x3 x4) (\lambda (_: T).((eq T -(THead (Flat Appl) v5 t5) (THead (Bind Abbr) x5 x6)) \to P)) (\lambda (H38: -(eq T (THead (Flat Appl) v5 t5) (THead (Bind Abbr) x5 x6))).(let H39 \def -(eq_ind T (THead (Flat Appl) v5 t5) (\lambda (e: T).(match e in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 in K return (\lambda -(_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow -True])])) I (THead (Bind Abbr) x5 x6) H38) in (False_ind P H39))) t4 (sym_eq -T t4 (THead (Bind Abst) x3 x4) H37))) v4 (sym_eq T v4 x H36))) k (sym_eq K k -(Flat Appl) H35))) H34)) H33)) H32)))]) in (H31 (refl_equal T (THead (Flat -Appl) x (THead (Bind Abst) x3 x4))) (refl_equal T (THead (Bind Abbr) x5 -x6))))))) (THead (Flat Appl) x1 (THead (Bind Abbr) x5 x6)) (pr3_pr2 c (THead -(Flat Appl) t0 (THead (Bind Abbr) x5 x6)) (THead (Flat Appl) x1 (THead (Bind -Abbr) x5 x6)) (pr2_head_1 c t0 x1 H15 (Flat Appl) (THead (Bind Abbr) x5 -x6))))))))) x2 H21)))))))))) H19)) (\lambda (H19: (ex6_6 B T T T T T (\lambda -(b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: +False | (TLRef _) \Rightarrow False | (THead k0 _ _) \Rightarrow (match k0 in +K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) +\Rightarrow True])])) I (THead (Bind Abbr) x5 x6) H38) in (False_ind P H39))) +t4 (sym_eq T t4 (THead (Bind Abst) x3 x4) H37))) v4 (sym_eq T v4 x H36))) k +(sym_eq K k (Flat Appl) H35))) H34)) H33)) H32)))]) in (H31 (refl_equal T +(THead (Flat Appl) x (THead (Bind Abst) x3 x4))) (refl_equal T (THead (Bind +Abbr) x5 x6))))))) (THead (Flat Appl) x1 (THead (Bind Abbr) x5 x6)) (pr3_pr2 +c (THead (Flat Appl) t0 (THead (Bind Abbr) x5 x6)) (THead (Flat Appl) x1 +(THead (Bind Abbr) x5 x6)) (pr2_head_1 c t0 x1 H15 (Flat Appl) (THead (Bind +Abbr) x5 x6))))))))) x2 H21)))))))))) H19)) (\lambda (H19: (ex6_6 B T T T T T +(\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: @@ -890,7 +887,7 @@ return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) x (THead (Bind x3) x4 x5)) H33) in (False_ind ((eq T (TLRef i2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P) H35)) H34))) | -(iso_head k v4 v5 t4 t5) \Rightarrow (\lambda (H33: (eq T (THead k v4 t4) +(iso_head v4 v5 t4 t5 k) \Rightarrow (\lambda (H33: (eq T (THead k v4 t4) (THead (Flat Appl) x (THead (Bind x3) x4 x5)))).(\lambda (H34: (eq T (THead k v5 t5) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).((let H35 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) @@ -1074,24 +1071,24 @@ t3))))))))))).(\lambda (H0: ((\forall (u: T).((sn3 c (THeads (Flat Appl) t2) t3)) \to (sn3 c (THeads (Flat Appl) (TCons t1 t2) (THead (Flat Cast) u t3))))))))).(\lambda (u: T).(\lambda (H1: (sn3 c (THead (Flat Appl) t (THeads (Flat Appl) (TCons t1 t2) u)))).(\lambda (t3: T).(\lambda (H2: (sn3 c (THead -(Flat Appl) t (THeads (Flat Appl) (TCons t1 t2) t3)))).(let H3 \def -(sn3_gen_flat Appl c t (THeads (Flat Appl) (TCons t1 t2) t3) H2) in (and_ind -(sn3 c t) (sn3 c (THead (Flat Appl) t1 (THeads (Flat Appl) t2 t3))) (sn3 c -(THead (Flat Appl) t (THeads (Flat Appl) (TCons t1 t2) (THead (Flat Cast) u -t3)))) (\lambda (_: (sn3 c t)).(\lambda (H5: (sn3 c (THead (Flat Appl) t1 -(THeads (Flat Appl) t2 t3)))).(let H6 \def H5 in (let H7 \def (sn3_gen_flat -Appl c t (THeads (Flat Appl) (TCons t1 t2) u) H1) in (and_ind (sn3 c t) (sn3 -c (THead (Flat Appl) t1 (THeads (Flat Appl) t2 u))) (sn3 c (THead (Flat Appl) -t (THeads (Flat Appl) (TCons t1 t2) (THead (Flat Cast) u t3)))) (\lambda (H8: -(sn3 c t)).(\lambda (H9: (sn3 c (THead (Flat Appl) t1 (THeads (Flat Appl) t2 -u)))).(let H10 \def H9 in (sn3_appl_appls t1 (THead (Flat Cast) u t3) t2 c +(Flat Appl) t (THeads (Flat Appl) (TCons t1 t2) t3)))).(let H_x \def +(sn3_gen_flat Appl c t (THeads (Flat Appl) (TCons t1 t2) t3) H2) in (let H3 +\def H_x in (and_ind (sn3 c t) (sn3 c (THeads (Flat Appl) (TCons t1 t2) t3)) +(sn3 c (THead (Flat Appl) t (THeads (Flat Appl) (TCons t1 t2) (THead (Flat +Cast) u t3)))) (\lambda (_: (sn3 c t)).(\lambda (H5: (sn3 c (THeads (Flat +Appl) (TCons t1 t2) t3))).(let H6 \def H5 in (let H_x0 \def (sn3_gen_flat +Appl c t (THeads (Flat Appl) (TCons t1 t2) u) H1) in (let H7 \def H_x0 in +(and_ind (sn3 c t) (sn3 c (THeads (Flat Appl) (TCons t1 t2) u)) (sn3 c (THead +(Flat Appl) t (THeads (Flat Appl) (TCons t1 t2) (THead (Flat Cast) u t3)))) +(\lambda (H8: (sn3 c t)).(\lambda (H9: (sn3 c (THeads (Flat Appl) (TCons t1 +t2) u))).(let H10 \def H9 in (sn3_appl_appls t1 (THead (Flat Cast) u t3) t2 c (H0 u H10 t3 H6) t H8 (\lambda (u2: T).(\lambda (H11: (pr3 c (THeads (Flat Appl) (TCons t1 t2) (THead (Flat Cast) u t3)) u2)).(\lambda (H12: (((iso (THeads (Flat Appl) (TCons t1 t2) (THead (Flat Cast) u t3)) u2) \to (\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) t (THeads (Flat Appl) (TCons t1 t2) t3)) H2 (THead (Flat Appl) t u2) (pr3_thin_dx c (THeads (Flat Appl) (TCons t1 t2) t3) u2 (pr3_iso_appls_cast c u t3 (TCons t1 t2) u2 H11 -H12) t Appl))))))))) H7))))) H3)))))))))) t0))) vs)). +H12) t Appl))))))))) H7)))))) H3))))))))))) t0))) vs)). theorem sn3_lift: \forall (d: C).(\forall (t: T).((sn3 d t) \to (\forall (c: C).(\forall (h: diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/dec.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/dec.ma index 9c8d7b237..8f59bf3ee 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/dec.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/dec.ma @@ -24,109 +24,25 @@ theorem dnf_dec: \forall (w: T).(\forall (t: T).(\forall (d: nat).(ex T (\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t (lift (S O) d v))))))) \def - \lambda (w: T).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(ex -T (\lambda (v: T).(or (subst0 d w t0 (lift (S O) d v)) (eq T t0 (lift (S O) d -v))))))) (\lambda (n: nat).(\lambda (d: nat).(ex_intro T (\lambda (v: T).(or -(subst0 d w (TSort n) (lift (S O) d v)) (eq T (TSort n) (lift (S O) d v)))) -(TSort n) (eq_ind_r T (TSort n) (\lambda (t0: T).(or (subst0 d w (TSort n) -t0) (eq T (TSort n) t0))) (or_intror (subst0 d w (TSort n) (TSort n)) (eq T -(TSort n) (TSort n)) (refl_equal T (TSort n))) (lift (S O) d (TSort n)) -(lift_sort n (S O) d))))) (\lambda (n: nat).(\lambda (d: nat).(lt_eq_gt_e n d -(ex T (\lambda (v: T).(or (subst0 d w (TLRef n) (lift (S O) d v)) (eq T -(TLRef n) (lift (S O) d v))))) (\lambda (H: (lt n d)).(ex_intro T (\lambda -(v: T).(or (subst0 d w (TLRef n) (lift (S O) d v)) (eq T (TLRef n) (lift (S -O) d v)))) (TLRef n) (eq_ind_r T (TLRef n) (\lambda (t0: T).(or (subst0 d w -(TLRef n) t0) (eq T (TLRef n) t0))) (or_intror (subst0 d w (TLRef n) (TLRef -n)) (eq T (TLRef n) (TLRef n)) (refl_equal T (TLRef n))) (lift (S O) d (TLRef -n)) (lift_lref_lt n (S O) d H)))) (\lambda (H: (eq nat n d)).(eq_ind nat n -(\lambda (n0: nat).(ex T (\lambda (v: T).(or (subst0 n0 w (TLRef n) (lift (S -O) n0 v)) (eq T (TLRef n) (lift (S O) n0 v)))))) (ex_intro T (\lambda (v: -T).(or (subst0 n w (TLRef n) (lift (S O) n v)) (eq T (TLRef n) (lift (S O) n -v)))) (lift n O w) (eq_ind_r T (lift (plus (S O) n) O w) (\lambda (t0: T).(or -(subst0 n w (TLRef n) t0) (eq T (TLRef n) t0))) (or_introl (subst0 n w (TLRef -n) (lift (S n) O w)) (eq T (TLRef n) (lift (S n) O w)) (subst0_lref w n)) -(lift (S O) n (lift n O w)) (lift_free w n (S O) O n (le_n (plus O n)) -(le_O_n n)))) d H)) (\lambda (H: (lt d n)).(ex_intro T (\lambda (v: T).(or -(subst0 d w (TLRef n) (lift (S O) d v)) (eq T (TLRef n) (lift (S O) d v)))) -(TLRef (pred n)) (eq_ind_r T (TLRef n) (\lambda (t0: T).(or (subst0 d w -(TLRef n) t0) (eq T (TLRef n) t0))) (or_intror (subst0 d w (TLRef n) (TLRef -n)) (eq T (TLRef n) (TLRef n)) (refl_equal T (TLRef n))) (lift (S O) d (TLRef -(pred n))) (lift_lref_gt d n H))))))) (\lambda (k: K).(\lambda (t0: -T).(\lambda (H: ((\forall (d: nat).(ex T (\lambda (v: T).(or (subst0 d w t0 -(lift (S O) d v)) (eq T t0 (lift (S O) d v)))))))).(\lambda (t1: T).(\lambda -(H0: ((\forall (d: nat).(ex T (\lambda (v: T).(or (subst0 d w t1 (lift (S O) -d v)) (eq T t1 (lift (S O) d v)))))))).(\lambda (d: nat).(let H_x \def (H d) -in (let H1 \def H_x in (ex_ind T (\lambda (v: T).(or (subst0 d w t0 (lift (S -O) d v)) (eq T t0 (lift (S O) d v)))) (ex T (\lambda (v: T).(or (subst0 d w -(THead k t0 t1) (lift (S O) d v)) (eq T (THead k t0 t1) (lift (S O) d v))))) -(\lambda (x: T).(\lambda (H2: (or (subst0 d w t0 (lift (S O) d x)) (eq T t0 -(lift (S O) d x)))).(or_ind (subst0 d w t0 (lift (S O) d x)) (eq T t0 (lift -(S O) d x)) (ex T (\lambda (v: T).(or (subst0 d w (THead k t0 t1) (lift (S O) -d v)) (eq T (THead k t0 t1) (lift (S O) d v))))) (\lambda (H3: (subst0 d w t0 -(lift (S O) d x))).(let H_x0 \def (H0 (s k d)) in (let H4 \def H_x0 in -(ex_ind T (\lambda (v: T).(or (subst0 (s k d) w t1 (lift (S O) (s k d) v)) -(eq T t1 (lift (S O) (s k d) v)))) (ex T (\lambda (v: T).(or (subst0 d w -(THead k t0 t1) (lift (S O) d v)) (eq T (THead k t0 t1) (lift (S O) d v))))) -(\lambda (x0: T).(\lambda (H5: (or (subst0 (s k d) w t1 (lift (S O) (s k d) -x0)) (eq T t1 (lift (S O) (s k d) x0)))).(or_ind (subst0 (s k d) w t1 (lift -(S O) (s k d) x0)) (eq T t1 (lift (S O) (s k d) x0)) (ex T (\lambda (v: -T).(or (subst0 d w (THead k t0 t1) (lift (S O) d v)) (eq T (THead k t0 t1) -(lift (S O) d v))))) (\lambda (H6: (subst0 (s k d) w t1 (lift (S O) (s k d) -x0))).(ex_intro T (\lambda (v: T).(or (subst0 d w (THead k t0 t1) (lift (S O) -d v)) (eq T (THead k t0 t1) (lift (S O) d v)))) (THead k x x0) (eq_ind_r T -(THead k (lift (S O) d x) (lift (S O) (s k d) x0)) (\lambda (t2: T).(or -(subst0 d w (THead k t0 t1) t2) (eq T (THead k t0 t1) t2))) (or_introl -(subst0 d w (THead k t0 t1) (THead k (lift (S O) d x) (lift (S O) (s k d) -x0))) (eq T (THead k t0 t1) (THead k (lift (S O) d x) (lift (S O) (s k d) -x0))) (subst0_both w t0 (lift (S O) d x) d H3 k t1 (lift (S O) (s k d) x0) -H6)) (lift (S O) d (THead k x x0)) (lift_head k x x0 (S O) d)))) (\lambda -(H6: (eq T t1 (lift (S O) (s k d) x0))).(eq_ind_r T (lift (S O) (s k d) x0) -(\lambda (t2: T).(ex T (\lambda (v: T).(or (subst0 d w (THead k t0 t2) (lift -(S O) d v)) (eq T (THead k t0 t2) (lift (S O) d v)))))) (ex_intro T (\lambda -(v: T).(or (subst0 d w (THead k t0 (lift (S O) (s k d) x0)) (lift (S O) d v)) -(eq T (THead k t0 (lift (S O) (s k d) x0)) (lift (S O) d v)))) (THead k x x0) -(eq_ind_r T (THead k (lift (S O) d x) (lift (S O) (s k d) x0)) (\lambda (t2: -T).(or (subst0 d w (THead k t0 (lift (S O) (s k d) x0)) t2) (eq T (THead k t0 -(lift (S O) (s k d) x0)) t2))) (or_introl (subst0 d w (THead k t0 (lift (S O) -(s k d) x0)) (THead k (lift (S O) d x) (lift (S O) (s k d) x0))) (eq T (THead -k t0 (lift (S O) (s k d) x0)) (THead k (lift (S O) d x) (lift (S O) (s k d) -x0))) (subst0_fst w (lift (S O) d x) t0 d H3 (lift (S O) (s k d) x0) k)) -(lift (S O) d (THead k x x0)) (lift_head k x x0 (S O) d))) t1 H6)) H5))) -H4)))) (\lambda (H3: (eq T t0 (lift (S O) d x))).(let H_x0 \def (H0 (s k d)) -in (let H4 \def H_x0 in (ex_ind T (\lambda (v: T).(or (subst0 (s k d) w t1 -(lift (S O) (s k d) v)) (eq T t1 (lift (S O) (s k d) v)))) (ex T (\lambda (v: -T).(or (subst0 d w (THead k t0 t1) (lift (S O) d v)) (eq T (THead k t0 t1) -(lift (S O) d v))))) (\lambda (x0: T).(\lambda (H5: (or (subst0 (s k d) w t1 -(lift (S O) (s k d) x0)) (eq T t1 (lift (S O) (s k d) x0)))).(or_ind (subst0 -(s k d) w t1 (lift (S O) (s k d) x0)) (eq T t1 (lift (S O) (s k d) x0)) (ex T -(\lambda (v: T).(or (subst0 d w (THead k t0 t1) (lift (S O) d v)) (eq T -(THead k t0 t1) (lift (S O) d v))))) (\lambda (H6: (subst0 (s k d) w t1 (lift -(S O) (s k d) x0))).(eq_ind_r T (lift (S O) d x) (\lambda (t2: T).(ex T -(\lambda (v: T).(or (subst0 d w (THead k t2 t1) (lift (S O) d v)) (eq T -(THead k t2 t1) (lift (S O) d v)))))) (ex_intro T (\lambda (v: T).(or (subst0 -d w (THead k (lift (S O) d x) t1) (lift (S O) d v)) (eq T (THead k (lift (S -O) d x) t1) (lift (S O) d v)))) (THead k x x0) (eq_ind_r T (THead k (lift (S -O) d x) (lift (S O) (s k d) x0)) (\lambda (t2: T).(or (subst0 d w (THead k -(lift (S O) d x) t1) t2) (eq T (THead k (lift (S O) d x) t1) t2))) (or_introl -(subst0 d w (THead k (lift (S O) d x) t1) (THead k (lift (S O) d x) (lift (S -O) (s k d) x0))) (eq T (THead k (lift (S O) d x) t1) (THead k (lift (S O) d -x) (lift (S O) (s k d) x0))) (subst0_snd k w (lift (S O) (s k d) x0) t1 d H6 -(lift (S O) d x))) (lift (S O) d (THead k x x0)) (lift_head k x x0 (S O) d))) -t0 H3)) (\lambda (H6: (eq T t1 (lift (S O) (s k d) x0))).(eq_ind_r T (lift (S -O) (s k d) x0) (\lambda (t2: T).(ex T (\lambda (v: T).(or (subst0 d w (THead -k t0 t2) (lift (S O) d v)) (eq T (THead k t0 t2) (lift (S O) d v)))))) -(eq_ind_r T (lift (S O) d x) (\lambda (t2: T).(ex T (\lambda (v: T).(or -(subst0 d w (THead k t2 (lift (S O) (s k d) x0)) (lift (S O) d v)) (eq T -(THead k t2 (lift (S O) (s k d) x0)) (lift (S O) d v)))))) (ex_intro T -(\lambda (v: T).(or (subst0 d w (THead k (lift (S O) d x) (lift (S O) (s k d) -x0)) (lift (S O) d v)) (eq T (THead k (lift (S O) d x) (lift (S O) (s k d) -x0)) (lift (S O) d v)))) (THead k x x0) (eq_ind_r T (THead k (lift (S O) d x) -(lift (S O) (s k d) x0)) (\lambda (t2: T).(or (subst0 d w (THead k (lift (S -O) d x) (lift (S O) (s k d) x0)) t2) (eq T (THead k (lift (S O) d x) (lift (S -O) (s k d) x0)) t2))) (or_intror (subst0 d w (THead k (lift (S O) d x) (lift -(S O) (s k d) x0)) (THead k (lift (S O) d x) (lift (S O) (s k d) x0))) (eq T -(THead k (lift (S O) d x) (lift (S O) (s k d) x0)) (THead k (lift (S O) d x) -(lift (S O) (s k d) x0))) (refl_equal T (THead k (lift (S O) d x) (lift (S O) -(s k d) x0)))) (lift (S O) d (THead k x x0)) (lift_head k x x0 (S O) d))) t0 -H3) t1 H6)) H5))) H4)))) H2))) H1))))))))) t)). + \lambda (w: T).(\lambda (t: T).(\lambda (d: nat).(let H_x \def (dnf_dec2 t +d) in (let H \def H_x in (or_ind (\forall (w0: T).(ex T (\lambda (v: +T).(subst0 d w0 t (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t (lift (S +O) d v)))) (ex T (\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t +(lift (S O) d v))))) (\lambda (H0: ((\forall (w0: T).(ex T (\lambda (v: +T).(subst0 d w0 t (lift (S O) d v))))))).(let H_x0 \def (H0 w) in (let H1 +\def H_x0 in (ex_ind T (\lambda (v: T).(subst0 d w t (lift (S O) d v))) (ex T +(\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t (lift (S O) d +v))))) (\lambda (x: T).(\lambda (H2: (subst0 d w t (lift (S O) d +x))).(ex_intro T (\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t +(lift (S O) d v)))) x (or_introl (subst0 d w t (lift (S O) d x)) (eq T t +(lift (S O) d x)) H2)))) H1)))) (\lambda (H0: (ex T (\lambda (v: T).(eq T t +(lift (S O) d v))))).(ex_ind T (\lambda (v: T).(eq T t (lift (S O) d v))) (ex +T (\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t (lift (S O) d +v))))) (\lambda (x: T).(\lambda (H1: (eq T t (lift (S O) d x))).(eq_ind_r T +(lift (S O) d x) (\lambda (t0: T).(ex T (\lambda (v: T).(or (subst0 d w t0 +(lift (S O) d v)) (eq T t0 (lift (S O) d v)))))) (ex_intro T (\lambda (v: +T).(or (subst0 d w (lift (S O) d x) (lift (S O) d v)) (eq T (lift (S O) d x) +(lift (S O) d v)))) x (or_intror (subst0 d w (lift (S O) d x) (lift (S O) d +x)) (eq T (lift (S O) d x) (lift (S O) d x)) (refl_equal T (lift (S O) d +x)))) t H1))) H0)) H))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/fwd.ma index b592b261e..bb669667e 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/fwd.ma @@ -97,14 +97,14 @@ v)).(eq_ind T v (\lambda (t: T).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O t) x) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))) (\lambda (H5: (eq T (TLRef i) (TLRef n))).(let H6 \def (f_equal T nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | -(TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) -H5) in (eq_ind nat n (\lambda (n0: nat).((eq T (lift (S n0) O v) x) \to (land -(eq nat n n0) (eq T x (lift (S n) O v))))) (\lambda (H7: (eq T (lift (S n) O -v) x)).(eq_ind T (lift (S n) O v) (\lambda (t: T).(land (eq nat n n) (eq T t -(lift (S n) O v)))) (conj (eq nat n n) (eq T (lift (S n) O v) (lift (S n) O -v)) (refl_equal nat n) (refl_equal T (lift (S n) O v))) x H7)) i (sym_eq nat -i n H6)))) v0 (sym_eq T v0 v H4))) i0 (sym_eq nat i0 i H0) H1 H2 H3))))) | -(subst0_fst v0 u2 u1 i0 H0 t k) \Rightarrow (\lambda (H1: (eq nat i0 +(TLRef n0) \Rightarrow n0 | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef +n) H5) in (eq_ind nat n (\lambda (n0: nat).((eq T (lift (S n0) O v) x) \to +(land (eq nat n n0) (eq T x (lift (S n) O v))))) (\lambda (H7: (eq T (lift (S +n) O v) x)).(eq_ind T (lift (S n) O v) (\lambda (t: T).(land (eq nat n n) (eq +T t (lift (S n) O v)))) (conj (eq nat n n) (eq T (lift (S n) O v) (lift (S n) +O v)) (refl_equal nat n) (refl_equal T (lift (S n) O v))) x H7)) i (sym_eq +nat i n H6)))) v0 (sym_eq T v0 v H4))) i0 (sym_eq nat i0 i H0) H1 H2 H3))))) +| (subst0_fst v0 u2 u1 i0 H0 t k) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u1 t) (TLRef n))).(\lambda (H4: (eq T (THead k u2 t) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t) (TLRef n)) \to ((eq T (THead k u2 @@ -214,13 +214,13 @@ t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))))) (\lambda (H6: (eq T (THead k0 u0 t) (THead k u1 t1))).(let H7 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | -(TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead k0 u0 t) +(TLRef _) \Rightarrow t | (THead _ _ t0) \Rightarrow t0])) (THead k0 u0 t) (THead k u1 t1) H6) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) -\Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k0 u0 t) (THead k u1 +\Rightarrow u0 | (THead _ t0 _) \Rightarrow t0])) (THead k0 u0 t) (THead k u1 t1) H6) in ((let H9 \def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 -| (THead k _ _) \Rightarrow k])) (THead k0 u0 t) (THead k u1 t1) H6) in +| (THead k1 _ _) \Rightarrow k1])) (THead k0 u0 t) (THead k u1 t1) H6) in (eq_ind K k (\lambda (k1: K).((eq T u0 u1) \to ((eq T t t1) \to ((eq T (THead k1 u2 t) x) \to ((subst0 i v u0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: @@ -282,8 +282,8 @@ with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead k0 u t0) (THead k u1 t1) H6) in ((let H9 \def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with -[(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) -\Rightarrow k])) (THead k0 u t0) (THead k u1 t1) H6) in (eq_ind K k (\lambda +[(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k1 _ _) +\Rightarrow k1])) (THead k0 u t0) (THead k u1 t1) H6) in (eq_ind K k (\lambda (k1: K).((eq T u u1) \to ((eq T t0 t1) \to ((eq T (THead k1 u t2) x) \to ((subst0 (s k1 i) v t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T @@ -347,7 +347,7 @@ T return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k0 u0 t0) (THead k u1 t1) H7) in ((let H10 \def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 -| (THead k _ _) \Rightarrow k])) (THead k0 u0 t0) (THead k u1 t1) H7) in +| (THead k1 _ _) \Rightarrow k1])) (THead k0 u0 t0) (THead k u1 t1) H7) in (eq_ind K k (\lambda (k1: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k1 u2 t2) x) \to ((subst0 i v u0 u2) \to ((subst0 (s k1 i) v t0 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: @@ -450,7 +450,7 @@ h d u) (lift h (S (plus i d)) t0) x) \to (ex2 T (\lambda (t2: T).(eq T x t2)))))))))).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (subst0 i (lift h d u) (lift h (S (plus i d)) (THead k t t0)) x)).(let H2 \def (eq_ind T (lift h (S (plus i d)) (THead k t t0)) -(\lambda (t: T).(subst0 i (lift h d u) t x)) H1 (THead k (lift h (S (plus i +(\lambda (t2: T).(subst0 i (lift h d u) t2 x)) H1 (THead k (lift h (S (plus i d)) t) (lift h (s k (S (plus i d))) t0)) (lift_head k t t0 h (S (plus i d)))) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k (S (plus i d))) t0)))) (\lambda (u2: T).(subst0 i (lift h d u) (lift h (S (plus i d)) @@ -586,37 +586,38 @@ Prop).P)))))))))) (\lambda (n: nat).(\lambda (u: T).(\lambda (x: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (i: nat).(\lambda (_: (le d i)).(\lambda (_: (lt i (plus d h))).(\lambda (H1: (subst0 i u (lift h d (TSort n)) x)).(\lambda (P: Prop).(let H2 \def (eq_ind T (lift h d (TSort n)) (\lambda -(t: T).(subst0 i u t x)) H1 (TSort n) (lift_sort n h d)) in (subst0_gen_sort -u x i n H2 P)))))))))))) (\lambda (n: nat).(\lambda (u: T).(\lambda (x: -T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (i: nat).(\lambda (H: (le d -i)).(\lambda (H0: (lt i (plus d h))).(\lambda (H1: (subst0 i u (lift h d -(TLRef n)) x)).(\lambda (P: Prop).(lt_le_e n d P (\lambda (H2: (lt n d)).(let -H3 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t: T).(subst0 i u t x)) H1 -(TLRef n) (lift_lref_lt n h d H2)) in (and_ind (eq nat n i) (eq T x (lift (S -n) O u)) P (\lambda (H4: (eq nat n i)).(\lambda (_: (eq T x (lift (S n) O -u))).(let H6 \def (eq_ind nat n (\lambda (n: nat).(lt n d)) H2 i H4) in -(le_false d i P H H6)))) (subst0_gen_lref u x i n H3)))) (\lambda (H2: (le d -n)).(let H3 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t: T).(subst0 i u t -x)) H1 (TLRef (plus n h)) (lift_lref_ge n h d H2)) in (and_ind (eq nat (plus -n h) i) (eq T x (lift (S (plus n h)) O u)) P (\lambda (H4: (eq nat (plus n h) -i)).(\lambda (_: (eq T x (lift (S (plus n h)) O u))).(let H6 \def (eq_ind_r -nat i (\lambda (n: nat).(lt n (plus d h))) H0 (plus n h) H4) in (le_false d n -P H2 (lt_le_S n d (simpl_lt_plus_r h n d H6)))))) (subst0_gen_lref u x i -(plus n h) H3))))))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (H: -((\forall (u: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).(\forall -(i: nat).((le d i) \to ((lt i (plus d h)) \to ((subst0 i u (lift h d t0) x) -\to (\forall (P: Prop).P))))))))))).(\lambda (t1: T).(\lambda (H0: ((\forall -(u: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).(\forall (i: -nat).((le d i) \to ((lt i (plus d h)) \to ((subst0 i u (lift h d t1) x) \to -(\forall (P: Prop).P))))))))))).(\lambda (u: T).(\lambda (x: T).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (i: nat).(\lambda (H1: (le d i)).(\lambda -(H2: (lt i (plus d h))).(\lambda (H3: (subst0 i u (lift h d (THead k t0 t1)) -x)).(\lambda (P: Prop).(let H4 \def (eq_ind T (lift h d (THead k t0 t1)) -(\lambda (t: T).(subst0 i u t x)) H3 (THead k (lift h d t0) (lift h (s k d) -t1)) (lift_head k t0 t1 h d)) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x -(THead k u2 (lift h (s k d) t1)))) (\lambda (u2: T).(subst0 i u (lift h d t0) -u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t0) t2))) (\lambda -(t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2))) (ex3_2 T T (\lambda (u2: +(t0: T).(subst0 i u t0 x)) H1 (TSort n) (lift_sort n h d)) in +(subst0_gen_sort u x i n H2 P)))))))))))) (\lambda (n: nat).(\lambda (u: +T).(\lambda (x: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (i: +nat).(\lambda (H: (le d i)).(\lambda (H0: (lt i (plus d h))).(\lambda (H1: +(subst0 i u (lift h d (TLRef n)) x)).(\lambda (P: Prop).(lt_le_e n d P +(\lambda (H2: (lt n d)).(let H3 \def (eq_ind T (lift h d (TLRef n)) (\lambda +(t0: T).(subst0 i u t0 x)) H1 (TLRef n) (lift_lref_lt n h d H2)) in (and_ind +(eq nat n i) (eq T x (lift (S n) O u)) P (\lambda (H4: (eq nat n i)).(\lambda +(_: (eq T x (lift (S n) O u))).(let H6 \def (eq_ind nat n (\lambda (n0: +nat).(lt n0 d)) H2 i H4) in (le_false d i P H H6)))) (subst0_gen_lref u x i n +H3)))) (\lambda (H2: (le d n)).(let H3 \def (eq_ind T (lift h d (TLRef n)) +(\lambda (t0: T).(subst0 i u t0 x)) H1 (TLRef (plus n h)) (lift_lref_ge n h d +H2)) in (and_ind (eq nat (plus n h) i) (eq T x (lift (S (plus n h)) O u)) P +(\lambda (H4: (eq nat (plus n h) i)).(\lambda (_: (eq T x (lift (S (plus n +h)) O u))).(let H6 \def (eq_ind_r nat i (\lambda (n0: nat).(lt n0 (plus d +h))) H0 (plus n h) H4) in (le_false d n P H2 (lt_le_S n d (simpl_lt_plus_r h +n d H6)))))) (subst0_gen_lref u x i (plus n h) H3))))))))))))))) (\lambda (k: +K).(\lambda (t0: T).(\lambda (H: ((\forall (u: T).(\forall (x: T).(\forall +(h: nat).(\forall (d: nat).(\forall (i: nat).((le d i) \to ((lt i (plus d h)) +\to ((subst0 i u (lift h d t0) x) \to (\forall (P: +Prop).P))))))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (u: T).(\forall +(x: T).(\forall (h: nat).(\forall (d: nat).(\forall (i: nat).((le d i) \to +((lt i (plus d h)) \to ((subst0 i u (lift h d t1) x) \to (\forall (P: +Prop).P))))))))))).(\lambda (u: T).(\lambda (x: T).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (i: nat).(\lambda (H1: (le d i)).(\lambda (H2: (lt i (plus +d h))).(\lambda (H3: (subst0 i u (lift h d (THead k t0 t1)) x)).(\lambda (P: +Prop).(let H4 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t2: +T).(subst0 i u t2 x)) H3 (THead k (lift h d t0) (lift h (s k d) t1)) +(lift_head k t0 t1 h d)) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead k +u2 (lift h (s k d) t1)))) (\lambda (u2: T).(subst0 i u (lift h d t0) u2))) +(ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t0) t2))) (\lambda (t2: +T).(subst0 (s k i) u (lift h (s k d) t1) t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u (lift h d t0) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2)))) P (\lambda (H5: (ex2 T (\lambda (u2: @@ -668,9 +669,9 @@ n) t2))) (\lambda (H1: (lt n d)).(let H2 \def (eq_ind T (lift h d (TLRef n)) (and_ind (eq nat n i) (eq T x (lift (S n) O u)) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (TLRef n) t2))) (\lambda (H3: (eq nat n i)).(\lambda (_: (eq T x (lift (S n) O u))).(let H5 -\def (eq_ind nat n (\lambda (n: nat).(lt n d)) H1 i H3) in (le_false (plus d -h) i (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 -(minus i h) u (TLRef n) t2))) H0 (le_plus_trans (S i) d h H5))))) +\def (eq_ind nat n (\lambda (n0: nat).(lt n0 d)) H1 i H3) in (le_false (plus +d h) i (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: +T).(subst0 (minus i h) u (TLRef n) t2))) H0 (le_plus_trans (S i) d h H5))))) (subst0_gen_lref u x i n H2)))) (\lambda (H1: (le d n)).(let H2 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t: T).(subst0 i u t x)) H (TLRef (plus n h)) (lift_lref_ge n h d H1)) in (and_ind (eq nat (plus n h) i) (eq T x (lift (S @@ -703,8 +704,8 @@ nat).(\forall (h: nat).(\forall (d: nat).((subst0 i u (lift h d t0) x) \to (\lambda (t2: T).(subst0 (minus i h) u t0 t2))))))))))).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (subst0 i u (lift h d (THead k t t0)) x)).(\lambda (H2: (le (plus d h) -i)).(let H3 \def (eq_ind T (lift h d (THead k t t0)) (\lambda (t: T).(subst0 -i u t x)) H1 (THead k (lift h d t) (lift h (s k d) t0)) (lift_head k t t0 h +i)).(let H3 \def (eq_ind T (lift h d (THead k t t0)) (\lambda (t2: T).(subst0 +i u t2 x)) H1 (THead k (lift h d t) (lift h (s k d) t0)) (lift_head k t t0 h d)) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k d) t0)))) (\lambda (u2: T).(subst0 i u (lift h d t) u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t) t2))) (\lambda (t2: T).(subst0 (s k i) u diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/props.ma index 614d3ab35..8d4033901 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/props.ma @@ -48,36 +48,36 @@ u2)))).(ex2_ind T (\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) (\lambda (u2: T).(subst0 d u t0 u2)) P (\lambda (x: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k x t1))).(\lambda (H4: (subst0 d u t0 x)).(let H5 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) -with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ t _) -\Rightarrow t])) (THead k t0 t1) (THead k x t1) H3) in (let H6 \def (eq_ind_r -T x (\lambda (t: T).(subst0 d u t0 t)) H4 t0 H5) in (H d H6 P)))))) H2)) -(\lambda (H2: (ex2 T (\lambda (t2: T).(eq T (THead k t0 t1) (THead k t0 t2))) -(\lambda (t2: T).(subst0 (s k d) u t1 t2)))).(ex2_ind T (\lambda (t2: T).(eq -T (THead k t0 t1) (THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 -t2)) P (\lambda (x: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k t0 -x))).(\lambda (H4: (subst0 (s k d) u t1 x)).(let H5 \def (f_equal T T -(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) -(THead k t0 t1) (THead k t0 x) H3) in (let H6 \def (eq_ind_r T x (\lambda (t: -T).(subst0 (s k d) u t1 t)) H4 t1 H5) in (H0 (s k d) H6 P)))))) H2)) (\lambda -(H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) -(THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) -(\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 t2))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s k d) u t1 t2))) P (\lambda (x0: T).(\lambda -(x1: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k x0 x1))).(\lambda (H4: -(subst0 d u t0 x0)).(\lambda (H5: (subst0 (s k d) u t1 x1)).(let H6 \def +with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ t2 _) +\Rightarrow t2])) (THead k t0 t1) (THead k x t1) H3) in (let H6 \def +(eq_ind_r T x (\lambda (t2: T).(subst0 d u t0 t2)) H4 t0 H5) in (H d H6 +P)))))) H2)) (\lambda (H2: (ex2 T (\lambda (t2: T).(eq T (THead k t0 t1) +(THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2)))).(ex2_ind T +(\lambda (t2: T).(eq T (THead k t0 t1) (THead k t0 t2))) (\lambda (t2: +T).(subst0 (s k d) u t1 t2)) P (\lambda (x: T).(\lambda (H3: (eq T (THead k +t0 t1) (THead k t0 x))).(\lambda (H4: (subst0 (s k d) u t1 x)).(let H5 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ t _) -\Rightarrow t])) (THead k t0 t1) (THead k x0 x1) H3) in ((let H7 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) -\Rightarrow t])) (THead k t0 t1) (THead k x0 x1) H3) in (\lambda (H8: (eq T -t0 x0)).(let H9 \def (eq_ind_r T x1 (\lambda (t: T).(subst0 (s k d) u t1 t)) -H5 t1 H7) in (let H10 \def (eq_ind_r T x0 (\lambda (t: T).(subst0 d u t0 t)) -H4 t0 H8) in (H d H10 P))))) H6))))))) H2)) (subst0_gen_head k u t0 t1 (THead -k t0 t1) d H1)))))))))) t)). +[(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t2) +\Rightarrow t2])) (THead k t0 t1) (THead k t0 x) H3) in (let H6 \def +(eq_ind_r T x (\lambda (t2: T).(subst0 (s k d) u t1 t2)) H4 t1 H5) in (H0 (s +k d) H6 P)))))) H2)) (\lambda (H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +T).(eq T (THead k t0 t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 d u t0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 +t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 +t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) +(\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 t2))) P (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k x0 +x1))).(\lambda (H4: (subst0 d u t0 x0)).(\lambda (H5: (subst0 (s k d) u t1 +x1)).(let H6 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda +(_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead +_ t2 _) \Rightarrow t2])) (THead k t0 t1) (THead k x0 x1) H3) in ((let H7 +\def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) +with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t2) +\Rightarrow t2])) (THead k t0 t1) (THead k x0 x1) H3) in (\lambda (H8: (eq T +t0 x0)).(let H9 \def (eq_ind_r T x1 (\lambda (t2: T).(subst0 (s k d) u t1 +t2)) H5 t1 H7) in (let H10 \def (eq_ind_r T x0 (\lambda (t2: T).(subst0 d u +t0 t2)) H4 t0 H8) in (H d H10 P))))) H6))))))) H2)) (subst0_gen_head k u t0 +t1 (THead k t0 t1) d H1)))))))))) t)). theorem subst0_lift_lt: \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst0 @@ -114,40 +114,40 @@ T).(\lambda (i0: nat).(\lambda (_: (subst0 (s k i0) v t3 t0)).(\lambda (H1: ((\forall (d: nat).((lt (s k i0) d) \to (\forall (h: nat).(subst0 (s k i0) (lift h (minus d (S (s k i0))) v) (lift h d t3) (lift h d t0))))))).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H2: (lt i0 d)).(\lambda (h: nat).(let H3 -\def (eq_ind_r nat (S (s k i0)) (\lambda (n: nat).(\forall (d: nat).((lt (s k -i0) d) \to (\forall (h: nat).(subst0 (s k i0) (lift h (minus d n) v) (lift h -d t3) (lift h d t0)))))) H1 (s k (S i0)) (s_S k i0)) in (eq_ind_r T (THead k -(lift h d u0) (lift h (s k d) t3)) (\lambda (t: T).(subst0 i0 (lift h (minus -d (S i0)) v) t (lift h d (THead k u0 t0)))) (eq_ind_r T (THead k (lift h d -u0) (lift h (s k d) t0)) (\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) -v) (THead k (lift h d u0) (lift h (s k d) t3)) t)) (eq_ind nat (minus (s k d) -(s k (S i0))) (\lambda (n: nat).(subst0 i0 (lift h n v) (THead k (lift h d -u0) (lift h (s k d) t3)) (THead k (lift h d u0) (lift h (s k d) t0)))) -(subst0_snd k (lift h (minus (s k d) (s k (S i0))) v) (lift h (s k d) t0) -(lift h (s k d) t3) i0 (H3 (s k d) (s_lt k i0 d H2) h) (lift h d u0)) (minus -d (S i0)) (minus_s_s k d (S i0))) (lift h d (THead k u0 t0)) (lift_head k u0 -t0 h d)) (lift h d (THead k u0 t3)) (lift_head k u0 t3 h d)))))))))))))) -(\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda -(_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((lt i0 d) \to -(\forall (h: nat).(subst0 i0 (lift h (minus d (S i0)) v) (lift h d u1) (lift -h d u2))))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: -(subst0 (s k i0) v t0 t3)).(\lambda (H3: ((\forall (d: nat).((lt (s k i0) d) -\to (\forall (h: nat).(subst0 (s k i0) (lift h (minus d (S (s k i0))) v) -(lift h d t0) (lift h d t3))))))).(\lambda (d: nat).(\lambda (H4: (lt i0 -d)).(\lambda (h: nat).(let H5 \def (eq_ind_r nat (S (s k i0)) (\lambda (n: -nat).(\forall (d: nat).((lt (s k i0) d) \to (\forall (h: nat).(subst0 (s k -i0) (lift h (minus d n) v) (lift h d t0) (lift h d t3)))))) H3 (s k (S i0)) -(s_S k i0)) in (eq_ind_r T (THead k (lift h d u1) (lift h (s k d) t0)) -(\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) v) t (lift h d (THead k -u2 t3)))) (eq_ind_r T (THead k (lift h d u2) (lift h (s k d) t3)) (\lambda -(t: T).(subst0 i0 (lift h (minus d (S i0)) v) (THead k (lift h d u1) (lift h -(s k d) t0)) t)) (subst0_both (lift h (minus d (S i0)) v) (lift h d u1) (lift -h d u2) i0 (H1 d H4 h) k (lift h (s k d) t0) (lift h (s k d) t3) (eq_ind nat -(minus (s k d) (s k (S i0))) (\lambda (n: nat).(subst0 (s k i0) (lift h n v) -(lift h (s k d) t0) (lift h (s k d) t3))) (H5 (s k d) (lt_le_S (s k i0) (s k -d) (s_lt k i0 d H4)) h) (minus d (S i0)) (minus_s_s k d (S i0)))) (lift h d -(THead k u2 t3)) (lift_head k u2 t3 h d)) (lift h d (THead k u1 t0)) -(lift_head k u1 t0 h d))))))))))))))))) i u t1 t2 H))))). +\def (eq_ind_r nat (S (s k i0)) (\lambda (n: nat).(\forall (d0: nat).((lt (s +k i0) d0) \to (\forall (h0: nat).(subst0 (s k i0) (lift h0 (minus d0 n) v) +(lift h0 d0 t3) (lift h0 d0 t0)))))) H1 (s k (S i0)) (s_S k i0)) in (eq_ind_r +T (THead k (lift h d u0) (lift h (s k d) t3)) (\lambda (t: T).(subst0 i0 +(lift h (minus d (S i0)) v) t (lift h d (THead k u0 t0)))) (eq_ind_r T (THead +k (lift h d u0) (lift h (s k d) t0)) (\lambda (t: T).(subst0 i0 (lift h +(minus d (S i0)) v) (THead k (lift h d u0) (lift h (s k d) t3)) t)) (eq_ind +nat (minus (s k d) (s k (S i0))) (\lambda (n: nat).(subst0 i0 (lift h n v) +(THead k (lift h d u0) (lift h (s k d) t3)) (THead k (lift h d u0) (lift h (s +k d) t0)))) (subst0_snd k (lift h (minus (s k d) (s k (S i0))) v) (lift h (s +k d) t0) (lift h (s k d) t3) i0 (H3 (s k d) (s_lt k i0 d H2) h) (lift h d +u0)) (minus d (S i0)) (minus_s_s k d (S i0))) (lift h d (THead k u0 t0)) +(lift_head k u0 t0 h d)) (lift h d (THead k u0 t3)) (lift_head k u0 t3 h +d)))))))))))))) (\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda +(i0: nat).(\lambda (_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: +nat).((lt i0 d) \to (\forall (h: nat).(subst0 i0 (lift h (minus d (S i0)) v) +(lift h d u1) (lift h d u2))))))).(\lambda (k: K).(\lambda (t0: T).(\lambda +(t3: T).(\lambda (_: (subst0 (s k i0) v t0 t3)).(\lambda (H3: ((\forall (d: +nat).((lt (s k i0) d) \to (\forall (h: nat).(subst0 (s k i0) (lift h (minus d +(S (s k i0))) v) (lift h d t0) (lift h d t3))))))).(\lambda (d: nat).(\lambda +(H4: (lt i0 d)).(\lambda (h: nat).(let H5 \def (eq_ind_r nat (S (s k i0)) +(\lambda (n: nat).(\forall (d0: nat).((lt (s k i0) d0) \to (\forall (h0: +nat).(subst0 (s k i0) (lift h0 (minus d0 n) v) (lift h0 d0 t0) (lift h0 d0 +t3)))))) H3 (s k (S i0)) (s_S k i0)) in (eq_ind_r T (THead k (lift h d u1) +(lift h (s k d) t0)) (\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) v) t +(lift h d (THead k u2 t3)))) (eq_ind_r T (THead k (lift h d u2) (lift h (s k +d) t3)) (\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) v) (THead k (lift +h d u1) (lift h (s k d) t0)) t)) (subst0_both (lift h (minus d (S i0)) v) +(lift h d u1) (lift h d u2) i0 (H1 d H4 h) k (lift h (s k d) t0) (lift h (s k +d) t3) (eq_ind nat (minus (s k d) (s k (S i0))) (\lambda (n: nat).(subst0 (s +k i0) (lift h n v) (lift h (s k d) t0) (lift h (s k d) t3))) (H5 (s k d) +(lt_le_S (s k i0) (s k d) (s_lt k i0 d H4)) h) (minus d (S i0)) (minus_s_s k +d (S i0)))) (lift h d (THead k u2 t3)) (lift_head k u2 t3 h d)) (lift h d +(THead k u1 t0)) (lift_head k u1 t0 h d))))))))))))))))) i u t1 t2 H))))). theorem subst0_lift_ge: \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).(\forall @@ -181,12 +181,12 @@ t h d)) (lift h d (THead k u1 t)) (lift_head k u1 t h d)))))))))))) (\lambda nat).(\lambda (_: (subst0 (s k i0) v t3 t0)).(\lambda (H1: ((\forall (d: nat).((le d (s k i0)) \to (subst0 (plus (s k i0) h) v (lift h d t3) (lift h d t0)))))).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H2: (le d i0)).(let H3 -\def (eq_ind_r nat (plus (s k i0) h) (\lambda (n: nat).(\forall (d: nat).((le -d (s k i0)) \to (subst0 n v (lift h d t3) (lift h d t0))))) H1 (s k (plus i0 -h)) (s_plus k i0 h)) in (eq_ind_r T (THead k (lift h d u0) (lift h (s k d) -t3)) (\lambda (t: T).(subst0 (plus i0 h) v t (lift h d (THead k u0 t0)))) -(eq_ind_r T (THead k (lift h d u0) (lift h (s k d) t0)) (\lambda (t: -T).(subst0 (plus i0 h) v (THead k (lift h d u0) (lift h (s k d) t3)) t)) +\def (eq_ind_r nat (plus (s k i0) h) (\lambda (n: nat).(\forall (d0: +nat).((le d0 (s k i0)) \to (subst0 n v (lift h d0 t3) (lift h d0 t0))))) H1 +(s k (plus i0 h)) (s_plus k i0 h)) in (eq_ind_r T (THead k (lift h d u0) +(lift h (s k d) t3)) (\lambda (t: T).(subst0 (plus i0 h) v t (lift h d (THead +k u0 t0)))) (eq_ind_r T (THead k (lift h d u0) (lift h (s k d) t0)) (\lambda +(t: T).(subst0 (plus i0 h) v (THead k (lift h d u0) (lift h (s k d) t3)) t)) (subst0_snd k v (lift h (s k d) t0) (lift h (s k d) t3) (plus i0 h) (H3 (s k d) (s_le k d i0 H2)) (lift h d u0)) (lift h d (THead k u0 t0)) (lift_head k u0 t0 h d)) (lift h d (THead k u0 t3)) (lift_head k u0 t3 h d))))))))))))) @@ -197,15 +197,15 @@ K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (subst0 (s k i0) v t0 t3)).(\lambda (H3: ((\forall (d: nat).((le d (s k i0)) \to (subst0 (plus (s k i0) h) v (lift h d t0) (lift h d t3)))))).(\lambda (d: nat).(\lambda (H4: (le d i0)).(let H5 \def (eq_ind_r nat (plus (s k i0) h) (\lambda (n: -nat).(\forall (d: nat).((le d (s k i0)) \to (subst0 n v (lift h d t0) (lift h -d t3))))) H3 (s k (plus i0 h)) (s_plus k i0 h)) in (eq_ind_r T (THead k (lift -h d u1) (lift h (s k d) t0)) (\lambda (t: T).(subst0 (plus i0 h) v t (lift h -d (THead k u2 t3)))) (eq_ind_r T (THead k (lift h d u2) (lift h (s k d) t3)) -(\lambda (t: T).(subst0 (plus i0 h) v (THead k (lift h d u1) (lift h (s k d) -t0)) t)) (subst0_both v (lift h d u1) (lift h d u2) (plus i0 h) (H1 d H4) k -(lift h (s k d) t0) (lift h (s k d) t3) (H5 (s k d) (s_le k d i0 H4))) (lift -h d (THead k u2 t3)) (lift_head k u2 t3 h d)) (lift h d (THead k u1 t0)) -(lift_head k u1 t0 h d)))))))))))))))) i u t1 t2 H)))))). +nat).(\forall (d0: nat).((le d0 (s k i0)) \to (subst0 n v (lift h d0 t0) +(lift h d0 t3))))) H3 (s k (plus i0 h)) (s_plus k i0 h)) in (eq_ind_r T +(THead k (lift h d u1) (lift h (s k d) t0)) (\lambda (t: T).(subst0 (plus i0 +h) v t (lift h d (THead k u2 t3)))) (eq_ind_r T (THead k (lift h d u2) (lift +h (s k d) t3)) (\lambda (t: T).(subst0 (plus i0 h) v (THead k (lift h d u1) +(lift h (s k d) t0)) t)) (subst0_both v (lift h d u1) (lift h d u2) (plus i0 +h) (H1 d H4) k (lift h (s k d) t0) (lift h (s k d) t3) (H5 (s k d) (s_le k d +i0 H4))) (lift h d (THead k u2 t3)) (lift_head k u2 t3 h d)) (lift h d (THead +k u1 t0)) (lift_head k u1 t0 h d)))))))))))))))) i u t1 t2 H)))))). theorem subst0_lift_ge_S: \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst0 diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/tlt.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/tlt.ma index 901254e9e..0a0953123 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/tlt.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst0/tlt.ma @@ -144,35 +144,35 @@ g O) (\lambda (m: nat).(wadd_le f g H2 O O (le_n O) m)) (eq_ind nat (weight_map (wadd f O) (lift (S (S i)) O v)) (lift_weight_add_O O v (S i) f)))))))))))))))) b)) (\lambda (_: F).(\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v t1 -t2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -i) O v)) (g i)) \to (le (weight_map f t2) (weight_map g t1)))))))).(\lambda -(u0: T).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda -(H2: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda (H3: (lt (weight_map f0 -(lift (S i) O v)) (g i))).(lt_le_S (plus (weight_map f0 u0) (weight_map f0 -t2)) (S (plus (weight_map g u0) (weight_map g t1))) (le_lt_n_Sm (plus -(weight_map f0 u0) (weight_map f0 t2)) (plus (weight_map g u0) (weight_map g -t1)) (plus_le_compat (weight_map f0 u0) (weight_map g u0) (weight_map f0 t2) -(weight_map g t1) (weight_le u0 f0 g H2) (H1 f0 g H2 H3)))))))))))))))) k)) -(\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda -(_: (subst0 i v u1 u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall -(g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt -(weight_map f (lift (S i) O v)) (g i)) \to (le (weight_map f u2) (weight_map -g u1)))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t1: -T).(\forall (t2: T).((subst0 (s k0 i) v t1 t2) \to (((\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S (s k0 i)) O v)) (g (s k0 i))) \to (le -(weight_map f t2) (weight_map g t1))))))) \to (\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (le (weight_map f (THead -k0 u2 t2)) (weight_map g (THead k0 u1 t1)))))))))))) (\lambda (b: B).(B_ind -(\lambda (b0: B).(\forall (t1: T).(\forall (t2: T).((subst0 (s (Bind b0) i) v -t1 t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -(s (Bind b0) i)) O v)) (g (s (Bind b0) i))) \to (le (weight_map f t2) -(weight_map g t1))))))) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat +t2)).(\lambda (H1: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f0 m) (g m)))) \to ((lt (weight_map f0 (lift +(S i) O v)) (g i)) \to (le (weight_map f0 t2) (weight_map g +t1)))))))).(\lambda (u0: T).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat +\to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda +(H3: (lt (weight_map f0 (lift (S i) O v)) (g i))).(lt_le_S (plus (weight_map +f0 u0) (weight_map f0 t2)) (S (plus (weight_map g u0) (weight_map g t1))) +(le_lt_n_Sm (plus (weight_map f0 u0) (weight_map f0 t2)) (plus (weight_map g +u0) (weight_map g t1)) (plus_le_compat (weight_map f0 u0) (weight_map g u0) +(weight_map f0 t2) (weight_map g t1) (weight_le u0 f0 g H2) (H1 f0 g H2 +H3)))))))))))))))) k)) (\lambda (v: T).(\lambda (u1: T).(\lambda (u2: +T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 u2)).(\lambda (H1: ((\forall +(f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f +m) (g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (le +(weight_map f u2) (weight_map g u1)))))))).(\lambda (k: K).(K_ind (\lambda +(k0: K).(\forall (t1: T).(\forall (t2: T).((subst0 (s k0 i) v t1 t2) \to +(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: +nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (s k0 i)) O v)) (g (s +k0 i))) \to (le (weight_map f t2) (weight_map g t1))))))) \to (\forall (f: +((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) +(g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (le (weight_map +f (THead k0 u2 t2)) (weight_map g (THead k0 u1 t1)))))))))))) (\lambda (b: +B).(B_ind (\lambda (b0: B).(\forall (t1: T).(\forall (t2: T).((subst0 (s +(Bind b0) i) v t1 t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f -(lift (S i) O v)) (g i)) \to (le (weight_map f (THead (Bind b0) u2 t2)) +(lift (S (s (Bind b0) i)) O v)) (g (s (Bind b0) i))) \to (le (weight_map f +t2) (weight_map g t1))))))) \to (\forall (f: ((nat \to nat))).(\forall (g: +((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map +f (lift (S i) O v)) (g i)) \to (le (weight_map f (THead (Bind b0) u2 t2)) (weight_map g (THead (Bind b0) u1 t1)))))))))))) (\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) @@ -218,9 +218,9 @@ O (le_n O) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H5 (weight_map (wadd f O) (lift (S (S i)) O v)) (lift_weight_add_O O v (S i) f))))))))))))) b)) (\lambda (_: F).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 i v t1 t2)).(\lambda (H3: ((\forall -(f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f -m) (g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (le -(weight_map f t2) (weight_map g t1)))))))).(\lambda (f0: ((nat \to +(f0: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le +(f0 m) (g m)))) \to ((lt (weight_map f0 (lift (S i) O v)) (g i)) \to (le +(weight_map f0 t2) (weight_map g t1)))))))).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda (H5: (lt (weight_map f0 (lift (S i) O v)) (g i))).(lt_le_S (plus (weight_map f0 u2) (weight_map f0 t2)) (S (plus @@ -351,54 +351,69 @@ f O) t2) (weight_map (wadd g O) t1) (weight_le u0 f g H2) (H1 (wadd f O) (weight_map (wadd f O) (lift (S (S i)) O v)) (lift_weight_add_O O v (S i) f)))))))))))))))) b)) (\lambda (_: F).(\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v t1 -t2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -i) O v)) (g i)) \to (lt (weight_map f t2) (weight_map g t1)))))))).(\lambda -(u0: T).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda -(H2: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda (H3: (lt (weight_map f0 -(lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map f0 u0) (weight_map f0 -t2)) (plus (weight_map g u0) (weight_map g t1)) (plus_le_lt_compat -(weight_map f0 u0) (weight_map g u0) (weight_map f0 t2) (weight_map g t1) -(weight_le u0 f0 g H2) (H1 f0 g H2 H3))))))))))))))) k)) (\lambda (v: -T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda (_: (subst0 i -v u1 u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -i) O v)) (g i)) \to (lt (weight_map f u2) (weight_map g u1)))))))).(\lambda -(k: K).(K_ind (\lambda (k0: K).(\forall (t1: T).(\forall (t2: T).((subst0 (s -k0 i) v t1 t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -(s k0 i)) O v)) (g (s k0 i))) \to (lt (weight_map f t2) (weight_map g -t1))))))) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +t2)).(\lambda (H1: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f0 m) (g m)))) \to ((lt (weight_map f0 (lift +(S i) O v)) (g i)) \to (lt (weight_map f0 t2) (weight_map g +t1)))))))).(\lambda (u0: T).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat +\to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda +(H3: (lt (weight_map f0 (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map +f0 u0) (weight_map f0 t2)) (plus (weight_map g u0) (weight_map g t1)) +(plus_le_lt_compat (weight_map f0 u0) (weight_map g u0) (weight_map f0 t2) +(weight_map g t1) (weight_le u0 f0 g H2) (H1 f0 g H2 H3))))))))))))))) k)) +(\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda +(_: (subst0 i v u1 u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall +(g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt +(weight_map f (lift (S i) O v)) (g i)) \to (lt (weight_map f u2) (weight_map +g u1)))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t1: +T).(\forall (t2: T).((subst0 (s k0 i) v t1 t2) \to (((\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S (s k0 i)) O v)) (g (s k0 i))) \to (lt +(weight_map f t2) (weight_map g t1))))))) \to (\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (lt (weight_map f (THead +k0 u2 t2)) (weight_map g (THead k0 u1 t1)))))))))))) (\lambda (b: B).(B_ind +(\lambda (b0: B).(\forall (t1: T).(\forall (t2: T).((subst0 (s (Bind b0) i) v +t1 t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -i) O v)) (g i)) \to (lt (weight_map f (THead k0 u2 t2)) (weight_map g (THead -k0 u1 t1)))))))))))) (\lambda (b: B).(B_ind (\lambda (b0: B).(\forall (t1: -T).(\forall (t2: T).((subst0 (s (Bind b0) i) v t1 t2) \to (((\forall (f: -((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) -(g m)))) \to ((lt (weight_map f (lift (S (s (Bind b0) i)) O v)) (g (s (Bind -b0) i))) \to (lt (weight_map f t2) (weight_map g t1))))))) \to (\forall (f: +(s (Bind b0) i)) O v)) (g (s (Bind b0) i))) \to (lt (weight_map f t2) +(weight_map g t1))))))) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat +\to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f +(lift (S i) O v)) (g i)) \to (lt (weight_map f (THead (Bind b0) u2 t2)) +(weight_map g (THead (Bind b0) u1 t1)))))))))))) (\lambda (t1: T).(\lambda +(t2: T).(\lambda (H2: (subst0 (S i) v t1 t2)).(\lambda (_: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) -(g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (lt (weight_map -f (THead (Bind b0) u2 t2)) (weight_map g (THead (Bind b0) u1 t1)))))))))))) -(\lambda (t1: T).(\lambda (t2: T).(\lambda (H2: (subst0 (S i) v t1 -t2)).(\lambda (_: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -(S i)) O v)) (g (S i))) \to (lt (weight_map f t2) (weight_map g -t1)))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to +(g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt +(weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le (f +m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g +i))).(lt_n_S (plus (weight_map f u2) (weight_map (wadd f (S (weight_map f +u2))) t2)) (plus (weight_map g u1) (weight_map (wadd g (S (weight_map g u1))) +t1)) (plus_lt_le_compat (weight_map f u2) (weight_map g u1) (weight_map (wadd +f (S (weight_map f u2))) t2) (weight_map (wadd g (S (weight_map g u1))) t1) +(H1 f g H4 H5) (subst0_weight_le v t1 t2 (S i) H2 (wadd f (S (weight_map f +u2))) (wadd g (S (weight_map g u1))) (\lambda (m: nat).(wadd_le f g H4 (S +(weight_map f u2)) (S (weight_map g u1)) (le_S (S (weight_map f u2)) +(weight_map g u1) (lt_le_S (weight_map f u2) (weight_map g u1) (H1 f g H4 +H5))) m)) (lt_le_S (weight_map (wadd f (S (weight_map f u2))) (lift (S (S i)) +O v)) (wadd g (S (weight_map g u1)) (S i)) (eq_ind nat (weight_map f (lift (S +i) O v)) (\lambda (n: nat).(lt n (g i))) H5 (weight_map (wadd f (S +(weight_map f u2))) (lift (S (S i)) O v)) (lift_weight_add_O (S (weight_map f +u2)) v (S i) f)))))))))))))) (\lambda (t1: T).(\lambda (t2: T).(\lambda (_: +(subst0 (S i) v t1 t2)).(\lambda (H3: ((\forall (f: ((nat \to nat))).(\forall +(g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt +(weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt (weight_map f t2) +(weight_map g t1)))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map f u2) -(weight_map (wadd f (S (weight_map f u2))) t2)) (plus (weight_map g u1) -(weight_map (wadd g (S (weight_map g u1))) t1)) (plus_lt_le_compat -(weight_map f u2) (weight_map g u1) (weight_map (wadd f (S (weight_map f -u2))) t2) (weight_map (wadd g (S (weight_map g u1))) t1) (H1 f g H4 H5) -(subst0_weight_le v t1 t2 (S i) H2 (wadd f (S (weight_map f u2))) (wadd g (S -(weight_map g u1))) (\lambda (m: nat).(wadd_le f g H4 (S (weight_map f u2)) -(S (weight_map g u1)) (le_S (S (weight_map f u2)) (weight_map g u1) (lt_le_S -(weight_map f u2) (weight_map g u1) (H1 f g H4 H5))) m)) (lt_le_S (weight_map -(wadd f (S (weight_map f u2))) (lift (S (S i)) O v)) (wadd g (S (weight_map g -u1)) (S i)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: nat).(lt -n (g i))) H5 (weight_map (wadd f (S (weight_map f u2))) (lift (S (S i)) O v)) -(lift_weight_add_O (S (weight_map f u2)) v (S i) f)))))))))))))) (\lambda -(t1: T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: +(weight_map (wadd f O) t2)) (plus (weight_map g u1) (weight_map (wadd g O) +t1)) (plus_lt_compat (weight_map f u2) (weight_map g u1) (weight_map (wadd f +O) t2) (weight_map (wadd g O) t1) (H1 f g H4 H5) (H3 (wadd f O) (wadd g O) +(\lambda (m: nat).(le_S_n (wadd f O m) (wadd g O m) (le_n_S (wadd f O m) +(wadd g O m) (wadd_le f g H4 O O (le_n O) m)))) (lt_le_S (weight_map (wadd f +O) (lift (S (S i)) O v)) (wadd g O (S i)) (eq_ind nat (weight_map f (lift (S +i) O v)) (\lambda (n: nat).(lt n (g i))) H5 (weight_map (wadd f O) (lift (S +(S i)) O v)) (lift_weight_add_O O v (S i) f)))))))))))))) (\lambda (t1: +T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt (weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat @@ -412,31 +427,17 @@ m) (wadd g O m) (le_n_S (wadd f O m) (wadd g O m) (wadd_le f g H4 O O (le_n O) m)))) (lt_le_S (weight_map (wadd f O) (lift (S (S i)) O v)) (wadd g O (S i)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H5 (weight_map (wadd f O) (lift (S (S i)) O v)) (lift_weight_add_O O v -(S i) f)))))))))))))) (\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 -(S i) v t1 t2)).(\lambda (H3: ((\forall (f: ((nat \to nat))).(\forall (g: -((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map -f (lift (S (S i)) O v)) (g (S i))) \to (lt (weight_map f t2) (weight_map g -t1)))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to -nat))).(\lambda (H4: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H5: (lt -(weight_map f (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map f u2) -(weight_map (wadd f O) t2)) (plus (weight_map g u1) (weight_map (wadd g O) -t1)) (plus_lt_compat (weight_map f u2) (weight_map g u1) (weight_map (wadd f -O) t2) (weight_map (wadd g O) t1) (H1 f g H4 H5) (H3 (wadd f O) (wadd g O) -(\lambda (m: nat).(le_S_n (wadd f O m) (wadd g O m) (le_n_S (wadd f O m) -(wadd g O m) (wadd_le f g H4 O O (le_n O) m)))) (lt_le_S (weight_map (wadd f -O) (lift (S (S i)) O v)) (wadd g O (S i)) (eq_ind nat (weight_map f (lift (S -i) O v)) (\lambda (n: nat).(lt n (g i))) H5 (weight_map (wadd f O) (lift (S -(S i)) O v)) (lift_weight_add_O O v (S i) f)))))))))))))) b)) (\lambda (_: -F).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 i v t1 -t2)).(\lambda (H3: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -i) O v)) (g i)) \to (lt (weight_map f t2) (weight_map g t1)))))))).(\lambda -(f0: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall -(m: nat).(le (f0 m) (g m))))).(\lambda (H5: (lt (weight_map f0 (lift (S i) O -v)) (g i))).(lt_n_S (plus (weight_map f0 u2) (weight_map f0 t2)) (plus -(weight_map g u1) (weight_map g t1)) (plus_lt_compat (weight_map f0 u2) -(weight_map g u1) (weight_map f0 t2) (weight_map g t1) (H1 f0 g H4 H5) (H3 f0 -g H4 H5)))))))))))) k)))))))) d u t z H))))). +(S i) f)))))))))))))) b)) (\lambda (_: F).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (_: (subst0 i v t1 t2)).(\lambda (H3: ((\forall (f0: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f0 m) (g m)))) +\to ((lt (weight_map f0 (lift (S i) O v)) (g i)) \to (lt (weight_map f0 t2) +(weight_map g t1)))))))).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat +\to nat))).(\lambda (H4: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda +(H5: (lt (weight_map f0 (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map +f0 u2) (weight_map f0 t2)) (plus (weight_map g u1) (weight_map g t1)) +(plus_lt_compat (weight_map f0 u2) (weight_map g u1) (weight_map f0 t2) +(weight_map g t1) (H1 f0 g H4 H5) (H3 f0 g H4 H5)))))))))))) k)))))))) d u t +z H))))). theorem subst0_tlt_head: \forall (u: T).(\forall (t: T).(\forall (z: T).((subst0 O u t z) \to (tlt diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/fwd.ma index 83e7363fa..a861ca4ae 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/fwd.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/fwd.ma @@ -82,8 +82,8 @@ x0)).(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst1 (s k i) v t1 t3))) x0 t1 H2 (subst1_single i v u1 x0 H3) (subst1_refl (s k i) v t1))))) H1)) (\lambda (H1: (ex2 T (\lambda (t3: -T).(eq T t2 (THead k u1 t3))) (\lambda (t2: T).(subst0 (s k i) v t1 -t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: +T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 +t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3)) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst1 (s k i) v t1 t3)))) (\lambda (x0: @@ -93,8 +93,8 @@ u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst1 (s k i) v t1 t3))) u1 x0 H2 (subst1_refl i v u1) (subst1_single (s k i) v t1 x0 H3))))) H1)) (\lambda (H1: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: -T).(subst0 (s k i) v t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: +T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s k i) v t1 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/props.ma index bae0524e6..5cf65f2f3 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/props.ma @@ -36,8 +36,8 @@ c0 (TSort n) t)) (tau0_sort g c0 n) (lift h d (TSort (next g n))) (lift_sort (next g n) h d)) (lift h d (TSort n)) (lift_sort n h d)))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (H1: (tau0 g d v -w)).(\lambda (H2: ((\forall (c: C).(\forall (h: nat).(\forall (d0: -nat).((drop h d0 c d) \to (tau0 g c (lift h d0 v) (lift h d0 +w)).(\lambda (H2: ((\forall (c0: C).(\forall (h: nat).(\forall (d0: +nat).((drop h d0 c0 d) \to (tau0 g c0 (lift h d0 v) (lift h d0 w)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d0: nat).(\lambda (H3: (drop h d0 c0 c)).(lt_le_e i d0 (tau0 g c0 (lift h d0 (TLRef i)) (lift h d0 (lift (S i) O w))) (\lambda (H4: (lt i d0)).(let H5 \def (drop_getl_trans_le @@ -79,9 +79,9 @@ i) (\lambda (n: nat).(eq nat (S i) n)) (refl_equal nat (plus (S O) i)) (plus i (S O)) (plus_comm i (S O)))) (lift h d0 (TLRef i)) (lift_lref_ge i h d0 H4)))))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abst) v))).(\lambda (w: -T).(\lambda (H1: (tau0 g d v w)).(\lambda (H2: ((\forall (c: C).(\forall (h: -nat).(\forall (d0: nat).((drop h d0 c d) \to (tau0 g c (lift h d0 v) (lift h -d0 w)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d0: nat).(\lambda +T).(\lambda (H1: (tau0 g d v w)).(\lambda (H2: ((\forall (c0: C).(\forall (h: +nat).(\forall (d0: nat).((drop h d0 c0 d) \to (tau0 g c0 (lift h d0 v) (lift +h d0 w)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d0: nat).(\lambda (H3: (drop h d0 c0 c)).(lt_le_e i d0 (tau0 g c0 (lift h d0 (TLRef i)) (lift h d0 (lift (S i) O v))) (\lambda (H4: (lt i d0)).(let H5 \def (drop_getl_trans_le i d0 (le_S_n i d0 (le_S (S i) d0 H4)) c0 c h H3 (CHead d @@ -187,14 +187,14 @@ T (\lambda (t2: T).(tau0 g c0 (lift (S i) O v) t2))) (\lambda (x: T).(\lambda t2)) (lift (S i) O w) (tau0_lift g d v w H1 c0 (S i) O (getl_drop Abst c0 d v i H0))))) H3)))))))))) (\lambda (b: B).(\lambda (c0: C).(\lambda (v: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (tau0 g (CHead c0 (Bind b) -v) t2 t3)).(\lambda (H1: (ex T (\lambda (t2: T).(tau0 g (CHead c0 (Bind b) v) -t3 t2)))).(let H2 \def H1 in (ex_ind T (\lambda (t4: T).(tau0 g (CHead c0 +v) t2 t3)).(\lambda (H1: (ex T (\lambda (t4: T).(tau0 g (CHead c0 (Bind b) v) +t3 t4)))).(let H2 \def H1 in (ex_ind T (\lambda (t4: T).(tau0 g (CHead c0 (Bind b) v) t3 t4)) (ex T (\lambda (t4: T).(tau0 g c0 (THead (Bind b) v t3) t4))) (\lambda (x: T).(\lambda (H3: (tau0 g (CHead c0 (Bind b) v) t3 x)).(ex_intro T (\lambda (t4: T).(tau0 g c0 (THead (Bind b) v t3) t4)) (THead (Bind b) v x) (tau0_bind g b c0 v t3 x H3)))) H2))))))))) (\lambda (c0: C).(\lambda (v: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (tau0 g c0 -t2 t3)).(\lambda (H1: (ex T (\lambda (t2: T).(tau0 g c0 t3 t2)))).(let H2 +t2 t3)).(\lambda (H1: (ex T (\lambda (t4: T).(tau0 g c0 t3 t4)))).(let H2 \def H1 in (ex_ind T (\lambda (t4: T).(tau0 g c0 t3 t4)) (ex T (\lambda (t4: T).(tau0 g c0 (THead (Flat Appl) v t3) t4))) (\lambda (x: T).(\lambda (H3: (tau0 g c0 t3 x)).(ex_intro T (\lambda (t4: T).(tau0 g c0 (THead (Flat Appl) @@ -202,7 +202,7 @@ v t3) t4)) (THead (Flat Appl) v x) (tau0_appl g c0 v t3 x H3)))) H2)))))))) (\lambda (c0: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (tau0 g c0 v1 v2)).(\lambda (H1: (ex T (\lambda (t2: T).(tau0 g c0 v2 t2)))).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (tau0 g c0 t2 t3)).(\lambda (H3: (ex T -(\lambda (t2: T).(tau0 g c0 t3 t2)))).(let H4 \def H1 in (ex_ind T (\lambda +(\lambda (t4: T).(tau0 g c0 t3 t4)))).(let H4 \def H1 in (ex_ind T (\lambda (t4: T).(tau0 g c0 v2 t4)) (ex T (\lambda (t4: T).(tau0 g c0 (THead (Flat Cast) v2 t3) t4))) (\lambda (x: T).(\lambda (H5: (tau0 g c0 v2 x)).(let H6 \def H3 in (ex_ind T (\lambda (t4: T).(tau0 g c0 t3 t4)) (ex T (\lambda (t4: diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tlt/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tlt/props.ma index caeac0dbd..6b0e8005a 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tlt/props.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tlt/props.ma @@ -56,31 +56,31 @@ nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t) \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t0) (weight_map g t0)))))) (\lambda (n: nat).(\lambda -(f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (_: ((\forall (n: -nat).(le (f n) (g n))))).(le_n (weight_map g (TSort n))))))) (\lambda (n: -nat).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H: -((\forall (n: nat).(le (f n) (g n))))).(H n))))) (\lambda (k: K).(K_ind -(\lambda (k0: K).(\forall (t0: T).(((\forall (f: ((nat \to nat))).(\forall -(g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le -(weight_map f t0) (weight_map g t0)))))) \to (\forall (t1: T).(((\forall (f: -((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) -(g n)))) \to (le (weight_map f t1) (weight_map g t1)))))) \to (\forall (f: -((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) -(g n)))) \to (le (weight_map f (THead k0 t0 t1)) (weight_map g (THead k0 t0 -t1))))))))))) (\lambda (b: B).(B_ind (\lambda (b0: B).(\forall (t0: +(f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (_: ((\forall +(n0: nat).(le (f n0) (g n0))))).(le_n (weight_map g (TSort n))))))) (\lambda +(n: nat).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda +(H: ((\forall (n0: nat).(le (f n0) (g n0))))).(H n))))) (\lambda (k: +K).(K_ind (\lambda (k0: K).(\forall (t0: T).(((\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) +\to (le (weight_map f t0) (weight_map g t0)))))) \to (\forall (t1: T).(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall -(n: nat).(le (f n) (g n)))) \to (le (weight_map f t0) (weight_map g t0)))))) -\to (\forall (t1: T).(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t1) -(weight_map g t1)))))) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat -\to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (match b0 with -[Abbr \Rightarrow (S (plus (weight_map f t0) (weight_map (wadd f (S -(weight_map f t0))) t1))) | Abst \Rightarrow (S (plus (weight_map f t0) -(weight_map (wadd f O) t1))) | Void \Rightarrow (S (plus (weight_map f t0) -(weight_map (wadd f O) t1)))]) (match b0 with [Abbr \Rightarrow (S (plus -(weight_map g t0) (weight_map (wadd g (S (weight_map g t0))) t1))) | Abst -\Rightarrow (S (plus (weight_map g t0) (weight_map (wadd g O) t1))) | Void -\Rightarrow (S (plus (weight_map g t0) (weight_map (wadd g O) +(n: nat).(le (f n) (g n)))) \to (le (weight_map f t1) (weight_map g t1)))))) +\to (\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall +(n: nat).(le (f n) (g n)))) \to (le (weight_map f (THead k0 t0 t1)) +(weight_map g (THead k0 t0 t1))))))))))) (\lambda (b: B).(B_ind (\lambda (b0: +B).(\forall (t0: T).(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t0) +(weight_map g t0)))))) \to (\forall (t1: T).(((\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) +\to (le (weight_map f t1) (weight_map g t1)))))) \to (\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) +\to (le (match b0 with [Abbr \Rightarrow (S (plus (weight_map f t0) +(weight_map (wadd f (S (weight_map f t0))) t1))) | Abst \Rightarrow (S (plus +(weight_map f t0) (weight_map (wadd f O) t1))) | Void \Rightarrow (S (plus +(weight_map f t0) (weight_map (wadd f O) t1)))]) (match b0 with [Abbr +\Rightarrow (S (plus (weight_map g t0) (weight_map (wadd g (S (weight_map g +t0))) t1))) | Abst \Rightarrow (S (plus (weight_map g t0) (weight_map (wadd g +O) t1))) | Void \Rightarrow (S (plus (weight_map g t0) (weight_map (wadd g O) t1)))])))))))))) (\lambda (t0: T).(\lambda (H: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t0) (weight_map g t0))))))).(\lambda (t1: T).(\lambda @@ -123,11 +123,11 @@ t0) (weight_map (wadd g O) t1))) (le_n_S (plus (weight_map f t0) (weight_map (plus_le_compat (weight_map f t0) (weight_map g t0) (weight_map (wadd f O) t1) (weight_map (wadd g O) t1) (H f g H1) (H0 (wadd f O) (wadd g O) (\lambda (n: nat).(wadd_le f g H1 O O (le_n O) n)))))))))))))) b)) (\lambda (_: -F).(\lambda (t0: T).(\lambda (H: ((\forall (f: ((nat \to nat))).(\forall (g: -((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f -t0) (weight_map g t0))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (f: -((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) -(g n)))) \to (le (weight_map f t1) (weight_map g t1))))))).(\lambda (f0: +F).(\lambda (t0: T).(\lambda (H: ((\forall (f0: ((nat \to nat))).(\forall (g: +((nat \to nat))).(((\forall (n: nat).(le (f0 n) (g n)))) \to (le (weight_map +f0 t0) (weight_map g t0))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (f0: +((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f0 n) +(g n)))) \to (le (weight_map f0 t1) (weight_map g t1))))))).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H1: ((\forall (n: nat).(le (f0 n) (g n))))).(lt_le_S (plus (weight_map f0 t0) (weight_map f0 t1)) (S (plus (weight_map g t0) (weight_map g t1))) (le_lt_n_Sm (plus @@ -274,8 +274,8 @@ T).(\lambda (t: T).(le_S_n (S (weight_map (\lambda (_: nat).O) t)) (S (plus (weight_map (\lambda (_: nat).O) t)))))))) k). theorem tlt_wf__q_ind: - \forall (P: ((T \to Prop))).(((\forall (n: nat).((\lambda (P: ((T \to -Prop))).(\lambda (n0: nat).(\forall (t: T).((eq nat (weight t) n0) \to (P + \forall (P: ((T \to Prop))).(((\forall (n: nat).((\lambda (P0: ((T \to +Prop))).(\lambda (n0: nat).(\forall (t: T).((eq nat (weight t) n0) \to (P0 t))))) P n))) \to (\forall (t: T).(P t))) \def let Q \def (\lambda (P: ((T \to Prop))).(\lambda (n: nat).(\forall (t: @@ -294,9 +294,10 @@ Prop))).(\lambda (H: ((\forall (t: T).(((\forall (v: T).((lt (weight v) (weight t)) \to (P v)))) \to (P t))))).(\lambda (t: T).(tlt_wf__q_ind (\lambda (t0: T).(P t0)) (\lambda (n: nat).(lt_wf_ind n (Q (\lambda (t0: T).(P t0))) (\lambda (n0: nat).(\lambda (H0: ((\forall (m: nat).((lt m n0) -\to (Q (\lambda (t: T).(P t)) m))))).(\lambda (t0: T).(\lambda (H1: (eq nat -(weight t0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n: nat).(\forall (m: -nat).((lt m n) \to (\forall (t: T).((eq nat (weight t) m) \to (P t)))))) H0 -(weight t0) H1) in (H t0 (\lambda (v: T).(\lambda (H3: (lt (weight v) (weight -t0))).(H2 (weight v) H3 v (refl_equal nat (weight v))))))))))))) t)))). +\to (Q (\lambda (t0: T).(P t0)) m))))).(\lambda (t0: T).(\lambda (H1: (eq nat +(weight t0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n1: nat).(\forall +(m: nat).((lt m n1) \to (\forall (t1: T).((eq nat (weight t1) m) \to (P +t1)))))) H0 (weight t0) H1) in (H t0 (\lambda (v: T).(\lambda (H3: (lt +(weight v) (weight t0))).(H2 (weight v) H3 v (refl_equal nat (weight +v))))))))))))) t)))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/arity.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/arity.ma index 73069bcd5..a4ca54272 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/arity.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/arity.ma @@ -103,43 +103,42 @@ x0)).(\lambda (H11: (arity g (CHead c0 (Bind b) u) t4 (asucc g x0))).(let H_x \def (leq_asucc g x) in (let H12 \def H_x in (ex_ind A (\lambda (a0: A).(leq g x (asucc g a0))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Bind b) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b) u t4) (asucc g a1)))) -(\lambda (x1: A).(\lambda (H13: (leq g x (asucc g x1))).((match b in B return -(\lambda (b0: B).((ty3 g (CHead c0 (Bind b0) u) t4 t0) \to ((ex2 A (\lambda -(a1: A).(arity g (CHead c0 (Bind b0) u) t4 a1)) (\lambda (a1: A).(arity g -(CHead c0 (Bind b0) u) t0 (asucc g a1)))) \to ((arity g (CHead c0 (Bind b0) -u) t3 x0) \to ((arity g (CHead c0 (Bind b0) u) t4 (asucc g x0)) \to (ex2 A -(\lambda (a1: A).(arity g c0 (THead (Bind b0) u t3) a1)) (\lambda (a1: -A).(arity g c0 (THead (Bind b0) u t4) (asucc g a1))))))))) with [Abbr -\Rightarrow (\lambda (_: (ty3 g (CHead c0 (Bind Abbr) u) t4 t0)).(\lambda (_: -(ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abbr) u) t4 a1)) (\lambda -(a1: A).(arity g (CHead c0 (Bind Abbr) u) t0 (asucc g a1))))).(\lambda (H16: -(arity g (CHead c0 (Bind Abbr) u) t3 x0)).(\lambda (H17: (arity g (CHead c0 -(Bind Abbr) u) t4 (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 -(THead (Bind Abbr) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abbr) -u t4) (asucc g a1))) x0 (arity_bind g Abbr not_abbr_abst c0 u x H7 t3 x0 H16) -(arity_bind g Abbr not_abbr_abst c0 u x H7 t4 (asucc g x0) H17)))))) | Abst -\Rightarrow (\lambda (_: (ty3 g (CHead c0 (Bind Abst) u) t4 t0)).(\lambda (_: -(ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u) t4 a1)) (\lambda -(a1: A).(arity g (CHead c0 (Bind Abst) u) t0 (asucc g a1))))).(\lambda (H16: -(arity g (CHead c0 (Bind Abst) u) t3 x0)).(\lambda (H17: (arity g (CHead c0 -(Bind Abst) u) t4 (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 -(THead (Bind Abst) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abst) -u t4) (asucc g a1))) (AHead x1 x0) (arity_head g c0 u x1 (arity_repl g c0 u x -H7 (asucc g x1) H13) t3 x0 H16) (arity_repl g c0 (THead (Bind Abst) u t4) -(AHead x1 (asucc g x0)) (arity_head g c0 u x1 (arity_repl g c0 u x H7 (asucc -g x1) H13) t4 (asucc g x0) H17) (asucc g (AHead x1 x0)) (leq_refl g (asucc g -(AHead x1 x0))))))))) | Void \Rightarrow (\lambda (_: (ty3 g (CHead c0 (Bind -Void) u) t4 t0)).(\lambda (_: (ex2 A (\lambda (a1: A).(arity g (CHead c0 -(Bind Void) u) t4 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind Void) u) t0 -(asucc g a1))))).(\lambda (H16: (arity g (CHead c0 (Bind Void) u) t3 -x0)).(\lambda (H17: (arity g (CHead c0 (Bind Void) u) t4 (asucc g -x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Bind Void) u t3) a1)) -(\lambda (a1: A).(arity g c0 (THead (Bind Void) u t4) (asucc g a1))) x0 -(arity_bind g Void not_void_abst c0 u x H7 t3 x0 H16) (arity_bind g Void -not_void_abst c0 u x H7 t4 (asucc g x0) H17))))))]) H4 H5 H10 H11))) -H12)))))) H9))))) H6))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda -(u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (H1: (ex2 A (\lambda (a1: -A).(arity g c0 w a1)) (\lambda (a1: A).(arity g c0 u (asucc g +(\lambda (x1: A).(\lambda (H13: (leq g x (asucc g x1))).(B_ind (\lambda (b0: +B).((ty3 g (CHead c0 (Bind b0) u) t4 t0) \to ((ex2 A (\lambda (a1: A).(arity +g (CHead c0 (Bind b0) u) t4 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind +b0) u) t0 (asucc g a1)))) \to ((arity g (CHead c0 (Bind b0) u) t3 x0) \to +((arity g (CHead c0 (Bind b0) u) t4 (asucc g x0)) \to (ex2 A (\lambda (a1: +A).(arity g c0 (THead (Bind b0) u t3) a1)) (\lambda (a1: A).(arity g c0 +(THead (Bind b0) u t4) (asucc g a1))))))))) (\lambda (_: (ty3 g (CHead c0 +(Bind Abbr) u) t4 t0)).(\lambda (_: (ex2 A (\lambda (a1: A).(arity g (CHead +c0 (Bind Abbr) u) t4 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind Abbr) u) +t0 (asucc g a1))))).(\lambda (H16: (arity g (CHead c0 (Bind Abbr) u) t3 +x0)).(\lambda (H17: (arity g (CHead c0 (Bind Abbr) u) t4 (asucc g +x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Bind Abbr) u t3) a1)) +(\lambda (a1: A).(arity g c0 (THead (Bind Abbr) u t4) (asucc g a1))) x0 +(arity_bind g Abbr not_abbr_abst c0 u x H7 t3 x0 H16) (arity_bind g Abbr +not_abbr_abst c0 u x H7 t4 (asucc g x0) H17)))))) (\lambda (_: (ty3 g (CHead +c0 (Bind Abst) u) t4 t0)).(\lambda (_: (ex2 A (\lambda (a1: A).(arity g +(CHead c0 (Bind Abst) u) t4 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind +Abst) u) t0 (asucc g a1))))).(\lambda (H16: (arity g (CHead c0 (Bind Abst) u) +t3 x0)).(\lambda (H17: (arity g (CHead c0 (Bind Abst) u) t4 (asucc g +x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t3) a1)) +(\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t4) (asucc g a1))) (AHead +x1 x0) (arity_head g c0 u x1 (arity_repl g c0 u x H7 (asucc g x1) H13) t3 x0 +H16) (arity_repl g c0 (THead (Bind Abst) u t4) (AHead x1 (asucc g x0)) +(arity_head g c0 u x1 (arity_repl g c0 u x H7 (asucc g x1) H13) t4 (asucc g +x0) H17) (asucc g (AHead x1 x0)) (leq_refl g (asucc g (AHead x1 x0))))))))) +(\lambda (_: (ty3 g (CHead c0 (Bind Void) u) t4 t0)).(\lambda (_: (ex2 A +(\lambda (a1: A).(arity g (CHead c0 (Bind Void) u) t4 a1)) (\lambda (a1: +A).(arity g (CHead c0 (Bind Void) u) t0 (asucc g a1))))).(\lambda (H16: +(arity g (CHead c0 (Bind Void) u) t3 x0)).(\lambda (H17: (arity g (CHead c0 +(Bind Void) u) t4 (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 +(THead (Bind Void) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Void) +u t4) (asucc g a1))) x0 (arity_bind g Void not_void_abst c0 u x H7 t3 x0 H16) +(arity_bind g Void not_void_abst c0 u x H7 t4 (asucc g x0) H17)))))) b H4 H5 +H10 H11))) H12)))))) H9))))) H6))))))))))))))) (\lambda (c0: C).(\lambda (w: +T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (H1: (ex2 A (\lambda +(a1: A).(arity g c0 w a1)) (\lambda (a1: A).(arity g c0 u (asucc g a1))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (H3: (ex2 A (\lambda (a1: A).(arity g c0 v a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t) (asucc g a1))))).(let H4 diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/dec.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/dec.ma index efbd85e19..e46c2bacf 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/dec.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/ty3/dec.ma @@ -32,28 +32,28 @@ Prop).P)))))) \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(flt_wf_ind (\lambda (c0: C).(\lambda (t: T).(or (ex T (\lambda (t2: T).(ty3 g c0 t t2))) (\forall (t2: T).((ty3 g c0 t t2) \to (\forall (P: Prop).P)))))) (\lambda (c2: C).(\lambda -(t2: T).(match t2 in T return (\lambda (t: T).(((\forall (c1: C).(\forall -(t3: T).((flt c1 t3 c2 t) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) -(\forall (t4: T).((ty3 g c1 t3 t4) \to (\forall (P: Prop).P)))))))) \to (or -(ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) -\to (\forall (P: Prop).P)))))) with [(TSort n) \Rightarrow (\lambda (_: -((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 (TSort n)) \to (or (ex T -(\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to -(\forall (P: Prop).P))))))))).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 -(TSort n) t3))) (\forall (t3: T).((ty3 g c2 (TSort n) t3) \to (\forall (P: -Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (TSort n) t3)) (TSort (next -g n)) (ty3_sort g c2 n)))) | (TLRef n) \Rightarrow (\lambda (H: ((\forall -(c1: C).(\forall (t3: T).((flt c1 t3 c2 (TLRef n)) \to (or (ex T (\lambda -(t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to (\forall -(P: Prop).P))))))))).(let H_x \def (getl_dec c2 n) in (let H0 \def H_x in -(or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n -c2 (CHead e (Bind b) v)))))) (\forall (d: C).((getl n c2 d) \to (\forall (P: -Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: -T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P)))) (\lambda (H1: (ex_3 -C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n c2 (CHead e -(Bind b) v))))))).(ex_3_ind C B T (\lambda (e: C).(\lambda (b: B).(\lambda -(v: T).(getl n c2 (CHead e (Bind b) v))))) (or (ex T (\lambda (t3: T).(ty3 g -c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: +(t2: T).(T_ind (\lambda (t: T).(((\forall (c1: C).(\forall (t3: T).((flt c1 +t3 c2 t) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: +T).((ty3 g c1 t3 t4) \to (\forall (P: Prop).P)))))))) \to (or (ex T (\lambda +(t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: +Prop).P)))))) (\lambda (n: nat).(\lambda (_: ((\forall (c1: C).(\forall (t3: +T).((flt c1 t3 c2 (TSort n)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 +t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to (\forall (P: +Prop).P))))))))).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (TSort n) t3))) +(\forall (t3: T).((ty3 g c2 (TSort n) t3) \to (\forall (P: Prop).P))) +(ex_intro T (\lambda (t3: T).(ty3 g c2 (TSort n) t3)) (TSort (next g n)) +(ty3_sort g c2 n))))) (\lambda (n: nat).(\lambda (H: ((\forall (c1: +C).(\forall (t3: T).((flt c1 t3 c2 (TLRef n)) \to (or (ex T (\lambda (t4: +T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to (\forall (P: +Prop).P))))))))).(let H_x \def (getl_dec c2 n) in (let H0 \def H_x in (or_ind +(ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n c2 (CHead +e (Bind b) v)))))) (\forall (d: C).((getl n c2 d) \to (\forall (P: Prop).P))) +(or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g +c2 (TLRef n) t3) \to (\forall (P: Prop).P)))) (\lambda (H1: (ex_3 C B T +(\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n c2 (CHead e (Bind b) +v))))))).(ex_3_ind C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: +T).(getl n c2 (CHead e (Bind b) v))))) (or (ex T (\lambda (t3: T).(ty3 g c2 +(TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P)))) (\lambda (x0: C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H2: (getl n c2 (CHead x0 (Bind x1) x2))).(let H3 \def (H x0 x2 (getl_flt x1 c2 x0 x2 n H2)) in (or_ind (ex T (\lambda (t3: T).(ty3 g x0 x2 t3))) (\forall (t3: @@ -63,68 +63,67 @@ T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to t3)))).(ex_ind T (\lambda (t3: T).(ty3 g x0 x2 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P)))) (\lambda (x: T).(\lambda (H5: (ty3 g x0 x2 -x)).((match x1 in B return (\lambda (b: B).((getl n c2 (CHead x0 (Bind b) -x2)) \to (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: -T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P)))))) with [Abbr -\Rightarrow (\lambda (H6: (getl n c2 (CHead x0 (Bind Abbr) x2))).(or_introl -(ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 -(TLRef n) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g -c2 (TLRef n) t3)) (lift (S n) O x) (ty3_abbr g n c2 x0 x2 H6 x H5)))) | Abst -\Rightarrow (\lambda (H6: (getl n c2 (CHead x0 (Bind Abst) x2))).(or_introl -(ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 -(TLRef n) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g -c2 (TLRef n) t3)) (lift (S n) O x2) (ty3_abst g n c2 x0 x2 H6 x H5)))) | Void -\Rightarrow (\lambda (H6: (getl n c2 (CHead x0 (Bind Void) x2))).(or_intror -(ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 -(TLRef n) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H7: (ty3 -g c2 (TLRef n) t3)).(\lambda (P: Prop).(or_ind (ex3_3 C T T (\lambda (_: -C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda -(e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) -(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T -T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) -t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e -(Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u -t))))) P (\lambda (H8: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda -(t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: -T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: -C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T -(\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) -t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e -(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u -t)))) P (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 -c2 (lift (S n) O x5) t3)).(\lambda (H10: (getl n c2 (CHead x3 (Bind Abbr) -x4))).(\lambda (_: (ty3 g x3 x4 x5)).(let H12 \def (eq_ind C (CHead x0 (Bind -Void) x2) (\lambda (c0: C).(getl n c2 c0)) H6 (CHead x3 (Bind Abbr) x4) -(getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abbr) x4) H10)) -in (let H13 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (ee: C).(match -ee in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | -(CHead _ k _) \Rightarrow (match k in K return (\lambda (_: K).Prop) with -[(Bind b) \Rightarrow (match b in B return (\lambda (_: B).Prop) with [Abbr -\Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat -_) \Rightarrow False])])) I (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 -(Bind Void) x2) n H6 (CHead x3 (Bind Abbr) x4) H10)) in (False_ind P -H13))))))))) H8)) (\lambda (H8: (ex3_3 C T T (\lambda (_: C).(\lambda (u: -T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda -(u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: -C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T +x)).(B_ind (\lambda (b: B).((getl n c2 (CHead x0 (Bind b) x2)) \to (or (ex T +(\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef +n) t3) \to (\forall (P: Prop).P)))))) (\lambda (H6: (getl n c2 (CHead x0 +(Bind Abbr) x2))).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) +(\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))) +(ex_intro T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3)) (lift (S n) O x) +(ty3_abbr g n c2 x0 x2 H6 x H5)))) (\lambda (H6: (getl n c2 (CHead x0 (Bind +Abst) x2))).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) +(\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))) +(ex_intro T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3)) (lift (S n) O x2) +(ty3_abst g n c2 x0 x2 H6 x H5)))) (\lambda (H6: (getl n c2 (CHead x0 (Bind +Void) x2))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) +(\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))) +(\lambda (t3: T).(\lambda (H7: (ty3 g c2 (TLRef n) t3)).(\lambda (P: +Prop).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: +T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda +(_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: +C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) +(\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) P (\lambda +(H8: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 +(lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl +n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: +T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: +T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda +(u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: +C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) P (\lambda (x3: +C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 c2 (lift (S n) O x5) +t3)).(\lambda (H10: (getl n c2 (CHead x3 (Bind Abbr) x4))).(\lambda (_: (ty3 +g x3 x4 x5)).(let H12 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (c0: +C).(getl n c2 c0)) H6 (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind +Void) x2) n H6 (CHead x3 (Bind Abbr) x4) H10)) in (let H13 \def (eq_ind C +(CHead x0 (Bind Void) x2) (\lambda (ee: C).(match ee in C return (\lambda (_: +C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match +k in K return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b in B +return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow +False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead x3 +(Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind +Abbr) x4) H10)) in (False_ind P H13))))))))) H8)) (\lambda (H8: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u -t)))) P (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 -c2 (lift (S n) O x4) t3)).(\lambda (H10: (getl n c2 (CHead x3 (Bind Abst) -x4))).(\lambda (_: (ty3 g x3 x4 x5)).(let H12 \def (eq_ind C (CHead x0 (Bind -Void) x2) (\lambda (c0: C).(getl n c2 c0)) H6 (CHead x3 (Bind Abst) x4) -(getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abst) x4) H10)) -in (let H13 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (ee: C).(match -ee in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | -(CHead _ k _) \Rightarrow (match k in K return (\lambda (_: K).Prop) with -[(Bind b) \Rightarrow (match b in B return (\lambda (_: B).Prop) with [Abbr -\Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat -_) \Rightarrow False])])) I (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 -(Bind Void) x2) n H6 (CHead x3 (Bind Abst) x4) H10)) in (False_ind P -H13))))))))) H8)) (ty3_gen_lref g c2 t3 n H7)))))))]) H2))) H4)) (\lambda -(H4: ((\forall (t3: T).((ty3 g x0 x2 t3) \to (\forall (P: -Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) +t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 +c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: +T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: +T).(\lambda (t: T).(ty3 g e u t)))) P (\lambda (x3: C).(\lambda (x4: +T).(\lambda (x5: T).(\lambda (_: (pc3 c2 (lift (S n) O x4) t3)).(\lambda +(H10: (getl n c2 (CHead x3 (Bind Abst) x4))).(\lambda (_: (ty3 g x3 x4 +x5)).(let H12 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (c0: C).(getl +n c2 c0)) H6 (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind Void) +x2) n H6 (CHead x3 (Bind Abst) x4) H10)) in (let H13 \def (eq_ind C (CHead x0 +(Bind Void) x2) (\lambda (ee: C).(match ee in C return (\lambda (_: C).Prop) +with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k in K +return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b in B return +(\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | +Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead x3 (Bind +Abst) x4) (getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abst) +x4) H10)) in (False_ind P H13))))))))) H8)) (ty3_gen_lref g c2 t3 n H7))))))) +x1 H2))) H4)) (\lambda (H4: ((\forall (t3: T).((ty3 g x0 x2 t3) \to (\forall +(P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H5: (ty3 g c2 (TLRef n) t3)).(\lambda (P: Prop).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: @@ -226,48 +225,56 @@ t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e t)))) P (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (lift (S n) O x1) t3)).(\lambda (H5: (getl n c2 (CHead x0 (Bind Abst) x1))).(\lambda (_: (ty3 g x0 x1 x2)).(H1 (CHead x0 (Bind Abst) x1) H5 -P))))))) H3)) (ty3_gen_lref g c2 t3 n H2))))))) H0)))) | (THead k t t0) -\Rightarrow (\lambda (H: ((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 -(THead k t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall -(t4: T).((ty3 g c1 t3 t4) \to (\forall (P: Prop).P))))))))).((match k in K -return (\lambda (k0: K).(((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 -(THead k0 t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall -(t4: T).((ty3 g c1 t3 t4) \to (\forall (P: Prop).P)))))))) \to (or (ex T -(\lambda (t3: T).(ty3 g c2 (THead k0 t t0) t3))) (\forall (t3: T).((ty3 g c2 -(THead k0 t t0) t3) \to (\forall (P: Prop).P)))))) with [(Bind b) \Rightarrow -(\lambda (H0: ((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 (THead (Bind -b) t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: -T).((ty3 g c1 t3 t4) \to (\forall (P: Prop).P))))))))).(let H1 \def (H0 c2 t -(flt_thead_sx (Bind b) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g c2 -t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: Prop).P))) (or (ex -T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: -T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda -(H2: (ex T (\lambda (t3: T).(ty3 g c2 t t3)))).(ex_ind T (\lambda (t3: -T).(ty3 g c2 t t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t -t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall -(P: Prop).P)))) (\lambda (x: T).(\lambda (H3: (ty3 g c2 t x)).(let H4 \def -(H0 (CHead c2 (Bind b) t) t0 (flt_shift (Bind b) c2 t t0)) in (or_ind (ex T -(\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) t0 t3))) (\forall (t3: T).((ty3 -g (CHead c2 (Bind b) t) t0 t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda -(t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 -(THead (Bind b) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H5: (ex T -(\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) t0 t3)))).(ex_ind T (\lambda +P))))))) H3)) (ty3_gen_lref g c2 t3 n H2))))))) H0))))) (\lambda (k: +K).(\lambda (t: T).(\lambda (_: ((((\forall (c1: C).(\forall (t3: T).((flt c1 +t3 c2 t) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: +T).((ty3 g c1 t3 t4) \to (\forall (P: Prop).P)))))))) \to (or (ex T (\lambda +(t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: +Prop).P))))))).(\lambda (t0: T).(\lambda (_: ((((\forall (c1: C).(\forall +(t3: T).((flt c1 t3 c2 t0) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) +(\forall (t4: T).((ty3 g c1 t3 t4) \to (\forall (P: Prop).P)))))))) \to (or +(ex T (\lambda (t3: T).(ty3 g c2 t0 t3))) (\forall (t3: T).((ty3 g c2 t0 t3) +\to (\forall (P: Prop).P))))))).(\lambda (H1: ((\forall (c1: C).(\forall (t3: +T).((flt c1 t3 c2 (THead k t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 +t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to (\forall (P: +Prop).P))))))))).(K_ind (\lambda (k0: K).(((\forall (c1: C).(\forall (t3: +T).((flt c1 t3 c2 (THead k0 t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 +t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to (\forall (P: Prop).P)))))))) +\to (or (ex T (\lambda (t3: T).(ty3 g c2 (THead k0 t t0) t3))) (\forall (t3: +T).((ty3 g c2 (THead k0 t t0) t3) \to (\forall (P: Prop).P)))))) (\lambda (b: +B).(\lambda (H2: ((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 (THead +(Bind b) t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall +(t4: T).((ty3 g c1 t3 t4) \to (\forall (P: Prop).P))))))))).(let H3 \def (H2 +c2 t (flt_thead_sx (Bind b) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 +g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: Prop).P))) +(or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall +(t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P)))) +(\lambda (H4: (ex T (\lambda (t3: T).(ty3 g c2 t t3)))).(ex_ind T (\lambda +(t3: T).(ty3 g c2 t t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) +t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to +(\forall (P: Prop).P)))) (\lambda (x: T).(\lambda (H5: (ty3 g c2 t x)).(let +H6 \def (H2 (CHead c2 (Bind b) t) t0 (flt_shift (Bind b) c2 t t0)) in (or_ind +(ex T (\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) t0 t3))) (\forall (t3: +T).((ty3 g (CHead c2 (Bind b) t) t0 t3) \to (\forall (P: Prop).P))) (or (ex T +(\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 +g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H7: (ex +T (\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) t0 t3)))).(ex_ind T (\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) t0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) -t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x0: T).(\lambda (H6: (ty3 g +t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x0: T).(\lambda (H8: (ty3 g (CHead c2 (Bind b) t) t0 x0)).(ex_ind T (\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) x0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall -(P: Prop).P)))) (\lambda (x1: T).(\lambda (H7: (ty3 g (CHead c2 (Bind b) t) +(P: Prop).P)))) (\lambda (x1: T).(\lambda (H9: (ty3 g (CHead c2 (Bind b) t) x0 x1)).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3)) -(THead (Bind b) t x0) (ty3_bind g c2 t x H3 b t0 x0 H6 x1 H7))))) -(ty3_correct g (CHead c2 (Bind b) t) t0 x0 H6)))) H5)) (\lambda (H5: +(THead (Bind b) t x0) (ty3_bind g c2 t x H5 b t0 x0 H8 x1 H9))))) +(ty3_correct g (CHead c2 (Bind b) t) t0 x0 H8)))) H7)) (\lambda (H7: ((\forall (t3: T).((ty3 g (CHead c2 (Bind b) t) t0 t3) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall -(P: Prop).P))) (\lambda (t3: T).(\lambda (H6: (ty3 g c2 (THead (Bind b) t t0) +(P: Prop).P))) (\lambda (t3: T).(\lambda (H8: (ty3 g c2 (THead (Bind b) t t0) t3)).(\lambda (P: Prop).(ex4_3_ind T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind b) t t4) t3)))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c2 t t5)))) (\lambda (t4: @@ -275,182 +282,181 @@ T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) t) t0 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c2 (Bind b) t) t4 t6)))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (THead (Bind b) t x0) t3)).(\lambda (_: (ty3 g c2 t x1)).(\lambda -(H9: (ty3 g (CHead c2 (Bind b) t) t0 x0)).(\lambda (_: (ty3 g (CHead c2 (Bind -b) t) x0 x2)).(H5 x0 H9 P)))))))) (ty3_gen_bind g b c2 t t0 t3 H6))))))) -H4)))) H2)) (\lambda (H2: ((\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: -Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t -t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall -(P: Prop).P))) (\lambda (t3: T).(\lambda (H3: (ty3 g c2 (THead (Bind b) t t0) -t3)).(\lambda (P: Prop).(ex4_3_ind T T T (\lambda (t4: T).(\lambda (_: -T).(\lambda (_: T).(pc3 c2 (THead (Bind b) t t4) t3)))) (\lambda (_: -T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c2 t t5)))) (\lambda (t4: -T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) t) t0 t4)))) -(\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c2 (Bind b) -t) t4 t6)))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda -(_: (pc3 c2 (THead (Bind b) t x0) t3)).(\lambda (H5: (ty3 g c2 t +(H11: (ty3 g (CHead c2 (Bind b) t) t0 x0)).(\lambda (_: (ty3 g (CHead c2 +(Bind b) t) x0 x2)).(H7 x0 H11 P)))))))) (ty3_gen_bind g b c2 t t0 t3 +H8))))))) H6)))) H4)) (\lambda (H4: ((\forall (t3: T).((ty3 g c2 t t3) \to +(\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead +(Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) +\to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H5: (ty3 g c2 (THead +(Bind b) t t0) t3)).(\lambda (P: Prop).(ex4_3_ind T T T (\lambda (t4: +T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind b) t t4) t3)))) +(\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c2 t t5)))) (\lambda +(t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) t) t0 +t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c2 +(Bind b) t) t4 t6)))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: +T).(\lambda (_: (pc3 c2 (THead (Bind b) t x0) t3)).(\lambda (H7: (ty3 g c2 t x1)).(\lambda (_: (ty3 g (CHead c2 (Bind b) t) t0 x0)).(\lambda (_: (ty3 g -(CHead c2 (Bind b) t) x0 x2)).(H2 x1 H5 P)))))))) (ty3_gen_bind g b c2 t t0 -t3 H3))))))) H1))) | (Flat f) \Rightarrow (\lambda (H0: ((\forall (c1: -C).(\forall (t3: T).((flt c1 t3 c2 (THead (Flat f) t t0)) \to (or (ex T -(\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to -(\forall (P: Prop).P))))))))).((match f in F return (\lambda (f0: -F).(((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 (THead (Flat f0) t t0)) -\to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 -t3 t4) \to (\forall (P: Prop).P)))))))) \to (or (ex T (\lambda (t3: T).(ty3 g -c2 (THead (Flat f0) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat f0) -t t0) t3) \to (\forall (P: Prop).P)))))) with [Appl \Rightarrow (\lambda (H1: -((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 (THead (Flat Appl) t t0)) -\to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 -t3 t4) \to (\forall (P: Prop).P))))))))).(let H2 \def (H1 c2 t (flt_thead_sx -(Flat Appl) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g c2 t t3))) -(\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: Prop).P))) (or (ex T -(\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: -T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) -(\lambda (H3: (ex T (\lambda (t3: T).(ty3 g c2 t t3)))).(ex_ind T (\lambda -(t3: T).(ty3 g c2 t t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat -Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) -\to (\forall (P: Prop).P)))) (\lambda (x: T).(\lambda (H4: (ty3 g c2 t -x)).(let H5 \def (H1 c2 t0 (flt_thead_dx (Flat Appl) c2 t t0)) in (or_ind (ex -T (\lambda (t3: T).(ty3 g c2 t0 t3))) (\forall (t3: T).((ty3 g c2 t0 t3) \to -(\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat -Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) -\to (\forall (P: Prop).P)))) (\lambda (H6: (ex T (\lambda (t3: T).(ty3 g c2 -t0 t3)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t0 t3)) (or (ex T (\lambda +(CHead c2 (Bind b) t) x0 x2)).(H4 x1 H7 P)))))))) (ty3_gen_bind g b c2 t t0 +t3 H5))))))) H3)))) (\lambda (f: F).(\lambda (H2: ((\forall (c1: C).(\forall +(t3: T).((flt c1 t3 c2 (THead (Flat f) t t0)) \to (or (ex T (\lambda (t4: +T).(ty3 g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to (\forall (P: +Prop).P))))))))).(F_ind (\lambda (f0: F).(((\forall (c1: C).(\forall (t3: +T).((flt c1 t3 c2 (THead (Flat f0) t t0)) \to (or (ex T (\lambda (t4: T).(ty3 +g c1 t3 t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to (\forall (P: +Prop).P)))))))) \to (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat f0) t +t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat f0) t t0) t3) \to (\forall +(P: Prop).P)))))) (\lambda (H3: ((\forall (c1: C).(\forall (t3: T).((flt c1 +t3 c2 (THead (Flat Appl) t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 +t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to (\forall (P: +Prop).P))))))))).(let H4 \def (H3 c2 t (flt_thead_sx (Flat Appl) c2 t t0)) in +(or_ind (ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 +t t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead +(Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) +t3) \to (\forall (P: Prop).P)))) (\lambda (H5: (ex T (\lambda (t3: T).(ty3 g +c2 t t3)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 -(THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x0: -T).(\lambda (H7: (ty3 g c2 t0 x0)).(ex_ind T (\lambda (t3: T).(ty3 g c2 x0 +(THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x: +T).(\lambda (H6: (ty3 g c2 t x)).(let H7 \def (H3 c2 t0 (flt_thead_dx (Flat +Appl) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g c2 t0 t3))) (\forall +(t3: T).((ty3 g c2 t0 t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: +T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 +(THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H8: (ex T +(\lambda (t3: T).(ty3 g c2 t0 t3)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: -Prop).P)))) (\lambda (x1: T).(\lambda (H8: (ty3 g c2 x0 x1)).(ex_ind T -(\lambda (t3: T).(ty3 g c2 x t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead -(Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) -t3) \to (\forall (P: Prop).P)))) (\lambda (x2: T).(\lambda (H9: (ty3 g c2 x -x2)).(let H10 \def (ty3_sn3 g c2 x x2 H9) in (let H_x \def (nf2_sn3 c2 x H10) -in (let H11 \def H_x in (ex2_ind T (\lambda (u: T).(pr3 c2 x u)) (\lambda (u: -T).(nf2 c2 u)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) -t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall -(P: Prop).P)))) (\lambda (x3: T).(\lambda (H12: (pr3 c2 x x3)).(\lambda (H13: -(nf2 c2 x3)).(let H14 \def (ty3_sred_pr3 c2 x x3 H12 g x2 H9) in (let H_x0 -\def (pc3_abst_dec g c2 x0 x1 H8 x3 x2 H14) in (let H15 \def H_x0 in (or_ind -(ex4_2 T T (\lambda (u: T).(\lambda (_: T).(pc3 c2 x0 (THead (Bind Abst) x3 -u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c2 (THead (Bind Abst) v2 u) -x1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c2 x3 v2))) (\lambda (_: -T).(\lambda (v2: T).(nf2 c2 v2)))) (\forall (u: T).((pc3 c2 x0 (THead (Bind -Abst) x3 u)) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 +Prop).P)))) (\lambda (x0: T).(\lambda (H9: (ty3 g c2 t0 x0)).(ex_ind T +(\lambda (t3: T).(ty3 g c2 x0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) -t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H16: (ex4_2 T T (\lambda (u: +t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x1: T).(\lambda (H10: (ty3 g +c2 x0 x1)).(ex_ind T (\lambda (t3: T).(ty3 g c2 x t3)) (or (ex T (\lambda +(t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 +(THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x2: +T).(\lambda (H11: (ty3 g c2 x x2)).(let H12 \def (ty3_sn3 g c2 x x2 H11) in +(let H_x \def (nf2_sn3 c2 x H12) in (let H13 \def H_x in (ex2_ind T (\lambda +(u: T).(pr3 c2 x u)) (\lambda (u: T).(nf2 c2 u)) (or (ex T (\lambda (t3: +T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 +(THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x3: +T).(\lambda (H14: (pr3 c2 x x3)).(\lambda (H15: (nf2 c2 x3)).(let H16 \def +(ty3_sred_pr3 c2 x x3 H14 g x2 H11) in (let H_x0 \def (pc3_abst_dec g c2 x0 +x1 H10 x3 x2 H16) in (let H17 \def H_x0 in (or_ind (ex4_2 T T (\lambda (u: T).(\lambda (_: T).(pc3 c2 x0 (THead (Bind Abst) x3 u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c2 (THead (Bind Abst) v2 u) x1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c2 x3 v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c2 +v2)))) (\forall (u: T).((pc3 c2 x0 (THead (Bind Abst) x3 u)) \to (\forall (P: +Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) +t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall +(P: Prop).P)))) (\lambda (H18: (ex4_2 T T (\lambda (u: T).(\lambda (_: +T).(pc3 c2 x0 (THead (Bind Abst) x3 u)))) (\lambda (u: T).(\lambda (v2: +T).(ty3 g c2 (THead (Bind Abst) v2 u) x1))) (\lambda (_: T).(\lambda (v2: +T).(pr3 c2 x3 v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c2 v2))))).(ex4_2_ind T T (\lambda (u: T).(\lambda (_: T).(pc3 c2 x0 (THead (Bind Abst) x3 u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c2 (THead (Bind Abst) v2 u) x1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c2 x3 v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c2 v2))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x4: T).(\lambda (x5: -T).(\lambda (H17: (pc3 c2 x0 (THead (Bind Abst) x3 x4))).(\lambda (H18: (ty3 -g c2 (THead (Bind Abst) x5 x4) x1)).(\lambda (H19: (pr3 c2 x3 x5)).(\lambda -(_: (nf2 c2 x5)).(let H_y \def (nf2_pr3_unfold c2 x3 x5 H19 H13) in (let H21 -\def (eq_ind_r T x5 (\lambda (t3: T).(pr3 c2 x3 t3)) H19 x3 H_y) in (let H22 +T).(\lambda (H19: (pc3 c2 x0 (THead (Bind Abst) x3 x4))).(\lambda (H20: (ty3 +g c2 (THead (Bind Abst) x5 x4) x1)).(\lambda (H21: (pr3 c2 x3 x5)).(\lambda +(_: (nf2 c2 x5)).(let H_y \def (nf2_pr3_unfold c2 x3 x5 H21 H15) in (let H23 +\def (eq_ind_r T x5 (\lambda (t3: T).(pr3 c2 x3 t3)) H21 x3 H_y) in (let H24 \def (eq_ind_r T x5 (\lambda (t3: T).(ty3 g c2 (THead (Bind Abst) t3 x4) x1)) -H18 x3 H_y) in (or_introl (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) +H20 x3 H_y) in (or_introl (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3)) (THead (Flat Appl) t (THead (Bind Abst) x3 x4)) (ty3_appl g -c2 t x3 (ty3_tred g c2 t x H4 x3 H12) t0 x4 (ty3_conv g c2 (THead (Bind Abst) -x3 x4) x1 H22 t0 x0 H7 H17))))))))))))) H16)) (\lambda (H16: ((\forall (u: +c2 t x3 (ty3_tred g c2 t x H6 x3 H14) t0 x4 (ty3_conv g c2 (THead (Bind Abst) +x3 x4) x1 H24 t0 x0 H9 H19))))))))))))) H18)) (\lambda (H18: ((\forall (u: T).((pc3 c2 x0 (THead (Bind Abst) x3 u)) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to -(\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H17: (ty3 g c2 (THead +(\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H19: (ty3 g c2 (THead (Flat Appl) t t0) t3)).(\lambda (P: Prop).(ex3_2_ind T T (\lambda (u: T).(\lambda (t4: T).(pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) u t4)) t3))) (\lambda (u: T).(\lambda (t4: T).(ty3 g c2 t0 (THead (Bind Abst) u t4)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c2 t u))) P (\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 c2 (THead (Flat Appl) t (THead (Bind -Abst) x4 x5)) t3)).(\lambda (H19: (ty3 g c2 t0 (THead (Bind Abst) x4 -x5))).(\lambda (H20: (ty3 g c2 t x4)).(let H_y \def (ty3_unique g c2 t x4 H20 -x H4) in (let H_y0 \def (ty3_unique g c2 t0 (THead (Bind Abst) x4 x5) H19 x0 -H7) in (H16 x5 (pc3_t (THead (Bind Abst) x4 x5) c2 x0 (pc3_s c2 x0 (THead +Abst) x4 x5)) t3)).(\lambda (H21: (ty3 g c2 t0 (THead (Bind Abst) x4 +x5))).(\lambda (H22: (ty3 g c2 t x4)).(let H_y \def (ty3_unique g c2 t x4 H22 +x H6) in (let H_y0 \def (ty3_unique g c2 t0 (THead (Bind Abst) x4 x5) H21 x0 +H9) in (H18 x5 (pc3_t (THead (Bind Abst) x4 x5) c2 x0 (pc3_s c2 x0 (THead (Bind Abst) x4 x5) H_y0) (THead (Bind Abst) x3 x5) (pc3_head_1 c2 x4 x3 -(pc3_t x c2 x4 H_y x3 (pc3_pr3_r c2 x x3 H12)) (Bind Abst) x5)) P)))))))) -(ty3_gen_appl g c2 t t0 t3 H17))))))) H15))))))) H11)))))) (ty3_correct g c2 -t x H4)))) (ty3_correct g c2 t0 x0 H7)))) H6)) (\lambda (H6: ((\forall (t3: +(pc3_t x c2 x4 H_y x3 (pc3_pr3_r c2 x x3 H14)) (Bind Abst) x5)) P)))))))) +(ty3_gen_appl g c2 t t0 t3 H19))))))) H17))))))) H13)))))) (ty3_correct g c2 +t x H6)))) (ty3_correct g c2 t0 x0 H9)))) H8)) (\lambda (H8: ((\forall (t3: T).((ty3 g c2 t0 t3) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: -T).(\lambda (H7: (ty3 g c2 (THead (Flat Appl) t t0) t3)).(\lambda (P: +T).(\lambda (H9: (ty3 g c2 (THead (Flat Appl) t t0) t3)).(\lambda (P: Prop).(ex3_2_ind T T (\lambda (u: T).(\lambda (t4: T).(pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) u t4)) t3))) (\lambda (u: T).(\lambda (t4: T).(ty3 g c2 t0 (THead (Bind Abst) u t4)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c2 t u))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead (Flat -Appl) t (THead (Bind Abst) x0 x1)) t3)).(\lambda (H9: (ty3 g c2 t0 (THead -(Bind Abst) x0 x1))).(\lambda (_: (ty3 g c2 t x0)).(H6 (THead (Bind Abst) x0 -x1) H9 P)))))) (ty3_gen_appl g c2 t t0 t3 H7))))))) H5)))) H3)) (\lambda (H3: -((\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: Prop).P))))).(or_intror -(ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: -T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P))) -(\lambda (t3: T).(\lambda (H4: (ty3 g c2 (THead (Flat Appl) t t0) -t3)).(\lambda (P: Prop).(ex3_2_ind T T (\lambda (u: T).(\lambda (t4: T).(pc3 -c2 (THead (Flat Appl) t (THead (Bind Abst) u t4)) t3))) (\lambda (u: -T).(\lambda (t4: T).(ty3 g c2 t0 (THead (Bind Abst) u t4)))) (\lambda (u: +Appl) t (THead (Bind Abst) x0 x1)) t3)).(\lambda (H11: (ty3 g c2 t0 (THead +(Bind Abst) x0 x1))).(\lambda (_: (ty3 g c2 t x0)).(H8 (THead (Bind Abst) x0 +x1) H11 P)))))) (ty3_gen_appl g c2 t t0 t3 H9))))))) H7)))) H5)) (\lambda +(H5: ((\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: +Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t +t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to +(\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H6: (ty3 g c2 (THead (Flat +Appl) t t0) t3)).(\lambda (P: Prop).(ex3_2_ind T T (\lambda (u: T).(\lambda +(t4: T).(pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) u t4)) t3))) (\lambda +(u: T).(\lambda (t4: T).(ty3 g c2 t0 (THead (Bind Abst) u t4)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c2 t u))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) -t3)).(\lambda (_: (ty3 g c2 t0 (THead (Bind Abst) x0 x1))).(\lambda (H7: (ty3 -g c2 t x0)).(H3 x0 H7 P)))))) (ty3_gen_appl g c2 t t0 t3 H4))))))) H2))) | -Cast \Rightarrow (\lambda (H1: ((\forall (c1: C).(\forall (t3: T).((flt c1 t3 -c2 (THead (Flat Cast) t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 -t4))) (\forall (t4: T).((ty3 g c1 t3 t4) \to (\forall (P: -Prop).P))))))))).(let H2 \def (H1 c2 t (flt_thead_sx (Flat Cast) c2 t t0)) in -(or_ind (ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 -t t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead -(Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) -t3) \to (\forall (P: Prop).P)))) (\lambda (H3: (ex T (\lambda (t3: T).(ty3 g -c2 t t3)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t t3)) (or (ex T (\lambda +t3)).(\lambda (_: (ty3 g c2 t0 (THead (Bind Abst) x0 x1))).(\lambda (H9: (ty3 +g c2 t x0)).(H5 x0 H9 P)))))) (ty3_gen_appl g c2 t t0 t3 H6))))))) H4))) +(\lambda (H3: ((\forall (c1: C).(\forall (t3: T).((flt c1 t3 c2 (THead (Flat +Cast) t t0)) \to (or (ex T (\lambda (t4: T).(ty3 g c1 t3 t4))) (\forall (t4: +T).((ty3 g c1 t3 t4) \to (\forall (P: Prop).P))))))))).(let H4 \def (H3 c2 t +(flt_thead_sx (Flat Cast) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g +c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: Prop).P))) (or +(ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: +T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) +(\lambda (H5: (ex T (\lambda (t3: T).(ty3 g c2 t t3)))).(ex_ind T (\lambda +(t3: T).(ty3 g c2 t t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat +Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) +\to (\forall (P: Prop).P)))) (\lambda (x: T).(\lambda (H6: (ty3 g c2 t +x)).(let H7 \def (H3 c2 t0 (flt_thead_dx (Flat Cast) c2 t t0)) in (or_ind (ex +T (\lambda (t3: T).(ty3 g c2 t0 t3))) (\forall (t3: T).((ty3 g c2 t0 t3) \to +(\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat +Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) +\to (\forall (P: Prop).P)))) (\lambda (H8: (ex T (\lambda (t3: T).(ty3 g c2 +t0 t3)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 -(THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x: -T).(\lambda (H4: (ty3 g c2 t x)).(let H5 \def (H1 c2 t0 (flt_thead_dx (Flat -Cast) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g c2 t0 t3))) (\forall -(t3: T).((ty3 g c2 t0 t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: -T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 -(THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H6: (ex T -(\lambda (t3: T).(ty3 g c2 t0 t3)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t0 +(THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x0: +T).(\lambda (H9: (ty3 g c2 t0 x0)).(ex_ind T (\lambda (t3: T).(ty3 g c2 x0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: -Prop).P)))) (\lambda (x0: T).(\lambda (H7: (ty3 g c2 t0 x0)).(ex_ind T -(\lambda (t3: T).(ty3 g c2 x0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 -(THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) -t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x1: T).(\lambda (H8: (ty3 g -c2 x0 x1)).(let H_x \def (pc3_dec g c2 x0 x1 H8 t x H4) in (let H9 \def H_x -in (or_ind (pc3 c2 x0 t) ((pc3 c2 x0 t) \to (\forall (P: Prop).P)) (or (ex T +Prop).P)))) (\lambda (x1: T).(\lambda (H10: (ty3 g c2 x0 x1)).(let H_x \def +(pc3_dec g c2 x0 x1 H10 t x H6) in (let H11 \def H_x in (or_ind (pc3 c2 x0 t) +((pc3 c2 x0 t) \to (\forall (P: Prop).P)) (or (ex T (\lambda (t3: T).(ty3 g +c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat +Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H12: (pc3 c2 x0 +t)).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) +t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall +(P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t +t0) t3)) t (ty3_cast g c2 t0 t (ty3_conv g c2 t x H6 t0 x0 H9 H12) x H6)))) +(\lambda (H12: (((pc3 c2 x0 t) \to (\forall (P: Prop).P)))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: -T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) -(\lambda (H10: (pc3 c2 x0 t)).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 +T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P))) +(\lambda (t3: T).(\lambda (H13: (ty3 g c2 (THead (Flat Cast) t t0) +t3)).(\lambda (P: Prop).(and_ind (pc3 c2 t t3) (ty3 g c2 t0 t) P (\lambda (_: +(pc3 c2 t t3)).(\lambda (H15: (ty3 g c2 t0 t)).(let H_y \def (ty3_unique g c2 +t0 t H15 x0 H9) in (H12 (pc3_s c2 x0 t H_y) P)))) (ty3_gen_cast g c2 t0 t t3 +H13))))))) H11))))) (ty3_correct g c2 t0 x0 H9)))) H8)) (\lambda (H8: +((\forall (t3: T).((ty3 g c2 t0 t3) \to (\forall (P: Prop).P))))).(or_intror +(ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: +T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P))) +(\lambda (t3: T).(\lambda (H9: (ty3 g c2 (THead (Flat Cast) t t0) +t3)).(\lambda (P: Prop).(and_ind (pc3 c2 t t3) (ty3 g c2 t0 t) P (\lambda (_: +(pc3 c2 t t3)).(\lambda (H11: (ty3 g c2 t0 t)).(H8 t H11 P))) (ty3_gen_cast g +c2 t0 t t3 H9))))))) H7)))) H5)) (\lambda (H5: ((\forall (t3: T).((ty3 g c2 t +t3) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) -t t0) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 -(THead (Flat Cast) t t0) t3)) t (ty3_cast g c2 t0 t (ty3_conv g c2 t x H4 t0 -x0 H7 H10) x H4)))) (\lambda (H10: (((pc3 c2 x0 t) \to (\forall (P: -Prop).P)))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t -t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to -(\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H11: (ty3 g c2 (THead -(Flat Cast) t t0) t3)).(\lambda (P: Prop).(and_ind (pc3 c2 t t3) (ty3 g c2 t0 -t) P (\lambda (_: (pc3 c2 t t3)).(\lambda (H13: (ty3 g c2 t0 t)).(let H_y -\def (ty3_unique g c2 t0 t H13 x0 H7) in (H10 (pc3_s c2 x0 t H_y) P)))) -(ty3_gen_cast g c2 t0 t t3 H11))))))) H9))))) (ty3_correct g c2 t0 x0 H7)))) -H6)) (\lambda (H6: ((\forall (t3: T).((ty3 g c2 t0 t3) \to (\forall (P: -Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t -t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to -(\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H7: (ty3 g c2 (THead (Flat -Cast) t t0) t3)).(\lambda (P: Prop).(and_ind (pc3 c2 t t3) (ty3 g c2 t0 t) P -(\lambda (_: (pc3 c2 t t3)).(\lambda (H9: (ty3 g c2 t0 t)).(H6 t H9 P))) -(ty3_gen_cast g c2 t0 t t3 H7))))))) H5)))) H3)) (\lambda (H3: ((\forall (t3: -T).((ty3 g c2 t t3) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda -(t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 -(THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: -T).(\lambda (H4: (ty3 g c2 (THead (Flat Cast) t t0) t3)).(\lambda (P: -Prop).(and_ind (pc3 c2 t t3) (ty3 g c2 t0 t) P (\lambda (_: (pc3 c2 t -t3)).(\lambda (H6: (ty3 g c2 t0 t)).(ex_ind T (\lambda (t4: T).(ty3 g c2 t -t4)) P (\lambda (x: T).(\lambda (H7: (ty3 g c2 t x)).(H3 x H7 P))) -(ty3_correct g c2 t0 t H6)))) (ty3_gen_cast g c2 t0 t t3 H4))))))) H2)))]) -H0))]) H))]))) c t1))). +t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H6: (ty3 g +c2 (THead (Flat Cast) t t0) t3)).(\lambda (P: Prop).(and_ind (pc3 c2 t t3) +(ty3 g c2 t0 t) P (\lambda (_: (pc3 c2 t t3)).(\lambda (H8: (ty3 g c2 t0 +t)).(ex_ind T (\lambda (t4: T).(ty3 g c2 t t4)) P (\lambda (x: T).(\lambda +(H9: (ty3 g c2 t x)).(H5 x H9 P))) (ty3_correct g c2 t0 t H8)))) +(ty3_gen_cast g c2 t0 t t3 H6))))))) H4))) f H2))) k H1))))))) t2))) c t1))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/wcpr0/getl.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/wcpr0/getl.ma index ba017b9c4..5b3d7b505 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/wcpr0/getl.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/wcpr0/getl.ma @@ -261,94 +261,93 @@ k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 k u2) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))) (\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (getl O (CHead c0 k u1) -(CHead e1 k0 u0))).((match k in K return (\lambda (k1: K).((clear (CHead c0 -k1 u1) (CHead e1 k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(getl O (CHead c3 k1 u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: -T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))))) with -[(Bind b) \Rightarrow (\lambda (H4: (clear (CHead c0 (Bind b) u1) (CHead e1 -k0 u0))).(let H5 \def (f_equal C C (\lambda (e: C).(match e in C return -(\lambda (_: C).C) with [(CSort _) \Rightarrow e1 | (CHead c _ _) \Rightarrow -c])) (CHead e1 k0 u0) (CHead c0 (Bind b) u1) (clear_gen_bind b c0 (CHead e1 -k0 u0) u1 H4)) in ((let H6 \def (f_equal C K (\lambda (e: C).(match e in C -return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) -\Rightarrow k1])) (CHead e1 k0 u0) (CHead c0 (Bind b) u1) (clear_gen_bind b -c0 (CHead e1 k0 u0) u1 H4)) in ((let H7 \def (f_equal C T (\lambda (e: -C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | -(CHead _ _ t) \Rightarrow t])) (CHead e1 k0 u0) (CHead c0 (Bind b) u1) -(clear_gen_bind b c0 (CHead e1 k0 u0) u1 H4)) in (\lambda (H8: (eq K k0 (Bind -b))).(\lambda (H9: (eq C e1 c0)).(eq_ind_r K (Bind b) (\lambda (k1: K).(ex3_2 -C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) u2) (CHead -e2 k1 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u0 u3))))) (eq_ind_r T u1 (\lambda (t: T).(ex3_2 C T -(\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) u2) (CHead e2 -(Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u3: T).(pr0 t u3))))) (eq_ind_r C c0 (\lambda (c: C).(ex3_2 C T -(\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) u2) (CHead e2 -(Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 c e2))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u1 u3))))) (ex3_2_intro C T (\lambda (e2: -C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) u2) (CHead e2 (Bind b) u3)))) -(\lambda (e2: C).(\lambda (_: T).(wcpr0 c0 e2))) (\lambda (_: C).(\lambda -(u3: T).(pr0 u1 u3))) c3 u2 (getl_refl b c3 u2) H0 H2) e1 H9) u0 H7) k0 -H8)))) H6)) H5))) | (Flat f) \Rightarrow (\lambda (H4: (clear (CHead c0 (Flat -f) u1) (CHead e1 k0 u0))).(let H5 \def (H1 O e1 u0 k0 (getl_intro O c0 (CHead -e1 k0 u0) c0 (drop_refl c0) (clear_gen_flat f c0 (CHead e1 k0 u0) u1 H4))) in -(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl O c3 (CHead e2 k0 -u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(getl O (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: +(CHead e1 k0 u0))).(K_ind (\lambda (k1: K).((clear (CHead c0 k1 u1) (CHead e1 +k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 k1 +u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) +(\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))))) (\lambda (b: B).(\lambda +(H4: (clear (CHead c0 (Bind b) u1) (CHead e1 k0 u0))).(let H5 \def (f_equal C +C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow e1 | (CHead c _ _) \Rightarrow c])) (CHead e1 k0 u0) (CHead c0 +(Bind b) u1) (clear_gen_bind b c0 (CHead e1 k0 u0) u1 H4)) in ((let H6 \def +(f_equal C K (\lambda (e: C).(match e in C return (\lambda (_: C).K) with +[(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead e1 k0 u0) +(CHead c0 (Bind b) u1) (clear_gen_bind b c0 (CHead e1 k0 u0) u1 H4)) in ((let +H7 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) +with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e1 k0 +u0) (CHead c0 (Bind b) u1) (clear_gen_bind b c0 (CHead e1 k0 u0) u1 H4)) in +(\lambda (H8: (eq K k0 (Bind b))).(\lambda (H9: (eq C e1 c0)).(eq_ind_r K +(Bind b) (\lambda (k1: K).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl +O (CHead c3 (Bind b) u2) (CHead e2 k1 u3)))) (\lambda (e2: C).(\lambda (_: +T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))))) (eq_ind_r +T u1 (\lambda (t: T).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O +(CHead c3 (Bind b) u2) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda +(_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 t u3))))) +(eq_ind_r C c0 (\lambda (c: C).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: +T).(getl O (CHead c3 (Bind b) u2) (CHead e2 (Bind b) u3)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 c e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 +u3))))) (ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 +(Bind b) u2) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: +T).(wcpr0 c0 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))) c3 u2 +(getl_refl b c3 u2) H0 H2) e1 H9) u0 H7) k0 H8)))) H6)) H5)))) (\lambda (f: +F).(\lambda (H4: (clear (CHead c0 (Flat f) u1) (CHead e1 k0 u0))).(let H5 +\def (H1 O e1 u0 k0 (getl_intro O c0 (CHead e1 k0 u0) c0 (drop_refl c0) +(clear_gen_flat f c0 (CHead e1 k0 u0) u1 H4))) in (ex3_2_ind C T (\lambda +(e2: C).(\lambda (u3: T).(getl O c3 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 -u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl O c3 (CHead x0 -k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro -C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Flat f) u2) (CHead -e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_flat c3 (CHead x0 k0 x1) O H6 f -u2) H7 H8)))))) H5)))]) (getl_gen_O (CHead c0 k u1) (CHead e1 k0 u0) H3)))))) -(K_ind (\lambda (k0: K).(\forall (n: nat).(((\forall (e1: C).(\forall (u3: -T).(\forall (k1: K).((getl n (CHead c0 k0 u1) (CHead e1 k1 u3)) \to (ex3_2 C -T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 k0 u2) (CHead e2 k1 -u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u4: T).(pr0 u3 u4))))))))) \to (\forall (e1: C).(\forall (u3: -T).(\forall (k1: K).((getl (S n) (CHead c0 k0 u1) (CHead e1 k1 u3)) \to -(ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl (S n) (CHead c3 k0 u2) -(CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda -(_: C).(\lambda (u4: T).(pr0 u3 u4))))))))))) (\lambda (b: B).(\lambda (n: -nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((getl -n (CHead c0 (Bind b) u1) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: -C).(\lambda (u4: T).(getl n (CHead c3 (Bind b) u2) (CHead e2 k0 u4)))) -(\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda -(u4: T).(pr0 u3 u4)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: -K).(\lambda (H4: (getl (S n) (CHead c0 (Bind b) u1) (CHead e1 k0 u0))).(let -H5 \def (H1 n e1 u0 k0 (getl_gen_S (Bind b) c0 (CHead e1 k0 u0) u1 n H4)) in -(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl n c3 (CHead e2 k0 -u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(getl (S n) (CHead c3 (Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: +u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Flat f) +u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) +(\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: C).(\lambda +(x1: T).(\lambda (H6: (getl O c3 (CHead x0 k0 x1))).(\lambda (H7: (wcpr0 e1 +x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda +(u3: T).(getl O (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 -u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl n c3 (CHead x0 -k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro -C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 (Bind b) u2) -(CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda -(_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_head (Bind b) n c3 (CHead -x0 k0 x1) H6 u2) H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: -nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((getl -n (CHead c0 (Flat f) u1) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: -C).(\lambda (u4: T).(getl n (CHead c3 (Flat f) u2) (CHead e2 k0 u4)))) +u3))) x0 x1 (getl_flat c3 (CHead x0 k0 x1) O H6 f u2) H7 H8)))))) H5)))) k +(getl_gen_O (CHead c0 k u1) (CHead e1 k0 u0) H3)))))) (K_ind (\lambda (k0: +K).(\forall (n: nat).(((\forall (e1: C).(\forall (u3: T).(\forall (k1: +K).((getl n (CHead c0 k0 u1) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: +C).(\lambda (u4: T).(getl n (CHead c3 k0 u2) (CHead e2 k1 u4)))) (\lambda +(e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 +u3 u4))))))))) \to (\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((getl +(S n) (CHead c0 k0 u1) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: +C).(\lambda (u4: T).(getl (S n) (CHead c3 k0 u2) (CHead e2 k1 u4)))) (\lambda +(e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 +u3 u4))))))))))) (\lambda (b: B).(\lambda (n: nat).(\lambda (_: ((\forall +(e1: C).(\forall (u3: T).(\forall (k0: K).((getl n (CHead c0 (Bind b) u1) +(CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n +(CHead c3 (Bind b) u2) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: +T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 +u4)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: +(getl (S n) (CHead c0 (Bind b) u1) (CHead e1 k0 u0))).(let H5 \def (H1 n e1 +u0 k0 (getl_gen_S (Bind b) c0 (CHead e1 k0 u0) u1 n H4)) in (ex3_2_ind C T +(\lambda (e2: C).(\lambda (u3: T).(getl n c3 (CHead e2 k0 u3)))) (\lambda +(e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 +u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 +(Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 +e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H6: (getl n c3 (CHead x0 k0 x1))).(\lambda (H7: +(wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: +C).(\lambda (u3: T).(getl (S n) (CHead c3 (Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda -(u4: T).(pr0 u3 u4)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: -K).(\lambda (H4: (getl (S n) (CHead c0 (Flat f) u1) (CHead e1 k0 u0))).(let -H5 \def (H1 (S n) e1 u0 k0 (getl_gen_S (Flat f) c0 (CHead e1 k0 u0) u1 n H4)) -in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) c3 (CHead e2 -k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(getl (S n) (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 -u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl (S n) c3 (CHead -x0 k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 -x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 +(u3: T).(pr0 u0 u3))) x0 x1 (getl_head (Bind b) n c3 (CHead x0 k0 x1) H6 u2) +H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: nat).(\lambda (_: +((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((getl n (CHead c0 (Flat +f) u1) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: +T).(getl n (CHead c3 (Flat f) u2) (CHead e2 k0 u4)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 +u4)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: +(getl (S n) (CHead c0 (Flat f) u1) (CHead e1 k0 u0))).(let H5 \def (H1 (S n) +e1 u0 k0 (getl_gen_S (Flat f) c0 (CHead e1 k0 u0) u1 n H4)) in (ex3_2_ind C T +(\lambda (e2: C).(\lambda (u3: T).(getl (S n) c3 (CHead e2 k0 u3)))) (\lambda +(e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 +u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 -e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_head (Flat -f) n c3 (CHead x0 k0 x1) H6 u2) H7 H8)))))) H5))))))))) k) h)))))))))) c1 c2 -H))). +e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H6: (getl (S n) c3 (CHead x0 k0 x1))).(\lambda +(H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: +C).(\lambda (u3: T).(getl (S n) (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) +(\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda +(u3: T).(pr0 u0 u3))) x0 x1 (getl_head (Flat f) n c3 (CHead x0 k0 x1) H6 u2) +H7 H8)))))) H5))))))))) k) h)))))))))) c1 c2 H))). theorem wcpr0_getl_back: \forall (c1: C).(\forall (c2: C).((wcpr0 c2 c1) \to (\forall (h: @@ -379,92 +378,91 @@ k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c0 k u1) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))) (\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (getl O (CHead c3 k u2) -(CHead e1 k0 u0))).((match k in K return (\lambda (k1: K).((clear (CHead c3 -k1 u2) (CHead e1 k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(getl O (CHead c0 k1 u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: -T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))))) with -[(Bind b) \Rightarrow (\lambda (H4: (clear (CHead c3 (Bind b) u2) (CHead e1 -k0 u0))).(let H5 \def (f_equal C C (\lambda (e: C).(match e in C return -(\lambda (_: C).C) with [(CSort _) \Rightarrow e1 | (CHead c _ _) \Rightarrow -c])) (CHead e1 k0 u0) (CHead c3 (Bind b) u2) (clear_gen_bind b c3 (CHead e1 -k0 u0) u2 H4)) in ((let H6 \def (f_equal C K (\lambda (e: C).(match e in C -return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k1 _) -\Rightarrow k1])) (CHead e1 k0 u0) (CHead c3 (Bind b) u2) (clear_gen_bind b -c3 (CHead e1 k0 u0) u2 H4)) in ((let H7 \def (f_equal C T (\lambda (e: -C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | -(CHead _ _ t) \Rightarrow t])) (CHead e1 k0 u0) (CHead c3 (Bind b) u2) -(clear_gen_bind b c3 (CHead e1 k0 u0) u2 H4)) in (\lambda (H8: (eq K k0 (Bind -b))).(\lambda (H9: (eq C e1 c3)).(eq_ind_r K (Bind b) (\lambda (k1: K).(ex3_2 -C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Bind b) u1) (CHead -e2 k1 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u3 u0))))) (eq_ind_r T u2 (\lambda (t: T).(ex3_2 C T -(\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Bind b) u1) (CHead e2 -(Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u3 t))))) (eq_ind_r C c3 (\lambda (c: C).(ex3_2 C T -(\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Bind b) u1) (CHead e2 -(Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 c))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u3 u2))))) (ex3_2_intro C T (\lambda (e2: -C).(\lambda (u3: T).(getl O (CHead c0 (Bind b) u1) (CHead e2 (Bind b) u3)))) -(\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 c3))) (\lambda (_: C).(\lambda -(u3: T).(pr0 u3 u2))) c0 u1 (getl_refl b c0 u1) H0 H2) e1 H9) u0 H7) k0 -H8)))) H6)) H5))) | (Flat f) \Rightarrow (\lambda (H4: (clear (CHead c3 (Flat -f) u2) (CHead e1 k0 u0))).(let H5 \def (H1 O e1 u0 k0 (getl_intro O c3 (CHead -e1 k0 u0) c3 (drop_refl c3) (clear_gen_flat f c3 (CHead e1 k0 u0) u2 H4))) in -(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl O c0 (CHead e2 k0 -u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(getl O (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: +(CHead e1 k0 u0))).(K_ind (\lambda (k1: K).((clear (CHead c3 k1 u2) (CHead e1 +k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 k1 +u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) +(\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))))) (\lambda (b: B).(\lambda +(H4: (clear (CHead c3 (Bind b) u2) (CHead e1 k0 u0))).(let H5 \def (f_equal C +C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow e1 | (CHead c _ _) \Rightarrow c])) (CHead e1 k0 u0) (CHead c3 +(Bind b) u2) (clear_gen_bind b c3 (CHead e1 k0 u0) u2 H4)) in ((let H6 \def +(f_equal C K (\lambda (e: C).(match e in C return (\lambda (_: C).K) with +[(CSort _) \Rightarrow k0 | (CHead _ k1 _) \Rightarrow k1])) (CHead e1 k0 u0) +(CHead c3 (Bind b) u2) (clear_gen_bind b c3 (CHead e1 k0 u0) u2 H4)) in ((let +H7 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) +with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e1 k0 +u0) (CHead c3 (Bind b) u2) (clear_gen_bind b c3 (CHead e1 k0 u0) u2 H4)) in +(\lambda (H8: (eq K k0 (Bind b))).(\lambda (H9: (eq C e1 c3)).(eq_ind_r K +(Bind b) (\lambda (k1: K).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl +O (CHead c0 (Bind b) u1) (CHead e2 k1 u3)))) (\lambda (e2: C).(\lambda (_: +T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))))) (eq_ind_r +T u2 (\lambda (t: T).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O +(CHead c0 (Bind b) u1) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda +(_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 t))))) +(eq_ind_r C c3 (\lambda (c: C).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: +T).(getl O (CHead c0 (Bind b) u1) (CHead e2 (Bind b) u3)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e2 c))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 +u2))))) (ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 +(Bind b) u1) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: +T).(wcpr0 e2 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u2))) c0 u1 +(getl_refl b c0 u1) H0 H2) e1 H9) u0 H7) k0 H8)))) H6)) H5)))) (\lambda (f: +F).(\lambda (H4: (clear (CHead c3 (Flat f) u2) (CHead e1 k0 u0))).(let H5 +\def (H1 O e1 u0 k0 (getl_intro O c3 (CHead e1 k0 u0) c3 (drop_refl c3) +(clear_gen_flat f c3 (CHead e1 k0 u0) u2 H4))) in (ex3_2_ind C T (\lambda +(e2: C).(\lambda (u3: T).(getl O c0 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 -u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl O c0 (CHead x0 -k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro -C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Flat f) u1) (CHead -e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_flat c0 (CHead x0 k0 x1) O H6 f -u1) H7 H8)))))) H5)))]) (getl_gen_O (CHead c3 k u2) (CHead e1 k0 u0) H3)))))) -(K_ind (\lambda (k0: K).(\forall (n: nat).(((\forall (e1: C).(\forall (u3: -T).(\forall (k1: K).((getl n (CHead c3 k0 u2) (CHead e1 k1 u3)) \to (ex3_2 C -T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c0 k0 u1) (CHead e2 k1 -u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u4: T).(pr0 u4 u3))))))))) \to (\forall (e1: C).(\forall (u3: -T).(\forall (k1: K).((getl (S n) (CHead c3 k0 u2) (CHead e1 k1 u3)) \to -(ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl (S n) (CHead c0 k0 u1) -(CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda -(_: C).(\lambda (u4: T).(pr0 u4 u3))))))))))) (\lambda (b: B).(\lambda (n: -nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((getl -n (CHead c3 (Bind b) u2) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: -C).(\lambda (u4: T).(getl n (CHead c0 (Bind b) u1) (CHead e2 k0 u4)))) -(\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda -(u4: T).(pr0 u4 u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: -K).(\lambda (H4: (getl (S n) (CHead c3 (Bind b) u2) (CHead e1 k0 u0))).(let -H5 \def (H1 n e1 u0 k0 (getl_gen_S (Bind b) c3 (CHead e1 k0 u0) u2 n H4)) in -(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl n c0 (CHead e2 k0 -u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(getl (S n) (CHead c0 (Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: +u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Flat f) +u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) +(\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: C).(\lambda +(x1: T).(\lambda (H6: (getl O c0 (CHead x0 k0 x1))).(\lambda (H7: (wcpr0 x0 +e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda +(u3: T).(getl O (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 -u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl n c0 (CHead x0 -k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro -C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c0 (Bind b) u1) -(CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda -(_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_head (Bind b) n c0 (CHead -x0 k0 x1) H6 u1) H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: -nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((getl -n (CHead c3 (Flat f) u2) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: -C).(\lambda (u4: T).(getl n (CHead c0 (Flat f) u1) (CHead e2 k0 u4)))) +u0))) x0 x1 (getl_flat c0 (CHead x0 k0 x1) O H6 f u1) H7 H8)))))) H5)))) k +(getl_gen_O (CHead c3 k u2) (CHead e1 k0 u0) H3)))))) (K_ind (\lambda (k0: +K).(\forall (n: nat).(((\forall (e1: C).(\forall (u3: T).(\forall (k1: +K).((getl n (CHead c3 k0 u2) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: +C).(\lambda (u4: T).(getl n (CHead c0 k0 u1) (CHead e2 k1 u4)))) (\lambda +(e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 +u4 u3))))))))) \to (\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((getl +(S n) (CHead c3 k0 u2) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: +C).(\lambda (u4: T).(getl (S n) (CHead c0 k0 u1) (CHead e2 k1 u4)))) (\lambda +(e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 +u4 u3))))))))))) (\lambda (b: B).(\lambda (n: nat).(\lambda (_: ((\forall +(e1: C).(\forall (u3: T).(\forall (k0: K).((getl n (CHead c3 (Bind b) u2) +(CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n +(CHead c0 (Bind b) u1) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: +T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 +u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: +(getl (S n) (CHead c3 (Bind b) u2) (CHead e1 k0 u0))).(let H5 \def (H1 n e1 +u0 k0 (getl_gen_S (Bind b) c3 (CHead e1 k0 u0) u2 n H4)) in (ex3_2_ind C T +(\lambda (e2: C).(\lambda (u3: T).(getl n c0 (CHead e2 k0 u3)))) (\lambda +(e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 +u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c0 +(Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 +e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H6: (getl n c0 (CHead x0 k0 x1))).(\lambda (H7: +(wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: +C).(\lambda (u3: T).(getl (S n) (CHead c0 (Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda -(u4: T).(pr0 u4 u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: -K).(\lambda (H4: (getl (S n) (CHead c3 (Flat f) u2) (CHead e1 k0 u0))).(let -H5 \def (H1 (S n) e1 u0 k0 (getl_gen_S (Flat f) c3 (CHead e1 k0 u0) u2 n H4)) -in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) c0 (CHead e2 -k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: -C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: -T).(getl (S n) (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: -C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 -u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl (S n) c0 (CHead -x0 k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 -u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c0 +(u3: T).(pr0 u3 u0))) x0 x1 (getl_head (Bind b) n c0 (CHead x0 k0 x1) H6 u1) +H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: nat).(\lambda (_: +((\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((getl n (CHead c3 (Flat +f) u2) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: +T).(getl n (CHead c0 (Flat f) u1) (CHead e2 k0 u4)))) (\lambda (e2: +C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 +u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: +(getl (S n) (CHead c3 (Flat f) u2) (CHead e1 k0 u0))).(let H5 \def (H1 (S n) +e1 u0 k0 (getl_gen_S (Flat f) c3 (CHead e1 k0 u0) u2 n H4)) in (ex3_2_ind C T +(\lambda (e2: C).(\lambda (u3: T).(getl (S n) c0 (CHead e2 k0 u3)))) (\lambda +(e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 +u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 -e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_head (Flat -f) n c0 (CHead x0 k0 x1) H6 u1) H7 H8)))))) H5))))))))) k) h)))))))))) c2 c1 -H))). +e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H6: (getl (S n) c0 (CHead x0 k0 x1))).(\lambda +(H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: +C).(\lambda (u3: T).(getl (S n) (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) +(\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda +(u3: T).(pr0 u3 u0))) x0 x1 (getl_head (Flat f) n c0 (CHead x0 k0 x1) H6 u1) +H7 H8)))))) H5))))))))) k) h)))))))))) c2 c1 H))).