From: Ferruccio Guidi Date: Sun, 9 Mar 2008 16:59:41 +0000 (+0000) Subject: LAMBDA-TYPES: some more generation lemmas and some proofs improved X-Git-Tag: make_still_working~5552 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=863c1f7bb313c3d9dff08d60c8c7ef7c511263c4;p=helm.git LAMBDA-TYPES: some more generation lemmas and some proofs improved --- diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/app/defs.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/app/defs.ma new file mode 100644 index 000000000..75e89353a --- /dev/null +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/app/defs.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "LambdaDelta-1/C/defs.ma". + +definition cbk: + C \to nat +\def + let rec cbk (c: C) on c: nat \def (match c with [(CSort m) \Rightarrow m | +(CHead c0 _ _) \Rightarrow (cbk c0)]) in cbk. + +definition app1: + C \to (T \to T) +\def + let rec app1 (c: C) on c: (T \to T) \def (\lambda (t: T).(match c with +[(CSort _) \Rightarrow t | (CHead c0 k u) \Rightarrow (app1 c0 (THead k u +t))])) in app1. + diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/lift1.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/lift1.ma index c89c57d76..e25ceae78 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/lift1.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/lift1.ma @@ -16,7 +16,7 @@ include "LambdaDelta-1/arity/props.ma". -include "LambdaDelta-1/drop1/defs.ma". +include "LambdaDelta-1/drop1/fwd.ma". theorem arity_lift1: \forall (g: G).(\forall (a: A).(\forall (c2: C).(\forall (hds: @@ -27,60 +27,15 @@ a) \to (arity g c1 (lift1 hds t) a)))))))) PList).(PList_ind (\lambda (p: PList).(\forall (c1: C).(\forall (t: T).((drop1 p c1 c2) \to ((arity g c2 t a) \to (arity g c1 (lift1 p t) a)))))) (\lambda (c1: C).(\lambda (t: T).(\lambda (H: (drop1 PNil c1 c2)).(\lambda -(H0: (arity g c2 t a)).(let H1 \def (match H in drop1 return (\lambda (p: -PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p c c0)).((eq -PList p PNil) \to ((eq C c c1) \to ((eq C c0 c2) \to (arity g c1 t a)))))))) -with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda -(H2: (eq C c c1)).(\lambda (H3: (eq C c c2)).(eq_ind C c1 (\lambda (c0: -C).((eq C c0 c2) \to (arity g c1 t a))) (\lambda (H4: (eq C c1 c2)).(eq_ind C -c2 (\lambda (c0: C).(arity g c0 t a)) H0 c1 (sym_eq C c1 c2 H4))) c (sym_eq C -c c1 H2) H3)))) | (drop1_cons c0 c3 h d H1 c4 hds0 H2) \Rightarrow (\lambda -(H3: (eq PList (PCons h d hds0) PNil)).(\lambda (H4: (eq C c0 c1)).(\lambda -(H5: (eq C c4 c2)).((let H6 \def (eq_ind PList (PCons h d hds0) (\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 c4 c2) \to ((drop h d c0 c3) \to ((drop1 -hds0 c3 c4) \to (arity g c1 t a))))) 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 (H: ((\forall (c1: +(H0: (arity g c2 t a)).(let H_y \def (drop1_gen_pnil c1 c2 H) in (eq_ind_r C +c2 (\lambda (c: C).(arity g c t a)) H0 c1 H_y)))))) (\lambda (n: +nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c1: C).(\forall (t: T).((drop1 p c1 c2) \to ((arity g c2 t a) \to (arity g c1 (lift1 p t) a))))))).(\lambda (c1: C).(\lambda (t: T).(\lambda (H0: (drop1 -(PCons n n0 p) c1 c2)).(\lambda (H1: (arity g c2 t a)).(let H2 \def (match H0 -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 (arity g c1 (lift n n0 (lift1 p t)) a)))))))) 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 (arity g -c1 (lift n n0 (lift1 p t)) a))) H5)) H3 H4)))) | (drop1_cons c0 c3 h d H2 c4 -hds0 H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds0) (PCons n n0 -p))).(\lambda (H5: (eq C c0 c1)).(\lambda (H6: (eq C c4 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 h d 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 d | (PCons _ n1 _) \Rightarrow n1])) (PCons h d 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 h | (PCons n1 _ _) \Rightarrow n1])) (PCons h d hds0) (PCons n n0 -p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds0 -p) \to ((eq C c0 c1) \to ((eq C c4 c2) \to ((drop n1 d c0 c3) \to ((drop1 -hds0 c3 c4) \to (arity g c1 (lift n n0 (lift1 p t)) a)))))))) (\lambda (H10: -(eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds0 p) \to ((eq -C c0 c1) \to ((eq C c4 c2) \to ((drop n n1 c0 c3) \to ((drop1 hds0 c3 c4) \to -(arity g c1 (lift n n0 (lift1 p t)) a))))))) (\lambda (H11: (eq PList hds0 -p)).(eq_ind PList p (\lambda (p0: PList).((eq C c0 c1) \to ((eq C c4 c2) \to -((drop n n0 c0 c3) \to ((drop1 p0 c3 c4) \to (arity g c1 (lift n n0 (lift1 p -t)) a)))))) (\lambda (H12: (eq C c0 c1)).(eq_ind C c1 (\lambda (c: C).((eq C -c4 c2) \to ((drop n n0 c c3) \to ((drop1 p c3 c4) \to (arity g c1 (lift n n0 -(lift1 p t)) a))))) (\lambda (H13: (eq C c4 c2)).(eq_ind C c2 (\lambda (c: -C).((drop n n0 c1 c3) \to ((drop1 p c3 c) \to (arity g c1 (lift n n0 (lift1 p -t)) a)))) (\lambda (H14: (drop n n0 c1 c3)).(\lambda (H15: (drop1 p c3 -c2)).(arity_lift g c3 (lift1 p t) a (H c3 t H15 H1) c1 n n0 H14))) c4 (sym_eq -C c4 c2 H13))) c0 (sym_eq C c0 c1 H12))) hds0 (sym_eq PList hds0 p H11))) d -(sym_eq nat d n0 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 c1) (refl_equal C -c2))))))))))) hds)))). +(PCons n n0 p) c1 c2)).(\lambda (H1: (arity g c2 t a)).(let H_x \def +(drop1_gen_pcons c1 c2 p n n0 H0) in (let H2 \def H_x in (ex2_ind C (\lambda +(c3: C).(drop n n0 c1 c3)) (\lambda (c3: C).(drop1 p c3 c2)) (arity g c1 +(lift n n0 (lift1 p t)) a) (\lambda (x: C).(\lambda (H3: (drop n n0 c1 +x)).(\lambda (H4: (drop1 p x c2)).(arity_lift g x (lift1 p t) a (H x t H4 H1) +c1 n n0 H3)))) H2))))))))))) hds)))). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/subst0.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/subst0.ma index 006b6c493..d62f665f4 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/subst0.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/arity/subst0.ma @@ -270,153 +270,153 @@ d1 (Bind Abbr) u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 t2) \to (arity g c2 t2 a0))))))))))) (\lambda (c: C).(\lambda (n: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i c (CHead d1 (Bind Abbr) u))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H1: -(fsubst0 i u c (TSort n) c2 t2)).(let H2 \def (fsubst0_gen_base c c2 (TSort -n) t2 u i H1) in (or3_ind (land (eq C c c2) (subst0 i u (TSort n) t2)) (land -(eq T (TSort n) t2) (csubst0 i u c c2)) (land (subst0 i u (TSort n) t2) -(csubst0 i u c c2)) (arity g c2 t2 (ASort O n)) (\lambda (H3: (land (eq C c -c2) (subst0 i u (TSort n) t2))).(and_ind (eq C c c2) (subst0 i u (TSort n) -t2) (arity g c2 t2 (ASort O n)) (\lambda (H4: (eq C c c2)).(\lambda (H5: -(subst0 i u (TSort n) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 (ASort -O n))) (subst0_gen_sort u t2 i n H5 (arity g c t2 (ASort O n))) c2 H4))) H3)) -(\lambda (H3: (land (eq T (TSort n) t2) (csubst0 i u c c2))).(and_ind (eq T -(TSort n) t2) (csubst0 i u c c2) (arity g c2 t2 (ASort O n)) (\lambda (H4: -(eq T (TSort n) t2)).(\lambda (_: (csubst0 i u c c2)).(eq_ind T (TSort n) -(\lambda (t: T).(arity g c2 t (ASort O n))) (arity_sort g c2 n) t2 H4))) H3)) -(\lambda (H3: (land (subst0 i u (TSort n) t2) (csubst0 i u c c2))).(and_ind -(subst0 i u (TSort n) t2) (csubst0 i u c c2) (arity g c2 t2 (ASort O n)) -(\lambda (H4: (subst0 i u (TSort n) t2)).(\lambda (_: (csubst0 i u c -c2)).(subst0_gen_sort u t2 i n H4 (arity g c2 t2 (ASort O n))))) H3)) -H2))))))))))) (\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 (d1: C).(\forall -(u0: T).(\forall (i0: nat).((getl i0 d (CHead d1 (Bind Abbr) u0)) \to -(\forall (c2: C).(\forall (t2: T).((fsubst0 i0 u0 d u c2 t2) \to (arity g c2 -t2 a0)))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda -(H3: (getl i0 c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: -T).(\lambda (H4: (fsubst0 i0 u0 c (TLRef i) c2 t2)).(let H5 \def -(fsubst0_gen_base c c2 (TLRef i) t2 u0 i0 H4) in (or3_ind (land (eq C c c2) -(subst0 i0 u0 (TLRef i) t2)) (land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2)) -(land (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2)) (arity g c2 t2 a0) -(\lambda (H6: (land (eq C c c2) (subst0 i0 u0 (TLRef i) t2))).(and_ind (eq C -c c2) (subst0 i0 u0 (TLRef i) t2) (arity g c2 t2 a0) (\lambda (H7: (eq C c -c2)).(\lambda (H8: (subst0 i0 u0 (TLRef i) t2)).(eq_ind C c (\lambda (c0: -C).(arity g c0 t2 a0)) (and_ind (eq nat i i0) (eq T t2 (lift (S i) O u0)) -(arity g c t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda (H10: (eq T t2 (lift -(S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: T).(arity g c t a0)) -(let H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d1 (Bind -Abbr) u0))) H3 i H9) in (let H12 \def (eq_ind C (CHead d (Bind Abbr) u) -(\lambda (c0: C).(getl i c c0)) H0 (CHead d1 (Bind Abbr) u0) (getl_mono c -(CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in (let H13 \def -(f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with -[(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind -Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 -(CHead d1 (Bind Abbr) u0) H11)) in ((let H14 \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 d (Bind Abbr) u) (CHead d1 (Bind Abbr) -u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) -in (\lambda (H15: (eq C d d1)).(let H16 \def (eq_ind_r T u0 (\lambda (t: -T).(getl i c (CHead d1 (Bind Abbr) t))) H12 u H14) in (eq_ind T u (\lambda -(t: T).(arity g c (lift (S i) O t) a0)) (let H17 \def (eq_ind_r C d1 (\lambda -(c0: C).(getl i c (CHead c0 (Bind Abbr) u))) H16 d H15) in (arity_lift g d u -a0 H1 c (S i) O (getl_drop Abbr c d u i H17))) u0 H14)))) H13)))) t2 H10))) -(subst0_gen_lref u0 t2 i0 i H8)) c2 H7))) H6)) (\lambda (H6: (land (eq T -(TLRef i) t2) (csubst0 i0 u0 c c2))).(and_ind (eq T (TLRef i) t2) (csubst0 i0 -u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (eq T (TLRef i) t2)).(\lambda (H8: -(csubst0 i0 u0 c c2)).(eq_ind T (TLRef i) (\lambda (t: T).(arity g c2 t a0)) -(lt_le_e i i0 (arity g c2 (TLRef i) a0) (\lambda (H9: (lt i i0)).(let H10 -\def (csubst0_getl_lt i0 i H9 c c2 u0 H8 (CHead d (Bind Abbr) u) H0) in -(or4_ind (getl i c2 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: -B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind -Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: -C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) -(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: -C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 -(Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda -(u1: T).(getl i c2 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: -C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) -(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda -(u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) -u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: -T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: -B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 -(minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: -C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) -(arity g c2 (TLRef i) a0) (\lambda (H11: (getl i c2 (CHead d (Bind Abbr) -u))).(let H12 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead -d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind -Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) -(S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (arity_abbr g c2 d u i H11 a0 -H1))) (\lambda (H11: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda -(u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) -u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: -T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: -C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 -w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: -T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) -(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 -(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: -T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) (arity g c2 (TLRef -i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: -T).(\lambda (H12: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) -x2))).(\lambda (H13: (getl i c2 (CHead x1 (Bind x0) x3))).(\lambda (H14: -(subst0 (minus i0 (S i)) u0 x2 x3)).(let H15 \def (eq_ind nat (minus i0 i) -(\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) -(getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 -(le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) -in (let H16 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda -(_: C).C) with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) -(CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H12) in ((let H17 \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 b) \Rightarrow b | (Flat _) \Rightarrow -Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H12) in ((let H18 -\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 d (Bind -Abbr) u) (CHead x1 (Bind x0) x2) H12) in (\lambda (H19: (eq B Abbr -x0)).(\lambda (H20: (eq C d x1)).(let H21 \def (eq_ind_r T x2 (\lambda (t: -T).(subst0 (minus i0 (S i)) u0 t x3)) H14 u H18) in (let H22 \def (eq_ind_r C -x1 (\lambda (c0: C).(getl i c2 (CHead c0 (Bind x0) x3))) H13 d H20) in (let -H23 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead d (Bind b) x3))) -H22 Abbr H19) in (arity_abbr g c2 d x3 i H23 a0 (H2 d1 u0 (r (Bind Abbr) -(minus i0 (S i))) (getl_gen_S (Bind Abbr) d (CHead d1 (Bind Abbr) u0) u -(minus i0 (S i)) H15) d x3 (fsubst0_snd (r (Bind Abbr) (minus i0 (S i))) u0 d -u x3 H21))))))))) H17)) H16)))))))))) H11)) (\lambda (H11: (ex3_4 B C C T -(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C -(CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda -(_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) -u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: -T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: +(fsubst0 i u c (TSort n) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 (TSort +n) t2 u i H1) in (let H2 \def H_x in (or3_ind (land (eq C c c2) (subst0 i u +(TSort n) t2)) (land (eq T (TSort n) t2) (csubst0 i u c c2)) (land (subst0 i +u (TSort n) t2) (csubst0 i u c c2)) (arity g c2 t2 (ASort O n)) (\lambda (H3: +(land (eq C c c2) (subst0 i u (TSort n) t2))).(and_ind (eq C c c2) (subst0 i +u (TSort n) t2) (arity g c2 t2 (ASort O n)) (\lambda (H4: (eq C c +c2)).(\lambda (H5: (subst0 i u (TSort n) t2)).(eq_ind C c (\lambda (c0: +C).(arity g c0 t2 (ASort O n))) (subst0_gen_sort u t2 i n H5 (arity g c t2 +(ASort O n))) c2 H4))) H3)) (\lambda (H3: (land (eq T (TSort n) t2) (csubst0 +i u c c2))).(and_ind (eq T (TSort n) t2) (csubst0 i u c c2) (arity g c2 t2 +(ASort O n)) (\lambda (H4: (eq T (TSort n) t2)).(\lambda (_: (csubst0 i u c +c2)).(eq_ind T (TSort n) (\lambda (t: T).(arity g c2 t (ASort O n))) +(arity_sort g c2 n) t2 H4))) H3)) (\lambda (H3: (land (subst0 i u (TSort n) +t2) (csubst0 i u c c2))).(and_ind (subst0 i u (TSort n) t2) (csubst0 i u c +c2) (arity g c2 t2 (ASort O n)) (\lambda (H4: (subst0 i u (TSort n) +t2)).(\lambda (_: (csubst0 i u c c2)).(subst0_gen_sort u t2 i n H4 (arity g +c2 t2 (ASort O n))))) H3)) H2)))))))))))) (\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 (d1: C).(\forall (u0: T).(\forall (i0: nat).((getl i0 d (CHead d1 +(Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i0 u0 d u c2 +t2) \to (arity g c2 t2 a0)))))))))).(\lambda (d1: C).(\lambda (u0: +T).(\lambda (i0: nat).(\lambda (H3: (getl i0 c (CHead d1 (Bind Abbr) +u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i0 u0 c (TLRef +i) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 (TLRef i) t2 u0 i0 H4) in +(let H5 \def H_x in (or3_ind (land (eq C c c2) (subst0 i0 u0 (TLRef i) t2)) +(land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2)) (land (subst0 i0 u0 (TLRef i) +t2) (csubst0 i0 u0 c c2)) (arity g c2 t2 a0) (\lambda (H6: (land (eq C c c2) +(subst0 i0 u0 (TLRef i) t2))).(and_ind (eq C c c2) (subst0 i0 u0 (TLRef i) +t2) (arity g c2 t2 a0) (\lambda (H7: (eq C c c2)).(\lambda (H8: (subst0 i0 u0 +(TLRef i) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a0)) (and_ind (eq +nat i i0) (eq T t2 (lift (S i) O u0)) (arity g c t2 a0) (\lambda (H9: (eq nat +i i0)).(\lambda (H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O +u0) (\lambda (t: T).(arity g c t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda +(n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H12 \def +(eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead +d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind +Abbr) u0) H11)) in (let H13 \def (f_equal C C (\lambda (e: C).(match e in C +return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c0 _ _) +\Rightarrow c0])) (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0) +(getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in +((let H14 \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 d +(Bind Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) +i H0 (CHead d1 (Bind Abbr) u0) H11)) in (\lambda (H15: (eq C d d1)).(let H16 +\def (eq_ind_r T u0 (\lambda (t: T).(getl i c (CHead d1 (Bind Abbr) t))) H12 +u H14) in (eq_ind T u (\lambda (t: T).(arity g c (lift (S i) O t) a0)) (let +H17 \def (eq_ind_r C d1 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) u))) +H16 d H15) in (arity_lift g d u a0 H1 c (S i) O (getl_drop Abbr c d u i +H17))) u0 H14)))) H13)))) t2 H10))) (subst0_gen_lref u0 t2 i0 i H8)) c2 H7))) +H6)) (\lambda (H6: (land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2))).(and_ind +(eq T (TLRef i) t2) (csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (eq +T (TLRef i) t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(eq_ind T (TLRef i) +(\lambda (t: T).(arity g c2 t a0)) (lt_le_e i i0 (arity g c2 (TLRef i) a0) +(\lambda (H9: (lt i i0)).(let H10 \def (csubst0_getl_lt i0 i H9 c c2 u0 H8 +(CHead d (Bind Abbr) u) H0) in (or4_ind (getl i c2 (CHead d (Bind Abbr) u)) +(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda +(w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S -i)) u0 e1 e2))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: -C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (eq C (CHead d (Bind -Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 (CHead x2 (Bind -x0) x3))).(\lambda (H14: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H15 \def +i)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead +e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: +T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) +u0 e1 e2))))))) (arity g c2 (TLRef i) a0) (\lambda (H11: (getl i c2 (CHead d +(Bind Abbr) u))).(let H12 \def (eq_ind nat (minus i0 i) (\lambda (n: +nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) +(getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 +(le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) +in (arity_abbr g c2 d u i H11 a0 H1))) (\lambda (H11: (ex3_4 B C T T (\lambda +(b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind +Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 +(minus i0 (S i)) u0 u1 w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead +e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) +u0 u1 w))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: +C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (eq C (CHead d (Bind +Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H13: (getl i c2 (CHead x1 (Bind +x0) x3))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) -x3) H12) in ((let H17 \def (f_equal C B (\lambda (e: C).(match e in C return +x2) H12) in ((let H17 \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 b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead -x1 (Bind x0) x3) H12) in ((let H18 \def (f_equal C T (\lambda (e: C).(match e +x1 (Bind x0) x2) H12) in ((let H18 \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 d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in +\Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H12) in (\lambda (H19: (eq B Abbr x0)).(\lambda (H20: (eq C d x1)).(let H21 \def -(eq_ind_r T x3 (\lambda (t: T).(getl i c2 (CHead x2 (Bind x0) t))) H13 u H18) -in (let H22 \def (eq_ind_r C x1 (\lambda (c0: C).(csubst0 (minus i0 (S i)) u0 -c0 x2)) H14 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 -(CHead x2 (Bind b) u))) H21 Abbr H19) in (arity_abbr g c2 x2 u i H23 a0 (H2 -d1 u0 (r (Bind Abbr) (minus i0 (S i))) (getl_gen_S (Bind Abbr) d (CHead d1 -(Bind Abbr) u0) u (minus i0 (S i)) H15) x2 u (fsubst0_fst (r (Bind Abbr) -(minus i0 (S i))) u0 d u x2 H22))))))))) H17)) H16)))))))))) H11)) (\lambda -(H11: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +(eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H14 u H18) +in (let H22 \def (eq_ind_r C x1 (\lambda (c0: C).(getl i c2 (CHead c0 (Bind +x0) x3))) H13 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: B).(getl i +c2 (CHead d (Bind b) x3))) H22 Abbr H19) in (arity_abbr g c2 d x3 i H23 a0 +(H2 d1 u0 (r (Bind Abbr) (minus i0 (S i))) (getl_gen_S (Bind Abbr) d (CHead +d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) d x3 (fsubst0_snd (r (Bind Abbr) +(minus i0 (S i))) u0 d u x3 H21))))))))) H17)) H16)))))))))) H11)) (\lambda +(H11: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 +(CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C +T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C +(CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) +u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (arity g c2 (TLRef i) a0) (\lambda +(x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (eq +C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 +(CHead x2 (Bind x0) x3))).(\lambda (H14: (csubst0 (minus i0 (S i)) u0 x1 +x2)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead +d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind +Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) +(S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C +(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow d | (CHead c0 _ _) \Rightarrow c0])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x3) H12) in ((let H17 \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 +b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) +(CHead x1 (Bind x0) x3) H12) in ((let H18 \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 d (Bind Abbr) u) (CHead x1 (Bind x0) +x3) H12) in (\lambda (H19: (eq B Abbr x0)).(\lambda (H20: (eq C d x1)).(let +H21 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c2 (CHead x2 (Bind x0) t))) +H13 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c0: C).(csubst0 (minus +i0 (S i)) u0 c0 x2)) H14 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: +B).(getl i c2 (CHead x2 (Bind b) u))) H21 Abbr H19) in (arity_abbr g c2 x2 u +i H23 a0 (H2 d1 u0 (r (Bind Abbr) (minus i0 (S i))) (getl_gen_S (Bind Abbr) d +(CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) x2 u (fsubst0_fst (r (Bind +Abbr) (minus i0 (S i))) u0 d u x2 H22))))))))) H17)) H16)))))))))) H11)) +(\lambda (H11: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: @@ -483,30 +483,30 @@ H11 u H15) in (eq_ind T u (\lambda (t: T).(arity g c2 (lift (S i) O t) a0)) u))) H17 d H16) in (arity_lift g d u a0 H1 c2 (S i) O (getl_drop Abbr c2 d u i (csubst0_getl_ge i i (le_n i) c c2 u H18 (CHead d (Bind Abbr) u) H19)))) u0 H15))))) H14))))) t2 H10))) (subst0_gen_lref u0 t2 i0 i H7)))) H6)) -H5))))))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda +H5)))))))))))))))))) (\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 (H1: (arity g d u (asucc g a0))).(\lambda (H2: ((\forall (d1: C).(\forall (u0: T).(\forall (i0: nat).((getl i0 d (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i0 u0 d u c2 t2) \to (arity g c2 t2 (asucc g a0))))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H3: (getl i0 c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: -C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i0 u0 c (TLRef i) c2 t2)).(let H5 -\def (fsubst0_gen_base c c2 (TLRef i) t2 u0 i0 H4) in (or3_ind (land (eq C c -c2) (subst0 i0 u0 (TLRef i) t2)) (land (eq T (TLRef i) t2) (csubst0 i0 u0 c -c2)) (land (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2)) (arity g c2 t2 -a0) (\lambda (H6: (land (eq C c c2) (subst0 i0 u0 (TLRef i) t2))).(and_ind -(eq C c c2) (subst0 i0 u0 (TLRef i) t2) (arity g c2 t2 a0) (\lambda (H7: (eq -C c c2)).(\lambda (H8: (subst0 i0 u0 (TLRef i) t2)).(eq_ind C c (\lambda (c0: -C).(arity g c0 t2 a0)) (and_ind (eq nat i i0) (eq T t2 (lift (S i) O u0)) -(arity g c t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda (H10: (eq T t2 (lift -(S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: T).(arity g c t a0)) -(let H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d1 (Bind -Abbr) u0))) H3 i H9) in (let H12 \def (eq_ind C (CHead d (Bind Abst) u) -(\lambda (c0: C).(getl i c c0)) H0 (CHead d1 (Bind Abbr) u0) (getl_mono c -(CHead d (Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in (let H13 \def -(eq_ind C (CHead d (Bind Abst) u) (\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) +C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i0 u0 c (TLRef i) c2 t2)).(let H_x +\def (fsubst0_gen_base c c2 (TLRef i) t2 u0 i0 H4) in (let H5 \def H_x in +(or3_ind (land (eq C c c2) (subst0 i0 u0 (TLRef i) t2)) (land (eq T (TLRef i) +t2) (csubst0 i0 u0 c c2)) (land (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c +c2)) (arity g c2 t2 a0) (\lambda (H6: (land (eq C c c2) (subst0 i0 u0 (TLRef +i) t2))).(and_ind (eq C c c2) (subst0 i0 u0 (TLRef i) t2) (arity g c2 t2 a0) +(\lambda (H7: (eq C c c2)).(\lambda (H8: (subst0 i0 u0 (TLRef i) t2)).(eq_ind +C c (\lambda (c0: C).(arity g c0 t2 a0)) (and_ind (eq nat i i0) (eq T t2 +(lift (S i) O u0)) (arity g c t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda +(H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: +T).(arity g c t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n +c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H12 \def (eq_ind C (CHead d +(Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead d1 (Bind Abbr) u0) +(getl_mono c (CHead d (Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in +(let H13 \def (eq_ind C (CHead d (Bind Abst) u) (\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 True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d @@ -668,7 +668,7 @@ B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in (False_ind (arity g c2 (lift (S i) O u0) a0) H14))))) t2 H10))) -(subst0_gen_lref u0 t2 i0 i H7)))) H6)) H5))))))))))))))))) (\lambda (b: +(subst0_gen_lref u0 t2 i0 i H7)))) H6)) H5)))))))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H1: (arity g c u a1)).(\lambda (H2: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) @@ -680,19 +680,19 @@ u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 (CHead c (Bind b) u) t c2 t2) \to (arity g c2 t2 a2)))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H5: (getl i c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H6: (fsubst0 i u0 c (THead -(Bind b) u t) c2 t2)).(let H7 \def (fsubst0_gen_base c c2 (THead (Bind b) u -t) t2 u0 i H6) in (or3_ind (land (eq C c c2) (subst0 i u0 (THead (Bind b) u -t) t2)) (land (eq T (THead (Bind b) u t) t2) (csubst0 i u0 c c2)) (land -(subst0 i u0 (THead (Bind b) u t) t2) (csubst0 i u0 c c2)) (arity g c2 t2 a2) -(\lambda (H8: (land (eq C c c2) (subst0 i u0 (THead (Bind b) u t) -t2))).(and_ind (eq C c c2) (subst0 i u0 (THead (Bind b) u t) t2) (arity g c2 -t2 a2) (\lambda (H9: (eq C c c2)).(\lambda (H10: (subst0 i u0 (THead (Bind b) -u t) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) (or3_ind (ex2 T -(\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i -u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda -(t3: T).(subst0 (s (Bind b) i) u0 t t3))) (ex3_2 T T (\lambda (u2: -T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: -T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: +(Bind b) u t) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 (THead (Bind b) u +t) t2 u0 i H6) in (let H7 \def H_x in (or3_ind (land (eq C c c2) (subst0 i u0 +(THead (Bind b) u t) t2)) (land (eq T (THead (Bind b) u t) t2) (csubst0 i u0 +c c2)) (land (subst0 i u0 (THead (Bind b) u t) t2) (csubst0 i u0 c c2)) +(arity g c2 t2 a2) (\lambda (H8: (land (eq C c c2) (subst0 i u0 (THead (Bind +b) u t) t2))).(and_ind (eq C c c2) (subst0 i u0 (THead (Bind b) u t) t2) +(arity g c2 t2 a2) (\lambda (H9: (eq C c c2)).(\lambda (H10: (subst0 i u0 +(THead (Bind b) u t) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) +(or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda +(u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) +u t3))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3))) (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda +(u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3)))) (arity g c t2 a2) (\lambda (H11: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) @@ -780,7 +780,7 @@ H13 c2 H10)) x1 a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c2 (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t x1 H14 (CHead c2 (Bind b) x0) (csubst0_both_bind b i u0 u x0 H13 c c2 H10)))) t2 H12)))))) H11)) -(subst0_gen_head (Bind b) u0 u t t2 i H9)))) H8)) H7)))))))))))))))))))) +(subst0_gen_head (Bind b) u0 u t t2 i H9)))) H8)) H7))))))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H0: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: @@ -792,52 +792,52 @@ u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 (CHead c (Bind Abst) u) t c2 t2) \to (arity g c2 t2 a2)))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i u0 c (THead -(Bind Abst) u t) c2 t2)).(let H6 \def (fsubst0_gen_base c c2 (THead (Bind -Abst) u t) t2 u0 i H5) in (or3_ind (land (eq C c c2) (subst0 i u0 (THead -(Bind Abst) u t) t2)) (land (eq T (THead (Bind Abst) u t) t2) (csubst0 i u0 c -c2)) (land (subst0 i u0 (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2)) -(arity g c2 t2 (AHead a1 a2)) (\lambda (H7: (land (eq C c c2) (subst0 i u0 -(THead (Bind Abst) u t) t2))).(and_ind (eq C c c2) (subst0 i u0 (THead (Bind -Abst) u t) t2) (arity g c2 t2 (AHead a1 a2)) (\lambda (H8: (eq C c -c2)).(\lambda (H9: (subst0 i u0 (THead (Bind Abst) u t) t2)).(eq_ind C c -(\lambda (c0: C).(arity g c0 t2 (AHead a1 a2))) (or3_ind (ex2 T (\lambda (u2: -T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) -(ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t3: -T).(subst0 (s (Bind Abst) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda -(t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind -Abst) i) u0 t t3)))) (arity g c t2 (AHead a1 a2)) (\lambda (H10: (ex2 T -(\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 -i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) -(\lambda (u2: T).(subst0 i u0 u u2)) (arity g c t2 (AHead a1 a2)) (\lambda -(x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) x t))).(\lambda (H12: -(subst0 i u0 u x)).(eq_ind_r T (THead (Bind Abst) x t) (\lambda (t0: -T).(arity g c t0 (AHead a1 a2))) (arity_head g c x a1 (H1 d1 u0 i H4 c x -(fsubst0_snd i u0 c u x H12)) t a2 (H3 d1 u0 (S i) (getl_clear_bind Abst -(CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i -H4) (CHead c (Bind Abst) x) t (fsubst0_fst (S i) u0 (CHead c (Bind Abst) u) t -(CHead c (Bind Abst) x) (csubst0_snd_bind Abst i u0 u x H12 c)))) t2 H11)))) -H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u -t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)))).(ex2_ind T -(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t3: T).(subst0 -(s (Bind Abst) i) u0 t t3)) (arity g c t2 (AHead a1 a2)) (\lambda (x: -T).(\lambda (H11: (eq T t2 (THead (Bind Abst) u x))).(\lambda (H12: (subst0 -(s (Bind Abst) i) u0 t x)).(eq_ind_r T (THead (Bind Abst) u x) (\lambda (t0: -T).(arity g c t0 (AHead a1 a2))) (arity_head g c u a1 H0 x a2 (H3 d1 u0 (S i) -(getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) -(CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind Abst) u) x (fsubst0_snd (S i) -u0 (CHead c (Bind Abst) u) t x H12))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 -T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))))).(ex3_2_ind T T -(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (arity g c t2 (AHead -a1 a2)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead -(Bind Abst) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: -(subst0 (s (Bind Abst) i) u0 t x1)).(eq_ind_r T (THead (Bind Abst) x0 x1) -(\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g c x0 a1 (H1 d1 -u0 i H4 c x0 (fsubst0_snd i u0 c u x0 H12)) x1 a2 (H3 d1 u0 (S i) +(Bind Abst) u t) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 (THead (Bind +Abst) u t) t2 u0 i H5) in (let H6 \def H_x in (or3_ind (land (eq C c c2) +(subst0 i u0 (THead (Bind Abst) u t) t2)) (land (eq T (THead (Bind Abst) u t) +t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Bind Abst) u t) t2) +(csubst0 i u0 c c2)) (arity g c2 t2 (AHead a1 a2)) (\lambda (H7: (land (eq C +c c2) (subst0 i u0 (THead (Bind Abst) u t) t2))).(and_ind (eq C c c2) (subst0 +i u0 (THead (Bind Abst) u t) t2) (arity g c2 t2 (AHead a1 a2)) (\lambda (H8: +(eq C c c2)).(\lambda (H9: (subst0 i u0 (THead (Bind Abst) u t) t2)).(eq_ind +C c (\lambda (c0: C).(arity g c0 t2 (AHead a1 a2))) (or3_ind (ex2 T (\lambda +(u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u +u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda +(t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s (Bind Abst) i) u0 t t3)))) (arity g c t2 (AHead a1 a2)) +(\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) +(\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 +(THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c t2 +(AHead a1 a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) x +t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind Abst) x t) +(\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g c x a1 (H1 d1 u0 +i H4 c x (fsubst0_snd i u0 c u x H12)) t a2 (H3 d1 u0 (S i) (getl_clear_bind +Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) +u0) i H4) (CHead c (Bind Abst) x) t (fsubst0_fst (S i) u0 (CHead c (Bind +Abst) u) t (CHead c (Bind Abst) x) (csubst0_snd_bind Abst i u0 u x H12 c)))) +t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind +Abst) u t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)))).(ex2_ind +T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t3: +T).(subst0 (s (Bind Abst) i) u0 t t3)) (arity g c t2 (AHead a1 a2)) (\lambda +(x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) u x))).(\lambda (H12: +(subst0 (s (Bind Abst) i) u0 t x)).(eq_ind_r T (THead (Bind Abst) u x) +(\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g c u a1 H0 x a2 +(H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind +Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind Abst) u) x +(fsubst0_snd (S i) u0 (CHead c (Bind Abst) u) t x H12))) t2 H11)))) H10)) +(\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) +(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t +t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) +(\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (arity +g c t2 (AHead a1 a2)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T +t2 (THead (Bind Abst) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda +(H13: (subst0 (s (Bind Abst) i) u0 t x1)).(eq_ind_r T (THead (Bind Abst) x0 +x1) (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g c x0 a1 (H1 +d1 u0 i H4 c x0 (fsubst0_snd i u0 c u x0 H12)) x1 a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind Abst) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind Abst) u) t x1 H13 (CHead c (Bind Abst) x0) @@ -899,7 +899,7 @@ u0 i H4 c2 x0 (fsubst0_both i u0 c u x0 H12 c2 H9)) x1 a2 (H3 d1 u0 (S i) (CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind Abst) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind Abst) u) t x1 H13 (CHead c2 (Bind Abst) x0) (csubst0_both_bind Abst i u0 u x0 H12 c c2 H9)))) t2 H11)))))) H10)) -(subst0_gen_head (Bind Abst) u0 u t t2 i H8)))) H7)) H6)))))))))))))))))) +(subst0_gen_head (Bind Abst) u0 u t t2 i H8)))) H7)) H6))))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H0: (arity g c u a1)).(\lambda (H1: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: @@ -910,34 +910,34 @@ T).(\lambda (a2: A).(\lambda (H2: (arity g c t (AHead a1 a2))).(\lambda (H3: t2) \to (arity g c2 t2 (AHead a1 a2))))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i u0 c (THead -(Flat Appl) u t) c2 t2)).(let H6 \def (fsubst0_gen_base c c2 (THead (Flat -Appl) u t) t2 u0 i H5) in (or3_ind (land (eq C c c2) (subst0 i u0 (THead -(Flat Appl) u t) t2)) (land (eq T (THead (Flat Appl) u t) t2) (csubst0 i u0 c -c2)) (land (subst0 i u0 (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2)) -(arity g c2 t2 a2) (\lambda (H7: (land (eq C c c2) (subst0 i u0 (THead (Flat -Appl) u t) t2))).(and_ind (eq C c c2) (subst0 i u0 (THead (Flat Appl) u t) -t2) (arity g c2 t2 a2) (\lambda (H8: (eq C c c2)).(\lambda (H9: (subst0 i u0 -(THead (Flat Appl) u t) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) -(or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda -(u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat -Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3))) (ex3_2 T -T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3)))) (arity g c t2 a2) -(\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) -(\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 -(THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c t2 -a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x -t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat Appl) x t) -(\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c x a1 (H1 d1 u0 i H4 c x -(fsubst0_snd i u0 c u x H12)) t a2 H2) t2 H11)))) H10)) (\lambda (H10: (ex2 T +(Flat Appl) u t) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 (THead (Flat +Appl) u t) t2 u0 i H5) in (let H6 \def H_x in (or3_ind (land (eq C c c2) +(subst0 i u0 (THead (Flat Appl) u t) t2)) (land (eq T (THead (Flat Appl) u t) +t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Flat Appl) u t) t2) +(csubst0 i u0 c c2)) (arity g c2 t2 a2) (\lambda (H7: (land (eq C c c2) +(subst0 i u0 (THead (Flat Appl) u t) t2))).(and_ind (eq C c c2) (subst0 i u0 +(THead (Flat Appl) u t) t2) (arity g c2 t2 a2) (\lambda (H8: (eq C c +c2)).(\lambda (H9: (subst0 i u0 (THead (Flat Appl) u t) t2)).(eq_ind C c +(\lambda (c0: C).(arity g c0 t2 a2)) (or3_ind (ex2 T (\lambda (u2: T).(eq T +t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 -(s (Flat Appl) i) u0 t t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead -(Flat Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3)) -(arity g c t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) -u x))).(\lambda (H12: (subst0 (s (Flat Appl) i) u0 t x)).(eq_ind_r T (THead -(Flat Appl) u x) (\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c u a1 H0 -x a2 (H3 d1 u0 i H4 c x (fsubst0_snd i u0 c t x H12))) t2 H11)))) H10)) +(s (Flat Appl) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq +T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i +u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t +t3)))) (arity g c t2 a2) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 +(THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T +(\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 +i u0 u u2)) (arity g c t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead +(Flat Appl) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat +Appl) x t) (\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c x a1 (H1 d1 u0 +i H4 c x (fsubst0_snd i u0 c u x H12)) t a2 H2) t2 H11)))) H10)) (\lambda +(H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda +(t3: T).(subst0 (s (Flat Appl) i) u0 t t3)))).(ex2_ind T (\lambda (t3: T).(eq +T t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 +t t3)) (arity g c t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat +Appl) u x))).(\lambda (H12: (subst0 (s (Flat Appl) i) u0 t x)).(eq_ind_r T +(THead (Flat Appl) u x) (\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c u +a1 H0 x a2 (H3 d1 u0 i H4 c x (fsubst0_snd i u0 c t x H12))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t @@ -994,7 +994,7 @@ Appl) i) u0 t x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_appl g c2 x0 a1 (H1 d1 u0 i H4 c2 x0 (fsubst0_both i u0 c u x0 H12 c2 H9)) x1 a2 (H3 d1 u0 i H4 c2 x1 (fsubst0_both i u0 c t x1 H13 c2 H9))) t2 H11)))))) H10)) (subst0_gen_head -(Flat Appl) u0 u t t2 i H8)))) H7)) H6)))))))))))))))))) (\lambda (c: +(Flat Appl) u0 u t t2 i H8)))) H7)) H6))))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (H0: (arity g c u (asucc g a0))).(\lambda (H1: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: @@ -1005,36 +1005,36 @@ a0))))))))))).(\lambda (t: T).(\lambda (H2: (arity g c t a0)).(\lambda (H3: t2) \to (arity g c2 t2 a0)))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i u0 c (THead -(Flat Cast) u t) c2 t2)).(let H6 \def (fsubst0_gen_base c c2 (THead (Flat -Cast) u t) t2 u0 i H5) in (or3_ind (land (eq C c c2) (subst0 i u0 (THead -(Flat Cast) u t) t2)) (land (eq T (THead (Flat Cast) u t) t2) (csubst0 i u0 c -c2)) (land (subst0 i u0 (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2)) -(arity g c2 t2 a0) (\lambda (H7: (land (eq C c c2) (subst0 i u0 (THead (Flat -Cast) u t) t2))).(and_ind (eq C c c2) (subst0 i u0 (THead (Flat Cast) u t) -t2) (arity g c2 t2 a0) (\lambda (H8: (eq C c c2)).(\lambda (H9: (subst0 i u0 -(THead (Flat Cast) u t) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a0)) -(or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda -(u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat -Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3))) (ex3_2 T -T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3)))) (arity g c t2 a0) -(\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) -(\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 -(THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c t2 -a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) x -t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat Cast) x t) -(\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c x a0 (H1 d1 u0 i H4 c x -(fsubst0_snd i u0 c u x H12)) t H2) t2 H11)))) H10)) (\lambda (H10: (ex2 T +(Flat Cast) u t) c2 t2)).(let H_x \def (fsubst0_gen_base c c2 (THead (Flat +Cast) u t) t2 u0 i H5) in (let H6 \def H_x in (or3_ind (land (eq C c c2) +(subst0 i u0 (THead (Flat Cast) u t) t2)) (land (eq T (THead (Flat Cast) u t) +t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Flat Cast) u t) t2) +(csubst0 i u0 c c2)) (arity g c2 t2 a0) (\lambda (H7: (land (eq C c c2) +(subst0 i u0 (THead (Flat Cast) u t) t2))).(and_ind (eq C c c2) (subst0 i u0 +(THead (Flat Cast) u t) t2) (arity g c2 t2 a0) (\lambda (H8: (eq C c +c2)).(\lambda (H9: (subst0 i u0 (THead (Flat Cast) u t) t2)).(eq_ind C c +(\lambda (c0: C).(arity g c0 t2 a0)) (or3_ind (ex2 T (\lambda (u2: T).(eq T +t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 -(s (Flat Cast) i) u0 t t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead -(Flat Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3)) -(arity g c t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) -u x))).(\lambda (H12: (subst0 (s (Flat Cast) i) u0 t x)).(eq_ind_r T (THead -(Flat Cast) u x) (\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c u a0 H0 -x (H3 d1 u0 i H4 c x (fsubst0_snd i u0 c t x H12))) t2 H11)))) H10)) (\lambda -(H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat -Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) +(s (Flat Cast) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq +T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i +u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t +t3)))) (arity g c t2 a0) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 +(THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T +(\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 +i u0 u u2)) (arity g c t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead +(Flat Cast) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat +Cast) x t) (\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c x a0 (H1 d1 u0 +i H4 c x (fsubst0_snd i u0 c u x H12)) t H2) t2 H11)))) H10)) (\lambda (H10: +(ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t3: +T).(subst0 (s (Flat Cast) i) u0 t t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 +(THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t +t3)) (arity g c t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat +Cast) u x))).(\lambda (H12: (subst0 (s (Flat Cast) i) u0 t x)).(eq_ind_r T +(THead (Flat Cast) u x) (\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c u +a0 H0 x (H3 d1 u0 i H4 c x (fsubst0_snd i u0 c t x H12))) t2 H11)))) H10)) +(\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) @@ -1089,29 +1089,29 @@ Cast) i) u0 t x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t0: T).(arity g c2 t0 a0)) (arity_cast g c2 x0 a0 (H1 d1 u0 i H4 c2 x0 (fsubst0_both i u0 c u x0 H12 c2 H9)) x1 (H3 d1 u0 i H4 c2 x1 (fsubst0_both i u0 c t x1 H13 c2 H9))) t2 H11)))))) H10)) (subst0_gen_head (Flat Cast) u0 u t -t2 i H8)))) H7)) H6))))))))))))))))) (\lambda (c: C).(\lambda (t: T).(\lambda -(a1: A).(\lambda (_: (arity g c t a1)).(\lambda (H1: ((\forall (d1: -C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u)) \to -(\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 t2) \to (arity g c2 t2 -a1)))))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (d1: -C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H3: (getl i c (CHead d1 (Bind -Abbr) u))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i u c t -c2 t2)).(let H5 \def (fsubst0_gen_base c c2 t t2 u i H4) in (or3_ind (land -(eq C c c2) (subst0 i u t t2)) (land (eq T t t2) (csubst0 i u c c2)) (land -(subst0 i u t t2) (csubst0 i u c c2)) (arity g c2 t2 a2) (\lambda (H6: (land -(eq C c c2) (subst0 i u t t2))).(and_ind (eq C c c2) (subst0 i u t t2) (arity -g c2 t2 a2) (\lambda (H7: (eq C c c2)).(\lambda (H8: (subst0 i u t -t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) (arity_repl g c t2 a1 -(H1 d1 u i H3 c t2 (fsubst0_snd i u c t t2 H8)) a2 H2) c2 H7))) H6)) (\lambda -(H6: (land (eq T t t2) (csubst0 i u c c2))).(and_ind (eq T t t2) (csubst0 i u -c c2) (arity g c2 t2 a2) (\lambda (H7: (eq T t t2)).(\lambda (H8: (csubst0 i -u c c2)).(eq_ind T t (\lambda (t0: T).(arity g c2 t0 a2)) (arity_repl g c2 t -a1 (H1 d1 u i H3 c2 t (fsubst0_fst i u c t c2 H8)) a2 H2) t2 H7))) H6)) -(\lambda (H6: (land (subst0 i u t t2) (csubst0 i u c c2))).(and_ind (subst0 i -u t t2) (csubst0 i u c c2) (arity g c2 t2 a2) (\lambda (H7: (subst0 i u t -t2)).(\lambda (H8: (csubst0 i u c c2)).(arity_repl g c2 t2 a1 (H1 d1 u i H3 -c2 t2 (fsubst0_both i u c t t2 H7 c2 H8)) a2 H2))) H6)) H5)))))))))))))))) c1 -t1 a H))))). +t2 i H8)))) H7)) H6)))))))))))))))))) (\lambda (c: C).(\lambda (t: +T).(\lambda (a1: A).(\lambda (_: (arity g c t a1)).(\lambda (H1: ((\forall +(d1: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) +u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 t2) \to (arity +g c2 t2 a1)))))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda +(d1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H3: (getl i c (CHead d1 +(Bind Abbr) u))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i u +c t c2 t2)).(let H_x \def (fsubst0_gen_base c c2 t t2 u i H4) in (let H5 \def +H_x in (or3_ind (land (eq C c c2) (subst0 i u t t2)) (land (eq T t t2) +(csubst0 i u c c2)) (land (subst0 i u t t2) (csubst0 i u c c2)) (arity g c2 +t2 a2) (\lambda (H6: (land (eq C c c2) (subst0 i u t t2))).(and_ind (eq C c +c2) (subst0 i u t t2) (arity g c2 t2 a2) (\lambda (H7: (eq C c c2)).(\lambda +(H8: (subst0 i u t t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) +(arity_repl g c t2 a1 (H1 d1 u i H3 c t2 (fsubst0_snd i u c t t2 H8)) a2 H2) +c2 H7))) H6)) (\lambda (H6: (land (eq T t t2) (csubst0 i u c c2))).(and_ind +(eq T t t2) (csubst0 i u c c2) (arity g c2 t2 a2) (\lambda (H7: (eq T t +t2)).(\lambda (H8: (csubst0 i u c c2)).(eq_ind T t (\lambda (t0: T).(arity g +c2 t0 a2)) (arity_repl g c2 t a1 (H1 d1 u i H3 c2 t (fsubst0_fst i u c t c2 +H8)) a2 H2) t2 H7))) H6)) (\lambda (H6: (land (subst0 i u t t2) (csubst0 i u +c c2))).(and_ind (subst0 i u t t2) (csubst0 i u c c2) (arity g c2 t2 a2) +(\lambda (H7: (subst0 i u t t2)).(\lambda (H8: (csubst0 i u c +c2)).(arity_repl g c2 t2 a1 (H1 d1 u i H3 c2 t2 (fsubst0_both i u c t t2 H7 +c2 H8)) a2 H2))) H6)) H5))))))))))))))))) c1 t1 a H))))). theorem arity_subst0: \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (a: A).((arity g c diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/clear/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/clear/fwd.ma index c03161330..ede997e95 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/clear/fwd.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/clear/fwd.ma @@ -21,93 +21,85 @@ theorem clear_gen_sort: Prop).P))) \def \lambda (x: C).(\lambda (n: nat).(\lambda (H: (clear (CSort n) x)).(\lambda -(P: Prop).(let H0 \def (match H in clear return (\lambda (c: C).(\lambda (c0: -C).(\lambda (_: (clear c c0)).((eq C c (CSort n)) \to ((eq C c0 x) \to P))))) -with [(clear_bind b e u) \Rightarrow (\lambda (H0: (eq C (CHead e (Bind b) u) -(CSort n))).(\lambda (H1: (eq C (CHead e (Bind b) u) x)).((let H2 \def -(eq_ind C (CHead e (Bind b) u) (\lambda (e0: C).(match e0 in C return +(P: Prop).(insert_eq C (CSort n) (\lambda (c: C).(clear c x)) (\lambda (_: +C).P) (\lambda (y: C).(\lambda (H0: (clear y x)).(clear_ind (\lambda (c: +C).(\lambda (_: C).((eq C c (CSort n)) \to P))) (\lambda (b: B).(\lambda (e: +C).(\lambda (u: T).(\lambda (H1: (eq C (CHead e (Bind b) u) (CSort n))).(let +H2 \def (eq_ind C (CHead e (Bind b) u) (\lambda (ee: C).(match ee in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) -\Rightarrow True])) I (CSort n) H0) in (False_ind ((eq C (CHead e (Bind b) u) -x) \to P) H2)) H1))) | (clear_flat e c H0 f u) \Rightarrow (\lambda (H1: (eq -C (CHead e (Flat f) u) (CSort n))).(\lambda (H2: (eq C c x)).((let H3 \def -(eq_ind C (CHead e (Flat f) u) (\lambda (e0: C).(match e0 in C return -(\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) -\Rightarrow True])) I (CSort n) H1) in (False_ind ((eq C c x) \to ((clear e -c) \to P)) H3)) H2 H0)))]) in (H0 (refl_equal C (CSort n)) (refl_equal C -x)))))). +\Rightarrow True])) I (CSort n) H1) in (False_ind P H2)))))) (\lambda (e: +C).(\lambda (c: C).(\lambda (_: (clear e c)).(\lambda (_: (((eq C e (CSort +n)) \to P))).(\lambda (f: F).(\lambda (u: T).(\lambda (H3: (eq C (CHead e +(Flat f) u) (CSort n))).(let H4 \def (eq_ind C (CHead e (Flat f) u) (\lambda +(ee: C).(match ee in C return (\lambda (_: C).Prop) with [(CSort _) +\Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in +(False_ind P H4))))))))) y x H0))) H)))). theorem clear_gen_bind: \forall (b: B).(\forall (e: C).(\forall (x: C).(\forall (u: T).((clear (CHead e (Bind b) u) x) \to (eq C x (CHead e (Bind b) u)))))) \def \lambda (b: B).(\lambda (e: C).(\lambda (x: C).(\lambda (u: T).(\lambda (H: -(clear (CHead e (Bind b) u) x)).(let H0 \def (match H in clear return -(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (clear c c0)).((eq C c (CHead e -(Bind b) u)) \to ((eq C c0 x) \to (eq C x (CHead e (Bind b) u))))))) with -[(clear_bind b0 e0 u0) \Rightarrow (\lambda (H0: (eq C (CHead e0 (Bind b0) -u0) (CHead e (Bind b) u))).(\lambda (H1: (eq C (CHead e0 (Bind b0) u0) -x)).((let H2 \def (f_equal C T (\lambda (e1: C).(match e1 in C return -(\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow -t])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H0) in ((let H3 \def +(clear (CHead e (Bind b) u) x)).(insert_eq C (CHead e (Bind b) u) (\lambda +(c: C).(clear c x)) (\lambda (c: C).(eq C x c)) (\lambda (y: C).(\lambda (H0: +(clear y x)).(clear_ind (\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e +(Bind b) u)) \to (eq C c0 c)))) (\lambda (b0: B).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (H1: (eq C (CHead e0 (Bind b0) u0) (CHead e (Bind b) +u))).(let H2 \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 b0) u0) (CHead e (Bind b) u) H1) 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 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 -b0) u0) (CHead e (Bind b) u) H0) in (eq_ind C e (\lambda (c: C).((eq B b0 b) -\to ((eq T u0 u) \to ((eq C (CHead c (Bind b0) u0) x) \to (eq C x (CHead e -(Bind b) u)))))) (\lambda (H5: (eq B b0 b)).(eq_ind B b (\lambda (b1: B).((eq -T u0 u) \to ((eq C (CHead e (Bind b1) u0) x) \to (eq C x (CHead e (Bind b) -u))))) (\lambda (H6: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C (CHead e -(Bind b) t) x) \to (eq C x (CHead e (Bind b) u)))) (\lambda (H7: (eq C (CHead -e (Bind b) u) x)).(eq_ind C (CHead e (Bind b) u) (\lambda (c: C).(eq C c -(CHead e (Bind b) u))) (refl_equal C (CHead e (Bind b) u)) x H7)) u0 (sym_eq -T u0 u H6))) b0 (sym_eq B b0 b H5))) e0 (sym_eq C e0 e H4))) H3)) H2)) H1))) -| (clear_flat e0 c H0 f u0) \Rightarrow (\lambda (H1: (eq C (CHead e0 (Flat -f) u0) (CHead e (Bind b) u))).(\lambda (H2: (eq C c x)).((let H3 \def (eq_ind -C (CHead e0 (Flat f) u0) (\lambda (e1: C).(match e1 in C return (\lambda (_: -C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match -k in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat -_) \Rightarrow True])])) I (CHead e (Bind b) u) H1) in (False_ind ((eq C c x) -\to ((clear e0 c) \to (eq C x (CHead e (Bind b) u)))) H3)) H2 H0)))]) in (H0 -(refl_equal C (CHead e (Bind b) u)) (refl_equal C x))))))). +b0])])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H1) in ((let H4 \def +(f_equal C T (\lambda (e1: C).(match e1 in C return (\lambda (_: C).T) with +[(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e0 (Bind +b0) u0) (CHead e (Bind b) u) H1) in (\lambda (H5: (eq B b0 b)).(\lambda (H6: +(eq C e0 e)).(eq_ind_r T u (\lambda (t: T).(eq C (CHead e0 (Bind b0) t) +(CHead e0 (Bind b0) t))) (eq_ind_r C e (\lambda (c: C).(eq C (CHead c (Bind +b0) u) (CHead c (Bind b0) u))) (eq_ind_r B b (\lambda (b1: B).(eq C (CHead e +(Bind b1) u) (CHead e (Bind b1) u))) (refl_equal C (CHead e (Bind b) u)) b0 +H5) e0 H6) u0 H4)))) H3)) H2)))))) (\lambda (e0: C).(\lambda (c: C).(\lambda +(_: (clear e0 c)).(\lambda (_: (((eq C e0 (CHead e (Bind b) u)) \to (eq C c +e0)))).(\lambda (f: F).(\lambda (u0: T).(\lambda (H3: (eq C (CHead e0 (Flat +f) u0) (CHead e (Bind b) u))).(let H4 \def (eq_ind C (CHead e0 (Flat f) u0) +(\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 _) \Rightarrow False | (Flat _) \Rightarrow +True])])) I (CHead e (Bind b) u) H3) in (False_ind (eq C c (CHead e0 (Flat f) +u0)) H4))))))))) y x H0))) H))))). theorem clear_gen_flat: \forall (f: F).(\forall (e: C).(\forall (x: C).(\forall (u: T).((clear (CHead e (Flat f) u) x) \to (clear e x))))) \def \lambda (f: F).(\lambda (e: C).(\lambda (x: C).(\lambda (u: T).(\lambda (H: -(clear (CHead e (Flat f) u) x)).(let H0 \def (match H in clear return -(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (clear c c0)).((eq C c (CHead e -(Flat f) u)) \to ((eq C c0 x) \to (clear e x)))))) with [(clear_bind b e0 u0) -\Rightarrow (\lambda (H0: (eq C (CHead e0 (Bind b) u0) (CHead e (Flat f) -u))).(\lambda (H1: (eq C (CHead e0 (Bind b) u0) x)).((let H2 \def (eq_ind C -(CHead e0 (Bind b) u0) (\lambda (e1: C).(match e1 in C return (\lambda (_: -C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match -k in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat -_) \Rightarrow False])])) I (CHead e (Flat f) u) H0) in (False_ind ((eq C -(CHead e0 (Bind b) u0) x) \to (clear e x)) H2)) H1))) | (clear_flat e0 c H0 -f0 u0) \Rightarrow (\lambda (H1: (eq C (CHead e0 (Flat f0) u0) (CHead e (Flat -f) u))).(\lambda (H2: (eq C c x)).((let H3 \def (f_equal C T (\lambda (e1: +(clear (CHead e (Flat f) u) x)).(insert_eq C (CHead e (Flat f) u) (\lambda +(c: C).(clear c x)) (\lambda (_: C).(clear e x)) (\lambda (y: C).(\lambda +(H0: (clear y x)).(clear_ind (\lambda (c: C).(\lambda (c0: C).((eq C c (CHead +e (Flat f) u)) \to (clear e c0)))) (\lambda (b: B).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (H1: (eq C (CHead e0 (Bind b) u0) (CHead e (Flat f) +u))).(let H2 \def (eq_ind C (CHead e0 (Bind b) u0) (\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 _) +\Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e (Flat f) u) H1) +in (False_ind (clear e (CHead e0 (Bind b) u0)) H2)))))) (\lambda (e0: +C).(\lambda (c: C).(\lambda (H1: (clear e0 c)).(\lambda (H2: (((eq C e0 +(CHead e (Flat f) u)) \to (clear e c)))).(\lambda (f0: F).(\lambda (u0: +T).(\lambda (H3: (eq C (CHead e0 (Flat f0) u0) (CHead e (Flat f) u))).(let H4 +\def (f_equal C C (\lambda (e1: C).(match e1 in C return (\lambda (_: C).C) +with [(CSort _) \Rightarrow e0 | (CHead c0 _ _) \Rightarrow c0])) (CHead e0 +(Flat f0) u0) (CHead e (Flat f) u) H3) in ((let H5 \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 f1) \Rightarrow f1])])) (CHead e0 (Flat f0) +u0) (CHead e (Flat f) u) H3) in ((let H6 \def (f_equal C T (\lambda (e1: C).(match e1 in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) -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 -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 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) -\to ((eq C c x) \to ((clear e c) \to (clear e x))))) (\lambda (H7: (eq T u0 -u)).(eq_ind T u (\lambda (_: T).((eq C c x) \to ((clear e c) \to (clear e -x)))) (\lambda (H8: (eq C c x)).(eq_ind C x (\lambda (c0: C).((clear e c0) -\to (clear e x))) (\lambda (H9: (clear e x)).H9) c (sym_eq C c x H8))) u0 -(sym_eq T u0 u H7))) f0 (sym_eq F f0 f H6))) e0 (sym_eq C e0 e H5))) H4)) -H3)) H2 H0)))]) in (H0 (refl_equal C (CHead e (Flat f) u)) (refl_equal C -x))))))). +H3) in (\lambda (_: (eq F f0 f)).(\lambda (H8: (eq C e0 e)).(let H9 \def +(eq_ind C e0 (\lambda (c0: C).((eq C c0 (CHead e (Flat f) u)) \to (clear e +c))) H2 e H8) in (let H10 \def (eq_ind C e0 (\lambda (c0: C).(clear c0 c)) H1 +e H8) in H10))))) H5)) H4))))))))) y x H0))) H))))). theorem clear_gen_flat_r: \forall (f: F).(\forall (x: C).(\forall (e: C).(\forall (u: T).((clear x diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubst0/drop.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubst0/drop.ma index d7e31cf82..dab261bc6 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubst0/drop.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubst0/drop.ma @@ -30,21 +30,12 @@ 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 (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))) -| (le_S m H2) \Rightarrow (\lambda (H3: (eq nat (S m) O)).((let H4 \def -(eq_ind nat (S m) (\lambda (e0: nat).(match e0 in nat return (\lambda (_: -nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H3) in -(False_ind ((le (S i) m) \to (drop O O c2 e)) H4)) H2))]) in (H2 (refl_equal -nat O))))))))))) (\lambda (n0: nat).(\lambda (H: ((\forall (i: nat).((lt i -n0) \to (\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 -c2) \to (\forall (e: C).((drop n0 O c1 e) \to (drop n0 O c2 -e))))))))))).(\lambda (i: nat).(\lambda (H0: (lt i (S n0))).(\lambda (c1: -C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c -c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 e))))))) +O c1 e)).(lt_x_O i H (drop O O c2 e)))))))))) (\lambda (n0: nat).(\lambda (H: +((\forall (i: nat).((lt i n0) \to (\forall (c1: C).(\forall (c2: C).(\forall +(v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n0 O c1 e) \to (drop +n0 O c2 e))))))))))).(\lambda (i: nat).(\lambda (H0: (lt i (S n0))).(\lambda +(c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v +c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 e))))))) (\lambda (n1: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (_: (csubst0 i v (CSort n1) c2)).(\lambda (e: C).(\lambda (H2: (drop (S n0) O (CSort n1) e)).(and3_ind (eq C e (CSort n1)) (eq nat (S n0) O) (eq nat O O) (drop (S n0) @@ -181,21 +172,12 @@ 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 (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))) -| (le_S m H2) \Rightarrow (\lambda (H3: (eq nat (S m) O)).((let H4 \def -(eq_ind nat (S m) (\lambda (e0: nat).(match e0 in nat return (\lambda (_: -nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H3) in -(False_ind ((le (S i) m) \to (drop O O c1 e)) H4)) H2))]) in (H2 (refl_equal -nat O))))))))))) (\lambda (n0: nat).(\lambda (H: ((\forall (i: nat).((lt i -n0) \to (\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c1 -c2) \to (\forall (e: C).((drop n0 O c2 e) \to (drop n0 O c1 -e))))))))))).(\lambda (i: nat).(\lambda (H0: (lt i (S n0))).(\lambda (c1: -C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v c -c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (drop (S n0) O c e))))))) +O c2 e)).(lt_x_O i H (drop O O c1 e)))))))))) (\lambda (n0: nat).(\lambda (H: +((\forall (i: nat).((lt i n0) \to (\forall (c1: C).(\forall (c2: C).(\forall +(v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n0 O c2 e) \to (drop +n0 O c1 e))))))))))).(\lambda (i: nat).(\lambda (H0: (lt i (S n0))).(\lambda +(c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: T).((csubst0 i v +c c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (drop (S n0) O c e))))))) (\lambda (n1: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (H1: (csubst0 i v (CSort n1) c2)).(\lambda (e: C).(\lambda (_: (drop (S n0) O c2 e)).(csubst0_gen_sort c2 v i n1 H1 (drop (S n0) O (CSort n1) e)))))))) @@ -633,10 +615,230 @@ K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k (S n0))) v e1 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 (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) +(H2: (drop (S n0) O (CHead c k t) e)).(or3_ind (ex3_2 T nat (\lambda (_: +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)))) (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)))) (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))))) (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)))))))) +(\lambda (H3: (ex3_2 T nat (\lambda (_: 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))))).(ex3_2_ind T nat (\lambda (_: +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))) (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)))))))) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H4: +(eq nat i (s k x1))).(\lambda (H5: (eq C c2 (CHead c k x0))).(\lambda (_: +(subst0 x1 v t x0)).(eq_ind_r C (CHead c k x0) (\lambda (c0: C).(or4 (drop (S +n0) O c0 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 c0 (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 c0 (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 c0 (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))))))))) (let +H7 \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 (or4 +(drop (S n0) O c3 e0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 +(CHead e1 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus n1 (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C +T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c3 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (s k0 +(S n0))) 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 e0 (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n1 (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 +(S n0))) v0 e1 e2)))))))))))))) H0 (s k x1) H4) in (let H8 \def (eq_ind nat i +(\lambda (n1: nat).(lt (S n0) n1)) H (s k x1) H4) in (eq_ind_r nat (s k x1) +(\lambda (n1: nat).(or4 (drop (S n0) O (CHead c k x0) 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 (CHead c k x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n1 (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 +(CHead c k x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (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 (CHead c k x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 +(S n0))) v e1 e2))))))))) (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 (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 k0 x1) +(s k1 (S n0))) v0 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 k0 x1) (s k1 (S n0))) v0 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 k0 x1) (s k1 (S n0))) v0 +u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v0 e1 +e2)))))))))))))) \to ((lt (S n0) (s k0 x1)) \to (or4 (drop (S n0) O (CHead c +k0 x0) 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 k0 x0) (CHead +e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k0 x1) (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 k0 x0) (CHead e2 k1 u)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k0 x1) (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 k0 x0) (CHead e2 +k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v u w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v e1 e2)))))))))))) (\lambda +(b: B).(\lambda (H9: (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 (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x1) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) 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 e0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x1) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 +(S n0))) v0 e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Bind b) +x1))).(or4_intro0 (drop (S n0) O (CHead c (Bind b) x0) 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 (CHead c (Bind b) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x1) (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 (CHead c (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) x1) (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 (CHead c (Bind b) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 +e2))))))) (drop_drop (Bind b) n0 c e H9 x0)))))) (\lambda (f: F).(\lambda +(H9: (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 (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead +e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) 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 e0 (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v0 e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) +x1))).(or4_intro0 (drop (S n0) O (CHead c (Flat f) x0) 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 (CHead c (Flat f) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x1) (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 (CHead c (Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) x1) (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 (CHead c (Flat f) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 +e2))))))) (drop_drop (Flat f) n0 c e H9 x0)))))) k (drop_gen_drop k c e t n0 +H2) H7 H8) i H4))) c2 H5)))))) H3)) (\lambda (H3: (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))) (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: @@ -652,1880 +854,1463 @@ 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 (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 (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 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 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 -(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 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 (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: +(S n0))) v e1 e2)))))))) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H4: +(eq nat i (s k x1))).(\lambda (H5: (eq C c2 (CHead x0 k t))).(\lambda (H6: +(csubst0 x1 v c x0)).(eq_ind_r C (CHead x0 k t) (\lambda (c0: C).(or4 (drop +(S n0) O c0 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 c0 (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 c0 (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 c0 (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))))))))) (let +H7 \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 (or4 +(drop (S n0) O c3 e0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (u: T).(\lambda (_: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 +(CHead e1 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus n1 (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C +T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c3 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (s k0 +(S n0))) 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 e0 (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: 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 -(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 (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 (_: (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: +(minus n1 (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 +(S n0))) v0 e1 e2)))))))))))))) H0 (s k x1) H4) in (let H8 \def (eq_ind nat i +(\lambda (n1: nat).(lt (S n0) n1)) H (s k x1) H4) in (eq_ind_r nat (s k x1) +(\lambda (n1: nat).(or4 (drop (S n0) O (CHead x0 k t) 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 (CHead x0 k t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n1 (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 +(CHead x0 k t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (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 (CHead x0 k t) (CHead e2 k0 w))))))) (\lambda (k0: 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 (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 +(minus n1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 +(S n0))) v e1 e2))))))))) (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 (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: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 x1) +(s k1 (S n0))) v0 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 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 _ _ 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)))))) (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 (_: 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 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 (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: +C).(\lambda (_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v0 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 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 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 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))))))) (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 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 (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 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 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 -(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 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 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 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 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 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 (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 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 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 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 (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 (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: +n0) O c3 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v0 +u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v0 e1 +e2)))))))))))))) \to ((lt (S n0) (s k0 x1)) \to (or4 (drop (S n0) O (CHead x0 +k0 t) 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 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 (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: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 k0 t) (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 (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 +T).(subst0 (minus (s k0 x1) (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 (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 +C).(\lambda (u: T).(drop (S n0) O (CHead x0 k0 t) (CHead e2 k1 u)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k0 x1) (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 (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 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: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 k0 t) (CHead e2 +k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k0 x1) (s k1 (S n0))) v u w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s k0 x1) (s k1 (S n0))) v e1 e2)))))))))))) (\lambda +(b: B).(\lambda (H9: (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 (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x1) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) 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 e0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x1) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 +(S n0))) v0 e1 e2))))))))))))))).(\lambda (H11: (lt (S n0) (s (Bind b) +x1))).(let H12 \def (IHn x1 (le_S_n (S n0) x1 H11) c x0 v H6 e H9) in +(or4_ind (drop n0 O x0 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 n0 O x0 (CHead e0 +k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x1 (s k0 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 n0 O x0 (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x1 (s k0 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 n0 O x0 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x1 (s k0 +n0)) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus x1 (s k0 n0)) v e1 e2))))))) (or4 +(drop (S n0) O (CHead x0 (Bind b) t) 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 (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x1) (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 (CHead x0 +(Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (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 (CHead x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: 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: +(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) x1) (s k0 (S n0))) v e1 e2)))))))) (\lambda (H13: (drop n0 O x0 +e)).(or4_intro0 (drop (S n0) O (CHead x0 (Bind b) t) 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 (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x1) (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 (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: 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: +b) x1) (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 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 +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 +e2))))))) (drop_drop (Bind b) n0 x0 e H13 t))) (\lambda (H13: (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 n0 O x0 (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x1 (s k0 +n0)) v u w))))))).(ex3_4_ind 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 n0 O x0 (CHead e0 +k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x1 (s k0 n0)) v u w))))) (or4 (drop (S n0) O (CHead x0 +(Bind b) t) 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 (CHead x0 (Bind b) t) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (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 (CHead x0 (Bind b) t) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) x1) (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 (CHead -c3 (Bind b) u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: 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: +x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: +T).(\lambda (x5: T).(\lambda (H14: (eq C e (CHead x3 x2 x4))).(\lambda (H15: +(drop n0 O x0 (CHead x3 x2 x5))).(\lambda (H16: (subst0 (minus x1 (s x2 n0)) +v x4 x5)).(eq_ind_r C (CHead x3 x2 x4) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x0 (Bind b) t) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda +(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (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 c0 (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 +(Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (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 c0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: 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 +(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: 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: +(Bind b) x1) (s k0 (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S n0) O +(CHead x0 (Bind b) t) (CHead x3 x2 x4)) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x4) +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x1) (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 (CHead x3 x2 +x4) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) x1) (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 (CHead x3 x2 x4) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 +(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v e1 e2))))))) (ex3_4_intro K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x4) (CHead e0 k0 +u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) -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 +x1) (s k0 (S n0))) v u w))))) x2 x3 x4 x5 (refl_equal C (CHead x3 x2 x4)) +(drop_drop (Bind b) n0 x0 (CHead x3 x2 x5) H15 t) (eq_ind_r nat (S (s x2 n0)) +(\lambda (n1: nat).(subst0 (minus (s (Bind b) x1) n1) v x4 x5)) H16 (s x2 (S +n0)) (s_S x2 n0)))) e H14)))))))) H13)) (\lambda (H13: (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 n0 O x0 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x1 (s k0 +n0)) v e1 e2))))))).(ex3_4_ind 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 n0 O x0 (CHead e2 +k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus x1 (s k0 n0)) v e1 e2))))) (or4 (drop (S n0) O (CHead x0 +(Bind b) t) 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 (CHead x0 (Bind b) t) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (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 (CHead x0 (Bind b) t) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) x1) (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 (CHead -c3 (Bind b) u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: 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: +x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: +C).(\lambda (x5: T).(\lambda (H14: (eq C e (CHead x3 x2 x5))).(\lambda (H15: +(drop n0 O x0 (CHead x4 x2 x5))).(\lambda (H16: (csubst0 (minus x1 (s x2 n0)) +v x3 x4)).(eq_ind_r C (CHead x3 x2 x5) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x0 (Bind b) t) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda +(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (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 c0 (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 +(Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (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 c0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: 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 +(minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: 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: +(Bind b) x1) (s k0 (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S n0) O +(CHead x0 (Bind b) t) (CHead x3 x2 x5)) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x1) (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 (CHead x3 x2 +x5) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) x1) (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 (CHead x3 x2 x5) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 +(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v e1 e2))))))) (ex3_4_intro K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 x2 x5) (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: 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: +b) x1) (s k0 (S n0))) v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead x3 x2 +x5)) (drop_drop (Bind b) n0 x0 (CHead x4 x2 x5) H15 t) (eq_ind_r nat (S (s x2 +n0)) (\lambda (n1: nat).(csubst0 (minus (s (Bind b) x1) n1) v x3 x4)) H16 (s +x2 (S n0)) (s_S x2 n0)))) e H14)))))))) H13)) (\lambda (H13: (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 n0 O x0 (CHead e2 +k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus x1 (s k0 n0)) v u w)))))) (\lambda (k0: 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: +(minus x1 (s k0 n0)) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k0: 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: +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x0 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x1 (s k0 n0)) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x1 (s k0 +n0)) v e1 e2)))))) (or4 (drop (S n0) O (CHead x0 (Bind b) t) 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 (CHead x0 (Bind b) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x1) (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 (CHead x0 (Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: 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: +b) x1) (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 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 +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 +e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (x6: T).(\lambda (H14: (eq C e (CHead x3 x2 x5))).(\lambda (H15: +(drop n0 O x0 (CHead x4 x2 x6))).(\lambda (H16: (subst0 (minus x1 (s x2 n0)) +v x5 x6)).(\lambda (H17: (csubst0 (minus x1 (s x2 n0)) v x3 x4)).(eq_ind_r C +(CHead x3 x2 x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Bind b) t) +c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (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 c0 (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) x1) (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 c0 (CHead e1 k0 u))))))) (\lambda (k0: 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 (_: +x0 (Bind b) t) (CHead e2 k0 w))))))) (\lambda (k0: 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: +x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 +(S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead x0 (Bind b) t) +(CHead x3 x2 x5)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) (CHead e0 k0 u)))))) (\lambda +(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead x0 (Bind b) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (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 (CHead x3 x2 x5) (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O +(CHead x0 (Bind b) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (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 (CHead x3 x2 x5) +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 +e2))))))) (ex4_5_intro K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2)))))) x2 x3 x4 x5 x6 +(refl_equal C (CHead x3 x2 x5)) (drop_drop (Bind b) n0 x0 (CHead x4 x2 x6) +H15 t) (eq_ind_r nat (S (s x2 n0)) (\lambda (n1: nat).(subst0 (minus (s (Bind +b) x1) n1) v x5 x6)) H16 (s x2 (S n0)) (s_S x2 n0)) (eq_ind_r nat (S (s x2 +n0)) (\lambda (n1: nat).(csubst0 (minus (s (Bind b) x1) n1) v x3 x4)) H17 (s +x2 (S n0)) (s_S x2 n0)))) e H14)))))))))) H13)) H12)))))) (\lambda (f: +F).(\lambda (H9: (drop (r (Flat f) n0) O c e)).(\lambda (H10: ((\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 (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: 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 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 (_: +x1) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) 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 e0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: 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: +x1) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 +(S n0))) v0 e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) +x1))).(let H12 \def (H10 x0 v H6 e H9) in (or4_ind (drop (S n0) O x0 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 x0 (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x1 (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 x0 (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus x1 (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 x0 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x1 +(s k0 (S n0))) v e1 e2))))))) (or4 (drop (S n0) O (CHead x0 (Flat f) t) 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 (CHead x0 (Flat f) t) (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) x1) (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 (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) x1) (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 (CHead x0 (Flat f) t) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 +e2)))))))) (\lambda (H13: (drop (S n0) O x0 e)).(or4_intro0 (drop (S n0) O +(CHead x0 (Flat f) t) 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 (CHead x0 +(Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (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 (CHead x0 (Flat f) t) +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (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 (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: 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 +(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: 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: +(Flat f) x1) (s k0 (S n0))) v e1 e2))))))) (drop_drop (Flat f) n0 x0 e H13 +t))) (\lambda (H13: (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 x0 (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x1 (s k0 (S n0))) v u w))))))).(ex3_4_ind 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 x0 (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x1 (s k0 (S n0))) v u +w))))) (or4 (drop (S n0) O (CHead x0 (Flat f) t) 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 (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: 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: +x1) (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 (CHead x0 +(Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (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 (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: 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 +(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: 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 (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: +(Flat f) x1) (s k0 (S n0))) v e1 e2)))))))) (\lambda (x2: K).(\lambda (x3: +C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H14: (eq C e (CHead x3 x2 +x4))).(\lambda (H15: (drop (S n0) O x0 (CHead x3 x2 x5))).(\lambda (H16: +(subst0 (minus x1 (s x2 (S n0))) v x4 x5)).(eq_ind_r C (CHead x3 x2 x4) +(\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Flat f) t) c0) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x1) (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 c0 (CHead e1 +k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: 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 +f) x1) (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 c0 +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 +e2))))))))) (or4_intro1 (drop (S n0) O (CHead x0 (Flat f) t) (CHead x3 x2 +x4)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x3 x2 x4) (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (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 (CHead x3 x2 x4) (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (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 (CHead x3 x2 x4) (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2))))))) (ex3_4_intro K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x3 x2 x4) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w))))) +x2 x3 x4 x5 (refl_equal C (CHead x3 x2 x4)) (drop_drop (Flat f) n0 x0 (CHead +x3 x2 x5) H15 t) H16)) e H14)))))))) H13)) (\lambda (H13: (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 x0 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x1 (s k0 +(S n0))) v e1 e2))))))).(ex3_4_ind 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 x0 (CHead +e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus x1 (s k0 (S n0))) v e1 e2))))) (or4 (drop (S n0) O (CHead +x0 (Flat f) t) 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 (CHead x0 (Flat f) t) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (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 (CHead x0 (Flat f) t) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Flat f) x1) (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 (CHead -c3 (Flat f) u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +x0 (Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: 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 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: +x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: +C).(\lambda (x5: T).(\lambda (H14: (eq C e (CHead x3 x2 x5))).(\lambda (H15: +(drop (S n0) O x0 (CHead x4 x2 x5))).(\lambda (H16: (csubst0 (minus x1 (s x2 +(S n0))) v x3 x4)).(eq_ind_r C (CHead x3 x2 x5) (\lambda (c0: C).(or4 (drop +(S n0) O (CHead x0 (Flat f) t) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) +(\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (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 c0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O +(CHead x0 (Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (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 c0 (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S +n0) O (CHead x0 (Flat f) t) (CHead x3 x2 x5)) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x1) (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 (CHead x3 x2 +x5) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) x1) (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 (CHead x3 x2 x5) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 +(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v e1 e2))))))) (ex3_4_intro K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 x2 x5) (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) x1) (s k0 (S n0))) v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead x3 x2 +x5)) (drop_drop (Flat f) n0 x0 (CHead x4 x2 x5) H15 t) H16)) e H14)))))))) +H13)) (\lambda (H13: (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 x0 (CHead e2 k0 w))))))) (\lambda (k0: 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 (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: +(minus x1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x1 (s k0 +(S n0))) v e1 e2)))))))).(ex4_5_ind 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 x0 (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus x1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x1 (s k0 +(S n0))) v e1 e2)))))) (or4 (drop (S n0) O (CHead x0 (Flat f) t) 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 (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x1) (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 (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) (\lambda (k0: 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 -n v c1 c2) \to (\forall (e: C).((drop n O c1 e) \to (or4 (drop n 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: 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)))))))))))))) +f) x1) (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 (CHead x0 (Flat f) t) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 +e2)))))))) (\lambda (x2: K).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (x6: T).(\lambda (H14: (eq C e (CHead x3 x2 x5))).(\lambda (H15: +(drop (S n0) O x0 (CHead x4 x2 x6))).(\lambda (H16: (subst0 (minus x1 (s x2 +(S n0))) v x5 x6)).(\lambda (H17: (csubst0 (minus x1 (s x2 (S n0))) v x3 +x4)).(eq_ind_r C (CHead x3 x2 x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead +x0 (Flat f) t) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (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 c0 (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (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 c0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x1) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) x1) (s k0 (S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O +(CHead x0 (Flat f) t) (CHead x3 x2 x5)) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x1) (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 (CHead x3 x2 +x5) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) x1) (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 (CHead x3 x2 x5) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Flat f) t) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 +(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v e1 e2))))))) (ex4_5_intro K C C T T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 x2 x5) +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x1) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 +e2)))))) x2 x3 x4 x5 x6 (refl_equal C (CHead x3 x2 x5)) (drop_drop (Flat f) +n0 x0 (CHead x4 x2 x6) H15 t) H16 H17)) e H14)))))))))) H13)) H12)))))) k +(drop_gen_drop k c e t n0 H2) H7 H8) i H4))) c2 H5)))))) H3)) (\lambda (H3: +(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)))))).(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)))) (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)))))))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: +nat).(\lambda (H4: (eq nat i (s k x2))).(\lambda (H5: (eq C c2 (CHead x1 k +x0))).(\lambda (_: (subst0 x2 v t x0)).(\lambda (H7: (csubst0 x2 v c +x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c0: C).(or4 (drop (S n0) O c0 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 c0 (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 c0 (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 c0 (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))))))))) (let 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 (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n1 (s k0 (S +n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead +e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus n1 (s k0 (S n0))) 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 e0 (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c3 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus n1 (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 +(s k0 (S n0))) v0 e1 e2)))))))))))))) H0 (s k x2) H4) in (let H9 \def (eq_ind +nat i (\lambda (n1: nat).(lt (S n0) n1)) H (s k x2) H4) in (eq_ind_r nat (s k +x2) (\lambda (n1: nat).(or4 (drop (S n0) O (CHead x1 k x0) 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 (CHead x1 k x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n1 (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 +(CHead x1 k x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n1 (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 (CHead x1 k x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n1 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n1 (s k0 +(S n0))) v e1 e2))))))))) (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 (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 k0 x2) +(s k1 (S n0))) v0 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 k0 x2) (s k1 (S n0))) v0 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 k0 x2) (s k1 (S n0))) v0 +u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s k0 x2) (s k1 (S n0))) v0 e1 +e2)))))))))))))) \to ((lt (S n0) (s k0 x2)) \to (or4 (drop (S n0) O (CHead x1 +k0 x0) 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 x1 k0 x0) +(CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k0 x2) (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 x1 k0 x0) (CHead e2 k1 u)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k0 x2) (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 x1 k0 x0) (CHead e2 +k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k0 x2) (s k1 (S n0))) v u w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s k0 x2) (s k1 (S n0))) v e1 e2)))))))))))) (\lambda +(b: B).(\lambda (H10: (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 (or4 (drop (S n0) O c3 e0) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x2) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) 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 e0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x2) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 +(S n0))) v0 e1 e2))))))))))))))).(\lambda (H12: (lt (S n0) (s (Bind b) +x2))).(let H13 \def (IHn x2 (le_S_n (S n0) x2 H12) c x1 v H7 e H10) in +(or4_ind (drop n0 O x1 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 n0 O x1 (CHead e0 +k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x2 (s k0 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 n0 O x1 (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x2 (s k0 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 n0 O x1 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 +n0)) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus x2 (s k0 n0)) v e1 e2))))))) (or4 +(drop (S n0) O (CHead x1 (Bind b) x0) 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 (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x2) (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 (CHead x1 +(Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (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 (CHead x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) x2) (s k0 (S n0))) v e1 e2)))))))) (\lambda (H14: (drop n0 O x1 +e)).(or4_intro0 (drop (S n0) O (CHead x1 (Bind b) x0) 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 (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x2) (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 (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) x2) (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 (CHead x1 (Bind b) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 +e2))))))) (drop_drop (Bind b) n0 x1 e H14 x0))) (\lambda (H14: (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 n0 O x1 (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 +n0)) v u w))))))).(ex3_4_ind 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 n0 O x1 (CHead e0 +k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x2 (s k0 n0)) v u w))))) (or4 (drop (S n0) O (CHead x1 +(Bind b) x0) 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 (CHead x1 (Bind b) x0) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (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 (CHead x1 (Bind b) x0) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) x2) (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 (CHead +x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x4 x3 x5))).(\lambda (H16: +(drop n0 O x1 (CHead x4 x3 x6))).(\lambda (H17: (subst0 (minus x2 (s x3 n0)) +v x5 x6)).(eq_ind_r C (CHead x4 x3 x5) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x1 (Bind b) x0) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda +(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (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 c0 (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (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 c0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) x2) (s k0 (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S n0) O +(CHead x1 (Bind b) x0) (CHead x4 x3 x5)) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x5) +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x2) (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 (CHead x4 x3 +x5) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) x2) (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 (CHead x4 x3 x5) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 +(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S +n0))) v e1 e2))))))) (ex3_4_intro K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x5) (CHead e0 k0 +u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x2) (s k0 (S n0))) v u w))))) x3 x4 x5 x6 (refl_equal C (CHead x4 x3 x5)) +(drop_drop (Bind b) n0 x1 (CHead x4 x3 x6) H16 x0) (eq_ind_r nat (S (s x3 +n0)) (\lambda (n1: nat).(subst0 (minus (s (Bind b) x2) n1) v x5 x6)) H17 (s +x3 (S n0)) (s_S x3 n0)))) e H15)))))))) H14)) (\lambda (H14: (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 n0 O x1 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x2 (s k0 +n0)) v e1 e2))))))).(ex3_4_ind 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 n0 O x1 (CHead e2 +k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus x2 (s k0 n0)) v e1 e2))))) (or4 (drop (S n0) O (CHead x1 +(Bind b) x0) 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 (CHead x1 (Bind b) x0) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (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 (CHead x1 (Bind b) x0) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) x2) (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 (CHead +x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: C).(\lambda (x5: +C).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x4 x3 x6))).(\lambda (H16: +(drop n0 O x1 (CHead x5 x3 x6))).(\lambda (H17: (csubst0 (minus x2 (s x3 n0)) +v x4 x5)).(eq_ind_r C (CHead x4 x3 x6) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x1 (Bind b) x0) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda +(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (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 c0 (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (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 c0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) x2) (s k0 (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S n0) O +(CHead x1 (Bind b) x0) (CHead x4 x3 x6)) (ex3_4 K C T T (\lambda (k0: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x2) (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 (CHead x4 x3 +x6) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) x2) (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 (CHead x4 x3 x6) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 +(S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S +n0))) v e1 e2))))))) (ex3_4_intro K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 +u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) x2) (s k0 (S n0))) v e1 e2))))) x3 x4 x5 x6 (refl_equal C (CHead x4 x3 +x6)) (drop_drop (Bind b) n0 x1 (CHead x5 x3 x6) H16 x0) (eq_ind_r nat (S (s +x3 n0)) (\lambda (n1: nat).(csubst0 (minus (s (Bind b) x2) n1) v x4 x5)) H17 +(s x3 (S n0)) (s_S x3 n0)))) e H15)))))))) H14)) (\lambda (H14: (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 n0 O x1 (CHead +e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus x2 (s k0 n0)) v u w)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus x2 (s k0 n0)) v e1 e2)))))))).(ex4_5_ind 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 n0 O x1 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x2 (s k0 n0)) v u w)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x2 (s k0 +n0)) v e1 e2)))))) (or4 (drop (S n0) O (CHead x1 (Bind b) x0) 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 (CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) x2) (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 (CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) x2) (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 (CHead x1 (Bind b) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 +e2)))))))) (\lambda (x3: K).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: +T).(\lambda (x7: T).(\lambda (H15: (eq C e (CHead x4 x3 x6))).(\lambda (H16: +(drop n0 O x1 (CHead x5 x3 x7))).(\lambda (H17: (subst0 (minus x2 (s x3 n0)) +v x6 x7)).(\lambda (H18: (csubst0 (minus x2 (s x3 n0)) v x4 x5)).(eq_ind_r C +(CHead x4 x3 x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Bind b) x0) +c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C c0 (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (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 c0 (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) x2) (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 c0 (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x1 (Bind b) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 +(S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead x1 (Bind b) x0) +(CHead x4 x3 x6)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e0 k0 u)))))) (\lambda +(k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O +(CHead x1 (Bind b) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (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 (CHead x4 x3 x6) (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O +(CHead x1 (Bind b) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (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 (CHead x4 x3 x6) +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 +e2))))))) (ex4_5_intro K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2)))))) x3 x4 x5 +x6 x7 (refl_equal C (CHead x4 x3 x6)) (drop_drop (Bind b) n0 x1 (CHead x5 x3 +x7) H16 x0) (eq_ind_r nat (S (s x3 n0)) (\lambda (n1: nat).(subst0 (minus (s +(Bind b) x2) n1) v x6 x7)) H17 (s x3 (S n0)) (s_S x3 n0)) (eq_ind_r nat (S (s +x3 n0)) (\lambda (n1: nat).(csubst0 (minus (s (Bind b) x2) n1) v x4 x5)) H18 +(s x3 (S n0)) (s_S x3 n0)))) e H15)))))))))) H14)) H13)))))) (\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) x2) v0 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 (k0: K).(\lambda (e1: C).(\lambda (u: T).(\lambda (_: T).(eq C e0 +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c3 (CHead e1 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +x2) (s k0 (S n0))) v0 u w)))))) (ex3_4 K C C T (\lambda (k0: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c3 +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) 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 e0 (CHead e1 k0 u))))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c3 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +x2) (s k0 (S n0))) v0 u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 +(S n0))) v0 e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) +x2))).(let H13 \def (H11 x1 v H7 e H10) in (or4_ind (drop (S n0) O x1 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 x1 (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (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 x1 (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus x2 (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 x1 (CHead e2 k0 w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x2 (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus x2 +(s k0 (S n0))) v e1 e2))))))) (or4 (drop (S n0) O (CHead x1 (Flat f) x0) 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 (CHead x1 (Flat f) x0) (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) x2) (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 (CHead x1 (Flat f) x0) (CHead e2 k0 u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) x2) (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 (CHead x1 (Flat f) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 +e2)))))))) (\lambda (H14: (drop (S n0) O x1 e)).(or4_intro0 (drop (S n0) O +(CHead x1 (Flat f) x0) 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 (CHead x1 +(Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (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 (CHead x1 (Flat f) x0) +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (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 (CHead x1 (Flat f) x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) x2) (s k0 (S n0))) v e1 e2))))))) (drop_drop (Flat f) n0 x1 e H14 +x0))) (\lambda (H14: (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 x1 (CHead +e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus x2 (s k0 (S n0))) v u w))))))).(ex3_4_ind 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 x1 (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 (S n0))) v u +w))))) (or4 (drop (S n0) O (CHead x1 (Flat f) x0) 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 (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +x2) (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 (CHead x1 +(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (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 (CHead x1 (Flat f) x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) x2) (s k0 (S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: +C).(\lambda (x5: T).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x4 x3 +x5))).(\lambda (H16: (drop (S n0) O x1 (CHead x4 x3 x6))).(\lambda (H17: +(subst0 (minus x2 (s x3 (S n0))) v x5 x6)).(eq_ind_r C (CHead x4 x3 x5) +(\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Flat f) x0) c0) (ex3_4 K C T +T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 +(CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x2) (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 c0 (CHead e1 +k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) x2) (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 c0 +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 +e2))))))))) (or4_intro1 (drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 x3 +x5)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x4 x3 x5) (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (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 (CHead x4 x3 x5) (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (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 (CHead x4 x3 x5) (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2))))))) +(ex3_4_intro K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x4 x3 x5) (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u +w))))) x3 x4 x5 x6 (refl_equal C (CHead x4 x3 x5)) (drop_drop (Flat f) n0 x1 +(CHead x4 x3 x6) H16 x0) H17)) e H15)))))))) H14)) (\lambda (H14: (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 x1 (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus x2 (s k0 +(S n0))) v e1 e2))))))).(ex3_4_ind 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 x1 (CHead +e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus x2 (s k0 (S n0))) v e1 e2))))) (or4 (drop (S n0) O (CHead +x1 (Flat f) x0) 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 (CHead x1 (Flat f) x0) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (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 (CHead x1 (Flat f) x0) (CHead e2 k0 +u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Flat f) x2) (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 (CHead +x1 (Flat f) x0) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 +(S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: C).(\lambda (x5: +C).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x4 x3 x6))).(\lambda (H16: +(drop (S n0) O x1 (CHead x5 x3 x6))).(\lambda (H17: (csubst0 (minus x2 (s x3 +(S n0))) v x4 x5)).(eq_ind_r C (CHead x4 x3 x6) (\lambda (c0: C).(or4 (drop +(S n0) O (CHead x1 (Flat f) x0) c0) (ex3_4 K C T T (\lambda (k0: K).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 k0 u)))))) +(\lambda (k0: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (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 c0 (CHead e1 k0 u)))))) (\lambda +(k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O +(CHead x1 (Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (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 c0 (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2))))))))) +(or4_intro2 (drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 x3 x6)) (ex3_4 K +C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x4 x3 x6) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (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 (CHead x4 x3 x6) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (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 (CHead x4 x3 x6) (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2))))))) +(ex3_4_intro K C C T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 +e2))))) x3 x4 x5 x6 (refl_equal C (CHead x4 x3 x6)) (drop_drop (Flat f) n0 x1 +(CHead x5 x3 x6) H16 x0) H17)) e H15)))))))) H14)) (\lambda (H14: (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 x1 +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 (S n0))) v u +w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus x2 (s k0 (S n0))) v e1 +e2)))))))).(ex4_5_ind 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 x1 (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus x2 (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus x2 (s k0 (S n0))) v e1 e2)))))) (or4 +(drop (S n0) O (CHead x1 (Flat f) x0) 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 (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +x2) (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 (CHead x1 +(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (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 (CHead x1 (Flat f) x0) (CHead e2 k0 w))))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) (\lambda (k0: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) x2) (s k0 (S n0))) v e1 e2)))))))) (\lambda (x3: K).(\lambda (x4: +C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (x7: T).(\lambda (H15: (eq C e +(CHead x4 x3 x6))).(\lambda (H16: (drop (S n0) O x1 (CHead x5 x3 +x7))).(\lambda (H17: (subst0 (minus x2 (s x3 (S n0))) v x6 x7)).(\lambda +(H18: (csubst0 (minus x2 (s x3 (S n0))) v x4 x5)).(eq_ind_r C (CHead x4 x3 +x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Flat f) x0) c0) (ex3_4 K +C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +c0 (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) x2) (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 c0 (CHead e1 +k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) x2) (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 c0 +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S +n0))) v u w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 +e2))))))))) (or4_intro3 (drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 x3 +x6)) (ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e0 k0 u)))))) (\lambda (k0: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e0 k0 w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (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 (CHead x4 x3 x6) (CHead e1 k0 u)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (CHead e2 k0 u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) x2) (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 (CHead x4 x3 x6) (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2))))))) +(ex4_5_intro K C C T T (\lambda (k0: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 x3 x6) (CHead e1 k0 +u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2)))))) x3 x4 x5 +x6 x7 (refl_equal C (CHead x4 x3 x6)) (drop_drop (Flat f) n0 x1 (CHead x5 x3 +x7) H16 x0) H17 H18)) e H15)))))))))) H14)) H13)))))) k (drop_gen_drop k c e +t n0 H2) H8 H9) i H4))) c2 H5)))))))) H3)) (csubst0_gen_head k c c2 t v i +H1))))))))))) c1)))))) n). + +theorem csubst0_drop_eq: + \forall (n: nat).(\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 +n v c1 c2) \to (\forall (e: C).((drop n O c1 e) \to (or4 (drop n 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: 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)))))))))))))) \def \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 n0 v c1 c2) \to (\forall (e: C).((drop n0 O c1 @@ -3094,1689 +2879,1323 @@ 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 (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: -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 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 n0) 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: +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 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: 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 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 n0) 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))))))))))))))))) 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 (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 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 +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 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: 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 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 +n0) 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 (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)).(eq_ind_r C (CHead c k x0) (\lambda (c0: C).(or4 (drop (S +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 (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 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)))))) (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))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to ((eq nat (S +n0) (s k0 x1)) \to (or4 (drop (S n0) O (CHead c k0 x0) 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 (CHead c k0 x0) (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 n0) O (CHead c +k0 x0) (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 n0) O (CHead c k0 x0) (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 (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 i t0 u1 u2) \to (or4 (drop (s k0 i) O c2 e) (ex3_4 F C T T (\lambda +e2))))))))))) (\lambda (b: B).(\lambda (H6: (drop (r (Bind b) n0) O c +e)).(\lambda (H7: (eq nat (S n0) (s (Bind b) x1))).(let H8 \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 H9 \def +(eq_ind_r nat x1 (\lambda (n1: nat).(subst0 n1 v t x0)) H5 n0 H8) in +(or4_intro0 (drop (S n0) O (CHead c (Bind b) x0) 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 -(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 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 (_: +(w: T).(drop (S n0) O (CHead c (Bind b) x0) (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 n0) O (CHead c +(Bind b) x0) (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 n0) O (CHead c +(Bind b) x0) (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 k1 i) O (CHead c k1 u2) (CHead e0 (Flat f) w)))))) (\lambda (_: +(_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c e H6 x0))))))) +(\lambda (f: F).(\lambda (H6: (drop (r (Flat f) n0) O c e)).(\lambda (H7: (eq +nat (S n0) (s (Flat f) x1))).(let H8 \def (f_equal nat nat (\lambda (e0: +nat).e0) (S n0) (s (Flat f) x1) H7) in (let H9 \def (eq_ind_r nat x1 (\lambda +(n1: nat).(subst0 n1 v t x0)) H5 (S n0) H8) in (or4_intro0 (drop (S n0) O +(CHead c (Flat f) x0) 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 (CHead c (Flat f) x0) (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 (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 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: +(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 (CHead c (Flat f) x0) +(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 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 +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c (Flat f) x0) +(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 H6 x0))))))) k (drop_gen_drop k c +e t n0 H1) H3) c2 H4)))))) 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 +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: 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 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 n0) 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 (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)).(eq_ind_r C (CHead x0 k t) (\lambda (c0: C).(or4 (drop (S 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 (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 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)))))) (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))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to ((eq nat (S +n0) (s k0 x1)) \to (or4 (drop (S n0) O (CHead x0 k0 t) 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 (CHead x0 k0 t) (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 n0) O (CHead x0 +k0 t) (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 n0) O (CHead x0 k0 t) (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 (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 +e2))))))))))) (\lambda (b: B).(\lambda (H6: (drop (r (Bind b) n0) O c +e)).(\lambda (H7: (eq nat (S n0) (s (Bind b) x1))).(let H8 \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).(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: +\Rightarrow n0 | (S n1) \Rightarrow n1])) (S n0) (S x1) H7) in (let H9 \def +(eq_ind_r nat x1 (\lambda (n1: nat).(csubst0 n1 v c x0)) H5 n0 H8) in (let +H10 \def (IHn c x0 v H9 e H6) in (or4_ind (drop n0 O x0 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 x0 (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 x0 (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 x0 (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 n0) O (CHead x0 (Bind b) t) 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 (CHead x0 (Bind b) t) +(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) 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 (_: +T).(drop (S n0) O (CHead x0 (Bind b) t) (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) n1) O (CHead c (Bind b) u2) (CHead e2 (Flat f) w))))))) -(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Bind b) t) (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 -(drop (s (Bind b) n0) 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) n0) 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) n0) O -(CHead c (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H11: +(drop n0 O x0 e)).(or4_intro0 (drop (S n0) O (CHead x0 (Bind b) t) 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 (CHead x0 (Bind b) t) (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 n0) +O (CHead x0 (Bind b) t) (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 c (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Bind b) t) (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 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 (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) +T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 x0 e H11 +t))) (\lambda (H11: (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 x0 (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 +x0 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w))))) (or4 (drop (S n0) O (CHead x0 (Bind +b) t) 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 (CHead x0 +(Bind b) t) (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 n0) O (CHead x0 (Bind b) t) (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 n0) O (CHead x0 (Bind b) t) (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 (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) +e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: +T).(\lambda (H12: (eq C e (CHead x3 (Flat x2) x4))).(\lambda (H13: (drop n0 O +x0 (CHead x3 (Flat x2) x5))).(\lambda (H14: (subst0 O v x4 x5)).(eq_ind_r C +(CHead x3 (Flat x2) x4) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Bind +b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Bind b) t) (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 c0 +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (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 (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 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: -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 (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 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 -(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 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 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 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 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 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 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 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 (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 (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat +f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (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 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 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))))))) (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)))))) +e2))))))))) (or4_intro1 (drop (S n0) O (CHead x0 (Bind b) t) (CHead x3 (Flat +x2) x4)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x4) (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead x0 (Bind b) t) (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 +x3 (Flat x2) x4) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) +(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 x3 (Flat x2) x4) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x0 (Bind b) t) (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 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 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))))))) (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 -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 -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: +(_: 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 x3 (Flat x2) +x4) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w))))) x2 x3 x4 x5 (refl_equal C (CHead x3 (Flat x2) x4)) +(drop_drop (Bind b) n0 x0 (CHead x3 (Flat x2) x5) H13 t) H14)) e H12)))))))) +H11)) (\lambda (H11: (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 x0 (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 +x0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) O (CHead x0 +(Bind b) t) 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 (CHead x0 +(Bind b) t) (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 n0) O (CHead x0 (Bind b) t) (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 n0) O (CHead x0 (Bind b) t) (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 -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 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: +e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (H12: (eq C e (CHead x3 (Flat x2) x5))).(\lambda (H13: (drop n0 O +x0 (CHead x4 (Flat x2) x5))).(\lambda (H14: (csubst0 O v x3 x4)).(eq_ind_r C +(CHead x3 (Flat x2) x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Bind +b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 +(Bind b) t) (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 c0 +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (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 c0 (CHead e1 (Flat +f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (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) 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 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 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 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 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 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 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 (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: +e2))))))))) (or4_intro2 (drop (S n0) O (CHead x0 (Bind b) t) (CHead x3 (Flat +x2) x5)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead x0 (Bind b) t) (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 +x3 (Flat x2) x5) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) +(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 (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 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)))))) +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x3 (Flat x2) x5) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x0 (Bind b) t) (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 -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))))))) (ex3_4_intro F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x3 (Flat x2) +x5) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2))))) x2 x3 x4 x5 (refl_equal C (CHead x3 (Flat x2) x5)) +(drop_drop (Bind b) n0 x0 (CHead x4 (Flat x2) x5) H13 t) H14)) e H12)))))))) +H11)) (\lambda (H11: (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 x0 (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 x0 (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 n0) +O (CHead x0 (Bind b) t) 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 (CHead x0 (Bind b) t) (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 n0) O (CHead x0 (Bind b) t) (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 (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))))))) (ex4_5_intro 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)))))) 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 +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 (CHead x0 (Bind b) t) (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 (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (x6: T).(\lambda (H12: (eq C e (CHead x3 (Flat x2) x5))).(\lambda +(H13: (drop n0 O x0 (CHead x4 (Flat x2) x6))).(\lambda (H14: (subst0 O v x5 +x6)).(\lambda (H15: (csubst0 O v x3 x4)).(eq_ind_r C (CHead x3 (Flat x2) x5) +(\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Bind b) t) c0) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (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 c0 (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) +O (CHead x0 (Bind b) t) (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 c0 (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Bind b) t) (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 n0) O +(CHead x0 (Bind b) t) (CHead x3 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) +x5) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (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 x3 (Flat x2) x5) (CHead e1 +(Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (S n0) O (CHead x0 (Bind b) t) (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 x3 (Flat x2) x5) (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (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 x3 (Flat x2) x5) (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Bind b) t) (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)))))) +x2 x3 x4 x5 x6 (refl_equal C (CHead x3 (Flat x2) x5)) (drop_drop (Bind b) n0 +x0 (CHead x4 (Flat x2) x6) H13 t) H14 H15)) e H12)))))))))) H11)) H10))))))) +(\lambda (f: F).(\lambda (H6: (drop (r (Flat f) n0) O c e)).(\lambda (H7: (eq +nat (S n0) (s (Flat f) x1))).(let H8 \def (f_equal nat nat (\lambda (e0: +nat).e0) (S n0) (s (Flat f) x1) H7) in (let H9 \def (eq_ind_r nat x1 (\lambda +(n1: nat).(csubst0 n1 v c x0)) H5 (S n0) H8) in (let H10 \def (H x0 v H9 e +H6) in (or4_ind (drop (S n0) O x0 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 x0 (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 x0 (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 (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 +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 x0 (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 n0) O (CHead x0 (Flat f) t) 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 (CHead x0 (Flat f) t) +(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 (CHead x0 (Flat f) t) (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 (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) +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 (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 (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 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))))))) (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 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))))))) +(w: T).(drop (S n0) O (CHead x0 (Flat f) t) (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 (H11: +(drop (S n0) O x0 e)).(or4_intro0 (drop (S n0) O (CHead x0 (Flat f) t) 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 (CHead x0 (Flat f) t) +(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 (CHead x0 (Flat f) t) (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) 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: +(w: T).(drop (S n0) O (CHead x0 (Flat f) t) (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 x0 e H11 t))) (\lambda (H11: (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 x0 (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 x0 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w))))) (or4 (drop (S n0) +O (CHead x0 (Flat f) t) 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 (CHead x0 (Flat f) t) (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 (CHead x0 (Flat f) t) +(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 (CHead x0 (Flat f) t) +(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 (x2: F).(\lambda (x3: C).(\lambda (x4: T).(\lambda +(x5: T).(\lambda (H12: (eq C e (CHead x3 (Flat x2) x4))).(\lambda (H13: (drop +(S n0) O x0 (CHead x3 (Flat x2) x5))).(\lambda (H14: (subst0 O v x4 +x5)).(eq_ind_r C (CHead x3 (Flat x2) x4) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x0 (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Flat f) t) (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 c0 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) +(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 c0 +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(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 n0) O (CHead x0 (Flat f) t) (CHead x3 +(Flat x2) x4)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x4) (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Flat f) t) (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 x3 (Flat x2) x4) (CHead e1 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 +(Flat f) t) (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 x3 (Flat x2) x4) (CHead e1 (Flat f0) u))))))) (\lambda +(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Flat f) t) (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 x3 (Flat x2) x4) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w))))) x2 x3 x4 x5 (refl_equal C (CHead x3 +(Flat x2) x4)) (drop_drop (Flat f) n0 x0 (CHead x3 (Flat x2) x5) H13 t) H14)) +e H12)))))))) H11)) (\lambda (H11: (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 x0 (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 x0 (CHead e2 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) +(or4 (drop (S n0) O (CHead x0 (Flat f) t) 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 (CHead x0 (Flat f) t) (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 (CHead x0 (Flat f) t) +(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 (CHead x0 (Flat f) t) +(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 (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda +(x5: T).(\lambda (H12: (eq C e (CHead x3 (Flat x2) x5))).(\lambda (H13: (drop +(S n0) O x0 (CHead x4 (Flat x2) x5))).(\lambda (H14: (csubst0 O v x3 +x4)).(eq_ind_r C (CHead x3 (Flat x2) x5) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x0 (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Flat f) t) (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 c0 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) +(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 c0 +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) +(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 n0) O (CHead x0 (Flat f) t) (CHead x3 +(Flat x2) x5)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x0 (Flat f) t) (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 x3 (Flat x2) x5) (CHead e1 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 +(Flat f) t) (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 x3 (Flat x2) x5) (CHead e1 (Flat f0) u))))))) (\lambda +(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x0 (Flat f) t) (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 x3 (Flat x2) x5) (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x0 (Flat f) t) +(CHead e2 (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 +x3 (Flat x2) x5)) (drop_drop (Flat f) n0 x0 (CHead x4 (Flat x2) x5) H13 t) +H14)) e H12)))))))) H11)) (\lambda (H11: (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 x0 (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 (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 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))))))) +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 (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 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 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) 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 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) -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 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 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 (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 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_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 c3 +(w: T).(drop (S n0) O x0 (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 n0) O (CHead x0 +(Flat f) t) 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 (CHead x0 (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 (_: +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 (CHead x0 (Flat f) t) (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 (CHead x0 (Flat f) t) (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 (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (x6: T).(\lambda (H12: (eq C e (CHead x3 (Flat x2) x5))).(\lambda +(H13: (drop (S n0) O x0 (CHead x4 (Flat x2) x6))).(\lambda (H14: (subst0 O v +x5 x6)).(\lambda (H15: (csubst0 O v x3 x4)).(eq_ind_r C (CHead x3 (Flat x2) +x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x0 (Flat f) t) c0) (ex3_4 F C +T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +c0 (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (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 c0 (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S +n0) O (CHead x0 (Flat f) t) (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 -(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))))))) (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: +(u: T).(\lambda (_: T).(eq C c0 (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 (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 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: 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 (_: +n0) O (CHead x0 (Flat f) t) (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 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 (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 (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)))))) +T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (S n0) O +(CHead x0 (Flat f) t) (CHead x3 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x3 (Flat x2) +x5) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (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 x3 (Flat x2) x5) (CHead e1 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (S n0) O (CHead x0 (Flat f) t) (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 x3 (Flat x2) x5) (CHead e1 +(Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (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 x3 (Flat x2) x5) (CHead e1 +(Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x0 (Flat f) t) (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)))))) +x2 x3 x4 x5 x6 (refl_equal C (CHead x3 (Flat x2) x5)) (drop_drop (Flat f) n0 +x0 (CHead x4 (Flat x2) x6) H13 t) H14 H15)) e H12)))))))))) H11)) H10))))))) +k (drop_gen_drop k c e t n0 H1) H3) c2 H4)))))) 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 (_: T).(\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v c c3)))) (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: 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) +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) 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 -(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: +T).(\lambda (w: T).(drop (S n0) 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 (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)).(eq_ind_r C (CHead x1 k x0) (\lambda (c0: C).(or4 (drop +(S 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 (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 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 +(\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)))))) (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) +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)))))))))))) (\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 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 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 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 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 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) 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) 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) 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))))))))) (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 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 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)))))) +e2))))))))) (K_ind (\lambda (k0: K).((drop (r k0 n0) O c e) \to ((eq nat (S +n0) (s k0 x2)) \to (or4 (drop (S n0) O (CHead x1 k0 x0) 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 (CHead x1 k0 x0) (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) +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +k0 x0) (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 n0) O (CHead x1 k0 x0) (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 (H7: (drop (r (Bind b) n0) O c +e)).(\lambda (H8: (eq nat (S n0) (s (Bind b) x2))).(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 x2) H8) in (let H10 \def +(eq_ind_r nat x2 (\lambda (n1: nat).(csubst0 n1 v c x1)) H6 n0 H9) in (let +H11 \def (eq_ind_r nat x2 (\lambda (n1: nat).(subst0 n1 v t x0)) H5 n0 H9) in +(let H12 \def (IHn c x1 v H10 e H7) in (or4_ind (drop n0 O x1 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 x1 (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 x1 (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 x1 (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 n0) O (CHead x1 (Bind b) x0) 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: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) +(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 (_: +T).(drop (S n0) O (CHead x1 (Bind b) x0) (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).(drop (S n0) O (CHead x1 (Bind b) x0) (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 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 -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) +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H13: +(drop n0 O x1 e)).(or4_intro0 (drop (S n0) O (CHead x1 (Bind b) x0) 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 (CHead x1 (Bind b) x0) (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) +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 (CHead x1 (Bind b) x0) (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 +n0) O (CHead x1 (Bind b) x0) (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 x1 e H13 +x0))) (\lambda (H13: (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 x1 (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 +x1 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w))))) (or4 (drop (S n0) O (CHead x1 (Bind +b) x0) 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 (CHead x1 +(Bind b) x0) (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 n0) O (CHead x1 (Bind b) x0) (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) +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 (CHead x1 (Bind b) x0) (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 (x3: F).(\lambda (x4: C).(\lambda (x5: T).(\lambda (x6: +T).(\lambda (H14: (eq C e (CHead x4 (Flat x3) x5))).(\lambda (H15: (drop n0 O +x1 (CHead x4 (Flat x3) x6))).(\lambda (H16: (subst0 O v x5 x6)).(eq_ind_r C +(CHead x4 (Flat x3) x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Bind +b) x0) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (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 c0 +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (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 c0 (CHead e1 (Flat +f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (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 n0) O (CHead x1 (Bind b) x0) (CHead x4 (Flat +x3) x5)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x5) (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead x1 (Bind b) x0) (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 +x4 (Flat x3) x5) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) +(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 x4 (Flat x3) x5) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x1 (Bind b) x0) (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 x4 (Flat x3) +x5) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (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 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 +T).(subst0 O v u w))))) x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x3) x5)) +(drop_drop (Bind b) n0 x1 (CHead x4 (Flat x3) x6) H15 x0) H16)) e H14)))))))) +H13)) (\lambda (H13: (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 +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O x1 (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 -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 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 (x0: F).(\lambda (x1: C).(\lambda (x2: C).(\lambda -(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 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_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 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 c3 (Bind b) u2) (CHead e2 (Flat f) +x1 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) O (CHead x1 +(Bind b) x0) 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 (CHead x1 +(Bind b) x0) (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 n0) O (CHead x1 (Bind b) x0) (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 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 c3 (Bind b) u2) (CHead e2 (Flat f) +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 (CHead x1 (Bind b) x0) (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 (x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: +T).(\lambda (H14: (eq C e (CHead x4 (Flat x3) x6))).(\lambda (H15: (drop n0 O +x1 (CHead x5 (Flat x3) x6))).(\lambda (H16: (csubst0 O v x4 x5)).(eq_ind_r C +(CHead x4 (Flat x3) x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Bind +b) x0) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Bind b) x0) (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 c0 +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (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 c0 (CHead e1 (Flat +f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (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 n0) O (CHead x1 (Bind b) x0) (CHead x4 (Flat +x3) x6)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead x1 (Bind b) x0) (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 +x4 (Flat x3) x6) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) +(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 x4 (Flat x3) x6) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +x1 (Bind b) x0) (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 x4 (Flat x3) +x6) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (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 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: +T).(csubst0 O v e1 e2))))) x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x3) x6)) +(drop_drop (Bind b) n0 x1 (CHead x5 (Flat x3) x6) H15 x0) H16)) e H14)))))))) +H13)) (\lambda (H13: (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 (_: +T).(\lambda (w: T).(drop n0 O x1 (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 c3 (CHead e2 (Flat f) w))))))) +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O x1 (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 +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) +O (CHead x1 (Bind b) x0) 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 (CHead x1 (Bind b) x0) (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 n0) O (CHead x1 (Bind b) x0) (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 n0) O (CHead x1 (Bind b) x0) (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 (x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: +T).(\lambda (x7: T).(\lambda (H14: (eq C e (CHead x4 (Flat x3) x6))).(\lambda +(H15: (drop n0 O x1 (CHead x5 (Flat x3) x7))).(\lambda (H16: (subst0 O v x6 +x7)).(\lambda (H17: (csubst0 O v x4 x5)).(eq_ind_r C (CHead x4 (Flat x3) x6) +(\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Bind b) x0) c0) (ex3_4 F C T +T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (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 c0 (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) +O (CHead x1 (Bind b) x0) (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 (x0: -F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: -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 c3 (Bind b) u2) (CHead e0 -(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(\lambda (_: T).(eq C c0 (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x1 (Bind b) x0) (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 n0) O +(CHead x1 (Bind b) x0) (CHead x4 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) +x6) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (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 (_: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x4 (Flat x3) x6) (CHead e1 +(Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (S n0) O (CHead x1 (Bind b) x0) (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 x4 (Flat x3) x6) (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (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 x4 (Flat x3) x6) (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Bind b) x0) (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)))))) +x3 x4 x5 x6 x7 (refl_equal C (CHead x4 (Flat x3) x6)) (drop_drop (Bind b) n0 +x1 (CHead x5 (Flat x3) x7) H15 x0) H16 H17)) e H14)))))))))) H13)) +H12)))))))) (\lambda (f: F).(\lambda (H7: (drop (r (Flat f) n0) O c +e)).(\lambda (H8: (eq nat (S n0) (s (Flat f) x2))).(let H9 \def (f_equal nat +nat (\lambda (e0: nat).e0) (S n0) (s (Flat f) x2) H8) in (let H10 \def +(eq_ind_r nat x2 (\lambda (n1: nat).(csubst0 n1 v c x1)) H6 (S n0) H9) in +(let H11 \def (eq_ind_r nat x2 (\lambda (n1: nat).(subst0 n1 v t x0)) H5 (S +n0) H9) in (let H12 \def (H x1 v H10 e H7) in (or4_ind (drop (S n0) O x1 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 x1 (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 x1 (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 x1 (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 n0) O (CHead x1 (Flat f) x0) 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 (CHead x1 (Flat f) x0) (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 (CHead x1 (Flat f) x0) (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 -(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_intro3 -(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 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 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 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 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 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: +(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 (CHead x1 (Flat f) x0) (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 (H13: (drop (S n0) O +x1 e)).(or4_intro0 (drop (S n0) O (CHead x1 (Flat f) x0) 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 (CHead x1 (Flat f) x0) (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 (CHead x1 (Flat f) x0) (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 (CHead x1 (Flat f) x0) (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 x1 e H13 +x0))) (\lambda (H13: (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: +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O x1 (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 x1 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w))))) (or4 (drop (S n0) +O (CHead x1 (Flat f) x0) 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 (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 c3 (Flat f) u2) (CHead -e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +n0) O (CHead x1 (Flat f) x0) (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 (CHead x1 (Flat f) x0) +(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 (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 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 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 (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(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 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 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 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 (Flat f) (S n0)) O (CHead c3 (Flat f) u2) (CHead -e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: T).(\lambda +(x6: T).(\lambda (H14: (eq C e (CHead x4 (Flat x3) x5))).(\lambda (H15: (drop +(S n0) O x1 (CHead x4 (Flat x3) x6))).(\lambda (H16: (subst0 O v x5 +x6)).(eq_ind_r C (CHead x4 (Flat x3) x5) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead x1 (Flat f) x0) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (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 c0 (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(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 +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (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: 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 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 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 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 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 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 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 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 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 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 c3 (Flat f) u2) +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) +(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 n0) O (CHead x1 (Flat f) x0) (CHead +x4 (Flat x3) x5)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x5) (CHead e0 (Flat f0) +u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (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 x4 (Flat x3) x5) (CHead e1 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (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 x4 (Flat x3) x5) (CHead e1 (Flat f0) u))))))) (\lambda +(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (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 x4 (Flat x3) x5) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (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 c3 (CHead x1 (Flat x0) x3) H28 u2) -H29)) e H27)))))))) H26)) (\lambda (H26: (ex3_4 F C C T (\lambda (f0: +T).(\lambda (w: T).(subst0 O v u w))))) x3 x4 x5 x6 (refl_equal C (CHead x4 +(Flat x3) x5)) (drop_drop (Flat f) n0 x1 (CHead x4 (Flat x3) x6) H15 x0) +H16)) e H14)))))))) H13)) (\lambda (H13: (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 +T).(drop (S n0) O x1 (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)))))) +(e2: C).(\lambda (u: T).(drop (S n0) O x1 (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 (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 (_: +v e1 e2))))) (or4 (drop (S n0) O (CHead x1 (Flat f) x0) 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 (CHead x1 (Flat f) x0) (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 (CHead x1 (Flat f) x0) (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 (CHead x1 (Flat f) x0) (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 (x3: F).(\lambda (x4: +C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (H14: (eq C e (CHead x4 (Flat +x3) x6))).(\lambda (H15: (drop (S n0) O x1 (CHead x5 (Flat x3) x6))).(\lambda +(H16: (csubst0 O v x4 x5)).(eq_ind_r C (CHead x4 (Flat x3) x6) (\lambda (c0: +C).(or4 (drop (S n0) O (CHead x1 (Flat f) x0) c0) (ex3_4 F C T T (\lambda +(f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c0 (CHead e0 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (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 c0 (CHead e1 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (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 c0 (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (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 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 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 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 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 c3 (Flat f) u2) (CHead e2 (Flat f0) +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead x1 (Flat +f) x0) (CHead x4 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (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 x4 (Flat x3) x6) (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (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 x4 (Flat x3) x6) (CHead e1 (Flat f0) +u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (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 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 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 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 c3 -(Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +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 x4 (Flat x3) x6) (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (CHead e2 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) +x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x3) x6)) (drop_drop (Flat f) n0 x1 +(CHead x5 (Flat x3) x6) H15 x0) H16)) e H14)))))))) H13)) (\lambda (H13: +(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 x1 (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 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 c3 (CHead x2 (Flat x0) x3) H28 u2) -H29)) e H27)))))))) H26)) (\lambda (H26: (ex4_5 F C C T T (\lambda (f0: +(_: 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 c3 (CHead e2 (Flat f0) +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O x1 (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 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 -(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 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 (x4: -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 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 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 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 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 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 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 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 c3 (Flat f) u2) +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(or4 (drop (S n0) O (CHead x1 (Flat f) x0) 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 (CHead x1 (Flat f) x0) (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 (CHead x1 (Flat f) x0) (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 c3 (Flat f) u2) (CHead e2 (Flat f0) w))))))) +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 (CHead x1 (Flat f) x0) +(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 (x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda +(x6: T).(\lambda (x7: T).(\lambda (H14: (eq C e (CHead x4 (Flat x3) +x6))).(\lambda (H15: (drop (S n0) O x1 (CHead x5 (Flat x3) x7))).(\lambda +(H16: (subst0 O v x6 x7)).(\lambda (H17: (csubst0 O v x4 x5)).(eq_ind_r C +(CHead x4 (Flat x3) x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead x1 (Flat +f) x0) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c0 (CHead e0 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (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 c0 +(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead x1 (Flat f) x0) (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 c0 (CHead e1 (Flat +f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (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 n0) O (CHead x1 (Flat f) x0) (CHead x4 (Flat +x3) x6)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead x1 (Flat f) x0) (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 x4 (Flat x3) x6) (CHead e1 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead x1 +(Flat f) x0) (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 x4 (Flat x3) x6) (CHead e1 (Flat f0) u))))))) (\lambda +(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead x1 (Flat f) x0) (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))))))) +T).(\lambda (_: T).(eq C (CHead x4 (Flat x3) x6) (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)))))) -x0 x1 x2 x3 x4 (refl_equal C (CHead x1 (Flat x0) x3)) (drop_drop (Flat f) n0 -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). +(w: T).(drop (S n0) O (CHead x1 (Flat f) x0) (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)))))) x3 x4 x5 x6 x7 +(refl_equal C (CHead x4 (Flat x3) x6)) (drop_drop (Flat f) n0 x1 (CHead x5 +(Flat x3) x7) H15 x0) H16 H17)) e H14)))))))))) H13)) H12)))))))) k +(drop_gen_drop k c e t n0 H1) H3) c2 H4)))))))) H2)) (csubst0_gen_head k c c2 +t v (S n0) H0))))))))))) c1)))) n). theorem csubst0_drop_eq_back: \forall (n: nat).(\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubst0/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubst0/fwd.ma index a5159d6a9..585127337 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubst0/fwd.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubst0/fwd.ma @@ -21,47 +21,29 @@ theorem csubst0_gen_sort: i v (CSort n) x) \to (\forall (P: Prop).P))))) \def \lambda (x: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda -(H: (csubst0 i v (CSort n) x)).(\lambda (P: Prop).(let H0 \def (match H in -csubst0 return (\lambda (n0: nat).(\lambda (t: T).(\lambda (c: C).(\lambda -(c0: C).(\lambda (_: (csubst0 n0 t c c0)).((eq nat n0 i) \to ((eq T t v) \to -((eq C c (CSort n)) \to ((eq C c0 x) \to P))))))))) with [(csubst0_snd k i0 -v0 u1 u2 H0 c) \Rightarrow (\lambda (H1: (eq nat (s k i0) i)).(\lambda (H2: -(eq T v0 v)).(\lambda (H3: (eq C (CHead c k u1) (CSort n))).(\lambda (H4: (eq -C (CHead c k u2) x)).(eq_ind nat (s k i0) (\lambda (_: nat).((eq T v0 v) \to -((eq C (CHead c k u1) (CSort n)) \to ((eq C (CHead c k u2) x) \to ((subst0 i0 -v0 u1 u2) \to P))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t: -T).((eq C (CHead c k u1) (CSort n)) \to ((eq C (CHead c k u2) x) \to ((subst0 -i0 t u1 u2) \to P)))) (\lambda (H6: (eq C (CHead c k u1) (CSort n))).(let H7 -\def (eq_ind C (CHead c k u1) (\lambda (e: C).(match e in C return (\lambda -(_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow -True])) I (CSort n) H6) in (False_ind ((eq C (CHead c k u2) x) \to ((subst0 -i0 v u1 u2) \to P)) H7))) v0 (sym_eq T v0 v H5))) i H1 H2 H3 H4 H0))))) | -(csubst0_fst k i0 c1 c2 v0 H0 u) \Rightarrow (\lambda (H1: (eq nat (s k i0) -i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq C (CHead c1 k u) (CSort -n))).(\lambda (H4: (eq C (CHead c2 k u) x)).(eq_ind nat (s k i0) (\lambda (_: -nat).((eq T v0 v) \to ((eq C (CHead c1 k u) (CSort n)) \to ((eq C (CHead c2 k -u) x) \to ((csubst0 i0 v0 c1 c2) \to P))))) (\lambda (H5: (eq T v0 -v)).(eq_ind T v (\lambda (t: T).((eq C (CHead c1 k u) (CSort n)) \to ((eq C -(CHead c2 k u) x) \to ((csubst0 i0 t c1 c2) \to P)))) (\lambda (H6: (eq C -(CHead c1 k u) (CSort n))).(let H7 \def (eq_ind C (CHead c1 k u) (\lambda (e: -C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow -False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H6) in (False_ind ((eq -C (CHead c2 k u) x) \to ((csubst0 i0 v c1 c2) \to P)) H7))) v0 (sym_eq T v0 v -H5))) i H1 H2 H3 H4 H0))))) | (csubst0_both k i0 v0 u1 u2 H0 c1 c2 H1) -\Rightarrow (\lambda (H2: (eq nat (s k i0) i)).(\lambda (H3: (eq T v0 -v)).(\lambda (H4: (eq C (CHead c1 k u1) (CSort n))).(\lambda (H5: (eq C -(CHead c2 k u2) x)).(eq_ind nat (s k i0) (\lambda (_: nat).((eq T v0 v) \to -((eq C (CHead c1 k u1) (CSort n)) \to ((eq C (CHead c2 k u2) x) \to ((subst0 -i0 v0 u1 u2) \to ((csubst0 i0 v0 c1 c2) \to P)))))) (\lambda (H6: (eq T v0 -v)).(eq_ind T v (\lambda (t: T).((eq C (CHead c1 k u1) (CSort n)) \to ((eq C -(CHead c2 k u2) x) \to ((subst0 i0 t u1 u2) \to ((csubst0 i0 t c1 c2) \to -P))))) (\lambda (H7: (eq C (CHead c1 k u1) (CSort n))).(let H8 \def (eq_ind C -(CHead c1 k u1) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) -with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I -(CSort n) H7) in (False_ind ((eq C (CHead c2 k u2) x) \to ((subst0 i0 v u1 -u2) \to ((csubst0 i0 v c1 c2) \to P))) H8))) v0 (sym_eq T v0 v H6))) i H2 H3 -H4 H5 H0 H1)))))]) in (H0 (refl_equal nat i) (refl_equal T v) (refl_equal C -(CSort n)) (refl_equal C x)))))))). +(H: (csubst0 i v (CSort n) x)).(\lambda (P: Prop).(insert_eq C (CSort n) +(\lambda (c: C).(csubst0 i v c x)) (\lambda (_: C).P) (\lambda (y: +C).(\lambda (H0: (csubst0 i v y x)).(csubst0_ind (\lambda (_: nat).(\lambda +(_: T).(\lambda (c: C).(\lambda (_: C).((eq C c (CSort n)) \to P))))) +(\lambda (k: K).(\lambda (i0: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (c: C).(\lambda (H2: (eq +C (CHead c k u1) (CSort n))).(let H3 \def (eq_ind C (CHead c k u1) (\lambda +(ee: C).(match ee in C return (\lambda (_: C).Prop) with [(CSort _) +\Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H2) in +(False_ind P H3)))))))))) (\lambda (k: K).(\lambda (i0: nat).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v0: T).(\lambda (_: (csubst0 i0 v0 c1 +c2)).(\lambda (_: (((eq C c1 (CSort n)) \to P))).(\lambda (u: T).(\lambda +(H3: (eq C (CHead c1 k u) (CSort n))).(let H4 \def (eq_ind C (CHead c1 k u) +(\lambda (ee: C).(match ee in C return (\lambda (_: C).Prop) with [(CSort _) +\Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in +(False_ind P H4))))))))))) (\lambda (k: K).(\lambda (i0: nat).(\lambda (v0: +T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (subst0 i0 v0 u1 +u2)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (csubst0 i0 v0 c1 +c2)).(\lambda (_: (((eq C c1 (CSort n)) \to P))).(\lambda (H4: (eq C (CHead +c1 k u1) (CSort n))).(let H5 \def (eq_ind C (CHead c1 k u1) (\lambda (ee: +C).(match ee in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow +False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H4) in (False_ind P +H5))))))))))))) i v y x H0))) H)))))). theorem csubst0_gen_head: \forall (k: K).(\forall (c1: C).(\forall (x: C).(\forall (u1: T).(\forall @@ -78,312 +60,204 @@ u2)))) (\lambda (_: T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c1 c2)))))))))))) \def \lambda (k: K).(\lambda (c1: C).(\lambda (x: C).(\lambda (u1: T).(\lambda -(v: T).(\lambda (i: nat).(\lambda (H: (csubst0 i v (CHead c1 k u1) x)).(let -H0 \def (match H in csubst0 return (\lambda (n: nat).(\lambda (t: T).(\lambda -(c: C).(\lambda (c0: C).(\lambda (_: (csubst0 n t c c0)).((eq nat n i) \to -((eq T t v) \to ((eq C c (CHead c1 k u1)) \to ((eq C c0 x) \to (or3 (ex3_2 T -nat (\lambda (_: T).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (u2: -T).(\lambda (_: nat).(eq C x (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat 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)))) (ex4_3 T C -nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat 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))))))))))))))) with [(csubst0_snd k0 i0 v0 u0 u2 H0 c) \Rightarrow -(\lambda (H1: (eq nat (s k0 i0) i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: -(eq C (CHead c k0 u0) (CHead c1 k u1))).(\lambda (H4: (eq C (CHead c k0 u2) -x)).(eq_ind nat (s k0 i0) (\lambda (n: nat).((eq T v0 v) \to ((eq C (CHead c -k0 u0) (CHead c1 k u1)) \to ((eq C (CHead c k0 u2) x) \to ((subst0 i0 v0 u0 -u2) \to (or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat n (s k -j)))) (\lambda (u3: T).(\lambda (_: nat).(eq C x (CHead c1 k u3)))) (\lambda -(u3: T).(\lambda (j: nat).(subst0 j v u1 u3)))) (ex3_2 C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat n (s k j)))) (\lambda (c2: C).(\lambda (_: +(v: T).(\lambda (i: nat).(\lambda (H: (csubst0 i v (CHead c1 k u1) +x)).(insert_eq C (CHead c1 k u1) (\lambda (c: C).(csubst0 i v c x)) (\lambda +(_: C).(or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat i (s k +j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C x (CHead c1 k u2)))) (\lambda +(u2: T).(\lambda (j: nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat 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)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat n (s k j))))) (\lambda (u3: T).(\lambda (c2: C).(\lambda (_: -nat).(eq C x (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 (H5: (eq T v0 v)).(eq_ind T v -(\lambda (t: T).((eq C (CHead c k0 u0) (CHead c1 k u1)) \to ((eq C (CHead c -k0 u2) x) \to ((subst0 i0 t u0 u2) \to (or3 (ex3_2 T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) (\lambda (u3: T).(\lambda -(_: nat).(eq C x (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: -nat).(subst0 j v u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat (s k0 i0) (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)))) (ex4_3 T C -nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k0 i0) (s k -j))))) (\lambda (u3: T).(\lambda (c2: C).(\lambda (_: nat).(eq C x (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 (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 _ 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 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 +nat).(eq nat 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))))))) (\lambda (y: C).(\lambda (H0: (csubst0 i v y +x)).(csubst0_ind (\lambda (n: nat).(\lambda (t: T).(\lambda (c: C).(\lambda +(c0: C).((eq C c (CHead c1 k u1)) \to (or3 (ex3_2 T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat n (s k j)))) (\lambda (u2: T).(\lambda (_: +nat).(eq C c0 (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j +t u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat n (s k +j)))) (\lambda (c2: C).(\lambda (_: nat).(eq C c0 (CHead c2 k u1)))) (\lambda +(c2: C).(\lambda (j: nat).(csubst0 j t c1 c2)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat n (s k j))))) (\lambda (u2: +T).(\lambda (c2: C).(\lambda (_: nat).(eq C c0 (CHead c2 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j t u1 u2)))) (\lambda (_: +T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j t c1 c2))))))))))) (\lambda +(k0: K).(\lambda (i0: nat).(\lambda (v0: T).(\lambda (u0: T).(\lambda (u2: +T).(\lambda (H1: (subst0 i0 v0 u0 u2)).(\lambda (c: C).(\lambda (H2: (eq C +(CHead c k0 u0) (CHead c1 k u1))).(let H3 \def (f_equal C C (\lambda (e: +C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c | +(CHead c0 _ _) \Rightarrow c0])) (CHead c k0 u0) (CHead c1 k u1) H2) in ((let +H4 \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 c k0 +u0) (CHead c1 k u1) H2) in ((let H5 \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) H2) in (\lambda (H6: (eq +K k0 k)).(\lambda (H7: (eq C c c1)).(eq_ind_r C c1 (\lambda (c0: C).(or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) -(\lambda (u3: T).(\lambda (_: nat).(eq C x (CHead c1 k u3)))) (\lambda (u3: -T).(\lambda (j: nat).(subst0 j v u1 u3)))) (ex3_2 C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat (s k0 i0) (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)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat (s k0 i0) (s k j))))) (\lambda (u3: T).(\lambda -(c2: C).(\lambda (_: nat).(eq C x (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 -(H10: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T u0 u1) \to ((eq C -(CHead c1 k1 u2) x) \to ((subst0 i0 v u0 u2) \to (or3 (ex3_2 T nat (\lambda -(_: T).(\lambda (j: nat).(eq nat (s k1 i0) (s k j)))) (\lambda (u3: -T).(\lambda (_: nat).(eq C x (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: -nat).(subst0 j v u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat (s k1 i0) (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)))) (ex4_3 T C -nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k1 i0) (s k -j))))) (\lambda (u3: T).(\lambda (c2: C).(\lambda (_: nat).(eq C x (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 (H11: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq C -(CHead c1 k u2) x) \to ((subst0 i0 v t u2) \to (or3 (ex3_2 T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (u3: T).(\lambda -(_: nat).(eq C x (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: -nat).(subst0 j v u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat (s k i0) (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)))) (ex4_3 T C -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 x (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 (H12: (eq C (CHead c1 k u2) x)).(eq_ind C (CHead c1 k -u2) (\lambda (c0: C).((subst0 i0 v u1 u2) \to (or3 (ex3_2 T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (u3: T).(\lambda -(_: nat).(eq C c0 (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: -nat).(subst0 j v u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat (s k i0) (s k j)))) (\lambda (c2: C).(\lambda (_: nat).(eq C c0 (CHead c2 -k u1)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c1 c2)))) (ex4_3 T C -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 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 (_: -C).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (c2: C).(\lambda -(_: nat).(eq C (CHead c1 k u2) (CHead c2 k u1)))) (\lambda (c2: C).(\lambda -(j: nat).(csubst0 j v c1 c2)))) (ex4_3 T C 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 (CHead c1 k u2) (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))))) (ex3_2_intro 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))) u2 i0 (refl_equal nat (s k -i0)) (refl_equal C (CHead c1 k u2)) H13)))) x H12)) u0 (sym_eq T u0 u1 H11))) -k0 (sym_eq K k0 k H10))) c (sym_eq C c c1 H9))) H8)) H7))) v0 (sym_eq T v0 v -H5))) i H1 H2 H3 H4 H0))))) | (csubst0_fst k0 i0 c0 c2 v0 H0 u) \Rightarrow -(\lambda (H1: (eq nat (s k0 i0) i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: -(eq C (CHead c0 k0 u) (CHead c1 k u1))).(\lambda (H4: (eq C (CHead c2 k0 u) -x)).(eq_ind nat (s k0 i0) (\lambda (n: nat).((eq T v0 v) \to ((eq C (CHead c0 -k0 u) (CHead c1 k u1)) \to ((eq C (CHead c2 k0 u) x) \to ((csubst0 i0 v0 c0 -c2) \to (or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat n (s k -j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C x (CHead c1 k u2)))) (\lambda -(u2: T).(\lambda (j: nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat n (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)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat n (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))))))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v -(\lambda (t: T).((eq C (CHead c0 k0 u) (CHead c1 k u1)) \to ((eq C (CHead c2 -k0 u) x) \to ((csubst0 i0 t c0 c2) \to (or3 (ex3_2 T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) (\lambda (u2: T).(\lambda -(_: nat).(eq C x (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat (s k0 i0) (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)))) (ex4_3 T C -nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k0 i0) (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)))))))))) (\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 _ k1 -_) \Rightarrow k1])) (CHead c0 k0 u) (CHead c1 k u1) H6) in ((let H9 \def +(\lambda (u3: T).(\lambda (_: nat).(eq C (CHead c0 k0 u2) (CHead c1 k u3)))) +(\lambda (u3: T).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (ex3_2 C nat +(\lambda (_: C).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) (\lambda (c2: +C).(\lambda (_: nat).(eq C (CHead c0 k0 u2) (CHead c2 k u1)))) (\lambda (c2: +C).(\lambda (j: nat).(csubst0 j v0 c1 c2)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k0 i0) (s k j))))) (\lambda +(u3: T).(\lambda (c2: C).(\lambda (_: nat).(eq C (CHead c0 k0 u2) (CHead c2 k +u3))))) (\lambda (u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 +u3)))) (\lambda (_: T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v0 c1 +c2))))))) (let H8 \def (eq_ind T u0 (\lambda (t: T).(subst0 i0 v0 t u2)) H1 +u1 H5) in (eq_ind_r K k (\lambda (k1: K).(or3 (ex3_2 T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat (s k1 i0) (s k j)))) (\lambda (u3: T).(\lambda +(_: nat).(eq C (CHead c1 k1 u2) (CHead c1 k u3)))) (\lambda (u3: T).(\lambda +(j: nat).(subst0 j v0 u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat (s k1 i0) (s k j)))) (\lambda (c2: C).(\lambda (_: nat).(eq C +(CHead c1 k1 u2) (CHead c2 k u1)))) (\lambda (c2: C).(\lambda (j: +nat).(csubst0 j v0 c1 c2)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat (s k1 i0) (s k j))))) (\lambda (u3: T).(\lambda +(c2: C).(\lambda (_: nat).(eq C (CHead c1 k1 u2) (CHead c2 k u3))))) (\lambda +(u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: +T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v0 c1 c2))))))) (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 v0 u1 u3)))) (ex3_2 C nat +(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (c2: +C).(\lambda (_: nat).(eq C (CHead c1 k u2) (CHead c2 k u1)))) (\lambda (c2: +C).(\lambda (j: nat).(csubst0 j v0 c1 c2)))) (ex4_3 T C 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 (CHead c1 k u2) (CHead c2 k +u3))))) (\lambda (u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 +u3)))) (\lambda (_: T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v0 c1 +c2))))) (ex3_2_intro 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 v0 u1 u3))) u2 i0 +(refl_equal nat (s k i0)) (refl_equal C (CHead c1 k u2)) H8)) k0 H6)) c +H7)))) H4)) H3)))))))))) (\lambda (k0: K).(\lambda (i0: nat).(\lambda (c0: +C).(\lambda (c2: C).(\lambda (v0: T).(\lambda (H1: (csubst0 i0 v0 c0 +c2)).(\lambda (H2: (((eq C c0 (CHead c1 k u1)) \to (or3 (ex3_2 T nat (\lambda +(_: T).(\lambda (j: nat).(eq nat i0 (s k j)))) (\lambda (u2: T).(\lambda (_: +nat).(eq C c2 (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j +v0 u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u1)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat i0 (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 v0 u1 u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3))))))))).(\lambda +(u: T).(\lambda (H3: (eq C (CHead c0 k0 u) (CHead c1 k u1))).(let H4 \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 -u1) \to ((eq C (CHead c2 k0 u) x) \to ((csubst0 i0 v c c2) \to (or3 (ex3_2 T -nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) (\lambda -(u2: T).(\lambda (_: nat).(eq C x (CHead c1 k u2)))) (\lambda (u2: -T).(\lambda (j: nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat (s k0 i0) (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)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +(CHead c1 k u1) H3) in ((let H5 \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 c0 k0 u) (CHead c1 k u1) H3) in ((let H6 \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) H3) in (\lambda (H7: (eq K k0 k)).(\lambda (H8: (eq C c0 +c1)).(eq_ind_r T u1 (\lambda (t: T).(or3 (ex3_2 T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) (\lambda (u2: T).(\lambda +(_: nat).(eq C (CHead c2 k0 t) (CHead c1 k u2)))) (\lambda (u2: T).(\lambda +(j: nat).(subst0 j v0 u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat (s k0 i0) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C +(CHead c2 k0 t) (CHead c3 k u1)))) (\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k0 i0) (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))))))))))) (\lambda -(H10: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T u u1) \to ((eq C -(CHead c2 k1 u) x) \to ((csubst0 i0 v c1 c2) \to (or3 (ex3_2 T nat (\lambda -(_: T).(\lambda (j: nat).(eq nat (s k1 i0) (s k j)))) (\lambda (u2: -T).(\lambda (_: nat).(eq C x (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat (s k1 i0) (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)))) (ex4_3 T C -nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k1 i0) (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)))))))))) (\lambda (H11: (eq T u u1)).(eq_ind T u1 (\lambda (t: T).((eq C -(CHead c2 k t) x) \to ((csubst0 i0 v c1 c2) \to (or3 (ex3_2 T nat (\lambda -(_: T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (u2: -T).(\lambda (_: nat).(eq C x (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat (s k i0) (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)))) (ex4_3 T C -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 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))))))))) (\lambda (H12: (eq C (CHead c2 k u1) x)).(eq_ind C (CHead c2 k -u1) (\lambda (c: C).((csubst0 i0 v c1 c2) \to (or3 (ex3_2 T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (u2: T).(\lambda -(_: nat).(eq C c (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: -nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat (s k i0) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c (CHead c3 -k u1)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c1 c3)))) (ex4_3 T C -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 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 (_: -C).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (c3: C).(\lambda -(_: nat).(eq C (CHead c2 k u1) (CHead c3 k u1)))) (\lambda (c3: C).(\lambda -(j: nat).(csubst0 j v c1 c3)))) (ex4_3 T C 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 (CHead c2 k u1) (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_intro C -nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda -(c3: C).(\lambda (_: nat).(eq C (CHead c2 k u1) (CHead c3 k u1)))) (\lambda -(c3: C).(\lambda (j: nat).(csubst0 j v c1 c3))) c2 i0 (refl_equal nat (s k -i0)) (refl_equal C (CHead c2 k u1)) H13)))) x H12)) u (sym_eq T u u1 H11))) -k0 (sym_eq K k0 k H10))) c0 (sym_eq C c0 c1 H9))) H8)) H7))) v0 (sym_eq T v0 -v H5))) i H1 H2 H3 H4 H0))))) | (csubst0_both k0 i0 v0 u0 u2 H0 c0 c2 H1) -\Rightarrow (\lambda (H2: (eq nat (s k0 i0) i)).(\lambda (H3: (eq T v0 -v)).(\lambda (H4: (eq C (CHead c0 k0 u0) (CHead c1 k u1))).(\lambda (H5: (eq -C (CHead c2 k0 u2) x)).(eq_ind nat (s k0 i0) (\lambda (n: nat).((eq T v0 v) -\to ((eq C (CHead c0 k0 u0) (CHead c1 k u1)) \to ((eq C (CHead c2 k0 u2) x) -\to ((subst0 i0 v0 u0 u2) \to ((csubst0 i0 v0 c0 c2) \to (or3 (ex3_2 T nat -(\lambda (_: T).(\lambda (j: nat).(eq nat n (s k j)))) (\lambda (u3: -T).(\lambda (_: nat).(eq C x (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: -nat).(subst0 j v u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat n (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)))) (ex4_3 T C -nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat n (s k j))))) -(\lambda (u3: T).(\lambda (c3: C).(\lambda (_: nat).(eq C x (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 (H6: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq C -(CHead c0 k0 u0) (CHead c1 k u1)) \to ((eq C (CHead c2 k0 u2) x) \to ((subst0 -i0 t u0 u2) \to ((csubst0 i0 t c0 c2) \to (or3 (ex3_2 T nat (\lambda (_: -T).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) (\lambda (u3: T).(\lambda -(_: nat).(eq C x (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: -nat).(subst0 j v u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat (s k0 i0) (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)))) (ex4_3 T C -nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k0 i0) (s k -j))))) (\lambda (u3: T).(\lambda (c3: C).(\lambda (_: nat).(eq C x (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 (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 _ 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 -u0 u1) \to ((eq C (CHead c2 k0 u2) x) \to ((subst0 i0 v u0 u2) \to ((csubst0 -i0 v c c2) \to (or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s -k0 i0) (s k j)))) (\lambda (u3: T).(\lambda (_: nat).(eq C x (CHead c1 k -u3)))) (\lambda (u3: T).(\lambda (j: nat).(subst0 j v u1 u3)))) (ex3_2 C nat -(\lambda (_: C).(\lambda (j: nat).(eq nat (s k0 i0) (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)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat (s k0 i0) (s k j))))) (\lambda (u3: T).(\lambda -(c3: C).(\lambda (_: nat).(eq C x (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 -(H11: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T u0 u1) \to ((eq C -(CHead c2 k1 u2) x) \to ((subst0 i0 v u0 u2) \to ((csubst0 i0 v c1 c2) \to -(or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k1 i0) (s k -j)))) (\lambda (u3: T).(\lambda (_: nat).(eq C x (CHead c1 k u3)))) (\lambda -(u3: T).(\lambda (j: nat).(subst0 j v u1 u3)))) (ex3_2 C nat (\lambda (_: +(c3: C).(\lambda (_: nat).(eq C (CHead c2 k0 t) (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3))))))) (let H9 \def +(eq_ind C c0 (\lambda (c: C).((eq C c (CHead c1 k u1)) \to (or3 (ex3_2 T nat +(\lambda (_: T).(\lambda (j: nat).(eq nat i0 (s k j)))) (\lambda (u2: +T).(\lambda (_: nat).(eq C c2 (CHead c1 k u2)))) (\lambda (u2: T).(\lambda +(j: nat).(subst0 j v0 u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat i0 (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead +c3 k u1)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 +T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat i0 (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 v0 u1 +u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 +c3)))))))) H2 c1 H8) in (let H10 \def (eq_ind C c0 (\lambda (c: C).(csubst0 +i0 v0 c c2)) H1 c1 H8) in (eq_ind_r K k (\lambda (k1: K).(or3 (ex3_2 T nat +(\lambda (_: T).(\lambda (j: nat).(eq nat (s k1 i0) (s k j)))) (\lambda (u2: +T).(\lambda (_: nat).(eq C (CHead c2 k1 u1) (CHead c1 k u2)))) (\lambda (u2: +T).(\lambda (j: nat).(subst0 j v0 u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k1 i0) (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)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: -C).(\lambda (j: nat).(eq nat (s k1 i0) (s k j))))) (\lambda (u3: T).(\lambda -(c3: C).(\lambda (_: nat).(eq C x (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 -(H12: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq C (CHead c2 k u2) x) -\to ((subst0 i0 v t u2) \to ((csubst0 i0 v c1 c2) \to (or3 (ex3_2 T nat -(\lambda (_: T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (u3: -T).(\lambda (_: nat).(eq C x (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: -nat).(subst0 j v u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq -nat (s k i0) (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)))) (ex4_3 T C -nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k -j))))) (\lambda (u3: T).(\lambda (c3: C).(\lambda (_: nat).(eq C x (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 (H13: (eq C (CHead c2 k u2) x)).(eq_ind C (CHead c2 k -u2) (\lambda (c: C).((subst0 i0 v u1 u2) \to ((csubst0 i0 v c1 c2) \to (or3 -(ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) -(\lambda (u3: T).(\lambda (_: nat).(eq C c (CHead c1 k u3)))) (\lambda (u3: -T).(\lambda (j: nat).(subst0 j v u1 u3)))) (ex3_2 C nat (\lambda (_: -C).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (c3: C).(\lambda -(_: nat).(eq C c (CHead c3 k u1)))) (\lambda (c3: C).(\lambda (j: -nat).(csubst0 j v c1 c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: -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 H16 \def -(eq_ind K k0 (\lambda (k1: K).(eq nat (s k1 i0) i)) H2 k H11) in (or3_intro2 +(_: nat).(eq C (CHead c2 k1 u1) (CHead c3 k u1)))) (\lambda (c3: C).(\lambda +(j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat (s k1 i0) (s k j))))) (\lambda (u2: T).(\lambda +(c3: C).(\lambda (_: nat).(eq C (CHead c2 k1 u1) (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3))))))) (or3_intro1 (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 +(\lambda (u2: T).(\lambda (_: nat).(eq C (CHead c2 k u1) (CHead c1 k u2)))) +(\lambda (u2: T).(\lambda (j: nat).(subst0 j v0 u1 u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) (\lambda (c3: -C).(\lambda (_: nat).(eq C (CHead c2 k u2) (CHead c3 k u1)))) (\lambda (c3: -C).(\lambda (j: nat).(csubst0 j v c1 c3)))) (ex4_3 T C nat (\lambda (_: +C).(\lambda (_: nat).(eq C (CHead c2 k u1) (CHead c3 k u1)))) (\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j))))) (\lambda -(u3: T).(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k u2) (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))))) (ex4_3_intro T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: -nat).(eq nat (s k i0) (s k j))))) (\lambda (u3: T).(\lambda (c3: C).(\lambda -(_: nat).(eq C (CHead c2 k u2) (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)))) u2 c2 i0 (refl_equal nat (s k -i0)) (refl_equal C (CHead c2 k u2)) H14 H15))))) x H13)) u0 (sym_eq T u0 u1 -H12))) k0 (sym_eq K k0 k H11))) c0 (sym_eq C c0 c1 H10))) H9)) H8))) v0 -(sym_eq T v0 v H6))) i H2 H3 H4 H5 H0 H1)))))]) in (H0 (refl_equal nat i) -(refl_equal T v) (refl_equal C (CHead c1 k u1)) (refl_equal C x))))))))). +(u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k u1) (CHead c3 k +u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 +u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 +c3))))) (ex3_2_intro C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) +(s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k u1) (CHead c3 +k u1)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3))) c2 i0 +(refl_equal nat (s k i0)) (refl_equal C (CHead c2 k u1)) H10)) k0 H7))) u +H6)))) H5)) H4))))))))))) (\lambda (k0: K).(\lambda (i0: nat).(\lambda (v0: +T).(\lambda (u0: T).(\lambda (u2: T).(\lambda (H1: (subst0 i0 v0 u0 +u2)).(\lambda (c0: C).(\lambda (c2: C).(\lambda (H2: (csubst0 i0 v0 c0 +c2)).(\lambda (H3: (((eq C c0 (CHead c1 k u1)) \to (or3 (ex3_2 T nat (\lambda +(_: T).(\lambda (j: nat).(eq nat i0 (s k j)))) (\lambda (u3: T).(\lambda (_: +nat).(eq C c2 (CHead c1 k u3)))) (\lambda (u3: T).(\lambda (j: nat).(subst0 j +v0 u1 u3)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u1)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat i0 (s k j))))) (\lambda (u3: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u3))))) (\lambda +(u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3))))))))).(\lambda +(H4: (eq C (CHead c0 k0 u0) (CHead c1 k u1))).(let H5 \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) 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 c0 k0 u0) (CHead c1 k 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 c0 k0 u0) +(CHead c1 k u1) H4) in (\lambda (H8: (eq K k0 k)).(\lambda (H9: (eq C c0 +c1)).(let H10 \def (eq_ind C c0 (\lambda (c: C).((eq C c (CHead c1 k u1)) \to +(or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat i0 (s k j)))) +(\lambda (u3: T).(\lambda (_: nat).(eq C c2 (CHead c1 k u3)))) (\lambda (u3: +T).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (ex3_2 C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat i0 (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u1)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 +j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat i0 (s k j))))) (\lambda (u3: T).(\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u3))))) (\lambda (u3: T).(\lambda (_: C).(\lambda +(j: nat).(subst0 j v0 u1 u3)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v0 c1 c3)))))))) H3 c1 H9) in (let H11 \def (eq_ind C c0 +(\lambda (c: C).(csubst0 i0 v0 c c2)) H2 c1 H9) in (let H12 \def (eq_ind T u0 +(\lambda (t: T).(subst0 i0 v0 t u2)) H1 u1 H7) in (eq_ind_r K k (\lambda (k1: +K).(or3 (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k1 i0) (s k +j)))) (\lambda (u3: T).(\lambda (_: nat).(eq C (CHead c2 k1 u2) (CHead c1 k +u3)))) (\lambda (u3: T).(\lambda (j: nat).(subst0 j v0 u1 u3)))) (ex3_2 C nat +(\lambda (_: C).(\lambda (j: nat).(eq nat (s k1 i0) (s k j)))) (\lambda (c3: +C).(\lambda (_: nat).(eq C (CHead c2 k1 u2) (CHead c3 k u1)))) (\lambda (c3: +C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k1 i0) (s k j))))) (\lambda +(u3: T).(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k1 u2) (CHead c3 k +u3))))) (\lambda (u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 +u3)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 +c3))))))) (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 v0 u1 u3)))) +(ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) +(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k u2) (CHead c3 k u1)))) +(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 c3)))) (ex4_3 T C nat +(\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i0) (s k +j))))) (\lambda (u3: T).(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k +u2) (CHead c3 k u3))))) (\lambda (u3: T).(\lambda (_: C).(\lambda (j: +nat).(subst0 j v0 u1 u3)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v0 c1 c3))))) (ex4_3_intro T C nat (\lambda (_: T).(\lambda +(_: C).(\lambda (j: nat).(eq nat (s k i0) (s k j))))) (\lambda (u3: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C (CHead c2 k u2) (CHead c3 k +u3))))) (\lambda (u3: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v0 u1 +u3)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v0 c1 +c3)))) u2 c2 i0 (refl_equal nat (s k i0)) (refl_equal C (CHead c2 k u2)) H12 +H11)) k0 H8))))))) H6)) H5))))))))))))) i v y x H0))) H))))))). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubst1/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubst1/fwd.ma index 290ebdc57..5c5749873 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubst1/fwd.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubst1/fwd.ma @@ -29,96 +29,86 @@ C).(csubst1 i v c1 c2)))))))))) \def \lambda (k: K).(\lambda (c1: C).(\lambda (x: C).(\lambda (u1: T).(\lambda (v: T).(\lambda (i: nat).(\lambda (H: (csubst1 (s k i) v (CHead c1 k u1) -x)).(let H0 \def (match H in csubst1 return (\lambda (c: C).(\lambda (_: -(csubst1 ? ? ? c)).((eq C c x) \to (ex3_2 T C (\lambda (u2: T).(\lambda (c2: -C).(eq C x (CHead c2 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 -u2))) (\lambda (_: T).(\lambda (c2: C).(csubst1 i v c1 c2))))))) with -[csubst1_refl \Rightarrow (\lambda (H0: (eq C (CHead c1 k u1) x)).(eq_ind C -(CHead c1 k u1) (\lambda (c: C).(ex3_2 T C (\lambda (u2: T).(\lambda (c2: -C).(eq C c (CHead c2 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 -u2))) (\lambda (_: T).(\lambda (c2: C).(csubst1 i v c1 c2))))) (ex3_2_intro T -C (\lambda (u2: T).(\lambda (c2: C).(eq C (CHead c1 k u1) (CHead c2 k u2)))) -(\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: -T).(\lambda (c2: C).(csubst1 i v c1 c2))) u1 c1 (refl_equal C (CHead c1 k -u1)) (subst1_refl i v u1) (csubst1_refl i v c1)) x H0)) | (csubst1_sing c2 -H0) \Rightarrow (\lambda (H1: (eq C c2 x)).(eq_ind C x (\lambda (c: -C).((csubst0 (s k i) v (CHead c1 k u1) c) \to (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 (H2: (csubst0 (s k i) v (CHead c1 k u1) x)).(or3_ind (ex3_2 -T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda -(u2: T).(\lambda (_: nat).(eq C x (CHead c1 k u2)))) (\lambda (u2: -T).(\lambda (j: nat).(subst0 j v u1 u2)))) (ex3_2 C nat (\lambda (_: +x)).(csubst1_ind (s k i) v (CHead c1 k u1) (\lambda (c: C).(ex3_2 T C +(\lambda (u2: T).(\lambda (c2: C).(eq C c (CHead c2 k u2)))) (\lambda (u2: +T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c2: +C).(csubst1 i v c1 c2))))) (ex3_2_intro T C (\lambda (u2: T).(\lambda (c2: +C).(eq C (CHead c1 k u1) (CHead c2 k u2)))) (\lambda (u2: T).(\lambda (_: +C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c2: C).(csubst1 i v c1 +c2))) u1 c1 (refl_equal C (CHead c1 k u1)) (subst1_refl i v u1) (csubst1_refl +i v c1)) (\lambda (c2: C).(\lambda (H0: (csubst0 (s k i) v (CHead c1 k u1) +c2)).(or3_ind (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i) +(s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c1 k u2)))) +(\lambda (u2: T).(\lambda (j: nat).(subst0 j v u1 u2)))) (ex3_2 C nat +(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k u1)))) (\lambda (c3: C).(\lambda +(j: nat).(csubst0 j v c1 c3)))) (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 c2 (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 c2 (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 (H1: (ex3_2 T nat (\lambda (_: T).(\lambda +(j: nat).(eq nat (s k i) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C +c2 (CHead c1 k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v u1 +u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i) (s +k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c1 k u2)))) +(\lambda (u2: T).(\lambda (j: nat).(subst0 j v u1 u2))) (ex3_2 T C (\lambda +(u2: T).(\lambda (c3: C).(eq C c2 (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 (H2: +(eq nat (s k i) (s k x1))).(\lambda (H3: (eq C c2 (CHead c1 k x0))).(\lambda +(H4: (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 H5 \def (eq_ind_r nat x1 (\lambda (n: +nat).(subst0 n v u1 x0)) H4 i (s_inj k i x1 H2)) 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 H5) (csubst1_refl i v c1))) c2 H3)))))) H1)) (\lambda (H1: (ex3_2 C +nat (\lambda (_: C).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda +(c3: C).(\lambda (_: nat).(eq C c2 (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)))) (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))))) (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 (H3: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat -(s k i) (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C x (CHead c1 k -u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v u1 u2))))).(ex3_2_ind T -nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda -(u2: T).(\lambda (_: nat).(eq C x (CHead c1 k u2)))) (\lambda (u2: -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 (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 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 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 (_: +nat).(eq C c2 (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 c2 (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 (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) +nat).(\lambda (H2: (eq nat (s k i) (s k x1))).(\lambda (H3: (eq C c2 (CHead +x0 k u1))).(\lambda (H4: (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 H7 \def (eq_ind_r nat x1 -(\lambda (n: nat).(csubst0 n v c1 x0)) H6 i (s_inj k i x1 H4)) in +(_: T).(\lambda (c3: C).(csubst1 i v c1 c3))))) (let H5 \def (eq_ind_r nat x1 +(\lambda (n: nat).(csubst0 n v c1 x0)) H4 i (s_inj k i x1 H2)) 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 (_: +(CHead x0 k u1)) (subst1_refl i v u1) (csubst1_sing i v c1 x0 H5))) c2 +H3)))))) H1)) (\lambda (H1: (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: +(c3: C).(\lambda (_: nat).(eq C c2 (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 +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 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 +c3)))) (ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C c2 (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 (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: +C).(\lambda (x2: nat).(\lambda (H2: (eq nat (s k i) (s k x2))).(\lambda (H3: +(eq C c2 (CHead x1 k x0))).(\lambda (H4: (subst0 x2 v u1 x0)).(\lambda (H5: (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 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 +C).(csubst1 i v c1 c3))))) (let H6 \def (eq_ind_r nat x2 (\lambda (n: +nat).(csubst0 n v c1 x1)) H5 i (s_inj k i x2 H2)) in (let H7 \def (eq_ind_r +nat x2 (\lambda (n: nat).(subst0 n v u1 x0)) H4 i (s_inj k i x2 H2)) 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 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))))))))). +(CHead x1 k x0)) (subst1_single i v u1 x0 H7) (csubst1_sing i v c1 x1 H6)))) +c2 H3)))))))) H1)) (csubst0_gen_head k c1 c2 u1 v (s k i) H0)))) x H))))))). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubt/drop.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubt/drop.ma index 8ceb4bd9d..23e56e0f3 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubt/drop.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubt/drop.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "LambdaDelta-1/csubt/defs.ma". +include "LambdaDelta-1/csubt/fwd.ma". include "LambdaDelta-1/drop/fwd.ma". @@ -31,136 +31,57 @@ C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda u))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g c1 c2)).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop O O c1 (CHead d1 (Flat f) u))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c2)) H -(CHead d1 (Flat f) u) (drop_gen_refl c1 (CHead d1 (Flat f) u) H0)) in (let H2 -\def (match H1 in csubt return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: -(csubt ? c c0)).((eq C c (CHead d1 (Flat f) u)) \to ((eq C c0 c2) \to (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 -(Flat f) u))))))))) with [(csubt_sort n0) \Rightarrow (\lambda (H2: (eq C -(CSort n0) (CHead d1 (Flat f) u))).(\lambda (H3: (eq C (CSort n0) c2)).((let -H4 \def (eq_ind C (CSort n0) (\lambda (e: C).(match e in C return (\lambda -(_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow -False])) I (CHead d1 (Flat f) u) H2) in (False_ind ((eq C (CSort n0) c2) \to -(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead -d2 (Flat f) u))))) H4)) H3))) | (csubt_head c0 c3 H2 k u0) \Rightarrow -(\lambda (H3: (eq C (CHead c0 k u0) (CHead d1 (Flat f) u))).(\lambda (H4: (eq -C (CHead c3 k u0) c2)).((let H5 \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 k u0) (CHead d1 (Flat f) u) H3) in ((let H6 \def -(f_equal C K (\lambda (e: C).(match e in C return (\lambda (_: C).K) with -[(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c0 k u0) -(CHead d1 (Flat f) u) H3) in ((let H7 \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 k u0) (CHead d1 (Flat f) u) H3) in -(eq_ind C d1 (\lambda (c: C).((eq K k (Flat f)) \to ((eq T u0 u) \to ((eq C -(CHead c3 k u0) c2) \to ((csubt g c c3) \to (ex2 C (\lambda (d2: C).(csubt g -d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))))) (\lambda -(H8: (eq K k (Flat f))).(eq_ind K (Flat f) (\lambda (k0: K).((eq T u0 u) \to -((eq C (CHead c3 k0 u0) c2) \to ((csubt g d1 c3) \to (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) -u)))))))) (\lambda (H9: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C -(CHead c3 (Flat f) t) c2) \to ((csubt g d1 c3) \to (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))) -(\lambda (H10: (eq C (CHead c3 (Flat f) u) c2)).(eq_ind C (CHead c3 (Flat f) -u) (\lambda (c: C).((csubt g d1 c3) \to (ex2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Flat f) u)))))) (\lambda (H11: -(csubt g d1 c3)).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop O O (CHead c3 (Flat f) u) (CHead d2 (Flat f) u))) c3 H11 (drop_refl -(CHead c3 (Flat f) u)))) c2 H10)) u0 (sym_eq T u0 u H9))) k (sym_eq K k (Flat -f) H8))) c0 (sym_eq C c0 d1 H7))) H6)) H5)) H4 H2))) | (csubt_void c0 c3 H2 b -H3 u1 u2) \Rightarrow (\lambda (H4: (eq C (CHead c0 (Bind Void) u1) (CHead d1 -(Flat f) u))).(\lambda (H5: (eq C (CHead c3 (Bind b) u2) c2)).((let H6 \def -(eq_ind C (CHead c0 (Bind Void) u1) (\lambda (e: C).(match e in C return -(\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) -\Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u) -H4) in (False_ind ((eq C (CHead c3 (Bind b) u2) c2) \to ((csubt g c0 c3) \to -((not (eq B b Void)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))) H6)) H5 H2 H3))) | -(csubt_abst c0 c3 H2 u0 t H3) \Rightarrow (\lambda (H4: (eq C (CHead c0 (Bind -Abst) t) (CHead d1 (Flat f) u))).(\lambda (H5: (eq C (CHead c3 (Bind Abbr) -u0) c2)).((let H6 \def (eq_ind C (CHead c0 (Bind Abst) t) (\lambda (e: -C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow -False | (CHead _ k _) \Rightarrow (match k in K return (\lambda (_: K).Prop) -with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 -(Flat f) u) H4) in (False_ind ((eq C (CHead c3 (Bind Abbr) u0) c2) \to -((csubt g c0 c3) \to ((ty3 g c3 u0 t) \to (ex2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))) H6)) H5 H2 -H3)))]) in (H2 (refl_equal C (CHead d1 (Flat f) u)) (refl_equal C -c2)))))))))) (\lambda (n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: -C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 -(CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(drop n0 O c2 (CHead d2 (Flat f) u)))))))))))).(\lambda (c1: -C).(\lambda (c2: C).(\lambda (H0: (csubt g c1 c2)).(csubt_ind g (\lambda (c: -C).(\lambda (c0: C).(\forall (d1: C).(\forall (u: T).((drop (S n0) O c (CHead -d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop (S n0) O c0 (CHead d2 (Flat f) u))))))))) (\lambda (n1: -nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H1: (drop (S n0) O (CSort n1) -(CHead d1 (Flat f) u))).(let H2 \def (match H1 in drop return (\lambda (n2: -nat).(\lambda (n3: nat).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop -n2 n3 c c0)).((eq nat n2 (S n0)) \to ((eq nat n3 O) \to ((eq C c (CSort n1)) -\to ((eq C c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) -u))))))))))))) with [(drop_refl c) \Rightarrow (\lambda (H2: (eq nat O (S -n0))).(\lambda (H3: (eq nat O O)).(\lambda (H4: (eq C c (CSort n1))).(\lambda -(H5: (eq C c (CHead d1 (Flat f) u))).((let H6 \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 n0) H2) in (False_ind ((eq nat O O) \to -((eq C c (CSort n1)) \to ((eq C c (CHead d1 (Flat f) u)) \to (ex2 C (\lambda -(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 -(Flat f) u))))))) H6)) H3 H4 H5))))) | (drop_drop k h c e H2 u0) \Rightarrow -(\lambda (H3: (eq nat (S h) (S n0))).(\lambda (H4: (eq nat O O)).(\lambda -(H5: (eq C (CHead c k u0) (CSort n1))).(\lambda (H6: (eq C e (CHead d1 (Flat -f) u))).((let H7 \def (f_equal nat nat (\lambda (e0: nat).(match e0 in nat -return (\lambda (_: nat).nat) with [O \Rightarrow h | (S n2) \Rightarrow -n2])) (S h) (S n0) H3) in (eq_ind nat n0 (\lambda (n2: nat).((eq nat O O) \to -((eq C (CHead c k u0) (CSort n1)) \to ((eq C e (CHead d1 (Flat f) u)) \to -((drop (r k n2) O c e) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))))) (\lambda (_: -(eq nat O O)).(\lambda (H9: (eq C (CHead c k u0) (CSort n1))).(let H10 \def -(eq_ind C (CHead c k u0) (\lambda (e0: C).(match e0 in C return (\lambda (_: -C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow -True])) I (CSort n1) H9) in (False_ind ((eq C e (CHead d1 (Flat f) u)) \to -((drop (r k n0) O c e) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u)))))) H10)))) h -(sym_eq nat h n0 H7))) H4 H5 H6 H2))))) | (drop_skip k h d c e H2 u0) -\Rightarrow (\lambda (H3: (eq nat h (S n0))).(\lambda (H4: (eq nat (S d) -O)).(\lambda (H5: (eq C (CHead c k (lift h (r k d) u0)) (CSort n1))).(\lambda -(H6: (eq C (CHead e k u0) (CHead d1 (Flat f) u))).(eq_ind nat (S n0) (\lambda -(n2: nat).((eq nat (S d) O) \to ((eq C (CHead c k (lift n2 (r k d) u0)) -(CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 (Flat f) u)) \to ((drop n2 (r -k d) c e) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop -(S n0) O (CSort n1) (CHead d2 (Flat f) u))))))))) (\lambda (H7: (eq nat (S d) -O)).(let H8 \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 H7) in (False_ind ((eq C (CHead c k (lift (S n0) (r k d) u0)) (CSort n1)) -\to ((eq C (CHead e k u0) (CHead d1 (Flat f) u)) \to ((drop (S n0) (r k d) c -e) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) -O (CSort n1) (CHead d2 (Flat f) u))))))) H8))) h (sym_eq nat h (S n0) H3) H4 -H5 H6 H2)))))]) in (H2 (refl_equal nat (S n0)) (refl_equal nat O) (refl_equal -C (CSort n1)) (refl_equal C (CHead d1 (Flat f) u)))))))) (\lambda (c0: -C).(\lambda (c3: C).(\lambda (H1: (csubt g c0 c3)).(\lambda (H2: ((\forall -(d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead -d2 (Flat f) u))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: -T).(\forall (d1: C).(\forall (u0: T).((drop (S n0) O (CHead c0 k0 u) (CHead -d1 (Flat f) u0)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Flat f) u0))))))))) (\lambda (b: -B).(\lambda (u: T).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S -n0) O (CHead c0 (Bind b) u) (CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) u0))) -(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O -(CHead c3 (Bind b) u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: -(csubt g d1 x)).(\lambda (H5: (drop n0 O c3 (CHead x (Flat f) -u0))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop -(S n0) O (CHead c3 (Bind b) u) (CHead d2 (Flat f) u0))) x H4 (drop_drop (Bind -b) n0 c3 (CHead x (Flat f) u0) H5 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop -(Bind b) c0 (CHead d1 (Flat f) u0) u n0 H3)))))))) (\lambda (f0: F).(\lambda +(CHead d1 (Flat f) u) (drop_gen_refl c1 (CHead d1 (Flat f) u) H0)) in (let +H_x \def (csubt_gen_flat g d1 c2 u f H1) in (let H2 \def H_x in (ex2_ind C +(\lambda (e2: C).(eq C c2 (CHead e2 (Flat f) u))) (\lambda (e2: C).(csubt g +d1 e2)) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O +c2 (CHead d2 (Flat f) u)))) (\lambda (x: C).(\lambda (H3: (eq C c2 (CHead x +(Flat f) u))).(\lambda (H4: (csubt g d1 x)).(eq_ind_r C (CHead x (Flat f) u) +(\lambda (c: C).(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop O O c (CHead d2 (Flat f) u))))) (ex_intro2 C (\lambda (d2: C).(csubt +g d1 d2)) (\lambda (d2: C).(drop O O (CHead x (Flat f) u) (CHead d2 (Flat f) +u))) x H4 (drop_refl (CHead x (Flat f) u))) c2 H3)))) H2)))))))))) (\lambda +(n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) +\to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Flat f) u)) +\to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 +(CHead d2 (Flat f) u)))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda +(H0: (csubt g c1 c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).(\forall +(d1: C).(\forall (u: T).((drop (S n0) O c (CHead d1 (Flat f) u)) \to (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 (CHead +d2 (Flat f) u))))))))) (\lambda (n1: nat).(\lambda (d1: C).(\lambda (u: +T).(\lambda (H1: (drop (S n0) O (CSort n1) (CHead d1 (Flat f) u))).(and3_ind +(eq C (CHead d1 (Flat f) u) (CSort n1)) (eq nat (S n0) O) (eq nat O O) (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) +(CHead d2 (Flat f) u)))) (\lambda (_: (eq C (CHead d1 (Flat f) u) (CSort +n1))).(\lambda (H3: (eq nat (S n0) O)).(\lambda (_: (eq nat O O)).(let H5 +\def (eq_ind nat (S n0) (\lambda (ee: nat).(match ee in nat return (\lambda +(_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H3) +in (False_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop +(S n0) O (CSort n1) (CHead d2 (Flat f) u)))) H5))))) (drop_gen_sort n1 (S n0) +O (CHead d1 (Flat f) u) H1)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda +(H1: (csubt g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall (u: T).((drop +(S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 +d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) +u))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall +(d1: C).(\forall (u0: T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 (Flat f) +u0)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S +n0) O (CHead c3 k0 u) (CHead d2 (Flat f) u0))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead -c0 (Flat f0) u) (CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csubt g -d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u0))) (ex2 C +c0 (Bind b) u) (CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csubt g +d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) u0))) (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 -(Flat f0) u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: (csubt g -d1 x)).(\lambda (H5: (drop (S n0) O c3 (CHead x (Flat f) u0))).(ex_intro2 C +(Bind b) u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: (csubt g +d1 x)).(\lambda (H5: (drop n0 O c3 (CHead x (Flat f) u0))).(ex_intro2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 +(Bind b) u) (CHead d2 (Flat f) u0))) x H4 (drop_drop (Bind b) n0 c3 (CHead x +(Flat f) u0) H5 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind b) c0 (CHead d1 +(Flat f) u0) u n0 H3)))))))) (\lambda (f0: F).(\lambda (u: T).(\lambda (d1: +C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f0) u) +(CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u0))) (ex2 C (\lambda +(d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f0) +u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: (csubt g d1 +x)).(\lambda (H5: (drop (S n0) O c3 (CHead x (Flat f) u0))).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f0) u) (CHead d2 (Flat f) u0))) x H4 (drop_drop (Flat f0) n0 c3 (CHead x (Flat f) u0) H5 u))))) (H2 d1 u0 (drop_gen_drop (Flat f0) c0 (CHead d1 @@ -208,121 +129,37 @@ u))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csubt g c1 c2)).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop O O c1 (CHead d1 (Bind Abbr) u))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c2)) H (CHead d1 (Bind Abbr) u) (drop_gen_refl c1 (CHead d1 (Bind Abbr) u) H0)) in -(let H2 \def (match H1 in csubt return (\lambda (c: C).(\lambda (c0: -C).(\lambda (_: (csubt ? c c0)).((eq C c (CHead d1 (Bind Abbr) u)) \to ((eq C -c0 c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O -O c2 (CHead d2 (Bind Abbr) u))))))))) with [(csubt_sort n0) \Rightarrow -(\lambda (H2: (eq C (CSort n0) (CHead d1 (Bind Abbr) u))).(\lambda (H3: (eq C -(CSort n0) c2)).((let H4 \def (eq_ind C (CSort n0) (\lambda (e: C).(match e -in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ -_ _) \Rightarrow False])) I (CHead d1 (Bind Abbr) u) H2) in (False_ind ((eq C -(CSort n0) c2) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop O O c2 (CHead d2 (Bind Abbr) u))))) H4)) H3))) | (csubt_head c0 c3 -H2 k u0) \Rightarrow (\lambda (H3: (eq C (CHead c0 k u0) (CHead d1 (Bind -Abbr) u))).(\lambda (H4: (eq C (CHead c3 k u0) c2)).((let H5 \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 k u0) (CHead d1 -(Bind Abbr) u) H3) in ((let H6 \def (f_equal C K (\lambda (e: C).(match e in -C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k0 _) -\Rightarrow k0])) (CHead c0 k u0) (CHead d1 (Bind Abbr) u) H3) in ((let H7 -\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 k -u0) (CHead d1 (Bind Abbr) u) H3) in (eq_ind C d1 (\lambda (c: C).((eq K k -(Bind Abbr)) \to ((eq T u0 u) \to ((eq C (CHead c3 k u0) c2) \to ((csubt g c -c3) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O -c2 (CHead d2 (Bind Abbr) u))))))))) (\lambda (H8: (eq K k (Bind -Abbr))).(eq_ind K (Bind Abbr) (\lambda (k0: K).((eq T u0 u) \to ((eq C (CHead -c3 k0 u0) c2) \to ((csubt g d1 c3) \to (ex2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u)))))))) (\lambda -(H9: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C (CHead c3 (Bind Abbr) t) -c2) \to ((csubt g d1 c3) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))))) (\lambda (H10: -(eq C (CHead c3 (Bind Abbr) u) c2)).(eq_ind C (CHead c3 (Bind Abbr) u) -(\lambda (c: C).((csubt g d1 c3) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop O O c (CHead d2 (Bind Abbr) u)))))) (\lambda (H11: -(csubt g d1 c3)).(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: -C).(drop O O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u))) c3 H11 -(drop_refl (CHead c3 (Bind Abbr) u)))) c2 H10)) u0 (sym_eq T u0 u H9))) k -(sym_eq K k (Bind Abbr) H8))) c0 (sym_eq C c0 d1 H7))) H6)) H5)) H4 H2))) | -(csubt_void c0 c3 H2 b H3 u1 u2) \Rightarrow (\lambda (H4: (eq C (CHead c0 -(Bind Void) u1) (CHead d1 (Bind Abbr) u))).(\lambda (H5: (eq C (CHead c3 -(Bind b) u2) c2)).((let H6 \def (eq_ind C (CHead c0 (Bind Void) u1) (\lambda -(e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow -False | (CHead _ k _) \Rightarrow (match k 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 (CHead d1 (Bind Abbr) u) H4) in (False_ind -((eq C (CHead c3 (Bind b) u2) c2) \to ((csubt g c0 c3) \to ((not (eq B b -Void)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O -O c2 (CHead d2 (Bind Abbr) u))))))) H6)) H5 H2 H3))) | (csubt_abst c0 c3 H2 -u0 t H3) \Rightarrow (\lambda (H4: (eq C (CHead c0 (Bind Abst) t) (CHead d1 -(Bind Abbr) u))).(\lambda (H5: (eq C (CHead c3 (Bind Abbr) u0) c2)).((let H6 -\def (eq_ind C (CHead c0 (Bind Abst) t) (\lambda (e: C).(match e 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 True | Void \Rightarrow False]) | (Flat _) -\Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H4) in (False_ind ((eq C -(CHead c3 (Bind Abbr) u0) c2) \to ((csubt g c0 c3) \to ((ty3 g c3 u0 t) \to -(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead -d2 (Bind Abbr) u))))))) H6)) H5 H2 H3)))]) in (H2 (refl_equal C (CHead d1 -(Bind Abbr) u)) (refl_equal C c2)))))))))) (\lambda (n0: nat).(\lambda (H: -((\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: -C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Bind Abbr) u)) \to (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 -(Bind Abbr) u)))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H0: -(csubt g c1 c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (d1: -C).(\forall (u: T).((drop (S n0) O c (CHead d1 (Bind Abbr) u)) \to (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 (CHead -d2 (Bind Abbr) u))))))))) (\lambda (n1: nat).(\lambda (d1: C).(\lambda (u: -T).(\lambda (H1: (drop (S n0) O (CSort n1) (CHead d1 (Bind Abbr) u))).(let H2 -\def (match H1 in drop return (\lambda (n2: nat).(\lambda (n3: nat).(\lambda -(c: C).(\lambda (c0: C).(\lambda (_: (drop n2 n3 c c0)).((eq nat n2 (S n0)) -\to ((eq nat n3 O) \to ((eq C c (CSort n1)) \to ((eq C c0 (CHead d1 (Bind -Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop -(S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))))))))) with [(drop_refl c) -\Rightarrow (\lambda (H2: (eq nat O (S n0))).(\lambda (H3: (eq nat O -O)).(\lambda (H4: (eq C c (CSort n1))).(\lambda (H5: (eq C c (CHead d1 (Bind -Abbr) u))).((let H6 \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 n0) H2) in (False_ind ((eq nat O O) \to ((eq C c (CSort n1)) -\to ((eq C c (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g -d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) -u))))))) H6)) H3 H4 H5))))) | (drop_drop k h c e H2 u0) \Rightarrow (\lambda -(H3: (eq nat (S h) (S n0))).(\lambda (H4: (eq nat O O)).(\lambda (H5: (eq C -(CHead c k u0) (CSort n1))).(\lambda (H6: (eq C e (CHead d1 (Bind Abbr) -u))).((let H7 \def (f_equal nat nat (\lambda (e0: nat).(match e0 in nat -return (\lambda (_: nat).nat) with [O \Rightarrow h | (S n2) \Rightarrow -n2])) (S h) (S n0) H3) in (eq_ind nat n0 (\lambda (n2: nat).((eq nat O O) \to -((eq C (CHead c k u0) (CSort n1)) \to ((eq C e (CHead d1 (Bind Abbr) u)) \to -((drop (r k n2) O c e) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))))) (\lambda -(_: (eq nat O O)).(\lambda (H9: (eq C (CHead c k u0) (CSort n1))).(let H10 -\def (eq_ind C (CHead c k u0) (\lambda (e0: C).(match e0 in C return (\lambda -(_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow -True])) I (CSort n1) H9) in (False_ind ((eq C e (CHead d1 (Bind Abbr) u)) \to -((drop (r k n0) O c e) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))))) H10)))) h -(sym_eq nat h n0 H7))) H4 H5 H6 H2))))) | (drop_skip k h d c e H2 u0) -\Rightarrow (\lambda (H3: (eq nat h (S n0))).(\lambda (H4: (eq nat (S d) -O)).(\lambda (H5: (eq C (CHead c k (lift h (r k d) u0)) (CSort n1))).(\lambda -(H6: (eq C (CHead e k u0) (CHead d1 (Bind Abbr) u))).(eq_ind nat (S n0) -(\lambda (n2: nat).((eq nat (S d) O) \to ((eq C (CHead c k (lift n2 (r k d) -u0)) (CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 (Bind Abbr) u)) \to -((drop n2 (r k d) c e) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda -(d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))))) (\lambda -(H7: (eq nat (S d) O)).(let H8 \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 H7) in (False_ind ((eq C (CHead c k -(lift (S n0) (r k d) u0)) (CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 -(Bind Abbr) u)) \to ((drop (S n0) (r k d) c e) \to (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 -(Bind Abbr) u))))))) H8))) h (sym_eq nat h (S n0) H3) H4 H5 H6 H2)))))]) in -(H2 (refl_equal nat (S n0)) (refl_equal nat O) (refl_equal C (CSort n1)) -(refl_equal C (CHead d1 (Bind Abbr) u)))))))) (\lambda (c0: C).(\lambda (c3: -C).(\lambda (H1: (csubt g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall -(u: T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) +(let H2 \def (csubt_gen_abbr g d1 c2 u H1) in (ex2_ind C (\lambda (e2: C).(eq +C c2 (CHead e2 (Bind Abbr) u))) (\lambda (e2: C).(csubt g d1 e2)) (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 +(Bind Abbr) u)))) (\lambda (x: C).(\lambda (H3: (eq C c2 (CHead x (Bind Abbr) +u))).(\lambda (H4: (csubt g d1 x)).(eq_ind_r C (CHead x (Bind Abbr) u) +(\lambda (c: C).(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop O O c (CHead d2 (Bind Abbr) u))))) (ex_intro2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead x (Bind Abbr) u) (CHead +d2 (Bind Abbr) u))) x H4 (drop_refl (CHead x (Bind Abbr) u))) c2 H3)))) +H2))))))))) (\lambda (n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: +C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 +(CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))))))))))).(\lambda +(c1: C).(\lambda (c2: C).(\lambda (H0: (csubt g c1 c2)).(csubt_ind g (\lambda +(c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (u: T).((drop (S n0) O c +(CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop (S n0) O c0 (CHead d2 (Bind Abbr) u))))))))) (\lambda +(n1: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H1: (drop (S n0) O +(CSort n1) (CHead d1 (Bind Abbr) u))).(and3_ind (eq C (CHead d1 (Bind Abbr) +u) (CSort n1)) (eq nat (S n0) O) (eq nat O O) (ex2 C (\lambda (d2: C).(csubt +g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) +u)))) (\lambda (_: (eq C (CHead d1 (Bind Abbr) u) (CSort n1))).(\lambda (H3: +(eq nat (S n0) O)).(\lambda (_: (eq nat O O)).(let H5 \def (eq_ind nat (S n0) +(\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H3) in (False_ind (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) +(CHead d2 (Bind Abbr) u)))) H5))))) (drop_gen_sort n1 (S n0) O (CHead d1 +(Bind Abbr) u) H1)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: +(csubt g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall (u: T).((drop (S +n0) O c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csubt g d1 +d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (d1: C).(\forall (u0: T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 (Bind Abbr) u0)) \to (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: @@ -397,217 +234,118 @@ t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (c2: C).(\lambda (H: (csubt g c1 c2)).(\lambda (d1: C).(\lambda (t: T).(\lambda (H0: (drop O O c1 (CHead d1 (Bind Abst) t))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c2)) H (CHead d1 (Bind Abst) t) -(drop_gen_refl c1 (CHead d1 (Bind Abst) t) H0)) in (let H2 \def (match H1 in -csubt return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csubt ? c -c0)).((eq C c (CHead d1 (Bind Abst) t)) \to ((eq C c0 c2) \to (or (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 -(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c2 (CHead d2 (Bind Abbr) -u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) with -[(csubt_sort n0) \Rightarrow (\lambda (H2: (eq C (CSort n0) (CHead d1 (Bind -Abst) t))).(\lambda (H3: (eq C (CSort n0) c2)).((let H4 \def (eq_ind C (CSort -n0) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with [(CSort -_) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind -Abst) t) H2) in (False_ind ((eq C (CSort n0) c2) \to (or (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) -(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u: T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: -C).(\lambda (u: T).(ty3 g d2 u t)))))) H4)) H3))) | (csubt_head c0 c3 H2 k u) -\Rightarrow (\lambda (H3: (eq C (CHead c0 k u) (CHead d1 (Bind Abst) -t))).(\lambda (H4: (eq C (CHead c3 k u) c2)).((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 c0 k u) (CHead d1 -(Bind Abst) t) H3) in ((let H6 \def (f_equal C K (\lambda (e: C).(match e in -C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k0 _) -\Rightarrow k0])) (CHead c0 k u) (CHead d1 (Bind Abst) t) H3) in ((let H7 -\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 k -u) (CHead d1 (Bind Abst) t) H3) in (eq_ind C d1 (\lambda (c: C).((eq K k -(Bind Abst)) \to ((eq T u t) \to ((eq C (CHead c3 k u) c2) \to ((csubt g c -c3) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O -O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 -(Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) -(\lambda (H8: (eq K k (Bind Abst))).(eq_ind K (Bind Abst) (\lambda (k0: -K).((eq T u t) \to ((eq C (CHead c3 k0 u) c2) \to ((csubt g d1 c3) \to (or -(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead -d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) -u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))))))) (\lambda -(H9: (eq T u t)).(eq_ind T t (\lambda (t0: T).((eq C (CHead c3 (Bind Abst) -t0) c2) \to ((csubt g d1 c3) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(drop_gen_refl c1 (CHead d1 (Bind Abst) t) H0)) in (let H2 \def +(csubt_gen_abst g d1 c2 t H1) in (or_ind (ex2 C (\lambda (e2: C).(eq C c2 +(CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csubt g d1 e2))) (ex3_2 C T +(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) +(\lambda (e2: C).(\lambda (_: T).(csubt g d1 e2))) (\lambda (e2: C).(\lambda +(v2: T).(ty3 g e2 v2 t)))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda -(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: -T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: -T).(ty3 g d2 u0 t)))))))) (\lambda (H10: (eq C (CHead c3 (Bind Abst) t) -c2)).(eq_ind C (CHead c3 (Bind Abst) t) (\lambda (c: C).((csubt g d1 c3) \to -(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c -(CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c (CHead d2 -(Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))))) -(\lambda (H11: (csubt g d1 c3)).(or_introl (ex2 C (\lambda (d2: C).(csubt g -d1 d2)) (\lambda (d2: C).(drop O O (CHead c3 (Bind Abst) t) (CHead d2 (Bind -Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) -(\lambda (d2: C).(\lambda (u0: T).(drop O O (CHead c3 (Bind Abst) t) (CHead -d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) -(ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O -(CHead c3 (Bind Abst) t) (CHead d2 (Bind Abst) t))) c3 H11 (drop_refl (CHead -c3 (Bind Abst) t))))) c2 H10)) u (sym_eq T u t H9))) k (sym_eq K k (Bind -Abst) H8))) c0 (sym_eq C c0 d1 H7))) H6)) H5)) H4 H2))) | (csubt_void c0 c3 -H2 b H3 u1 u2) \Rightarrow (\lambda (H4: (eq C (CHead c0 (Bind Void) u1) -(CHead d1 (Bind Abst) t))).(\lambda (H5: (eq C (CHead c3 (Bind b) u2) -c2)).((let H6 \def (eq_ind C (CHead c0 (Bind Void) u1) (\lambda (e: C).(match -e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | -(CHead _ k _) \Rightarrow (match k 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 (CHead d1 (Bind Abst) t) H4) in (False_ind ((eq C -(CHead c3 (Bind b) u2) c2) \to ((csubt g c0 c3) \to ((not (eq B b Void)) \to +(d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: +T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: +T).(ty3 g d2 u t))))) (\lambda (H3: (ex2 C (\lambda (e2: C).(eq C c2 (CHead +e2 (Bind Abst) t))) (\lambda (e2: C).(csubt g d1 e2)))).(ex2_ind C (\lambda +(e2: C).(eq C c2 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csubt g d1 e2)) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c2 (CHead d2 -(Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))) H6)) -H5 H2 H3))) | (csubt_abst c0 c3 H2 u t0 H3) \Rightarrow (\lambda (H4: (eq C -(CHead c0 (Bind Abst) t0) (CHead d1 (Bind Abst) t))).(\lambda (H5: (eq C -(CHead c3 (Bind Abbr) u) c2)).((let H6 \def (f_equal C T (\lambda (e: -C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow t0 | -(CHead _ _ t1) \Rightarrow t1])) (CHead c0 (Bind Abst) t0) (CHead d1 (Bind -Abst) t) H4) in ((let H7 \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 (Bind Abst) t0) (CHead d1 (Bind Abst) t) H4) in -(eq_ind C d1 (\lambda (c: C).((eq T t0 t) \to ((eq C (CHead c3 (Bind Abbr) u) -c2) \to ((csubt g c c3) \to ((ty3 g c3 u t0) \to (or (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) -(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: -C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (H8: (eq T t0 -t)).(eq_ind T t (\lambda (t1: T).((eq C (CHead c3 (Bind Abbr) u) c2) \to -((csubt g d1 c3) \to ((ty3 g c3 u t1) \to (or (ex2 C (\lambda (d2: C).(csubt -g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C -T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: -C).(\lambda (u0: T).(ty3 g d2 u0 t))))))))) (\lambda (H9: (eq C (CHead c3 -(Bind Abbr) u) c2)).(eq_ind C (CHead c3 (Bind Abbr) u) (\lambda (c: -C).((csubt g d1 c3) \to ((ty3 g c3 u t) \to (or (ex2 C (\lambda (d2: +(Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) +(\lambda (x: C).(\lambda (H4: (eq C c2 (CHead x (Bind Abst) t))).(\lambda +(H5: (csubt g d1 x)).(eq_ind_r C (CHead x (Bind Abst) t) (\lambda (c: C).(or +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c (CHead +d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 +d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c (CHead d2 (Bind Abbr) +u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))) (or_introl (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead x (Bind +Abst) t) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O (CHead x +(Bind Abst) t) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: +T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda +(d2: C).(drop O O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) t))) x H5 +(drop_refl (CHead x (Bind Abst) t)))) c2 H4)))) H3)) (\lambda (H3: (ex3_2 C T +(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) +(\lambda (e2: C).(\lambda (_: T).(csubt 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 c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: +T).(csubt g d1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 t))) (or +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead +d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 +d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c2 (CHead d2 (Bind Abbr) +u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H4: (eq C c2 (CHead x0 (Bind Abbr) +x1))).(\lambda (H5: (csubt g d1 x0)).(\lambda (H6: (ty3 g x0 x1 t)).(eq_ind_r +C (CHead x0 (Bind Abbr) x1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u0: T).(drop O O c (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: -C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))) (\lambda (H10: (csubt g d1 -c3)).(\lambda (H11: (ty3 g c3 u t)).(or_intror (ex2 C (\lambda (d2: C).(csubt -g d1 d2)) (\lambda (d2: C).(drop O O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind -Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) -(\lambda (d2: C).(\lambda (u0: T).(drop O O (CHead c3 (Bind Abbr) u) (CHead -d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) -(ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda -(d2: C).(\lambda (u0: T).(drop O O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind -Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) c3 u H10 -(drop_refl (CHead c3 (Bind Abbr) u)) H11)))) c2 H9)) t0 (sym_eq T t0 t H8))) -c0 (sym_eq C c0 d1 H7))) H6)) H5 H2 H3)))]) in (H2 (refl_equal C (CHead d1 -(Bind Abst) t)) (refl_equal C c2)))))))))) (\lambda (n0: nat).(\lambda (H: -((\forall (c1: C).(\forall (c2: C).((csubt g c1 c2) \to (\forall (d1: -C).(\forall (t: T).((drop n0 O c1 (CHead d1 (Bind Abst) t)) \to (or (ex2 C -(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 -(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c2 (CHead d2 (Bind Abbr) -u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))))))).(\lambda -(c1: C).(\lambda (c2: C).(\lambda (H0: (csubt g c1 c2)).(csubt_ind g (\lambda -(c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (t: T).((drop (S n0) O c +C).(\lambda (u: T).(drop O O c (CHead d2 (Bind Abbr) u)))) (\lambda (d2: +C).(\lambda (u: T).(ty3 g d2 u t)))))) (or_intror (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop O O (CHead x0 (Bind Abbr) x1) +(CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O (CHead x0 +(Bind Abbr) x1) (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).(csubt +g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O (CHead x0 (Bind Abbr) +x1) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u +t))) x0 x1 H5 (drop_refl (CHead x0 (Bind Abbr) x1)) H6)) c2 H4)))))) H3)) +H2))))))))) (\lambda (n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: +C).((csubt g c1 c2) \to (\forall (d1: C).(\forall (t: T).((drop n0 O c1 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop (S n0) O c0 (CHead d2 (Bind Abst) t)))) (ex3_2 C T +(\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(drop (S n0) O c0 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: -C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (n1: nat).(\lambda (d1: -C).(\lambda (t: T).(\lambda (H1: (drop (S n0) O (CSort n1) (CHead d1 (Bind -Abst) t))).(let H2 \def (match H1 in drop return (\lambda (n2: nat).(\lambda -(n3: nat).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop n2 n3 c -c0)).((eq nat n2 (S n0)) \to ((eq nat n3 O) \to ((eq C c (CSort n1)) \to ((eq -C c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 -d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) -(ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: -C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))) -(\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))))) with [(drop_refl -c) \Rightarrow (\lambda (H2: (eq nat O (S n0))).(\lambda (H3: (eq nat O -O)).(\lambda (H4: (eq C c (CSort n1))).(\lambda (H5: (eq C c (CHead d1 (Bind -Abst) t))).((let H6 \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 n0) H2) in (False_ind ((eq nat O O) \to ((eq C c (CSort n1)) -\to ((eq C c (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt -g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) -t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda -(d2: C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))) -(\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))) H6)) H3 H4 H5))))) | -(drop_drop k h c e H2 u) \Rightarrow (\lambda (H3: (eq nat (S h) (S -n0))).(\lambda (H4: (eq nat O O)).(\lambda (H5: (eq C (CHead c k u) (CSort -n1))).(\lambda (H6: (eq C e (CHead d1 (Bind Abst) t))).((let H7 \def (f_equal -nat nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).nat) -with [O \Rightarrow h | (S n2) \Rightarrow n2])) (S h) (S n0) H3) in (eq_ind -nat n0 (\lambda (n2: nat).((eq nat O O) \to ((eq C (CHead c k u) (CSort n1)) -\to ((eq C e (CHead d1 (Bind Abst) t)) \to ((drop (r k n2) O c e) \to (or -(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O -(CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda -(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O -(CSort n1) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: -T).(ty3 g d2 u0 t)))))))))) (\lambda (_: (eq nat O O)).(\lambda (H9: (eq C -(CHead c k u) (CSort n1))).(let H10 \def (eq_ind C (CHead c k u) (\lambda -(e0: C).(match e0 in C return (\lambda (_: C).Prop) with [(CSort _) -\Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n1) H9) in -(False_ind ((eq C e (CHead d1 (Bind Abst) t)) \to ((drop (r k n0) O c e) \to -(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O -(CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda -(_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O -(CSort n1) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: -T).(ty3 g d2 u0 t))))))) H10)))) h (sym_eq nat h n0 H7))) H4 H5 H6 H2))))) | -(drop_skip k h d c e H2 u) \Rightarrow (\lambda (H3: (eq nat h (S -n0))).(\lambda (H4: (eq nat (S d) O)).(\lambda (H5: (eq C (CHead c k (lift h -(r k d) u)) (CSort n1))).(\lambda (H6: (eq C (CHead e k u) (CHead d1 (Bind -Abst) t))).(eq_ind nat (S n0) (\lambda (n2: nat).((eq nat (S d) O) \to ((eq C -(CHead c k (lift n2 (r k d) u)) (CSort n1)) \to ((eq C (CHead e k u) (CHead -d1 (Bind Abst) t)) \to ((drop n2 (r k d) c e) \to (or (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 -(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CSort n1) (CHead d2 -(Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) -(\lambda (H7: (eq nat (S d) O)).(let H8 \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 H7) in (False_ind ((eq C (CHead c k -(lift (S n0) (r k d) u)) (CSort n1)) \to ((eq C (CHead e k u) (CHead d1 (Bind -Abst) t)) \to ((drop (S n0) (r k d) c e) \to (or (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 -(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CSort n1) (CHead d2 -(Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))) -H8))) h (sym_eq nat h (S n0) H3) H4 H5 H6 H2)))))]) in (H2 (refl_equal nat (S -n0)) (refl_equal nat O) (refl_equal C (CSort n1)) (refl_equal C (CHead d1 -(Bind Abst) t)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csubt -g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall (t: T).((drop (S n0) O c0 -(CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T +(u: T).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda +(u: T).(ty3 g d2 u t))))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda +(H0: (csubt g c1 c2)).(csubt_ind g (\lambda (c: C).(\lambda (c0: C).(\forall +(d1: C).(\forall (t: T).((drop (S n0) O c (CHead d1 (Bind Abst) t)) \to (or +(ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 +(CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c0 +(CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u +t)))))))))) (\lambda (n1: nat).(\lambda (d1: C).(\lambda (t: T).(\lambda (H1: +(drop (S n0) O (CSort n1) (CHead d1 (Bind Abst) t))).(and3_ind (eq C (CHead +d1 (Bind Abst) t) (CSort n1)) (eq nat (S n0) O) (eq nat O O) (or (ex2 C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) +(CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CSort +n1) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u +t))))) (\lambda (_: (eq C (CHead d1 (Bind Abst) t) (CSort n1))).(\lambda (H3: +(eq nat (S n0) O)).(\lambda (_: (eq nat O O)).(let H5 \def (eq_ind nat (S n0) +(\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H3) in (False_ind (or (ex2 +C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort +n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CSort +n1) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u +t))))) H5))))) (drop_gen_sort n1 (S n0) O (CHead d1 (Bind Abst) t) H1)))))) +(\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csubt g c0 c3)).(\lambda +(H2: ((\forall (d1: C).(\forall (t: T).((drop (S n0) O c0 (CHead d1 (Bind +Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: +C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop +(S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 +g d2 u t)))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: +T).(\forall (d1: C).(\forall (t: T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 +(Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda +(d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda -(u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: -C).(\lambda (u: T).(ty3 g d2 u t)))))))))).(\lambda (k: K).(K_ind (\lambda -(k0: K).(\forall (u: T).(\forall (d1: C).(\forall (t: T).((drop (S n0) O -(CHead c0 k0 u) (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: -C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 -(Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 -d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 k0 u) (CHead -d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 -t)))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: C).(\lambda (t: -T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) (CHead d1 (Bind Abst) -t))).(or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop -n0 O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: -T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead -d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) -(or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O -(CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: -C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop -(S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: -C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (H4: (ex2 C (\lambda (d2: +(u0: T).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind Abbr) u0)))) (\lambda +(d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (b: B).(\lambda +(u: T).(\lambda (d1: C).(\lambda (t: T).(\lambda (H3: (drop (S n0) O (CHead +c0 (Bind b) u) (CHead d1 (Bind Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) -t))))).(ex2_ind C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 -O c3 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) -(\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda -(d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind +(d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda +(d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (or (ex2 C (\lambda (d2: +C).(csubt g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) +(CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: +T).(csubt g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead +c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: +T).(ty3 g d2 u0 t))))) (\lambda (H4: (ex2 C (\lambda (d2: C).(csubt g d1 d2)) +(\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C +(\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 +(Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda (d2: +C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C +T (\lambda (d2: C).(\lambda (_: T).(csubt g d1 d2))) (\lambda (d2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x: C).(\lambda (H5: (csubt g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csubt g d1 d2)) (\lambda diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubt/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubt/fwd.ma index 9cb070ded..78ab95a2b 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubt/fwd.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubt/fwd.ma @@ -198,6 +198,69 @@ v2)))) (\lambda (e2: C).(\lambda (_: T).(csubt g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))) c3 u (refl_equal C (CHead c3 (Bind Abbr) u)) H10 H8))))))) H5)))))))))) y c2 H0))) H))))). +theorem csubt_gen_flat: + \forall (g: G).(\forall (e1: C).(\forall (c2: C).(\forall (v: T).(\forall +(f: F).((csubt g (CHead e1 (Flat f) v) c2) \to (ex2 C (\lambda (e2: C).(eq C +c2 (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2)))))))) +\def + \lambda (g: G).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda +(f: F).(\lambda (H: (csubt g (CHead e1 (Flat f) v) c2)).(insert_eq C (CHead +e1 (Flat f) v) (\lambda (c: C).(csubt g c c2)) (\lambda (_: C).(ex2 C +(\lambda (e2: C).(eq C c2 (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g +e1 e2)))) (\lambda (y: C).(\lambda (H0: (csubt g y c2)).(csubt_ind g (\lambda +(c: C).(\lambda (c0: C).((eq C c (CHead e1 (Flat f) v)) \to (ex2 C (\lambda +(e2: C).(eq C c0 (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 +e2)))))) (\lambda (n: nat).(\lambda (H1: (eq C (CSort n) (CHead e1 (Flat f) +v))).(let H2 \def (eq_ind C (CSort n) (\lambda (ee: C).(match ee in C return +(\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) +\Rightarrow False])) I (CHead e1 (Flat f) v) H1) in (False_ind (ex2 C +(\lambda (e2: C).(eq C (CSort n) (CHead e2 (Flat f) v))) (\lambda (e2: +C).(csubt g e1 e2))) H2)))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H1: +(csubt g c1 c3)).(\lambda (H2: (((eq C c1 (CHead e1 (Flat f) v)) \to (ex2 C +(\lambda (e2: C).(eq C c3 (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g +e1 e2)))))).(\lambda (k: K).(\lambda (u: T).(\lambda (H3: (eq C (CHead c1 k +u) (CHead e1 (Flat f) v))).(let H4 \def (f_equal C C (\lambda (e: C).(match e +in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) +\Rightarrow c])) (CHead c1 k u) (CHead e1 (Flat f) v) H3) in ((let H5 \def +(f_equal C K (\lambda (e: C).(match e in C return (\lambda (_: C).K) with +[(CSort _) \Rightarrow k | (CHead _ k0 _) \Rightarrow k0])) (CHead c1 k u) +(CHead e1 (Flat f) v) H3) in ((let H6 \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 c1 k u) (CHead e1 (Flat f) v) H3) in +(\lambda (H7: (eq K k (Flat f))).(\lambda (H8: (eq C c1 e1)).(eq_ind_r T v +(\lambda (t: T).(ex2 C (\lambda (e2: C).(eq C (CHead c3 k t) (CHead e2 (Flat +f) v))) (\lambda (e2: C).(csubt g e1 e2)))) (eq_ind_r K (Flat f) (\lambda +(k0: K).(ex2 C (\lambda (e2: C).(eq C (CHead c3 k0 v) (CHead e2 (Flat f) v))) +(\lambda (e2: C).(csubt g e1 e2)))) (let H9 \def (eq_ind C c1 (\lambda (c: +C).((eq C c (CHead e1 (Flat f) v)) \to (ex2 C (\lambda (e2: C).(eq C c3 +(CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2))))) H2 e1 H8) in +(let H10 \def (eq_ind C c1 (\lambda (c: C).(csubt g c c3)) H1 e1 H8) in +(ex_intro2 C (\lambda (e2: C).(eq C (CHead c3 (Flat f) v) (CHead e2 (Flat f) +v))) (\lambda (e2: C).(csubt g e1 e2)) c3 (refl_equal C (CHead c3 (Flat f) +v)) H10))) k H7) u H6)))) H5)) H4))))))))) (\lambda (c1: C).(\lambda (c3: +C).(\lambda (_: (csubt g c1 c3)).(\lambda (_: (((eq C c1 (CHead e1 (Flat f) +v)) \to (ex2 C (\lambda (e2: C).(eq C c3 (CHead e2 (Flat f) v))) (\lambda +(e2: C).(csubt g e1 e2)))))).(\lambda (b: B).(\lambda (_: (not (eq B b +Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H4: (eq C (CHead c1 (Bind +Void) u1) (CHead e1 (Flat f) v))).(let H5 \def (eq_ind C (CHead c1 (Bind +Void) u1) (\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 _) \Rightarrow True | (Flat _) \Rightarrow +False])])) I (CHead e1 (Flat f) v) H4) in (False_ind (ex2 C (\lambda (e2: +C).(eq C (CHead c3 (Bind b) u2) (CHead e2 (Flat f) v))) (\lambda (e2: +C).(csubt g e1 e2))) H5))))))))))) (\lambda (c1: C).(\lambda (c3: C).(\lambda +(_: (csubt g c1 c3)).(\lambda (_: (((eq C c1 (CHead e1 (Flat f) v)) \to (ex2 +C (\lambda (e2: C).(eq C c3 (CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g +e1 e2)))))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c3 u +t)).(\lambda (H4: (eq C (CHead c1 (Bind Abst) t) (CHead e1 (Flat f) v))).(let +H5 \def (eq_ind C (CHead c1 (Bind Abst) t) (\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 _) +\Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e1 (Flat f) v) +H4) in (False_ind (ex2 C (\lambda (e2: C).(eq C (CHead c3 (Bind Abbr) u) +(CHead e2 (Flat f) v))) (\lambda (e2: C).(csubt g e1 e2))) H5)))))))))) y c2 +H0))) H)))))). + theorem csubt_gen_bind: \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall (v1: T).((csubt g (CHead e1 (Bind b1) v1) c2) \to (ex2_3 B C T (\lambda (b2: diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubt/getl.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubt/getl.ma index 9c5c018af..280fdcaea 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubt/getl.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csubt/getl.ma @@ -14,8 +14,6 @@ (* This file was automatically generated: do not edit *********************) -include "LambdaDelta-1/csubt/fwd.ma". - include "LambdaDelta-1/csubt/clear.ma". include "LambdaDelta-1/csubt/drop.ma". diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/definitions.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/definitions.ma index 559add969..7bc8e4c94 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/definitions.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/definitions.ma @@ -22,6 +22,8 @@ include "LambdaDelta-1/clen/defs.ma". include "LambdaDelta-1/flt/defs.ma". +include "LambdaDelta-1/app/defs.ma". + include "LambdaDelta-1/cnt/defs.ma". include "LambdaDelta-1/cimp/defs.ma". diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop/fwd.ma index aff6250a2..e32fb9340 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop/fwd.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop/fwd.ma @@ -93,54 +93,76 @@ nat).((eq nat y0 O) \to ((eq C y (CHead c k u)) \to (drop (r k h) y0 c x)))) nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq nat n (S h)) \to ((eq nat n0 O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) n0 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 (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) 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 (drop -(r k h) O c e)))))).(\lambda (u0: T).(\lambda (H5: (eq nat (S h0) (S +nat O O)).(\lambda (H5: (eq C c0 (CHead c k u))).(eq_ind_r C (CHead c k u) +(\lambda (c1: C).(drop (r k h) O c c1)) (let H6 \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 h) H3) in (False_ind (drop (r k h) O c +(CHead c k u)) H6)) c0 H5))))) (\lambda (k0: K).(\lambda (h0: nat).(\lambda +(c0: C).(\lambda (e: C).(\lambda (H3: (drop (r k0 h0) O c0 e)).(\lambda (H4: +(((eq nat (r k0 h0) (S h)) \to ((eq nat O O) \to ((eq C c0 (CHead c k u)) \to +(drop (r k h) O c e)))))).(\lambda (u0: T).(\lambda (H5: (eq nat (S h0) (S 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 (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) 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) H10) in ((let H12 \def +k u))).(let H8 \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) 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 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) (r k0 d) 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) (S d) 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) (S d) c -(CHead e k0 u0)) H9)))]) in (H8 (refl_equal nat O)))))))))))))) y1 y0 y x -H2))) H1))) H0))) H)))))). +(CHead c k u) H7) in ((let H10 \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) H7) in (\lambda (H11: (eq K +k0 k)).(\lambda (H12: (eq C c0 c)).(let H13 \def (eq_ind C c0 (\lambda (c1: +C).((eq nat (r k0 h0) (S h)) \to ((eq nat O O) \to ((eq C c1 (CHead c k u)) +\to (drop (r k h) O c e))))) H4 c H12) in (let H14 \def (eq_ind C c0 (\lambda +(c1: C).(drop (r k0 h0) O c1 e)) H3 c H12) in (let H15 \def (eq_ind K k0 +(\lambda (k1: K).((eq nat (r k1 h0) (S h)) \to ((eq nat O O) \to ((eq C c +(CHead c k u)) \to (drop (r k h) O c e))))) H13 k H11) in (let H16 \def +(eq_ind K k0 (\lambda (k1: K).(drop (r k1 h0) O c e)) H14 k H11) in (let H17 +\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) H5) in +(let H18 \def (eq_ind nat h0 (\lambda (n: nat).((eq nat (r k n) (S h)) \to +((eq nat O O) \to ((eq C c (CHead c k u)) \to (drop (r k h) O c e))))) H15 h +H17) in (let H19 \def (eq_ind nat h0 (\lambda (n: nat).(drop (r k n) O c e)) +H16 h H17) in H19)))))))))) H9)) H8)))))))))))) (\lambda (k0: K).(\lambda +(h0: nat).(\lambda (d: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (H3: +(drop h0 (r k0 d) c0 e)).(\lambda (H4: (((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) (r k0 d) c +e)))))).(\lambda (u0: T).(\lambda (H5: (eq nat h0 (S h))).(\lambda (H6: (eq +nat (S d) O)).(\lambda (H7: (eq C (CHead c0 k0 (lift h0 (r k0 d) u0)) (CHead +c k u))).(let H8 \def (eq_ind nat h0 (\lambda (n: nat).(eq C (CHead c0 k0 +(lift n (r k0 d) u0)) (CHead c k u))) H7 (S h) H5) in (let H9 \def (eq_ind +nat h0 (\lambda (n: nat).((eq nat n (S h)) \to ((eq nat (r k0 d) O) \to ((eq +C c0 (CHead c k u)) \to (drop (r k h) (r k0 d) c e))))) H4 (S h) H5) in (let +H10 \def (eq_ind nat h0 (\lambda (n: nat).(drop n (r k0 d) c0 e)) H3 (S h) +H5) in (let H11 \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 (S h) (r k0 d) u0)) (CHead c k u) H8) 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 (lift (S h) (r k0 d) u0)) (CHead c k u) H8) in ((let H13 \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))) (d0: nat) (t: +T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) +\Rightarrow (TLRef (match (blt i d0) with [true \Rightarrow i | false +\Rightarrow (f i)])) | (THead k1 u1 t0) \Rightarrow (THead k1 (lref_map f d0 +u1) (lref_map f (s k1 d0) t0))]) in lref_map) (\lambda (x0: nat).(plus x0 (S +h))) (r k0 d) u0) | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 (lift (S h) +(r k0 d) u0)) (CHead c k u) H8) in (\lambda (H14: (eq K k0 k)).(\lambda (H15: +(eq C c0 c)).(let H16 \def (eq_ind C c0 (\lambda (c1: C).((eq nat (S h) (S +h)) \to ((eq nat (r k0 d) O) \to ((eq C c1 (CHead c k u)) \to (drop (r k h) +(r k0 d) c e))))) H9 c H15) in (let H17 \def (eq_ind C c0 (\lambda (c1: +C).(drop (S h) (r k0 d) c1 e)) H10 c H15) in (let H18 \def (eq_ind K k0 +(\lambda (k1: K).(eq T (lift (S h) (r k1 d) u0) u)) H13 k H14) in (let H19 +\def (eq_ind K k0 (\lambda (k1: K).((eq nat (S h) (S h)) \to ((eq nat (r k1 +d) O) \to ((eq C c (CHead c k u)) \to (drop (r k h) (r k1 d) c e))))) H16 k +H14) in (let H20 \def (eq_ind K k0 (\lambda (k1: K).(drop (S h) (r k1 d) c +e)) H17 k H14) in (eq_ind_r K k (\lambda (k1: K).(drop (r k h) (S d) c (CHead +e k1 u0))) (let H21 \def (eq_ind_r T u (\lambda (t: T).((eq nat (S h) (S h)) +\to ((eq nat (r k d) O) \to ((eq C c (CHead c k t)) \to (drop (r k h) (r k d) +c e))))) H19 (lift (S h) (r k d) u0) H18) in (let H22 \def (eq_ind nat (S d) +(\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H6) in (False_ind (drop (r +k h) (S d) c (CHead e k u0)) H22))) k0 H14))))))))) H12)) H11)))))))))))))))) +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 @@ -149,79 +171,77 @@ theorem drop_gen_skip_r: d) e c))))))))) \def \lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda -(d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) x (CHead c k u))).(let H0 -\def (match H in drop return (\lambda (n: nat).(\lambda (n0: nat).(\lambda -(c0: C).(\lambda (c1: C).(\lambda (_: (drop n n0 c0 c1)).((eq nat n h) \to -((eq nat n0 (S d)) \to ((eq C c0 x) \to ((eq C c1 (CHead c k u)) \to (ex2 C -(\lambda (e: C).(eq C x (CHead e k (lift h (r k d) u)))) (\lambda (e: -C).(drop h (r k d) e c)))))))))))) with [(drop_refl c0) \Rightarrow (\lambda -(H0: (eq nat O h)).(\lambda (H1: (eq nat O (S d))).(\lambda (H2: (eq C c0 -x)).(\lambda (H3: (eq C c0 (CHead c k u))).(eq_ind nat O (\lambda (n: -nat).((eq nat O (S d)) \to ((eq C c0 x) \to ((eq C c0 (CHead c k u)) \to (ex2 -C (\lambda (e: C).(eq C x (CHead e k (lift n (r k d) u)))) (\lambda (e: -C).(drop n (r k d) e c))))))) (\lambda (H4: (eq nat O (S d))).(let H5 \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 d) H4) -in (False_ind ((eq C c0 x) \to ((eq C c0 (CHead c k u)) \to (ex2 C (\lambda -(e: C).(eq C x (CHead e k (lift O (r k d) u)))) (\lambda (e: C).(drop O (r k -d) e c))))) H5))) h H0 H1 H2 H3))))) | (drop_drop k0 h0 c0 e H0 u0) -\Rightarrow (\lambda (H1: (eq nat (S h0) h)).(\lambda (H2: (eq nat O (S -d))).(\lambda (H3: (eq C (CHead c0 k0 u0) x)).(\lambda (H4: (eq C e (CHead c -k u))).(eq_ind nat (S h0) (\lambda (n: nat).((eq nat O (S d)) \to ((eq C -(CHead c0 k0 u0) x) \to ((eq C e (CHead c k u)) \to ((drop (r k0 h0) O c0 e) -\to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift n (r k d) u)))) -(\lambda (e0: C).(drop n (r k d) e0 c)))))))) (\lambda (H5: (eq nat O (S -d))).(let H6 \def (eq_ind nat O (\lambda (e0: nat).(match e0 in nat return +(d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) x (CHead c k +u))).(insert_eq C (CHead c k u) (\lambda (c0: C).(drop h (S d) x c0)) +(\lambda (_: C).(ex2 C (\lambda (e: C).(eq C x (CHead e k (lift h (r k d) +u)))) (\lambda (e: C).(drop h (r k d) e c)))) (\lambda (y: C).(\lambda (H0: +(drop h (S d) x y)).(insert_eq nat (S d) (\lambda (n: nat).(drop h n x y)) +(\lambda (_: nat).((eq C y (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C x +(CHead e k (lift h (r k d) u)))) (\lambda (e: C).(drop h (r k d) e c))))) +(\lambda (y0: nat).(\lambda (H1: (drop h y0 x y)).(drop_ind (\lambda (n: +nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq nat n0 (S d)) +\to ((eq C c1 (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C c0 (CHead e k +(lift n (r k d) u)))) (\lambda (e: C).(drop n (r k d) e c))))))))) (\lambda +(c0: C).(\lambda (H2: (eq nat O (S d))).(\lambda (H3: (eq C c0 (CHead c k +u))).(eq_ind_r C (CHead c k u) (\lambda (c1: C).(ex2 C (\lambda (e: C).(eq C +c1 (CHead e k (lift O (r k d) u)))) (\lambda (e: C).(drop O (r k d) e c)))) +(let H4 \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 d) H5) in (False_ind ((eq C (CHead c0 k0 u0) x) \to ((eq C e (CHead c k -u)) \to ((drop (r k0 h0) O c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead -e0 k (lift (S h0) (r k d) u)))) (\lambda (e0: C).(drop (S h0) (r k d) e0 -c)))))) H6))) h H1 H2 H3 H4 H0))))) | (drop_skip k0 h0 d0 c0 e H0 u0) -\Rightarrow (\lambda (H1: (eq nat h0 h)).(\lambda (H2: (eq nat (S d0) (S -d))).(\lambda (H3: (eq C (CHead c0 k0 (lift h0 (r k0 d0) u0)) x)).(\lambda -(H4: (eq C (CHead e k0 u0) (CHead c k u))).(eq_ind nat h (\lambda (n: -nat).((eq nat (S d0) (S d)) \to ((eq C (CHead c0 k0 (lift n (r k0 d0) u0)) x) -\to ((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop n (r k0 d0) c0 e) \to -(ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift h (r k d) u)))) (\lambda -(e0: C).(drop h (r k d) e0 c)))))))) (\lambda (H5: (eq nat (S d0) (S -d))).(let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 in nat return -(\lambda (_: nat).nat) with [O \Rightarrow d0 | (S n) \Rightarrow n])) (S d0) -(S d) H5) in (eq_ind nat d (\lambda (n: nat).((eq C (CHead c0 k0 (lift h (r -k0 n) u0)) x) \to ((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop h (r k0 n) -c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift h (r k d) u)))) -(\lambda (e0: C).(drop h (r k d) e0 c))))))) (\lambda (H7: (eq C (CHead c0 k0 -(lift h (r k0 d) u0)) x)).(eq_ind C (CHead c0 k0 (lift h (r k0 d) u0)) -(\lambda (c1: C).((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop h (r k0 d) -c0 e) \to (ex2 C (\lambda (e0: C).(eq C c1 (CHead e0 k (lift h (r k d) u)))) -(\lambda (e0: C).(drop h (r k d) e0 c)))))) (\lambda (H8: (eq C (CHead e k0 -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 _ 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 -(H13: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((drop h (r k d) c0 c) \to -(ex2 C (\lambda (e0: C).(eq C (CHead c0 k (lift h (r k d) t)) (CHead e0 k -(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 (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 -c H11))) H10)) H9))) x H7)) 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 x) (refl_equal C (CHead c k u)))))))))). +I (S d) H2) in (False_ind (ex2 C (\lambda (e: C).(eq C (CHead c k u) (CHead e +k (lift O (r k d) u)))) (\lambda (e: C).(drop O (r k d) e c))) H4)) c0 H3)))) +(\lambda (k0: K).(\lambda (h0: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda +(H2: (drop (r k0 h0) O c0 e)).(\lambda (H3: (((eq nat O (S d)) \to ((eq C e +(CHead c k u)) \to (ex2 C (\lambda (e0: C).(eq C c0 (CHead e0 k (lift (r k0 +h0) (r k d) u)))) (\lambda (e0: C).(drop (r k0 h0) (r k d) e0 +c))))))).(\lambda (u0: T).(\lambda (H4: (eq nat O (S d))).(\lambda (H5: (eq C +e (CHead c k u))).(let H6 \def (eq_ind C e (\lambda (c1: C).((eq nat O (S d)) +\to ((eq C c1 (CHead c k u)) \to (ex2 C (\lambda (e0: C).(eq C c0 (CHead e0 k +(lift (r k0 h0) (r k d) u)))) (\lambda (e0: C).(drop (r k0 h0) (r k d) e0 +c)))))) H3 (CHead c k u) H5) in (let H7 \def (eq_ind C e (\lambda (c1: +C).(drop (r k0 h0) O c0 c1)) H2 (CHead c k u) H5) in (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 d) H4) in (False_ind (ex2 +C (\lambda (e0: C).(eq C (CHead c0 k0 u0) (CHead e0 k (lift (S h0) (r k d) +u)))) (\lambda (e0: C).(drop (S h0) (r k d) e0 c))) H8))))))))))))) (\lambda +(k0: K).(\lambda (h0: nat).(\lambda (d0: nat).(\lambda (c0: C).(\lambda (e: +C).(\lambda (H2: (drop h0 (r k0 d0) c0 e)).(\lambda (H3: (((eq nat (r k0 d0) +(S d)) \to ((eq C e (CHead c k u)) \to (ex2 C (\lambda (e0: C).(eq C c0 +(CHead e0 k (lift h0 (r k d) u)))) (\lambda (e0: C).(drop h0 (r k d) e0 +c))))))).(\lambda (u0: T).(\lambda (H4: (eq nat (S d0) (S d))).(\lambda (H5: +(eq C (CHead e k0 u0) (CHead c k u))).(let H6 \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) H5) in ((let +H7 \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 e k0 u0) (CHead c k u) H5) in ((let H8 \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) H5) in (\lambda +(H9: (eq K k0 k)).(\lambda (H10: (eq C e c)).(eq_ind_r T u (\lambda (t: +T).(ex2 C (\lambda (e0: C).(eq C (CHead c0 k0 (lift h0 (r k0 d0) t)) (CHead +e0 k (lift h0 (r k d) u)))) (\lambda (e0: C).(drop h0 (r k d) e0 c)))) (let +H11 \def (eq_ind C e (\lambda (c1: C).((eq nat (r k0 d0) (S d)) \to ((eq C c1 +(CHead c k u)) \to (ex2 C (\lambda (e0: C).(eq C c0 (CHead e0 k (lift h0 (r k +d) u)))) (\lambda (e0: C).(drop h0 (r k d) e0 c)))))) H3 c H10) in (let H12 +\def (eq_ind C e (\lambda (c1: C).(drop h0 (r k0 d0) c0 c1)) H2 c H10) in +(let H13 \def (eq_ind K k0 (\lambda (k1: K).((eq nat (r k1 d0) (S d)) \to +((eq C c (CHead c k u)) \to (ex2 C (\lambda (e0: C).(eq C c0 (CHead e0 k +(lift h0 (r k d) u)))) (\lambda (e0: C).(drop h0 (r k d) e0 c)))))) H11 k H9) +in (let H14 \def (eq_ind K k0 (\lambda (k1: K).(drop h0 (r k1 d0) c0 c)) H12 +k H9) in (eq_ind_r K k (\lambda (k1: K).(ex2 C (\lambda (e0: C).(eq C (CHead +c0 k1 (lift h0 (r k1 d0) u)) (CHead e0 k (lift h0 (r k d) u)))) (\lambda (e0: +C).(drop h0 (r k d) e0 c)))) (let H15 \def (f_equal nat nat (\lambda (e0: +nat).(match e0 in nat return (\lambda (_: nat).nat) with [O \Rightarrow d0 | +(S n) \Rightarrow n])) (S d0) (S d) H4) in (let H16 \def (eq_ind nat d0 +(\lambda (n: nat).((eq nat (r k n) (S d)) \to ((eq C c (CHead c k u)) \to +(ex2 C (\lambda (e0: C).(eq C c0 (CHead e0 k (lift h0 (r k d) u)))) (\lambda +(e0: C).(drop h0 (r k d) e0 c)))))) H13 d H15) in (let H17 \def (eq_ind nat +d0 (\lambda (n: nat).(drop h0 (r k n) c0 c)) H14 d H15) in (eq_ind_r nat d +(\lambda (n: nat).(ex2 C (\lambda (e0: C).(eq C (CHead c0 k (lift h0 (r k n) +u)) (CHead e0 k (lift h0 (r k d) u)))) (\lambda (e0: C).(drop h0 (r k d) e0 +c)))) (ex_intro2 C (\lambda (e0: C).(eq C (CHead c0 k (lift h0 (r k d) u)) +(CHead e0 k (lift h0 (r k d) u)))) (\lambda (e0: C).(drop h0 (r k d) e0 c)) +c0 (refl_equal C (CHead c0 k (lift h0 (r k d) u))) H17) d0 H15)))) k0 H9))))) +u0 H8)))) H7)) H6)))))))))))) h y0 x y H1))) H0))) H))))))). theorem drop_gen_skip_l: \forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).(\forall @@ -231,95 +251,119 @@ C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k d) c e)))))))))) \def \lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda -(d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) (CHead c k u) x)).(let H0 -\def (match H in drop return (\lambda (n: nat).(\lambda (n0: nat).(\lambda -(c0: C).(\lambda (c1: C).(\lambda (_: (drop n n0 c0 c1)).((eq nat n h) \to -((eq nat n0 (S d)) \to ((eq C c0 (CHead c k u)) \to ((eq C c1 x) \to (ex3_2 C -T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: -C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e: C).(\lambda (_: -T).(drop h (r k d) c e))))))))))))) with [(drop_refl c0) \Rightarrow (\lambda -(H0: (eq nat O h)).(\lambda (H1: (eq nat O (S d))).(\lambda (H2: (eq C c0 -(CHead c k u))).(\lambda (H3: (eq C c0 x)).(eq_ind nat O (\lambda (n: -nat).((eq nat O (S d)) \to ((eq C c0 (CHead c k u)) \to ((eq C c0 x) \to -(ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda -(_: C).(\lambda (v: T).(eq T u (lift n (r k d) v)))) (\lambda (e: C).(\lambda -(_: T).(drop n (r k d) c e)))))))) (\lambda (H4: (eq nat O (S d))).(let H5 -\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 d) H4) -in (False_ind ((eq C c0 (CHead c k u)) \to ((eq C c0 x) \to (ex3_2 C T -(\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: -C).(\lambda (v: T).(eq T u (lift O (r k d) v)))) (\lambda (e: C).(\lambda (_: -T).(drop O (r k d) c e)))))) H5))) h H0 H1 H2 H3))))) | (drop_drop k0 h0 c0 e -H0 u0) \Rightarrow (\lambda (H1: (eq nat (S h0) h)).(\lambda (H2: (eq nat O -(S d))).(\lambda (H3: (eq C (CHead c0 k0 u0) (CHead c k u))).(\lambda (H4: -(eq C e x)).(eq_ind nat (S h0) (\lambda (n: nat).((eq nat O (S d)) \to ((eq C -(CHead c0 k0 u0) (CHead c k u)) \to ((eq C e x) \to ((drop (r k0 h0) O c0 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 n (r k d) v)))) (\lambda (e0: -C).(\lambda (_: T).(drop n (r k d) c e0))))))))) (\lambda (H5: (eq nat O (S -d))).(let H6 \def (eq_ind nat O (\lambda (e0: nat).(match e0 in nat return -(\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) -I (S d) H5) in (False_ind ((eq C (CHead c0 k0 u0) (CHead c k u)) \to ((eq C e -x) \to ((drop (r k0 h0) O c0 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 (S -h0) (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop (S h0) (r k d) c -e0))))))) H6))) h H1 H2 H3 H4 H0))))) | (drop_skip k0 h0 d0 c0 e H0 u0) -\Rightarrow (\lambda (H1: (eq nat h0 h)).(\lambda (H2: (eq nat (S d0) (S -d))).(\lambda (H3: (eq C (CHead c0 k0 (lift h0 (r k0 d0) u0)) (CHead c k -u))).(\lambda (H4: (eq C (CHead e k0 u0) x)).(eq_ind nat h (\lambda (n: -nat).((eq nat (S d0) (S d)) \to ((eq C (CHead c0 k0 (lift n (r k0 d0) u0)) -(CHead c k u)) \to ((eq C (CHead e k0 u0) x) \to ((drop n (r k0 d0) c0 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 (H5: (eq nat (S d0) -(S d))).(let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 in nat +(d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) (CHead c k u) +x)).(insert_eq C (CHead c k u) (\lambda (c0: C).(drop h (S d) c0 x)) (\lambda +(_: C).(ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e: +C).(\lambda (_: T).(drop h (r k d) c e))))) (\lambda (y: C).(\lambda (H0: +(drop h (S d) y x)).(insert_eq nat (S d) (\lambda (n: nat).(drop h n y x)) +(\lambda (_: nat).((eq C y (CHead c k u)) \to (ex3_2 C T (\lambda (e: +C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: C).(\lambda (v: +T).(eq T u (lift h (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k +d) c e)))))) (\lambda (y0: nat).(\lambda (H1: (drop h y0 y x)).(drop_ind +(\lambda (n: nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq +nat n0 (S d)) \to ((eq C c0 (CHead c k u)) \to (ex3_2 C T (\lambda (e: +C).(\lambda (v: T).(eq C c1 (CHead e k v)))) (\lambda (_: C).(\lambda (v: +T).(eq T u (lift n (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop n (r k +d) c e)))))))))) (\lambda (c0: C).(\lambda (H2: (eq nat O (S d))).(\lambda +(H3: (eq C c0 (CHead c k u))).(eq_ind_r C (CHead c k u) (\lambda (c1: +C).(ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C c1 (CHead e k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T u (lift O (r k d) v)))) (\lambda (e: +C).(\lambda (_: T).(drop O (r k d) c e))))) (let H4 \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 d) H2) in (False_ind +(ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C (CHead c k u) (CHead e k +v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift O (r k d) v)))) (\lambda +(e: C).(\lambda (_: T).(drop O (r k d) c e)))) H4)) c0 H3)))) (\lambda (k0: +K).(\lambda (h0: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (H2: (drop (r +k0 h0) O c0 e)).(\lambda (H3: (((eq nat O (S d)) \to ((eq C c0 (CHead c k u)) +\to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T u (lift (r k0 h0) (r k d) v)))) +(\lambda (e0: C).(\lambda (_: T).(drop (r k0 h0) (r k d) c +e0)))))))).(\lambda (u0: T).(\lambda (H4: (eq nat O (S d))).(\lambda (H5: (eq +C (CHead c0 k0 u0) (CHead c k u))).(let H6 \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) H5) in ((let +H7 \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) H5) in ((let H8 \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) H5) in +(\lambda (H9: (eq K k0 k)).(\lambda (H10: (eq C c0 c)).(let H11 \def (eq_ind +C c0 (\lambda (c1: C).((eq nat O (S d)) \to ((eq C c1 (CHead c k u)) \to +(ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T u (lift (r k0 h0) (r k d) v)))) +(\lambda (e0: C).(\lambda (_: T).(drop (r k0 h0) (r k d) c e0))))))) H3 c +H10) in (let H12 \def (eq_ind C c0 (\lambda (c1: C).(drop (r k0 h0) O c1 e)) +H2 c H10) in (let H13 \def (eq_ind K k0 (\lambda (k1: K).((eq nat O (S d)) +\to ((eq C c (CHead c k u)) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: +T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift (r +k1 h0) (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop (r k1 h0) (r k d) +c e0))))))) H11 k H9) in (let H14 \def (eq_ind K k0 (\lambda (k1: K).(drop (r +k1 h0) O c e)) H12 k H9) in (let H15 \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 d) H4) in (False_ind (ex3_2 C T (\lambda +(e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda +(v: T).(eq T u (lift (S h0) (r k d) v)))) (\lambda (e0: C).(\lambda (_: +T).(drop (S h0) (r k d) c e0)))) H15))))))))) H7)) H6))))))))))) (\lambda +(k0: K).(\lambda (h0: nat).(\lambda (d0: nat).(\lambda (c0: C).(\lambda (e: +C).(\lambda (H2: (drop h0 (r k0 d0) c0 e)).(\lambda (H3: (((eq nat (r k0 d0) +(S d)) \to ((eq C c0 (CHead c k u)) \to (ex3_2 C T (\lambda (e0: C).(\lambda +(v: T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u +(lift h0 (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h0 (r k d) c +e0)))))))).(\lambda (u0: T).(\lambda (H4: (eq nat (S d0) (S d))).(\lambda +(H5: (eq C (CHead c0 k0 (lift h0 (r k0 d0) u0)) (CHead c k u))).(let H6 \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 h0 (r k0 d0) u0)) (CHead c k u) H5) in ((let H7 \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 h0 (r k0 +d0) u0)) (CHead c k u) H5) in ((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))) (d1: nat) (t: T) on t: T \def (match t with +[(TSort n) \Rightarrow (TSort n) | (TLRef i) \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 h0)) (r k0 d0) u0) | (CHead _ _ t) +\Rightarrow t])) (CHead c0 k0 (lift h0 (r k0 d0) u0)) (CHead c k u) H5) in +(\lambda (H9: (eq K k0 k)).(\lambda (H10: (eq C c0 c)).(let H11 \def (eq_ind +C c0 (\lambda (c1: C).((eq nat (r k0 d0) (S d)) \to ((eq C c1 (CHead c k u)) +\to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T u (lift h0 (r k d) v)))) (\lambda (e0: +C).(\lambda (_: T).(drop h0 (r k d) c e0))))))) H3 c H10) in (let H12 \def +(eq_ind C c0 (\lambda (c1: C).(drop h0 (r k0 d0) c1 e)) H2 c H10) in (let H13 +\def (eq_ind K k0 (\lambda (k1: K).(eq T (lift h0 (r k1 d0) u0) u)) H8 k H9) +in (let H14 \def (eq_ind K k0 (\lambda (k1: K).((eq nat (r k1 d0) (S d)) \to +((eq C c (CHead c k u)) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C +e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h0 (r k d) +v)))) (\lambda (e0: C).(\lambda (_: T).(drop h0 (r k d) c e0))))))) H11 k H9) +in (let H15 \def (eq_ind K k0 (\lambda (k1: K).(drop h0 (r k1 d0) c e)) H12 k +H9) in (eq_ind_r K k (\lambda (k1: K).(ex3_2 C T (\lambda (e0: C).(\lambda +(v: T).(eq C (CHead e k1 u0) (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: +T).(eq T u (lift h0 (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h0 +(r k d) c e0))))) (let H16 \def (eq_ind_r T u (\lambda (t: T).((eq nat (r k +d0) (S d)) \to ((eq C c (CHead c k t)) \to (ex3_2 C T (\lambda (e0: +C).(\lambda (v: T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: +T).(eq T t (lift h0 (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h0 +(r k d) c e0))))))) H14 (lift h0 (r k d0) u0) H13) in (eq_ind T (lift h0 (r k +d0) u0) (\lambda (t: T).(ex3_2 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 t +(lift h0 (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h0 (r k d) c +e0))))) (let H17 \def (f_equal nat nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).nat) with [O \Rightarrow d0 | (S n) \Rightarrow n])) -(S d0) (S d) H5) in (eq_ind nat d (\lambda (n: nat).((eq C (CHead c0 k0 (lift -h (r k0 n) u0)) (CHead c k u)) \to ((eq C (CHead e k0 u0) x) \to ((drop h (r -k0 n) c0 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 (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))) (d1: nat) (t: -T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) -\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))) 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))))))))). +(S d0) (S d) H4) in (let H18 \def (eq_ind nat d0 (\lambda (n: nat).((eq nat +(r k n) (S d)) \to ((eq C c (CHead c k (lift h0 (r k n) u0))) \to (ex3_2 C T +(\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) (\lambda (_: +C).(\lambda (v: T).(eq T (lift h0 (r k n) u0) (lift h0 (r k d) v)))) (\lambda +(e0: C).(\lambda (_: T).(drop h0 (r k d) c e0))))))) H16 d H17) in (let H19 +\def (eq_ind nat d0 (\lambda (n: nat).(drop h0 (r k n) c e)) H15 d H17) in +(eq_ind_r nat d (\lambda (n: nat).(ex3_2 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 h0 (r k n) u0) (lift h0 (r k d) v)))) (\lambda (e0: C).(\lambda (_: +T).(drop h0 (r k d) c e0))))) (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 h0 (r k d) u0) (lift h0 (r k d) v)))) (\lambda (e0: C).(\lambda (_: +T).(drop h0 (r k d) c e0))) e u0 (refl_equal C (CHead e k u0)) (refl_equal T +(lift h0 (r k d) u0)) H19) d0 H17)))) u H13)) k0 H9))))))))) H7)) +H6)))))))))))) h y0 y x H1))) H0))) H))))))). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop/props.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop/props.ma index 95761db5c..0ca510275 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop/props.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop/props.ma @@ -346,115 +346,108 @@ nat).((drop h d c e) \to ((le (plus d h) n) \to (drop (minus n h) O e a)))))))))) (\lambda (a: C).(\lambda (c: C).(\lambda (H: (drop O O c a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h d c e)).(\lambda (H1: (le (plus d h) O)).(let H2 \def (eq_ind C c (\lambda -(c0: C).(drop h d c0 e)) H0 a (drop_gen_refl c a H)) in (let H3 \def (match -H1 in le return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to -(drop (minus O h) O e a)))) with [le_n \Rightarrow (\lambda (H3: (eq nat -(plus d h) O)).(let H4 \def (f_equal nat nat (\lambda (e0: nat).e0) (plus d -h) O H3) in (eq_ind nat (plus d h) (\lambda (n: nat).(drop (minus n h) n e -a)) (eq_ind_r nat O (\lambda (n: nat).(drop (minus n h) n e a)) (and_ind (eq -nat d O) (eq nat h O) (drop O O e a) (\lambda (H5: (eq nat d O)).(\lambda -(H6: (eq nat h O)).(let H7 \def (eq_ind nat d (\lambda (n: nat).(drop h n a -e)) H2 O H5) in (let H8 \def (eq_ind nat h (\lambda (n: nat).(drop n O a e)) -H7 O H6) in (eq_ind C a (\lambda (c0: C).(drop O O c0 a)) (drop_refl a) e -(drop_gen_refl a e H8)))))) (plus_O d h H4)) (plus d h) H4) O H4))) | (le_S m -H3) \Rightarrow (\lambda (H4: (eq nat (S m) O)).((let H5 \def (eq_ind nat (S -m) (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).Prop) with [O -\Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind ((le -(plus d h) m) \to (drop (minus O h) O e a)) H5)) H3))]) in (H3 (refl_equal -nat O)))))))))))) (\lambda (i0: nat).(\lambda (H: ((\forall (a: C).(\forall -(c: C).((drop i0 O c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: -nat).((drop h d c e) \to ((le (plus d h) i0) \to (drop (minus i0 h) O e -a))))))))))).(\lambda (a: C).(\lambda (c: C).(C_ind (\lambda (c0: C).((drop -(S i0) O c0 a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop -h d c0 e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e -a)))))))) (\lambda (n: nat).(\lambda (H0: (drop (S i0) O (CSort n) -a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (drop h -d (CSort n) e)).(\lambda (H2: (le (plus d h) (S i0))).(and3_ind (eq C e -(CSort n)) (eq nat h O) (eq nat d O) (drop (minus (S i0) h) O e a) (\lambda -(H3: (eq C e (CSort n))).(\lambda (H4: (eq nat h O)).(\lambda (H5: (eq nat d -O)).(and3_ind (eq C a (CSort n)) (eq nat (S i0) O) (eq nat O O) (drop (minus -(S i0) h) O e a) (\lambda (H6: (eq C a (CSort n))).(\lambda (H7: (eq nat (S -i0) O)).(\lambda (_: (eq nat O O)).(let H9 \def (eq_ind nat d (\lambda (n0: -nat).(le (plus n0 h) (S i0))) H2 O H5) in (let H10 \def (eq_ind nat h -(\lambda (n0: nat).(le (plus O n0) (S i0))) H9 O H4) in (eq_ind_r nat O -(\lambda (n0: nat).(drop (minus (S i0) n0) O e a)) (eq_ind_r C (CSort n) -(\lambda (c0: C).(drop (minus (S i0) O) O c0 a)) (eq_ind_r C (CSort n) -(\lambda (c0: C).(drop (minus (S i0) O) O (CSort n) c0)) (let H11 \def -(eq_ind nat (S i0) (\lambda (ee: nat).(match ee in nat return (\lambda (_: -nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H7) in -(False_ind (drop (minus (S i0) O) O (CSort n) (CSort n)) H11)) a H6) e H3) h -H4)))))) (drop_gen_sort n (S i0) O a H0))))) (drop_gen_sort n h d e -H1))))))))) (\lambda (c0: C).(\lambda (H0: (((drop (S i0) O c0 a) \to -(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 e) \to ((le -(plus d h) (S i0)) \to (drop (minus (S i0) h) O e a))))))))).(\lambda (k: -K).(K_ind (\lambda (k0: K).(\forall (t: T).((drop (S i0) O (CHead c0 k0 t) a) -\to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d (CHead c0 -k0 t) e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e -a))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H1: (drop (S i0) O -(CHead c0 (Bind b) t) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H2: (drop h d (CHead c0 (Bind b) t) e)).(\lambda (H3: (le -(plus d h) (S i0))).(nat_ind (\lambda (n: nat).((drop h n (CHead c0 (Bind b) -t) e) \to ((le (plus n h) (S i0)) \to (drop (minus (S i0) h) O e a)))) -(\lambda (H4: (drop h O (CHead c0 (Bind b) t) e)).(\lambda (H5: (le (plus O -h) (S i0))).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 (Bind b) t) e) -\to ((le (plus O n) (S i0)) \to (drop (minus (S i0) n) O e a)))) (\lambda -(H6: (drop O O (CHead c0 (Bind b) t) e)).(\lambda (_: (le (plus O O) (S -i0))).(eq_ind C (CHead c0 (Bind b) t) (\lambda (c1: C).(drop (minus (S i0) O) -O c1 a)) (drop_drop (Bind b) i0 c0 a (drop_gen_drop (Bind b) c0 a t i0 H1) t) -e (drop_gen_refl (CHead c0 (Bind b) t) e H6)))) (\lambda (h0: nat).(\lambda -(_: (((drop h0 O (CHead c0 (Bind b) t) e) \to ((le (plus O h0) (S i0)) \to -(drop (minus (S i0) h0) O e a))))).(\lambda (H6: (drop (S h0) O (CHead c0 -(Bind b) t) e)).(\lambda (H7: (le (plus O (S h0)) (S i0))).(H a c0 -(drop_gen_drop (Bind b) c0 a t i0 H1) e h0 O (drop_gen_drop (Bind b) c0 e t -h0 H6) (le_S_n (plus O h0) i0 H7)))))) h H4 H5))) (\lambda (d0: nat).(\lambda -(_: (((drop h d0 (CHead c0 (Bind b) t) e) \to ((le (plus d0 h) (S i0)) \to -(drop (minus (S i0) h) O e a))))).(\lambda (H4: (drop h (S d0) (CHead c0 -(Bind b) t) e)).(\lambda (H5: (le (plus (S d0) h) (S i0))).(ex3_2_ind C T -(\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Bind b) v)))) (\lambda -(_: C).(\lambda (v: T).(eq T t (lift h (r (Bind b) d0) v)))) (\lambda (e0: -C).(\lambda (_: T).(drop h (r (Bind b) d0) c0 e0))) (drop (minus (S i0) h) O -e a) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C e (CHead x0 (Bind -b) x1))).(\lambda (_: (eq T t (lift h (r (Bind b) d0) x1))).(\lambda (H8: -(drop h (r (Bind b) d0) c0 x0)).(eq_ind_r C (CHead x0 (Bind b) x1) (\lambda -(c1: C).(drop (minus (S i0) h) O c1 a)) (eq_ind nat (S (minus i0 h)) (\lambda -(n: nat).(drop n O (CHead x0 (Bind b) x1) a)) (drop_drop (Bind b) (minus i0 -h) x0 a (H a c0 (drop_gen_drop (Bind b) c0 a t i0 H1) x0 h d0 H8 (le_S_n -(plus d0 h) i0 H5)) x1) (minus (S i0) h) (minus_Sn_m i0 h (le_trans_plus_r d0 -h i0 (le_S_n (plus d0 h) i0 H5)))) e H6)))))) (drop_gen_skip_l c0 e t h d0 -(Bind b) H4)))))) d H2 H3))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda -(H1: (drop (S i0) O (CHead c0 (Flat f) t) a)).(\lambda (e: C).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H2: (drop h d (CHead c0 (Flat f) t) +(c0: C).(drop h d c0 e)) H0 a (drop_gen_refl c a H)) in (let H_y \def +(le_n_O_eq (plus d h) H1) in (and_ind (eq nat d O) (eq nat h O) (drop (minus +O h) O e a) (\lambda (H3: (eq nat d O)).(\lambda (H4: (eq nat h O)).(let H5 +\def (eq_ind nat d (\lambda (n: nat).(drop h n a e)) H2 O H3) in (let H6 \def +(eq_ind nat h (\lambda (n: nat).(drop n O a e)) H5 O H4) in (eq_ind_r nat O +(\lambda (n: nat).(drop (minus O n) O e a)) (eq_ind C a (\lambda (c0: +C).(drop (minus O O) O c0 a)) (drop_refl a) e (drop_gen_refl a e H6)) h +H4))))) (plus_O d h (sym_eq nat O (plus d h) H_y))))))))))))) (\lambda (i0: +nat).(\lambda (H: ((\forall (a: C).(\forall (c: C).((drop i0 O c a) \to +(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le +(plus d h) i0) \to (drop (minus i0 h) O e a))))))))))).(\lambda (a: +C).(\lambda (c: C).(C_ind (\lambda (c0: C).((drop (S i0) O c0 a) \to (\forall +(e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 e) \to ((le (plus d +h) (S i0)) \to (drop (minus (S i0) h) O e a)))))))) (\lambda (n: +nat).(\lambda (H0: (drop (S i0) O (CSort n) a)).(\lambda (e: C).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H1: (drop h d (CSort n) e)).(\lambda (H2: +(le (plus d h) (S i0))).(and3_ind (eq C e (CSort n)) (eq nat h O) (eq nat d +O) (drop (minus (S i0) h) O e a) (\lambda (H3: (eq C e (CSort n))).(\lambda +(H4: (eq nat h O)).(\lambda (H5: (eq nat d O)).(and3_ind (eq C a (CSort n)) +(eq nat (S i0) O) (eq nat O O) (drop (minus (S i0) h) O e a) (\lambda (H6: +(eq C a (CSort n))).(\lambda (H7: (eq nat (S i0) O)).(\lambda (_: (eq nat O +O)).(let H9 \def (eq_ind nat d (\lambda (n0: nat).(le (plus n0 h) (S i0))) H2 +O H5) in (let H10 \def (eq_ind nat h (\lambda (n0: nat).(le (plus O n0) (S +i0))) H9 O H4) in (eq_ind_r nat O (\lambda (n0: nat).(drop (minus (S i0) n0) +O e a)) (eq_ind_r C (CSort n) (\lambda (c0: C).(drop (minus (S i0) O) O c0 +a)) (eq_ind_r C (CSort n) (\lambda (c0: C).(drop (minus (S i0) O) O (CSort n) +c0)) (let H11 \def (eq_ind nat (S i0) (\lambda (ee: nat).(match ee in nat +return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow +True])) I O H7) in (False_ind (drop (minus (S i0) O) O (CSort n) (CSort n)) +H11)) a H6) e H3) h H4)))))) (drop_gen_sort n (S i0) O a H0))))) +(drop_gen_sort n h d e H1))))))))) (\lambda (c0: C).(\lambda (H0: (((drop (S +i0) O c0 a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h +d c0 e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e +a))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).((drop (S +i0) O (CHead c0 k0 t) a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: +nat).((drop h d (CHead c0 k0 t) e) \to ((le (plus d h) (S i0)) \to (drop +(minus (S i0) h) O e a))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H1: +(drop (S i0) O (CHead c0 (Bind b) t) a)).(\lambda (e: C).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H2: (drop h d (CHead c0 (Bind b) t) e)).(\lambda (H3: (le (plus d h) (S i0))).(nat_ind (\lambda (n: nat).((drop h -n (CHead c0 (Flat f) t) e) \to ((le (plus n h) (S i0)) \to (drop (minus (S -i0) h) O e a)))) (\lambda (H4: (drop h O (CHead c0 (Flat f) t) e)).(\lambda +n (CHead c0 (Bind b) t) e) \to ((le (plus n h) (S i0)) \to (drop (minus (S +i0) h) O e a)))) (\lambda (H4: (drop h O (CHead c0 (Bind b) t) e)).(\lambda (H5: (le (plus O h) (S i0))).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 -(Flat f) t) e) \to ((le (plus O n) (S i0)) \to (drop (minus (S i0) n) O e -a)))) (\lambda (H6: (drop O O (CHead c0 (Flat f) t) e)).(\lambda (_: (le -(plus O O) (S i0))).(eq_ind C (CHead c0 (Flat f) t) (\lambda (c1: C).(drop -(minus (S i0) O) O c1 a)) (drop_drop (Flat f) i0 c0 a (drop_gen_drop (Flat f) -c0 a t i0 H1) t) e (drop_gen_refl (CHead c0 (Flat f) t) e H6)))) (\lambda -(h0: nat).(\lambda (_: (((drop h0 O (CHead c0 (Flat f) t) e) \to ((le (plus O +(Bind b) t) e) \to ((le (plus O n) (S i0)) \to (drop (minus (S i0) n) O e +a)))) (\lambda (H6: (drop O O (CHead c0 (Bind b) t) e)).(\lambda (_: (le +(plus O O) (S i0))).(eq_ind C (CHead c0 (Bind b) t) (\lambda (c1: C).(drop +(minus (S i0) O) O c1 a)) (drop_drop (Bind b) i0 c0 a (drop_gen_drop (Bind b) +c0 a t i0 H1) t) e (drop_gen_refl (CHead c0 (Bind b) t) e H6)))) (\lambda +(h0: nat).(\lambda (_: (((drop h0 O (CHead c0 (Bind b) t) e) \to ((le (plus O h0) (S i0)) \to (drop (minus (S i0) h0) O e a))))).(\lambda (H6: (drop (S h0) -O (CHead c0 (Flat f) t) e)).(\lambda (H7: (le (plus O (S h0)) (S i0))).(H0 -(drop_gen_drop (Flat f) c0 a t i0 H1) e (S h0) O (drop_gen_drop (Flat f) c0 e -t h0 H6) H7))))) h H4 H5))) (\lambda (d0: nat).(\lambda (_: (((drop h d0 -(CHead c0 (Flat f) t) e) \to ((le (plus d0 h) (S i0)) \to (drop (minus (S i0) -h) O e a))))).(\lambda (H4: (drop h (S d0) (CHead c0 (Flat f) t) e)).(\lambda -(H5: (le (plus (S d0) h) (S i0))).(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) d0) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r -(Flat f) d0) c0 e0))) (drop (minus (S i0) h) O e a) (\lambda (x0: C).(\lambda -(x1: T).(\lambda (H6: (eq C e (CHead x0 (Flat f) x1))).(\lambda (_: (eq T t -(lift h (r (Flat f) d0) x1))).(\lambda (H8: (drop h (r (Flat f) d0) c0 -x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c1: C).(drop (minus (S i0) -h) O c1 a)) (let H9 \def (eq_ind_r nat (minus (S i0) h) (\lambda (n: -nat).(drop n O x0 a)) (H0 (drop_gen_drop (Flat f) c0 a t i0 H1) x0 h (S d0) -H8 H5) (S (minus i0 h)) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n -(plus d0 h) i0 H5)))) in (eq_ind nat (S (minus i0 h)) (\lambda (n: nat).(drop -n O (CHead x0 (Flat f) x1) a)) (drop_drop (Flat f) (minus i0 h) x0 a H9 x1) -(minus (S i0) h) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 -h) i0 H5))))) e H6)))))) (drop_gen_skip_l c0 e t h d0 (Flat f) H4)))))) d H2 -H3))))))))) k)))) c))))) i). +O (CHead c0 (Bind b) t) e)).(\lambda (H7: (le (plus O (S h0)) (S i0))).(H a +c0 (drop_gen_drop (Bind b) c0 a t i0 H1) e h0 O (drop_gen_drop (Bind b) c0 e +t h0 H6) (le_S_n (plus O h0) i0 H7)))))) h H4 H5))) (\lambda (d0: +nat).(\lambda (_: (((drop h d0 (CHead c0 (Bind b) t) e) \to ((le (plus d0 h) +(S i0)) \to (drop (minus (S i0) h) O e a))))).(\lambda (H4: (drop h (S d0) +(CHead c0 (Bind b) t) e)).(\lambda (H5: (le (plus (S d0) h) (S +i0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Bind +b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Bind b) d0) +v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Bind b) d0) c0 e0))) (drop +(minus (S i0) h) O e a) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C +e (CHead x0 (Bind b) x1))).(\lambda (_: (eq T t (lift h (r (Bind b) d0) +x1))).(\lambda (H8: (drop h (r (Bind b) d0) c0 x0)).(eq_ind_r C (CHead x0 +(Bind b) x1) (\lambda (c1: C).(drop (minus (S i0) h) O c1 a)) (eq_ind nat (S +(minus i0 h)) (\lambda (n: nat).(drop n O (CHead x0 (Bind b) x1) a)) +(drop_drop (Bind b) (minus i0 h) x0 a (H a c0 (drop_gen_drop (Bind b) c0 a t +i0 H1) x0 h d0 H8 (le_S_n (plus d0 h) i0 H5)) x1) (minus (S i0) h) +(minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5)))) e +H6)))))) (drop_gen_skip_l c0 e t h d0 (Bind b) H4)))))) d H2 H3))))))))) +(\lambda (f: F).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c0 (Flat +f) t) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: +(drop h d (CHead c0 (Flat f) t) e)).(\lambda (H3: (le (plus d h) (S +i0))).(nat_ind (\lambda (n: nat).((drop h n (CHead c0 (Flat f) t) e) \to ((le +(plus n h) (S i0)) \to (drop (minus (S i0) h) O e a)))) (\lambda (H4: (drop h +O (CHead c0 (Flat f) t) e)).(\lambda (H5: (le (plus O h) (S i0))).(nat_ind +(\lambda (n: nat).((drop n O (CHead c0 (Flat f) t) e) \to ((le (plus O n) (S +i0)) \to (drop (minus (S i0) n) O e a)))) (\lambda (H6: (drop O O (CHead c0 +(Flat f) t) e)).(\lambda (_: (le (plus O O) (S i0))).(eq_ind C (CHead c0 +(Flat f) t) (\lambda (c1: C).(drop (minus (S i0) O) O c1 a)) (drop_drop (Flat +f) i0 c0 a (drop_gen_drop (Flat f) c0 a t i0 H1) t) e (drop_gen_refl (CHead +c0 (Flat f) t) e H6)))) (\lambda (h0: nat).(\lambda (_: (((drop h0 O (CHead +c0 (Flat f) t) e) \to ((le (plus O h0) (S i0)) \to (drop (minus (S i0) h0) O +e a))))).(\lambda (H6: (drop (S h0) O (CHead c0 (Flat f) t) e)).(\lambda (H7: +(le (plus O (S h0)) (S i0))).(H0 (drop_gen_drop (Flat f) c0 a t i0 H1) e (S +h0) O (drop_gen_drop (Flat f) c0 e t h0 H6) H7))))) h H4 H5))) (\lambda (d0: +nat).(\lambda (_: (((drop h d0 (CHead c0 (Flat f) t) e) \to ((le (plus d0 h) +(S i0)) \to (drop (minus (S i0) h) O e a))))).(\lambda (H4: (drop h (S d0) +(CHead c0 (Flat f) t) e)).(\lambda (H5: (le (plus (S d0) h) (S +i0))).(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) d0) +v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat f) d0) c0 e0))) (drop +(minus (S i0) h) O e a) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C +e (CHead x0 (Flat f) x1))).(\lambda (_: (eq T t (lift h (r (Flat f) d0) +x1))).(\lambda (H8: (drop h (r (Flat f) d0) c0 x0)).(eq_ind_r C (CHead x0 +(Flat f) x1) (\lambda (c1: C).(drop (minus (S i0) h) O c1 a)) (let H9 \def +(eq_ind_r nat (minus (S i0) h) (\lambda (n: nat).(drop n O x0 a)) (H0 +(drop_gen_drop (Flat f) c0 a t i0 H1) x0 h (S d0) H8 H5) (S (minus i0 h)) +(minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5)))) in +(eq_ind nat (S (minus i0 h)) (\lambda (n: nat).(drop n O (CHead x0 (Flat f) +x1) a)) (drop_drop (Flat f) (minus i0 h) x0 a H9 x1) (minus (S i0) h) +(minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5))))) e +H6)))))) (drop_gen_skip_l c0 e t h d0 (Flat f) H4)))))) d H2 H3))))))))) +k)))) c))))) i). theorem drop_conf_rev: \forall (j: nat).(\forall (e1: C).(\forall (e2: C).((drop j O e1 e2) \to @@ -538,20 +531,15 @@ C).(\forall (h: nat).((drop h n c1 c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus n (S i0)) e1 e2))))))))))) (\lambda (H: (le (S i0) O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (_: (drop h -O c1 c2)).(\lambda (e2: C).(\lambda (_: (drop (S i0) O c2 e2)).(let H2 \def -(match H in le return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) -\to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h -(minus O (S i0)) e1 e2)))))) with [le_n \Rightarrow (\lambda (H2: (eq nat (S -i0) O)).(let H3 \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 H2) in (False_ind (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) -(\lambda (e1: C).(drop h (minus O (S i0)) e1 e2))) H3))) | (le_S m H2) -\Rightarrow (\lambda (H3: (eq nat (S m) O)).((let H4 \def (eq_ind nat (S m) -(\lambda (e: nat).(match e in nat return (\lambda (_: nat).Prop) with [O -\Rightarrow False | (S _) \Rightarrow True])) I O H3) in (False_ind ((le (S -i0) m) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: -C).(drop h (minus O (S i0)) e1 e2)))) H4)) H2))]) in (H2 (refl_equal nat -O)))))))))) (\lambda (d0: nat).(\lambda (_: (((le (S i0) d0) \to (\forall +O c1 c2)).(\lambda (e2: C).(\lambda (_: (drop (S i0) O c2 e2)).(ex2_ind nat +(\lambda (n: nat).(eq nat O (S n))) (\lambda (n: nat).(le i0 n)) (ex2 C +(\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus O (S +i0)) e1 e2))) (\lambda (x: nat).(\lambda (H2: (eq nat O (S x))).(\lambda (_: +(le i0 x)).(let H4 \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 x) H2) in (False_ind (ex2 C (\lambda (e1: C).(drop (S i0) O c1 +e1)) (\lambda (e1: C).(drop h (minus O (S i0)) e1 e2))) H4))))) (le_gen_S i0 +O H))))))))) (\lambda (d0: nat).(\lambda (_: (((le (S i0) d0) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d0 c1 c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus d0 (S i0)) e1 e2)))))))))))).(\lambda @@ -640,16 +628,8 @@ C).((drop n O c2 e2) \to ((le d n) \to (drop (plus n h) O c1 e2)))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H0: (drop O O c2 e2)).(\lambda (H1: (le d O)).(eq_ind C c2 (\lambda (c: C).(drop (plus O h) -O c1 c)) (let H2 \def (match H1 in le return (\lambda (n: nat).(\lambda (_: -(le ? n)).((eq nat n O) \to (drop (plus O h) O c1 c2)))) with [le_n -\Rightarrow (\lambda (H2: (eq nat d O)).(eq_ind nat O (\lambda (_: nat).(drop -(plus O h) O c1 c2)) (let H3 \def (eq_ind nat d (\lambda (n: nat).(le n O)) -H1 O H2) in (let H4 \def (eq_ind nat d (\lambda (n: nat).(drop h n c1 c2)) H -O H2) in H4)) d (sym_eq nat d O H2))) | (le_S m H2) \Rightarrow (\lambda (H3: -(eq nat (S m) O)).((let H4 \def (eq_ind nat (S m) (\lambda (e: nat).(match e -in nat return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) -\Rightarrow True])) I O H3) in (False_ind ((le d m) \to (drop (plus O h) O c1 -c2)) H4)) H2))]) in (H2 (refl_equal nat O))) e2 (drop_gen_refl c2 e2 +O c1 c)) (let H_y \def (le_n_O_eq d H1) in (let H2 \def (eq_ind_r nat d +(\lambda (n: nat).(drop h n c1 c2)) H O H_y) in H2)) e2 (drop_gen_refl c2 e2 H0)))))))))) (\lambda (i0: nat).(\lambda (IHi: ((\forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i0 O c2 e2) \to ((le d i0) \to (drop (plus i0 h) O c1 diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop1/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop1/fwd.ma new file mode 100644 index 000000000..665cf9da4 --- /dev/null +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop1/fwd.ma @@ -0,0 +1,75 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "LambdaDelta-1/drop1/defs.ma". + +theorem drop1_gen_pnil: + \forall (c1: C).(\forall (c2: C).((drop1 PNil c1 c2) \to (eq C c1 c2))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (drop1 PNil c1 c2)).(insert_eq +PList PNil (\lambda (p: PList).(drop1 p c1 c2)) (\lambda (_: PList).(eq C c1 +c2)) (\lambda (y: PList).(\lambda (H0: (drop1 y c1 c2)).(drop1_ind (\lambda +(p: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p PNil) \to (eq C c +c0))))) (\lambda (c: C).(\lambda (_: (eq PList PNil PNil)).(refl_equal C c))) +(\lambda (c3: C).(\lambda (c4: C).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (_: (drop h d c3 c4)).(\lambda (c5: C).(\lambda (hds: +PList).(\lambda (_: (drop1 hds c4 c5)).(\lambda (_: (((eq PList hds PNil) \to +(eq C c4 c5)))).(\lambda (H4: (eq PList (PCons h d hds) PNil)).(let H5 \def +(eq_ind PList (PCons h d hds) (\lambda (ee: PList).(match ee in PList return +(\lambda (_: PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) +\Rightarrow True])) I PNil H4) in (False_ind (eq C c3 c5) H5)))))))))))) y c1 +c2 H0))) H))). + +theorem drop1_gen_pcons: + \forall (c1: C).(\forall (c3: C).(\forall (hds: PList).(\forall (h: +nat).(\forall (d: nat).((drop1 (PCons h d hds) c1 c3) \to (ex2 C (\lambda +(c2: C).(drop h d c1 c2)) (\lambda (c2: C).(drop1 hds c2 c3)))))))) +\def + \lambda (c1: C).(\lambda (c3: C).(\lambda (hds: PList).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H: (drop1 (PCons h d hds) c1 c3)).(insert_eq +PList (PCons h d hds) (\lambda (p: PList).(drop1 p c1 c3)) (\lambda (_: +PList).(ex2 C (\lambda (c2: C).(drop h d c1 c2)) (\lambda (c2: C).(drop1 hds +c2 c3)))) (\lambda (y: PList).(\lambda (H0: (drop1 y c1 c3)).(drop1_ind +(\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p (PCons h d +hds)) \to (ex2 C (\lambda (c2: C).(drop h d c c2)) (\lambda (c2: C).(drop1 +hds c2 c0))))))) (\lambda (c: C).(\lambda (H1: (eq PList PNil (PCons h d +hds))).(let H2 \def (eq_ind PList PNil (\lambda (ee: PList).(match ee in +PList return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ +_ _) \Rightarrow False])) I (PCons h d hds) H1) in (False_ind (ex2 C (\lambda +(c2: C).(drop h d c c2)) (\lambda (c2: C).(drop1 hds c2 c))) H2)))) (\lambda +(c2: C).(\lambda (c4: C).(\lambda (h0: nat).(\lambda (d0: nat).(\lambda (H1: +(drop h0 d0 c2 c4)).(\lambda (c5: C).(\lambda (hds0: PList).(\lambda (H2: +(drop1 hds0 c4 c5)).(\lambda (H3: (((eq PList hds0 (PCons h d hds)) \to (ex2 +C (\lambda (c6: C).(drop h d c4 c6)) (\lambda (c6: C).(drop1 hds c6 +c5)))))).(\lambda (H4: (eq PList (PCons h0 d0 hds0) (PCons h d hds))).(let H5 +\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 hds0) (PCons h d hds) H4) in ((let H6 \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 hds0) +(PCons h d hds) H4) in ((let H7 \def (f_equal PList PList (\lambda (e: +PList).(match e in PList return (\lambda (_: PList).PList) with [PNil +\Rightarrow hds0 | (PCons _ _ p) \Rightarrow p])) (PCons h0 d0 hds0) (PCons h +d hds) H4) in (\lambda (H8: (eq nat d0 d)).(\lambda (H9: (eq nat h0 h)).(let +H10 \def (eq_ind PList hds0 (\lambda (p: PList).((eq PList p (PCons h d hds)) +\to (ex2 C (\lambda (c6: C).(drop h d c4 c6)) (\lambda (c6: C).(drop1 hds c6 +c5))))) H3 hds H7) in (let H11 \def (eq_ind PList hds0 (\lambda (p: +PList).(drop1 p c4 c5)) H2 hds H7) in (let H12 \def (eq_ind nat d0 (\lambda +(n: nat).(drop h0 n c2 c4)) H1 d H8) in (let H13 \def (eq_ind nat h0 (\lambda +(n: nat).(drop n d c2 c4)) H12 h H9) in (ex_intro2 C (\lambda (c6: C).(drop h +d c2 c6)) (\lambda (c6: C).(drop1 hds c6 c5)) c4 H13 H11)))))))) H6)) +H5)))))))))))) y c1 c3 H0))) H)))))). + diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop1/getl.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop1/getl.ma index 6704bf6f8..eb524072a 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop1/getl.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop1/getl.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "LambdaDelta-1/drop1/defs.ma". +include "LambdaDelta-1/drop1/fwd.ma". include "LambdaDelta-1/getl/drop.ma". @@ -32,162 +32,76 @@ C).(\forall (v: T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to (trans p i) c2 (CHead e2 (Bind b) (lift1 (ptrans p i) v)))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (drop1 PNil c2 c1)).(\lambda (b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl -i c1 (CHead e1 (Bind b) v))).(let H1 \def (match H in drop1 return (\lambda -(p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p c c0)).((eq -PList p PNil) \to ((eq C c c2) \to ((eq C c0 c1) \to (ex2 C (\lambda (e2: -C).(drop1 PNil e2 e1)) (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) -v))))))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil -PNil)).(\lambda (H2: (eq C c c2)).(\lambda (H3: (eq C c c1)).(eq_ind C c2 -(\lambda (c0: C).((eq C c0 c1) \to (ex2 C (\lambda (e2: C).(drop1 PNil e2 -e1)) (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) v)))))) (\lambda (H4: (eq -C c2 c1)).(eq_ind C c1 (\lambda (c0: C).(ex2 C (\lambda (e2: C).(drop1 PNil -e2 e1)) (\lambda (e2: C).(getl i c0 (CHead e2 (Bind b) v))))) (ex_intro2 C -(\lambda (e2: C).(drop1 PNil e2 e1)) (\lambda (e2: C).(getl i c1 (CHead e2 -(Bind b) v))) e1 (drop1_nil e1) H0) c2 (sym_eq C c2 c1 H4))) c (sym_eq C c c2 -H2) H3)))) | (drop1_cons c0 c3 h d H1 c4 hds0 H2) \Rightarrow (\lambda (H3: -(eq PList (PCons h d hds0) PNil)).(\lambda (H4: (eq C c0 c2)).(\lambda (H5: -(eq C c4 c1)).((let H6 \def (eq_ind PList (PCons h d hds0) (\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 c2) \to ((eq C c4 c1) \to ((drop h d c0 c3) \to ((drop1 -hds0 c3 c4) \to (ex2 C (\lambda (e2: C).(drop1 PNil e2 e1)) (\lambda (e2: -C).(getl i c2 (CHead e2 (Bind b) v)))))))) H6)) H4 H5 H1 H2))))]) in (H1 -(refl_equal PList PNil) (refl_equal C c2) (refl_equal C c1))))))))))) -(\lambda (h: nat).(\lambda (d: nat).(\lambda (hds0: PList).(\lambda (H: -((\forall (c1: C).(\forall (c2: C).((drop1 hds0 c2 c1) \to (\forall (b: -B).(\forall (e1: C).(\forall (v: T).(\forall (i: nat).((getl i c1 (CHead e1 -(Bind b) v)) \to (ex2 C (\lambda (e2: C).(drop1 (ptrans hds0 i) e2 e1)) -(\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift1 (ptrans -hds0 i) v))))))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H0: -(drop1 (PCons h d hds0) c2 c1)).(\lambda (b: B).(\lambda (e1: C).(\lambda (v: -T).(\lambda (i: nat).(\lambda (H1: (getl i c1 (CHead e1 (Bind b) v))).(let H2 -\def (match H0 in drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda -(c0: C).(\lambda (_: (drop1 p c c0)).((eq PList p (PCons h d hds0)) \to ((eq -C c c2) \to ((eq C c0 c1) \to (ex2 C (\lambda (e2: C).(drop1 (match (blt -(trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans hds0 -i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 e1)) (\lambda -(e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans -hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) -(lift1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d -(S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) -v)))))))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil -(PCons h d hds0))).(\lambda (H3: (eq C c c2)).(\lambda (H4: (eq C c -c1)).((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 h d hds0) H2) in (False_ind ((eq C c c2) \to -((eq C c c1) \to (ex2 C (\lambda (e2: C).(drop1 (match (blt (trans hds0 i) d) -with [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) -| false \Rightarrow (ptrans hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match -(blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false -\Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (lift1 (match -(blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans -hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) v))))))) -H5)) H3 H4)))) | (drop1_cons c0 c3 h0 d0 H2 c4 hds1 H3) \Rightarrow (\lambda -(H4: (eq PList (PCons h0 d0 hds1) (PCons h d hds0))).(\lambda (H5: (eq C c0 -c2)).(\lambda (H6: (eq C c4 c1)).((let H7 \def (f_equal PList PList (\lambda -(e: PList).(match e in PList return (\lambda (_: PList).PList) with [PNil -\Rightarrow hds1 | (PCons _ _ p) \Rightarrow p])) (PCons h0 d0 hds1) (PCons h -d hds0) 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 hds1) (PCons h d hds0) 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 hds1) (PCons h d hds0) H4) in (eq_ind nat h (\lambda (n: -nat).((eq nat d0 d) \to ((eq PList hds1 hds0) \to ((eq C c0 c2) \to ((eq C c4 -c1) \to ((drop n d0 c0 c3) \to ((drop1 hds1 c3 c4) \to (ex2 C (\lambda (e2: -C).(drop1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h -(minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans -hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with -[true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) -h)]) c2 (CHead e2 (Bind b) (lift1 (match (blt (trans hds0 i) d) with [true -\Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false -\Rightarrow (ptrans hds0 i)]) v)))))))))))) (\lambda (H10: (eq nat d0 -d)).(eq_ind nat d (\lambda (n: nat).((eq PList hds1 hds0) \to ((eq C c0 c2) -\to ((eq C c4 c1) \to ((drop h n c0 c3) \to ((drop1 hds1 c3 c4) \to (ex2 C -(\lambda (e2: C).(drop1 (match (blt (trans hds0 i) d) with [true \Rightarrow -(PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow -(ptrans hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match (blt (trans hds0 i) -d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans -hds0 i) h)]) c2 (CHead e2 (Bind b) (lift1 (match (blt (trans hds0 i) d) with -[true \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | -false \Rightarrow (ptrans hds0 i)]) v))))))))))) (\lambda (H11: (eq PList -hds1 hds0)).(eq_ind PList hds0 (\lambda (p: PList).((eq C c0 c2) \to ((eq C -c4 c1) \to ((drop h d c0 c3) \to ((drop1 p c3 c4) \to (ex2 C (\lambda (e2: -C).(drop1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h -(minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans -hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with -[true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) -h)]) c2 (CHead e2 (Bind b) (lift1 (match (blt (trans hds0 i) d) with [true -\Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false -\Rightarrow (ptrans hds0 i)]) v)))))))))) (\lambda (H12: (eq C c0 -c2)).(eq_ind C c2 (\lambda (c: C).((eq C c4 c1) \to ((drop h d c c3) \to -((drop1 hds0 c3 c4) \to (ex2 C (\lambda (e2: C).(drop1 (match (blt (trans -hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) -(ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 e1)) (\lambda (e2: -C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) -| false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (lift1 -(match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S -(trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) -v))))))))) (\lambda (H13: (eq C c4 c1)).(eq_ind C c1 (\lambda (c: C).((drop h -d c2 c3) \to ((drop1 hds0 c3 c) \to (ex2 C (\lambda (e2: C).(drop1 (match +i c1 (CHead e1 (Bind b) v))).(let H_y \def (drop1_gen_pnil c2 c1 H) in +(eq_ind_r C c1 (\lambda (c: C).(ex2 C (\lambda (e2: C).(drop1 PNil e2 e1)) +(\lambda (e2: C).(getl i c (CHead e2 (Bind b) v))))) (ex_intro2 C (\lambda +(e2: C).(drop1 PNil e2 e1)) (\lambda (e2: C).(getl i c1 (CHead e2 (Bind b) +v))) e1 (drop1_nil e1) H0) c2 H_y)))))))))) (\lambda (h: nat).(\lambda (d: +nat).(\lambda (hds0: PList).(\lambda (H: ((\forall (c1: C).(\forall (c2: +C).((drop1 hds0 c2 c1) \to (\forall (b: B).(\forall (e1: C).(\forall (v: +T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to (ex2 C (\lambda +(e2: C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) +c2 (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v))))))))))))))).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (H0: (drop1 (PCons h d hds0) c2 c1)).(\lambda +(b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H1: (getl +i c1 (CHead e1 (Bind b) v))).(let H_x \def (drop1_gen_pcons c2 c1 hds0 h d +H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c3: C).(drop h d c2 c3)) +(\lambda (c3: C).(drop1 hds0 c3 c1)) (ex2 C (\lambda (e2: C).(drop1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (lift1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans -hds0 i)]) v)))))))) (\lambda (H14: (drop h d c2 c3)).(\lambda (H15: (drop1 -hds0 c3 c1)).(xinduction bool (blt (trans hds0 i) d) (\lambda (b0: bool).(ex2 -C (\lambda (e2: C).(drop1 (match b0 with [true \Rightarrow (PCons h (minus d -(S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 -e1)) (\lambda (e2: C).(getl (match b0 with [true \Rightarrow (trans hds0 i) | -false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (lift1 -(match b0 with [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) -(ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) v)))))) (\lambda (x_x: -bool).(bool_ind (\lambda (b0: bool).((eq bool (blt (trans hds0 i) d) b0) \to -(ex2 C (\lambda (e2: C).(drop1 (match b0 with [true \Rightarrow (PCons h -(minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans +hds0 i)]) v))))) (\lambda (x: C).(\lambda (H3: (drop h d c2 x)).(\lambda (H4: +(drop1 hds0 x c1)).(xinduction bool (blt (trans hds0 i) d) (\lambda (b0: +bool).(ex2 C (\lambda (e2: C).(drop1 (match b0 with [true \Rightarrow (PCons +h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match b0 with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (lift1 (match b0 with [true \Rightarrow (PCons h (minus d (S (trans -hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) v))))))) -(\lambda (H16: (eq bool (blt (trans hds0 i) d) true)).(let H_x \def (H c1 c3 -H15 b e1 v i H1) in (let H17 \def H_x in (ex2_ind C (\lambda (e2: C).(drop1 -(ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) c3 (CHead e2 -(Bind b) (lift1 (ptrans hds0 i) v)))) (ex2 C (\lambda (e2: C).(drop1 (PCons h -(minus d (S (trans hds0 i))) (ptrans hds0 i)) e2 e1)) (\lambda (e2: C).(getl -(trans hds0 i) c2 (CHead e2 (Bind b) (lift1 (PCons h (minus d (S (trans hds0 -i))) (ptrans hds0 i)) v))))) (\lambda (x: C).(\lambda (H18: (drop1 (ptrans -hds0 i) x e1)).(\lambda (H19: (getl (trans hds0 i) c3 (CHead x (Bind b) -(lift1 (ptrans hds0 i) v)))).(let H_x0 \def (drop_getl_trans_lt (trans hds0 -i) d (blt_lt d (trans hds0 i) H16) c2 c3 h H14 b x (lift1 (ptrans hds0 i) v) -H19) in (let H20 \def H_x0 in (ex2_ind C (\lambda (e2: C).(getl (trans hds0 -i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans hds0 i))) (lift1 (ptrans -hds0 i) v))))) (\lambda (e2: C).(drop h (minus d (S (trans hds0 i))) e2 x)) -(ex2 C (\lambda (e2: C).(drop1 (PCons h (minus d (S (trans hds0 i))) (ptrans -hds0 i)) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) -(lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) v))))) (\lambda -(x0: C).(\lambda (H21: (getl (trans hds0 i) c2 (CHead x0 (Bind b) (lift h -(minus d (S (trans hds0 i))) (lift1 (ptrans hds0 i) v))))).(\lambda (H22: -(drop h (minus d (S (trans hds0 i))) x0 x)).(ex_intro2 C (\lambda (e2: +hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) v)))))) +(\lambda (x_x: bool).(bool_ind (\lambda (b0: bool).((eq bool (blt (trans hds0 +i) d) b0) \to (ex2 C (\lambda (e2: C).(drop1 (match b0 with [true \Rightarrow +(PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow +(ptrans hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match b0 with [true +\Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 +(CHead e2 (Bind b) (lift1 (match b0 with [true \Rightarrow (PCons h (minus d +(S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) +v))))))) (\lambda (H5: (eq bool (blt (trans hds0 i) d) true)).(let H_x0 \def +(H c1 x H4 b e1 v i H1) in (let H6 \def H_x0 in (ex2_ind C (\lambda (e2: +C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) x +(CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))) (ex2 C (\lambda (e2: C).(drop1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift1 (PCons h -(minus d (S (trans hds0 i))) (ptrans hds0 i)) v)))) x0 (drop1_cons x0 x h -(minus d (S (trans hds0 i))) H22 e1 (ptrans hds0 i) H18) H21)))) H20)))))) -H17)))) (\lambda (H16: (eq bool (blt (trans hds0 i) d) false)).(let H_x \def -(H c1 c3 H15 b e1 v i H1) in (let H17 \def H_x in (ex2_ind C (\lambda (e2: -C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) c3 -(CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))) (ex2 C (\lambda (e2: -C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (plus (trans hds0 i) -h) c2 (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v))))) (\lambda (x: -C).(\lambda (H18: (drop1 (ptrans hds0 i) x e1)).(\lambda (H19: (getl (trans -hds0 i) c3 (CHead x (Bind b) (lift1 (ptrans hds0 i) v)))).(let H20 \def -(drop_getl_trans_ge (trans hds0 i) c2 c3 d h H14 (CHead x (Bind b) (lift1 -(ptrans hds0 i) v)) H19) in (ex_intro2 C (\lambda (e2: C).(drop1 (ptrans hds0 -i) e2 e1)) (\lambda (e2: C).(getl (plus (trans hds0 i) h) c2 (CHead e2 (Bind -b) (lift1 (ptrans hds0 i) v)))) x H18 (H20 (bge_le d (trans hds0 i) -H16))))))) H17)))) x_x))))) c4 (sym_eq C c4 c1 H13))) c0 (sym_eq C c0 c2 -H12))) hds1 (sym_eq PList hds1 hds0 H11))) d0 (sym_eq nat d0 d H10))) h0 -(sym_eq nat h0 h H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList -(PCons h d hds0)) (refl_equal C c2) (refl_equal C c1))))))))))))))) hds). +(minus d (S (trans hds0 i))) (ptrans hds0 i)) v))))) (\lambda (x0: +C).(\lambda (H7: (drop1 (ptrans hds0 i) x0 e1)).(\lambda (H8: (getl (trans +hds0 i) x (CHead x0 (Bind b) (lift1 (ptrans hds0 i) v)))).(let H_x1 \def +(drop_getl_trans_lt (trans hds0 i) d (blt_lt d (trans hds0 i) H5) c2 x h H3 b +x0 (lift1 (ptrans hds0 i) v) H8) in (let H9 \def H_x1 in (ex2_ind C (\lambda +(e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans +hds0 i))) (lift1 (ptrans hds0 i) v))))) (\lambda (e2: C).(drop h (minus d (S +(trans hds0 i))) e2 x0)) (ex2 C (\lambda (e2: C).(drop1 (PCons h (minus d (S +(trans hds0 i))) (ptrans hds0 i)) e2 e1)) (\lambda (e2: C).(getl (trans hds0 +i) c2 (CHead e2 (Bind b) (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans +hds0 i)) v))))) (\lambda (x1: C).(\lambda (H10: (getl (trans hds0 i) c2 +(CHead x1 (Bind b) (lift h (minus d (S (trans hds0 i))) (lift1 (ptrans hds0 +i) v))))).(\lambda (H11: (drop h (minus d (S (trans hds0 i))) x1 +x0)).(ex_intro2 C (\lambda (e2: C).(drop1 (PCons h (minus d (S (trans hds0 +i))) (ptrans hds0 i)) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead +e2 (Bind b) (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) +v)))) x1 (drop1_cons x1 x0 h (minus d (S (trans hds0 i))) H11 e1 (ptrans hds0 +i) H7) H10)))) H9)))))) H6)))) (\lambda (H5: (eq bool (blt (trans hds0 i) d) +false)).(let H_x0 \def (H c1 x H4 b e1 v i H1) in (let H6 \def H_x0 in +(ex2_ind C (\lambda (e2: C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: +C).(getl (trans hds0 i) x (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))) +(ex2 C (\lambda (e2: C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl +(plus (trans hds0 i) h) c2 (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v))))) +(\lambda (x0: C).(\lambda (H7: (drop1 (ptrans hds0 i) x0 e1)).(\lambda (H8: +(getl (trans hds0 i) x (CHead x0 (Bind b) (lift1 (ptrans hds0 i) v)))).(let +H9 \def (drop_getl_trans_ge (trans hds0 i) c2 x d h H3 (CHead x0 (Bind b) +(lift1 (ptrans hds0 i) v)) H8) in (ex_intro2 C (\lambda (e2: C).(drop1 +(ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (plus (trans hds0 i) h) c2 +(CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))) x0 H7 (H9 (bge_le d (trans +hds0 i) H5))))))) H6)))) x_x)))))) H2))))))))))))))) hds). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop1/props.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop1/props.ma index cb83a4c5b..34660afc3 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop1/props.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop1/props.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "LambdaDelta-1/drop1/defs.ma". +include "LambdaDelta-1/drop1/fwd.ma". include "LambdaDelta-1/drop/props.ma". @@ -28,71 +28,20 @@ C).(\forall (u: T).((drop1 hds c e) \to (drop1 (Ss hds) (CHead c (Bind b) \lambda (b: B).(\lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\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 (H: (drop1 PNil c e)).(let H0 \def (match H in -drop1 return (\lambda (p: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda -(_: (drop1 p c0 c1)).((eq PList p PNil) \to ((eq C c0 c) \to ((eq C c1 e) \to -(drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u))))))))) with -[(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 (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 -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) -c e)).(let H1 \def (match H0 in drop1 return (\lambda (p0: PList).(\lambda -(c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p0 c0 c1)).((eq PList p0 (PCons -n n0 p)) \to ((eq C c0 c) \to ((eq C c1 e) \to (drop1 (PCons n (S n0) (Ss p)) -(CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))))))) with -[(drop1_nil c0) \Rightarrow (\lambda (H1: (eq PList PNil (PCons n n0 -p))).(\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq C c0 e)).((let H4 \def -(eq_ind PList PNil (\lambda (e0: PList).(match e0 in PList return (\lambda -(_: 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 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 _ 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))). +C).(\lambda (u: T).(\lambda (H: (drop1 PNil c e)).(let H_y \def +(drop1_gen_pnil c e H) in (eq_ind_r C e (\lambda (c0: C).(drop1 PNil (CHead +c0 (Bind b) u) (CHead e (Bind b) u))) (drop1_nil (CHead e (Bind b) u)) c +H_y))))) (\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) c e)).(let H_x \def +(drop1_gen_pcons c e p n n0 H0) in (let H1 \def H_x in (ex2_ind C (\lambda +(c2: C).(drop n n0 c c2)) (\lambda (c2: C).(drop1 p c2 e)) (drop1 (PCons n (S +n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)) +(\lambda (x: C).(\lambda (H2: (drop n n0 c x)).(\lambda (H3: (drop1 p x +e)).(drop1_cons (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead x (Bind b) +(lift1 p u)) n (S n0) (drop_skip_bind n n0 c x H2 b (lift1 p u)) (CHead e +(Bind b) u) (Ss p) (H x u H3))))) H1)))))))))) hds))). theorem drop1_cons_tail: \forall (c2: C).(\forall (c3: C).(\forall (h: nat).(\forall (d: nat).((drop @@ -102,64 +51,17 @@ h d c2 c3) \to (\forall (hds: PList).(\forall (c1: C).((drop1 hds c1 c2) \to \lambda (c2: C).(\lambda (c3: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (drop h d c2 c3)).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c1: C).((drop1 p c1 c2) \to (drop1 (PConsTail p h d) c1 -c3)))) (\lambda (c1: C).(\lambda (H0: (drop1 PNil c1 c2)).(let H1 \def (match -H0 in drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: -C).(\lambda (_: (drop1 p c c0)).((eq PList p PNil) \to ((eq C c c1) \to ((eq -C c0 c2) \to (drop1 (PCons h d PNil) c1 c3)))))))) with [(drop1_nil c) -\Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c -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 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 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)))))). +c3)))) (\lambda (c1: C).(\lambda (H0: (drop1 PNil c1 c2)).(let H_y \def +(drop1_gen_pnil c1 c2 H0) in (eq_ind_r C c2 (\lambda (c: C).(drop1 (PCons h d +PNil) c c3)) (drop1_cons c2 c3 h d H c3 PNil (drop1_nil c3)) c1 H_y)))) +(\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 H_x +\def (drop1_gen_pcons c1 c2 p n n0 H1) in (let H2 \def H_x in (ex2_ind C +(\lambda (c4: C).(drop n n0 c1 c4)) (\lambda (c4: C).(drop1 p c4 c2)) (drop1 +(PCons n n0 (PConsTail p h d)) c1 c3) (\lambda (x: C).(\lambda (H3: (drop n +n0 c1 x)).(\lambda (H4: (drop1 p x c2)).(drop1_cons c1 x n n0 H3 c3 +(PConsTail p h d) (H0 x H4))))) H2))))))))) hds)))))). theorem drop1_trans: \forall (is1: PList).(\forall (c1: C).(\forall (c0: C).((drop1 is1 c1 c0) @@ -170,63 +72,17 @@ theorem drop1_trans: C).(\forall (c0: C).((drop1 p c1 c0) \to (\forall (is2: PList).(\forall (c2: C).((drop1 is2 c0 c2) \to (drop1 (papp p is2) c1 c2)))))))) (\lambda (c1: C).(\lambda (c0: C).(\lambda (H: (drop1 PNil c1 c0)).(\lambda (is2: -PList).(\lambda (c2: C).(\lambda (H0: (drop1 is2 c0 c2)).(let H1 \def (match -H in drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c3: -C).(\lambda (_: (drop1 p c c3)).((eq PList p PNil) \to ((eq C c c1) \to ((eq -C c3 c0) \to (drop1 is2 c1 c2)))))))) with [(drop1_nil c) \Rightarrow -(\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c c1)).(\lambda (H3: -(eq C c c0)).(eq_ind C c1 (\lambda (c3: C).((eq C c3 c0) \to (drop1 is2 c1 -c2))) (\lambda (H4: (eq C c1 c0)).(eq_ind C c0 (\lambda (c3: C).(drop1 is2 c3 -c2)) (let H5 \def (eq_ind_r C c0 (\lambda (c3: C).(drop1 is2 c3 c2)) H0 c1 -H4) in (eq_ind C c1 (\lambda (c3: C).(drop1 is2 c3 c2)) H5 c0 H4)) c1 (sym_eq -C c1 c0 H4))) c (sym_eq C c c1 H2) H3)))) | (drop1_cons c3 c4 h d H1 c5 hds -H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: -(eq C c3 c1)).(\lambda (H5: (eq C c5 c0)).((let H6 \def (eq_ind PList (PCons -h d 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 c3 c1) \to ((eq C c5 c0) \to ((drop h d c3 -c4) \to ((drop1 hds c4 c5) \to (drop1 is2 c1 c2))))) H6)) H4 H5 H1 H2))))]) -in (H1 (refl_equal PList PNil) (refl_equal C c1) (refl_equal C c0))))))))) -(\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: -((\forall (c1: C).(\forall (c0: C).((drop1 p c1 c0) \to (\forall (is2: -PList).(\forall (c2: C).((drop1 is2 c0 c2) \to (drop1 (papp p is2) c1 -c2))))))))).(\lambda (c1: C).(\lambda (c0: C).(\lambda (H0: (drop1 (PCons n -n0 p) c1 c0)).(\lambda (is2: PList).(\lambda (c2: C).(\lambda (H1: (drop1 is2 -c0 c2)).(let H2 \def (match H0 in drop1 return (\lambda (p0: PList).(\lambda -(c: C).(\lambda (c3: C).(\lambda (_: (drop1 p0 c c3)).((eq PList p0 (PCons n -n0 p)) \to ((eq C c c1) \to ((eq C c3 c0) \to (drop1 (PCons n n0 (papp p -is2)) c1 c2)))))))) 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 -c0)).((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 c0) \to (drop1 (PCons n n0 (papp p is2)) c1 c2))) H5)) H3 H4)))) | -(drop1_cons c3 c4 h d H2 c5 hds H3) \Rightarrow (\lambda (H4: (eq PList -(PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c3 c1)).(\lambda (H6: -(eq C c5 c0)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e -in PList return (\lambda (_: PList).PList) with [PNil \Rightarrow hds | -(PCons _ _ p0) \Rightarrow p0])) (PCons h d 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 d | (PCons _ n1 _) -\Rightarrow n1])) (PCons h d 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 h | (PCons n1 _ _) \Rightarrow n1])) -(PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq -nat d n0) \to ((eq PList hds p) \to ((eq C c3 c1) \to ((eq C c5 c0) \to -((drop n1 d c3 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons n n0 (papp p -is2)) c1 c2)))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda -(n1: nat).((eq PList hds p) \to ((eq C c3 c1) \to ((eq C c5 c0) \to ((drop n -n1 c3 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons n n0 (papp p is2)) c1 -c2))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: -PList).((eq C c3 c1) \to ((eq C c5 c0) \to ((drop n n0 c3 c4) \to ((drop1 p0 -c4 c5) \to (drop1 (PCons n n0 (papp p is2)) c1 c2)))))) (\lambda (H12: (eq C -c3 c1)).(eq_ind C c1 (\lambda (c: C).((eq C c5 c0) \to ((drop n n0 c c4) \to -((drop1 p c4 c5) \to (drop1 (PCons n n0 (papp p is2)) c1 c2))))) (\lambda -(H13: (eq C c5 c0)).(eq_ind C c0 (\lambda (c: C).((drop n n0 c1 c4) \to -((drop1 p c4 c) \to (drop1 (PCons n n0 (papp p is2)) c1 c2)))) (\lambda (H14: -(drop n n0 c1 c4)).(\lambda (H15: (drop1 p c4 c0)).(drop1_cons c1 c4 n n0 H14 -c2 (papp p is2) (H c4 c0 H15 is2 c2 H1)))) c5 (sym_eq C c5 c0 H13))) c3 -(sym_eq C c3 c1 H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0 -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 c1) (refl_equal C c0))))))))))))) is1). +PList).(\lambda (c2: C).(\lambda (H0: (drop1 is2 c0 c2)).(let H_y \def +(drop1_gen_pnil c1 c0 H) in (let H1 \def (eq_ind_r C c0 (\lambda (c: +C).(drop1 is2 c c2)) H0 c1 H_y) in H1)))))))) (\lambda (n: nat).(\lambda (n0: +nat).(\lambda (p: PList).(\lambda (H: ((\forall (c1: C).(\forall (c0: +C).((drop1 p c1 c0) \to (\forall (is2: PList).(\forall (c2: C).((drop1 is2 c0 +c2) \to (drop1 (papp p is2) c1 c2))))))))).(\lambda (c1: C).(\lambda (c0: +C).(\lambda (H0: (drop1 (PCons n n0 p) c1 c0)).(\lambda (is2: PList).(\lambda +(c2: C).(\lambda (H1: (drop1 is2 c0 c2)).(let H_x \def (drop1_gen_pcons c1 c0 +p n n0 H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c3: C).(drop n n0 c1 +c3)) (\lambda (c3: C).(drop1 p c3 c0)) (drop1 (PCons n n0 (papp p is2)) c1 +c2) (\lambda (x: C).(\lambda (H3: (drop n n0 c1 x)).(\lambda (H4: (drop1 p x +c0)).(drop1_cons c1 x n n0 H3 c2 (papp p is2) (H x c0 H4 is2 c2 H1))))) +H2))))))))))))) is1). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/fsubst0/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/fsubst0/fwd.ma index 7df3bf8bb..bdf51216e 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/fsubst0/fwd.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/fsubst0/fwd.ma @@ -23,43 +23,18 @@ c2) (subst0 i v t1 t2)) (land (eq T t1 t2) (csubst0 i v c1 c2)) (land (subst0 i v t1 t2) (csubst0 i v c1 c2))))))))) \def \lambda (c1: C).(\lambda (c2: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda -(v: T).(\lambda (i: nat).(\lambda (H: (fsubst0 i v c1 t1 c2 t2)).(let H0 \def -(match H in fsubst0 return (\lambda (c: C).(\lambda (t: T).(\lambda (_: -(fsubst0 ? ? ? ? c t)).((eq C c c2) \to ((eq T t t2) \to (or3 (land (eq C c1 -c2) (subst0 i v t1 t2)) (land (eq T t1 t2) (csubst0 i v c1 c2)) (land (subst0 -i v t1 t2) (csubst0 i v c1 c2)))))))) with [(fsubst0_snd t0 H0) \Rightarrow -(\lambda (H1: (eq C c1 c2)).(\lambda (H2: (eq T t0 t2)).(eq_ind C c2 (\lambda -(c: C).((eq T t0 t2) \to ((subst0 i v t1 t0) \to (or3 (land (eq C c c2) -(subst0 i v t1 t2)) (land (eq T t1 t2) (csubst0 i v c c2)) (land (subst0 i v -t1 t2) (csubst0 i v c c2)))))) (\lambda (H3: (eq T t0 t2)).(eq_ind T t2 -(\lambda (t: T).((subst0 i v t1 t) \to (or3 (land (eq C c2 c2) (subst0 i v t1 -t2)) (land (eq T t1 t2) (csubst0 i v c2 c2)) (land (subst0 i v t1 t2) -(csubst0 i v c2 c2))))) (\lambda (H4: (subst0 i v t1 t2)).(or3_intro0 (land -(eq C c2 c2) (subst0 i v t1 t2)) (land (eq T t1 t2) (csubst0 i v c2 c2)) -(land (subst0 i v t1 t2) (csubst0 i v c2 c2)) (conj (eq C c2 c2) (subst0 i v -t1 t2) (refl_equal C c2) H4))) t0 (sym_eq T t0 t2 H3))) c1 (sym_eq C c1 c2 -H1) H2 H0))) | (fsubst0_fst c0 H0) \Rightarrow (\lambda (H1: (eq C c0 -c2)).(\lambda (H2: (eq T t1 t2)).(eq_ind C c2 (\lambda (c: C).((eq T t1 t2) -\to ((csubst0 i v c1 c) \to (or3 (land (eq C c1 c2) (subst0 i v t1 t2)) (land -(eq T t1 t2) (csubst0 i v c1 c2)) (land (subst0 i v t1 t2) (csubst0 i v c1 -c2)))))) (\lambda (H3: (eq T t1 t2)).(eq_ind T t2 (\lambda (t: T).((csubst0 i -v c1 c2) \to (or3 (land (eq C c1 c2) (subst0 i v t t2)) (land (eq T t t2) -(csubst0 i v c1 c2)) (land (subst0 i v t t2) (csubst0 i v c1 c2))))) (\lambda -(H4: (csubst0 i v c1 c2)).(or3_intro1 (land (eq C c1 c2) (subst0 i v t2 t2)) -(land (eq T t2 t2) (csubst0 i v c1 c2)) (land (subst0 i v t2 t2) (csubst0 i v -c1 c2)) (conj (eq T t2 t2) (csubst0 i v c1 c2) (refl_equal T t2) H4))) t1 -(sym_eq T t1 t2 H3))) c0 (sym_eq C c0 c2 H1) H2 H0))) | (fsubst0_both t0 H0 -c0 H1) \Rightarrow (\lambda (H2: (eq C c0 c2)).(\lambda (H3: (eq T t0 -t2)).(eq_ind C c2 (\lambda (c: C).((eq T t0 t2) \to ((subst0 i v t1 t0) \to -((csubst0 i v c1 c) \to (or3 (land (eq C c1 c2) (subst0 i v t1 t2)) (land (eq -T t1 t2) (csubst0 i v c1 c2)) (land (subst0 i v t1 t2) (csubst0 i v c1 -c2))))))) (\lambda (H4: (eq T t0 t2)).(eq_ind T t2 (\lambda (t: T).((subst0 i -v t1 t) \to ((csubst0 i v c1 c2) \to (or3 (land (eq C c1 c2) (subst0 i v t1 -t2)) (land (eq T t1 t2) (csubst0 i v c1 c2)) (land (subst0 i v t1 t2) -(csubst0 i v c1 c2)))))) (\lambda (H5: (subst0 i v t1 t2)).(\lambda (H6: -(csubst0 i v c1 c2)).(or3_intro2 (land (eq C c1 c2) (subst0 i v t1 t2)) (land -(eq T t1 t2) (csubst0 i v c1 c2)) (land (subst0 i v t1 t2) (csubst0 i v c1 -c2)) (conj (subst0 i v t1 t2) (csubst0 i v c1 c2) H5 H6)))) t0 (sym_eq T t0 -t2 H4))) c0 (sym_eq C c0 c2 H2) H3 H0 H1)))]) in (H0 (refl_equal C c2) -(refl_equal T t2))))))))). +(v: T).(\lambda (i: nat).(\lambda (H: (fsubst0 i v c1 t1 c2 t2)).(fsubst0_ind +i v c1 t1 (\lambda (c: C).(\lambda (t: T).(or3 (land (eq C c1 c) (subst0 i v +t1 t)) (land (eq T t1 t) (csubst0 i v c1 c)) (land (subst0 i v t1 t) (csubst0 +i v c1 c))))) (\lambda (t0: T).(\lambda (H0: (subst0 i v t1 t0)).(or3_intro0 +(land (eq C c1 c1) (subst0 i v t1 t0)) (land (eq T t1 t0) (csubst0 i v c1 +c1)) (land (subst0 i v t1 t0) (csubst0 i v c1 c1)) (conj (eq C c1 c1) (subst0 +i v t1 t0) (refl_equal C c1) H0)))) (\lambda (c0: C).(\lambda (H0: (csubst0 i +v c1 c0)).(or3_intro1 (land (eq C c1 c0) (subst0 i v t1 t1)) (land (eq T t1 +t1) (csubst0 i v c1 c0)) (land (subst0 i v t1 t1) (csubst0 i v c1 c0)) (conj +(eq T t1 t1) (csubst0 i v c1 c0) (refl_equal T t1) H0)))) (\lambda (t0: +T).(\lambda (H0: (subst0 i v t1 t0)).(\lambda (c0: C).(\lambda (H1: (csubst0 +i v c1 c0)).(or3_intro2 (land (eq C c1 c0) (subst0 i v t1 t0)) (land (eq T t1 +t0) (csubst0 i v c1 c0)) (land (subst0 i v t1 t0) (csubst0 i v c1 c0)) (conj +(subst0 i v t1 t0) (csubst0 i v c1 c0) H0 H1)))))) c2 t2 H))))))). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/getl/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/getl/fwd.ma index 13f96107e..af9a9fb97 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/getl/fwd.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/getl/fwd.ma @@ -25,10 +25,10 @@ theorem getl_gen_all: C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e c2)))))) \def \lambda (c1: C).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H: (getl i c1 -c2)).(let H0 \def (match H in getl return (\lambda (_: (getl ? ? ?)).(ex2 C -(\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e c2)))) with -[(getl_intro e H0 H1) \Rightarrow (ex_intro2 C (\lambda (e0: C).(drop i O c1 -e0)) (\lambda (e0: C).(clear e0 c2)) e H0 H1)]) in H0)))). +c2)).(getl_ind i c1 c2 (ex2 C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: +C).(clear e c2))) (\lambda (e: C).(\lambda (H0: (drop i O c1 e)).(\lambda +(H1: (clear e c2)).(ex_intro2 C (\lambda (e0: C).(drop i O c1 e0)) (\lambda +(e0: C).(clear e0 c2)) e H0 H1)))) H)))). theorem getl_gen_sort: \forall (n: nat).(\forall (h: nat).(\forall (x: C).((getl h (CSort n) x) \to diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/iso/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/iso/fwd.ma index 069532c05..e2fb05409 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/iso/fwd.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/iso/fwd.ma @@ -18,6 +18,97 @@ include "LambdaDelta-1/iso/defs.ma". include "LambdaDelta-1/tlist/defs.ma". +theorem iso_gen_sort: + \forall (u2: T).(\forall (n1: nat).((iso (TSort n1) u2) \to (ex nat (\lambda +(n2: nat).(eq T u2 (TSort n2)))))) +\def + \lambda (u2: T).(\lambda (n1: nat).(\lambda (H: (iso (TSort n1) +u2)).(insert_eq T (TSort n1) (\lambda (t: T).(iso t u2)) (\lambda (_: T).(ex +nat (\lambda (n2: nat).(eq T u2 (TSort n2))))) (\lambda (y: T).(\lambda (H0: +(iso y u2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).((eq T t (TSort n1)) +\to (ex nat (\lambda (n2: nat).(eq T t0 (TSort n2))))))) (\lambda (n0: +nat).(\lambda (n2: nat).(\lambda (H1: (eq T (TSort n0) (TSort n1))).(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 n0 | (THead _ _ _) +\Rightarrow n0])) (TSort n0) (TSort n1) H1) in (ex_intro nat (\lambda (n3: +nat).(eq T (TSort n2) (TSort n3))) n2 (refl_equal T (TSort n2))))))) (\lambda +(i1: nat).(\lambda (i2: nat).(\lambda (H1: (eq T (TLRef i1) (TSort n1))).(let +H2 \def (eq_ind T (TLRef i1) (\lambda (ee: T).(match ee in T return (\lambda +(_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (TSort n1) H1) in (False_ind (ex nat +(\lambda (n2: nat).(eq T (TLRef i2) (TSort n2)))) H2))))) (\lambda (v1: +T).(\lambda (v2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: +K).(\lambda (H1: (eq T (THead k v1 t1) (TSort n1))).(let H2 \def (eq_ind T +(THead k v1 t1) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) +with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ +_) \Rightarrow True])) I (TSort n1) H1) in (False_ind (ex nat (\lambda (n2: +nat).(eq T (THead k v2 t2) (TSort n2)))) H2)))))))) y u2 H0))) H))). + +theorem iso_gen_lref: + \forall (u2: T).(\forall (n1: nat).((iso (TLRef n1) u2) \to (ex nat (\lambda +(n2: nat).(eq T u2 (TLRef n2)))))) +\def + \lambda (u2: T).(\lambda (n1: nat).(\lambda (H: (iso (TLRef n1) +u2)).(insert_eq T (TLRef n1) (\lambda (t: T).(iso t u2)) (\lambda (_: T).(ex +nat (\lambda (n2: nat).(eq T u2 (TLRef n2))))) (\lambda (y: T).(\lambda (H0: +(iso y u2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n1)) +\to (ex nat (\lambda (n2: nat).(eq T t0 (TLRef n2))))))) (\lambda (n0: +nat).(\lambda (n2: nat).(\lambda (H1: (eq T (TSort n0) (TLRef n1))).(let H2 +\def (eq_ind T (TSort n0) (\lambda (ee: T).(match ee in T return (\lambda (_: +T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | +(THead _ _ _) \Rightarrow False])) I (TLRef n1) H1) in (False_ind (ex nat +(\lambda (n3: nat).(eq T (TSort n2) (TLRef n3)))) H2))))) (\lambda (i1: +nat).(\lambda (i2: nat).(\lambda (H1: (eq T (TLRef i1) (TLRef n1))).(let H2 +\def (f_equal T nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) +with [(TSort _) \Rightarrow i1 | (TLRef n) \Rightarrow n | (THead _ _ _) +\Rightarrow i1])) (TLRef i1) (TLRef n1) H1) in (ex_intro nat (\lambda (n2: +nat).(eq T (TLRef i2) (TLRef n2))) i2 (refl_equal T (TLRef i2))))))) (\lambda +(v1: T).(\lambda (v2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: +K).(\lambda (H1: (eq T (THead k v1 t1) (TLRef n1))).(let H2 \def (eq_ind T +(THead k v1 t1) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) +with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ +_) \Rightarrow True])) I (TLRef n1) H1) in (False_ind (ex nat (\lambda (n2: +nat).(eq T (THead k v2 t2) (TLRef n2)))) H2)))))))) y u2 H0))) H))). + +theorem iso_gen_head: + \forall (k: K).(\forall (v1: T).(\forall (t1: T).(\forall (u2: T).((iso +(THead k v1 t1) u2) \to (ex_2 T T (\lambda (v2: T).(\lambda (t2: T).(eq T u2 +(THead k v2 t2))))))))) +\def + \lambda (k: K).(\lambda (v1: T).(\lambda (t1: T).(\lambda (u2: T).(\lambda +(H: (iso (THead k v1 t1) u2)).(insert_eq T (THead k v1 t1) (\lambda (t: +T).(iso t u2)) (\lambda (_: T).(ex_2 T T (\lambda (v2: T).(\lambda (t2: +T).(eq T u2 (THead k v2 t2)))))) (\lambda (y: T).(\lambda (H0: (iso y +u2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).((eq T t (THead k v1 t1)) \to +(ex_2 T T (\lambda (v2: T).(\lambda (t2: T).(eq T t0 (THead k v2 t2)))))))) +(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (H1: (eq T (TSort n1) (THead k +v1 t1))).(let H2 \def (eq_ind T (TSort n1) (\lambda (ee: T).(match ee in T +return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead k v1 t1) H1) +in (False_ind (ex_2 T T (\lambda (v2: T).(\lambda (t2: T).(eq T (TSort n2) +(THead k v2 t2))))) H2))))) (\lambda (i1: nat).(\lambda (i2: nat).(\lambda +(H1: (eq T (TLRef i1) (THead k v1 t1))).(let H2 \def (eq_ind T (TLRef i1) +(\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow +False])) I (THead k v1 t1) H1) in (False_ind (ex_2 T T (\lambda (v2: +T).(\lambda (t2: T).(eq T (TLRef i2) (THead k v2 t2))))) H2))))) (\lambda +(v0: T).(\lambda (v2: T).(\lambda (t0: T).(\lambda (t2: T).(\lambda (k0: +K).(\lambda (H1: (eq T (THead k0 v0 t0) (THead k v1 t1))).(let H2 \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 v1 t1) H1) in ((let H3 \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 v1 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 k0 v0 t0) (THead k v1 t1) H1) in (\lambda (_: (eq T +v0 v1)).(\lambda (H6: (eq K k0 k)).(eq_ind_r K k (\lambda (k1: K).(ex_2 T T +(\lambda (v3: T).(\lambda (t3: T).(eq T (THead k1 v2 t2) (THead k v3 t3)))))) +(ex_2_intro T T (\lambda (v3: T).(\lambda (t3: T).(eq T (THead k v2 t2) +(THead k v3 t3)))) v2 t2 (refl_equal T (THead k v2 t2))) k0 H6)))) H3)) +H2)))))))) y u2 H0))) H))))). + theorem iso_flats_lref_bind_false: \forall (f: F).(\forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall (t: T).(\forall (vs: TList).((iso (THeads (Flat f) vs (TLRef i)) (THead (Bind @@ -26,79 +117,27 @@ b) v t)) \to (\forall (P: Prop).P))))))) \lambda (f: F).(\lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda (t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: TList).((iso (THeads (Flat f) t0 (TLRef i)) (THead (Bind b) v t)) \to (\forall (P: Prop).P))) -(\lambda (H: (iso (TLRef i) (THead (Bind b) v t))).(\lambda (P: Prop).(let H0 -\def (match H in iso return (\lambda (t0: T).(\lambda (t1: T).(\lambda (_: -(iso t0 t1)).((eq T t0 (TLRef i)) \to ((eq T t1 (THead (Bind b) v t)) \to -P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq T (TSort n1) -(TLRef i))).(\lambda (H1: (eq T (TSort n2) (THead (Bind b) v t))).((let H2 -\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 i) H0) in (False_ind ((eq T -(TSort n2) (THead (Bind b) v t)) \to P) H2)) H1))) | (iso_lref i1 i2) -\Rightarrow (\lambda (H0: (eq T (TLRef i1) (TLRef i))).(\lambda (H1: (eq T -(TLRef i2) (THead (Bind b) v t))).((let H2 \def (f_equal T nat (\lambda (e: -T).(match e in T return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i1 | -(TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i1])) (TLRef i1) (TLRef -i) H0) in (eq_ind nat i (\lambda (_: nat).((eq T (TLRef i2) (THead (Bind b) v -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 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 _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TLRef i) H0) in (False_ind ((eq T (THead k v2 t2) (THead (Bind b) -v t)) \to P) H2)) H1)))]) in (H0 (refl_equal T (TLRef i)) (refl_equal T -(THead (Bind b) v t)))))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (_: -(((iso (THeads (Flat f) t1 (TLRef i)) (THead (Bind b) v t)) \to (\forall (P: -Prop).P)))).(\lambda (H0: (iso (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef -i))) (THead (Bind b) v t))).(\lambda (P: Prop).(let H1 \def (match H0 in iso -return (\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (iso t2 t3)).((eq T t2 -(THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i)))) \to ((eq T t3 (THead -(Bind b) v t)) \to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H1: -(eq T (TSort n1) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef -i))))).(\lambda (H2: (eq T (TSort n2) (THead (Bind b) v t))).((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 (Flat f) t0 (THeads (Flat f) t1 -(TLRef i))) H1) in (False_ind ((eq T (TSort n2) (THead (Bind b) v t)) \to P) -H3)) H2))) | (iso_lref i1 i2) \Rightarrow (\lambda (H1: (eq T (TLRef i1) -(THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))))).(\lambda (H2: (eq T -(TLRef i2) (THead (Bind b) v t))).((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 (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 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 _ _ 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 _ 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 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 (_: -T).((eq T t2 (THeads (Flat f) t1 (TLRef i))) \to ((eq T (THead (Flat f) v2 -t3) (THead (Bind b) v t)) \to P))) (\lambda (H7: (eq T t2 (THeads (Flat f) t1 -(TLRef i)))).(eq_ind T (THeads (Flat f) t1 (TLRef i)) (\lambda (_: T).((eq T -(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 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 -(refl_equal T (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i)))) (refl_equal -T (THead (Bind b) v t))))))))) vs)))))). +(\lambda (H: (iso (TLRef i) (THead (Bind b) v t))).(\lambda (P: Prop).(let +H_x \def (iso_gen_lref (THead (Bind b) v t) i H) in (let H0 \def H_x in +(ex_ind nat (\lambda (n2: nat).(eq T (THead (Bind b) v t) (TLRef n2))) P +(\lambda (x: nat).(\lambda (H1: (eq T (THead (Bind b) v t) (TLRef x))).(let +H2 \def (eq_ind T (THead (Bind b) v t) (\lambda (ee: T).(match ee in T return +(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef x) H1) in +(False_ind P H2)))) H0))))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda +(_: (((iso (THeads (Flat f) t1 (TLRef i)) (THead (Bind b) v t)) \to (\forall +(P: Prop).P)))).(\lambda (H0: (iso (THead (Flat f) t0 (THeads (Flat f) t1 +(TLRef i))) (THead (Bind b) v t))).(\lambda (P: Prop).(let H_x \def +(iso_gen_head (Flat f) t0 (THeads (Flat f) t1 (TLRef i)) (THead (Bind b) v t) +H0) in (let H1 \def H_x in (ex_2_ind T T (\lambda (v2: T).(\lambda (t2: +T).(eq T (THead (Bind b) v t) (THead (Flat f) v2 t2)))) P (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H2: (eq T (THead (Bind b) v t) (THead (Flat f) +x0 x1))).(let H3 \def (eq_ind T (THead (Bind b) v t) (\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 True | (Flat _) \Rightarrow +False])])) I (THead (Flat f) x0 x1) H2) in (False_ind P H3))))) H1)))))))) +vs)))))). theorem iso_flats_flat_bind_false: \forall (f1: F).(\forall (f2: F).(\forall (b: B).(\forall (v: T).(\forall @@ -110,202 +149,28 @@ Prop).P))))))))) (v2: T).(\lambda (t: T).(\lambda (t2: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: TList).((iso (THeads (Flat f1) t0 (THead (Flat f2) v2 t2)) (THead (Bind b) v t)) \to (\forall (P: Prop).P))) (\lambda (H: (iso (THead -(Flat f2) v2 t2) (THead (Bind b) v t))).(\lambda (P: Prop).(let H0 \def -(match H in iso return (\lambda (t0: T).(\lambda (t1: T).(\lambda (_: (iso t0 -t1)).((eq T t0 (THead (Flat f2) v2 t2)) \to ((eq T t1 (THead (Bind b) v t)) -\to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq T (TSort n1) -(THead (Flat f2) v2 t2))).(\lambda (H1: (eq T (TSort n2) (THead (Bind b) v -t))).((let H2 \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 f2) v2 -t2) H0) in (False_ind ((eq T (TSort n2) (THead (Bind b) v t)) \to P) H2)) -H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: (eq T (TLRef i1) (THead -(Flat f2) v2 t2))).(\lambda (H1: (eq T (TLRef i2) (THead (Bind b) v -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 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 _ _ 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 -(THead (Flat f2) v0 t0) (THead (Bind b) v t)) \to P))) (\lambda (H6: (eq T t1 -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 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))))) -with [(iso_sort n1 n2) \Rightarrow (\lambda (H1: (eq T (TSort n1) (THead -(Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))))).(\lambda (H2: -(eq T (TSort n2) (THead (Bind b) v t))).((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 (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) -H1) in (False_ind ((eq T (TSort n2) (THead (Bind b) v t)) \to P) H3)) H2))) | -(iso_lref i1 i2) \Rightarrow (\lambda (H1: (eq T (TLRef i1) (THead (Flat f1) -t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))))).(\lambda (H2: (eq T -(TLRef i2) (THead (Bind b) v t))).((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 (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 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 _ _ 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 _ 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) -(THead (Bind b) v t)) \to P)))) (\lambda (H6: (eq T v1 t0)).(eq_ind T t0 -(\lambda (_: T).((eq T t3 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) \to -((eq T (THead (Flat f1) v0 t4) (THead (Bind b) v t)) \to P))) (\lambda (H7: -(eq T t3 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)))).(eq_ind T (THeads -(Flat f1) t1 (THead (Flat f2) v2 t2)) (\lambda (_: T).((eq T (THead (Flat f1) -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 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 -t2)))) (refl_equal T (THead (Bind b) v t))))))))) vs)))))))). - -theorem iso_gen_sort: - \forall (u2: T).(\forall (n1: nat).((iso (TSort n1) u2) \to (ex nat (\lambda -(n2: nat).(eq T u2 (TSort n2)))))) -\def - \lambda (u2: T).(\lambda (n1: nat).(\lambda (H: (iso (TSort n1) u2)).(let H0 -\def (match H in iso return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: -(iso t t0)).((eq T t (TSort n1)) \to ((eq T t0 u2) \to (ex nat (\lambda (n2: -nat).(eq T u2 (TSort n2))))))))) with [(iso_sort n0 n2) \Rightarrow (\lambda -(H0: (eq T (TSort n0) (TSort n1))).(\lambda (H1: (eq T (TSort n2) u2)).((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 n0 | (THead _ _ -_) \Rightarrow n0])) (TSort n0) (TSort n1) H0) in (eq_ind nat n1 (\lambda (_: -nat).((eq T (TSort n2) u2) \to (ex nat (\lambda (n3: nat).(eq T u2 (TSort -n3)))))) (\lambda (H3: (eq T (TSort n2) u2)).(eq_ind T (TSort n2) (\lambda -(t: T).(ex nat (\lambda (n3: nat).(eq T t (TSort n3))))) (ex_intro nat -(\lambda (n3: nat).(eq T (TSort n2) (TSort n3))) n2 (refl_equal T (TSort -n2))) u2 H3)) n0 (sym_eq nat n0 n1 H2))) H1))) | (iso_lref i1 i2) \Rightarrow -(\lambda (H0: (eq T (TLRef i1) (TSort n1))).(\lambda (H1: (eq T (TLRef i2) -u2)).((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 (TSort n1) H0) in -(False_ind ((eq T (TLRef i2) u2) \to (ex nat (\lambda (n2: nat).(eq T u2 -(TSort n2))))) H2)) H1))) | (iso_head v1 v2 t1 t2 k) \Rightarrow (\lambda -(H0: (eq T (THead k v1 t1) (TSort n1))).(\lambda (H1: (eq T (THead k v2 t2) -u2)).((let H2 \def (eq_ind T (THead k v1 t1) (\lambda (e: T).(match e in T -return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n1) H0) in -(False_ind ((eq T (THead k v2 t2) u2) \to (ex nat (\lambda (n2: nat).(eq T u2 -(TSort n2))))) H2)) H1)))]) in (H0 (refl_equal T (TSort n1)) (refl_equal T -u2))))). - -theorem iso_gen_lref: - \forall (u2: T).(\forall (n1: nat).((iso (TLRef n1) u2) \to (ex nat (\lambda -(n2: nat).(eq T u2 (TLRef n2)))))) -\def - \lambda (u2: T).(\lambda (n1: nat).(\lambda (H: (iso (TLRef n1) u2)).(let H0 -\def (match H in iso return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: -(iso t t0)).((eq T t (TLRef n1)) \to ((eq T t0 u2) \to (ex nat (\lambda (n2: -nat).(eq T u2 (TLRef n2))))))))) with [(iso_sort n0 n2) \Rightarrow (\lambda -(H0: (eq T (TSort n0) (TLRef n1))).(\lambda (H1: (eq T (TSort n2) u2)).((let -H2 \def (eq_ind T (TSort n0) (\lambda (e: T).(match e in T return (\lambda -(_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | -(THead _ _ _) \Rightarrow False])) I (TLRef n1) H0) in (False_ind ((eq T -(TSort n2) u2) \to (ex nat (\lambda (n3: nat).(eq T u2 (TLRef n3))))) H2)) -H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: (eq T (TLRef i1) (TLRef -n1))).(\lambda (H1: (eq T (TLRef i2) u2)).((let H2 \def (f_equal T nat -(\lambda (e: T).(match e in T return (\lambda (_: T).nat) with [(TSort _) -\Rightarrow i1 | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i1])) -(TLRef i1) (TLRef n1) H0) in (eq_ind nat n1 (\lambda (_: nat).((eq T (TLRef -i2) u2) \to (ex nat (\lambda (n2: nat).(eq T u2 (TLRef n2)))))) (\lambda (H3: -(eq T (TLRef i2) u2)).(eq_ind T (TLRef i2) (\lambda (t: T).(ex nat (\lambda -(n2: nat).(eq T t (TLRef n2))))) (ex_intro nat (\lambda (n2: nat).(eq T -(TLRef i2) (TLRef n2))) i2 (refl_equal T (TLRef i2))) u2 H3)) i1 (sym_eq nat -i1 n1 H2))) H1))) | (iso_head v1 v2 t1 t2 k) \Rightarrow (\lambda (H0: (eq T -(THead k v1 t1) (TLRef n1))).(\lambda (H1: (eq T (THead k v2 t2) u2)).((let -H2 \def (eq_ind T (THead k v1 t1) (\lambda (e: T).(match e in T return +(Flat f2) v2 t2) (THead (Bind b) v t))).(\lambda (P: Prop).(let H_x \def +(iso_gen_head (Flat f2) v2 t2 (THead (Bind b) v t) H) in (let H0 \def H_x in +(ex_2_ind T T (\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind b) v t) +(THead (Flat f2) v3 t3)))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (H1: +(eq T (THead (Bind b) v t) (THead (Flat f2) x0 x1))).(let H2 \def (eq_ind T +(THead (Bind b) v t) (\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 True | (Flat _) \Rightarrow False])])) I (THead (Flat +f2) x0 x1) H1) in (False_ind P H2))))) H0))))) (\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 H_x \def (iso_gen_head (Flat f1) t0 (THeads +(Flat f1) t1 (THead (Flat f2) v2 t2)) (THead (Bind b) v t) H0) in (let H1 +\def H_x in (ex_2_ind T T (\lambda (v3: T).(\lambda (t3: T).(eq T (THead +(Bind b) v t) (THead (Flat f1) v3 t3)))) P (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H2: (eq T (THead (Bind b) v t) (THead (Flat f1) x0 x1))).(let H3 +\def (eq_ind T (THead (Bind b) v t) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n1) H0) in -(False_ind ((eq T (THead k v2 t2) u2) \to (ex nat (\lambda (n2: nat).(eq T u2 -(TLRef n2))))) H2)) H1)))]) in (H0 (refl_equal T (TLRef n1)) (refl_equal T -u2))))). - -theorem iso_gen_head: - \forall (k: K).(\forall (v1: T).(\forall (t1: T).(\forall (u2: T).((iso -(THead k v1 t1) u2) \to (ex_2 T T (\lambda (v2: T).(\lambda (t2: T).(eq T u2 -(THead k v2 t2))))))))) -\def - \lambda (k: K).(\lambda (v1: T).(\lambda (t1: T).(\lambda (u2: T).(\lambda -(H: (iso (THead k v1 t1) u2)).(let H0 \def (match H in iso return (\lambda -(t: T).(\lambda (t0: T).(\lambda (_: (iso t t0)).((eq T t (THead k v1 t1)) -\to ((eq T t0 u2) \to (ex_2 T T (\lambda (v2: T).(\lambda (t2: T).(eq T u2 -(THead k v2 t2)))))))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq -T (TSort n1) (THead k v1 t1))).(\lambda (H1: (eq T (TSort n2) u2)).((let H2 -\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 v1 t1) H0) in (False_ind ((eq T -(TSort n2) u2) \to (ex_2 T T (\lambda (v2: T).(\lambda (t2: T).(eq T u2 -(THead k v2 t2)))))) H2)) H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: -(eq T (TLRef i1) (THead k v1 t1))).(\lambda (H1: (eq T (TLRef i2) u2)).((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 k v1 t1) H0) in (False_ind ((eq T -(TLRef i2) u2) \to (ex_2 T T (\lambda (v2: T).(\lambda (t2: T).(eq T u2 -(THead k v2 t2)))))) H2)) H1))) | (iso_head v0 v2 t0 t2 k0) \Rightarrow -(\lambda (H0: (eq T (THead k0 v0 t0) (THead k v1 t1))).(\lambda (H1: (eq T -(THead k0 v2 t2) u2)).((let H2 \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 v1 -t1) H0) in ((let H3 \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 v1 t1) H0) in -((let H4 \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 v1 t1) H0) in (eq_ind K k -(\lambda (k1: K).((eq T v0 v1) \to ((eq T t0 t1) \to ((eq T (THead k1 v2 t2) -u2) \to (ex_2 T T (\lambda (v3: T).(\lambda (t3: T).(eq T u2 (THead k v3 -t3))))))))) (\lambda (H5: (eq T v0 v1)).(eq_ind T v1 (\lambda (_: T).((eq T -t0 t1) \to ((eq T (THead k v2 t2) u2) \to (ex_2 T T (\lambda (v3: T).(\lambda -(t3: T).(eq T u2 (THead k v3 t3)))))))) (\lambda (H6: (eq T t0 t1)).(eq_ind T -t1 (\lambda (_: T).((eq T (THead k v2 t2) u2) \to (ex_2 T T (\lambda (v3: -T).(\lambda (t3: T).(eq T u2 (THead k v3 t3))))))) (\lambda (H7: (eq T (THead -k v2 t2) u2)).(eq_ind T (THead k v2 t2) (\lambda (t: T).(ex_2 T T (\lambda -(v3: T).(\lambda (t3: T).(eq T t (THead k v3 t3)))))) (ex_2_intro T T -(\lambda (v3: T).(\lambda (t3: T).(eq T (THead k v2 t2) (THead k v3 t3)))) v2 -t2 (refl_equal T (THead k v2 t2))) u2 H7)) t0 (sym_eq T t0 t1 H6))) v0 -(sym_eq T v0 v1 H5))) k0 (sym_eq K k0 k H4))) H3)) H2)) H1)))]) in (H0 -(refl_equal T (THead k v1 t1)) (refl_equal T u2))))))). +\Rightarrow False | (THead k _ _) \Rightarrow (match k in K return (\lambda +(_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow +False])])) I (THead (Flat f1) x0 x1) H2) in (False_ind P H3))))) H1)))))))) +vs)))))))). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/lift/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/lift/fwd.ma index af8277b07..3dbbd6147 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/lift/fwd.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/lift/fwd.ma @@ -75,39 +75,34 @@ theorem lift_gen_sort: (\lambda (n0: nat).(\lambda (H: (eq T (TSort n) (lift h d (TSort n0)))).(sym_eq T (TSort n) (TSort n0) H))) (\lambda (n0: nat).(\lambda (H: (eq T (TSort n) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TSort -n)) (\lambda (H0: (lt n0 d)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) -(\lambda (t0: T).(eq T (TSort n) t0)) H (TLRef n0) (lift_lref_lt n0 h d H0)) -in (let H2 \def (match H1 in eq return (\lambda (t0: T).(\lambda (_: (eq ? ? -t0)).((eq T t0 (TLRef n0)) \to (eq T (TLRef n0) (TSort n))))) with -[refl_equal \Rightarrow (\lambda (H2: (eq T (TSort n) (TLRef n0))).(let H3 -\def (eq_ind T (TSort n) (\lambda (e: T).(match e in T return (\lambda (_: +n)) (\lambda (_: (lt n0 d)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) +(\lambda (t0: T).(eq T (TSort n) t0)) H (TLRef n0) (lift_lref_lt n0 h d (let +H1 \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 (lift h d (TLRef n0)) H) in (False_ind +(lt n0 d) H1)))) in (let H2 \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 (TLRef n0) +H1) in (False_ind (eq T (TLRef n0) (TSort n)) H2)))) (\lambda (_: (le d +n0)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t0: T).(eq T +(TSort n) t0)) H (TLRef (plus n0 h)) (lift_lref_ge n0 h d (let H1 \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 (TLRef n0) H2) in (False_ind (eq T -(TLRef n0) (TSort n)) H3)))]) in (H2 (refl_equal T (TLRef n0)))))) (\lambda -(H0: (le d n0)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t0: -T).(eq T (TSort n) t0)) H (TLRef (plus n0 h)) (lift_lref_ge n0 h d H0)) in -(let H2 \def (match H1 in eq return (\lambda (t0: T).(\lambda (_: (eq ? ? -t0)).((eq T t0 (TLRef (plus n0 h))) \to (eq T (TLRef n0) (TSort n))))) with -[refl_equal \Rightarrow (\lambda (H2: (eq T (TSort n) (TLRef (plus n0 -h)))).(let H3 \def (eq_ind T (TSort n) (\lambda (e: T).(match e in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef (plus n0 h)) -H2) in (False_ind (eq T (TLRef n0) (TSort n)) H3)))]) in (H2 (refl_equal T -(TLRef (plus n0 h)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: -(((eq T (TSort n) (lift h d t0)) \to (eq T t0 (TSort n))))).(\lambda (t1: -T).(\lambda (_: (((eq T (TSort n) (lift h d t1)) \to (eq T t1 (TSort -n))))).(\lambda (H1: (eq T (TSort n) (lift h d (THead k t0 t1)))).(let H2 -\def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t2: T).(eq T (TSort n) -t2)) H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) -in (let H3 \def (match H2 in eq return (\lambda (t2: T).(\lambda (_: (eq ? ? -t2)).((eq T t2 (THead k (lift h d t0) (lift h (s k d) t1))) \to (eq T (THead -k t0 t1) (TSort n))))) with [refl_equal \Rightarrow (\lambda (H3: (eq T -(TSort n) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H4 \def (eq_ind -T (TSort n) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with -[(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H3) in -(False_ind (eq T (THead k t0 t1) (TSort n)) H4)))]) in (H3 (refl_equal T -(THead k (lift h d t0) (lift h (s k d) t1)))))))))))) t)))). +(THead _ _ _) \Rightarrow False])) I (lift h d (TLRef n0)) H) in (False_ind +(le d n0) H1)))) in (let H2 \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 (TLRef +(plus n0 h)) H1) in (False_ind (eq T (TLRef n0) (TSort n)) H2))))))) (\lambda +(k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TSort n) (lift h d t0)) \to (eq +T t0 (TSort n))))).(\lambda (t1: T).(\lambda (_: (((eq T (TSort n) (lift h d +t1)) \to (eq T t1 (TSort n))))).(\lambda (H1: (eq T (TSort n) (lift h d +(THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda +(t2: T).(eq T (TSort n) t2)) H1 (THead k (lift h d t0) (lift h (s k d) t1)) +(lift_head k t0 t1 h d)) in (let H3 \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 k (lift h d t0) (lift h (s k d) t1)) H2) in (False_ind (eq T (THead k +t0 t1) (TSort n)) H3))))))))) t)))). theorem lift_gen_lref: \forall (t: T).(\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T @@ -173,41 +168,19 @@ theorem lift_gen_lref_lt: (t: T).((eq T (TLRef n) (lift h d t)) \to (eq T t (TLRef n))))))) \def \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (lt n -d)).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TLRef n) (lift h d t0)) -\to (eq T t0 (TLRef n)))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef n) -(lift h d (TSort n0)))).(sym_eq T (TLRef n) (TSort n0) H0))) (\lambda (n0: -nat).(\lambda (H0: (eq T (TLRef n) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq -T (TLRef n0) (TLRef n)) (\lambda (H1: (lt n0 d)).(let H2 \def (eq_ind T (lift -h d (TLRef n0)) (\lambda (t0: T).(eq T (TLRef n) t0)) H0 (TLRef n0) -(lift_lref_lt n0 h d H1)) in (sym_eq T (TLRef n) (TLRef n0) H2))) (\lambda -(H1: (le d n0)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t0: -T).(eq T (TLRef n) t0)) H0 (TLRef (plus n0 h)) (lift_lref_ge n0 h d H1)) in -(let H3 \def (match H2 in eq return (\lambda (t0: T).(\lambda (_: (eq ? ? -t0)).((eq T t0 (TLRef (plus n0 h))) \to (eq T (TLRef n0) (TLRef n))))) with -[refl_equal \Rightarrow (\lambda (H3: (eq T (TLRef n) (TLRef (plus n0 -h)))).(let H4 \def (f_equal T nat (\lambda (e: T).(match e in T return -(\lambda (_: T).nat) with [(TSort _) \Rightarrow n | (TLRef n1) \Rightarrow -n1 | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef (plus n0 h)) H3) in -(eq_ind nat (plus n0 h) (\lambda (n1: nat).(eq T (TLRef n0) (TLRef n1))) (let -H5 \def (eq_ind nat n (\lambda (n1: nat).(lt n1 d)) H (plus n0 h) H4) in -(le_false d n0 (eq T (TLRef n0) (TLRef (plus n0 h))) H1 (lt_le_S n0 d -(lt_le_trans n0 (S (plus n0 h)) d (le_lt_n_Sm n0 (plus n0 h) (le_plus_l n0 -h)) (lt_le_S (plus n0 h) d H5))))) n (sym_eq nat n (plus n0 h) H4))))]) in -(H3 (refl_equal T (TLRef (plus n0 h)))))))))) (\lambda (k: K).(\lambda (t0: -T).(\lambda (_: (((eq T (TLRef n) (lift h d t0)) \to (eq T t0 (TLRef -n))))).(\lambda (t1: T).(\lambda (_: (((eq T (TLRef n) (lift h d t1)) \to (eq -T t1 (TLRef n))))).(\lambda (H2: (eq T (TLRef n) (lift h d (THead k t0 -t1)))).(let H3 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t2: T).(eq -T (TLRef n) t2)) H2 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k -t0 t1 h d)) in (let H4 \def (match H3 in eq return (\lambda (t2: T).(\lambda -(_: (eq ? ? t2)).((eq T t2 (THead k (lift h d t0) (lift h (s k d) t1))) \to -(eq T (THead k t0 t1) (TLRef n))))) with [refl_equal \Rightarrow (\lambda -(H4: (eq T (TLRef n) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H5 -\def (eq_ind T (TLRef n) (\lambda (e: T).(match e in T return (\lambda (_: -T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) -t1)) H4) in (False_ind (eq T (THead k t0 t1) (TLRef n)) H5)))]) in (H4 -(refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))) t))))). +d)).(\lambda (t: T).(\lambda (H0: (eq T (TLRef n) (lift h d t))).(let H_x +\def (lift_gen_lref t d h n H0) in (let H1 \def H_x in (or_ind (land (lt n d) +(eq T t (TLRef n))) (land (le (plus d h) n) (eq T t (TLRef (minus n h)))) (eq +T t (TLRef n)) (\lambda (H2: (land (lt n d) (eq T t (TLRef n)))).(and_ind (lt +n d) (eq T t (TLRef n)) (eq T t (TLRef n)) (\lambda (_: (lt n d)).(\lambda +(H4: (eq T t (TLRef n))).(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 +(TLRef n))) (refl_equal T (TLRef n)) t H4))) H2)) (\lambda (H2: (land (le +(plus d h) n) (eq T t (TLRef (minus n h))))).(and_ind (le (plus d h) n) (eq T +t (TLRef (minus n h))) (eq T t (TLRef n)) (\lambda (H3: (le (plus d h) +n)).(\lambda (H4: (eq T t (TLRef (minus n h)))).(eq_ind_r T (TLRef (minus n +h)) (\lambda (t0: T).(eq T t0 (TLRef n))) (le_false (plus d h) n (eq T (TLRef +(minus n h)) (TLRef n)) H3 (lt_le_S n (plus d h) (le_plus_trans (S n) d h +H))) t H4))) H2)) H1)))))))). theorem lift_gen_lref_false: \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((le d n) \to ((lt n @@ -215,118 +188,38 @@ theorem lift_gen_lref_false: (P: Prop).P))))))) \def \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (le d -n)).(\lambda (H0: (lt n (plus d h))).(\lambda (t: T).(T_ind (\lambda (t0: -T).((eq T (TLRef n) (lift h d t0)) \to (\forall (P: Prop).P))) (\lambda (n0: -nat).(\lambda (H1: (eq T (TLRef n) (lift h d (TSort n0)))).(\lambda (P: -Prop).(let H2 \def (match H1 in eq return (\lambda (t0: T).(\lambda (_: (eq ? -? t0)).((eq T t0 (lift h d (TSort n0))) \to P))) with [refl_equal \Rightarrow -(\lambda (H2: (eq T (TLRef n) (lift h d (TSort n0)))).(let H3 \def (eq_ind T -(TLRef n) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) -\Rightarrow False])) I (lift h d (TSort n0)) H2) in (False_ind P H3)))]) in -(H2 (refl_equal T (lift h d (TSort n0)))))))) (\lambda (n0: nat).(\lambda -(H1: (eq T (TLRef n) (lift h d (TLRef n0)))).(\lambda (P: Prop).(lt_le_e n0 d -P (\lambda (H2: (lt n0 d)).(let H3 \def (eq_ind T (lift h d (TLRef n0)) -(\lambda (t0: T).(eq T (TLRef n) t0)) H1 (TLRef n0) (lift_lref_lt n0 h d H2)) -in (let H4 \def (match H3 in eq return (\lambda (t0: T).(\lambda (_: (eq ? ? -t0)).((eq T t0 (TLRef n0)) \to P))) with [refl_equal \Rightarrow (\lambda -(H4: (eq T (TLRef n) (TLRef n0))).(let H5 \def (f_equal T nat (\lambda (e: -T).(match e in T return (\lambda (_: T).nat) with [(TSort _) \Rightarrow n | -(TLRef n1) \Rightarrow n1 | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef -n0) H4) in (eq_ind nat n0 (\lambda (_: nat).P) (let H6 \def (eq_ind_r nat n0 -(\lambda (n1: nat).(lt n1 d)) H2 n H5) in (le_false d n P H H6)) n (sym_eq -nat n n0 H5))))]) in (H4 (refl_equal T (TLRef n0)))))) (\lambda (H2: (le d -n0)).(let H3 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t0: T).(eq T -(TLRef n) t0)) H1 (TLRef (plus n0 h)) (lift_lref_ge n0 h d H2)) in (let H4 -\def (match H3 in eq return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T -t0 (TLRef (plus n0 h))) \to P))) with [refl_equal \Rightarrow (\lambda (H4: -(eq T (TLRef n) (TLRef (plus n0 h)))).(let H5 \def (f_equal T nat (\lambda -(e: T).(match e in T return (\lambda (_: T).nat) with [(TSort _) \Rightarrow -n | (TLRef n1) \Rightarrow n1 | (THead _ _ _) \Rightarrow n])) (TLRef n) -(TLRef (plus n0 h)) H4) in (eq_ind nat (plus n0 h) (\lambda (_: nat).P) (let -H6 \def (eq_ind nat n (\lambda (n1: nat).(lt n1 (plus d h))) H0 (plus n0 h) -H5) in (le_false d n0 P H2 (lt_le_S n0 d (simpl_lt_plus_r h n0 d H6)))) n -(sym_eq nat n (plus n0 h) H5))))]) in (H4 (refl_equal T (TLRef (plus n0 -h))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TLRef n) -(lift h d t0)) \to (\forall (P: Prop).P)))).(\lambda (t1: T).(\lambda (_: -(((eq T (TLRef n) (lift h d t1)) \to (\forall (P: Prop).P)))).(\lambda (H3: -(eq T (TLRef n) (lift h d (THead k t0 t1)))).(\lambda (P: Prop).(let H4 \def -(eq_ind T (lift h d (THead k t0 t1)) (\lambda (t2: T).(eq T (TLRef n) t2)) H3 -(THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let -H5 \def (match H4 in eq return (\lambda (t2: T).(\lambda (_: (eq ? ? -t2)).((eq T t2 (THead k (lift h d t0) (lift h (s k d) t1))) \to P))) with -[refl_equal \Rightarrow (\lambda (H5: (eq T (TLRef n) (THead k (lift h d t0) -(lift h (s k d) t1)))).(let H6 \def (eq_ind T (TLRef n) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I -(THead k (lift h d t0) (lift h (s k d) t1)) H5) in (False_ind P H6)))]) in -(H5 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1))))))))))))) -t)))))). +n)).(\lambda (H0: (lt n (plus d h))).(\lambda (t: T).(\lambda (H1: (eq T +(TLRef n) (lift h d t))).(\lambda (P: Prop).(let H_x \def (lift_gen_lref t d +h n H1) in (let H2 \def H_x in (or_ind (land (lt n d) (eq T t (TLRef n))) +(land (le (plus d h) n) (eq T t (TLRef (minus n h)))) P (\lambda (H3: (land +(lt n d) (eq T t (TLRef n)))).(and_ind (lt n d) (eq T t (TLRef n)) P (\lambda +(H4: (lt n d)).(\lambda (_: (eq T t (TLRef n))).(le_false d n P H H4))) H3)) +(\lambda (H3: (land (le (plus d h) n) (eq T t (TLRef (minus n h))))).(and_ind +(le (plus d h) n) (eq T t (TLRef (minus n h))) P (\lambda (H4: (le (plus d h) +n)).(\lambda (_: (eq T t (TLRef (minus n h)))).(le_false (plus d h) n P H4 +H0))) H3)) H2)))))))))). theorem lift_gen_lref_ge: \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((le d n) \to (\forall (t: T).((eq T (TLRef (plus n h)) (lift h d t)) \to (eq T t (TLRef n))))))) \def \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (le d -n)).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TLRef (plus n h)) (lift h -d t0)) \to (eq T t0 (TLRef n)))) (\lambda (n0: nat).(\lambda (H0: (eq T -(TLRef (plus n h)) (lift h d (TSort n0)))).(let H1 \def (match H0 in eq -return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (lift h d (TSort -n0))) \to (eq T (TSort n0) (TLRef n))))) with [refl_equal \Rightarrow -(\lambda (H1: (eq T (TLRef (plus n h)) (lift h d (TSort n0)))).(let H2 \def -(eq_ind T (TLRef (plus n h)) (\lambda (e: T).(match e in T return (\lambda -(_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (lift h d (TSort n0)) H1) in (False_ind -(eq T (TSort n0) (TLRef n)) H2)))]) in (H1 (refl_equal T (lift h d (TSort -n0))))))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef (plus n h)) (lift h d -(TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TLRef n)) (\lambda (H1: (lt n0 -d)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t0: T).(eq T -(TLRef (plus n h)) t0)) H0 (TLRef n0) (lift_lref_lt n0 h d H1)) in (let H3 -\def (match H2 in eq return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T -t0 (TLRef n0)) \to (eq T (TLRef n0) (TLRef n))))) with [refl_equal -\Rightarrow (\lambda (H3: (eq T (TLRef (plus n h)) (TLRef n0))).(let H4 \def -(f_equal T nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with -[(TSort _) \Rightarrow ((let rec plus (n1: nat) on n1: (nat \to nat) \def -(\lambda (m: nat).(match n1 with [O \Rightarrow m | (S p) \Rightarrow (S -(plus p m))])) in plus) n h) | (TLRef n1) \Rightarrow n1 | (THead _ _ _) -\Rightarrow ((let rec plus (n1: nat) on n1: (nat \to nat) \def (\lambda (m: -nat).(match n1 with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in -plus) n h)])) (TLRef (plus n h)) (TLRef n0) H3) in (eq_ind nat (plus n h) -(\lambda (n1: nat).(eq T (TLRef n1) (TLRef n))) (let H5 \def (eq_ind_r nat n0 -(\lambda (n1: nat).(lt n1 d)) H1 (plus n h) H4) in (le_false d n (eq T (TLRef -(plus n h)) (TLRef n)) H (lt_le_S n d (simpl_lt_plus_r h n d (lt_le_trans -(plus n h) d (plus d h) H5 (le_plus_l d h)))))) n0 H4)))]) in (H3 (refl_equal -T (TLRef n0)))))) (\lambda (H1: (le d n0)).(let H2 \def (eq_ind T (lift h d -(TLRef n0)) (\lambda (t0: T).(eq T (TLRef (plus n h)) t0)) H0 (TLRef (plus n0 -h)) (lift_lref_ge n0 h d H1)) in (let H3 \def (match H2 in eq return (\lambda -(t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef (plus n0 h))) \to (eq T -(TLRef n0) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H3: (eq T -(TLRef (plus n h)) (TLRef (plus n0 h)))).(let H4 \def (f_equal T nat (\lambda -(e: T).(match e in T return (\lambda (_: T).nat) with [(TSort _) \Rightarrow -((let rec plus (n1: nat) on n1: (nat \to nat) \def (\lambda (m: nat).(match -n1 with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h) -| (TLRef n1) \Rightarrow n1 | (THead _ _ _) \Rightarrow ((let rec plus (n1: -nat) on n1: (nat \to nat) \def (\lambda (m: nat).(match n1 with [O -\Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h)])) (TLRef -(plus n h)) (TLRef (plus n0 h)) H3) in (eq_ind nat (plus n h) (\lambda (_: -nat).(eq T (TLRef n0) (TLRef n))) (f_equal nat T TLRef n0 n (simpl_plus_r h -n0 n (sym_eq nat (plus n h) (plus n0 h) H4))) (plus n0 h) H4)))]) in (H3 -(refl_equal T (TLRef (plus n0 h)))))))))) (\lambda (k: K).(\lambda (t0: -T).(\lambda (_: (((eq T (TLRef (plus n h)) (lift h d t0)) \to (eq T t0 (TLRef -n))))).(\lambda (t1: T).(\lambda (_: (((eq T (TLRef (plus n h)) (lift h d -t1)) \to (eq T t1 (TLRef n))))).(\lambda (H2: (eq T (TLRef (plus n h)) (lift -h d (THead k t0 t1)))).(let H3 \def (eq_ind T (lift h d (THead k t0 t1)) -(\lambda (t2: T).(eq T (TLRef (plus n h)) t2)) H2 (THead k (lift h d t0) -(lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H4 \def (match H3 in eq -return (\lambda (t2: T).(\lambda (_: (eq ? ? t2)).((eq T t2 (THead k (lift h -d t0) (lift h (s k d) t1))) \to (eq T (THead k t0 t1) (TLRef n))))) with -[refl_equal \Rightarrow (\lambda (H4: (eq T (TLRef (plus n h)) (THead k (lift -h d t0) (lift h (s k d) t1)))).(let H5 \def (eq_ind T (TLRef (plus n h)) -(\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow -False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H4) in (False_ind (eq -T (THead k t0 t1) (TLRef n)) H5)))]) in (H4 (refl_equal T (THead k (lift h d -t0) (lift h (s k d) t1)))))))))))) t))))). +n)).(\lambda (t: T).(\lambda (H0: (eq T (TLRef (plus n h)) (lift h d +t))).(let H_x \def (lift_gen_lref t d h (plus n h) H0) in (let H1 \def H_x in +(or_ind (land (lt (plus n h) d) (eq T t (TLRef (plus n h)))) (land (le (plus +d h) (plus n h)) (eq T t (TLRef (minus (plus n h) h)))) (eq T t (TLRef n)) +(\lambda (H2: (land (lt (plus n h) d) (eq T t (TLRef (plus n h))))).(and_ind +(lt (plus n h) d) (eq T t (TLRef (plus n h))) (eq T t (TLRef n)) (\lambda +(H3: (lt (plus n h) d)).(\lambda (H4: (eq T t (TLRef (plus n h)))).(eq_ind_r +T (TLRef (plus n h)) (\lambda (t0: T).(eq T t0 (TLRef n))) (le_false d n (eq +T (TLRef (plus n h)) (TLRef n)) H (lt_le_S n d (simpl_lt_plus_r h n d +(lt_le_trans (plus n h) d (plus d h) H3 (le_plus_l d h))))) t H4))) H2)) +(\lambda (H2: (land (le (plus d h) (plus n h)) (eq T t (TLRef (minus (plus n +h) h))))).(and_ind (le (plus d h) (plus n h)) (eq T t (TLRef (minus (plus n +h) h))) (eq T t (TLRef n)) (\lambda (_: (le (plus d h) (plus n h))).(\lambda +(H4: (eq T t (TLRef (minus (plus n h) h)))).(eq_ind_r T (TLRef (minus (plus n +h) h)) (\lambda (t0: T).(eq T t0 (TLRef n))) (f_equal nat T TLRef (minus +(plus n h) h) n (minus_plus_r n h)) t H4))) H2)) H1)))))))). theorem lift_gen_head: \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: @@ -341,98 +234,93 @@ T).(eq T t (lift h (s k d) z))))))))))) k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k u t) -(lift h d (TSort n)))).(let H0 \def (match H in eq return (\lambda (t0: -T).(\lambda (_: (eq ? ? t0)).((eq T t0 (lift h d (TSort n))) \to (ex3_2 T T -(\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead k y z)))) (\lambda (y: -T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda -(H0: (eq T (THead k u t) (lift h d (TSort n)))).(let H1 \def (eq_ind T (THead -k u t) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow True])) I (lift h d (TSort n)) H0) in (False_ind (ex3_2 T T +(lift h d (TSort n)))).(let H0 \def (eq_ind T (lift h d (TSort n)) (\lambda +(t0: T).(eq T (THead k u t) t0)) H (TSort n) (lift_sort n h d)) in (let H1 +\def (eq_ind T (THead k u t) (\lambda (ee: T).(match ee in T return (\lambda +(_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead _ _ _) \Rightarrow True])) I (TSort n) H0) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T t (lift h (s k d) z))))) H1)))]) in (H0 (refl_equal T (lift h d -(TSort n))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H: (eq T (THead k u t) (lift h d (TLRef n)))).(lt_le_e n d -(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) -(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) (\lambda (H0: (lt n -d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead -k u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 in -eq return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef n)) \to -(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) -(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) with [refl_equal -\Rightarrow (\lambda (H2: (eq T (THead k u t) (TLRef n))).(let H3 \def -(eq_ind T (THead k u t) (\lambda (e: T).(match e in T return (\lambda (_: +T).(eq T t (lift h (s k d) z))))) H1))))))) (\lambda (n: nat).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k u t) (lift h d (TLRef +n)))).(lt_le_e n d (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) +(THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) +(\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) (\lambda (H0: +(lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T +(THead k u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def +(eq_ind T (THead k u t) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | -(THead _ _ _) \Rightarrow True])) I (TLRef n) H2) in (False_ind (ex3_2 T T +(THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T t (lift h (s k d) z))))) H3)))]) in (H2 (refl_equal T (TLRef n)))))) -(\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda -(t0: T).(eq T (THead k u t) t0)) H (TLRef (plus n h)) (lift_lref_ge n h d -H0)) in (let H2 \def (match H1 in eq return (\lambda (t0: T).(\lambda (_: (eq -? ? t0)).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T T (\lambda (y: -T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda -(_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift -h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (THead k -u t) (TLRef (plus n h)))).(let H3 \def (eq_ind T (THead k u t) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TLRef (plus n h)) H2) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: -T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u -(lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) -z))))) H3)))]) in (H2 (refl_equal T (TLRef (plus n h)))))))))))) (\lambda -(k0: K).(\lambda (t0: T).(\lambda (_: ((\forall (h: nat).(\forall (d: -nat).((eq T (THead k u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: -T).(\lambda (z: T).(eq T t0 (THead k y z)))) (\lambda (y: T).(\lambda (_: -T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s -k d) z)))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (h: nat).(\forall -(d: nat).((eq T (THead k u t) (lift h d t1)) \to (ex3_2 T T (\lambda (y: -T).(\lambda (z: T).(eq T t1 (THead k y z)))) (\lambda (y: T).(\lambda (_: -T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s -k d) z)))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T -(THead k u t) (lift h d (THead k0 t0 t1)))).(let H2 \def (eq_ind T (lift h d -(THead k0 t0 t1)) (\lambda (t2: T).(eq T (THead k u t) t2)) H1 (THead k0 -(lift h d t0) (lift h (s k0 d) t1)) (lift_head k0 t0 t1 h d)) in (let H3 \def -(match H2 in eq return (\lambda (t2: T).(\lambda (_: (eq ? ? t2)).((eq T t2 -(THead k0 (lift h d t0) (lift h (s k0 d) t1))) \to (ex3_2 T T (\lambda (y: -T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k y z)))) (\lambda (y: +T).(eq T t (lift h (s k d) z))))) H2)))) (\lambda (H0: (le d n)).(let H1 \def +(eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead k u t) t0)) H +(TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (eq_ind T (THead +k u t) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (TLRef (plus n h)) H1) in (False_ind (ex3_2 T T +(\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda -(H3: (eq T (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)))).(let -H4 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) +T).(eq T t (lift h (s k d) z))))) H2))))))))) (\lambda (k0: K).(\lambda (t0: +T).(\lambda (H: ((\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) +(lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead +k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda +(_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))))).(\lambda (t1: +T).(\lambda (H0: ((\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) +(lift h d t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead +k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda +(_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))))).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead k u t) (lift h d (THead k0 +t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k0 t0 t1)) (\lambda (t2: +T).(eq T (THead k u t) t2)) H1 (THead k0 (lift h d t0) (lift h (s k0 d) t1)) +(lift_head k0 t0 t1 h d)) in (let H3 \def (f_equal T K (\lambda (e: T).(match +e in T return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) +\Rightarrow k | (THead k1 _ _) \Rightarrow k1])) (THead k u t) (THead k0 +(lift h d t0) (lift h (s k0 d) t1)) H2) in ((let H4 \def (f_equal T T +(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) +\Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t2 _) \Rightarrow t2])) +(THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) H2) 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 u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) -H3) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e in T return -(\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | -(THead _ t2 _) \Rightarrow t2])) (THead k u t) (THead k0 (lift h d t0) (lift -h (s k0 d) t1)) H3) in ((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 k1 _ _) \Rightarrow k1])) (THead k u t) (THead k0 -(lift h d t0) (lift h (s k0 d) t1)) H3) in (eq_ind K k0 (\lambda (k1: K).((eq -T u (lift h d t0)) \to ((eq T t (lift h (s k0 d) t1)) \to (ex3_2 T T (\lambda -(y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k1 y z)))) (\lambda (y: -T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T t (lift h (s k1 d) z)))))))) (\lambda (H7: (eq T u (lift h d -t0))).(eq_ind T (lift h d t0) (\lambda (t2: T).((eq T t (lift h (s k0 d) t1)) -\to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead -k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d y)))) (\lambda -(_: T).(\lambda (z: T).(eq T t (lift h (s k0 d) z))))))) (\lambda (H8: (eq T -t (lift h (s k0 d) t1))).(eq_ind T (lift h (s k0 d) t1) (\lambda (t2: -T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead -k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d -y)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h (s k0 d) z)))))) -(ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) -(THead k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h -d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s k0 d) t1) (lift h (s -k0 d) z)))) t0 t1 (refl_equal T (THead k0 t0 t1)) (refl_equal T (lift h d -t0)) (refl_equal T (lift h (s k0 d) t1))) t (sym_eq T t (lift h (s k0 d) t1) -H8))) u (sym_eq T u (lift h d t0) H7))) k (sym_eq K k k0 H6))) H5)) H4)))]) -in (H3 (refl_equal T (THead k0 (lift h d t0) (lift h (s k0 d) -t1)))))))))))))) x)))). +H2) in (\lambda (H6: (eq T u (lift h d t0))).(\lambda (H7: (eq K k k0)).(let +H8 \def (eq_ind_r K k0 (\lambda (k1: K).(eq T t (lift h (s k1 d) t1))) H5 k +H7) in (eq_ind K k (\lambda (k1: K).(ex3_2 T T (\lambda (y: T).(\lambda (z: +T).(eq T (THead k1 t0 t1) (THead k y z)))) (\lambda (y: T).(\lambda (_: +T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s +k d) z)))))) (let H9 \def (eq_ind T t (\lambda (t2: T).(\forall (h0: +nat).(\forall (d0: nat).((eq T (THead k u t2) (lift h0 d0 t1)) \to (ex3_2 T T +(\lambda (y: T).(\lambda (z: T).(eq T t1 (THead k y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T u (lift h0 d0 y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t2 (lift h0 (s k d0) z))))))))) H0 (lift h (s k d) t1) H8) in (let +H10 \def (eq_ind T t (\lambda (t2: T).(\forall (h0: nat).(\forall (d0: +nat).((eq T (THead k u t2) (lift h0 d0 t0)) \to (ex3_2 T T (\lambda (y: +T).(\lambda (z: T).(eq T t0 (THead k y z)))) (\lambda (y: T).(\lambda (_: +T).(eq T u (lift h0 d0 y)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift +h0 (s k d0) z))))))))) H (lift h (s k d) t1) H8) in (eq_ind_r T (lift h (s k +d) t1) (\lambda (t2: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T +(THead k t0 t1) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u +(lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift h (s k d) +z)))))) (let H11 \def (eq_ind T u (\lambda (t2: T).(\forall (h0: +nat).(\forall (d0: nat).((eq T (THead k t2 (lift h (s k d) t1)) (lift h0 d0 +t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead k y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h0 d0 y)))) (\lambda (_: +T).(\lambda (z: T).(eq T (lift h (s k d) t1) (lift h0 (s k d0) z))))))))) H10 +(lift h d t0) H6) in (let H12 \def (eq_ind T u (\lambda (t2: T).(\forall (h0: +nat).(\forall (d0: nat).((eq T (THead k t2 (lift h (s k d) t1)) (lift h0 d0 +t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead k y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h0 d0 y)))) (\lambda (_: +T).(\lambda (z: T).(eq T (lift h (s k d) t1) (lift h0 (s k d0) z))))))))) H9 +(lift h d t0) H6) in (eq_ind_r T (lift h d t0) (\lambda (t2: T).(ex3_2 T T +(\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead k y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T (lift h (s k d) t1) (lift h (s k d) z)))))) +(ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead +k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) +(\lambda (_: T).(\lambda (z: T).(eq T (lift h (s k d) t1) (lift h (s k d) +z)))) t0 t1 (refl_equal T (THead k t0 t1)) (refl_equal T (lift h d t0)) +(refl_equal T (lift h (s k d) t1))) u H6))) t H8))) k0 H7))))) H4)) +H3))))))))))) x)))). theorem lift_gen_bind: \forall (b: B).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: @@ -441,107 +329,33 @@ T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))))))))) \def - \lambda (b: B).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind -(\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u -t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 -(THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d -y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))))))) -(\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T -(THead (Bind b) u t) (lift h d (TSort n)))).(let H0 \def (match H in eq -return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (lift h d (TSort -n))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead -(Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) -(\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with -[refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u t) (lift h d -(TSort n)))).(let H1 \def (eq_ind T (THead (Bind b) u t) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(lift h d (TSort n)) H0) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda -(z: T).(eq T (TSort n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: -T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S -d) z))))) H1)))]) in (H0 (refl_equal T (lift h d (TSort n))))))))) (\lambda -(n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Bind -b) u t) (lift h d (TLRef n)))).(lt_le_e n d (ex3_2 T T (\lambda (y: -T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: + \lambda (b: B).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Bind b) u t) (lift h d +x))).(let H_x \def (lift_gen_head (Bind b) u t x h d H) in (let H0 \def H_x +in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Bind b) y +z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h (s (Bind b) d) z)))) (ex3_2 T T (\lambda +(y: T).(\lambda (z: T).(eq T x (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T t (lift h (S d) z))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind -T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Bind b) u t) t0)) H -(TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 in eq return -(\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef n)) \to (ex3_2 T -T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) -(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal -\Rightarrow (\lambda (H2: (eq T (THead (Bind b) u t) (TLRef n))).(let H3 \def -(eq_ind T (THead (Bind b) u t) (\lambda (e: T).(match e in T return (\lambda -(_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead _ _ _) \Rightarrow True])) I (TLRef n) H2) in (False_ind (ex3_2 T T -(\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) -(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h (S d) z))))) H3)))]) in (H2 (refl_equal T -(TLRef n)))))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d -(TLRef n)) (\lambda (t0: T).(eq T (THead (Bind b) u t) t0)) H (TLRef (plus n -h)) (lift_lref_ge n h d H0)) in (let H2 \def (match H1 in eq return (\lambda -(t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T -T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) -(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal -\Rightarrow (\lambda (H2: (eq T (THead (Bind b) u t) (TLRef (plus n -h)))).(let H3 \def (eq_ind T (THead (Bind b) u t) (\lambda (e: T).(match e in -T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef (plus n h)) -H2) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) -(THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d -y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))) H3)))]) in -(H2 (refl_equal T (TLRef (plus n h)))))))))))) (\lambda (k: K).(\lambda (t0: -T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u -t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 -(THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d -y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) -z)))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (h: nat).(\forall (d: -nat).((eq T (THead (Bind b) u t) (lift h d t1)) \to (ex3_2 T T (\lambda (y: -T).(\lambda (z: T).(eq T t1 (THead (Bind b) y z)))) (\lambda (y: T).(\lambda -(_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift -h (S d) z)))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T -(THead (Bind b) u t) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T -(lift h d (THead k t0 t1)) (\lambda (t2: T).(eq T (THead (Bind b) u t) t2)) -H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in -(let H3 \def (match H2 in eq return (\lambda (t2: T).(\lambda (_: (eq ? ? -t2)).((eq T t2 (THead k (lift h d t0) (lift h (s k d) t1))) \to (ex3_2 T T -(\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Bind b) y z)))) +T).(eq T t (lift h (S d) z))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda +(H1: (eq T x (THead (Bind b) x0 x1))).(\lambda (H2: (eq T u (lift h d +x0))).(\lambda (H3: (eq T t (lift h (s (Bind b) d) x1))).(eq_ind_r T (THead +(Bind b) x0 x1) (\lambda (t0: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: +T).(eq T t0 (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u +(lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))) +(eq_ind_r T (lift h (s (Bind b) d) x1) (\lambda (t0: T).(ex3_2 T T (\lambda +(y: T).(\lambda (z: T).(eq T (THead (Bind b) x0 x1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal -\Rightarrow (\lambda (H3: (eq T (THead (Bind b) u t) (THead k (lift h d t0) -(lift h (s k d) t1)))).(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 _ _ t2) \Rightarrow t2])) (THead (Bind b) u t) (THead -k (lift h d t0) (lift h (s k d) t1)) H3) in ((let H5 \def (f_equal T T -(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t2 _) \Rightarrow t2])) -(THead (Bind b) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H3) in ((let -H6 \def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) -with [(TSort _) \Rightarrow (Bind b) | (TLRef _) \Rightarrow (Bind b) | -(THead k0 _ _) \Rightarrow k0])) (THead (Bind b) u t) (THead k (lift h d t0) -(lift h (s k d) t1)) H3) in (eq_ind K (Bind b) (\lambda (k0: K).((eq T u -(lift h d t0)) \to ((eq T t (lift h (s k0 d) t1)) \to (ex3_2 T T (\lambda (y: -T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead (Bind b) y z)))) (\lambda -(y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T t (lift h (S d) z)))))))) (\lambda (H7: (eq T u (lift h d -t0))).(eq_ind T (lift h d t0) (\lambda (t2: T).((eq T t (lift h (s (Bind b) -d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Bind b) -t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift -h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))))) -(\lambda (H8: (eq T t (lift h (s (Bind b) d) t1))).(eq_ind T (lift h (s (Bind -b) d) t1) (\lambda (t2: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T -(THead (Bind b) t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: -T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T -t2 (lift h (S d) z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq -T (THead (Bind b) t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: -T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T -(lift h (s (Bind b) d) t1) (lift h (S d) z)))) t0 t1 (refl_equal T (THead -(Bind b) t0 t1)) (refl_equal T (lift h d t0)) (refl_equal T (lift h (S d) -t1))) t (sym_eq T t (lift h (s (Bind b) d) t1) H8))) u (sym_eq T u (lift h d -t0) H7))) k H6)) H5)) H4)))]) in (H3 (refl_equal T (THead k (lift h d t0) -(lift h (s k d) t1)))))))))))))) x)))). +T).(\lambda (z: T).(eq T t0 (lift h (S d) z)))))) (eq_ind_r T (lift h d x0) +(\lambda (t0: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead +(Bind b) x0 x1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T +t0 (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s (Bind b) +d) x1) (lift h (S d) z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: +T).(eq T (THead (Bind b) x0 x1) (THead (Bind b) y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T (lift h d x0) (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T (lift h (s (Bind b) d) x1) (lift h (S d) z)))) x0 x1 +(refl_equal T (THead (Bind b) x0 x1)) (refl_equal T (lift h d x0)) +(refl_equal T (lift h (S d) x1))) u H2) t H3) x H1)))))) H0))))))))). theorem lift_gen_flat: \forall (f: F).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: @@ -550,103 +364,31 @@ T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))))))))) \def - \lambda (f: F).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind -(\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u -t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 -(THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d -y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))))))) (\lambda -(n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Flat -f) u t) (lift h d (TSort n)))).(let H0 \def (match H in eq return (\lambda -(t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (lift h d (TSort n))) \to (ex3_2 -T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Flat f) y z)))) -(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow -(\lambda (H0: (eq T (THead (Flat f) u t) (lift h d (TSort n)))).(let H1 \def -(eq_ind T (THead (Flat f) u t) (\lambda (e: T).(match e in T return (\lambda -(_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead _ _ _) \Rightarrow True])) I (lift h d (TSort n)) H0) in (False_ind -(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Flat f) y -z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h d z))))) H1)))]) in (H0 (refl_equal T -(lift h d (TSort n))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: -nat).(\lambda (H: (eq T (THead (Flat f) u t) (lift h d (TLRef n)))).(lt_le_e -n d (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat -f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda -(_: T).(\lambda (z: T).(eq T t (lift h d z))))) (\lambda (H0: (lt n d)).(let -H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Flat f) -u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 in -eq return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef n)) \to -(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y + \lambda (f: F).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Flat f) u t) (lift h d +x))).(let H_x \def (lift_gen_head (Flat f) u t x h d H) in (let H0 \def H_x +in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow -(\lambda (H2: (eq T (THead (Flat f) u t) (TLRef n))).(let H3 \def (eq_ind T -(THead (Flat f) u t) (\lambda (e: T).(match e in T return (\lambda (_: -T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | -(THead _ _ _) \Rightarrow True])) I (TLRef n) H2) in (False_ind (ex3_2 T T -(\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) -(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h d z))))) H3)))]) in (H2 (refl_equal T -(TLRef n)))))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d -(TLRef n)) (\lambda (t0: T).(eq T (THead (Flat f) u t) t0)) H (TLRef (plus n -h)) (lift_lref_ge n h d H0)) in (let H2 \def (match H1 in eq return (\lambda -(t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T -T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) +T).(\lambda (z: T).(eq T t (lift h (s (Flat f) d) z)))) (ex3_2 T T (\lambda +(y: T).(\lambda (z: T).(eq T x (THead (Flat f) y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h d z))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H1: +(eq T x (THead (Flat f) x0 x1))).(\lambda (H2: (eq T u (lift h d +x0))).(\lambda (H3: (eq T t (lift h (s (Flat f) d) x1))).(eq_ind_r T (THead +(Flat f) x0 x1) (\lambda (t0: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: +T).(eq T t0 (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u +(lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))) +(eq_ind_r T (lift h (s (Flat f) d) x1) (\lambda (t0: T).(ex3_2 T T (\lambda +(y: T).(\lambda (z: T).(eq T (THead (Flat f) x0 x1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow -(\lambda (H2: (eq T (THead (Flat f) u t) (TLRef (plus n h)))).(let H3 \def -(eq_ind T (THead (Flat f) u t) (\lambda (e: T).(match e in T return (\lambda -(_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False -| (THead _ _ _) \Rightarrow True])) I (TLRef (plus n h)) H2) in (False_ind -(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y -z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h d z))))) H3)))]) in (H2 (refl_equal T -(TLRef (plus n h)))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: -((\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d -t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Flat f) -y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: -T).(\lambda (z: T).(eq T t (lift h d z)))))))))).(\lambda (t1: T).(\lambda -(_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h -d t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Flat -f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda -(_: T).(\lambda (z: T).(eq T t (lift h d z)))))))))).(\lambda (h: -nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead (Flat f) u t) (lift h d -(THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda -(t2: T).(eq T (THead (Flat f) u t) t2)) H1 (THead k (lift h d t0) (lift h (s -k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (match H2 in eq return -(\lambda (t2: T).(\lambda (_: (eq ? ? t2)).((eq T t2 (THead k (lift h d t0) -(lift h (s k d) t1))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T -(THead k t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T -u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) -with [refl_equal \Rightarrow (\lambda (H3: (eq T (THead (Flat f) u t) (THead -k (lift h d t0) (lift h (s k d) t1)))).(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 _ _ t2) \Rightarrow t2])) (THead (Flat f) u -t) (THead k (lift h d t0) (lift h (s k d) t1)) H3) in ((let H5 \def (f_equal -T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t2 _) \Rightarrow t2])) -(THead (Flat f) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H3) in ((let -H6 \def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) -with [(TSort _) \Rightarrow (Flat f) | (TLRef _) \Rightarrow (Flat f) | -(THead k0 _ _) \Rightarrow k0])) (THead (Flat f) u t) (THead k (lift h d t0) -(lift h (s k d) t1)) H3) in (eq_ind K (Flat f) (\lambda (k0: K).((eq T u -(lift h d t0)) \to ((eq T t (lift h (s k0 d) t1)) \to (ex3_2 T T (\lambda (y: -T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead (Flat f) y z)))) (\lambda -(y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: -T).(eq T t (lift h d z)))))))) (\lambda (H7: (eq T u (lift h d t0))).(eq_ind -T (lift h d t0) (\lambda (t2: T).((eq T t (lift h (s (Flat f) d) t1)) \to -(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Flat f) t0 t1) -(THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d -y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))))) (\lambda -(H8: (eq T t (lift h (s (Flat f) d) t1))).(eq_ind T (lift h (s (Flat f) d) -t1) (\lambda (t2: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead -(Flat f) t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T -(lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t2 (lift -h d z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead -(Flat f) t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T -(lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h -(s (Flat f) d) t1) (lift h d z)))) t0 t1 (refl_equal T (THead (Flat f) t0 -t1)) (refl_equal T (lift h d t0)) (refl_equal T (lift h d t1))) t (sym_eq T t -(lift h (s (Flat f) d) t1) H8))) u (sym_eq T u (lift h d t0) H7))) k H6)) -H5)) H4)))]) in (H3 (refl_equal T (THead k (lift h d t0) (lift h (s k d) -t1)))))))))))))) x)))). +T).(\lambda (z: T).(eq T t0 (lift h d z)))))) (eq_ind_r T (lift h d x0) +(\lambda (t0: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead +(Flat f) x0 x1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T +t0 (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s (Flat f) +d) x1) (lift h d z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq +T (THead (Flat f) x0 x1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: +T).(eq T (lift h d x0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T +(lift h (s (Flat f) d) x1) (lift h d z)))) x0 x1 (refl_equal T (THead (Flat +f) x0 x1)) (refl_equal T (lift h d x0)) (refl_equal T (lift h d x1))) u H2) t +H3) x H1)))))) H0))))))))). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/lift/tlt.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/lift/tlt.ma index b80753879..4e088a122 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/lift/tlt.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/lift/tlt.ma @@ -269,17 +269,9 @@ O t)))))) \def \lambda (w: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (f: ((nat \to nat))).(lift_weight_add (plus (wadd f w O) O) t h O f (wadd f w) (\lambda (m: -nat).(\lambda (H: (lt m O)).(let H0 \def (match H in le return (\lambda (n: -nat).(\lambda (_: (le ? n)).((eq nat n O) \to (eq nat (wadd f w m) (f m))))) -with [le_n \Rightarrow (\lambda (H0: (eq nat (S m) O)).(let H1 \def (eq_ind -nat (S m) (\lambda (e: nat).(match e in nat return (\lambda (_: nat).Prop) -with [O \Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind -(eq nat (wadd f w m) (f m)) H1))) | (le_S m0 H0) \Rightarrow (\lambda (H1: -(eq nat (S m0) O)).((let H2 \def (eq_ind nat (S m0) (\lambda (e: nat).(match -e in nat return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) -\Rightarrow True])) I O H1) in (False_ind ((le (S m) m0) \to (eq nat (wadd f -w m) (f m))) H2)) H0))]) in (H0 (refl_equal nat O))))) (plus_n_O (wadd f w -O)) (\lambda (m: nat).(\lambda (_: (le O m)).(refl_equal nat (f m)))))))). +nat).(\lambda (H: (lt m O)).(lt_x_O m H (eq nat (wadd f w m) (f m))))) +(plus_n_O (wadd f w O)) (\lambda (m: nat).(\lambda (_: (le O m)).(refl_equal +nat (f m)))))))). theorem lift_tlt_dx: \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/nf2/lift1.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/nf2/lift1.ma index 5a9920471..240c48d0e 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/nf2/lift1.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/nf2/lift1.ma @@ -16,7 +16,7 @@ include "LambdaDelta-1/nf2/props.ma". -include "LambdaDelta-1/drop1/defs.ma". +include "LambdaDelta-1/drop1/fwd.ma". theorem nf2_lift1: \forall (e: C).(\forall (hds: PList).(\forall (c: C).(\forall (t: T).((drop1 @@ -25,58 +25,14 @@ hds c e) \to ((nf2 e t) \to (nf2 c (lift1 hds t))))))) \lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c: C).(\forall (t: T).((drop1 p c e) \to ((nf2 e t) \to (nf2 c (lift1 p t))))))) (\lambda (c: C).(\lambda (t: T).(\lambda (H: (drop1 PNil c -e)).(\lambda (H0: (nf2 e t)).(let H1 \def (match H in drop1 return (\lambda -(p: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p c0 -c1)).((eq PList p PNil) \to ((eq C c0 c) \to ((eq C c1 e) \to (nf2 c -t)))))))) with [(drop1_nil c0) \Rightarrow (\lambda (_: (eq PList PNil -PNil)).(\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq C c0 e)).(eq_ind C c -(\lambda (c1: C).((eq C c1 e) \to (nf2 c t))) (\lambda (H4: (eq C c -e)).(eq_ind C e (\lambda (c1: C).(nf2 c1 t)) H0 c (sym_eq C c e H4))) c0 -(sym_eq C c0 c H2) H3)))) | (drop1_cons c1 c2 h d H1 c3 hds0 H2) \Rightarrow -(\lambda (H3: (eq PList (PCons h d hds0) PNil)).(\lambda (H4: (eq C c1 -c)).(\lambda (H5: (eq C c3 e)).((let H6 \def (eq_ind PList (PCons h d hds0) -(\lambda (e0: PList).(match e0 in PList return (\lambda (_: PList).Prop) with -[PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in -(False_ind ((eq C c1 c) \to ((eq C c3 e) \to ((drop h d c1 c2) \to ((drop1 -hds0 c2 c3) \to (nf2 c t))))) H6)) H4 H5 H1 H2))))]) in (H1 (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 (t: -T).((drop1 p c e) \to ((nf2 e t) \to (nf2 c (lift1 p t)))))))).(\lambda (c: -C).(\lambda (t: T).(\lambda (H0: (drop1 (PCons n n0 p) c e)).(\lambda (H1: -(nf2 e t)).(let H2 \def (match H0 in drop1 return (\lambda (p0: -PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p0 c0 c1)).((eq -PList p0 (PCons n n0 p)) \to ((eq C c0 c) \to ((eq C c1 e) \to (nf2 c (lift n -n0 (lift1 p t)))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (H2: (eq -PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq C c0 -e)).((let H5 \def (eq_ind PList PNil (\lambda (e0: PList).(match e0 in PList -return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) -\Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c0 c) \to ((eq -C c0 e) \to (nf2 c (lift n n0 (lift1 p t))))) H5)) H3 H4)))) | (drop1_cons c1 -c2 h d H2 c3 hds0 H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds0) -(PCons n n0 p))).(\lambda (H5: (eq C c1 c)).(\lambda (H6: (eq C c3 e)).((let -H7 \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) H4) in ((let H8 \def -(f_equal PList nat (\lambda (e0: PList).(match e0 in PList return (\lambda -(_: PList).nat) with [PNil \Rightarrow d | (PCons _ n1 _) \Rightarrow n1])) -(PCons h d hds0) (PCons n n0 p) H4) in ((let H9 \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) H4) 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 (nf2 c (lift n n0 (lift1 p t)))))))))) (\lambda -(H10: (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 (nf2 c (lift n n0 (lift1 p t))))))))) (\lambda (H11: (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 (nf2 c (lift n n0 (lift1 p -t)))))))) (\lambda (H12: (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 (nf2 c (lift n n0 (lift1 p -t))))))) (\lambda (H13: (eq C c3 e)).(eq_ind C e (\lambda (c0: C).((drop n n0 -c c2) \to ((drop1 p c2 c0) \to (nf2 c (lift n n0 (lift1 p t)))))) (\lambda -(H14: (drop n n0 c c2)).(\lambda (H15: (drop1 p c2 e)).(nf2_lift c2 (lift1 p -t) (H c2 t H15 H1) c n n0 H14))) c3 (sym_eq C c3 e H13))) c1 (sym_eq C c1 c -H12))) hds0 (sym_eq PList hds0 p H11))) d (sym_eq nat d n0 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)). +e)).(\lambda (H0: (nf2 e t)).(let H_y \def (drop1_gen_pnil c e H) in +(eq_ind_r C e (\lambda (c0: C).(nf2 c0 t)) H0 c H_y)))))) (\lambda (n: +nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: +C).(\forall (t: T).((drop1 p c e) \to ((nf2 e t) \to (nf2 c (lift1 p +t)))))))).(\lambda (c: C).(\lambda (t: T).(\lambda (H0: (drop1 (PCons n n0 p) +c e)).(\lambda (H1: (nf2 e t)).(let H_x \def (drop1_gen_pcons c e p n n0 H0) +in (let H2 \def H_x in (ex2_ind C (\lambda (c2: C).(drop n n0 c c2)) (\lambda +(c2: C).(drop1 p c2 e)) (nf2 c (lift n n0 (lift1 p t))) (\lambda (x: +C).(\lambda (H3: (drop n n0 c x)).(\lambda (H4: (drop1 p x e)).(nf2_lift x +(lift1 p t) (H x t H4 H1) c n n0 H3)))) H2))))))))))) hds)). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/sc3/props.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/sc3/props.ma index b77d40402..e30101bac 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/sc3/props.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/sc3/props.ma @@ -174,60 +174,16 @@ PList).(\forall (c: C).(\forall (t: T).((sc3 g a e t) \to ((drop1 hds c e) PList).(PList_ind (\lambda (p: PList).(\forall (c: C).(\forall (t: T).((sc3 g a e t) \to ((drop1 p c e) \to (sc3 g a c (lift1 p t))))))) (\lambda (c: C).(\lambda (t: T).(\lambda (H: (sc3 g a e t)).(\lambda (H0: (drop1 PNil c -e)).(let H1 \def (match H0 in drop1 return (\lambda (p: PList).(\lambda (c0: -C).(\lambda (c1: C).(\lambda (_: (drop1 p c0 c1)).((eq PList p PNil) \to ((eq -C c0 c) \to ((eq C c1 e) \to (sc3 g a c t)))))))) with [(drop1_nil c0) -\Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c0 -c)).(\lambda (H3: (eq C c0 e)).(eq_ind C c (\lambda (c1: C).((eq C c1 e) \to -(sc3 g a c t))) (\lambda (H4: (eq C c e)).(eq_ind C e (\lambda (c1: C).(sc3 g -a c1 t)) H c (sym_eq C c e H4))) c0 (sym_eq C c0 c H2) H3)))) | (drop1_cons -c1 c2 h d H1 c3 hds0 H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds0) -PNil)).(\lambda (H4: (eq C c1 c)).(\lambda (H5: (eq C c3 e)).((let H6 \def -(eq_ind PList (PCons h d hds0) (\lambda (e0: PList).(match e0 in PList return -(\lambda (_: PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) -\Rightarrow True])) I PNil H3) in (False_ind ((eq C c1 c) \to ((eq C c3 e) -\to ((drop h d c1 c2) \to ((drop1 hds0 c2 c3) \to (sc3 g a c t))))) H6)) H4 -H5 H1 H2))))]) in (H1 (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 (t: T).((sc3 g a e t) \to ((drop1 p c e) \to -(sc3 g a c (lift1 p t)))))))).(\lambda (c: C).(\lambda (t: T).(\lambda (H0: -(sc3 g a e t)).(\lambda (H1: (drop1 (PCons n n0 p) c e)).(let H2 \def (match -H1 in drop1 return (\lambda (p0: PList).(\lambda (c0: C).(\lambda (c1: -C).(\lambda (_: (drop1 p0 c0 c1)).((eq PList p0 (PCons n n0 p)) \to ((eq C c0 -c) \to ((eq C c1 e) \to (sc3 g a c (lift n n0 (lift1 p t)))))))))) with -[(drop1_nil c0) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 -p))).(\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq C c0 e)).((let H5 \def -(eq_ind PList PNil (\lambda (e0: PList).(match e0 in PList return (\lambda -(_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow -False])) I (PCons n n0 p) H2) in (False_ind ((eq C c0 c) \to ((eq C c0 e) \to -(sc3 g a c (lift n n0 (lift1 p t))))) H5)) H3 H4)))) | (drop1_cons c1 c2 h d -H2 c3 hds0 H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds0) (PCons n -n0 p))).(\lambda (H5: (eq C c1 c)).(\lambda (H6: (eq C c3 e)).((let H7 \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) H4) in ((let H8 \def (f_equal PList nat -(\lambda (e0: PList).(match e0 in PList return (\lambda (_: PList).nat) with -[PNil \Rightarrow d | (PCons _ n1 _) \Rightarrow n1])) (PCons h d hds0) -(PCons n n0 p) H4) in ((let H9 \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) H4) 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 (sc3 g a c (lift n n0 (lift1 p t)))))))))) (\lambda (H10: (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 (sc3 g a -c (lift n n0 (lift1 p t))))))))) (\lambda (H11: (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 (sc3 g a c (lift n n0 (lift1 p t)))))))) -(\lambda (H12: (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 (sc3 g a c (lift n n0 (lift1 p -t))))))) (\lambda (H13: (eq C c3 e)).(eq_ind C e (\lambda (c0: C).((drop n n0 -c c2) \to ((drop1 p c2 c0) \to (sc3 g a c (lift n n0 (lift1 p t)))))) -(\lambda (H14: (drop n n0 c c2)).(\lambda (H15: (drop1 p c2 e)).(sc3_lift g a -c2 (lift1 p t) (H c2 t H0 H15) c n n0 H14))) c3 (sym_eq C c3 e H13))) c1 -(sym_eq C c1 c H12))) hds0 (sym_eq PList hds0 p H11))) d (sym_eq nat d n0 -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)))). +e)).(let H_y \def (drop1_gen_pnil c e H0) in (eq_ind_r C e (\lambda (c0: +C).(sc3 g a c0 t)) H c H_y)))))) (\lambda (n: nat).(\lambda (n0: +nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: C).(\forall (t: T).((sc3 +g a e t) \to ((drop1 p c e) \to (sc3 g a c (lift1 p t)))))))).(\lambda (c: +C).(\lambda (t: T).(\lambda (H0: (sc3 g a e t)).(\lambda (H1: (drop1 (PCons n +n0 p) c e)).(let H_x \def (drop1_gen_pcons c e p n n0 H1) in (let H2 \def H_x +in (ex2_ind C (\lambda (c2: C).(drop n n0 c c2)) (\lambda (c2: C).(drop1 p c2 +e)) (sc3 g a c (lift n n0 (lift1 p t))) (\lambda (x: C).(\lambda (H3: (drop n +n0 c x)).(\lambda (H4: (drop1 p x e)).(sc3_lift g a x (lift1 p t) (H x t H0 +H4) c n n0 H3)))) H2))))))))))) hds)))). theorem sc3_abbr: \forall (g: G).(\forall (a: A).(\forall (vs: TList).(\forall (i: diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/sn3/lift1.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/sn3/lift1.ma index fec70b8f9..a684670ba 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/sn3/lift1.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/sn3/lift1.ma @@ -16,7 +16,7 @@ include "LambdaDelta-1/sn3/props.ma". -include "LambdaDelta-1/drop1/defs.ma". +include "LambdaDelta-1/drop1/fwd.ma". include "LambdaDelta-1/lift1/fwd.ma". @@ -27,62 +27,17 @@ theorem sns3_lifts1: \lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c: C).((drop1 p c e) \to (\forall (ts: TList).((sns3 e ts) \to (sns3 c (lifts1 p ts))))))) (\lambda (c: C).(\lambda (H: (drop1 PNil c e)).(\lambda -(ts: TList).(\lambda (H0: (sns3 e ts)).(let H1 \def (match H in drop1 return -(\lambda (p: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p -c0 c1)).((eq PList p PNil) \to ((eq C c0 c) \to ((eq C c1 e) \to (sns3 c -(lifts1 PNil ts))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (_: (eq -PList PNil PNil)).(\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq C c0 -e)).(eq_ind C c (\lambda (c1: C).((eq C c1 e) \to (sns3 c (lifts1 PNil ts)))) -(\lambda (H4: (eq C c e)).(eq_ind C e (\lambda (c1: C).(sns3 c1 (lifts1 PNil -ts))) (eq_ind_r TList ts (\lambda (t: TList).(sns3 e t)) H0 (lifts1 PNil ts) -(lifts1_nil ts)) c (sym_eq C c e H4))) c0 (sym_eq C c0 c H2) H3)))) | -(drop1_cons c1 c2 h d H1 c3 hds0 H2) \Rightarrow (\lambda (H3: (eq PList -(PCons h d hds0) PNil)).(\lambda (H4: (eq C c1 c)).(\lambda (H5: (eq C c3 -e)).((let H6 \def (eq_ind PList (PCons h d hds0) (\lambda (e0: PList).(match -e0 in PList return (\lambda (_: PList).Prop) with [PNil \Rightarrow False | -(PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c1 c) \to -((eq C c3 e) \to ((drop h d c1 c2) \to ((drop1 hds0 c2 c3) \to (sns3 c -(lifts1 PNil ts)))))) H6)) H4 H5 H1 H2))))]) in (H1 (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).((drop1 p c e) \to -(\forall (ts: TList).((sns3 e ts) \to (sns3 c (lifts1 p ts)))))))).(\lambda -(c: C).(\lambda (H0: (drop1 (PCons n n0 p) c e)).(\lambda (ts: -TList).(\lambda (H1: (sns3 e ts)).(let H2 \def (match H0 in drop1 return -(\lambda (p0: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p0 -c0 c1)).((eq PList p0 (PCons n n0 p)) \to ((eq C c0 c) \to ((eq C c1 e) \to -(sns3 c (lifts1 (PCons n n0 p) ts))))))))) with [(drop1_nil c0) \Rightarrow -(\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c0 -c)).(\lambda (H4: (eq C c0 e)).((let H5 \def (eq_ind PList PNil (\lambda (e0: -PList).(match e0 in PList return (\lambda (_: PList).Prop) with [PNil -\Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in -(False_ind ((eq C c0 c) \to ((eq C c0 e) \to (sns3 c (lifts1 (PCons n n0 p) -ts)))) H5)) H3 H4)))) | (drop1_cons c1 c2 h d H2 c3 hds0 H3) \Rightarrow -(\lambda (H4: (eq PList (PCons h d hds0) (PCons n n0 p))).(\lambda (H5: (eq C -c1 c)).(\lambda (H6: (eq C c3 e)).((let H7 \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) H4) in ((let H8 \def (f_equal PList nat (\lambda (e0: PList).(match e0 -in PList return (\lambda (_: PList).nat) with [PNil \Rightarrow d | (PCons _ -n1 _) \Rightarrow n1])) (PCons h d hds0) (PCons n n0 p) H4) in ((let H9 \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) H4) 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 (sns3 c (lifts1 (PCons n n0 p) -ts))))))))) (\lambda (H10: (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 (sns3 c (lifts1 (PCons n n0 p) ts)))))))) -(\lambda (H11: (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 (sns3 -c (lifts1 (PCons n n0 p) ts))))))) (\lambda (H12: (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 -(sns3 c (lifts1 (PCons n n0 p) ts)))))) (\lambda (H13: (eq C c3 e)).(eq_ind C -e (\lambda (c0: C).((drop n n0 c c2) \to ((drop1 p c2 c0) \to (sns3 c (lifts1 -(PCons n n0 p) ts))))) (\lambda (H14: (drop n n0 c c2)).(\lambda (H15: (drop1 -p c2 e)).(eq_ind_r TList (lifts n n0 (lifts1 p ts)) (\lambda (t: TList).(sns3 -c t)) (sns3_lifts c c2 n n0 H14 (lifts1 p ts) (H c2 H15 ts H1)) (lifts1 -(PCons n n0 p) ts) (lifts1_cons n n0 p ts)))) c3 (sym_eq C c3 e H13))) c1 -(sym_eq C c1 c H12))) hds0 (sym_eq PList hds0 p H11))) d (sym_eq nat d n0 -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)). +(ts: TList).(\lambda (H0: (sns3 e ts)).(let H_y \def (drop1_gen_pnil c e H) +in (eq_ind_r C e (\lambda (c0: C).(sns3 c0 (lifts1 PNil ts))) (eq_ind_r TList +ts (\lambda (t: TList).(sns3 e t)) H0 (lifts1 PNil ts) (lifts1_nil ts)) c +H_y)))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda +(H: ((\forall (c: C).((drop1 p c e) \to (\forall (ts: TList).((sns3 e ts) \to +(sns3 c (lifts1 p ts)))))))).(\lambda (c: C).(\lambda (H0: (drop1 (PCons n n0 +p) c e)).(\lambda (ts: TList).(\lambda (H1: (sns3 e ts)).(let H_x \def +(drop1_gen_pcons c e p n n0 H0) in (let H2 \def H_x in (ex2_ind C (\lambda +(c2: C).(drop n n0 c c2)) (\lambda (c2: C).(drop1 p c2 e)) (sns3 c (lifts1 +(PCons n n0 p) ts)) (\lambda (x: C).(\lambda (H3: (drop n n0 c x)).(\lambda +(H4: (drop1 p x e)).(eq_ind_r TList (lifts n n0 (lifts1 p ts)) (\lambda (t: +TList).(sns3 c t)) (sns3_lifts c x n n0 H3 (lifts1 p ts) (H x H4 ts H1)) +(lifts1 (PCons n n0 p) ts) (lifts1_cons n n0 p ts))))) H2))))))))))) hds)). diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/spare.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/spare.ma index f40cf08fe..463e2d7a3 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/spare.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/spare.ma @@ -16,19 +16,6 @@ include "LambdaDelta-1/theory.ma". -definition cbk: - C \to nat -\def - let rec cbk (c: C) on c: nat \def (match c with [(CSort m) \Rightarrow m | -(CHead c0 _ _) \Rightarrow (cbk c0)]) in cbk. - -definition app1: - C \to (T \to T) -\def - let rec app1 (c: C) on c: (T \to T) \def (\lambda (t: T).(match c with -[(CSort _) \Rightarrow t | (CHead c0 k u) \Rightarrow (app1 c0 (THead k u -t))])) in app1. - theorem lifts_inj: \forall (xs: TList).(\forall (ts: TList).(\forall (h: nat).(\forall (d: nat).((eq TList (lifts h d xs) (lifts h d ts)) \to (eq TList xs ts))))) @@ -455,88 +442,3 @@ j O)).(\lambda (_: (eq T x (TLRef j))).(lt_x_O j H6 (lt i j)))) H5)) (\lambda (le (plus O (S i)) j)).(\lambda (_: (eq T x (TLRef (minus j (S i))))).H6)) H5)) H4))))) H2))))))))). -theorem ty3_shift1: - \forall (g: G).(\forall (c: C).((wf3 g c c) \to (\forall (t1: T).(\forall -(t2: T).((ty3 g c t1 t2) \to (ty3 g (CSort (cbk c)) (app1 c t1) (app1 c -t2))))))) -\def - \lambda (g: G).(\lambda (c: C).(\lambda (H: (wf3 g c c)).(insert_eq C c -(\lambda (c0: C).(wf3 g c0 c)) (\lambda (c0: C).(\forall (t1: T).(\forall -(t2: T).((ty3 g c0 t1 t2) \to (ty3 g (CSort (cbk c0)) (app1 c0 t1) (app1 c0 -t2)))))) (\lambda (y: C).(\lambda (H0: (wf3 g y c)).(wf3_ind g (\lambda (c0: -C).(\lambda (c1: C).((eq C c0 c1) \to (\forall (t1: T).(\forall (t2: T).((ty3 -g c0 t1 t2) \to (ty3 g (CSort (cbk c0)) (app1 c0 t1) (app1 c0 t2)))))))) -(\lambda (m: nat).(\lambda (_: (eq C (CSort m) (CSort m))).(\lambda (t1: -T).(\lambda (t2: T).(\lambda (H2: (ty3 g (CSort m) t1 t2)).H2))))) (\lambda -(c1: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C -c1 c2) \to (\forall (t1: T).(\forall (t2: T).((ty3 g c1 t1 t2) \to (ty3 g -(CSort (cbk c1)) (app1 c1 t1) (app1 c1 t2)))))))).(\lambda (u: T).(\lambda -(t: T).(\lambda (H3: (ty3 g c1 u t)).(\lambda (b: B).(\lambda (H4: (eq C -(CHead c1 (Bind b) u) (CHead c2 (Bind b) u))).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (H5: (ty3 g (CHead c1 (Bind b) u) t1 t2)).(let H6 \def (f_equal C -C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) -\Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 (Bind b) u) -(CHead c2 (Bind b) u) H4) in (let H7 \def (eq_ind_r C c2 (\lambda (c0: -C).((eq C c1 c0) \to (\forall (t3: T).(\forall (t4: T).((ty3 g c1 t3 t4) \to -(ty3 g (CSort (cbk c1)) (app1 c1 t3) (app1 c1 t4))))))) H2 c1 H6) in (let H8 -\def (eq_ind_r C c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 c1 H6) in (ex_ind T -(\lambda (t0: T).(ty3 g (CHead c1 (Bind b) u) t2 t0)) (ty3 g (CSort (cbk c1)) -(app1 c1 (THead (Bind b) u t1)) (app1 c1 (THead (Bind b) u t2))) (\lambda (x: -T).(\lambda (_: (ty3 g (CHead c1 (Bind b) u) t2 x)).(H7 (refl_equal C c1) -(THead (Bind b) u t1) (THead (Bind b) u t2) (ty3_bind g c1 u t H3 b t1 t2 -H5)))) (ty3_correct g (CHead c1 (Bind b) u) t1 t2 H5))))))))))))))))) -(\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: -(((eq C c1 c2) \to (\forall (t1: T).(\forall (t2: T).((ty3 g c1 t1 t2) \to -(ty3 g (CSort (cbk c1)) (app1 c1 t1) (app1 c1 t2)))))))).(\lambda (u: -T).(\lambda (H3: ((\forall (t: T).((ty3 g c1 u t) \to False)))).(\lambda (b: -B).(\lambda (H4: (eq C (CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort -O)))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H5: (ty3 g (CHead c1 (Bind -b) u) t1 t2)).(let H6 \def (f_equal C C (\lambda (e: C).(match e in C return -(\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c0 _ _) -\Rightarrow c0])) (CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)) 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 b0) \Rightarrow b0 | (Flat _) -\Rightarrow b])])) (CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)) 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 c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)) H4) in (\lambda (H9: -(eq B b Void)).(\lambda (H10: (eq C c1 c2)).(let H11 \def (eq_ind B b -(\lambda (b0: B).(ty3 g (CHead c1 (Bind b0) u) t1 t2)) H5 Void H9) in -(eq_ind_r B Void (\lambda (b0: B).(ty3 g (CSort (cbk (CHead c1 (Bind b0) u))) -(app1 (CHead c1 (Bind b0) u) t1) (app1 (CHead c1 (Bind b0) u) t2))) (let H12 -\def (eq_ind T u (\lambda (t: T).(ty3 g (CHead c1 (Bind Void) t) t1 t2)) H11 -(TSort O) H8) in (let H13 \def (eq_ind T u (\lambda (t: T).(\forall (t0: -T).((ty3 g c1 t t0) \to False))) H3 (TSort O) H8) in (eq_ind_r T (TSort O) -(\lambda (t: T).(ty3 g (CSort (cbk (CHead c1 (Bind Void) t))) (app1 (CHead c1 -(Bind Void) t) t1) (app1 (CHead c1 (Bind Void) t) t2))) (let H14 \def -(eq_ind_r C c2 (\lambda (c0: C).((eq C c1 c0) \to (\forall (t3: T).(\forall -(t4: T).((ty3 g c1 t3 t4) \to (ty3 g (CSort (cbk c1)) (app1 c1 t3) (app1 c1 -t4))))))) H2 c1 H10) in (let H15 \def (eq_ind_r C c2 (\lambda (c0: C).(wf3 g -c1 c0)) H1 c1 H10) in (ex_ind T (\lambda (t: T).(ty3 g (CHead c1 (Bind Void) -(TSort O)) t2 t)) (ty3 g (CSort (cbk c1)) (app1 c1 (THead (Bind Void) (TSort -O) t1)) (app1 c1 (THead (Bind Void) (TSort O) t2))) (\lambda (x: T).(\lambda -(_: (ty3 g (CHead c1 (Bind Void) (TSort O)) t2 x)).(H14 (refl_equal C c1) -(THead (Bind Void) (TSort O) t1) (THead (Bind Void) (TSort O) t2) (ty3_bind g -c1 (TSort O) (TSort (next g O)) (ty3_sort g c1 O) Void t1 t2 H12)))) -(ty3_correct g (CHead c1 (Bind Void) (TSort O)) t1 t2 H12)))) u H8))) b -H9))))) H7)) H6))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: -(wf3 g c1 c2)).(\lambda (H2: (((eq C c1 c2) \to (\forall (t1: T).(\forall -(t2: T).((ty3 g c1 t1 t2) \to (ty3 g (CSort (cbk c1)) (app1 c1 t1) (app1 c1 -t2)))))))).(\lambda (u: T).(\lambda (f: F).(\lambda (H3: (eq C (CHead c1 -(Flat f) u) c2)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead -c1 (Flat f) u) t1 t2)).(let H5 \def (f_equal C C (\lambda (e: C).e) (CHead c1 -(Flat f) u) c2 H3) in (let H6 \def (eq_ind_r C c2 (\lambda (c0: C).((eq C c1 -c0) \to (\forall (t3: T).(\forall (t4: T).((ty3 g c1 t3 t4) \to (ty3 g (CSort -(cbk c1)) (app1 c1 t3) (app1 c1 t4))))))) H2 (CHead c1 (Flat f) u) H5) in -(let H7 \def (eq_ind_r C c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 (CHead c1 -(Flat f) u) H5) in (let H_x \def (wf3_gen_head2 g c1 c1 u (Flat f) H7) in -(let H8 \def H_x in (ex_ind B (\lambda (b: B).(eq K (Flat f) (Bind b))) (ty3 -g (CSort (cbk c1)) (app1 c1 (THead (Flat f) u t1)) (app1 c1 (THead (Flat f) u -t2))) (\lambda (x: B).(\lambda (H9: (eq K (Flat f) (Bind x))).(let H10 \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 x) H9) in (False_ind (ty3 g (CSort (cbk c1)) (app1 c1 (THead (Flat f) u -t1)) (app1 c1 (THead (Flat f) u t2))) H10)))) H8)))))))))))))))) y c H0))) -H))). - diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/props.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/props.ma index 0e492dff8..8fb22a1dc 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/props.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/wf3/props.ma @@ -16,6 +16,8 @@ include "LambdaDelta-1/wf3/ty3.ma". +include "LambdaDelta-1/app/defs.ma". + theorem wf3_mono: \forall (g: G).(\forall (c: C).(\forall (c1: C).((wf3 g c c1) \to (\forall (c2: C).((wf3 g c c2) \to (eq C c1 c2)))))) @@ -116,6 +118,91 @@ False)))).(ex_intro C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) (f: F).(ex_intro C (\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) x (wf3_flat g c x H1 t f))) k))) H0)))))) c1)). +theorem ty3_shift1: + \forall (g: G).(\forall (c: C).((wf3 g c c) \to (\forall (t1: T).(\forall +(t2: T).((ty3 g c t1 t2) \to (ty3 g (CSort (cbk c)) (app1 c t1) (app1 c +t2))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (H: (wf3 g c c)).(insert_eq C c +(\lambda (c0: C).(wf3 g c0 c)) (\lambda (c0: C).(\forall (t1: T).(\forall +(t2: T).((ty3 g c0 t1 t2) \to (ty3 g (CSort (cbk c0)) (app1 c0 t1) (app1 c0 +t2)))))) (\lambda (y: C).(\lambda (H0: (wf3 g y c)).(wf3_ind g (\lambda (c0: +C).(\lambda (c1: C).((eq C c0 c1) \to (\forall (t1: T).(\forall (t2: T).((ty3 +g c0 t1 t2) \to (ty3 g (CSort (cbk c0)) (app1 c0 t1) (app1 c0 t2)))))))) +(\lambda (m: nat).(\lambda (_: (eq C (CSort m) (CSort m))).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (H2: (ty3 g (CSort m) t1 t2)).H2))))) (\lambda +(c1: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C +c1 c2) \to (\forall (t1: T).(\forall (t2: T).((ty3 g c1 t1 t2) \to (ty3 g +(CSort (cbk c1)) (app1 c1 t1) (app1 c1 t2)))))))).(\lambda (u: T).(\lambda +(t: T).(\lambda (H3: (ty3 g c1 u t)).(\lambda (b: B).(\lambda (H4: (eq C +(CHead c1 (Bind b) u) (CHead c2 (Bind b) u))).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (H5: (ty3 g (CHead c1 (Bind b) u) t1 t2)).(let H6 \def (f_equal C +C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 (Bind b) u) +(CHead c2 (Bind b) u) H4) in (let H7 \def (eq_ind_r C c2 (\lambda (c0: +C).((eq C c1 c0) \to (\forall (t3: T).(\forall (t4: T).((ty3 g c1 t3 t4) \to +(ty3 g (CSort (cbk c1)) (app1 c1 t3) (app1 c1 t4))))))) H2 c1 H6) in (let H8 +\def (eq_ind_r C c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 c1 H6) in (ex_ind T +(\lambda (t0: T).(ty3 g (CHead c1 (Bind b) u) t2 t0)) (ty3 g (CSort (cbk c1)) +(app1 c1 (THead (Bind b) u t1)) (app1 c1 (THead (Bind b) u t2))) (\lambda (x: +T).(\lambda (_: (ty3 g (CHead c1 (Bind b) u) t2 x)).(H7 (refl_equal C c1) +(THead (Bind b) u t1) (THead (Bind b) u t2) (ty3_bind g c1 u t H3 b t1 t2 +H5)))) (ty3_correct g (CHead c1 (Bind b) u) t1 t2 H5))))))))))))))))) +(\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: +(((eq C c1 c2) \to (\forall (t1: T).(\forall (t2: T).((ty3 g c1 t1 t2) \to +(ty3 g (CSort (cbk c1)) (app1 c1 t1) (app1 c1 t2)))))))).(\lambda (u: +T).(\lambda (H3: ((\forall (t: T).((ty3 g c1 u t) \to False)))).(\lambda (b: +B).(\lambda (H4: (eq C (CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort +O)))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H5: (ty3 g (CHead c1 (Bind +b) u) t1 t2)).(let H6 \def (f_equal C C (\lambda (e: C).(match e in C return +(\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c0 _ _) +\Rightarrow c0])) (CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)) 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 b0) \Rightarrow b0 | (Flat _) +\Rightarrow b])])) (CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)) 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 c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)) H4) in (\lambda (H9: +(eq B b Void)).(\lambda (H10: (eq C c1 c2)).(let H11 \def (eq_ind B b +(\lambda (b0: B).(ty3 g (CHead c1 (Bind b0) u) t1 t2)) H5 Void H9) in +(eq_ind_r B Void (\lambda (b0: B).(ty3 g (CSort (cbk (CHead c1 (Bind b0) u))) +(app1 (CHead c1 (Bind b0) u) t1) (app1 (CHead c1 (Bind b0) u) t2))) (let H12 +\def (eq_ind T u (\lambda (t: T).(ty3 g (CHead c1 (Bind Void) t) t1 t2)) H11 +(TSort O) H8) in (let H13 \def (eq_ind T u (\lambda (t: T).(\forall (t0: +T).((ty3 g c1 t t0) \to False))) H3 (TSort O) H8) in (eq_ind_r T (TSort O) +(\lambda (t: T).(ty3 g (CSort (cbk (CHead c1 (Bind Void) t))) (app1 (CHead c1 +(Bind Void) t) t1) (app1 (CHead c1 (Bind Void) t) t2))) (let H14 \def +(eq_ind_r C c2 (\lambda (c0: C).((eq C c1 c0) \to (\forall (t3: T).(\forall +(t4: T).((ty3 g c1 t3 t4) \to (ty3 g (CSort (cbk c1)) (app1 c1 t3) (app1 c1 +t4))))))) H2 c1 H10) in (let H15 \def (eq_ind_r C c2 (\lambda (c0: C).(wf3 g +c1 c0)) H1 c1 H10) in (ex_ind T (\lambda (t: T).(ty3 g (CHead c1 (Bind Void) +(TSort O)) t2 t)) (ty3 g (CSort (cbk c1)) (app1 c1 (THead (Bind Void) (TSort +O) t1)) (app1 c1 (THead (Bind Void) (TSort O) t2))) (\lambda (x: T).(\lambda +(_: (ty3 g (CHead c1 (Bind Void) (TSort O)) t2 x)).(H14 (refl_equal C c1) +(THead (Bind Void) (TSort O) t1) (THead (Bind Void) (TSort O) t2) (ty3_bind g +c1 (TSort O) (TSort (next g O)) (ty3_sort g c1 O) Void t1 t2 H12)))) +(ty3_correct g (CHead c1 (Bind Void) (TSort O)) t1 t2 H12)))) u H8))) b +H9))))) H7)) H6))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: +(wf3 g c1 c2)).(\lambda (H2: (((eq C c1 c2) \to (\forall (t1: T).(\forall +(t2: T).((ty3 g c1 t1 t2) \to (ty3 g (CSort (cbk c1)) (app1 c1 t1) (app1 c1 +t2)))))))).(\lambda (u: T).(\lambda (f: F).(\lambda (H3: (eq C (CHead c1 +(Flat f) u) c2)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead +c1 (Flat f) u) t1 t2)).(let H5 \def (f_equal C C (\lambda (e: C).e) (CHead c1 +(Flat f) u) c2 H3) in (let H6 \def (eq_ind_r C c2 (\lambda (c0: C).((eq C c1 +c0) \to (\forall (t3: T).(\forall (t4: T).((ty3 g c1 t3 t4) \to (ty3 g (CSort +(cbk c1)) (app1 c1 t3) (app1 c1 t4))))))) H2 (CHead c1 (Flat f) u) H5) in +(let H7 \def (eq_ind_r C c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 (CHead c1 +(Flat f) u) H5) in (let H_x \def (wf3_gen_head2 g c1 c1 u (Flat f) H7) in +(let H8 \def H_x in (ex_ind B (\lambda (b: B).(eq K (Flat f) (Bind b))) (ty3 +g (CSort (cbk c1)) (app1 c1 (THead (Flat f) u t1)) (app1 c1 (THead (Flat f) u +t2))) (\lambda (x: B).(\lambda (H9: (eq K (Flat f) (Bind x))).(let H10 \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 x) H9) in (False_ind (ty3 g (CSort (cbk c1)) (app1 c1 (THead (Flat f) u +t1)) (app1 c1 (THead (Flat f) u t2))) H10)))) H8)))))))))))))))) y c H0))) +H))). + theorem wf3_idem: \forall (g: G).(\forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (wf3 g c2 c2))))