From: Ferruccio Guidi Date: Thu, 7 Sep 2006 18:01:42 +0000 (+0000) Subject: ok up to tau0 X-Git-Tag: 0.4.95@7852~1065 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=824b55e90d08dac757eca02bd46a6effab1e0302;p=helm.git ok up to tau0 --- diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/preamble.ma b/matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/preamble.ma index 6aea5b76b..0e68a2b79 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/preamble.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/preamble.ma @@ -22,6 +22,11 @@ alias id "land" = "cic:/Coq/Init/Logic/and.ind#xpointer(1/1)". (* FG/CSC: These aliases should disappear: we would like to write something * like: "disambiguate in cic:/Coq/*" *) +alias symbol "plus" = "Coq's natural plus". +alias symbol "leq" = "Coq's natural 'less or equal to'". +alias symbol "neq" = "Coq's not equal to (leibnitz)". +alias symbol "eq" = "Coq's leibnitz's equality". + alias id "bool" = "cic:/Coq/Init/Datatypes/bool.ind#xpointer(1/1)". alias id "conj" = "cic:/Coq/Init/Logic/and.ind#xpointer(1/1/1)". alias id "eq_add_S" = "cic:/Coq/Init/Peano/eq_add_S.con". @@ -117,10 +122,7 @@ alias id "ex_ind" = "cic:/Coq/Init/Logic/ex_ind.con". alias id "plus_Snm_nSm" = "cic:/Coq/Arith/Plus/plus_Snm_nSm.con". alias id "plus_lt_le_compat" = "cic:/Coq/Arith/Plus/plus_lt_le_compat.con". alias id "plus_lt_compat" = "cic:/Coq/Arith/Plus/plus_lt_compat.con". -alias symbol "plus" = "Coq's natural plus". -alias symbol "leq" = "Coq's natural 'less or equal to'". -alias symbol "neq" = "Coq's not equal to (leibnitz)". -alias symbol "eq" = "Coq's leibnitz's equality". +alias id "lt_S_n" = "cic:/Coq/Arith/Lt/lt_S_n.con". theorem f_equal: \forall A,B:Type. \forall f:A \to B. \forall x,y:A. x = y \to f x = f y. diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/clear.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/clear.ma new file mode 100644 index 000000000..23e5560c2 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/clear.ma @@ -0,0 +1,1032 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/clear". + +include "csubst0/fwd.ma". + +include "clear/fwd.ma". + +theorem csubst0_clear_O: + \forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 O v c1 c2) \to +(\forall (c: C).((clear c1 c) \to (clear c2 c)))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: +T).((csubst0 O v c c2) \to (\forall (c0: C).((clear c c0) \to (clear c2 +c0))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (H: +(csubst0 O v (CSort n) c2)).(\lambda (c: C).(\lambda (_: (clear (CSort n) +c)).(csubst0_gen_sort c2 v O n H (clear c2 c)))))))) (\lambda (c: C).(\lambda +(H: ((\forall (c2: C).(\forall (v: T).((csubst0 O v c c2) \to (\forall (c0: +C).((clear c c0) \to (clear c2 c0)))))))).(\lambda (k: K).(\lambda (t: +T).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 O v (CHead c k t) +c2)).(\lambda (c0: C).(\lambda (H1: (clear (CHead c k t) c0)).(or3_ind (ex3_2 +T nat (\lambda (_: T).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (u2: +T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: +nat).(subst0 j v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq +nat O (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k +t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat +(\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j))))) +(\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k +u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t +u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3))))) (clear c2 c0) (\lambda (H2: (ex3_2 T nat (\lambda (_: T).(\lambda (j: +nat).(eq nat O (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead +c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t +u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: nat).(eq nat O (s k +j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda +(u2: T).(\lambda (j: nat).(subst0 j v t u2))) (clear c2 c0) (\lambda (x0: +T).(\lambda (x1: nat).(\lambda (H3: (eq nat O (s k x1))).(\lambda (H4: (eq C +c2 (CHead c k x0))).(\lambda (H5: (subst0 x1 v t x0)).(eq_ind_r C (CHead c k +x0) (\lambda (c3: C).(clear c3 c0)) ((match k in K return (\lambda (k0: +K).((clear (CHead c k0 t) c0) \to ((eq nat O (s k0 x1)) \to (clear (CHead c +k0 x0) c0)))) with [(Bind b) \Rightarrow (\lambda (_: (clear (CHead c (Bind +b) t) c0)).(\lambda (H7: (eq nat O (s (Bind b) x1))).(let H8 \def (eq_ind nat +O (\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow True | (S _) \Rightarrow False])) I (S x1) H7) in (False_ind +(clear (CHead c (Bind b) x0) c0) H8)))) | (Flat f) \Rightarrow (\lambda (H6: +(clear (CHead c (Flat f) t) c0)).(\lambda (H7: (eq nat O (s (Flat f) +x1))).(let H8 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n v t x0)) H5 O +H7) in (clear_flat c c0 (clear_gen_flat f c c0 t H6) f x0))))]) H1 H3) c2 +H4)))))) H2)) (\lambda (H2: (ex3_2 C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat O (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead +c3 k t)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c +c2))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat O (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (clear c2 c0) (\lambda (x0: +C).(\lambda (x1: nat).(\lambda (H3: (eq nat O (s k x1))).(\lambda (H4: (eq C +c2 (CHead x0 k t))).(\lambda (H5: (csubst0 x1 v c x0)).(eq_ind_r C (CHead x0 +k t) (\lambda (c3: C).(clear c3 c0)) ((match k in K return (\lambda (k0: +K).((clear (CHead c k0 t) c0) \to ((eq nat O (s k0 x1)) \to (clear (CHead x0 +k0 t) c0)))) with [(Bind b) \Rightarrow (\lambda (_: (clear (CHead c (Bind b) +t) c0)).(\lambda (H7: (eq nat O (s (Bind b) x1))).(let H8 \def (eq_ind nat O +(\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow True | (S _) \Rightarrow False])) I (S x1) H7) in (False_ind +(clear (CHead x0 (Bind b) t) c0) H8)))) | (Flat f) \Rightarrow (\lambda (H6: +(clear (CHead c (Flat f) t) c0)).(\lambda (H7: (eq nat O (s (Flat f) +x1))).(let H8 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c x0)) H5 +O H7) in (clear_flat x0 c0 (H x0 v H8 c0 (clear_gen_flat f c c0 t H6)) f +t))))]) H1 H3) c2 H4)))))) H2)) (\lambda (H2: (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: +T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c c2)))))).(ex4_3_ind T C +nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j))))) +(\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k +u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t +u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3)))) (clear c2 c0) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: +nat).(\lambda (H3: (eq nat O (s k x2))).(\lambda (H4: (eq C c2 (CHead x1 k +x0))).(\lambda (H5: (subst0 x2 v t x0)).(\lambda (H6: (csubst0 x2 v c +x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c3: C).(clear c3 c0)) ((match k in +K return (\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat O (s k0 +x2)) \to (clear (CHead x1 k0 x0) c0)))) with [(Bind b) \Rightarrow (\lambda +(_: (clear (CHead c (Bind b) t) c0)).(\lambda (H8: (eq nat O (s (Bind b) +x2))).(let H9 \def (eq_ind nat O (\lambda (ee: nat).(match ee in nat return +(\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) +I (S x2) H8) in (False_ind (clear (CHead x1 (Bind b) x0) c0) H9)))) | (Flat +f) \Rightarrow (\lambda (H7: (clear (CHead c (Flat f) t) c0)).(\lambda (H8: +(eq nat O (s (Flat f) x2))).(let H9 \def (eq_ind_r nat x2 (\lambda (n: +nat).(csubst0 n v c x1)) H6 O H8) in (let H10 \def (eq_ind_r nat x2 (\lambda +(n: nat).(subst0 n v t x0)) H5 O H8) in (clear_flat x1 c0 (H x1 v H9 c0 +(clear_gen_flat f c c0 t H7)) f x0)))))]) H1 H3) c2 H4)))))))) H2)) +(csubst0_gen_head k c c2 t v O H0))))))))))) c1). + +theorem csubst0_clear_O_back: + \forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 O v c1 c2) \to +(\forall (c: C).((clear c2 c) \to (clear c1 c)))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: +T).((csubst0 O v c c2) \to (\forall (c0: C).((clear c2 c0) \to (clear c +c0))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (H: +(csubst0 O v (CSort n) c2)).(\lambda (c: C).(\lambda (_: (clear c2 +c)).(csubst0_gen_sort c2 v O n H (clear (CSort n) c)))))))) (\lambda (c: +C).(\lambda (H: ((\forall (c2: C).(\forall (v: T).((csubst0 O v c c2) \to +(\forall (c0: C).((clear c2 c0) \to (clear c c0)))))))).(\lambda (k: +K).(\lambda (t: T).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 O +v (CHead c k t) c2)).(\lambda (c0: C).(\lambda (H1: (clear c2 c0)).(or3_ind +(ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda +(u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: +T).(\lambda (j: nat).(subst0 j v t u2)))) (ex3_2 C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j +v c c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat O (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda +(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3))))) (clear (CHead c k t) c0) (\lambda (H2: (ex3_2 T +nat (\lambda (_: T).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (u2: +T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: +nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: T).(\lambda (j: +nat).(eq nat O (s k j)))) (\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead +c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j v t u2))) (clear +(CHead c k t) c0) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H3: (eq nat O +(s k x1))).(\lambda (H4: (eq C c2 (CHead c k x0))).(\lambda (H5: (subst0 x1 v +t x0)).(let H6 \def (eq_ind C c2 (\lambda (c: C).(clear c c0)) H1 (CHead c k +x0) H4) in ((match k in K return (\lambda (k0: K).((eq nat O (s k0 x1)) \to +((clear (CHead c k0 x0) c0) \to (clear (CHead c k0 t) c0)))) with [(Bind b) +\Rightarrow (\lambda (H7: (eq nat O (s (Bind b) x1))).(\lambda (_: (clear +(CHead c (Bind b) x0) c0)).(let H9 \def (eq_ind nat O (\lambda (ee: +nat).(match ee in nat return (\lambda (_: nat).Prop) with [O \Rightarrow True +| (S _) \Rightarrow False])) I (S x1) H7) in (False_ind (clear (CHead c (Bind +b) t) c0) H9)))) | (Flat f) \Rightarrow (\lambda (H7: (eq nat O (s (Flat f) +x1))).(\lambda (H8: (clear (CHead c (Flat f) x0) c0)).(let H9 \def (eq_ind_r +nat x1 (\lambda (n: nat).(subst0 n v t x0)) H5 O H7) in (clear_flat c c0 +(clear_gen_flat f c c0 x0 H8) f t))))]) H3 H6))))))) H2)) (\lambda (H2: +(ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda +(c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c2: +C).(\lambda (j: nat).(csubst0 j v c c2))))).(ex3_2_ind C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat O (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j +v c c3))) (clear (CHead c k t) c0) (\lambda (x0: C).(\lambda (x1: +nat).(\lambda (H3: (eq nat O (s k x1))).(\lambda (H4: (eq C c2 (CHead x0 k +t))).(\lambda (H5: (csubst0 x1 v c x0)).(let H6 \def (eq_ind C c2 (\lambda +(c: C).(clear c c0)) H1 (CHead x0 k t) H4) in ((match k in K return (\lambda +(k0: K).((eq nat O (s k0 x1)) \to ((clear (CHead x0 k0 t) c0) \to (clear +(CHead c k0 t) c0)))) with [(Bind b) \Rightarrow (\lambda (H7: (eq nat O (s +(Bind b) x1))).(\lambda (_: (clear (CHead x0 (Bind b) t) c0)).(let H9 \def +(eq_ind nat O (\lambda (ee: nat).(match ee in nat return (\lambda (_: +nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x1) H7) +in (False_ind (clear (CHead c (Bind b) t) c0) H9)))) | (Flat f) \Rightarrow +(\lambda (H7: (eq nat O (s (Flat f) x1))).(\lambda (H8: (clear (CHead x0 +(Flat f) t) c0)).(let H9 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v +c x0)) H5 O H7) in (clear_flat c c0 (H x0 v H9 c0 (clear_gen_flat f x0 c0 t +H8)) f t))))]) H3 H6))))))) H2)) (\lambda (H2: (ex4_3 T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: +T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c c2)))))).(ex4_3_ind T C +nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat O (s k j))))) +(\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k +u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t +u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3)))) (clear (CHead c k t) c0) (\lambda (x0: T).(\lambda (x1: C).(\lambda +(x2: nat).(\lambda (H3: (eq nat O (s k x2))).(\lambda (H4: (eq C c2 (CHead x1 +k x0))).(\lambda (H5: (subst0 x2 v t x0)).(\lambda (H6: (csubst0 x2 v c +x1)).(let H7 \def (eq_ind C c2 (\lambda (c: C).(clear c c0)) H1 (CHead x1 k +x0) H4) in ((match k in K return (\lambda (k0: K).((eq nat O (s k0 x2)) \to +((clear (CHead x1 k0 x0) c0) \to (clear (CHead c k0 t) c0)))) with [(Bind b) +\Rightarrow (\lambda (H8: (eq nat O (s (Bind b) x2))).(\lambda (_: (clear +(CHead x1 (Bind b) x0) c0)).(let H10 \def (eq_ind nat O (\lambda (ee: +nat).(match ee in nat return (\lambda (_: nat).Prop) with [O \Rightarrow True +| (S _) \Rightarrow False])) I (S x2) H8) in (False_ind (clear (CHead c (Bind +b) t) c0) H10)))) | (Flat f) \Rightarrow (\lambda (H8: (eq nat O (s (Flat f) +x2))).(\lambda (H9: (clear (CHead x1 (Flat f) x0) c0)).(let H10 \def +(eq_ind_r nat x2 (\lambda (n: nat).(csubst0 n v c x1)) H6 O H8) in (let H11 +\def (eq_ind_r nat x2 (\lambda (n: nat).(subst0 n v t x0)) H5 O H8) in +(clear_flat c c0 (H x1 v H10 c0 (clear_gen_flat f x1 c0 x0 H9)) f t)))))]) H3 +H7))))))))) H2)) (csubst0_gen_head k c c2 t v O H0))))))))))) c1). + +theorem csubst0_clear_S: + \forall (c1: C).(\forall (c2: C).(\forall (v: T).(\forall (i: nat).((csubst0 +(S i) v c1 c2) \to (\forall (c: C).((clear c1 c) \to (or4 (clear c2 c) (ex3_4 +B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq +C c (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear c2 (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear c2 (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v e1 e2)))))))))))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (v: +T).(\forall (i: nat).((csubst0 (S i) v c c2) \to (\forall (c0: C).((clear c +c0) \to (or4 (clear c2 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 +(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (v: T).(\lambda +(i: nat).(\lambda (H: (csubst0 (S i) v (CSort n) c2)).(\lambda (c: +C).(\lambda (_: (clear (CSort n) c)).(csubst0_gen_sort c2 v (S i) n H (or4 +(clear c2 c) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind +b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))))))))))) +(\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (v: T).(\forall (i: +nat).((csubst0 (S i) v c c2) \to (\forall (c0: C).((clear c c0) \to (or4 +(clear c2 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind +b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda +(v: T).(\lambda (i: nat).(\lambda (H0: (csubst0 (S i) v (CHead c k t) +c2)).(\lambda (c0: C).(\lambda (H1: (clear (CHead c k t) c0)).(or3_ind (ex3_2 +T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (S 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 (S i) (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j +v c c3)))) (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat (S i) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda +(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3))))) (or4 (clear c2 c0) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind +b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: +T).(clear c2 (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +c2 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +i v e1 e2)))))))) (\lambda (H2: (ex3_2 T nat (\lambda (_: T).(\lambda (j: +nat).(eq nat (S 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 (S 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 (clear c2 c0) (ex3_4 B C T +T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear c2 (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear c2 (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v e1 e2)))))))) (\lambda (x0: T).(\lambda (x1: +nat).(\lambda (H3: (eq nat (S i) (s k x1))).(\lambda (H4: (eq C c2 (CHead c k +x0))).(\lambda (H5: (subst0 x1 v t x0)).(eq_ind_r C (CHead c k x0) (\lambda +(c3: C).(or4 (clear c3 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c3 +(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear c3 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear c3 (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))))) ((match k in K return (\lambda (k0: K).((clear (CHead c k0 t) c0) +\to ((eq nat (S i) (s k0 x1)) \to (or4 (clear (CHead c k0 x0) c0) (ex3_4 B C +T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead c k0 x0) (CHead e (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead c k0 x0) +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead c k0 x0) (CHead e2 (Bind b) +u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))))))) with [(Bind b) \Rightarrow (\lambda (H6: (clear (CHead c (Bind +b) t) c0)).(\lambda (H7: (eq nat (S i) (s (Bind b) x1))).(let H8 \def +(f_equal nat nat (\lambda (e: nat).(match e in nat return (\lambda (_: +nat).nat) with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S x1) H7) in +(let H9 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n v t x0)) H5 i H8) +in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(or4 (clear (CHead c +(Bind b) x0) c3) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c3 (CHead e (Bind b0) u1)))))) (\lambda (b0: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead c (Bind b) +x0) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Bind +b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear (CHead c (Bind b) x0) (CHead e2 (Bind b0) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c3 (CHead e1 (Bind b0) u1))))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead c (Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) (or4_intro1 (clear (CHead c +(Bind b) x0) (CHead c (Bind b) t)) (ex3_4 B C T T (\lambda (b0: B).(\lambda +(e: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e +(Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead c (Bind b) x0) (CHead e (Bind b0) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) u)))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead c (Bind b) +x0) (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda +(b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq +C (CHead c (Bind b) t) (CHead e1 (Bind b0) u1))))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead c (Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C T T (\lambda +(b0: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind +b) t) (CHead e (Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda +(_: T).(\lambda (u2: T).(clear (CHead c (Bind b) x0) (CHead e (Bind b0) +u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2))))) b c t x0 (refl_equal C (CHead c (Bind b) t)) +(clear_bind b c x0) H9)) c0 (clear_gen_bind b c c0 t H6)))))) | (Flat f) +\Rightarrow (\lambda (H6: (clear (CHead c (Flat f) t) c0)).(\lambda (H7: (eq +nat (S i) (s (Flat f) x1))).(let H8 \def (f_equal nat nat (\lambda (e: +nat).e) (S i) (s (Flat f) x1) H7) in (let H9 \def (eq_ind_r nat x1 (\lambda +(n: nat).(subst0 n v t x0)) H5 (S i) H8) in (or4_intro0 (clear (CHead c (Flat +f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead c (Flat f) +x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear (CHead c (Flat f) x0) (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead c (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (clear_flat c c0 (clear_gen_flat +f c c0 t H6) f x0))))))]) H1 H3) c2 H4)))))) H2)) (\lambda (H2: (ex3_2 C nat +(\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k j)))) (\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda (c2: C).(\lambda (j: +nat).(csubst0 j v c c2))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat (S i) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 +(CHead c3 k t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))) +(or4 (clear c2 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind +b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda +(x0: C).(\lambda (x1: nat).(\lambda (H3: (eq nat (S i) (s k x1))).(\lambda +(H4: (eq C c2 (CHead x0 k t))).(\lambda (H5: (csubst0 x1 v c x0)).(eq_ind_r C +(CHead x0 k t) (\lambda (c3: C).(or4 (clear c3 c0) (ex3_4 B C T T (\lambda +(b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e +(Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda +(u2: T).(clear c3 (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear c3 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +c3 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +i v e1 e2))))))))) ((match k in K return (\lambda (k0: K).((clear (CHead c k0 +t) c0) \to ((eq nat (S i) (s k0 x1)) \to (or4 (clear (CHead x0 k0 t) c0) +(ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: +T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 k0 t) (CHead e (Bind b) +u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear +(CHead x0 k0 t) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 k0 t) +(CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +i v e1 e2))))))))))) with [(Bind b) \Rightarrow (\lambda (H6: (clear (CHead c +(Bind b) t) c0)).(\lambda (H7: (eq nat (S i) (s (Bind b) x1))).(let H8 \def +(f_equal nat nat (\lambda (e: nat).(match e in nat return (\lambda (_: +nat).nat) with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S x1) H7) in +(let H9 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c x0)) H5 i H8) +in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(or4 (clear (CHead x0 +(Bind b) t) c3) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c3 (CHead e (Bind b0) u1)))))) (\lambda (b0: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Bind b) +t) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Bind +b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear (CHead x0 (Bind b) t) (CHead e2 (Bind b0) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c3 (CHead e1 (Bind b0) u1))))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x0 (Bind b) t) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) (or4_intro2 (clear (CHead x0 +(Bind b) t) (CHead c (Bind b) t)) (ex3_4 B C T T (\lambda (b0: B).(\lambda +(e: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e +(Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x0 (Bind b) t) (CHead e (Bind b0) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C (CHead c (Bind b) t) (CHead e1 (Bind b0) u)))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Bind b) +t) (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C +(CHead c (Bind b) t) (CHead e1 (Bind b0) u1))))))) (\lambda (b0: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 +(Bind b) t) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C C T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c (Bind b) +t) (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x0 (Bind b) t) (CHead e2 (Bind b0) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2))))) b c x0 t (refl_equal C (CHead c (Bind b) t)) (clear_bind b x0 t) +H9)) c0 (clear_gen_bind b c c0 t H6)))))) | (Flat f) \Rightarrow (\lambda +(H6: (clear (CHead c (Flat f) t) c0)).(\lambda (H7: (eq nat (S i) (s (Flat f) +x1))).(let H8 \def (f_equal nat nat (\lambda (e: nat).e) (S i) (s (Flat f) +x1) H7) in (let H9 \def (eq_ind_r nat x1 (\lambda (n: nat).(csubst0 n v c +x0)) H5 (S i) H8) in (let H10 \def (H x0 v i H9 c0 (clear_gen_flat f c c0 t +H6)) in (or4_ind (clear x0 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 +(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear x0 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))) (or4 (clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind +b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: +T).(clear (CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) +u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))))) (\lambda (H11: (clear x0 c0)).(or4_intro0 (clear (CHead x0 (Flat +f) t) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) +t) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (clear_flat x0 c0 H11 f t))) +(\lambda (H11: (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 (CHead e (Bind +b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 +(CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2))))) (or4 (clear (CHead x0 (Flat f) t) +c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e +(Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear +(CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C +C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (x2: B).(\lambda (x3: +C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H12: (eq C c0 (CHead x3 (Bind +x2) x4))).(\lambda (H13: (clear x0 (CHead x3 (Bind x2) x5))).(\lambda (H14: +(subst0 i v x4 x5)).(or4_intro1 (clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T +T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Flat f) +t) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2))))))) (ex3_4_intro B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) +t) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2))))) x2 x3 x4 x5 H12 (clear_flat x0 +(CHead x3 (Bind x2) x5) H13 f t) H14))))))))) H11)) (\lambda (H11: (ex3_4 B C +C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear x0 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 +e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x0 (CHead e2 (Bind +b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 i v e1 e2))))) (or4 (clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T +T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Flat f) +t) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (H12: (eq C c0 (CHead x3 (Bind x2) x5))).(\lambda (H13: (clear x0 +(CHead x4 (Bind x2) x5))).(\lambda (H14: (csubst0 i v x3 x4)).(or4_intro2 +(clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda +(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C +C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2))))) x2 x3 x4 x5 H12 (clear_flat x0 (CHead x4 (Bind x2) x5) H13 f t) +H14))))))))) 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 c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear x0 (CHead e2 (Bind b) u2))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))).(ex4_5_ind B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear x0 (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))) (or4 (clear (CHead x0 (Flat f) t) c0) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind +b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: +T).(clear (CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) +u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))))) (\lambda (x2: B).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: +T).(\lambda (x6: T).(\lambda (H12: (eq C c0 (CHead x3 (Bind x2) +x5))).(\lambda (H13: (clear x0 (CHead x4 (Bind x2) x6))).(\lambda (H14: +(subst0 i v x5 x6)).(\lambda (H15: (csubst0 i v x3 x4)).(or4_intro3 (clear +(CHead x0 (Flat f) t) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x0 (Flat f) t) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda +(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex4_5_intro B C +C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x0 (Flat f) t) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2)))))) x2 x3 x4 x5 x6 H12 (clear_flat x0 +(CHead x4 (Bind x2) x6) H13 f t) H14 H15))))))))))) H11)) H10))))))]) H1 H3) +c2 H4)))))) H2)) (\lambda (H2: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat (S i) (s k j))))) (\lambda (u2: T).(\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda +(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c2: +C).(\lambda (j: nat).(csubst0 j v c c2)))))).(ex4_3_ind T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S i) (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (or4 (clear c2 +c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: +C).(\lambda (_: T).(\lambda (u2: T).(clear c2 (CHead e (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c2 (CHead e2 (Bind +b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind +b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(clear c2 (CHead e2 (Bind b) u2))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (x0: T).(\lambda +(x1: C).(\lambda (x2: nat).(\lambda (H3: (eq nat (S i) (s k x2))).(\lambda +(H4: (eq C c2 (CHead x1 k x0))).(\lambda (H5: (subst0 x2 v t x0)).(\lambda +(H6: (csubst0 x2 v c x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c3: C).(or4 +(clear c3 c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear c3 (CHead e (Bind +b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear c3 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear c3 (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))) ((match k +in K return (\lambda (k0: K).((clear (CHead c k0 t) c0) \to ((eq nat (S i) (s +k0 x2)) \to (or4 (clear (CHead x1 k0 x0) c0) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind +b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: +T).(clear (CHead x1 k0 x0) (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 k0 x0) (CHead e2 (Bind +b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind +b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead x1 k0 x0) (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))))))) with +[(Bind b) \Rightarrow (\lambda (H7: (clear (CHead c (Bind b) t) c0)).(\lambda +(H8: (eq nat (S i) (s (Bind b) x2))).(let H9 \def (f_equal nat nat (\lambda +(e: nat).(match e in nat return (\lambda (_: nat).nat) with [O \Rightarrow i +| (S n) \Rightarrow n])) (S i) (S x2) H8) in (let H10 \def (eq_ind_r nat x2 +(\lambda (n: nat).(csubst0 n v c x1)) H6 i H9) in (let H11 \def (eq_ind_r nat +x2 (\lambda (n: nat).(subst0 n v t x0)) H5 i H9) in (eq_ind_r C (CHead c +(Bind b) t) (\lambda (c3: C).(or4 (clear (CHead x1 (Bind b) x0) c3) (ex3_4 B +C T T (\lambda (b0: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C +c3 (CHead e (Bind b0) u1)))))) (\lambda (b0: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead x1 (Bind b) x0) (CHead e (Bind b0) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c3 (CHead e1 (Bind b0) u)))))) (\lambda (b0: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Bind b) +x0) (CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda +(b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq +C c3 (CHead e1 (Bind b0) u1))))))) (\lambda (b0: B).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Bind b) x0) (CHead +e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +i v e1 e2))))))))) (or4_intro3 (clear (CHead x1 (Bind b) x0) (CHead c (Bind +b) t)) (ex3_4 B C T T (\lambda (b0: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C (CHead c (Bind b) t) (CHead e (Bind b0) u1)))))) +(\lambda (b0: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Bind b) x0) (CHead e (Bind b0) u2)))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C +T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C +(CHead c (Bind b) t) (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Bind b) x0) (CHead +e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C +(CHead c (Bind b) t) (CHead e1 (Bind b0) u1))))))) (\lambda (b0: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 +(Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v e1 e2))))))) (ex4_5_intro B C C T T (\lambda (b0: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C +(CHead c (Bind b) t) (CHead e1 (Bind b0) u1))))))) (\lambda (b0: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 +(Bind b) x0) (CHead e2 (Bind b0) u2))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v e1 e2)))))) b c x1 t x0 (refl_equal C (CHead c (Bind b) +t)) (clear_bind b x1 x0) H11 H10)) c0 (clear_gen_bind b c c0 t H7))))))) | +(Flat f) \Rightarrow (\lambda (H7: (clear (CHead c (Flat f) t) c0)).(\lambda +(H8: (eq nat (S i) (s (Flat f) x2))).(let H9 \def (f_equal nat nat (\lambda +(e: nat).e) (S i) (s (Flat f) x2) H8) in (let H10 \def (eq_ind_r nat x2 +(\lambda (n: nat).(csubst0 n v c x1)) H6 (S i) H9) in (let H11 \def (eq_ind_r +nat x2 (\lambda (n: nat).(subst0 n v t x0)) H5 (S i) H9) in (let H12 \def (H +x1 v i H10 c0 (clear_gen_flat f c c0 t H7)) in (or4_ind (clear x1 c0) (ex3_4 +B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq +C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear x1 (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear x1 (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear x1 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 i v e1 e2))))))) (or4 (clear (CHead x1 (Flat f) x0) c0) +(ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: +T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: +C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e +(Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear +(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C +C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (H13: (clear x1 +c0)).(or4_intro0 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda +(b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e +(Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) +u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) +(clear_flat x1 c0 H13 f x0))) (\lambda (H13: (ex3_4 B C T T (\lambda (b: +B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind +b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: +T).(clear x1 (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2))))))).(ex3_4_ind B C +T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear x1 (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2))))) +(or4 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind +b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: +T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) +u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))))) (\lambda (x3: B).(\lambda (x4: C).(\lambda (x5: T).(\lambda (x6: +T).(\lambda (H14: (eq C c0 (CHead x4 (Bind x3) x5))).(\lambda (H15: (clear x1 +(CHead x4 (Bind x3) x6))).(\lambda (H16: (subst0 i v x5 x6)).(or4_intro1 +(clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C +T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda +(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C +T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 +(CHead e (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v +u1 u2))))) x3 x4 x5 x6 H14 (clear_flat x1 (CHead x4 (Bind x3) x6) H15 f x0) +H16))))))))) H13)) (\lambda (H13: (ex3_4 B C C T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x1 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 i v e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear x1 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2))))) (or4 (clear +(CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C +T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda +(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))) (\lambda (x3: +B).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (H14: (eq C c0 +(CHead x4 (Bind x3) x6))).(\lambda (H15: (clear x1 (CHead x5 (Bind x3) +x6))).(\lambda (H16: (csubst0 i v x4 x5)).(or4_intro2 (clear (CHead x1 (Flat +f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) +x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex3_4_intro B C C T (\lambda +(b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 (CHead e1 +(Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i v e1 e2))))) +x3 x4 x5 x6 H14 (clear_flat x1 (CHead x5 (Bind x3) x6) H15 f x0) H16))))))))) +H13)) (\lambda (H13: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind +b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(clear x1 (CHead e2 (Bind b) u2))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 i v e1 e2)))))))).(ex4_5_ind B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear x1 (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))) (or4 (clear (CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind +b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: +T).(clear (CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) +(ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c0 (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 i v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) +u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 +e2)))))))) (\lambda (x3: B).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: +T).(\lambda (x7: T).(\lambda (H14: (eq C c0 (CHead x4 (Bind x3) +x6))).(\lambda (H15: (clear x1 (CHead x5 (Bind x3) x7))).(\lambda (H16: +(subst0 i v x6 x7)).(\lambda (H17: (csubst0 i v x4 x5)).(or4_intro3 (clear +(CHead x1 (Flat f) x0) c0) (ex3_4 B C T T (\lambda (b: B).(\lambda (e: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Flat f) x0) (CHead e (Bind b) u2)))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 u2)))))) (ex3_4 B C C +T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c0 +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 i +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear (CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda +(_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 i v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 i v e1 e2))))))) (ex4_5_intro B C +C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq C c0 (CHead e1 (Bind b) u1))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear +(CHead x1 (Flat f) x0) (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 i v u1 +u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 i v e1 e2)))))) x3 x4 x5 x6 x7 H14 (clear_flat x1 +(CHead x5 (Bind x3) x7) H15 f x0) H16 H17))))))))))) H13)) H12)))))))]) H1 +H3) c2 H4)))))))) H2)) (csubst0_gen_head k c c2 t v (S i) H0)))))))))))) c1). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/defs.ma new file mode 100644 index 000000000..044f911b1 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/defs.ma @@ -0,0 +1,34 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/defs". + +include "subst0/defs.ma". + +include "C/defs.ma". + +inductive csubst0: nat \to (T \to (C \to (C \to Prop))) \def +| csubst0_snd: \forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall (u1: +T).(\forall (u2: T).((subst0 i v u1 u2) \to (\forall (c: C).(csubst0 (s k i) +v (CHead c k u1) (CHead c k u2)))))))) +| csubst0_fst: \forall (k: K).(\forall (i: nat).(\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (u: T).(csubst0 (s +k i) v (CHead c1 k u) (CHead c2 k u)))))))) +| csubst0_both: \forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall +(u1: T).(\forall (u2: T).((subst0 i v u1 u2) \to (\forall (c1: C).(\forall +(c2: C).((csubst0 i v c1 c2) \to (csubst0 (s k i) v (CHead c1 k u1) (CHead c2 +k u2)))))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/drop.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/drop.ma new file mode 100644 index 000000000..14e0bb2c8 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/drop.ma @@ -0,0 +1,6448 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/drop". + +include "csubst0/fwd.ma". + +include "drop/fwd.ma". + +include "s/props.ma". + +theorem csubst0_drop_gt: + \forall (n: nat).(\forall (i: nat).((lt i n) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n O +c1 e) \to (drop n O c2 e))))))))) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\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 (H: (lt i O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda +(v: T).(\lambda (_: (csubst0 i v c1 c2)).(\lambda (e: C).(\lambda (_: (drop O +O c1 e)).(let H2 \def (match H in le return (\lambda (n: nat).(\lambda (_: +(le ? n)).((eq nat n O) \to (drop O O c2 e)))) with [le_n \Rightarrow +(\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))))))) +(\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) +O c2 e) (\lambda (H3: (eq C e (CSort n1))).(\lambda (H4: (eq nat (S n0) +O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n1) (\lambda (c: C).(drop +(S n0) O c2 c)) (let H6 \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 H4) in (False_ind (drop (S n0) O c2 (CSort n1)) H6)) +e H3)))) (drop_gen_sort n1 (S n0) O e H2)))))))) (\lambda (c: C).(\lambda +(H1: ((\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 (k: +K).(\lambda (t: T).(\lambda (c2: C).(\lambda (v: T).(\lambda (H2: (csubst0 i +v (CHead c k t) c2)).(\lambda (e: C).(\lambda (H3: (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))))) (drop (S n0) O c2 e) (\lambda (H4: (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))) (drop (S +n0) O c2 e) (\lambda (x0: T).(\lambda (x1: nat).(\lambda (H5: (eq nat i (s k +x1))).(\lambda (H6: (eq C c2 (CHead c k x0))).(\lambda (_: (subst0 x1 v t +x0)).(eq_ind_r C (CHead c k x0) (\lambda (c0: C).(drop (S n0) O c0 e)) (let +H8 \def (eq_ind nat i (\lambda (n: nat).(\forall (c2: C).(\forall (v: +T).((csubst0 n v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S +n0) O c2 e))))))) H1 (s k x1) H5) in (let H9 \def (eq_ind nat i (\lambda (n: +nat).(lt n (S n0))) H0 (s k x1) H5) in ((match k in K return (\lambda (k0: +K).((drop (r k0 n0) O c e) \to (((\forall (c2: C).(\forall (v: T).((csubst0 +(s k0 x1) v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O +c2 e))))))) \to ((lt (s k0 x1) (S n0)) \to (drop (S n0) O (CHead c k0 x0) +e))))) with [(Bind b) \Rightarrow (\lambda (H10: (drop (r (Bind b) n0) O c +e)).(\lambda (_: ((\forall (c2: C).(\forall (v: T).((csubst0 (s (Bind b) x1) +v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 +e)))))))).(\lambda (_: (lt (s (Bind b) x1) (S n0))).(drop_drop (Bind b) n0 c +e H10 x0)))) | (Flat f) \Rightarrow (\lambda (H10: (drop (r (Flat f) n0) O c +e)).(\lambda (_: ((\forall (c2: C).(\forall (v: T).((csubst0 (s (Flat f) x1) +v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 +e)))))))).(\lambda (H12: (lt (s (Flat f) x1) (S n0))).(or_ind (eq nat x1 O) +(ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0))) +(drop (S n0) O (CHead c (Flat f) x0) e) (\lambda (_: (eq nat x1 +O)).(drop_drop (Flat f) n0 c e H10 x0)) (\lambda (H13: (ex2 nat (\lambda (m: +nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda +(m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O +(CHead c (Flat f) x0) e) (\lambda (x: nat).(\lambda (_: (eq nat x1 (S +x))).(\lambda (_: (lt x n0)).(drop_drop (Flat f) n0 c e H10 x0)))) H13)) +(lt_gen_xS x1 n0 H12)))))]) (drop_gen_drop k c e t n0 H3) H8 H9))) c2 +H6)))))) H4)) (\lambda (H4: (ex3_2 C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead +c3 k t)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c +c2))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (drop (S n0) O c2 e) (\lambda +(x0: C).(\lambda (x1: nat).(\lambda (H5: (eq nat i (s k x1))).(\lambda (H6: +(eq C c2 (CHead x0 k t))).(\lambda (H7: (csubst0 x1 v c x0)).(eq_ind_r C +(CHead x0 k t) (\lambda (c0: C).(drop (S n0) O c0 e)) (let H8 \def (eq_ind +nat i (\lambda (n: nat).(\forall (c2: C).(\forall (v: T).((csubst0 n v c c2) +\to (\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 e))))))) H1 (s +k x1) H5) in (let H9 \def (eq_ind nat i (\lambda (n: nat).(lt n (S n0))) H0 +(s k x1) H5) in ((match k in K return (\lambda (k0: K).((drop (r k0 n0) O c +e) \to (((\forall (c2: C).(\forall (v: T).((csubst0 (s k0 x1) v c c2) \to +(\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 e))))))) \to ((lt +(s k0 x1) (S n0)) \to (drop (S n0) O (CHead x0 k0 t) e))))) with [(Bind b) +\Rightarrow (\lambda (H10: (drop (r (Bind b) n0) O c e)).(\lambda (_: +((\forall (c2: C).(\forall (v: T).((csubst0 (s (Bind b) x1) v c c2) \to +(\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 e)))))))).(\lambda +(H12: (lt (s (Bind b) x1) (S n0))).(drop_drop (Bind b) n0 x0 e (H x1 (lt_S_n +x1 n0 H12) c x0 v H7 e H10) t)))) | (Flat f) \Rightarrow (\lambda (H10: (drop +(r (Flat f) n0) O c e)).(\lambda (H11: ((\forall (c2: C).(\forall (v: +T).((csubst0 (s (Flat f) x1) v c c2) \to (\forall (e: C).((drop (S n0) O c e) +\to (drop (S n0) O c2 e)))))))).(\lambda (H12: (lt (s (Flat f) x1) (S +n0))).(or_ind (eq nat x1 O) (ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) +(\lambda (m: nat).(lt m n0))) (drop (S n0) O (CHead x0 (Flat f) t) e) +(\lambda (_: (eq nat x1 O)).(drop_drop (Flat f) n0 x0 e (H11 x0 v H7 e H10) +t)) (\lambda (H13: (ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: +nat).(lt m n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda +(m: nat).(lt m n0)) (drop (S n0) O (CHead x0 (Flat f) t) e) (\lambda (x: +nat).(\lambda (_: (eq nat x1 (S x))).(\lambda (_: (lt x n0)).(drop_drop (Flat +f) n0 x0 e (H11 x0 v H7 e H10) t)))) H13)) (lt_gen_xS x1 n0 H12)))))]) +(drop_gen_drop k c e t n0 H3) H8 H9))) c2 H6)))))) H4)) (\lambda (H4: (ex4_3 +T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k +j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 +k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t +u2)))) (\lambda (_: T).(\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c +c2)))))).(ex4_3_ind T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda +(j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: +nat).(csubst0 j v c c3)))) (drop (S n0) O c2 e) (\lambda (x0: T).(\lambda +(x1: C).(\lambda (x2: nat).(\lambda (H5: (eq nat i (s k x2))).(\lambda (H6: +(eq C c2 (CHead x1 k x0))).(\lambda (_: (subst0 x2 v t x0)).(\lambda (H8: +(csubst0 x2 v c x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c0: C).(drop (S +n0) O c0 e)) (let H9 \def (eq_ind nat i (\lambda (n: nat).(\forall (c2: +C).(\forall (v: T).((csubst0 n v c c2) \to (\forall (e: C).((drop (S n0) O c +e) \to (drop (S n0) O c2 e))))))) H1 (s k x2) H5) in (let H10 \def (eq_ind +nat i (\lambda (n: nat).(lt n (S n0))) H0 (s k x2) H5) in ((match k in K +return (\lambda (k0: K).((drop (r k0 n0) O c e) \to (((\forall (c2: +C).(\forall (v: T).((csubst0 (s k0 x2) v c c2) \to (\forall (e: C).((drop (S +n0) O c e) \to (drop (S n0) O c2 e))))))) \to ((lt (s k0 x2) (S n0)) \to +(drop (S n0) O (CHead x1 k0 x0) e))))) with [(Bind b) \Rightarrow (\lambda +(H11: (drop (r (Bind b) n0) O c e)).(\lambda (_: ((\forall (c2: C).(\forall +(v: T).((csubst0 (s (Bind b) x2) v c c2) \to (\forall (e: C).((drop (S n0) O +c e) \to (drop (S n0) O c2 e)))))))).(\lambda (H13: (lt (s (Bind b) x2) (S +n0))).(drop_drop (Bind b) n0 x1 e (H x2 (lt_S_n x2 n0 H13) c x1 v H8 e H11) +x0)))) | (Flat f) \Rightarrow (\lambda (H11: (drop (r (Flat f) n0) O c +e)).(\lambda (H12: ((\forall (c2: C).(\forall (v: T).((csubst0 (s (Flat f) +x2) v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (drop (S n0) O c2 +e)))))))).(\lambda (H13: (lt (s (Flat f) x2) (S n0))).(or_ind (eq nat x2 O) +(ex2 nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0))) +(drop (S n0) O (CHead x1 (Flat f) x0) e) (\lambda (_: (eq nat x2 +O)).(drop_drop (Flat f) n0 x1 e (H12 x1 v H8 e H11) x0)) (\lambda (H14: (ex2 +nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m +n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: +nat).(lt m n0)) (drop (S n0) O (CHead x1 (Flat f) x0) e) (\lambda (x: +nat).(\lambda (_: (eq nat x2 (S x))).(\lambda (_: (lt x n0)).(drop_drop (Flat +f) n0 x1 e (H12 x1 v H8 e H11) x0)))) H14)) (lt_gen_xS x2 n0 H13)))))]) +(drop_gen_drop k c e t n0 H3) H9 H10))) c2 H6)))))))) H4)) (csubst0_gen_head +k c c2 t v i H2))))))))))) c1)))))) n). + +theorem csubst0_drop_gt_back: + \forall (n: nat).(\forall (i: nat).((lt i n) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n O +c2 e) \to (drop n O c1 e))))))))) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\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 (H: (lt i O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda +(v: T).(\lambda (_: (csubst0 i v c1 c2)).(\lambda (e: C).(\lambda (_: (drop O +O c2 e)).(let H2 \def (match H in le return (\lambda (n: nat).(\lambda (_: +(le ? n)).((eq nat n O) \to (drop O O c1 e)))) with [le_n \Rightarrow +(\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))))))) +(\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)))))))) +(\lambda (c: C).(\lambda (H1: ((\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 (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (v: +T).(\lambda (H2: (csubst0 i v (CHead c k t) c2)).(\lambda (e: C).(\lambda +(H3: (drop (S n0) O c2 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))))) (drop (S n0) O (CHead c k t) e) +(\lambda (H4: (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))) (drop (S n0) O (CHead c k t) e) (\lambda (x0: T).(\lambda (x1: +nat).(\lambda (H5: (eq nat i (s k x1))).(\lambda (H6: (eq C c2 (CHead c k +x0))).(\lambda (_: (subst0 x1 v t x0)).(let H8 \def (eq_ind C c2 (\lambda (c: +C).(drop (S n0) O c e)) H3 (CHead c k x0) H6) in (let H9 \def (eq_ind nat i +(\lambda (n: nat).(\forall (c2: C).(\forall (v: T).((csubst0 n v c c2) \to +(\forall (e: C).((drop (S n0) O c2 e) \to (drop (S n0) O c e))))))) H1 (s k +x1) H5) in (let H10 \def (eq_ind nat i (\lambda (n: nat).(lt n (S n0))) H0 (s +k x1) H5) in ((match k in K return (\lambda (k0: K).(((\forall (c2: +C).(\forall (v: T).((csubst0 (s k0 x1) v c c2) \to (\forall (e: C).((drop (S +n0) O c2 e) \to (drop (S n0) O c e))))))) \to ((lt (s k0 x1) (S n0)) \to +((drop (r k0 n0) O c e) \to (drop (S n0) O (CHead c k0 t) e))))) with [(Bind +b) \Rightarrow (\lambda (_: ((\forall (c2: C).(\forall (v: T).((csubst0 (s +(Bind b) x1) v c c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (drop (S +n0) O c e)))))))).(\lambda (_: (lt (s (Bind b) x1) (S n0))).(\lambda (H13: +(drop (r (Bind b) n0) O c e)).(drop_drop (Bind b) n0 c e H13 t)))) | (Flat f) +\Rightarrow (\lambda (_: ((\forall (c2: C).(\forall (v: T).((csubst0 (s (Flat +f) x1) v c c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (drop (S n0) O c +e)))))))).(\lambda (H12: (lt (s (Flat f) x1) (S n0))).(\lambda (H13: (drop (r +(Flat f) n0) O c e)).(or_ind (eq nat x1 O) (ex2 nat (\lambda (m: nat).(eq nat +x1 (S m))) (\lambda (m: nat).(lt m n0))) (drop (S n0) O (CHead c (Flat f) t) +e) (\lambda (_: (eq nat x1 O)).(drop_drop (Flat f) n0 c e H13 t)) (\lambda +(H14: (ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m +n0)))).(ex2_ind nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: +nat).(lt m n0)) (drop (S n0) O (CHead c (Flat f) t) e) (\lambda (x: +nat).(\lambda (_: (eq nat x1 (S x))).(\lambda (_: (lt x n0)).(drop_drop (Flat +f) n0 c e H13 t)))) H14)) (lt_gen_xS x1 n0 H12)))))]) H9 H10 (drop_gen_drop k +c e x0 n0 H8)))))))))) H4)) (\lambda (H4: (ex3_2 C nat (\lambda (_: +C).(\lambda (j: nat).(eq nat i (s k j)))) (\lambda (c3: C).(\lambda (_: +nat).(eq C c2 (CHead c3 k t)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j +v c c2))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat i (s k +j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) (\lambda +(c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (drop (S n0) O (CHead c k t) +e) (\lambda (x0: C).(\lambda (x1: nat).(\lambda (H5: (eq nat i (s k +x1))).(\lambda (H6: (eq C c2 (CHead x0 k t))).(\lambda (H7: (csubst0 x1 v c +x0)).(let H8 \def (eq_ind C c2 (\lambda (c: C).(drop (S n0) O c e)) H3 (CHead +x0 k t) H6) in (let H9 \def (eq_ind nat i (\lambda (n: nat).(\forall (c2: +C).(\forall (v: T).((csubst0 n v c c2) \to (\forall (e: C).((drop (S n0) O c2 +e) \to (drop (S n0) O c e))))))) H1 (s k x1) H5) in (let H10 \def (eq_ind nat +i (\lambda (n: nat).(lt n (S n0))) H0 (s k x1) H5) in ((match k in K return +(\lambda (k0: K).(((\forall (c2: C).(\forall (v: T).((csubst0 (s k0 x1) v c +c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (drop (S n0) O c e))))))) +\to ((lt (s k0 x1) (S n0)) \to ((drop (r k0 n0) O x0 e) \to (drop (S n0) O +(CHead c k0 t) e))))) with [(Bind b) \Rightarrow (\lambda (_: ((\forall (c2: +C).(\forall (v: T).((csubst0 (s (Bind b) x1) v c c2) \to (\forall (e: +C).((drop (S n0) O c2 e) \to (drop (S n0) O c e)))))))).(\lambda (H12: (lt (s +(Bind b) x1) (S n0))).(\lambda (H13: (drop (r (Bind b) n0) O x0 +e)).(drop_drop (Bind b) n0 c e (H x1 (lt_S_n x1 n0 H12) c x0 v H7 e H13) +t)))) | (Flat f) \Rightarrow (\lambda (H11: ((\forall (c2: C).(\forall (v: +T).((csubst0 (s (Flat f) x1) v c c2) \to (\forall (e: C).((drop (S n0) O c2 +e) \to (drop (S n0) O c e)))))))).(\lambda (H12: (lt (s (Flat f) x1) (S +n0))).(\lambda (H13: (drop (r (Flat f) n0) O x0 e)).(or_ind (eq nat x1 O) +(ex2 nat (\lambda (m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0))) +(drop (S n0) O (CHead c (Flat f) t) e) (\lambda (_: (eq nat x1 O)).(drop_drop +(Flat f) n0 c e (H11 x0 v H7 e H13) t)) (\lambda (H14: (ex2 nat (\lambda (m: +nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda +(m: nat).(eq nat x1 (S m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O +(CHead c (Flat f) t) e) (\lambda (x: nat).(\lambda (_: (eq nat x1 (S +x))).(\lambda (_: (lt x n0)).(drop_drop (Flat f) n0 c e (H11 x0 v H7 e H13) +t)))) H14)) (lt_gen_xS x1 n0 H12)))))]) H9 H10 (drop_gen_drop k x0 e t n0 +H8)))))))))) H4)) (\lambda (H4: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: +C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: T).(\lambda (c3: +C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda +(_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c2: +C).(\lambda (j: nat).(csubst0 j v c c2)))))).(ex4_3_ind T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat i (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (drop (S n0) O +(CHead c k t) e) (\lambda (x0: T).(\lambda (x1: C).(\lambda (x2: +nat).(\lambda (H5: (eq nat i (s k x2))).(\lambda (H6: (eq C c2 (CHead x1 k +x0))).(\lambda (_: (subst0 x2 v t x0)).(\lambda (H8: (csubst0 x2 v c +x1)).(let H9 \def (eq_ind C c2 (\lambda (c: C).(drop (S n0) O c e)) H3 (CHead +x1 k x0) H6) in (let H10 \def (eq_ind nat i (\lambda (n: nat).(\forall (c2: +C).(\forall (v: T).((csubst0 n v c c2) \to (\forall (e: C).((drop (S n0) O c2 +e) \to (drop (S n0) O c e))))))) H1 (s k x2) H5) in (let H11 \def (eq_ind nat +i (\lambda (n: nat).(lt n (S n0))) H0 (s k x2) H5) in ((match k in K return +(\lambda (k0: K).(((\forall (c2: C).(\forall (v: T).((csubst0 (s k0 x2) v c +c2) \to (\forall (e: C).((drop (S n0) O c2 e) \to (drop (S n0) O c e))))))) +\to ((lt (s k0 x2) (S n0)) \to ((drop (r k0 n0) O x1 e) \to (drop (S n0) O +(CHead c k0 t) e))))) with [(Bind b) \Rightarrow (\lambda (_: ((\forall (c2: +C).(\forall (v: T).((csubst0 (s (Bind b) x2) v c c2) \to (\forall (e: +C).((drop (S n0) O c2 e) \to (drop (S n0) O c e)))))))).(\lambda (H13: (lt (s +(Bind b) x2) (S n0))).(\lambda (H14: (drop (r (Bind b) n0) O x1 +e)).(drop_drop (Bind b) n0 c e (H x2 (lt_S_n x2 n0 H13) c x1 v H8 e H14) +t)))) | (Flat f) \Rightarrow (\lambda (H12: ((\forall (c2: C).(\forall (v: +T).((csubst0 (s (Flat f) x2) v c c2) \to (\forall (e: C).((drop (S n0) O c2 +e) \to (drop (S n0) O c e)))))))).(\lambda (H13: (lt (s (Flat f) x2) (S +n0))).(\lambda (H14: (drop (r (Flat f) n0) O x1 e)).(or_ind (eq nat x2 O) +(ex2 nat (\lambda (m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0))) +(drop (S n0) O (CHead c (Flat f) t) e) (\lambda (_: (eq nat x2 O)).(drop_drop +(Flat f) n0 c e (H12 x1 v H8 e H14) t)) (\lambda (H15: (ex2 nat (\lambda (m: +nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0)))).(ex2_ind nat (\lambda +(m: nat).(eq nat x2 (S m))) (\lambda (m: nat).(lt m n0)) (drop (S n0) O +(CHead c (Flat f) t) e) (\lambda (x: nat).(\lambda (_: (eq nat x2 (S +x))).(\lambda (_: (lt x n0)).(drop_drop (Flat f) n0 c e (H12 x1 v H8 e H14) +t)))) H15)) (lt_gen_xS x2 n0 H13)))))]) H10 H11 (drop_gen_drop k x1 e x0 n0 +H9)))))))))))) H4)) (csubst0_gen_head k c c2 t v i H2))))))))))) c1)))))) n). + +theorem csubst0_drop_lt: + \forall (n: nat).(\forall (i: nat).((lt n i) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((drop n O +c1 e) \to (or4 (drop n O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e0 k +w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k n)) v u w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop n O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 e2)))))) (ex4_5 K C C +T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k n)) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k +n)) v e1 e2)))))))))))))))) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (i: nat).((lt n0 i) +\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 (or4 (drop n0 O c2 e) (ex3_4 K C T +T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop n0 O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n0)) v u w)))))) +(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop n0 O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k n0)) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 +O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n0)) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (s k n0)) v e1 e2))))))))))))))))) (\lambda (i: +nat).(\lambda (_: (lt O i)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (v: +T).(\lambda (H0: (csubst0 i v c1 c2)).(\lambda (e: C).(\lambda (H1: (drop O O +c1 e)).(eq_ind C c1 (\lambda (c: C).(or4 (drop O O c2 c) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop O O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k O)) v u w)))))) +(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop O O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k O)) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O +c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k O)) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (s k O)) v e1 e2))))))))) (csubst0_ind (\lambda (n0: +nat).(\lambda (t: T).(\lambda (c: C).(\lambda (c0: C).(or4 (drop O O c0 c) +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C c (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop O O c0 (CHead e0 k w)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n0 (s k O)) t u w)))))) +(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop O O c0 (CHead e2 k u)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n0 (s k O)) t e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O +c0 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n0 (s k O)) t u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus n0 (s k O)) t e1 e2)))))))))))) (\lambda (k: +K).(\lambda (i0: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: +T).(\lambda (H2: (subst0 i0 v0 u1 u2)).(\lambda (c: C).(let H3 \def (eq_ind_r +nat i0 (\lambda (n: nat).(subst0 n v0 u1 u2)) H2 (minus (s k i0) (s k O)) +(s_arith0 k i0)) in (or4_intro1 (drop O O (CHead c k u2) (CHead c k u1)) +(ex3_4 K C T T (\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C (CHead c k u1) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c k u2) (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k0 O)) v0 u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c k u1) +(CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop O O (CHead c k u2) (CHead e2 k0 u)))))) (\lambda +(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s +k i0) (s k0 O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c k u1) +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c k u2) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k i0) (s k0 O)) v0 u w)))))) (\lambda +(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2))))))) (ex3_4_intro K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead c k u1) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c k u2) (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k0 O)) v0 u w))))) k c u1 u2 (refl_equal C +(CHead c k u1)) (drop_refl (CHead c k u2)) H3)))))))))) (\lambda (k: +K).(\lambda (i0: nat).(\lambda (c3: C).(\lambda (c4: C).(\lambda (v0: +T).(\lambda (H2: (csubst0 i0 v0 c3 c4)).(\lambda (H3: (or4 (drop O O c4 c3) +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C c3 (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop O O c4 (CHead e0 k w)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k O)) v0 u +w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c3 (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 k u)))))) (\lambda +(k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 +(s k O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop O O c4 (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k +O)) v0 u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus i0 (s k O)) v0 e1 e2))))))))).(\lambda +(u: T).(let H4 \def (eq_ind_r nat i0 (\lambda (n: nat).(csubst0 n v0 c3 c4)) +H2 (minus (s k i0) (s k O)) (s_arith0 k i0)) in (let H5 \def (eq_ind_r nat i0 +(\lambda (n: nat).(or4 (drop O O c4 c3) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop O O c4 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus n (s k O)) v0 u w)))))) (ex3_4 K C C T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 +(CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop O O c4 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n (s k O)) v0 e1 e2)))))) +(ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C c3 (CHead e1 k u))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead +e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus n (s k O)) v0 u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus n (s k O)) v0 e1 e2))))))))) H3 (minus (s k i0) (s k O)) (s_arith0 k +i0)) in (or4_intro2 (drop O O (CHead c4 k u) (CHead c3 k u)) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C +(CHead c3 k u) (CHead e0 k0 u0)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 k u) (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k0 O)) v0 u0 w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead c3 k +u) (CHead e1 k0 u0)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop O O (CHead c4 k u) (CHead e2 k0 u0)))))) (\lambda +(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s +k i0) (s k0 O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 k u) +(CHead e1 k0 u0))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 k u) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s k i0) (s k0 O)) v0 u0 w)))))) (\lambda +(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2))))))) (ex3_4_intro K C C T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C +(CHead c3 k u) (CHead e1 k0 u0)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop O O (CHead c4 k u) (CHead e2 k0 +u0)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2))))) k c3 c4 u (refl_equal C +(CHead c3 k u)) (drop_refl (CHead c4 k u)) H4)))))))))))) (\lambda (k: +K).(\lambda (i0: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: +T).(\lambda (H2: (subst0 i0 v0 u1 u2)).(\lambda (c3: C).(\lambda (c4: +C).(\lambda (H3: (csubst0 i0 v0 c3 c4)).(\lambda (_: (or4 (drop O O c4 c3) +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C c3 (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop O O c4 (CHead e0 k w)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k O)) v0 u +w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c3 (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 k u)))))) (\lambda +(k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 +(s k O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop O O c4 (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k +O)) v0 u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus i0 (s k O)) v0 e1 e2))))))))).(let H5 +\def (eq_ind_r nat i0 (\lambda (n: nat).(subst0 n v0 u1 u2)) H2 (minus (s k +i0) (s k O)) (s_arith0 k i0)) in (let H6 \def (eq_ind_r nat i0 (\lambda (n: +nat).(csubst0 n v0 c3 c4)) H3 (minus (s k i0) (s k O)) (s_arith0 k i0)) in +(or4_intro3 (drop O O (CHead c4 k u2) (CHead c3 k u1)) (ex3_4 K C T T +(\lambda (k0: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead c3 k u1) (CHead e0 k0 u)))))) (\lambda (k0: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 k u2) (CHead e0 k0 +w)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k0 O)) v0 u w)))))) (ex3_4 K C C T (\lambda +(k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c3 k +u1) (CHead e1 k0 u)))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop O O (CHead c4 k u2) (CHead e2 k0 u)))))) (\lambda +(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s +k i0) (s k0 O)) v0 e1 e2)))))) (ex4_5 K C C T T (\lambda (k0: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 k u1) +(CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 k u2) (CHead e2 k0 +w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s k i0) (s k0 O)) v0 u w)))))) (\lambda +(k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2))))))) (ex4_5_intro K C C T T +(\lambda (k0: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead c3 k u1) (CHead e1 k0 u))))))) (\lambda (k0: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 k +u2) (CHead e2 k0 w))))))) (\lambda (k0: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k0 O)) v0 u +w)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2)))))) k c3 c4 +u1 u2 (refl_equal C (CHead c3 k u1)) (drop_refl (CHead c4 k u2)) H5 +H6)))))))))))))) i v c1 c2 H0) e (drop_gen_refl c1 e H1)))))))))) (\lambda +(n0: nat).(\lambda (IHn: ((\forall (i: nat).((lt n0 i) \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 (or4 (drop n0 O c2 e) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop n0 O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (s k n0)) v u w)))))) (ex3_4 K C C T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop n0 O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k n0)) v e1 e2)))))) +(ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c2 (CHead +e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (s k n0)) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (s k n0)) v e1 e2)))))))))))))))))).(\lambda (i: nat).(\lambda (H: +(lt (S n0) i)).(\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 (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k (S n0))) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (s k (S n0))) v e1 e2)))))))))))))) (\lambda (n1: +nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (_: (csubst0 i v (CSort n1) +c2)).(\lambda (e: C).(\lambda (H1: (drop (S n0) O (CSort n1) e)).(and3_ind +(eq C e (CSort n1)) (eq nat (S n0) O) (eq nat O O) (or4 (drop (S n0) O c2 e) +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k (S +n0))) v e1 e2)))))))) (\lambda (H2: (eq C e (CSort n1))).(\lambda (H3: (eq +nat (S n0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n1) (\lambda (c: +C).(or4 (drop (S n0) O c2 c) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 k u)))))) (\lambda (k: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k (S n0))) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (s k (S n0))) v e1 e2))))))))) (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 +(or4 (drop (S n0) O c2 (CSort n1)) (ex3_4 K C T T (\lambda (k: K).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CSort n1) (CHead e0 k u)))))) +(\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (s k (S n0))) v u w)))))) (ex3_4 K C C T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CSort +n1) (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k +(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CSort n1) (CHead e1 +k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k (S n0))) v e1 +e2)))))))) H5)) e H2)))) (drop_gen_sort n1 (S n0) O e H1)))))))) (\lambda (c: +C).(\lambda (H0: ((\forall (c2: C).(\forall (v: T).((csubst0 i v c c2) \to +(\forall (e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C +T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k +(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k (S n0))) v e1 +e2))))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda +(v: T).(\lambda (H1: (csubst0 i v (CHead c k t) c2)).(\lambda (e: C).(\lambda +(H2: (drop (S n0) O (CHead c k t) e)).(let H3 \def (match H1 in csubst0 +return (\lambda (n: nat).(\lambda (t0: T).(\lambda (c0: C).(\lambda (c1: +C).(\lambda (_: (csubst0 n t0 c0 c1)).((eq nat n i) \to ((eq T t0 v) \to ((eq +C c0 (CHead c k t)) \to ((eq C c1 c2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K +C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k (S +n0))) v e1 e2))))))))))))))))) with [(csubst0_snd k0 i0 v0 u1 u2 H3 c0) +\Rightarrow (\lambda (H4: (eq nat (s k0 i0) i)).(\lambda (H5: (eq T v0 +v)).(\lambda (H6: (eq C (CHead c0 k0 u1) (CHead c k t))).(\lambda (H7: (eq C +(CHead c0 k0 u2) c2)).(eq_ind nat (s k0 i0) (\lambda (n: nat).((eq T v0 v) +\to ((eq C (CHead c0 k0 u1) (CHead c k t)) \to ((eq C (CHead c0 k0 u2) c2) +\to ((subst0 i0 v0 u1 u2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n (s k (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n (s k +(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n (s k (S n0))) v e1 +e2))))))))))))) (\lambda (H8: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq +C (CHead c0 k0 u1) (CHead c k t)) \to ((eq C (CHead c0 k0 u2) c2) \to +((subst0 i0 t0 u1 u2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda +(k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k0 i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k0 i0) (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s k0 i0) (s k (S n0))) v e1 e2)))))))))))) (\lambda (H9: (eq C (CHead +c0 k0 u1) (CHead c k t))).(let H10 \def (f_equal C T (\lambda (e0: C).(match +e0 in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ +t) \Rightarrow t])) (CHead c0 k0 u1) (CHead c k t) H9) in ((let H11 \def +(f_equal C K (\lambda (e0: C).(match e0 in C return (\lambda (_: C).K) with +[(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c0 k0 u1) +(CHead c k t) H9) in ((let H12 \def (f_equal C C (\lambda (e0: C).(match e0 +in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) +\Rightarrow c])) (CHead c0 k0 u1) (CHead c k t) H9) in (eq_ind C c (\lambda +(c: C).((eq K k0 k) \to ((eq T u1 t) \to ((eq C (CHead c k0 u2) c2) \to +((subst0 i0 v u1 u2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda +(k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k0 i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k0 i0) (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s k0 i0) (s k (S n0))) v e1 e2))))))))))))) (\lambda (H13: (eq K k0 +k)).(eq_ind K k (\lambda (k: K).((eq T u1 t) \to ((eq C (CHead c k u2) c2) +\to ((subst0 i0 v u1 u2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T +(\lambda (k1: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k1 u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s +k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +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 +(H14: (eq T u1 t)).(eq_ind T t (\lambda (t: T).((eq C (CHead c k u2) c2) \to +((subst0 i0 v t u2) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s k i0) (s k1 (S n0))) v e1 e2))))))))))) (\lambda (H15: (eq C (CHead +c k u2) c2)).(eq_ind C (CHead c k u2) (\lambda (c: C).((subst0 i0 v t u2) \to +(or4 (drop (S n0) O c e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c (CHead +e0 k w)))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda +(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c (CHead e2 k u)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v +e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c (CHead e2 k w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u +w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2)))))))))) +(\lambda (_: (subst0 i0 v t u2)).(let H1 \def (eq_ind K k0 (\lambda (k: +K).(eq nat (s k i0) i)) H4 k H13) in (let H17 \def (eq_ind_r nat i (\lambda +(n: nat).(\forall (c2: C).(\forall (v: T).((csubst0 n v c c2) \to (\forall +(e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n (s k (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n (s k +(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n (s k (S n0))) v e1 +e2)))))))))))))) H0 (s k i0) H1) in (let H18 \def (eq_ind_r nat i (\lambda +(n: nat).(lt (S n0) n)) H (s k i0) H1) in (K_ind (\lambda (k: K).((drop (r k +n0) O c e) \to (((\forall (c2: C).(\forall (v: T).((csubst0 (s k i0) v c c2) +\to (\forall (e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 +K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s +k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead +e2 k u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s k i0) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k0 (S n0))) v u w)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s k i0) (s k0 (S n0))) v e1 e2)))))))))))))) \to ((lt (S n0) (s k +i0)) \to (or4 (drop (S n0) O (CHead c k u2) e) (ex3_4 K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 +u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c k u2) (CHead e0 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s +k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c k +u2) (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2)))))) +(ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c k u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s +k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v +e1 e2)))))))))))) (\lambda (b: B).(\lambda (H2: (drop (r (Bind b) n0) O c +e)).(\lambda (_: ((\forall (c2: C).(\forall (v: T).((csubst0 (s (Bind b) i0) +v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 +e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead +e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T +T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k +w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Bind b) i0))).(or4_intro0 (drop +(S n0) O (CHead c (Bind b) u2) e) (ex3_4 K C T T (\lambda (k: K).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda +(k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +c (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) u2) +(CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S +n0))) v e1 e2))))))) (drop_drop (Bind b) n0 c e H2 u2)))))) (\lambda (f: +F).(\lambda (H2: (drop (r (Flat f) n0) O c e)).(\lambda (_: ((\forall (c2: +C).(\forall (v: T).((csubst0 (s (Flat f) i0) v c c2) \to (\forall (e: +C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda +(k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))))))))))).(\lambda (_: (lt +(S n0) (s (Flat f) i0))).(or4_intro0 (drop (S n0) O (CHead c (Flat f) u2) e) +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c (Flat f) u2) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Flat f) u2) (CHead e2 k u)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c (Flat f) u2) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))) (drop_drop (Flat f) n0 c +e H2 u2)))))) k (drop_gen_drop k c e t n0 H2) H17 H18))))) c2 H15)) u1 +(sym_eq T u1 t H14))) k0 (sym_eq K k0 k H13))) c0 (sym_eq C c0 c H12))) H11)) +H10))) v0 (sym_eq T v0 v H8))) i H4 H5 H6 H7 H3))))) | (csubst0_fst k0 i0 c1 +c0 v0 H3 u) \Rightarrow (\lambda (H4: (eq nat (s k0 i0) i)).(\lambda (H5: (eq +T v0 v)).(\lambda (H6: (eq C (CHead c1 k0 u) (CHead c k t))).(\lambda (H7: +(eq C (CHead c0 k0 u) c2)).(eq_ind nat (s k0 i0) (\lambda (n: nat).((eq T v0 +v) \to ((eq C (CHead c1 k0 u) (CHead c k t)) \to ((eq C (CHead c0 k0 u) c2) +\to ((csubst0 i0 v0 c1 c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus n (s k (S +n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 (CHead e2 k +u0)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus n (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus n (s k (S n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n (s k (S +n0))) v e1 e2))))))))))))) (\lambda (H8: (eq T v0 v)).(eq_ind T v (\lambda +(t0: T).((eq C (CHead c1 k0 u) (CHead c k t)) \to ((eq C (CHead c0 k0 u) c2) +\to ((csubst0 i0 t0 c1 c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k0 i0) +(s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 (CHead +e2 k u0)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s k0 i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(_: T).(eq C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k +w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k (S n0))) v u0 w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s k0 i0) (s k (S n0))) v e1 e2)))))))))))) (\lambda +(H9: (eq C (CHead c1 k0 u) (CHead c k t))).(let H10 \def (f_equal C T +(\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) with [(CSort _) +\Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k0 u) (CHead c k t) +H9) in ((let H11 \def (f_equal C K (\lambda (e0: C).(match e0 in C return +(\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow +k])) (CHead c1 k0 u) (CHead c k t) H9) in ((let H12 \def (f_equal C C +(\lambda (e0: C).(match e0 in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k0 u) (CHead c k t) +H9) in (eq_ind C c (\lambda (c: C).((eq K k0 k) \to ((eq T u t) \to ((eq C +(CHead c0 k0 u) c2) \to ((csubst0 i0 v c c0) \to (or4 (drop (S n0) O c2 e) +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: +T).(eq C e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k0 i0) +(s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 (CHead +e2 k u0)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s k0 i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(_: T).(eq C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k +w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k (S n0))) v u0 w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s k0 i0) (s k (S n0))) v e1 e2))))))))))))) (\lambda +(H13: (eq K k0 k)).(eq_ind K k (\lambda (k: K).((eq T u t) \to ((eq C (CHead +c0 k u) c2) \to ((csubst0 i0 v c c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C +T T (\lambda (k1: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C +e (CHead e0 k1 u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k i0) +(s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 +(CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2)))))) +(ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 u0))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c2 (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v +u0 w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 +e2)))))))))))) (\lambda (H14: (eq T u t)).(eq_ind T t (\lambda (t: T).((eq C +(CHead c0 k t) c2) \to ((csubst0 i0 v c c0) \to (or4 (drop (S n0) O c2 e) +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: +T).(eq C e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k i0) +(s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 (CHead +e2 k u0)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(_: T).(eq C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k +w))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u0 w)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2))))))))))) (\lambda +(H15: (eq C (CHead c0 k t) c2)).(eq_ind C (CHead c0 k t) (\lambda (c2: +C).((csubst0 i0 v c c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda +(k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k +u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v +u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c2 (CHead e2 k u0)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s k i0) (s k1 (S n0))) v e1 e2)))))))))) (\lambda (H16: (csubst0 i0 v +c c0)).(let H1 \def (eq_ind K k0 (\lambda (k: K).(eq nat (s k i0) i)) H4 k +H13) in (let H17 \def (eq_ind_r nat i (\lambda (n: nat).(\forall (c2: +C).(\forall (v: T).((csubst0 n v c c2) \to (\forall (e: C).((drop (S n0) O c +e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead +e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus n (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n (s k (S n0))) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus n (s k (S n0))) v e1 e2)))))))))))))) H0 (s k i0) H1) +in (let H18 \def (eq_ind_r nat i (\lambda (n: nat).(lt (S n0) n)) H (s k i0) +H1) in (K_ind (\lambda (k: K).((drop (r k n0) O c e) \to (((\forall (c2: +C).(\forall (v: T).((csubst0 (s k i0) v c c2) \to (\forall (e: C).((drop (S +n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k0: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k0 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) +(\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k i0) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k0 (S n0))) v u w)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s k i0) (s k0 (S n0))) v e1 e2)))))))))))))) \to ((lt (S n0) (s k +i0)) \to (or4 (drop (S n0) O (CHead c0 k t) e) (ex3_4 K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k1 +u0)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c0 k t) (CHead e0 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s k i0) +(s k1 (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k1 u0)))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O +(CHead c0 k t) (CHead e2 k1 u0)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v +e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k1 u0))))))) (\lambda +(k1: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c0 k t) (CHead e2 k1 w))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s k i0) (s k1 (S n0))) v u0 w)))))) (\lambda (k1: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k i0) +(s k1 (S n0))) v e1 e2)))))))))))) (\lambda (b: B).(\lambda (H2: (drop (r +(Bind b) n0) O c e)).(\lambda (_: ((\forall (c2: C).(\forall (v: T).((csubst0 +(s (Bind b) i0) v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (or4 +(drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S +n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Bind b) i0) (s k (S n0))) v e1 e2))))))))))))))).(\lambda (H: (lt (S n0) (s +(Bind b) i0))).(let H19 \def (IHn i0 (le_S_n (S n0) i0 H) c c0 v H16 e H2) in +(or4_ind (drop n0 O c0 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k u0)))))) (\lambda (k: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e0 k +w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus i0 (s k n0)) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k +u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop n0 O c0 (CHead e2 k u0)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k n0)) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k u0))))))) (\lambda +(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop +n0 O c0 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus i0 (s k n0)) v u0 w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i0 (s k n0)) v e1 e2))))))) (or4 (drop (S n0) O (CHead +c0 (Bind b) t) e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) +(CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C +T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) +(CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 +w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2)))))))) (\lambda (H20: (drop n0 O c0 e)).(or4_intro0 (drop (S n0) O (CHead +c0 (Bind b) t) e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) +(CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C +T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) +(CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 +w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2))))))) (drop_drop (Bind b) n0 c0 e H20 t))) (\lambda (H20: (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop n0 O c0 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k n0)) v u +w))))))).(ex3_4_ind K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e0 k w)))))) (\lambda +(k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus i0 (s +k n0)) v u0 w))))) (or4 (drop (S n0) O (CHead c0 (Bind b) t) e) (ex3_4 K C T +T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k +u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: +K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H21: (eq C e +(CHead x1 x0 x2))).(\lambda (H22: (drop n0 O c0 (CHead x1 x0 x3))).(\lambda +(H23: (subst0 (minus i0 (s x0 n0)) v x2 x3)).(eq_ind_r C (CHead x1 x0 x2) +(\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Bind b) t) c) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c +(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c (CHead e1 k +u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S +n0) O (CHead c0 (Bind b) t) (CHead x1 x0 x2)) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) +(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 x2) +(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C (CHead x1 x0 x2) (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 +(Bind b) t) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S +n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2))))))) (ex3_4_intro K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e0 k u0)))))) (\lambda (k: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 +(Bind b) t) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w))))) +x0 x1 x2 x3 (refl_equal C (CHead x1 x0 x2)) (drop_drop (Bind b) n0 c0 (CHead +x1 x0 x3) H22 t) (eq_ind_r nat (S (s x0 n0)) (\lambda (n: nat).(subst0 (minus +(s (Bind b) i0) n) v x2 x3)) H23 (s x0 (S n0)) (s_S x0 n0)))) e H21)))))))) +H20)) (\lambda (H20: (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c0 (CHead e2 k u)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i0 (s k n0)) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k +u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop n0 O c0 (CHead e2 k u0)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k n0)) v e1 e2))))) +(or4 (drop (S n0) O (CHead c0 (Bind b) t) e) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k +u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind +b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S +n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k +(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: +K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H21: (eq C e +(CHead x1 x0 x3))).(\lambda (H22: (drop n0 O c0 (CHead x2 x0 x3))).(\lambda +(H23: (csubst0 (minus i0 (s x0 n0)) v x1 x2)).(eq_ind_r C (CHead x1 x0 x3) +(\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Bind b) t) c) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c +(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c (CHead e1 k +u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S +n0) O (CHead c0 (Bind b) t) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) +(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 x3) +(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C (CHead x1 x0 x3) (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 +(Bind b) t) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S +n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2))))))) (ex3_4_intro K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C (CHead x1 x0 x3) (CHead e1 k u0)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O (CHead c0 +(Bind b) t) (CHead e2 k u0)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2))))) x0 x1 x2 x3 (refl_equal C (CHead x1 x0 x3)) (drop_drop (Bind b) n0 c0 +(CHead x2 x0 x3) H22 t) (eq_ind_r nat (S (s x0 n0)) (\lambda (n: +nat).(csubst0 (minus (s (Bind b) i0) n) v x1 x2)) H23 (s x0 (S n0)) (s_S x0 +n0)))) e H21)))))))) H20)) (\lambda (H20: (ex4_5 K C C T T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i0 (s k n0)) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k +n0)) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 O c0 (CHead e2 k w))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus i0 (s k n0)) v u0 w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k n0)) v e1 +e2)))))) (or4 (drop (S n0) O (CHead c0 (Bind b) t) e) (ex3_4 K C T T (\lambda +(k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k +u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind +b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S +n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k +(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: +K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H21: (eq C e (CHead x1 x0 x3))).(\lambda (H22: (drop n0 O c0 +(CHead x2 x0 x4))).(\lambda (H23: (subst0 (minus i0 (s x0 n0)) v x3 +x4)).(\lambda (H24: (csubst0 (minus i0 (s x0 n0)) v x1 x2)).(eq_ind_r C +(CHead x1 x0 x3) (\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Bind b) t) c) +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: +T).(eq C c (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c (CHead e1 k +u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro3 (drop (S +n0) O (CHead c0 (Bind b) t) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) +(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 x3) +(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k u0)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C (CHead x1 x0 x3) (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 +(Bind b) t) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S +n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2))))))) (ex4_5_intro K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) x0 x1 x2 x3 x4 (refl_equal +C (CHead x1 x0 x3)) (drop_drop (Bind b) n0 c0 (CHead x2 x0 x4) H22 t) +(eq_ind_r nat (S (s x0 n0)) (\lambda (n: nat).(subst0 (minus (s (Bind b) i0) +n) v x3 x4)) H23 (s x0 (S n0)) (s_S x0 n0)) (eq_ind_r nat (S (s x0 n0)) +(\lambda (n: nat).(csubst0 (minus (s (Bind b) i0) n) v x1 x2)) H24 (s x0 (S +n0)) (s_S x0 n0)))) e H21)))))))))) H20)) H19)))))) (\lambda (f: F).(\lambda +(H2: (drop (r (Flat f) n0) O c e)).(\lambda (H0: ((\forall (c2: C).(\forall +(v: T).((csubst0 (s (Flat f) i0) v c c2) \to (\forall (e: C).((drop (S n0) O +c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda +(k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 +(CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (ex3_4 K C C +T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S +n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s +(Flat f) i0) (s k (S n0))) v e1 e2))))))))))))))).(\lambda (_: (lt (S n0) (s +(Flat f) i0))).(let H19 \def (H0 c0 v H16 e H2) in (or4_ind (drop (S n0) O c0 +e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda +(_: T).(eq C e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus i0 (s k (S +n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c0 (CHead e2 k +u0)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i0 (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus i0 (s k (S n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k +(S n0))) v e1 e2))))))) (or4 (drop (S n0) O (CHead c0 (Flat f) t) e) (ex3_4 K +C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C +e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k +u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (H20: (drop (S +n0) O c0 e)).(or4_intro0 (drop (S n0) O (CHead c0 (Flat f) t) e) (ex3_4 K C T +T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k +u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))) (drop_drop (Flat f) n0 c0 +e H20 t))) (\lambda (H20: (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead +e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i0 (s k (S n0))) v u w))))))).(ex3_4_ind K C T T (\lambda +(k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k +u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c0 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus i0 (s k (S n0))) v u0 +w))))) (or4 (drop (S n0) O (CHead c0 (Flat f) t) e) (ex3_4 K C T T (\lambda +(k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 k +u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Flat +f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (S +n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k +(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: +K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H21: (eq C e +(CHead x1 x0 x2))).(\lambda (H22: (drop (S n0) O c0 (CHead x1 x0 +x3))).(\lambda (H23: (subst0 (minus i0 (s x0 (S n0))) v x2 x3)).(eq_ind_r C +(CHead x1 x0 x2) (\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Flat f) t) c) +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: +T).(eq C c (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c (CHead e1 k +u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S +n0) O (CHead c0 (Flat f) t) (CHead x1 x0 x2)) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) +(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 x2) +(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C (CHead x1 x0 x2) (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 +(Flat f) t) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S +n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2))))))) (ex3_4_intro K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e0 k u0)))))) (\lambda (k: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 +(Flat f) t) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w))))) +x0 x1 x2 x3 (refl_equal C (CHead x1 x0 x2)) (drop_drop (Flat f) n0 c0 (CHead +x1 x0 x3) H22 t) H23)) e H21)))))))) H20)) (\lambda (H20: (ex3_4 K C C T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (S n0) O c0 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k (S n0))) v e1 +e2))))))).(ex3_4_ind K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O c0 (CHead e2 k u0)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i0 (s k (S n0))) v e1 e2))))) (or4 (drop (S n0) O (CHead c0 (Flat f) +t) e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) +(CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C +T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C e (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) +(CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 +w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2)))))))) (\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: +T).(\lambda (H21: (eq C e (CHead x1 x0 x3))).(\lambda (H22: (drop (S n0) O c0 +(CHead x2 x0 x3))).(\lambda (H23: (csubst0 (minus i0 (s x0 (S n0))) v x1 +x2)).(eq_ind_r C (CHead x1 x0 x3) (\lambda (c: C).(or4 (drop (S n0) O (CHead +c0 (Flat f) t) c) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (_: T).(eq C c (CHead e0 k u0)))))) (\lambda (k: K).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) +(CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C +T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c +(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C c (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) +(CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 +w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2))))))))) (or4_intro2 (drop (S n0) O (CHead c0 (Flat f) t) (CHead x1 x0 +x3)) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e0 k u0)))))) (\lambda (k: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 +(Flat f) t) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) +(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(eq C (CHead x1 x0 x3) (CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Flat f) t) +(CHead e2 k u0)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))) (ex3_4_intro K C C T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C +(CHead x1 x0 x3) (CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Flat f) t) +(CHead e2 k u0)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))) +x0 x1 x2 x3 (refl_equal C (CHead x1 x0 x3)) (drop_drop (Flat f) n0 c0 (CHead +x2 x0 x3) H22 t) H23)) e H21)))))))) H20)) (\lambda (H20: (ex4_5 K C C T T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i0 (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k +(S n0))) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 k w))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus i0 (s k (S n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k +(S n0))) v e1 e2)))))) (or4 (drop (S n0) O (CHead c0 (Flat f) t) e) (ex3_4 K +C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C +e (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 k +u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: +K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H21: (eq C e (CHead x1 x0 x3))).(\lambda (H22: (drop (S n0) O c0 +(CHead x2 x0 x4))).(\lambda (H23: (subst0 (minus i0 (s x0 (S n0))) v x3 +x4)).(\lambda (H24: (csubst0 (minus i0 (s x0 (S n0))) v x1 x2)).(eq_ind_r C +(CHead x1 x0 x3) (\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Flat f) t) c) +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: +T).(eq C c (CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c (CHead e1 k +u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro3 (drop (S +n0) O (CHead c0 (Flat f) t) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) +(CHead e0 k u0)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 x0 x3) +(CHead e1 k u0)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k u0)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda +(k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C (CHead x1 x0 x3) (CHead e1 k u0))))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 +(Flat f) t) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S +n0))) v u0 w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2))))))) (ex4_5_intro K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k +u0))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) t) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u0 w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))) x0 x1 x2 x3 x4 (refl_equal +C (CHead x1 x0 x3)) (drop_drop (Flat f) n0 c0 (CHead x2 x0 x4) H22 t) H23 +H24)) e H21)))))))))) H20)) H19)))))) k (drop_gen_drop k c e t n0 H2) H17 +H18))))) c2 H15)) u (sym_eq T u t H14))) k0 (sym_eq K k0 k H13))) c1 (sym_eq +C c1 c H12))) H11)) H10))) v0 (sym_eq T v0 v H8))) i H4 H5 H6 H7 H3))))) | +(csubst0_both k0 i0 v0 u1 u2 H3 c1 c0 H4) \Rightarrow (\lambda (H5: (eq nat +(s k0 i0) i)).(\lambda (H6: (eq T v0 v)).(\lambda (H7: (eq C (CHead c1 k0 u1) +(CHead c k t))).(\lambda (H8: (eq C (CHead c0 k0 u2) c2)).(eq_ind nat (s k0 +i0) (\lambda (n: nat).((eq T v0 v) \to ((eq C (CHead c1 k0 u1) (CHead c k t)) +\to ((eq C (CHead c0 k0 u2) c2) \to ((subst0 i0 v0 u1 u2) \to ((csubst0 i0 v0 +c1 c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda +(k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 +(CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 (minus n (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n (s k (S n0))) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus n (s k (S n0))) v e1 e2)))))))))))))) (\lambda (H9: +(eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq C (CHead c1 k0 u1) (CHead c k +t)) \to ((eq C (CHead c0 k0 u2) c2) \to ((subst0 i0 t0 u1 u2) \to ((csubst0 +i0 t0 c1 c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k0 i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k0 i0) (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s k0 i0) (s k (S n0))) v e1 e2))))))))))))) (\lambda (H10: (eq C +(CHead c1 k0 u1) (CHead c k t))).(let H11 \def (f_equal C T (\lambda (e0: +C).(match e0 in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u1 | +(CHead _ _ t) \Rightarrow t])) (CHead c1 k0 u1) (CHead c k t) H10) in ((let +H12 \def (f_equal C K (\lambda (e0: C).(match e0 in C return (\lambda (_: +C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead +c1 k0 u1) (CHead c k t) H10) in ((let H13 \def (f_equal C C (\lambda (e0: +C).(match e0 in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | +(CHead c _ _) \Rightarrow c])) (CHead c1 k0 u1) (CHead c k t) H10) in (eq_ind +C c (\lambda (c: C).((eq K k0 k) \to ((eq T u1 t) \to ((eq C (CHead c0 k0 u2) +c2) \to ((subst0 i0 v u1 u2) \to ((csubst0 i0 v c c0) \to (or4 (drop (S n0) O +c2 e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s k0 i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s k0 i0) (s k (S n0))) v +e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k0 i0) (s k (S n0))) v u +w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus (s k0 i0) (s k (S n0))) v e1 +e2)))))))))))))) (\lambda (H14: (eq K k0 k)).(eq_ind K k (\lambda (k: K).((eq +T u1 t) \to ((eq C (CHead c0 k u2) c2) \to ((subst0 i0 v u1 u2) \to ((csubst0 +i0 v c c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 +u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c2 (CHead e0 k1 w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k1 u)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k1: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k1 u))))))) (\lambda (k1: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k1 w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s k i0) (s k1 (S n0))) v e1 e2))))))))))))) (\lambda (H15: (eq T u1 +t)).(eq_ind T t (\lambda (t: T).((eq C (CHead c0 k u2) c2) \to ((subst0 i0 v +t u2) \to ((csubst0 i0 v c c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s k i0) (s k1 (S n0))) v e1 e2)))))))))))) (\lambda (H16: (eq C +(CHead c0 k u2) c2)).(eq_ind C (CHead c0 k u2) (\lambda (c2: C).((subst0 i0 v +t u2) \to ((csubst0 i0 v c c0) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s k1 (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) +(\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s k i0) (s k1 (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k1: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k1 (S n0))) v u w)))))) (\lambda (k1: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s k i0) (s k1 (S n0))) v e1 e2))))))))))) (\lambda (_: (subst0 i0 v t +u2)).(\lambda (H18: (csubst0 i0 v c c0)).(let H1 \def (eq_ind K k0 (\lambda +(k: K).(eq nat (s k i0) i)) H5 k H14) in (let H19 \def (eq_ind_r nat i +(\lambda (n: nat).(\forall (c2: C).(\forall (v: T).((csubst0 n v c c2) \to +(\forall (e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 K C +T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus n (s k (S n0))) v u w)))))) +(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c2 (CHead e2 k u)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus n (s k +(S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus n (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus n (s k (S n0))) v e1 +e2)))))))))))))) H0 (s k i0) H1) in (let H20 \def (eq_ind_r nat i (\lambda +(n: nat).(lt (S n0) n)) H (s k i0) H1) in (K_ind (\lambda (k: K).((drop (r k +n0) O c e) \to (((\forall (c2: C).(\forall (v: T).((csubst0 (s k i0) v c c2) +\to (\forall (e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 e) (ex3_4 +K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k0: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s +k0 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead +e2 k u)))))) (\lambda (k0: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s k i0) (s k0 (S n0))) v e1 e2)))))) (ex4_5 K C C T T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k w))))))) +(\lambda (k0: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s k i0) (s k0 (S n0))) v u w)))))) (\lambda (k0: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s k i0) (s k0 (S n0))) v e1 e2)))))))))))))) \to ((lt (S n0) (s k +i0)) \to (or4 (drop (S n0) O (CHead c0 k u2) e) (ex3_4 K C T T (\lambda (k1: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k1 +u)))))) (\lambda (k1: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c0 k u2) (CHead e0 k1 w)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s +k1 (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k1: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k1 u)))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 +k u2) (CHead e2 k1 u)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v e1 e2)))))) +(ex4_5 K C C T T (\lambda (k1: K).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 k1 u))))))) (\lambda (k1: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 k u2) (CHead e2 k1 w))))))) (\lambda (k1: K).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s k i0) (s +k1 (S n0))) v u w)))))) (\lambda (k1: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s k i0) (s k1 (S n0))) v +e1 e2)))))))))))) (\lambda (b: B).(\lambda (H2: (drop (r (Bind b) n0) O c +e)).(\lambda (_: ((\forall (c2: C).(\forall (v: T).((csubst0 (s (Bind b) i0) +v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 +e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead +e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T +T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k +w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2))))))))))))))).(\lambda (H: (lt (S n0) (s (Bind b) i0))).(let H21 \def +(IHn i0 (le_S_n (S n0) i0 H) c c0 v H18 e H2) in (or4_ind (drop n0 O c0 e) +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 O c0 (CHead e0 k w)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k n0)) v u +w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c0 (CHead e2 k u)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i0 (s k n0)) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 O c0 (CHead e2 k w))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i0 (s k n0)) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k n0)) v e1 +e2))))))) (or4 (drop (S n0) O (CHead c0 (Bind b) u2) e) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 +(Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s +(Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (H22: (drop n0 O c0 +e)).(or4_intro0 (drop (S n0) O (CHead c0 (Bind b) u2) e) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 +(Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s +(Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k (S n0))) v e1 e2))))))) (drop_drop (Bind b) n0 c0 e H22 u2))) +(\lambda (H22: (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e0 k w)))))) (\lambda +(k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k +n0)) v u w))))))).(ex3_4_ind K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: +K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e0 k +w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i0 (s k n0)) v u w))))) (or4 (drop (S n0) O (CHead c0 (Bind +b) u2) e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) u2) +(CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u w)))))) (ex3_4 K C C +T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e2 k u)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: +K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H23: (eq C e +(CHead x1 x0 x2))).(\lambda (H24: (drop n0 O c0 (CHead x1 x0 x3))).(\lambda +(H25: (subst0 (minus i0 (s x0 n0)) v x2 x3)).(eq_ind_r C (CHead x1 x0 x2) +(\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Bind b) u2) c) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 +(Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s +(Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead c0 +(Bind b) u2) (CHead x1 x0 x2)) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e0 k u)))))) +(\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C (CHead x1 x0 x2) (CHead e1 k u)))))) (\lambda +(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead +c0 (Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2))))))) (ex3_4_intro K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead +x1 x0 x2) (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Bind b) i0) (s k (S n0))) v u w))))) x0 x1 x2 x3 (refl_equal C +(CHead x1 x0 x2)) (drop_drop (Bind b) n0 c0 (CHead x1 x0 x3) H24 u2) +(eq_ind_r nat (S (s x0 n0)) (\lambda (n: nat).(subst0 (minus (s (Bind b) i0) +n) v x2 x3)) H25 (s x0 (S n0)) (s_S x0 n0)))) e H23)))))))) H22)) (\lambda +(H22: (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c0 (CHead e2 k u)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i0 (s k n0)) v e1 e2))))))).(ex3_4_ind K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop n0 O c0 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k n0)) v e1 e2))))) +(or4 (drop (S n0) O (CHead c0 (Bind b) u2) e) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 +(Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s +(Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: +C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H23: (eq C e (CHead x1 x0 +x3))).(\lambda (H24: (drop n0 O c0 (CHead x2 x0 x3))).(\lambda (H25: (csubst0 +(minus i0 (s x0 n0)) v x1 x2)).(eq_ind_r C (CHead x1 x0 x3) (\lambda (c: +C).(or4 (drop (S n0) O (CHead c0 (Bind b) u2) c) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 +(Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s +(Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c0 +(Bind b) u2) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e0 k u)))))) +(\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C (CHead x1 x0 x3) (CHead e1 k u)))))) (\lambda +(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead +c0 (Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2))))))) (ex3_4_intro K C C T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead +x1 x0 x3) (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e2 k u)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2))))) x0 x1 x2 x3 (refl_equal C +(CHead x1 x0 x3)) (drop_drop (Bind b) n0 c0 (CHead x2 x0 x3) H24 u2) +(eq_ind_r nat (S (s x0 n0)) (\lambda (n: nat).(csubst0 (minus (s (Bind b) i0) +n) v x1 x2)) H25 (s x0 (S n0)) (s_S x0 n0)))) e H23)))))))) H22)) (\lambda +(H22: (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 +O c0 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k n0)) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i0 (s k n0)) v e1 e2)))))))).(ex4_5_ind K C C T T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i0 (s k n0)) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k +n0)) v e1 e2)))))) (or4 (drop (S n0) O (CHead c0 (Bind b) u2) e) (ex3_4 K C T +T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 +(Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s +(Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: +C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H23: (eq C e +(CHead x1 x0 x3))).(\lambda (H24: (drop n0 O c0 (CHead x2 x0 x4))).(\lambda +(H25: (subst0 (minus i0 (s x0 n0)) v x3 x4)).(\lambda (H26: (csubst0 (minus +i0 (s x0 n0)) v x1 x2)).(eq_ind_r C (CHead x1 x0 x3) (\lambda (c: C).(or4 +(drop (S n0) O (CHead c0 (Bind b) u2) c) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 +(Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s +(Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Bind +b) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead c0 +(Bind b) u2) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e0 k u)))))) +(\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead c0 (Bind b) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C (CHead x1 x0 x3) (CHead e1 k u)))))) (\lambda +(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead +c0 (Bind b) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Bind b) u2) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Bind b) i0) (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Bind b) i0) (s k (S n0))) v e1 e2))))))) (ex4_5_intro K C C T T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C (CHead x1 x0 x3) (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 +(Bind b) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Bind b) i0) (s k (S +n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Bind b) i0) (s k (S n0))) v e1 +e2)))))) x0 x1 x2 x3 x4 (refl_equal C (CHead x1 x0 x3)) (drop_drop (Bind b) +n0 c0 (CHead x2 x0 x4) H24 u2) (eq_ind_r nat (S (s x0 n0)) (\lambda (n: +nat).(subst0 (minus (s (Bind b) i0) n) v x3 x4)) H25 (s x0 (S n0)) (s_S x0 +n0)) (eq_ind_r nat (S (s x0 n0)) (\lambda (n: nat).(csubst0 (minus (s (Bind +b) i0) n) v x1 x2)) H26 (s x0 (S n0)) (s_S x0 n0)))) e H23)))))))))) H22)) +H21)))))) (\lambda (f: F).(\lambda (H2: (drop (r (Flat f) n0) O c +e)).(\lambda (H0: ((\forall (c2: C).(\forall (v: T).((csubst0 (s (Flat f) i0) +v c c2) \to (\forall (e: C).((drop (S n0) O c e) \to (or4 (drop (S n0) O c2 +e) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c2 (CHead +e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T +T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c2 (CHead e2 k +w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2))))))))))))))).(\lambda (_: (lt (S n0) (s (Flat f) i0))).(let H21 \def (H0 +c0 v H18 e H2) in (or4_ind (drop (S n0) O c0 e) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c0 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c0 (CHead e2 k u)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i0 (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i0 (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k +(S n0))) v e1 e2))))))) (or4 (drop (S n0) O (CHead c0 (Flat f) u2) e) (ex3_4 +K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e2 k u)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k (S n0))) v e1 e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (H22: (drop (S +n0) O c0 e)).(or4_intro0 (drop (S n0) O (CHead c0 (Flat f) u2) e) (ex3_4 K C +T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 +(Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s +(Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k (S n0))) v e1 e2))))))) (drop_drop (Flat f) n0 c0 e H22 u2))) +(\lambda (H22: (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i0 (s k (S n0))) v u w))))))).(ex3_4_ind K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O c0 (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k (S n0))) v u w))))) +(or4 (drop (S n0) O (CHead c0 (Flat f) u2) e) (ex3_4 K C T T (\lambda (k: +K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 +(Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s +(Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: +C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H23: (eq C e (CHead x1 x0 +x2))).(\lambda (H24: (drop (S n0) O c0 (CHead x1 x0 x3))).(\lambda (H25: +(subst0 (minus i0 (s x0 (S n0))) v x2 x3)).(eq_ind_r C (CHead x1 x0 x2) +(\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Flat f) u2) c) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 +(Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s +(Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead c0 +(Flat f) u2) (CHead x1 x0 x2)) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e0 k u)))))) +(\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C (CHead x1 x0 x2) (CHead e1 k u)))))) (\lambda +(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead +c0 (Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x2) (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))) (ex3_4_intro K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead +x1 x0 x2) (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus (s (Flat f) i0) (s k (S n0))) v u w))))) x0 x1 x2 x3 (refl_equal C +(CHead x1 x0 x2)) (drop_drop (Flat f) n0 c0 (CHead x1 x0 x3) H24 u2) H25)) e +H23)))))))) H22)) (\lambda (H22: (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c0 (CHead +e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i0 (s k (S n0))) v e1 e2))))))).(ex3_4_ind K C C T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (S n0) O c0 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (s k (S n0))) v e1 +e2))))) (or4 (drop (S n0) O (CHead c0 (Flat f) u2) e) (ex3_4 K C T T (\lambda +(k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k +u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 +(Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s +(Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: +C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H23: (eq C e (CHead x1 x0 +x3))).(\lambda (H24: (drop (S n0) O c0 (CHead x2 x0 x3))).(\lambda (H25: +(csubst0 (minus i0 (s x0 (S n0))) v x1 x2)).(eq_ind_r C (CHead x1 x0 x3) +(\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Flat f) u2) c) (ex3_4 K C T T +(\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 +(Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s +(Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c0 +(Flat f) u2) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e0 k u)))))) +(\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C (CHead x1 x0 x3) (CHead e1 k u)))))) (\lambda +(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead +c0 (Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))) (ex3_4_intro K C C T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead +x1 x0 x3) (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e2 k u)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))) x0 x1 x2 x3 (refl_equal C +(CHead x1 x0 x3)) (drop_drop (Flat f) n0 c0 (CHead x2 x0 x3) H24 u2) H25)) e +H23)))))))) H22)) (\lambda (H22: (ex4_5 K C C T T (\lambda (k: K).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 k w))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i0 (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (s k (S n0))) v e1 +e2)))))))).(ex4_5_ind K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c0 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (s k (S n0))) v u +w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i0 (s k (S n0))) v e1 e2)))))) (or4 (drop +(S n0) O (CHead c0 (Flat f) u2) e) (ex3_4 K C T T (\lambda (k: K).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 k u)))))) (\lambda +(k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead +c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u +w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 (Flat f) u2) +(CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s +(Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k (S n0))) v e1 e2)))))))) (\lambda (x0: K).(\lambda (x1: +C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H23: (eq C e +(CHead x1 x0 x3))).(\lambda (H24: (drop (S n0) O c0 (CHead x2 x0 +x4))).(\lambda (H25: (subst0 (minus i0 (s x0 (S n0))) v x3 x4)).(\lambda +(H26: (csubst0 (minus i0 (s x0 (S n0))) v x1 x2)).(eq_ind_r C (CHead x1 x0 +x3) (\lambda (c: C).(or4 (drop (S n0) O (CHead c0 (Flat f) u2) c) (ex3_4 K C +T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c +(CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) +i0) (s k (S n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 k u)))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead c0 +(Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s +(Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus (s (Flat +f) i0) (s k (S n0))) v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead c0 +(Flat f) u2) (CHead x1 x0 x3)) (ex3_4 K C T T (\lambda (k: K).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e0 k u)))))) +(\lambda (k: K).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) +O (CHead c0 (Flat f) u2) (CHead e0 k w)))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S +n0))) v u w)))))) (ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C (CHead x1 x0 x3) (CHead e1 k u)))))) (\lambda +(k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O (CHead +c0 (Flat f) u2) (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 x0 x3) (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O (CHead c0 (Flat f) u2) (CHead e2 k w))))))) +(\lambda (k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus (s (Flat f) i0) (s k (S n0))) v u w)))))) (\lambda (k: +K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus (s (Flat f) i0) (s k (S n0))) v e1 e2))))))) (ex4_5_intro K C C T T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C (CHead x1 x0 x3) (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O (CHead c0 +(Flat f) u2) (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus (s (Flat f) i0) (s k (S +n0))) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus (s (Flat f) i0) (s k (S n0))) v e1 +e2)))))) x0 x1 x2 x3 x4 (refl_equal C (CHead x1 x0 x3)) (drop_drop (Flat f) +n0 c0 (CHead x2 x0 x4) H24 u2) H25 H26)) e H23)))))))))) H22)) H21)))))) k +(drop_gen_drop k c e t n0 H2) H19 H20)))))) c2 H16)) u1 (sym_eq T u1 t H15))) +k0 (sym_eq K k0 k H14))) c1 (sym_eq C c1 c H13))) H12)) H11))) v0 (sym_eq T +v0 v H9))) i H5 H6 H7 H8 H3 H4)))))]) in (H3 (refl_equal nat i) (refl_equal T +v) (refl_equal C (CHead c k t)) (refl_equal C c2)))))))))))) c1)))))) n). + +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 +e) \to (or4 (drop 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 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 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 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 (c1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda +(H: (csubst0 O v c1 c2)).(\lambda (e: C).(\lambda (H0: (drop O O c1 +e)).(eq_ind C c1 (\lambda (c: C).(or4 (drop O O c2 c) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop O 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 c +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop O 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 c (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O 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))))))))) (insert_eq nat O (\lambda (n0: nat).(csubst0 n0 v c1 c2)) +(or4 (drop O O c2 c1) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c1 (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop O 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 c1 (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop O 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 c1 (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O 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 (y: nat).(\lambda (H1: (csubst0 y v c1 c2)).(csubst0_ind +(\lambda (n0: nat).(\lambda (t: T).(\lambda (c: C).(\lambda (c0: C).((eq nat +n0 O) \to (or4 (drop O O c0 c) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O c0 +(CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O t u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop O O c0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O t e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C c (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O c0 (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O t u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O t e1 +e2))))))))))))) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: +nat).(\forall (v0: T).(\forall (u1: T).(\forall (u2: T).((subst0 i v0 u1 u2) +\to (\forall (c: C).((eq nat (s k0 i) O) \to (or4 (drop O O (CHead c k0 u2) +(CHead c k0 u1)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead c k0 u1) (CHead e0 (Flat f) u)))))) (\lambda +(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c k0 +u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v0 u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c k0 u1) +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop O O (CHead c k0 u2) (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c k0 u1) (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop O O (CHead c k0 u2) (CHead e2 (Flat f) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))))))))))))) +(\lambda (b: B).(\lambda (i: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (_: (subst0 i v0 u1 u2)).(\lambda (c: C).(\lambda (H3: (eq +nat (S i) O)).(let H4 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee in +nat return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) +\Rightarrow True])) I O H3) in (False_ind (or4 (drop O O (CHead c (Bind b) +u2) (CHead c (Bind b) u1)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c (Bind b) u1) (CHead e0 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop O O (CHead c (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C (CHead c (Bind b) u1) (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop O O (CHead c (Bind +b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead c (Bind b) u1) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c +(Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v0 e1 e2)))))))) H4)))))))))) (\lambda (f: F).(\lambda (i: +nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 +i v0 u1 u2)).(\lambda (c: C).(\lambda (H3: (eq nat i O)).(let H4 \def (eq_ind +nat i (\lambda (n: nat).(subst0 n v0 u1 u2)) H2 O H3) in (or4_intro1 (drop O +O (CHead c (Flat f) u2) (CHead c (Flat f) u1)) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c (Flat f) +u1) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop O O (CHead c (Flat f) u2) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v0 u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c (Flat f) u1) (CHead e1 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop O O (CHead c (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c (Flat f) u1) (CHead e1 +(Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop O 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 v0 u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 +e2))))))) (ex3_4_intro F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead c (Flat f) u1) (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O +(CHead c (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w))))) f c u1 u2 +(refl_equal C (CHead c (Flat f) u1)) (drop_refl (CHead c (Flat f) u2)) +H4))))))))))) k)) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: +nat).(\forall (c3: C).(\forall (c4: C).(\forall (v0: T).((csubst0 i v0 c3 c4) +\to ((((eq nat i O) \to (or4 (drop O O c4 c3) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e0 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop O O c4 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop O O c4 (CHead e2 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 (Flat f) u))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop O O c4 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v0 e1 e2)))))))))) \to (\forall (u: T).((eq nat (s k0 i) O) +\to (or4 (drop O O (CHead c4 k0 u) (CHead c3 k0 u)) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 k0 +u) (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop O O (CHead c4 k0 u) (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v0 +u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C (CHead c3 k0 u) (CHead e1 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop O O +(CHead c4 k0 u) (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T +T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda +(_: T).(eq C (CHead c3 k0 u) (CHead e1 (Flat f) u0))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O +(CHead c4 k0 u) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v0 u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v0 e1 e2))))))))))))))))) (\lambda (b: B).(\lambda (i: +nat).(\lambda (c3: C).(\lambda (c4: C).(\lambda (v0: T).(\lambda (_: (csubst0 +i v0 c3 c4)).(\lambda (_: (((eq nat i O) \to (or4 (drop O O c4 c3) (ex3_4 F C +T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop O O c4 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c3 (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 (Flat f) u))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop O O c4 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v0 e1 e2))))))))))).(\lambda (u: T).(\lambda (H4: (eq nat +(S i) O)).(let H5 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee in nat +return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow +True])) I O H4) in (False_ind (or4 (drop O O (CHead c4 (Bind b) u) (CHead c3 +(Bind b) u)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C (CHead c3 (Bind b) u) (CHead e0 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O +(CHead c4 (Bind b) u) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v0 u0 w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C +(CHead c3 (Bind b) u) (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u0: T).(drop O O (CHead c4 (Bind b) u) +(CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C +(CHead c3 (Bind b) u) (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 +(Bind b) u) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v0 u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v0 e1 e2)))))))) H5))))))))))) (\lambda (f: F).(\lambda (i: +nat).(\lambda (c3: C).(\lambda (c4: C).(\lambda (v0: T).(\lambda (H2: +(csubst0 i v0 c3 c4)).(\lambda (H3: (((eq nat i O) \to (or4 (drop O O c4 c3) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C c3 (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 +u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop O O c4 (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v0 e1 e2))))))))))).(\lambda (u: T).(\lambda +(H4: (eq nat i O)).(let H5 \def (eq_ind nat i (\lambda (n: nat).((eq nat n O) +\to (or4 (drop O O c4 c3) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 +(CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v0 u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop O O c4 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T +T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C c3 (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 +e2)))))))))) H3 O H4) in (let H6 \def (eq_ind nat i (\lambda (n: +nat).(csubst0 n v0 c3 c4)) H2 O H4) in (or4_intro2 (drop O O (CHead c4 (Flat +f) u) (CHead c3 (Flat f) u)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead c3 (Flat f) u) (CHead e0 +(Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop O O (CHead c4 (Flat f) u) (CHead e0 (Flat f0) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v0 u0 +w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C (CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop O O +(CHead c4 (Flat f) u) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C +C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(eq C (CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop O O (CHead c4 (Flat f) u) (CHead e2 (Flat f0) w))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v0 u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2))))))) (ex3_4_intro F +C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq +C (CHead c3 (Flat f) u) (CHead e1 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop O O (CHead c4 +(Flat f) u) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2))))) f c3 c4 u +(refl_equal C (CHead c3 (Flat f) u)) (drop_refl (CHead c4 (Flat f) u)) +H6))))))))))))) k)) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: +nat).(\forall (v0: T).(\forall (u1: T).(\forall (u2: T).((subst0 i v0 u1 u2) +\to (\forall (c3: C).(\forall (c4: C).((csubst0 i v0 c3 c4) \to ((((eq nat i +O) \to (or4 (drop O O c4 c3) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 +(CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v0 u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop O O c4 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T +T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C c3 (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 +e2)))))))))) \to ((eq nat (s k0 i) O) \to (or4 (drop O O (CHead c4 k0 u2) +(CHead c3 k0 u1)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C (CHead c3 k0 u1) (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O +(CHead c4 k0 u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead +c3 k0 u1) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop O O (CHead c4 k0 u2) (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 k0 u1) (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop O O (CHead c4 k0 u2) (CHead e2 (Flat f) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2))))))))))))))))))) +(\lambda (b: B).(\lambda (i: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (_: (subst0 i v0 u1 u2)).(\lambda (c3: C).(\lambda (c4: +C).(\lambda (_: (csubst0 i v0 c3 c4)).(\lambda (_: (((eq nat i O) \to (or4 +(drop O O c4 c3) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C c3 (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v0 u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 +(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 +(CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e2 (Flat f) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2))))))))))).(\lambda +(H5: (eq nat (S i) O)).(let H6 \def (eq_ind nat (S i) (\lambda (ee: +nat).(match ee in nat return (\lambda (_: nat).Prop) with [O \Rightarrow +False | (S _) \Rightarrow True])) I O H5) in (False_ind (or4 (drop O O (CHead +c4 (Bind b) u2) (CHead c3 (Bind b) u1)) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Bind b) +u1) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop O O (CHead c4 (Bind b) u2) (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v0 u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c3 (Bind b) u1) (CHead e1 +(Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop O O (CHead c4 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Bind b) u1) (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop O O (CHead c4 (Bind b) u2) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v0 u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 +e2)))))))) H6))))))))))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (v0: +T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 i v0 u1 +u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (H3: (csubst0 i v0 c3 +c4)).(\lambda (H4: (((eq nat i O) \to (or4 (drop O O c4 c3) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop O O c4 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c3 (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 (Flat f) u))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop O O c4 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v0 e1 e2))))))))))).(\lambda (H5: (eq nat i O)).(let H6 +\def (eq_ind nat i (\lambda (n: nat).((eq nat n O) \to (or4 (drop O O c4 c3) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C c3 (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop O O c4 (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 +u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C c3 (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop O O c4 (CHead e2 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c3 (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop O O c4 (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v0 u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))))))) H4 O H5) in (let H7 \def +(eq_ind nat i (\lambda (n: nat).(csubst0 n v0 c3 c4)) H3 O H5) in (let H8 +\def (eq_ind nat i (\lambda (n: nat).(subst0 n v0 u1 u2)) H2 O H5) in +(or4_intro3 (drop O O (CHead c4 (Flat f) u2) (CHead c3 (Flat f) u1)) (ex3_4 F +C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead c3 (Flat f) u1) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 (Flat f) u2) +(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v0 u w)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead c3 (Flat f) +u1) (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop O O (CHead c4 (Flat f) u2) (CHead e2 (Flat f0) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Flat f) +u1) (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 (Flat f) u2) +(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v0 e1 e2))))))) (ex4_5_intro F C C T T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead c3 (Flat f) +u1) (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop O O (CHead c4 (Flat f) u2) +(CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v0 u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v0 e1 e2)))))) f c3 c4 u1 u2 (refl_equal C (CHead c3 (Flat f) u1)) +(drop_refl (CHead c4 (Flat f) u2)) H8 H7)))))))))))))))) k)) y v c1 c2 H1))) +H) e (drop_gen_refl c1 e H0)))))))) (\lambda (n0: nat).(\lambda (IHn: +((\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 n0 v c1 c2) \to +(\forall (e: C).((drop n0 O c1 e) \to (or4 (drop 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 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 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 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 (c1: C).(C_ind (\lambda +(c: C).(\forall (c2: C).(\forall (v: T).((csubst0 (S n0) v c c2) \to (\forall +(e: C).((drop (S n0) O c e) \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: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))) (\lambda (n1: +nat).(\lambda (c2: C).(\lambda (v: T).(\lambda (_: (csubst0 (S n0) v (CSort +n1) c2)).(\lambda (e: C).(\lambda (H0: (drop (S n0) O (CSort n1) +e)).(and3_ind (eq C e (CSort n1)) (eq nat (S n0) O) (eq nat O O) (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 (H1: (eq C e (CSort n1))).(\lambda (H2: (eq nat (S n0) +O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n1) (\lambda (c: C).(or4 +(drop (S n0) O c2 c) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C c (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S 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 c (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 +c (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))))))))) (let H4 \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 H2) in (False_ind (or4 (drop (S n0) O c2 (CSort n1)) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C (CSort n1) (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 (CSort n1) (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 (CSort n1) (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)))))))) H4)) e H1)))) (drop_gen_sort n1 (S n0) O e H0)))))))) (\lambda (c: +C).(\lambda (H: ((\forall (c2: C).(\forall (v: T).((csubst0 (S n0) v c c2) +\to (\forall (e: C).((drop (S n0) O c e) \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: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))))))).(\lambda (k: K).(\lambda +(t: T).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 (S n0) v +(CHead c k t) c2)).(\lambda (e: C).(\lambda (H1: (drop (S n0) O (CHead c k t) +e)).(let H2 \def (match H0 in csubst0 return (\lambda (n: nat).(\lambda (t0: +T).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csubst0 n t0 c0 c1)).((eq +nat n (S n0)) \to ((eq T t0 v) \to ((eq C c0 (CHead c k t)) \to ((eq C c1 c2) +\to (or4 (drop (S n0) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\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 (n: nat).((eq T v0 v) \to ((eq C +(CHead c0 k0 u1) (CHead c k t)) \to ((eq C (CHead c0 k0 u2) c2) \to ((subst0 +i v0 u1 u2) \to (or4 (drop n O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda +(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))))))))))))) (\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 +(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 _ _ t) \Rightarrow t])) (CHead c0 k0 u1) (CHead c k +t) H9) in ((let H11 \def (f_equal C K (\lambda (e0: C).(match e0 in C return +(\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow +k])) (CHead c0 k0 u1) (CHead c k t) H9) in ((let H12 \def (f_equal C C +(\lambda (e0: C).(match e0 in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 u1) (CHead c k +t) H9) in (eq_ind C c (\lambda (c: C).((eq K k0 k) \to ((eq T u1 t) \to ((eq +C (CHead c k0 u2) c2) \to ((subst0 i v u1 u2) \to (or4 (drop (s k0 i) O c2 e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s k0 +i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))))) (\lambda (H13: (eq K k0 k)).(eq_ind K k (\lambda (k: K).((eq +T u1 t) \to ((eq C (CHead c k u2) c2) \to ((subst0 i v u1 u2) \to (or4 (drop +(s k i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O c2 (CHead +e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s k +i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O c2 (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))))))) (\lambda (H14: (eq T u1 t)).(eq_ind T t (\lambda (t: T).((eq C +(CHead c k u2) c2) \to ((subst0 i v t u2) \to (or4 (drop (s k i) O c2 e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O c2 (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s k +i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O c2 (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))) (\lambda (H15: (eq C (CHead c k u2) c2)).(eq_ind C (CHead c k +u2) (\lambda (c: C).((subst0 i v t u2) \to (or4 (drop (s k i) O c e) (ex3_4 F +C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (s k i) O c (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (s k i) O c (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (s k i) O c (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))) (\lambda (H16: (subst0 i v t +u2)).(let H0 \def (eq_ind K k0 (\lambda (k: K).(eq nat (s k i) (S n0))) H7 k +H13) in (K_ind (\lambda (k: K).((drop (r k n0) O c e) \to ((eq nat (s k i) (S +n0)) \to (or4 (drop (s k i) O (CHead c k u2) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s k i) O (CHead c k u2) (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (s k i) O (CHead c k u2) (CHead e2 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (s k i) O (CHead c k u2) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))) (\lambda (b: B).(\lambda (H1: (drop (r (Bind b) n0) O c +e)).(\lambda (H17: (eq nat (s (Bind b) i) (S n0))).(let H18 \def (f_equal nat +nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).nat) with [O +\Rightarrow i | (S n) \Rightarrow n])) (S i) (S n0) H17) in (let H19 \def +(eq_ind nat i (\lambda (n: nat).(subst0 n v t u2)) H16 n0 H18) in (eq_ind_r +nat n0 (\lambda (n: nat).(or4 (drop (s (Bind b) n) O (CHead c (Bind b) u2) e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n) O (CHead c (Bind b) +u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (s (Bind b) n) O (CHead c (Bind b) u2) (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (s (Bind b) n) O (CHead c (Bind b) u2) (CHead e2 (Flat f) w))))))) +(\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 +(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 (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c e H1 +u2)) i H18)))))) (\lambda (f: F).(\lambda (H1: (drop (r (Flat f) n0) O c +e)).(\lambda (H17: (eq nat (s (Flat f) i) (S n0))).(let H18 \def (f_equal nat +nat (\lambda (e0: nat).e0) i (S n0) H17) in (let H19 \def (eq_ind nat i +(\lambda (n: nat).(subst0 n v t u2)) H16 (S n0) H18) in (eq_ind_r nat (S n0) +(\lambda (n: nat).(or4 (drop (s (Flat f) n) O (CHead c (Flat f) u2) e) (ex3_4 +F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (s (Flat f) n) O (CHead c (Flat f) u2) (CHead e0 +(Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s +(Flat f) n) O (CHead c (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Flat f) n) O (CHead c (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro0 (drop (s (Flat f) +(S n0)) O (CHead c (Flat f) u2) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Flat f) (S n0)) O (CHead c (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c +(Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) +O (CHead c (Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (drop_drop (Flat f) n0 c e H1 u2)) i +H18)))))) k (drop_gen_drop k c e t n0 H1) H0))) c2 H15)) u1 (sym_eq T u1 t +H14))) k0 (sym_eq K k0 k H13))) c0 (sym_eq C c0 c H12))) H11)) H10))) v0 +(sym_eq T v0 v H8))) (S n0) H7)) H4 H5 H6 H2))))) | (csubst0_fst k0 i c1 c0 +v0 H2 u) \Rightarrow (\lambda (H3: (eq nat (s k0 i) (S n0))).(\lambda (H4: +(eq T v0 v)).(\lambda (H5: (eq C (CHead c1 k0 u) (CHead c k t))).(\lambda +(H6: (eq C (CHead c0 k0 u) c2)).((let H7 \def (f_equal nat nat (\lambda (e0: +nat).e0) (s k0 i) (S n0) H3) in (eq_ind nat (s k0 i) (\lambda (n: nat).((eq T +v0 v) \to ((eq C (CHead c1 k0 u) (CHead c k t)) \to ((eq C (CHead c0 k0 u) +c2) \to ((csubst0 i v0 c1 c0) \to (or4 (drop n O c2 e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop n O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop n O c2 (CHead e2 (Flat f) u0)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop n O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))))))) (\lambda (H8: (eq T v0 v)).(eq_ind T v +(\lambda (t0: T).((eq C (CHead c1 k0 u) (CHead c k t)) \to ((eq C (CHead c0 +k0 u) c2) \to ((csubst0 i t0 c1 c0) \to (or4 (drop (s k0 i) O c2 e) (ex3_4 F +C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C +e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e0 (Flat f) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 +w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s k0 i) O c2 +(CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))))))) (\lambda (H9: (eq C (CHead c1 k0 u) (CHead c k t))).(let H10 +\def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) +with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k0 +u) (CHead c k t) H9) in ((let H11 \def (f_equal C K (\lambda (e0: C).(match +e0 in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k +_) \Rightarrow k])) (CHead c1 k0 u) (CHead c k t) H9) in ((let H12 \def +(f_equal C C (\lambda (e0: C).(match e0 in C return (\lambda (_: C).C) with +[(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k0 u) +(CHead c k t) H9) in (eq_ind C c (\lambda (c: C).((eq K k0 k) \to ((eq T u t) +\to ((eq C (CHead c0 k0 u) c2) \to ((csubst0 i v c c0) \to (or4 (drop (s k0 +i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: +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 (k: K).((eq T u t) \to ((eq C (CHead c0 k u) c2) \to ((csubst0 i v +c c0) \to (or4 (drop (s k i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda +(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 (H14: (eq T u t)).(eq_ind T t +(\lambda (t: T).((eq C (CHead c0 k t) c2) \to ((csubst0 i v c c0) \to (or4 +(drop (s k i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k +i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat +f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (s k i) O c2 (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +k i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))))) (\lambda (H15: (eq C (CHead c0 k t) +c2)).(eq_ind C (CHead c0 k t) (\lambda (c2: C).((csubst0 i v c c0) \to (or4 +(drop (s k i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +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 (H16: (csubst0 i v c c0)).(let +H0 \def (eq_ind K k0 (\lambda (k: K).(eq nat (s k i) (S n0))) H7 k H13) in +(K_ind (\lambda (k: K).((drop (r k n0) O c e) \to ((eq nat (s k i) (S n0)) +\to (or4 (drop (s k i) O (CHead c0 k t) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s k i) O (CHead c0 k t) (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (s k i) O (CHead c0 k t) (CHead e2 +(Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 +(Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (s k i) O (CHead c0 k t) (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))) (\lambda (b: B).(\lambda (H1: (drop (r (Bind b) n0) O c +e)).(\lambda (H17: (eq nat (s (Bind b) i) (S n0))).(let H18 \def (f_equal nat +nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).nat) with [O +\Rightarrow i | (S n) \Rightarrow n])) (S i) (S n0) H17) in (let H19 \def +(eq_ind nat i (\lambda (n: nat).(csubst0 n v c c0)) H16 n0 H18) in (eq_ind_r +nat n0 (\lambda (n: nat).(or4 (drop (s (Bind b) n) O (CHead c0 (Bind b) t) e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: +T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n) O (CHead c0 (Bind b) +t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat +f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (s (Bind b) n) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) u0)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (s (Bind b) n) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (let H \def +(IHn c c0 v H19 e H1) in (or4_ind (drop n0 O c0 e) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 +(Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop n0 O c0 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop n0 O c0 (CHead e2 (Flat f) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 +O c0 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (or4 (drop (s (Bind b) n0) O (CHead c0 (Bind b) t) e) (ex3_4 +F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq +C e (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O +v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H20: (drop n0 O c0 +e)).(or4_intro0 (drop (s (Bind b) n0) O (CHead c0 (Bind b) t) e) (ex3_4 F C T +T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u0))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O +v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c0 e H20 +t))) (\lambda (H20: (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O +c0 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 O v u0 w))))) (or4 (drop (s (Bind b) n0) O (CHead +c0 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O +(CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 +(Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 +(Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead +e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: +T).(\lambda (H21: (eq C e (CHead x1 (Flat x0) x2))).(\lambda (H22: (drop n0 O +c0 (CHead x1 (Flat x0) x3))).(\lambda (H23: (subst0 O v x2 x3)).(eq_ind_r C +(CHead x1 (Flat x0) x2) (\lambda (c: C).(or4 (drop (s (Bind b) n0) O (CHead +c0 (Bind b) t) c) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (_: T).(eq C c (CHead e0 (Flat f) u0)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O +(CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c +(CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 +(Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 +(Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead +e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro1 (drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead +x1 (Flat x0) x2)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e0 (Flat f) +u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v +u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C (CHead x1 (Flat x0) x2) (CHead e1 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e1 (Flat f) +u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex3_4_intro F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e0 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w))))) x0 +x1 x2 x3 (refl_equal C (CHead x1 (Flat x0) x2)) (drop_drop (Bind b) n0 c0 +(CHead x1 (Flat x0) x3) H22 t) H23)) e H21)))))))) H20)) (\lambda (H20: +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c0 (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop n0 O c0 (CHead e2 +(Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2))))) (or4 (drop (s (Bind b) n0) O (CHead c0 (Bind +b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O +(CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 +(Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 +(Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead +e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: +T).(\lambda (H21: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H22: (drop n0 O +c0 (CHead x2 (Flat x0) x3))).(\lambda (H23: (csubst0 O v x1 x2)).(eq_ind_r C +(CHead x1 (Flat x0) x3) (\lambda (c: C).(or4 (drop (s (Bind b) n0) O (CHead +c0 (Bind b) t) c) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (_: T).(eq C c (CHead e0 (Flat f) u0)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O +(CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c +(CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 +(Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 +(Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead +e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro2 (drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead +x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e0 (Flat f) +u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v +u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) +u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 +(Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex3_4_intro F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) +x0 x1 x2 x3 (refl_equal C (CHead x1 (Flat x0) x3)) (drop_drop (Bind b) n0 c0 +(CHead x2 (Flat x0) x3) H22 t) H23)) e H21)))))))) H20)) (\lambda (H20: +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n0 +O c0 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat +f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 O c0 (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O +v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (s (Bind b) n0) O +(CHead c0 (Bind b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(eq C e (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C e (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 +(Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda +(x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H21: (eq C e (CHead x1 +(Flat x0) x3))).(\lambda (H22: (drop n0 O c0 (CHead x2 (Flat x0) +x4))).(\lambda (H23: (subst0 O v x3 x4)).(\lambda (H24: (csubst0 O v x1 +x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c: C).(or4 (drop (s (Bind +b) n0) O (CHead c0 (Bind b) t) c) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e0 (Flat f) u0)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) t) (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(eq C c (CHead e1 (Flat f) u0)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +b) t) (CHead e2 (Flat f) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq +C c (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 +(Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (s (Bind b) n0) O (CHead +c0 (Bind b) t) (CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat +x0) x3) (CHead e0 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead +e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda +(w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 +(Flat f) u0)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u0: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) t) (CHead e2 (Flat f) +u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) +x3) (CHead e1 (Flat f) u0))))))) (\lambda (f: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 +(Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (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 c0 (Bind b) t) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 +w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))) x0 x1 x2 x3 x4 (refl_equal C +(CHead x1 (Flat x0) x3)) (drop_drop (Bind b) n0 c0 (CHead x2 (Flat x0) x4) +H22 t) H23 H24)) e H21)))))))))) H20)) H)) i H18)))))) (\lambda (f: +F).(\lambda (H1: (drop (r (Flat f) n0) O c e)).(\lambda (H17: (eq nat (s +(Flat f) i) (S n0))).(let H18 \def (f_equal nat nat (\lambda (e0: nat).e0) i +(S n0) H17) in (let H19 \def (eq_ind nat i (\lambda (n: nat).(csubst0 n v c +c0)) H16 (S n0) H18) in (eq_ind_r nat (S n0) (\lambda (n: nat).(or4 (drop (s +(Flat f) n) O (CHead c0 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s (Flat f) n) O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v +u0 w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Flat f) n) O +(CHead c0 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Flat f) n) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O +v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (let H20 \def (H c0 v H19 e +H1) in (or4_ind (drop (S n0) O c0 e) (ex3_4 F C T T (\lambda (f0: F).(\lambda +(e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u0)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c0 (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat +f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O c0 (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S +n0) O c0 (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (or4 (drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) +O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e +(CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead +e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (H21: (drop (S n0) O c0 +e)).(or4_intro0 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) e) (ex3_4 F +C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq +C e (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) +(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat +f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) +u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat +f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead +e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (drop_drop (Flat f) n0 c0 e H21 t))) (\lambda (H21: (ex3_4 F +C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w))))))).(ex3_4_ind F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead +e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 O v u0 w))))) (or4 (drop (s (Flat f) (S n0)) O +(CHead c0 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u0)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 +w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Flat f) (S +n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: +F).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H22: (eq C e +(CHead x1 (Flat x0) x2))).(\lambda (H23: (drop (S n0) O c0 (CHead x1 (Flat +x0) x3))).(\lambda (H24: (subst0 O v x2 x3)).(eq_ind_r C (CHead x1 (Flat x0) +x2) (\lambda (c: C).(or4 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) c) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda +(_: T).(eq C c (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c +(CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead +e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c +(CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro1 (drop (s (Flat f) (S n0)) O +(CHead c0 (Flat f) t) (CHead x1 (Flat x0) x2)) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat +x0) x2) (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C +(CHead x1 (Flat x0) x2) (CHead e1 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Flat f) (S +n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e1 (Flat f0) +u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead +e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e0 +(Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v u0 w))))) x0 x1 x2 x3 (refl_equal C (CHead x1 (Flat x0) x2)) +(drop_drop (Flat f) n0 c0 (CHead x1 (Flat x0) x3) H23 t) H24)) e H22)))))))) +H21)) (\lambda (H21: (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S n0) O c0 (CHead +e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat +f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: +T).(drop (S n0) O c0 (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop +(s (Flat f) (S n0)) O (CHead c0 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f0) u0)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s +(Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) u0)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: +T).(\lambda (H22: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H23: (drop (S +n0) O c0 (CHead x2 (Flat x0) x3))).(\lambda (H24: (csubst0 O v x1 +x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c: C).(or4 (drop (s (Flat +f) (S n0)) O (CHead c0 (Flat f) t) c) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e0 (Flat +f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C c (CHead e1 (Flat f0) u0)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s +(Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) u0)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(\lambda (_: T).(eq C c (CHead e1 (Flat f0) u0))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: +T).(\lambda (w: T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro2 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) +(CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e0 +(Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v u0 w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 +(Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u0: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) +u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) +x3) (CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead x1 (Flat +x0) x3) (CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) x0 x1 x2 x3 +(refl_equal C (CHead x1 (Flat x0) x3)) (drop_drop (Flat f) n0 c0 (CHead x2 +(Flat x0) x3) H23 t) H24)) e H22)))))))) H21)) (\lambda (H21: (ex4_5 F C C T +T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead +e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))).(ex4_5_ind F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O c0 (CHead e2 (Flat f0) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O +v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (s (Flat f) (S n0)) O +(CHead c0 (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u0: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u0)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 +w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(eq C e (CHead e1 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Flat f) (S +n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u0))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: +T).(subst0 O v u0 w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: +F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H22: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H23: (drop (S +n0) O c0 (CHead x2 (Flat x0) x4))).(\lambda (H24: (subst0 O v x3 +x4)).(\lambda (H25: (csubst0 O v x1 x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) +(\lambda (c: C).(or4 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) c) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u0: T).(\lambda +(_: T).(eq C c (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C c +(CHead e1 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u0: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead +e2 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C c +(CHead e1 (Flat f0) u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (s (Flat f) (S n0)) O +(CHead c0 (Flat f) t) (CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat +x0) x3) (CHead e0 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) t) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C +(CHead x1 (Flat x0) x3) (CHead e1 (Flat f0) u0)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(drop (s (Flat f) (S +n0)) O (CHead c0 (Flat f) t) (CHead e2 (Flat f0) u0)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u0: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f0) +u0))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) t) (CHead +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 c0 +(Flat f) t) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u0: T).(\lambda (w: T).(subst0 O v u0 w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))) x0 x1 x2 x3 x4 (refl_equal C (CHead x1 (Flat +x0) x3)) (drop_drop (Flat f) n0 c0 (CHead x2 (Flat x0) x4) H23 t) H24 H25)) e +H22)))))))))) H21)) H20)) i H18)))))) k (drop_gen_drop k c e t n0 H1) H0))) +c2 H15)) u (sym_eq T u t H14))) k0 (sym_eq K k0 k H13))) c1 (sym_eq C c1 c +H12))) H11)) H10))) v0 (sym_eq T v0 v H8))) (S n0) H7)) H4 H5 H6 H2))))) | +(csubst0_both k0 i v0 u1 u2 H2 c1 c0 H3) \Rightarrow (\lambda (H4: (eq nat (s +k0 i) (S n0))).(\lambda (H5: (eq T v0 v)).(\lambda (H6: (eq C (CHead c1 k0 +u1) (CHead c k t))).(\lambda (H7: (eq C (CHead c0 k0 u2) c2)).((let H8 \def +(f_equal nat nat (\lambda (e0: nat).e0) (s k0 i) (S n0) H4) in (eq_ind nat (s +k0 i) (\lambda (n: nat).((eq T v0 v) \to ((eq C (CHead c1 k0 u1) (CHead c k +t)) \to ((eq C (CHead c0 k0 u2) c2) \to ((subst0 i v0 u1 u2) \to ((csubst0 i +v0 c1 c0) \to (or4 (drop n O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda +(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)))))))))))))) (\lambda (H9: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq +C (CHead c1 k0 u1) (CHead c k t)) \to ((eq C (CHead c0 k0 u2) c2) \to +((subst0 i t0 u1 u2) \to ((csubst0 i t0 c1 c0) \to (or4 (drop (s k0 i) O c2 +e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s k0 +i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s k0 i) O c2 (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))))) (\lambda (H10: (eq C (CHead c1 k0 u1) (CHead c k t))).(let +H11 \def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: +C).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ t) \Rightarrow t])) (CHead +c1 k0 u1) (CHead c k t) H10) in ((let H12 \def (f_equal C K (\lambda (e0: +C).(match e0 in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | +(CHead _ k _) \Rightarrow k])) (CHead c1 k0 u1) (CHead c k t) H10) in ((let +H13 \def (f_equal C C (\lambda (e0: C).(match e0 in C return (\lambda (_: +C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead +c1 k0 u1) (CHead c k t) H10) in (eq_ind C c (\lambda (c: C).((eq K k0 k) \to +((eq T u1 t) \to ((eq C (CHead c0 k0 u2) c2) \to ((subst0 i v u1 u2) \to +((csubst0 i v c c0) \to (or4 (drop (s k0 i) O c2 e) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (s k0 i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(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 (k: K).((eq T u1 t) \to ((eq C (CHead +c0 k u2) c2) \to ((subst0 i v u1 u2) \to ((csubst0 i v c c0) \to (or4 (drop +(s k i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O c2 (CHead +e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: 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 T u1 t)).(eq_ind T t (\lambda (t: T).((eq +C (CHead c0 k u2) c2) \to ((subst0 i v t u2) \to ((csubst0 i v c c0) \to (or4 +(drop (s k i) O c2 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +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 (H16: (eq C (CHead c0 k u2) +c2)).(eq_ind C (CHead c0 k u2) (\lambda (c2: C).((subst0 i v t u2) \to +((csubst0 i v c c0) \to (or4 (drop (s k i) O c2 e) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (s k i) O c2 (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (s k i) O c2 (CHead e2 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +k i) O c2 (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))))) (\lambda (H17: (subst0 i v t +u2)).(\lambda (H18: (csubst0 i v c c0)).(let H0 \def (eq_ind K k0 (\lambda +(k: K).(eq nat (s k i) (S n0))) H8 k H14) in (K_ind (\lambda (k: K).((drop (r +k n0) O c e) \to ((eq nat (s k i) (S n0)) \to (or4 (drop (s k i) O (CHead c0 +k u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s k i) O (CHead c0 +k u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (s k i) O (CHead c0 k u2) (CHead e2 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +k i) O (CHead c0 k u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))))) (\lambda (b: B).(\lambda (H1: (drop (r +(Bind b) n0) O c e)).(\lambda (H19: (eq nat (s (Bind b) i) (S n0))).(let H20 +\def (f_equal nat nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: +nat).nat) with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S n0) H19) in +(let H21 \def (eq_ind nat i (\lambda (n: nat).(csubst0 n v c c0)) H18 n0 H20) +in (let H22 \def (eq_ind nat i (\lambda (n: nat).(subst0 n v t u2)) H17 n0 +H20) in (eq_ind_r nat n0 (\lambda (n: nat).(or4 (drop (s (Bind b) n) O (CHead +c0 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n) O +(CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (s (Bind b) n) O (CHead c0 (Bind b) u2) (CHead e2 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (s (Bind b) n) O (CHead c0 (Bind b) u2) (CHead +e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (let H \def (IHn c c0 v H21 e H1) in (or4_ind (drop n0 O c0 e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c0 (CHead e2 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop n0 O c0 (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (or4 (drop (s (Bind b) n0) O +(CHead c0 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) +u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (H23: (drop n0 O c0 e)).(or4_intro0 (drop (s (Bind +b) n0) O (CHead c0 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) +u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (drop_drop (Bind b) n0 c0 e H23 u2))) (\lambda (H23: (ex3_4 +F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 O c0 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w))))) (or4 (drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) +e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) +u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: +F).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H24: (eq C e +(CHead x1 (Flat x0) x2))).(\lambda (H25: (drop n0 O c0 (CHead x1 (Flat x0) +x3))).(\lambda (H26: (subst0 O v x2 x3)).(eq_ind_r C (CHead x1 (Flat x0) x2) +(\lambda (c: C).(or4 (drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) c) (ex3_4 +F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq +C c (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C c (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro1 +(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead x1 (Flat x0) x2)) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C (CHead x1 (Flat x0) x2) (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O +(CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead +x1 (Flat x0) x2) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x1 (Flat x0) x2) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) +O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) +x2) (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w))))) x0 x1 x2 x3 (refl_equal C (CHead x1 (Flat x0) x2)) +(drop_drop (Bind b) n0 c0 (CHead x1 (Flat x0) x3) H25 u2) H26)) e H24)))))))) +H23)) (\lambda (H23: (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O c0 (CHead e2 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop n0 O +c0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (s (Bind b) n0) O +(CHead c0 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) +u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda (x2: C).(\lambda +(x3: T).(\lambda (H24: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H25: (drop +n0 O c0 (CHead x2 (Flat x0) x3))).(\lambda (H26: (csubst0 O v x1 +x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c: C).(or4 (drop (s (Bind +b) n0) O (CHead c0 (Bind b) u2) c) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C c (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +c (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) +u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))) (or4_intro2 (drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) +(CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e0 +(Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 (Flat f) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 +(Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) +x3) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) +u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 +(Flat f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2))))) x0 x1 x2 x3 (refl_equal C (CHead x1 (Flat x0) x3)) +(drop_drop (Bind b) n0 c0 (CHead x2 (Flat x0) x3) H25 u2) H26)) e H24)))))))) +H23)) (\lambda (H23: (ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop n0 O c0 (CHead e2 (Flat f) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop n0 O c0 (CHead e2 (Flat f) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (s +(Bind b) n0) O (CHead c0 (Bind b) u2) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O +(CHead c0 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: +F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H24: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H25: (drop n0 O +c0 (CHead x2 (Flat x0) x4))).(\lambda (H26: (subst0 O v x3 x4)).(\lambda +(H27: (csubst0 O v x1 x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c: +C).(or4 (drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) c) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C c (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Bind b) n0) O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 +(drop (s (Bind b) n0) O (CHead c0 (Bind b) u2) (CHead x1 (Flat x0) x3)) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C (CHead x1 (Flat x0) x3) (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) O +(CHead c0 (Bind b) u2) (CHead e0 (Flat f) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead +x1 (Flat x0) x3) (CHead e1 (Flat f) u)))))) (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Bind b) n0) O (CHead c0 (Bind +b) u2) (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) +O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (ex4_5_intro F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x1 (Flat x0) x3) (CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Bind b) n0) +O (CHead c0 (Bind b) u2) (CHead e2 (Flat f) w))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))) x0 x1 x2 x3 x4 (refl_equal C (CHead x1 (Flat +x0) x3)) (drop_drop (Bind b) n0 c0 (CHead x2 (Flat x0) x4) H25 u2) H26 H27)) +e H24)))))))))) H23)) H)) i H20))))))) (\lambda (f: F).(\lambda (H1: (drop (r +(Flat f) n0) O c e)).(\lambda (H19: (eq nat (s (Flat f) i) (S n0))).(let H20 +\def (f_equal nat nat (\lambda (e0: nat).e0) i (S n0) H19) in (let H21 \def +(eq_ind nat i (\lambda (n: nat).(csubst0 n v c c0)) H18 (S n0) H20) in (let +H22 \def (eq_ind nat i (\lambda (n: nat).(subst0 n v t u2)) H17 (S n0) H20) +in (eq_ind_r nat (S n0) (\lambda (n: nat).(or4 (drop (s (Flat f) n) O (CHead +c0 (Flat f) u2) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) n) O +(CHead c0 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (s (Flat f) n) O (CHead c0 (Flat f) u2) (CHead e2 +(Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 +(Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop (s (Flat f) n) O (CHead c0 (Flat f) u2) (CHead +e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))) (let H23 \def (H c0 v H21 e H1) in (or4_ind (drop (S n0) O +c0 e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead +e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (S +n0) O c0 (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead +e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (or4 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead +e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (H24: (drop (S n0) O c0 +e)).(or4_intro0 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) e) (ex3_4 +F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) +(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat +f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead +e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (drop_drop (Flat f) n0 c0 e H24 u2))) (\lambda (H24: (ex3_4 +F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq +C e (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (S n0) O c0 (CHead e0 (Flat f) w)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w))))))).(ex3_4_ind F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead +e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 O v u w))))) (or4 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat +f) u2) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) +O (CHead c0 (Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead +e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda +(x2: T).(\lambda (x3: T).(\lambda (H25: (eq C e (CHead x1 (Flat x0) +x2))).(\lambda (H26: (drop (S n0) O c0 (CHead x1 (Flat x0) x3))).(\lambda +(H27: (subst0 O v x2 x3)).(eq_ind_r C (CHead x1 (Flat x0) x2) (\lambda (c: +C).(or4 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) c) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c +(CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead +e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s +(Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Flat f0) u))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro1 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) +(CHead x1 (Flat x0) x2)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x2) (CHead e0 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Flat x0) x2) (CHead e1 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) +x2) (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) +x2) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) +(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w))))) x0 x1 x2 x3 (refl_equal C (CHead x1 +(Flat x0) x2)) (drop_drop (Flat f) n0 c0 (CHead x1 (Flat x0) x3) H26 u2) +H27)) e H25)))))))) H24)) (\lambda (H24: (ex3_4 F C C T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat +f) u)))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop (S n0) O c0 (CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C +C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (S n0) O c0 (CHead e2 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) +(or4 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) e) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead +e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda +(w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s +(Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (x0: F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: +T).(\lambda (H25: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H26: (drop (S +n0) O c0 (CHead x2 (Flat x0) x3))).(\lambda (H27: (csubst0 O v x1 +x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) (\lambda (c: C).(or4 (drop (s (Flat +f) (S n0)) O (CHead c0 (Flat f) u2) c) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s +(Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Flat f0) u))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro2 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) +(CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e0 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e0 (Flat f0) +w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(u: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) +x3) (CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Flat x0) +x3) (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) +(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))) x0 x1 x2 x3 (refl_equal C (CHead +x1 (Flat x0) x3)) (drop_drop (Flat f) n0 c0 (CHead x2 (Flat x0) x3) H26 u2) +H27)) e H25)))))))) H24)) (\lambda (H24: (ex4_5 F C C T T (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (S n0) O c0 (CHead e2 (Flat f) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))).(ex4_5_ind F C C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (S n0) O c0 (CHead e2 (Flat f0) w))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O +v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (s (Flat f) (S n0)) O +(CHead c0 (Flat f) u2) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e0 (Flat f0) w)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u +w)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop (s (Flat f) (S n0)) +O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e1 (Flat f0) u))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: +F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H25: (eq C e (CHead x1 (Flat x0) x3))).(\lambda (H26: (drop (S +n0) O c0 (CHead x2 (Flat x0) x4))).(\lambda (H27: (subst0 O v x3 +x4)).(\lambda (H28: (csubst0 O v x1 x2)).(eq_ind_r C (CHead x1 (Flat x0) x3) +(\lambda (c: C).(or4 (drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) c) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C c (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) u2) (CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c +(CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead +e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C c +(CHead e1 (Flat f0) u))))))) (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 +(Flat f) u2) (CHead e2 (Flat f0) w))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 O v u w)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (s (Flat f) (S n0)) O +(CHead c0 (Flat f) u2) (CHead x1 (Flat x0) x3)) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) +x3) (CHead e0 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) +(CHead e0 (Flat f0) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x1 (Flat x0) +x3) (CHead e1 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) +(CHead e2 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x1 (Flat x0) x3) (CHead e1 (Flat f0) u))))))) (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop (s +(Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) w))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex4_5_intro F C +C T T (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x1 (Flat x0) x3) (CHead e1 (Flat f0) u))))))) +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(drop (s (Flat f) (S n0)) O (CHead c0 (Flat f) u2) (CHead e2 (Flat f0) +w))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 O v u w)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) +x0 x1 x2 x3 x4 (refl_equal C (CHead x1 (Flat x0) x3)) (drop_drop (Flat f) n0 +c0 (CHead x2 (Flat x0) x4) H26 u2) H27 H28)) e H25)))))))))) H24)) H23)) i +H20))))))) k (drop_gen_drop k c e t n0 H1) H0)))) c2 H16)) u1 (sym_eq T u1 t +H15))) k0 (sym_eq K k0 k H14))) c1 (sym_eq C c1 c H13))) H12)) H11))) v0 +(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). + +theorem csubst0_drop_eq_back: + \forall (n: nat).(\forall (c1: C).(\forall (c2: C).(\forall (v: T).((csubst0 +n v c1 c2) \to (\forall (e: C).((drop n O c2 e) \to (or4 (drop n O c1 e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop n O c1 (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n O c1 (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop n O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))))))))) +\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 c2 +e) \to (or4 (drop n0 O c1 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O +c1 (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop n0 O c1 (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c1 (CHead e1 +(Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda +(H: (csubst0 O v c1 c2)).(\lambda (e: C).(\lambda (H0: (drop O O c2 +e)).(eq_ind C c2 (\lambda (c: C).(or4 (drop O O c1 c) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop O O c1 (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop O O c1 (CHead e1 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C c (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop O +O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))) (insert_eq nat O (\lambda (n0: nat).(csubst0 n0 v c1 c2)) +(or4 (drop O O c1 c2) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c2 (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop O O +c1 (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c2 (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop O O c1 (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c2 (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop O O c1 (CHead e1 +(Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (y: nat).(\lambda (H1: (csubst0 y v c1 c2)).(csubst0_ind +(\lambda (n0: nat).(\lambda (t: T).(\lambda (c: C).(\lambda (c0: C).((eq nat +n0 O) \to (or4 (drop O O c c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop O O c +(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O t u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop O O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O t e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop O O c (CHead e1 +(Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O t u1 u2)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O t e1 +e2))))))))))))) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: +nat).(\forall (v0: T).(\forall (u1: T).(\forall (u2: T).((subst0 i v0 u1 u2) +\to (\forall (c: C).((eq nat (s k0 i) O) \to (or4 (drop O O (CHead c k0 u1) +(CHead c k0 u2)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u4: T).(eq C (CHead c k0 u2) (CHead e0 (Flat f) u4)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u3: T).(\lambda (_: T).(drop O O +(CHead c k0 u1) (CHead e0 (Flat f) u3)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead +c k0 u2) (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(drop O O (CHead c k0 u1) (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c k0 u2) (CHead e2 (Flat f) +u4))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: +T).(\lambda (_: T).(drop O O (CHead c k0 u1) (CHead e1 (Flat f) u3))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: T).(\lambda +(u4: T).(subst0 O v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))))))))))))) +(\lambda (b: B).(\lambda (i: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (_: (subst0 i v0 u1 u2)).(\lambda (c: C).(\lambda (H3: (eq +nat (S i) O)).(let H4 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee in +nat return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) +\Rightarrow True])) I O H3) in (False_ind (or4 (drop O O (CHead c (Bind b) +u1) (CHead c (Bind b) u2)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c (Bind b) u2) (CHead e0 +(Flat f) u4)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u3: T).(\lambda +(_: T).(drop O O (CHead c (Bind b) u1) (CHead e0 (Flat f) u3)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 +u4)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead c (Bind b) u2) (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop O O +(CHead c (Bind b) u1) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u4: T).(eq C (CHead c (Bind b) u2) (CHead e2 (Flat f) u4))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda +(_: T).(drop O O (CHead c (Bind b) u1) (CHead e1 (Flat f) u3))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: +T).(subst0 O v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))))) H4)))))))))) +(\lambda (f: F).(\lambda (i: nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (H2: (subst0 i v0 u1 u2)).(\lambda (c: C).(\lambda (H3: (eq +nat i O)).(let H4 \def (eq_ind nat i (\lambda (n: nat).(subst0 n v0 u1 u2)) +H2 O H3) in (or4_intro1 (drop O O (CHead c (Flat f) u1) (CHead c (Flat f) +u2)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u4: T).(eq C (CHead c (Flat f) u2) (CHead e0 (Flat f0) u4)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u3: T).(\lambda (_: T).(drop O O +(CHead c (Flat f) u1) (CHead e0 (Flat f0) u3)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (ex3_4 F C +C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C +(CHead c (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(drop O O (CHead c (Flat f) u1) +(CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C +(CHead c (Flat f) u2) (CHead e2 (Flat f0) u4))))))) (\lambda (f0: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c +(Flat f) u1) (CHead e1 (Flat f0) u3))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v0 e1 e2))))))) (ex3_4_intro F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c (Flat f) +u2) (CHead e0 (Flat f0) u4)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(u3: T).(\lambda (_: T).(drop O O (CHead c (Flat f) u1) (CHead e0 (Flat f0) +u3)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: +T).(subst0 O v0 u3 u4))))) f c u1 u2 (refl_equal C (CHead c (Flat f) u2)) +(drop_refl (CHead c (Flat f) u1)) H4))))))))))) k)) (\lambda (k: K).(K_ind +(\lambda (k0: K).(\forall (i: nat).(\forall (c3: C).(\forall (c4: C).(\forall +(v0: T).((csubst0 i v0 c3 c4) \to ((((eq nat i O) \to (or4 (drop O O c3 c4) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C c4 (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop O O c3 (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O +v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 +(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(drop O O c3 (CHead e1 (Flat f) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v0 u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))))))) \to (\forall +(u: T).((eq nat (s k0 i) O) \to (or4 (drop O O (CHead c3 k0 u) (CHead c4 k0 +u)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C (CHead c4 k0 u) (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop O O (CHead c3 k0 +u) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C (CHead c4 k0 u) +(CHead e2 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(drop O O (CHead c3 k0 u) (CHead e1 (Flat f) u0)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead c4 k0 u) (CHead e2 (Flat f) +u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop O O (CHead c3 k0 u) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v0 u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2))))))))))))))))) +(\lambda (b: B).(\lambda (i: nat).(\lambda (c3: C).(\lambda (c4: C).(\lambda +(v0: T).(\lambda (_: (csubst0 i v0 c3 c4)).(\lambda (_: (((eq nat i O) \to +(or4 (drop O O c3 c4) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop O O +c3 (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop O O c3 (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T +T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c4 (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop O O c3 (CHead e1 +(Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 +e2))))))))))).(\lambda (u: T).(\lambda (H4: (eq nat (S i) O)).(let H5 \def +(eq_ind nat (S i) (\lambda (ee: nat).(match ee in nat return (\lambda (_: +nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in +(False_ind (or4 (drop O O (CHead c3 (Bind b) u) (CHead c4 (Bind b) u)) (ex3_4 +F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq +C (CHead c4 (Bind b) u) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(drop O O (CHead c3 (Bind b) u) +(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C (CHead c4 (Bind b) +u) (CHead e2 (Flat f) u0)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u0: T).(drop O O (CHead c3 (Bind b) u) (CHead e1 (Flat f) +u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead c4 (Bind b) +u) (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop O O (CHead c3 (Bind b) u) (CHead e1 +(Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 +e2)))))))) H5))))))))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (c3: +C).(\lambda (c4: C).(\lambda (v0: T).(\lambda (H2: (csubst0 i v0 c3 +c4)).(\lambda (H3: (((eq nat i O) \to (or4 (drop O O c3 c4) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop O O c3 (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop O O c3 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v0 e1 e2))))))))))).(\lambda (u: T).(\lambda (H4: (eq nat i +O)).(let H5 \def (eq_ind nat i (\lambda (n: nat).((eq nat n O) \to (or4 (drop +O O c3 c4) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C c4 (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop O O c3 (CHead e0 +(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 +(CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 +(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop O O c3 (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v0 u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))))))) H3 O +H4) in (let H6 \def (eq_ind nat i (\lambda (n: nat).(csubst0 n v0 c3 c4)) H2 +O H4) in (or4_intro2 (drop O O (CHead c3 (Flat f) u) (CHead c4 (Flat f) u)) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C (CHead c4 (Flat f) u) (CHead e0 (Flat f0) u2)))))) (\lambda +(f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop O O (CHead c3 +(Flat f) u) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C +(CHead c4 (Flat f) u) (CHead e2 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u0: T).(drop O O (CHead c3 (Flat f) u) +(CHead e1 (Flat f0) u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C +(CHead c4 (Flat f) u) (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop O O (CHead c3 +(Flat f) u) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v0 e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u0: T).(eq C (CHead c4 (Flat f) +u) (CHead e2 (Flat f0) u0)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u0: T).(drop O O (CHead c3 (Flat f) u) (CHead e1 (Flat f0) +u0)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v0 e1 e2))))) f c3 c4 u (refl_equal C (CHead c4 (Flat f) u)) +(drop_refl (CHead c3 (Flat f) u)) H6))))))))))))) k)) (\lambda (k: K).(K_ind +(\lambda (k0: K).(\forall (i: nat).(\forall (v0: T).(\forall (u1: T).(\forall +(u2: T).((subst0 i v0 u1 u2) \to (\forall (c3: C).(\forall (c4: C).((csubst0 +i v0 c3 c4) \to ((((eq nat i O) \to (or4 (drop O O c3 c4) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop O O c3 (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop O O c3 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v0 e1 e2)))))))))) \to ((eq nat (s k0 i) O) \to (or4 (drop +O O (CHead c3 k0 u1) (CHead c4 k0 u2)) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 k0 u2) +(CHead e0 (Flat f) u4)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u3: +T).(\lambda (_: T).(drop O O (CHead c3 k0 u1) (CHead e0 (Flat f) u3)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O +v0 u3 u4)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead c4 k0 u2) (CHead e2 (Flat f) u)))))) (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop O O (CHead c3 +k0 u1) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq +C (CHead c4 k0 u2) (CHead e2 (Flat f) u4))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c3 k0 +u1) (CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v0 e1 e2))))))))))))))))))) (\lambda (b: B).(\lambda (i: nat).(\lambda (v0: +T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (subst0 i v0 u1 +u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (_: (csubst0 i v0 c3 +c4)).(\lambda (_: (((eq nat i O) \to (or4 (drop O O c3 c4) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop O O c3 (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop O O c3 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v0 e1 e2))))))))))).(\lambda (H5: (eq nat (S i) O)).(let H6 +\def (eq_ind nat (S i) (\lambda (ee: nat).(match ee in nat return (\lambda +(_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H5) +in (False_ind (or4 (drop O O (CHead c3 (Bind b) u1) (CHead c4 (Bind b) u2)) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u4: +T).(eq C (CHead c4 (Bind b) u2) (CHead e0 (Flat f) u4)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c3 +(Bind b) u1) (CHead e0 (Flat f) u3)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead +c4 (Bind b) u2) (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop O O (CHead c3 (Bind b) u1) (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C (CHead c4 +(Bind b) u2) (CHead e2 (Flat f) u4))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c3 (Bind +b) u1) (CHead e1 (Flat f) u3))))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: +T).(csubst0 O v0 e1 e2)))))))) H6))))))))))))) (\lambda (f: F).(\lambda (i: +nat).(\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (subst0 +i v0 u1 u2)).(\lambda (c3: C).(\lambda (c4: C).(\lambda (H3: (csubst0 i v0 c3 +c4)).(\lambda (H4: (((eq nat i O) \to (or4 (drop O O c3 c4) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop O O c3 (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop O O c3 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v0 u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v0 e1 e2))))))))))).(\lambda (H5: (eq nat i O)).(let H6 +\def (eq_ind nat i (\lambda (n: nat).((eq nat n O) \to (or4 (drop O O c3 c4) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C c4 (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop O O c3 (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O +v0 u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c4 (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop O O c3 (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c4 (CHead e2 +(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(drop O O c3 (CHead e1 (Flat f) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v0 u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))))))) H4 O H5) in +(let H7 \def (eq_ind nat i (\lambda (n: nat).(csubst0 n v0 c3 c4)) H3 O H5) +in (let H8 \def (eq_ind nat i (\lambda (n: nat).(subst0 n v0 u1 u2)) H2 O H5) +in (or4_intro3 (drop O O (CHead c3 (Flat f) u1) (CHead c4 (Flat f) u2)) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u4: T).(eq C (CHead c4 (Flat f) u2) (CHead e0 (Flat f0) u4)))))) (\lambda +(f0: F).(\lambda (e0: C).(\lambda (u3: T).(\lambda (_: T).(drop O O (CHead c3 +(Flat f) u1) (CHead e0 (Flat f0) u3)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u3: T).(\lambda (u4: T).(subst0 O v0 u3 u4)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C +(CHead c4 (Flat f) u2) (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u: T).(drop O O (CHead c3 (Flat f) u1) +(CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u4: T).(eq C +(CHead c4 (Flat f) u2) (CHead e2 (Flat f0) u4))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda (_: T).(drop O +O (CHead c3 (Flat f) u1) (CHead e1 (Flat f0) u3))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: T).(subst0 +O v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v0 e1 e2))))))) (ex4_5_intro F C C T T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u4: T).(eq C (CHead c4 (Flat f) u2) (CHead e2 (Flat f0) u4))))))) (\lambda +(f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u3: T).(\lambda (_: +T).(drop O O (CHead c3 (Flat f) u1) (CHead e1 (Flat f0) u3))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u3: T).(\lambda (u4: +T).(subst0 O v0 u3 u4)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v0 e1 e2)))))) f c3 c4 u1 u2 +(refl_equal C (CHead c4 (Flat f) u2)) (drop_refl (CHead c3 (Flat f) u1)) H8 +H7)))))))))))))))) k)) y v c1 c2 H1))) H) e (drop_gen_refl c2 e H0)))))))) +(\lambda (n0: nat).(\lambda (IHn: ((\forall (c1: C).(\forall (c2: C).(\forall +(v: T).((csubst0 n0 v c1 c2) \to (\forall (e: C).((drop n0 O c2 e) \to (or4 +(drop n0 O c1 e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c1 (CHead e0 +(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop n0 O +c1 (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c1 (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: +C).(\forall (v: T).((csubst0 (S n0) v c c2) \to (\forall (e: C).((drop (S n0) +O c2 e) \to (or4 (drop (S n0) O c e) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead +e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))))))))) (\lambda (n1: nat).(\lambda (c2: C).(\lambda (v: +T).(\lambda (H: (csubst0 (S n0) v (CSort n1) c2)).(\lambda (e: C).(\lambda +(_: (drop (S n0) O c2 e)).(csubst0_gen_sort c2 v (S n0) n1 H (or4 (drop (S +n0) O (CSort n1) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CSort +n1) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CSort n1) (CHead e1 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CSort n1) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))))))))) (\lambda (c: C).(\lambda (H: +((\forall (c2: C).(\forall (v: T).((csubst0 (S n0) v c c2) \to (\forall (e: +C).((drop (S n0) O c2 e) \to (or4 (drop (S n0) O c e) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C +T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O c (CHead e1 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: +C).(\lambda (v: T).(\lambda (H0: (csubst0 (S n0) v (CHead c k t) +c2)).(\lambda (e: C).(\lambda (H1: (drop (S n0) O c2 e)).(or3_ind (ex3_2 T +nat (\lambda (_: T).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (u2: +T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: +nat).(subst0 j v t u2)))) (ex3_2 C nat (\lambda (_: C).(\lambda (j: nat).(eq +nat (S n0) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k +t)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (ex4_3 T C nat +(\lambda (_: T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j))))) +(\lambda (u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k +u2))))) (\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t +u2)))) (\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c +c3))))) (or4 (drop (S n0) O (CHead c k t) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c k t) (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(H2: (ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (S n0) (s k j)))) +(\lambda (u2: T).(\lambda (_: nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: +T).(\lambda (j: nat).(subst0 j v t u2))))).(ex3_2_ind T nat (\lambda (_: +T).(\lambda (j: nat).(eq nat (S n0) (s k j)))) (\lambda (u2: T).(\lambda (_: +nat).(eq C c2 (CHead c k u2)))) (\lambda (u2: T).(\lambda (j: nat).(subst0 j +v t u2))) (or4 (drop (S n0) O (CHead c k t) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c k t) (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(x0: T).(\lambda (x1: nat).(\lambda (H3: (eq nat (S n0) (s k x1))).(\lambda +(H4: (eq C c2 (CHead c k x0))).(\lambda (H5: (subst0 x1 v t x0)).(let H6 \def +(eq_ind C c2 (\lambda (c: C).(drop (S n0) O c e)) H1 (CHead c k x0) H4) in +((match k in K return (\lambda (k0: K).((eq nat (S n0) (s k0 x1)) \to ((drop +(r k0 n0) O c e) \to (or4 (drop (S n0) O (CHead c k0 t) e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c k0 t) (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +k0 t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda +(f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq +C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c k0 t) (CHead +e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))))) with [(Bind b) \Rightarrow (\lambda (H7: (eq nat (S n0) +(s (Bind b) x1))).(\lambda (H8: (drop (r (Bind b) n0) O c e)).(let H9 \def +(f_equal nat nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: +nat).nat) with [O \Rightarrow n0 | (S n) \Rightarrow n])) (S n0) (S x1) H7) +in (let H10 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n v t x0)) H5 n0 +H9) in (or4_intro0 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c e +H8 t)))))) | (Flat f) \Rightarrow (\lambda (H7: (eq nat (S n0) (s (Flat f) +x1))).(\lambda (H8: (drop (r (Flat f) n0) O c e)).(let H9 \def (f_equal nat +nat (\lambda (e0: nat).e0) (S n0) x1 H7) in (let H10 \def (eq_ind_r nat x1 +(\lambda (n: nat).(subst0 n v t x0)) H5 (S n0) H9) in (or4_intro0 (drop (S +n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead +e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (drop_drop (Flat f) n0 c e H8 t))))))]) H3 (drop_gen_drop k +c e x0 n0 H6)))))))) H2)) (\lambda (H2: (ex3_2 C nat (\lambda (_: C).(\lambda +(j: nat).(eq nat (S n0) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C +c2 (CHead c3 k t)))) (\lambda (c2: C).(\lambda (j: nat).(csubst0 j v c +c2))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s +k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k t)))) +(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3))) (or4 (drop (S n0) O +(CHead c k t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: C).(\lambda (x1: +nat).(\lambda (H3: (eq nat (S n0) (s k x1))).(\lambda (H4: (eq C c2 (CHead x0 +k t))).(\lambda (H5: (csubst0 x1 v c x0)).(let H6 \def (eq_ind C c2 (\lambda +(c: C).(drop (S n0) O c e)) H1 (CHead x0 k t) H4) in ((match k in K return +(\lambda (k0: K).((eq nat (S n0) (s k0 x1)) \to ((drop (r k0 n0) O x0 e) \to +(or4 (drop (S n0) O (CHead c k0 t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c k0 t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c k0 t) (CHead e1 (Flat f) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c k0 t) (CHead e1 (Flat f) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))) with [(Bind +b) \Rightarrow (\lambda (H7: (eq nat (S n0) (s (Bind b) x1))).(\lambda (H8: +(drop (r (Bind b) n0) O x0 e)).(let H9 \def (f_equal nat nat (\lambda (e0: +nat).(match e0 in nat return (\lambda (_: nat).nat) with [O \Rightarrow n0 | +(S n) \Rightarrow n])) (S n0) (S x1) H7) in (let H10 \def (eq_ind_r nat x1 +(\lambda (n: nat).(csubst0 n v c x0)) H5 n0 H9) in (let H11 \def (IHn c x0 v +H10 e H8) in (or4_ind (drop n0 O c e) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O +c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e1 +(Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (H12: (drop n0 O c e)).(or4_intro0 +(drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c e H12 t))) (\lambda +(H12: (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e0 +(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O +c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2))))) (or4 (drop (S n0) O (CHead c (Bind +b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: +T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) x5))).(\lambda (H14: (drop n0 O +c (CHead x3 (Flat x2) x4))).(\lambda (H15: (subst0 O v x4 x5)).(eq_ind_r C +(CHead x3 (Flat x2) x5) (\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Bind +b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro1 (drop (S n0) O (CHead c (Bind b) t) (CHead x3 (Flat +x2) x5)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 (Flat f) u2))))))) (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C +T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C +(CHead x3 (Flat x2) x5) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2))))) x2 x3 x4 x5 (refl_equal C (CHead +x3 (Flat x2) x5)) (drop_drop (Bind b) n0 c (CHead x3 (Flat x2) x4) H14 t) +H15)) e H13)))))))) H12)) (\lambda (H12: (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C +C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) +(or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda +(x4: C).(\lambda (x5: T).(\lambda (H13: (eq C e (CHead x4 (Flat x2) +x5))).(\lambda (H14: (drop n0 O c (CHead x3 (Flat x2) x5))).(\lambda (H15: +(csubst0 O v x3 x4)).(eq_ind_r C (CHead x4 (Flat x2) x5) (\lambda (c0: +C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c (Bind +b) t) (CHead x4 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 (Flat f) +u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex3_4_intro F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) x2 x3 x4 x5 +(refl_equal C (CHead x4 (Flat x2) x5)) (drop_drop (Bind b) n0 c (CHead x3 +(Flat x2) x5) H14 t) H15)) e H13)))))))) H12)) (\lambda (H12: (ex4_5 F C C T +T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e1 +(Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))).(ex4_5_ind F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop n0 O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda (x5: T).(\lambda (x6: +T).(\lambda (H13: (eq C e (CHead x4 (Flat x2) x6))).(\lambda (H14: (drop n0 O +c (CHead x3 (Flat x2) x5))).(\lambda (H15: (subst0 O v x5 x6)).(\lambda (H16: +(csubst0 O v x3 x4)).(eq_ind_r C (CHead x4 (Flat x2) x6) (\lambda (c0: +C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead c (Bind +b) t) (CHead x4 (Flat x2) x6)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x6) (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e2 (Flat f) +u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex4_5_intro F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e2 +(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat +f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) +x2 x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x2) x6)) (drop_drop (Bind b) n0 +c (CHead x3 (Flat x2) x5) H14 t) H15 H16)) e H13)))))))))) H12)) H11)))))) | +(Flat f) \Rightarrow (\lambda (H7: (eq nat (S n0) (s (Flat f) x1))).(\lambda +(H8: (drop (r (Flat f) n0) O x0 e)).(let H9 \def (f_equal nat nat (\lambda +(e0: nat).e0) (S n0) x1 H7) in (let H10 \def (eq_ind_r nat x1 (\lambda (n: +nat).(csubst0 n v c x0)) H5 (S n0) H9) in (let H11 \def (H x0 v H10 e H8) in +(or4_ind (drop (S n0) O c e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O c (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O c (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead +e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (or4 (drop (S n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (H12: (drop (S n0) +O c e)).(or4_intro0 (drop (S n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop (Flat f) n0 c e +H12 t))) (\lambda (H12: (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C T T (\lambda +(f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 +(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))) +(or4 (drop (S n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda +(x4: T).(\lambda (x5: T).(\lambda (H13: (eq C e (CHead x3 (Flat x2) +x5))).(\lambda (H14: (drop (S n0) O c (CHead x3 (Flat x2) x4))).(\lambda +(H15: (subst0 O v x4 x5)).(eq_ind_r C (CHead x3 (Flat x2) x5) (\lambda (c0: +C).(or4 (drop (S n0) O (CHead c (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat +f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro1 (drop (S n0) O (CHead c (Flat +f) t) (CHead x3 (Flat x2) x5)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 +(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e2 +(Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x3 (Flat x2) x5) (CHead e0 +(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2))))) x2 x3 x4 x5 (refl_equal C (CHead x3 (Flat x2) x5)) +(drop_drop (Flat f) n0 c (CHead x3 (Flat x2) x4) H14 t) H15)) e H13)))))))) +H12)) (\lambda (H12: (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O c (CHead +e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O c (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) (or4 (drop (S n0) +O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead +e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda +(x5: T).(\lambda (H13: (eq C e (CHead x4 (Flat x2) x5))).(\lambda (H14: (drop +(S n0) O c (CHead x3 (Flat x2) x5))).(\lambda (H15: (csubst0 O v x3 +x4)).(eq_ind_r C (CHead x4 (Flat x2) x5) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead c (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f0) u2)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C c0 (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead +e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 +(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c (Flat f) t) (CHead x4 +(Flat x2) x5)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e0 (Flat f0) +u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 (Flat f0) +u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex3_4_intro F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x5) (CHead e2 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) +x2 x3 x4 x5 (refl_equal C (CHead x4 (Flat x2) x5)) (drop_drop (Flat f) n0 c +(CHead x3 (Flat x2) x5) H14 t) H15)) e H13)))))))) H12)) (\lambda (H12: +(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) +O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead +e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))) (\lambda (x2: F).(\lambda (x3: C).(\lambda (x4: C).(\lambda +(x5: T).(\lambda (x6: T).(\lambda (H13: (eq C e (CHead x4 (Flat x2) +x6))).(\lambda (H14: (drop (S n0) O c (CHead x3 (Flat x2) x5))).(\lambda +(H15: (subst0 O v x5 x6)).(\lambda (H16: (csubst0 O v x3 x4)).(eq_ind_r C +(CHead x4 (Flat x2) x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Flat +f) t) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f0) u2)))))) (\lambda (f0: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 +(CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat +f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro3 (drop (S n0) O (CHead c (Flat f) t) (CHead x4 (Flat +x2) x6)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e0 (Flat f0) +u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead x4 (Flat x2) x6) (CHead e2 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e2 (Flat f0) +u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex4_5_intro F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat x2) x6) (CHead e2 +(Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))) x2 x3 x4 x5 x6 (refl_equal C (CHead x4 (Flat x2) x6)) +(drop_drop (Flat f) n0 c (CHead x3 (Flat x2) x5) H14 t) H15 H16)) e +H13)))))))))) H12)) H11))))))]) H3 (drop_gen_drop k x0 e t n0 H6)))))))) H2)) +(\lambda (H2: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat (S n0) (s k j))))) (\lambda (u2: T).(\lambda (c3: C).(\lambda +(_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda (u2: T).(\lambda (_: +C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: T).(\lambda (c2: +C).(\lambda (j: nat).(csubst0 j v c c2)))))).(ex4_3_ind T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat (S n0) (s k j))))) (\lambda (u2: +T).(\lambda (c3: C).(\lambda (_: nat).(eq C c2 (CHead c3 k u2))))) (\lambda +(u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v t u2)))) (\lambda (_: +T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c c3)))) (or4 (drop (S n0) +O (CHead c k t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +k t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c k t) (CHead e1 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c k t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x0: T).(\lambda (x1: C).(\lambda +(x2: nat).(\lambda (H3: (eq nat (S n0) (s k x2))).(\lambda (H4: (eq C c2 +(CHead x1 k x0))).(\lambda (H5: (subst0 x2 v t x0)).(\lambda (H6: (csubst0 x2 +v c x1)).(let H7 \def (eq_ind C c2 (\lambda (c: C).(drop (S n0) O c e)) H1 +(CHead x1 k x0) H4) in ((match k in K return (\lambda (k0: K).((eq nat (S n0) +(s k0 x2)) \to ((drop (r k0 n0) O x1 e) \to (or4 (drop (S n0) O (CHead c k0 +t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +k0 t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c k0 t) (CHead e1 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c k0 t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2))))))))))) with [(Bind b) \Rightarrow +(\lambda (H8: (eq nat (S n0) (s (Bind b) x2))).(\lambda (H9: (drop (r (Bind +b) n0) O x1 e)).(let H10 \def (f_equal nat nat (\lambda (e0: nat).(match e0 +in nat return (\lambda (_: nat).nat) with [O \Rightarrow n0 | (S n) +\Rightarrow n])) (S n0) (S x2) H8) in (let H11 \def (eq_ind_r nat x2 (\lambda +(n: nat).(csubst0 n v c x1)) H6 n0 H10) in (let H12 \def (eq_ind_r nat x2 +(\lambda (n: nat).(subst0 n v t x0)) H5 n0 H10) in (let H13 \def (IHn c x1 v +H11 e H9) in (or4_ind (drop n0 O c e) (ex3_4 F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O +c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e1 +(Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda +(f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (H14: (drop n0 O c e)).(or4_intro0 +(drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (drop_drop (Bind b) n0 c e H14 t))) (\lambda +(H14: (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e0 +(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda +(e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O +c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2))))) (or4 (drop (S n0) O (CHead c (Bind +b) t) e) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda (x5: T).(\lambda (x6: +T).(\lambda (H15: (eq C e (CHead x4 (Flat x3) x6))).(\lambda (H16: (drop n0 O +c (CHead x4 (Flat x3) x5))).(\lambda (H17: (subst0 O v x5 x6)).(eq_ind_r C +(CHead x4 (Flat x3) x6) (\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Bind +b) t) c0) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2))))))))) (or4_intro1 (drop (S n0) O (CHead c (Bind b) t) (CHead x4 (Flat +x3) x6)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e0 (Flat f) u2)))))) +(\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C (CHead x4 (Flat x3) x6) (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C (CHead x4 (Flat x3) x6) (CHead e2 (Flat f) u2))))))) (\lambda +(f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C +T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C +(CHead x4 (Flat x3) x6) (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2))))) x3 x4 x5 x6 (refl_equal C (CHead +x4 (Flat x3) x6)) (drop_drop (Bind b) n0 c (CHead x4 (Flat x3) x5) H16 t) +H17)) e H15)))))))) H14)) (\lambda (H14: (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C +C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop n0 O c (CHead e1 (Flat f) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) +(or4 (drop (S n0) O (CHead c (Bind b) t) e) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda +(x5: C).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x5 (Flat x3) +x6))).(\lambda (H16: (drop n0 O c (CHead x4 (Flat x3) x6))).(\lambda (H17: +(csubst0 O v x4 x5)).(eq_ind_r C (CHead x5 (Flat x3) x6) (\lambda (c0: +C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c (Bind +b) t) (CHead x5 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x6) (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 (Flat f) +u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex3_4_intro F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) x3 x4 x5 x6 +(refl_equal C (CHead x5 (Flat x3) x6)) (drop_drop (Bind b) n0 c (CHead x4 +(Flat x3) x6) H16 t) H17)) e H15)))))))) H14)) (\lambda (H14: (ex4_5 F C C T +T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop n0 O c (CHead e1 +(Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 +e2)))))))).(ex4_5_ind F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop n0 O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))) (or4 (drop (S n0) O (CHead c (Bind b) t) e) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C e (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) +(CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(x3: F).(\lambda (x4: C).(\lambda (x5: C).(\lambda (x6: T).(\lambda (x7: +T).(\lambda (H15: (eq C e (CHead x5 (Flat x3) x7))).(\lambda (H16: (drop n0 O +c (CHead x4 (Flat x3) x6))).(\lambda (H17: (subst0 O v x6 x7)).(\lambda (H18: +(csubst0 O v x4 x5)).(eq_ind_r C (CHead x5 (Flat x3) x7) (\lambda (c0: +C).(or4 (drop (S n0) O (CHead c (Bind b) t) c0) (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c0 (CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Bind b) t) (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead c (Bind +b) t) (CHead x5 (Flat x3) x7)) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e0 +(Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) +O (CHead c (Bind b) t) (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C +C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 (Flat f) +u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat f) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex4_5_intro F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 +(Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Bind b) t) (CHead e1 (Flat +f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) +x3 x4 x5 x6 x7 (refl_equal C (CHead x5 (Flat x3) x7)) (drop_drop (Bind b) n0 +c (CHead x4 (Flat x3) x6) H16 t) H17 H18)) e H15)))))))))) H14)) H13))))))) | +(Flat f) \Rightarrow (\lambda (H8: (eq nat (S n0) (s (Flat f) x2))).(\lambda +(H9: (drop (r (Flat f) n0) O x1 e)).(let H10 \def (f_equal nat nat (\lambda +(e0: nat).e0) (S n0) x2 H8) in (let H11 \def (eq_ind_r nat x2 (\lambda (n: +nat).(csubst0 n v c x1)) H6 (S n0) H10) in (let H12 \def (eq_ind_r nat x2 +(\lambda (n: nat).(subst0 n v t x0)) H5 (S n0) H10) in (let H13 \def (H x1 v +H11 e H9) in (or4_ind (drop (S n0) O c e) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O c (CHead e1 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O c (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (or4 (drop (S n0) O (CHead c (Flat f) t) e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda +(H14: (drop (S n0) O c e)).(or4_intro0 (drop (S n0) O (CHead c (Flat f) t) e) +(ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda +(_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 +e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (drop_drop +(Flat f) n0 c e H14 t))) (\lambda (H14: (ex3_4 F C T T (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f) u2)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O c (CHead e0 (Flat f) u1)))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2))))))).(ex3_4_ind F C +T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C +e (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda +(u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e0 (Flat f0) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2))))) (or4 (drop (S n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e +(CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))))) (\lambda (x3: F).(\lambda +(x4: C).(\lambda (x5: T).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x4 +(Flat x3) x6))).(\lambda (H16: (drop (S n0) O c (CHead x4 (Flat x3) +x5))).(\lambda (H17: (subst0 O v x5 x6)).(eq_ind_r C (CHead x4 (Flat x3) x6) +(\lambda (c0: C).(or4 (drop (S n0) O (CHead c (Flat f) t) c0) (ex3_4 F C T T +(\lambda (f0: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 +(CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))))) (or4_intro1 (drop (S n0) O +(CHead c (Flat f) t) (CHead x4 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat +x3) x6) (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x4 (Flat x3) +x6) (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat +f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat +x3) x6) (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))) (ex3_4_intro F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x4 (Flat +x3) x6) (CHead e0 (Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e0 (Flat f0) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2))))) x3 x4 x5 x6 (refl_equal C (CHead +x4 (Flat x3) x6)) (drop_drop (Flat f) n0 c (CHead x4 (Flat x3) x5) H16 t) +H17)) e H15)))))))) H14)) (\lambda (H14: (ex3_4 F C C T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e (CHead e2 (Flat +f) u)))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(drop (S n0) O c (CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C +C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(eq C e +(CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(drop (S n0) O c (CHead e1 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2))))) +(or4 (drop (S n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda +(x5: C).(\lambda (x6: T).(\lambda (H15: (eq C e (CHead x5 (Flat x3) +x6))).(\lambda (H16: (drop (S n0) O c (CHead x4 (Flat x3) x6))).(\lambda +(H17: (csubst0 O v x4 x5)).(eq_ind_r C (CHead x5 (Flat x3) x6) (\lambda (c0: +C).(or4 (drop (S n0) O (CHead c (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat +f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C c0 (CHead e2 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C c0 (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2))))))))) (or4_intro2 (drop (S n0) O (CHead c (Flat +f) t) (CHead x5 (Flat x3) x6)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x6) (CHead e0 +(Flat f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) +u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: +T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 +(Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))) (ex3_4_intro F C C T (\lambda (f0: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x6) (CHead e2 +(Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O +v e1 e2))))) x3 x4 x5 x6 (refl_equal C (CHead x5 (Flat x3) x6)) (drop_drop +(Flat f) n0 c (CHead x4 (Flat x3) x6) H16 t) H17)) e H15)))))))) H14)) +(\lambda (H14: (ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e2 (Flat f) u2))))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(drop (S n0) O c (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda +(_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda +(f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq +C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O c (CHead e1 (Flat f0) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(or4 (drop (S n0) O (CHead c (Flat f) t) e) (ex3_4 F C T T (\lambda (f0: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(eq C e (CHead e0 (Flat +f0) u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C e (CHead e2 (Flat f0) u)))))) (\lambda (f0: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T +(\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(eq C e (CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c +(Flat f) t) (CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 O v e1 e2)))))))) (\lambda (x3: F).(\lambda (x4: C).(\lambda +(x5: C).(\lambda (x6: T).(\lambda (x7: T).(\lambda (H15: (eq C e (CHead x5 +(Flat x3) x7))).(\lambda (H16: (drop (S n0) O c (CHead x4 (Flat x3) +x6))).(\lambda (H17: (subst0 O v x6 x7)).(\lambda (H18: (csubst0 O v x4 +x5)).(eq_ind_r C (CHead x5 (Flat x3) x7) (\lambda (c0: C).(or4 (drop (S n0) O +(CHead c (Flat f) t) c0) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 (CHead e0 (Flat f0) u2)))))) +(\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) +(ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(eq C c0 (CHead e2 (Flat f0) u)))))) (\lambda (f0: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(drop (S n0) O (CHead c (Flat f) t) (CHead +e1 (Flat f0) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f0: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C c0 +(CHead e2 (Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2))))))))) (or4_intro3 (drop (S n0) O (CHead c (Flat f) t) (CHead x5 +(Flat x3) x7)) (ex3_4 F C T T (\lambda (f0: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e0 (Flat f0) +u2)))))) (\lambda (f0: F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(drop (S n0) O (CHead c (Flat f) t) (CHead e0 (Flat f0) u1)))))) (\lambda +(_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 +u2)))))) (ex3_4 F C C T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 (Flat f0) u)))))) +(\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop (S +n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) u)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 O v e1 e2)))))) +(ex4_5 F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 (Flat f0) +u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) (CHead e1 (Flat f0) +u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) +(ex4_5_intro F C C T T (\lambda (f0: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(eq C (CHead x5 (Flat x3) x7) (CHead e2 +(Flat f0) u2))))))) (\lambda (f0: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop (S n0) O (CHead c (Flat f) t) +(CHead e1 (Flat f0) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))) x3 x4 x5 x6 x7 (refl_equal C (CHead x5 (Flat x3) x7)) +(drop_drop (Flat f) n0 c (CHead x4 (Flat x3) x6) H16 t) H17 H18)) e +H15)))))))))) H14)) H13)))))))]) H3 (drop_gen_drop k x1 e x0 n0 H7)))))))))) +H2)) (csubst0_gen_head k c c2 t v (S n0) H0))))))))))) c1)))) n). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/fwd.ma new file mode 100644 index 000000000..ba0cadc7a --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/fwd.ma @@ -0,0 +1,391 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/fwd". + +include "csubst0/defs.ma". + +theorem csubst0_gen_sort: + \forall (x: C).(\forall (v: T).(\forall (i: nat).(\forall (n: nat).((csubst0 +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)))))))). + +theorem csubst0_gen_head: + \forall (k: K).(\forall (c1: C).(\forall (x: C).(\forall (u1: T).(\forall +(v: T).(\forall (i: nat).((csubst0 i v (CHead c1 k u1) 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)))))))))))) +\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 (_: +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 _ k +_) \Rightarrow k])) (CHead c k0 u0) (CHead c1 k u1) H6) in ((let H9 \def +(f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with +[(CSort _) \Rightarrow c | (CHead c _ _) \Rightarrow c])) (CHead c k0 u0) +(CHead c1 k u1) H6) in (eq_ind C c1 (\lambda (c0: C).((eq K k0 k) \to ((eq T +u0 u1) \to ((eq C (CHead c0 k0 u2) x) \to ((subst0 i0 v u0 u2) \to (or3 +(ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k0 i0) (s k j)))) +(\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 H \def (eq_ind K k0 +(\lambda (k: K).(eq nat (s k i0) i)) H1 k H10) in (or3_intro0 (ex3_2 T nat +(\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 _ k _) +\Rightarrow k])) (CHead c0 k0 u) (CHead c1 k u1) H6) in ((let H9 \def +(f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with +[(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 u) +(CHead c1 k u1) H6) in (eq_ind C c1 (\lambda (c: C).((eq K k0 k) \to ((eq T u +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 (_: +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 H \def (eq_ind K k0 +(\lambda (k: K).(eq nat (s k i0) i)) H1 k H10) in (or3_intro1 (ex3_2 T nat +(\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 _ k +_) \Rightarrow k])) (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 (_: +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 H \def +(eq_ind K k0 (\lambda (k: K).(eq nat (s k i0) i)) H2 k H11) in (or3_intro2 +(ex3_2 T nat (\lambda (_: T).(\lambda (j: nat).(eq nat (s k i0) (s k j)))) +(\lambda (u3: T).(\lambda (_: nat).(eq C (CHead c2 k u2) (CHead c1 k u3)))) +(\lambda (u3: T).(\lambda (j: nat).(subst0 j v u1 u3)))) (ex3_2 C nat +(\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 (_: +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))))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/getl.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/getl.ma new file mode 100644 index 000000000..ed3f9b4c7 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/getl.ma @@ -0,0 +1,1105 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/getl". + +include "csubst0/clear.ma". + +include "csubst0/drop.ma". + +include "getl/fwd.ma". + +theorem csubst0_getl_ge: + \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((getl n c1 +e) \to (getl n c2 e))))))))) +\def + \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (le i n)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 i v c1 +c2)).(\lambda (e: C).(\lambda (H1: (getl n c1 e)).(let H2 \def (getl_gen_all +c1 e n H1) in (ex2_ind C (\lambda (e0: C).(drop n O c1 e0)) (\lambda (e0: +C).(clear e0 e)) (getl n c2 e) (\lambda (x: C).(\lambda (H3: (drop n O c1 +x)).(\lambda (H4: (clear x e)).(lt_eq_gt_e i n (getl n c2 e) (\lambda (H5: +(lt i n)).(getl_intro n c2 e x (csubst0_drop_gt n i H5 c1 c2 v H0 x H3) H4)) +(\lambda (H5: (eq nat i n)).(let H6 \def (eq_ind_r nat n (\lambda (n: +nat).(drop n O c1 x)) H3 i H5) in (let H7 \def (eq_ind_r nat n (\lambda (n: +nat).(le i n)) H i H5) in (eq_ind nat i (\lambda (n0: nat).(getl n0 c2 e)) +(let H8 \def (csubst0_drop_eq i c1 c2 v H0 x H6) in (or4_ind (drop i O c2 x) +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C x (CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop 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 x (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop 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 x (CHead e1 +(Flat f) u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(drop 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))))))) (getl i c2 e) (\lambda (H9: +(drop i O c2 x)).(getl_intro i c2 e x H9 H4)) (\lambda (H9: (ex3_4 F C T T +(\lambda (f: F).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C x +(CHead e0 (Flat f) u)))))) (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop 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_ind F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C x (CHead e0 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(drop i O c2 (CHead e0 +(Flat f) w)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 O v u w))))) (getl i c2 e) (\lambda (x0: F).(\lambda (x1: +C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq C x (CHead x1 (Flat +x0) x2))).(\lambda (H11: (drop i O c2 (CHead x1 (Flat x0) x3))).(\lambda (_: +(subst0 O v x2 x3)).(let H13 \def (eq_ind C x (\lambda (c: C).(clear c e)) H4 +(CHead x1 (Flat x0) x2) H10) in (getl_intro i c2 e (CHead x1 (Flat x0) x3) +H11 (clear_flat x1 e (clear_gen_flat x0 x1 e x2 H13) x0 x3)))))))))) H9)) +(\lambda (H9: (ex3_4 F C C T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C x (CHead e1 (Flat f) u)))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop i O c2 (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 x (CHead e1 (Flat f) u)))))) +(\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(drop i O c2 +(CHead e2 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))) (getl i c2 e) (\lambda (x0: +F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (eq C x +(CHead x1 (Flat x0) x3))).(\lambda (H11: (drop i O c2 (CHead x2 (Flat x0) +x3))).(\lambda (H12: (csubst0 O v x1 x2)).(let H13 \def (eq_ind C x (\lambda +(c: C).(clear c e)) H4 (CHead x1 (Flat x0) x3) H10) in (getl_intro i c2 e +(CHead x2 (Flat x0) x3) H11 (clear_flat x2 e (csubst0_clear_O x1 x2 v H12 e +(clear_gen_flat x0 x1 e x3 H13)) x0 x3)))))))))) H9)) (\lambda (H9: (ex4_5 F +C C T T (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C x (CHead e1 (Flat f) u))))))) (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop 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)))))))).(ex4_5_ind F C C T T (\lambda (f: F).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C x (CHead e1 (Flat f) +u))))))) (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop 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)))))) (getl i c2 e) (\lambda (x0: +F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H10: (eq C x (CHead x1 (Flat x0) x3))).(\lambda (H11: (drop i O +c2 (CHead x2 (Flat x0) x4))).(\lambda (_: (subst0 O v x3 x4)).(\lambda (H13: +(csubst0 O v x1 x2)).(let H14 \def (eq_ind C x (\lambda (c: C).(clear c e)) +H4 (CHead x1 (Flat x0) x3) H10) in (getl_intro i c2 e (CHead x2 (Flat x0) x4) +H11 (clear_flat x2 e (csubst0_clear_O x1 x2 v H13 e (clear_gen_flat x0 x1 e +x3 H14)) x0 x4)))))))))))) H9)) H8)) n H5)))) (\lambda (H5: (lt n +i)).(le_lt_false i n H H5 (getl n c2 e))))))) H2)))))))))). + +theorem csubst0_getl_lt: + \forall (i: nat).(\forall (n: nat).((lt n i) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((getl n c1 +e) \to (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))))))))))) +\def + \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (lt n i)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 i v c1 +c2)).(\lambda (e: C).(\lambda (H1: (getl n c1 e)).(let H2 \def (getl_gen_all +c1 e n H1) in (ex2_ind C (\lambda (e0: C).(drop n O c1 e0)) (\lambda (e0: +C).(clear e0 e)) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x: +C).(\lambda (H3: (drop n O c1 x)).(\lambda (H4: (clear x e)).(let H5 \def +(csubst0_drop_lt n i H c1 c2 v H0 x H3) in (or4_ind (drop n O c2 x) (ex3_4 K +C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +x (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop n O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n)) v u w)))))) +(ex3_4 K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(eq C x (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop n O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 +e2)))))) (ex4_5 K C C T T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C x (CHead e1 k u))))))) (\lambda (k: +K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(drop n O +c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n)) v u w)))))) +(\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (s k n)) v e1 e2))))))) (or4 (getl n c2 e) (ex3_4 B +C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))))) (\lambda (H6: (drop n O c2 x)).(or4_intro0 (getl n c2 e) +(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2))))))) (getl_intro n c2 e x H6 H4))) (\lambda (H6: +(ex3_4 K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C x (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(drop n O c2 (CHead e0 k w)))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k n)) v u +w))))))).(ex3_4_ind K C T T (\lambda (k: K).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C x (CHead e0 k u)))))) (\lambda (k: K).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e0 k w)))))) (\lambda +(k: K).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k +n)) v u w))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x0: +K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq C x +(CHead x1 x0 x2))).(\lambda (H8: (drop n O c2 (CHead x1 x0 x3))).(\lambda +(H9: (subst0 (minus i (s x0 n)) v x2 x3)).(let H10 \def (eq_ind C x (\lambda +(c: C).(clear c e)) H4 (CHead x1 x0 x2) H7) in ((match x0 in K return +(\lambda (k: K).((drop n O c2 (CHead x1 k x3)) \to ((subst0 (minus i (s k n)) +v x2 x3) \to ((clear (CHead x1 k x2) e) \to (or4 (getl n c2 e) (ex3_4 B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))))))))) with [(Bind b) \Rightarrow (\lambda (H11: (drop n O c2 +(CHead x1 (Bind b) x3))).(\lambda (H12: (subst0 (minus i (s (Bind b) n)) v x2 +x3)).(\lambda (H13: (clear (CHead x1 (Bind b) x2) e)).(eq_ind_r C (CHead x1 +(Bind b) x2) (\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b0: +B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind +b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C c (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b0) u))))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro1 +(getl n c2 (CHead x1 (Bind b) x2)) (ex3_4 B C T T (\lambda (b0: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x2) (CHead +e0 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x1 (Bind b) x2) (CHead e1 (Bind b0) u)))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead x1 (Bind b) x2) (CHead e1 (Bind b0) u))))))) (\lambda +(b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (ex3_4_intro B C T +T (\lambda (b0: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C +(CHead x1 (Bind b) x2) (CHead e0 (Bind b0) u)))))) (\lambda (b0: B).(\lambda +(e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b0) +w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w))))) b x1 x2 x3 (refl_equal C (CHead x1 +(Bind b) x2)) (getl_intro n c2 (CHead x1 (Bind b) x3) (CHead x1 (Bind b) x3) +H11 (clear_bind b x1 x3)) H12)) e (clear_gen_bind b x1 e x2 H13))))) | (Flat +f) \Rightarrow (\lambda (H11: (drop n O c2 (CHead x1 (Flat f) x3))).(\lambda +(_: (subst0 (minus i (s (Flat f) n)) v x2 x3)).(\lambda (H13: (clear (CHead +x1 (Flat f) x2) e)).(or4_intro0 (getl n c2 e) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind +b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C e (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (getl_intro n c2 e +(CHead x1 (Flat f) x3) H11 (clear_flat x1 e (clear_gen_flat f x1 e x2 H13) f +x3))))))]) H8 H9 H10))))))))) H6)) (\lambda (H6: (ex3_4 K C C T (\lambda (k: +K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C x (CHead e1 k +u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(drop n O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 e2))))))).(ex3_4_ind +K C C T (\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C x (CHead e1 k u)))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(drop n O c2 (CHead e2 k u)))))) (\lambda (k: K).(\lambda +(e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 +e2))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x0: +K).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H7: (eq C x +(CHead x1 x0 x3))).(\lambda (H8: (drop n O c2 (CHead x2 x0 x3))).(\lambda +(H9: (csubst0 (minus i (s x0 n)) v x1 x2)).(let H10 \def (eq_ind C x (\lambda +(c: C).(clear c e)) H4 (CHead x1 x0 x3) H7) in ((match x0 in K return +(\lambda (k: K).((drop n O c2 (CHead x2 k x3)) \to ((csubst0 (minus i (s k +n)) v x1 x2) \to ((clear (CHead x1 k x3) e) \to (or4 (getl n c2 e) (ex3_4 B C +T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))))))))) with [(Bind b) \Rightarrow (\lambda (H11: (drop n O c2 +(CHead x2 (Bind b) x3))).(\lambda (H12: (csubst0 (minus i (s (Bind b) n)) v +x1 x2)).(\lambda (H13: (clear (CHead x1 (Bind b) x3) e)).(eq_ind_r C (CHead +x1 (Bind b) x3) (\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda +(b0: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 +(Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C c (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b0) u))))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro2 +(getl n c2 (CHead x1 (Bind b) x3)) (ex3_4 B C T T (\lambda (b0: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x3) (CHead +e0 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u)))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u))))))) (\lambda +(b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (ex3_4_intro B C C +T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C +(CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b0) +u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i (S n)) v e1 e2))))) b x1 x2 x3 (refl_equal C (CHead x1 +(Bind b) x3)) (getl_intro n c2 (CHead x2 (Bind b) x3) (CHead x2 (Bind b) x3) +H11 (clear_bind b x2 x3)) H12)) e (clear_gen_bind b x1 e x3 H13))))) | (Flat +f) \Rightarrow (\lambda (H11: (drop n O c2 (CHead x2 (Flat f) x3))).(\lambda +(H12: (csubst0 (minus i (s (Flat f) n)) v x1 x2)).(\lambda (H13: (clear +(CHead x1 (Flat f) x3) e)).(let H14 \def (eq_ind nat (minus i n) (\lambda (n: +nat).(csubst0 n v x1 x2)) H12 (S (minus i (S n))) (minus_x_Sy i n H)) in (let +H15 \def (csubst0_clear_S x1 x2 v (minus i (S n)) H14 e (clear_gen_flat f x1 +e x3 H13)) in (or4_ind (clear x2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 +(CHead e0 (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear x2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u1))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) +v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (or4 (getl n c2 e) +(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2)))))))) (\lambda (H16: (clear x2 e)).(or4_intro0 +(getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n +c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (getl_intro n c2 e (CHead x2 +(Flat f) x3) H11 (clear_flat x2 e H16 f x3)))) (\lambda (H16: (ex3_4 B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (_: +T).(\lambda (u2: T).(clear x2 (CHead e (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) +v u1 u2))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda +(u1: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e0 +(Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 (minus i (S n)) v u1 u2))))) (or4 (getl n c2 e) (ex3_4 B C T +T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))))) (\lambda (x4: B).(\lambda (x5: C).(\lambda (x6: T).(\lambda +(x7: T).(\lambda (H17: (eq C e (CHead x5 (Bind x4) x6))).(\lambda (H18: +(clear x2 (CHead x5 (Bind x4) x7))).(\lambda (H19: (subst0 (minus i (S n)) v +x6 x7)).(eq_ind_r C (CHead x5 (Bind x4) x6) (\lambda (c: C).(or4 (getl n c2 +c) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C c (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C c (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2))))))))) (or4_intro1 (getl n c2 (CHead x5 (Bind x4) +x6)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead x5 (Bind x4) x6) (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x5 (Bind x4) +x6) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x6) (CHead e1 +(Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) +(ex3_4_intro B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x6) (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w))))) x4 x5 x6 x7 (refl_equal +C (CHead x5 (Bind x4) x6)) (getl_intro n c2 (CHead x5 (Bind x4) x7) (CHead x2 +(Flat f) x3) H11 (clear_flat x2 (CHead x5 (Bind x4) x7) H18 f x3)) H19)) e +H17)))))))) H16)) (\lambda (H16: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))).(ex3_4_ind B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(clear x2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x4: +B).(\lambda (x5: C).(\lambda (x6: C).(\lambda (x7: T).(\lambda (H17: (eq C e +(CHead x5 (Bind x4) x7))).(\lambda (H18: (clear x2 (CHead x6 (Bind x4) +x7))).(\lambda (H19: (csubst0 (minus i (S n)) v x5 x6)).(eq_ind_r C (CHead x5 +(Bind x4) x7) (\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind +b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C c (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro2 +(getl n c2 (CHead x5 (Bind x4) x7)) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x7) (CHead +e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C (CHead x5 (Bind x4) x7) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) +x7) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))))) (ex3_4_intro B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda +(_: C).(\lambda (u: T).(eq C (CHead x5 (Bind x4) x7) (CHead e1 (Bind b) +u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))) x4 +x5 x6 x7 (refl_equal C (CHead x5 (Bind x4) x7)) (getl_intro n c2 (CHead x6 +(Bind x4) x7) (CHead x2 (Flat f) x3) H11 (clear_flat x2 (CHead x6 (Bind x4) +x7) H18 f x3)) H19)) e H17)))))))) H16)) (\lambda (H16: (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(_: T).(eq C e (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e2 +(Bind b) u2))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda +(e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e1 +(Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +(minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n +c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x4: B).(\lambda +(x5: C).(\lambda (x6: C).(\lambda (x7: T).(\lambda (x8: T).(\lambda (H17: (eq +C e (CHead x5 (Bind x4) x7))).(\lambda (H18: (clear x2 (CHead x6 (Bind x4) +x8))).(\lambda (H19: (subst0 (minus i (S n)) v x7 x8)).(\lambda (H20: +(csubst0 (minus i (S n)) v x5 x6)).(eq_ind_r C (CHead x5 (Bind x4) x7) +(\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro3 +(getl n c2 (CHead x5 (Bind x4) x7)) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) x7) (CHead +e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C (CHead x5 (Bind x4) x7) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) +x7) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))))) (ex4_5_intro B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x5 (Bind x4) +x7) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) x4 x5 x6 x7 x8 (refl_equal C (CHead x5 (Bind x4) x7)) +(getl_intro n c2 (CHead x6 (Bind x4) x8) (CHead x2 (Flat f) x3) H11 +(clear_flat x2 (CHead x6 (Bind x4) x8) H18 f x3)) H19 H20)) e H17)))))))))) +H16)) H15))))))]) H8 H9 H10))))))))) H6)) (\lambda (H6: (ex4_5 K C C T T +(\lambda (k: K).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C x (CHead e1 k u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(drop n O c2 (CHead e2 k w))))))) (\lambda +(k: K).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (s k n)) v u w)))))) (\lambda (k: K).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (s k +n)) v e1 e2)))))))).(ex4_5_ind K C C T T (\lambda (k: K).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C x (CHead e1 k +u))))))) (\lambda (k: K).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (w: T).(drop n O c2 (CHead e2 k w))))))) (\lambda (k: K).(\lambda +(_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (s k +n)) v u w)))))) (\lambda (k: K).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 (minus i (s k n)) v e1 e2)))))) (or4 (getl n +c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n +c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x0: K).(\lambda +(x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H7: (eq +C x (CHead x1 x0 x3))).(\lambda (H8: (drop n O c2 (CHead x2 x0 x4))).(\lambda +(H9: (subst0 (minus i (s x0 n)) v x3 x4)).(\lambda (H10: (csubst0 (minus i (s +x0 n)) v x1 x2)).(let H11 \def (eq_ind C x (\lambda (c: C).(clear c e)) H4 +(CHead x1 x0 x3) H7) in ((match x0 in K return (\lambda (k: K).((drop n O c2 +(CHead x2 k x4)) \to ((subst0 (minus i (s k n)) v x3 x4) \to ((csubst0 (minus +i (s k n)) v x1 x2) \to ((clear (CHead x1 k x3) e) \to (or4 (getl n c2 e) +(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2))))))))))))) with [(Bind b) \Rightarrow (\lambda +(H12: (drop n O c2 (CHead x2 (Bind b) x4))).(\lambda (H13: (subst0 (minus i +(s (Bind b) n)) v x3 x4)).(\lambda (H14: (csubst0 (minus i (s (Bind b) n)) v +x1 x2)).(\lambda (H15: (clear (CHead x1 (Bind b) x3) e)).(eq_ind_r C (CHead +x1 (Bind b) x3) (\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda +(b0: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 +(Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C c (CHead e1 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (_: C).(\lambda +(e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b0) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b0) u))))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro3 +(getl n c2 (CHead x1 (Bind b) x3)) (ex3_4 B C T T (\lambda (b0: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x3) (CHead +e0 (Bind b0) u)))))) (\lambda (b0: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b0) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u)))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b0) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u))))))) (\lambda +(b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (ex4_5_intro B C C +T T (\lambda (b0: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq C (CHead x1 (Bind b) x3) (CHead e1 (Bind b0) u))))))) +(\lambda (b0: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e2 (Bind b0) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) b x1 x2 x3 x4 +(refl_equal C (CHead x1 (Bind b) x3)) (getl_intro n c2 (CHead x2 (Bind b) x4) +(CHead x2 (Bind b) x4) H12 (clear_bind b x2 x4)) H13 H14)) e (clear_gen_bind +b x1 e x3 H15)))))) | (Flat f) \Rightarrow (\lambda (H12: (drop n O c2 (CHead +x2 (Flat f) x4))).(\lambda (_: (subst0 (minus i (s (Flat f) n)) v x3 +x4)).(\lambda (H14: (csubst0 (minus i (s (Flat f) n)) v x1 x2)).(\lambda +(H15: (clear (CHead x1 (Flat f) x3) e)).(let H16 \def (eq_ind nat (minus i n) +(\lambda (n: nat).(csubst0 n v x1 x2)) H14 (S (minus i (S n))) (minus_x_Sy i +n H)) in (let H17 \def (csubst0_clear_S x1 x2 v (minus i (S n)) H16 e +(clear_gen_flat f x1 e x3 H15)) in (or4_ind (clear x2 e) (ex3_4 B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(clear x2 (CHead e0 (Bind b) u2)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 (minus i (S n)) +v u1 u2)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x2 (CHead e2 (Bind +b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))))) (or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (H18: +(clear x2 e)).(or4_intro0 (getl n c2 e) (ex3_4 B C T T (\lambda (b: +B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind +b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C e (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) (getl_intro n c2 e +(CHead x2 (Flat f) x4) H12 (clear_flat x2 e H18 f x4)))) (\lambda (H18: +(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: +T).(eq C e (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e: +C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e (Bind b) u2)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +(minus i (S n)) v u1 u2))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u1)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: T).(clear x2 +(CHead e0 (Bind b) u2)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: +T).(\lambda (u2: T).(subst0 (minus i (S n)) v u1 u2))))) (or4 (getl n c2 e) +(ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2)))))))) (\lambda (x5: B).(\lambda (x6: C).(\lambda +(x7: T).(\lambda (x8: T).(\lambda (H19: (eq C e (CHead x6 (Bind x5) +x7))).(\lambda (H20: (clear x2 (CHead x6 (Bind x5) x8))).(\lambda (H21: +(subst0 (minus i (S n)) v x7 x8)).(eq_ind_r C (CHead x6 (Bind x5) x7) +(\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro1 +(getl n c2 (CHead x6 (Bind x5) x7)) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) x7) (CHead +e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C (CHead x6 (Bind x5) x7) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) +x7) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))))) (ex3_4_intro B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) x7) (CHead e0 (Bind b) +u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w))))) x5 x6 +x7 x8 (refl_equal C (CHead x6 (Bind x5) x7)) (getl_intro n c2 (CHead x6 (Bind +x5) x8) (CHead x2 (Flat f) x4) H12 (clear_flat x2 (CHead x6 (Bind x5) x8) H20 +f x4)) H21)) e H19)))))))) H18)) (\lambda (H18: (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(clear x2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 +e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(clear x2 (CHead e2 (Bind +b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(csubst0 (minus i (S n)) v e1 e2))))) (or4 (getl n c2 e) (ex3_4 B C T T +(\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: +T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C e (CHead e1 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))))) (\lambda (x5: B).(\lambda (x6: C).(\lambda (x7: C).(\lambda +(x8: T).(\lambda (H19: (eq C e (CHead x6 (Bind x5) x8))).(\lambda (H20: +(clear x2 (CHead x7 (Bind x5) x8))).(\lambda (H21: (csubst0 (minus i (S n)) v +x6 x7)).(eq_ind_r C (CHead x6 (Bind x5) x8) (\lambda (c: C).(or4 (getl n c2 +c) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C c (CHead e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 (Bind b) w)))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(eq C c (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq C c (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2))))))))) (or4_intro2 (getl n c2 (CHead x6 (Bind x5) +x8)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: T).(\lambda +(_: T).(eq C (CHead x6 (Bind x5) x8) (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C (CHead x6 (Bind x5) +x8) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) x8) (CHead e1 +(Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))) +(ex3_4_intro B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(eq C (CHead x6 (Bind x5) x8) (CHead e1 (Bind b) u)))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 +(CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))) x5 x6 x7 x8 +(refl_equal C (CHead x6 (Bind x5) x8)) (getl_intro n c2 (CHead x7 (Bind x5) +x8) (CHead x2 (Flat f) x4) H12 (clear_flat x2 (CHead x7 (Bind x5) x8) H20 f +x4)) H21)) e H19)))))))) H18)) (\lambda (H18: (ex4_5 B C C T T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e +(CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 (minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C e (CHead e1 (Bind +b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (u2: T).(clear x2 (CHead e2 (Bind b) u2))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +(minus i (S n)) v u1 u2)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(or4 (getl n c2 e) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C e (CHead e1 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: +T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e (CHead e1 (Bind b) u))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n +c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e1 e2)))))))) (\lambda (x5: B).(\lambda +(x6: C).(\lambda (x7: C).(\lambda (x8: T).(\lambda (x9: T).(\lambda (H19: (eq +C e (CHead x6 (Bind x5) x8))).(\lambda (H20: (clear x2 (CHead x7 (Bind x5) +x9))).(\lambda (H21: (subst0 (minus i (S n)) v x8 x9)).(\lambda (H22: +(csubst0 (minus i (S n)) v x6 x7)).(eq_ind_r C (CHead x6 (Bind x5) x8) +(\lambda (c: C).(or4 (getl n c2 c) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e0 (Bind b) u)))))) +(\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c2 +(CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: +T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T +(\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq C c +(CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (_: T).(eq C c (CHead e1 (Bind b) u))))))) +(\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: +T).(getl n c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v +u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: +T).(\lambda (_: T).(csubst0 (minus i (S n)) v e1 e2))))))))) (or4_intro3 +(getl n c2 (CHead x6 (Bind x5) x8)) (ex3_4 B C T T (\lambda (b: B).(\lambda +(e0: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) x8) (CHead +e0 (Bind b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda +(w: T).(getl n c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 +B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(eq +C (CHead x6 (Bind x5) x8) (CHead e1 (Bind b) u)))))) (\lambda (b: B).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(getl n c2 (CHead e2 (Bind b) u)))))) +(\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) +x8) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))))) (ex4_5_intro B C C T T (\lambda (b: B).(\lambda (e1: +C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C (CHead x6 (Bind x5) +x8) (CHead e1 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (_: T).(\lambda (w: T).(getl n c2 (CHead e2 (Bind b) w))))))) +(\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e1: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2)))))) x5 x6 x7 x8 x9 (refl_equal C (CHead x6 (Bind x5) x8)) +(getl_intro n c2 (CHead x7 (Bind x5) x9) (CHead x2 (Flat f) x4) H12 +(clear_flat x2 (CHead x7 (Bind x5) x9) H20 f x4)) H21 H22)) e H19)))))))))) +H18)) H17)))))))]) H8 H9 H10 H11))))))))))) H6)) H5))))) H2)))))))))). + +theorem csubst0_getl_ge_back: + \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst0 i v c1 c2) \to (\forall (e: C).((getl n c2 +e) \to (getl n c1 e))))))))) +\def + \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (le i n)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst0 i v c1 +c2)).(\lambda (e: C).(\lambda (H1: (getl n c2 e)).(let H2 \def (getl_gen_all +c2 e n H1) in (ex2_ind C (\lambda (e0: C).(drop n O c2 e0)) (\lambda (e0: +C).(clear e0 e)) (getl n c1 e) (\lambda (x: C).(\lambda (H3: (drop n O c2 +x)).(\lambda (H4: (clear x e)).(lt_eq_gt_e i n (getl n c1 e) (\lambda (H5: +(lt i n)).(getl_intro n c1 e x (csubst0_drop_gt_back n i H5 c1 c2 v H0 x H3) +H4)) (\lambda (H5: (eq nat i n)).(let H6 \def (eq_ind_r nat n (\lambda (n: +nat).(drop n O c2 x)) H3 i H5) in (let H7 \def (eq_ind_r nat n (\lambda (n: +nat).(le i n)) H i H5) in (eq_ind nat i (\lambda (n0: nat).(getl n0 c1 e)) +(let H8 \def (csubst0_drop_eq_back i c1 c2 v H0 x H6) in (or4_ind (drop i O +c1 x) (ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C x (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop i O c1 (CHead e0 +(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (ex3_4 F C C T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (u: T).(eq C x (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i O c1 +(CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2)))))) (ex4_5 F C C T T (\lambda (f: +F).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C x +(CHead e2 (Flat f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(drop i O c1 (CHead e1 (Flat f) u1))))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda +(e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 O v e1 e2))))))) (getl i c1 +e) (\lambda (H9: (drop i O c1 x)).(getl_intro i c1 e x H9 H4)) (\lambda (H9: +(ex3_4 F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: T).(\lambda (u2: +T).(eq C x (CHead e0 (Flat f) u2)))))) (\lambda (f: F).(\lambda (e0: +C).(\lambda (u1: T).(\lambda (_: T).(drop i O c1 (CHead e0 (Flat f) u1)))))) +(\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v +u1 u2))))))).(ex3_4_ind F C T T (\lambda (f: F).(\lambda (e0: C).(\lambda (_: +T).(\lambda (u2: T).(eq C x (CHead e0 (Flat f) u2)))))) (\lambda (f: +F).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(drop i O c1 (CHead e0 +(Flat f) u1)))))) (\lambda (_: F).(\lambda (_: C).(\lambda (u1: T).(\lambda +(u2: T).(subst0 O v u1 u2))))) (getl i c1 e) (\lambda (x0: F).(\lambda (x1: +C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq C x (CHead x1 (Flat +x0) x3))).(\lambda (H11: (drop i O c1 (CHead x1 (Flat x0) x2))).(\lambda (_: +(subst0 O v x2 x3)).(let H13 \def (eq_ind C x (\lambda (c: C).(clear c e)) H4 +(CHead x1 (Flat x0) x3) H10) in (getl_intro i c1 e (CHead x1 (Flat x0) x2) +H11 (clear_flat x1 e (clear_gen_flat x0 x1 e x3 H13) x0 x2)))))))))) H9)) +(\lambda (H9: (ex3_4 F C C T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(eq C x (CHead e2 (Flat f) u)))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i O c1 (CHead e1 +(Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(csubst0 O v e1 e2))))))).(ex3_4_ind F C C T (\lambda (f: F).(\lambda +(_: C).(\lambda (e2: C).(\lambda (u: T).(eq C x (CHead e2 (Flat f) u)))))) +(\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u: T).(drop i O c1 +(CHead e1 (Flat f) u)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: +C).(\lambda (_: T).(csubst0 O v e1 e2))))) (getl i c1 e) (\lambda (x0: +F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (eq C x +(CHead x2 (Flat x0) x3))).(\lambda (H11: (drop i O c1 (CHead x1 (Flat x0) +x3))).(\lambda (H12: (csubst0 O v x1 x2)).(let H13 \def (eq_ind C x (\lambda +(c: C).(clear c e)) H4 (CHead x2 (Flat x0) x3) H10) in (getl_intro i c1 e +(CHead x1 (Flat x0) x3) H11 (clear_flat x1 e (csubst0_clear_O_back x1 x2 v +H12 e (clear_gen_flat x0 x2 e x3 H13)) x0 x3)))))))))) H9)) (\lambda (H9: +(ex4_5 F C C T T (\lambda (f: F).(\lambda (_: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (u2: T).(eq C x (CHead e2 (Flat f) u2))))))) (\lambda (f: +F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(drop i +O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: F).(\lambda (_: C).(\lambda +(_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 O v u1 u2)))))) (\lambda (_: +F).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +O v e1 e2)))))))).(ex4_5_ind F C C T T (\lambda (f: F).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (u2: T).(eq C x (CHead e2 (Flat +f) u2))))))) (\lambda (f: F).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(drop i O c1 (CHead e1 (Flat f) u1))))))) (\lambda (_: +F).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (u2: T).(subst0 +O v u1 u2)))))) (\lambda (_: F).(\lambda (e1: C).(\lambda (e2: C).(\lambda +(_: T).(\lambda (_: T).(csubst0 O v e1 e2)))))) (getl i c1 e) (\lambda (x0: +F).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: +T).(\lambda (H10: (eq C x (CHead x2 (Flat x0) x4))).(\lambda (H11: (drop i O +c1 (CHead x1 (Flat x0) x3))).(\lambda (_: (subst0 O v x3 x4)).(\lambda (H13: +(csubst0 O v x1 x2)).(let H14 \def (eq_ind C x (\lambda (c: C).(clear c e)) +H4 (CHead x2 (Flat x0) x4) H10) in (getl_intro i c1 e (CHead x1 (Flat x0) x3) +H11 (clear_flat x1 e (csubst0_clear_O_back x1 x2 v H13 e (clear_gen_flat x0 +x2 e x4 H14)) x0 x3)))))))))))) H9)) H8)) n H5)))) (\lambda (H5: (lt n +i)).(le_lt_false i n H H5 (getl n c1 e))))))) H2)))))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/props.ma new file mode 100644 index 000000000..11e81cb3f --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/props.ma @@ -0,0 +1,54 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubst0/props". + +include "csubst0/defs.ma". + +theorem csubst0_snd_bind: + \forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall +(u2: T).((subst0 i v u1 u2) \to (\forall (c: C).(csubst0 (S i) v (CHead c +(Bind b) u1) (CHead c (Bind b) u2)))))))) +\def + \lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (H: (subst0 i v u1 u2)).(\lambda (c: C).(eq_ind nat (s (Bind +b) i) (\lambda (n: nat).(csubst0 n v (CHead c (Bind b) u1) (CHead c (Bind b) +u2))) (csubst0_snd (Bind b) i v u1 u2 H c) (S i) (refl_equal nat (S +i))))))))). + +theorem csubst0_fst_bind: + \forall (b: B).(\forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall +(v: T).((csubst0 i v c1 c2) \to (\forall (u: T).(csubst0 (S i) v (CHead c1 +(Bind b) u) (CHead c2 (Bind b) u)))))))) +\def + \lambda (b: B).(\lambda (i: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda +(v: T).(\lambda (H: (csubst0 i v c1 c2)).(\lambda (u: T).(eq_ind nat (s (Bind +b) i) (\lambda (n: nat).(csubst0 n v (CHead c1 (Bind b) u) (CHead c2 (Bind b) +u))) (csubst0_fst (Bind b) i c1 c2 v H u) (S i) (refl_equal nat (S i))))))))). + +theorem csubst0_both_bind: + \forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall +(u2: T).((subst0 i v u1 u2) \to (\forall (c1: C).(\forall (c2: C).((csubst0 i +v c1 c2) \to (csubst0 (S i) v (CHead c1 (Bind b) u1) (CHead c2 (Bind b) +u2)))))))))) +\def + \lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (H: (subst0 i v u1 u2)).(\lambda (c1: C).(\lambda (c2: +C).(\lambda (H0: (csubst0 i v c1 c2)).(eq_ind nat (s (Bind b) i) (\lambda (n: +nat).(csubst0 n v (CHead c1 (Bind b) u1) (CHead c2 (Bind b) u2))) +(csubst0_both (Bind b) i v u1 u2 H c1 c2 H0) (S i) (refl_equal nat (S +i))))))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/defs.ma new file mode 100644 index 000000000..00a6abca1 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/defs.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/defs". + +include "csubst0/defs.ma". + +inductive csubst1 (i:nat) (v:T) (c1:C): C \to Prop \def +| csubst1_refl: csubst1 i v c1 c1 +| csubst1_sing: \forall (c2: C).((csubst0 i v c1 c2) \to (csubst1 i v c1 c2)). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/fwd.ma new file mode 100644 index 000000000..1706272e6 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/fwd.ma @@ -0,0 +1,126 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/fwd". + +include "csubst1/defs.ma". + +include "csubst0/fwd.ma". + +include "subst1/props.ma". + +theorem csubst1_gen_head: + \forall (k: K).(\forall (c1: C).(\forall (x: C).(\forall (u1: T).(\forall +(v: T).(\forall (i: nat).((csubst1 (s k i) v (CHead c1 k u1) 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)))))))))) +\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 (_: +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 (H: (eq nat (s k i) (s k +x1))).(\lambda (H4: (eq C x (CHead c1 k x0))).(\lambda (H5: (subst0 x1 v u1 +x0)).(eq_ind_r C (CHead c1 k x0) (\lambda (c: C).(ex3_2 T C (\lambda (u2: +T).(\lambda (c3: C).(eq C c (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: +C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 +c3))))) (let H6 \def (eq_ind_r nat x1 (\lambda (n: nat).(subst0 n v u1 x0)) +H5 i (s_inj k i x1 H)) in (ex3_2_intro T C (\lambda (u2: T).(\lambda (c3: +C).(eq C (CHead c1 k x0) (CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: +C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 +c3))) x0 c1 (refl_equal C (CHead c1 k x0)) (subst1_single i v u1 x0 H6) +(csubst1_refl i v c1))) x H4)))))) H3)) (\lambda (H3: (ex3_2 C nat (\lambda +(_: C).(\lambda (j: nat).(eq nat (s k i) (s k j)))) (\lambda (c2: C).(\lambda +(_: nat).(eq C x (CHead c2 k u1)))) (\lambda (c2: C).(\lambda (j: +nat).(csubst0 j v c1 c2))))).(ex3_2_ind C nat (\lambda (_: C).(\lambda (j: +nat).(eq nat (s k i) (s k j)))) (\lambda (c3: C).(\lambda (_: nat).(eq C x +(CHead c3 k u1)))) (\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c1 c3))) +(ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C x (CHead c3 k u2)))) +(\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: +T).(\lambda (c3: C).(csubst1 i v c1 c3)))) (\lambda (x0: C).(\lambda (x1: +nat).(\lambda (H: (eq nat (s k i) (s k x1))).(\lambda (H4: (eq C x (CHead x0 +k u1))).(\lambda (H5: (csubst0 x1 v c1 x0)).(eq_ind_r C (CHead x0 k u1) +(\lambda (c: C).(ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C c (CHead +c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda +(_: T).(\lambda (c3: C).(csubst1 i v c1 c3))))) (let H6 \def (eq_ind_r nat x1 +(\lambda (n: nat).(csubst0 n v c1 x0)) H5 i (s_inj k i x1 H)) in (ex3_2_intro +T C (\lambda (u2: T).(\lambda (c3: C).(eq C (CHead x0 k u1) (CHead c3 k +u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: +T).(\lambda (c3: C).(csubst1 i v c1 c3))) u1 x0 (refl_equal C (CHead x0 k +u1)) (subst1_refl i v u1) (csubst1_sing i v c1 x0 H6))) x H4)))))) H3)) +(\lambda (H3: (ex4_3 T C nat (\lambda (_: T).(\lambda (_: C).(\lambda (j: +nat).(eq nat (s k i) (s k j))))) (\lambda (u2: T).(\lambda (c2: C).(\lambda +(_: nat).(eq C x (CHead c2 k u2))))) (\lambda (u2: T).(\lambda (_: +C).(\lambda (j: nat).(subst0 j v u1 u2)))) (\lambda (_: T).(\lambda (c2: +C).(\lambda (j: nat).(csubst0 j v c1 c2)))))).(ex4_3_ind T C nat (\lambda (_: +T).(\lambda (_: C).(\lambda (j: nat).(eq nat (s k i) (s k j))))) (\lambda +(u2: T).(\lambda (c3: C).(\lambda (_: nat).(eq C x (CHead c3 k u2))))) +(\lambda (u2: T).(\lambda (_: C).(\lambda (j: nat).(subst0 j v u1 u2)))) +(\lambda (_: T).(\lambda (c3: C).(\lambda (j: nat).(csubst0 j v c1 c3)))) +(ex3_2 T C (\lambda (u2: T).(\lambda (c3: C).(eq C x (CHead c3 k u2)))) +(\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: +T).(\lambda (c3: C).(csubst1 i v c1 c3)))) (\lambda (x0: T).(\lambda (x1: +C).(\lambda (x2: nat).(\lambda (H: (eq nat (s k i) (s k x2))).(\lambda (H4: +(eq C x (CHead x1 k x0))).(\lambda (H5: (subst0 x2 v u1 x0)).(\lambda (H6: +(csubst0 x2 v c1 x1)).(eq_ind_r C (CHead x1 k x0) (\lambda (c: C).(ex3_2 T C +(\lambda (u2: T).(\lambda (c3: C).(eq C c (CHead c3 k u2)))) (\lambda (u2: +T).(\lambda (_: C).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (c3: +C).(csubst1 i v c1 c3))))) (let H7 \def (eq_ind_r nat x2 (\lambda (n: +nat).(csubst0 n v c1 x1)) H6 i (s_inj k i x2 H)) in (let H8 \def (eq_ind_r +nat x2 (\lambda (n: nat).(subst0 n v u1 x0)) H5 i (s_inj k i x2 H)) in +(ex3_2_intro T C (\lambda (u2: T).(\lambda (c3: C).(eq C (CHead x1 k x0) +(CHead c3 k u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 i v u1 u2))) +(\lambda (_: T).(\lambda (c3: C).(csubst1 i v c1 c3))) x0 x1 (refl_equal C +(CHead x1 k x0)) (subst1_single i v u1 x0 H8) (csubst1_sing i v c1 x1 H7)))) +x H4)))))))) H3)) (csubst0_gen_head k c1 x u1 v (s k i) H2))) c2 (sym_eq C c2 +x H1) H0))]) in (H0 (refl_equal C x))))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/getl.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/getl.ma new file mode 100644 index 000000000..ff4f78530 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/getl.ma @@ -0,0 +1,275 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/getl". + +include "csubst1/props.ma". + +include "csubst0/getl.ma". + +include "csubst0/props.ma". + +include "subst1/props.ma". + +include "drop/props.ma". + +theorem csubst1_getl_ge: + \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst1 i v c1 c2) \to (\forall (e: C).((getl n c1 +e) \to (getl n c2 e))))))))) +\def + \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (le i n)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst1 i v c1 +c2)).(csubst1_ind i v c1 (\lambda (c: C).(\forall (e: C).((getl n c1 e) \to +(getl n c e)))) (\lambda (e: C).(\lambda (H1: (getl n c1 e)).H1)) (\lambda +(c3: C).(\lambda (H1: (csubst0 i v c1 c3)).(\lambda (e: C).(\lambda (H2: +(getl n c1 e)).(csubst0_getl_ge i n H c1 c3 v H1 e H2))))) c2 H0))))))). + +theorem csubst1_getl_lt: + \forall (i: nat).(\forall (n: nat).((lt n i) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst1 i v c1 c2) \to (\forall (e1: C).((getl n c1 +e1) \to (ex2 C (\lambda (e2: C).(csubst1 (minus i n) v e1 e2)) (\lambda (e2: +C).(getl n c2 e2))))))))))) +\def + \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (lt n i)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst1 i v c1 +c2)).(csubst1_ind i v c1 (\lambda (c: C).(\forall (e1: C).((getl n c1 e1) \to +(ex2 C (\lambda (e2: C).(csubst1 (minus i n) v e1 e2)) (\lambda (e2: C).(getl +n c e2)))))) (\lambda (e1: C).(\lambda (H1: (getl n c1 e1)).(eq_ind_r nat (S +(minus i (S n))) (\lambda (n0: nat).(ex2 C (\lambda (e2: C).(csubst1 n0 v e1 +e2)) (\lambda (e2: C).(getl n c1 e2)))) (ex_intro2 C (\lambda (e2: +C).(csubst1 (S (minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c1 e2)) e1 +(csubst1_refl (S (minus i (S n))) v e1) H1) (minus i n) (minus_x_Sy i n H)))) +(\lambda (c3: C).(\lambda (H1: (csubst0 i v c1 c3)).(\lambda (e1: C).(\lambda +(H2: (getl n c1 e1)).(eq_ind_r nat (S (minus i (S n))) (\lambda (n0: +nat).(ex2 C (\lambda (e2: C).(csubst1 n0 v e1 e2)) (\lambda (e2: C).(getl n +c3 e2)))) (let H3 \def (csubst0_getl_lt i n H c1 c3 v H1 e1 H2) in (or4_ind +(getl n c3 e1) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e1 (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w)))))) (ex3_4 B C C T (\lambda (b: +B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(eq C e1 (CHead e2 (Bind +b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e3: C).(\lambda (u: +T).(getl n c3 (CHead e3 (Bind b) u)))))) (\lambda (_: B).(\lambda (e2: +C).(\lambda (e3: C).(\lambda (_: T).(csubst0 (minus i (S n)) v e2 e3)))))) +(ex4_5 B C C T T (\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq C e1 (CHead e2 (Bind b) u))))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e3: C).(\lambda (_: T).(\lambda (w: T).(getl n +c3 (CHead e3 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) +(\lambda (_: B).(\lambda (e2: C).(\lambda (e3: C).(\lambda (_: T).(\lambda +(_: T).(csubst0 (minus i (S n)) v e2 e3))))))) (ex2 C (\lambda (e2: +C).(csubst1 (S (minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2))) +(\lambda (H4: (getl n c3 e1)).(ex_intro2 C (\lambda (e2: C).(csubst1 (S +(minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2)) e1 (csubst1_refl +(S (minus i (S n))) v e1) H4)) (\lambda (H4: (ex3_4 B C T T (\lambda (b: +B).(\lambda (e0: C).(\lambda (u: T).(\lambda (_: T).(eq C e1 (CHead e0 (Bind +b) u)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: +T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: +C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u +w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u: +T).(\lambda (_: T).(eq C e1 (CHead e0 (Bind b) u)))))) (\lambda (b: +B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 +(Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: +T).(subst0 (minus i (S n)) v u w))))) (ex2 C (\lambda (e2: C).(csubst1 (S +(minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2))) (\lambda (x0: +B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H5: (eq C e1 +(CHead x1 (Bind x0) x2))).(\lambda (H6: (getl n c3 (CHead x1 (Bind x0) +x3))).(\lambda (H7: (subst0 (minus i (S n)) v x2 x3)).(eq_ind_r C (CHead x1 +(Bind x0) x2) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csubst1 (S (minus i (S +n))) v c e2)) (\lambda (e2: C).(getl n c3 e2)))) (ex_intro2 C (\lambda (e2: +C).(csubst1 (S (minus i (S n))) v (CHead x1 (Bind x0) x2) e2)) (\lambda (e2: +C).(getl n c3 e2)) (CHead x1 (Bind x0) x3) (csubst1_sing (S (minus i (S n))) +v (CHead x1 (Bind x0) x2) (CHead x1 (Bind x0) x3) (csubst0_snd_bind x0 (minus +i (S n)) v x2 x3 H7 x1)) H6) e1 H5)))))))) H4)) (\lambda (H4: (ex3_4 B C C T +(\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(eq C e1 +(CHead e2 (Bind b) u)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: +C).(\lambda (u: T).(getl n c3 (CHead e2 (Bind b) u)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) +v e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e2: C).(\lambda +(_: C).(\lambda (u: T).(eq C e1 (CHead e2 (Bind b) u)))))) (\lambda (b: +B).(\lambda (_: C).(\lambda (e3: C).(\lambda (u: T).(getl n c3 (CHead e3 +(Bind b) u)))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (e3: C).(\lambda +(_: T).(csubst0 (minus i (S n)) v e2 e3))))) (ex2 C (\lambda (e2: C).(csubst1 +(S (minus i (S n))) v e1 e2)) (\lambda (e2: C).(getl n c3 e2))) (\lambda (x0: +B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H5: (eq C e1 +(CHead x1 (Bind x0) x3))).(\lambda (H6: (getl n c3 (CHead x2 (Bind x0) +x3))).(\lambda (H7: (csubst0 (minus i (S n)) v x1 x2)).(eq_ind_r C (CHead x1 +(Bind x0) x3) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csubst1 (S (minus i (S +n))) v c e2)) (\lambda (e2: C).(getl n c3 e2)))) (ex_intro2 C (\lambda (e2: +C).(csubst1 (S (minus i (S n))) v (CHead x1 (Bind x0) x3) e2)) (\lambda (e2: +C).(getl n c3 e2)) (CHead x2 (Bind x0) x3) (csubst1_sing (S (minus i (S n))) +v (CHead x1 (Bind x0) x3) (CHead x2 (Bind x0) x3) (csubst0_fst_bind x0 (minus +i (S n)) x1 x2 v H7 x3)) H6) e1 H5)))))))) H4)) (\lambda (H4: (ex4_5 B C C T +T (\lambda (b: B).(\lambda (e2: C).(\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq C e1 (CHead e2 (Bind b) u))))))) (\lambda (b: B).(\lambda (_: +C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e2 +(Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda +(u: T).(\lambda (w: T).(subst0 (minus i (S n)) v u w)))))) (\lambda (_: +B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 +(minus i (S n)) v e1 e2)))))))).(ex4_5_ind B C C T T (\lambda (b: B).(\lambda +(e2: C).(\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq C e1 (CHead e2 +(Bind b) u))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e3: C).(\lambda +(_: T).(\lambda (w: T).(getl n c3 (CHead e3 (Bind b) w))))))) (\lambda (_: +B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 +(minus i (S n)) v u w)))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (e3: +C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) v e2 e3)))))) +(ex2 C (\lambda (e2: C).(csubst1 (S (minus i (S n))) v e1 e2)) (\lambda (e2: +C).(getl n c3 e2))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: +C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H5: (eq C e1 (CHead x1 (Bind +x0) x3))).(\lambda (H6: (getl n c3 (CHead x2 (Bind x0) x4))).(\lambda (H7: +(subst0 (minus i (S n)) v x3 x4)).(\lambda (H8: (csubst0 (minus i (S n)) v x1 +x2)).(eq_ind_r C (CHead x1 (Bind x0) x3) (\lambda (c: C).(ex2 C (\lambda (e2: +C).(csubst1 (S (minus i (S n))) v c e2)) (\lambda (e2: C).(getl n c3 e2)))) +(ex_intro2 C (\lambda (e2: C).(csubst1 (S (minus i (S n))) v (CHead x1 (Bind +x0) x3) e2)) (\lambda (e2: C).(getl n c3 e2)) (CHead x2 (Bind x0) x4) +(csubst1_sing (S (minus i (S n))) v (CHead x1 (Bind x0) x3) (CHead x2 (Bind +x0) x4) (csubst0_both_bind x0 (minus i (S n)) v x3 x4 H7 x1 x2 H8)) H6) e1 +H5)))))))))) H4)) H3)) (minus i n) (minus_x_Sy i n H)))))) c2 H0))))))). + +theorem csubst1_getl_ge_back: + \forall (i: nat).(\forall (n: nat).((le i n) \to (\forall (c1: C).(\forall +(c2: C).(\forall (v: T).((csubst1 i v c1 c2) \to (\forall (e: C).((getl n c2 +e) \to (getl n c1 e))))))))) +\def + \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (le i n)).(\lambda (c1: +C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H0: (csubst1 i v c1 +c2)).(csubst1_ind i v c1 (\lambda (c: C).(\forall (e: C).((getl n c e) \to +(getl n c1 e)))) (\lambda (e: C).(\lambda (H1: (getl n c1 e)).H1)) (\lambda +(c3: C).(\lambda (H1: (csubst0 i v c1 c3)).(\lambda (e: C).(\lambda (H2: +(getl n c3 e)).(csubst0_getl_ge_back i n H c1 c3 v H1 e H2))))) c2 H0))))))). + +theorem getl_csubst1: + \forall (d: nat).(\forall (c: C).(\forall (e: C).(\forall (u: T).((getl d c +(CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: +C).(csubst1 d u c a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) d a0 +a)))))))) +\def + \lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (c: C).(\forall (e: +C).(\forall (u: T).((getl n c (CHead e (Bind Abbr) u)) \to (ex2_2 C C +(\lambda (a0: C).(\lambda (_: C).(csubst1 n u c a0))) (\lambda (a0: +C).(\lambda (a: C).(drop (S O) n a0 a))))))))) (\lambda (c: C).(C_ind +(\lambda (c0: C).(\forall (e: C).(\forall (u: T).((getl O c0 (CHead e (Bind +Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0 +a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a)))))))) (\lambda +(n: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (H: (getl O (CSort n) +(CHead e (Bind Abbr) u))).(getl_gen_sort n O (CHead e (Bind Abbr) u) H (ex2_2 +C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u (CSort n) a0))) (\lambda +(a0: C).(\lambda (a: C).(drop (S O) O a0 a))))))))) (\lambda (c0: C).(\lambda +(H: ((\forall (e: C).(\forall (u: T).((getl O c0 (CHead e (Bind Abbr) u)) \to +(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0 a0))) (\lambda +(a0: C).(\lambda (a: C).(drop (S O) O a0 a))))))))).(\lambda (k: K).(match k +in K return (\lambda (k0: K).(\forall (t: T).(\forall (e: C).(\forall (u: +T).((getl O (CHead c0 k0 t) (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda +(a0: C).(\lambda (_: C).(csubst1 O u (CHead c0 k0 t) a0))) (\lambda (a0: +C).(\lambda (a: C).(drop (S O) O a0 a))))))))) with [(Bind b) \Rightarrow +(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (H0: (getl O (CHead +c0 (Bind b) t) (CHead e (Bind Abbr) u))).(let H1 \def (f_equal C C (\lambda +(e0: C).(match e0 in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow +e | (CHead c _ _) \Rightarrow c])) (CHead e (Bind Abbr) u) (CHead c0 (Bind b) +t) (clear_gen_bind b c0 (CHead e (Bind Abbr) u) t (getl_gen_O (CHead c0 (Bind +b) t) (CHead e (Bind Abbr) u) H0))) in ((let H2 \def (f_equal C B (\lambda +(e0: C).(match e0 in C return (\lambda (_: C).B) with [(CSort _) \Rightarrow +Abbr | (CHead _ k _) \Rightarrow (match k in K return (\lambda (_: K).B) with +[(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead e (Bind Abbr) +u) (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead e (Bind Abbr) u) t +(getl_gen_O (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u) H0))) in ((let H3 +\def (f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) +with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead e (Bind +Abbr) u) (CHead c0 (Bind b) t) (clear_gen_bind b c0 (CHead e (Bind Abbr) u) t +(getl_gen_O (CHead c0 (Bind b) t) (CHead e (Bind Abbr) u) H0))) in (\lambda +(H4: (eq B Abbr b)).(\lambda (_: (eq C e c0)).(eq_ind_r T t (\lambda (t0: +T).(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O t0 (CHead c0 (Bind +b) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a))))) (eq_ind +B Abbr (\lambda (b0: B).(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 +O t (CHead c0 (Bind b0) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) +O a0 a))))) (ex2_2_intro C C (\lambda (a0: C).(\lambda (_: C).(csubst1 O t +(CHead c0 (Bind Abbr) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) O +a0 a))) (CHead c0 (Bind Abbr) t) c0 (csubst1_refl O t (CHead c0 (Bind Abbr) +t)) (drop_drop (Bind Abbr) O c0 c0 (drop_refl c0) t)) b H4) u H3)))) H2)) +H1)))))) | (Flat f) \Rightarrow (\lambda (t: T).(\lambda (e: C).(\lambda (u: +T).(\lambda (H0: (getl O (CHead c0 (Flat f) t) (CHead e (Bind Abbr) u))).(let +H_x \def (subst1_ex u t O) in (let H1 \def H_x in (ex_ind T (\lambda (t2: +T).(subst1 O u t (lift (S O) O t2))) (ex2_2 C C (\lambda (a0: C).(\lambda (_: +C).(csubst1 O u (CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a: +C).(drop (S O) O a0 a)))) (\lambda (x: T).(\lambda (H2: (subst1 O u t (lift +(S O) O x))).(let H3 \def (H e u (getl_intro O c0 (CHead e (Bind Abbr) u) c0 +(drop_refl c0) (clear_gen_flat f c0 (CHead e (Bind Abbr) u) t (getl_gen_O +(CHead c0 (Flat f) t) (CHead e (Bind Abbr) u) H0)))) in (ex2_2_ind C C +(\lambda (a0: C).(\lambda (_: C).(csubst1 O u c0 a0))) (\lambda (a0: +C).(\lambda (a: C).(drop (S O) O a0 a))) (ex2_2 C C (\lambda (a0: C).(\lambda +(_: C).(csubst1 O u (CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a: +C).(drop (S O) O a0 a)))) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H4: +(csubst1 O u c0 x0)).(\lambda (H5: (drop (S O) O x0 x1)).(ex2_2_intro C C +(\lambda (a0: C).(\lambda (_: C).(csubst1 O u (CHead c0 (Flat f) t) a0))) +(\lambda (a0: C).(\lambda (a: C).(drop (S O) O a0 a))) (CHead x0 (Flat f) +(lift (S O) O x)) x1 (csubst1_flat f O u t (lift (S O) O x) H2 c0 x0 H4) +(drop_drop (Flat f) O x0 x1 H5 (lift (S O) O x))))))) H3)))) H1)))))))])))) +c)) (\lambda (n: nat).(\lambda (H: ((\forall (c: C).(\forall (e: C).(\forall +(u: T).((getl n c (CHead e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: +C).(\lambda (_: C).(csubst1 n u c a0))) (\lambda (a0: C).(\lambda (a: +C).(drop (S O) n a0 a)))))))))).(\lambda (c: C).(C_ind (\lambda (c0: +C).(\forall (e: C).(\forall (u: T).((getl (S n) c0 (CHead e (Bind Abbr) u)) +\to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u c0 a0))) +(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))))))) (\lambda (n0: +nat).(\lambda (e: C).(\lambda (u: T).(\lambda (H0: (getl (S n) (CSort n0) +(CHead e (Bind Abbr) u))).(getl_gen_sort n0 (S n) (CHead e (Bind Abbr) u) H0 +(ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CSort n0) a0))) +(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a))))))))) (\lambda +(c0: C).(\lambda (H0: ((\forall (e: C).(\forall (u: T).((getl (S n) c0 (CHead +e (Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S +n) u c0 a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 +a))))))))).(\lambda (k: K).(match k in K return (\lambda (k0: K).(\forall (t: +T).(\forall (e: C).(\forall (u: T).((getl (S n) (CHead c0 k0 t) (CHead e +(Bind Abbr) u)) \to (ex2_2 C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S +n) u (CHead c0 k0 t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) +a0 a))))))))) with [(Bind b) \Rightarrow (\lambda (t: T).(\lambda (e: +C).(\lambda (u: T).(\lambda (H1: (getl (S n) (CHead c0 (Bind b) t) (CHead e +(Bind Abbr) u))).(let H_x \def (subst1_ex u t n) in (let H2 \def H_x in +(ex_ind T (\lambda (t2: T).(subst1 n u t (lift (S O) n t2))) (ex2_2 C C +(\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Bind b) t) a0))) +(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))) (\lambda (x: +T).(\lambda (H3: (subst1 n u t (lift (S O) n x))).(let H4 \def (H c0 e u +(getl_gen_S (Bind b) c0 (CHead e (Bind Abbr) u) t n H1)) in (ex2_2_ind C C +(\lambda (a0: C).(\lambda (_: C).(csubst1 n u c0 a0))) (\lambda (a0: +C).(\lambda (a: C).(drop (S O) n a0 a))) (ex2_2 C C (\lambda (a0: C).(\lambda +(_: C).(csubst1 (S n) u (CHead c0 (Bind b) t) a0))) (\lambda (a0: C).(\lambda +(a: C).(drop (S O) (S n) a0 a)))) (\lambda (x0: C).(\lambda (x1: C).(\lambda +(H5: (csubst1 n u c0 x0)).(\lambda (H6: (drop (S O) n x0 x1)).(ex2_2_intro C +C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Bind b) t) +a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a))) (CHead x0 +(Bind b) (lift (S O) n x)) (CHead x1 (Bind b) x) (csubst1_bind b n u t (lift +(S O) n x) H3 c0 x0 H5) (drop_skip_bind (S O) n x0 x1 H6 b x)))))) H4)))) +H2))))))) | (Flat f) \Rightarrow (\lambda (t: T).(\lambda (e: C).(\lambda (u: +T).(\lambda (H1: (getl (S n) (CHead c0 (Flat f) t) (CHead e (Bind Abbr) +u))).(let H_x \def (subst1_ex u t (S n)) in (let H2 \def H_x in (ex_ind T +(\lambda (t2: T).(subst1 (S n) u t (lift (S O) (S n) t2))) (ex2_2 C C +(\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Flat f) t) a0))) +(\lambda (a0: C).(\lambda (a: C).(drop (S O) (S n) a0 a)))) (\lambda (x: +T).(\lambda (H3: (subst1 (S n) u t (lift (S O) (S n) x))).(let H4 \def (H0 e +u (getl_gen_S (Flat f) c0 (CHead e (Bind Abbr) u) t n H1)) in (ex2_2_ind C C +(\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u c0 a0))) (\lambda (a0: +C).(\lambda (a: C).(drop (S O) (S n) a0 a))) (ex2_2 C C (\lambda (a0: +C).(\lambda (_: C).(csubst1 (S n) u (CHead c0 (Flat f) t) a0))) (\lambda (a0: +C).(\lambda (a: C).(drop (S O) (S n) a0 a)))) (\lambda (x0: C).(\lambda (x1: +C).(\lambda (H5: (csubst1 (S n) u c0 x0)).(\lambda (H6: (drop (S O) (S n) x0 +x1)).(ex2_2_intro C C (\lambda (a0: C).(\lambda (_: C).(csubst1 (S n) u +(CHead c0 (Flat f) t) a0))) (\lambda (a0: C).(\lambda (a: C).(drop (S O) (S +n) a0 a))) (CHead x0 (Flat f) (lift (S O) (S n) x)) (CHead x1 (Flat f) x) +(csubst1_flat f (S n) u t (lift (S O) (S n) x) H3 c0 x0 H5) (drop_skip_flat +(S O) n x0 x1 H6 f x)))))) H4)))) H2)))))))])))) c)))) d). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/props.ma new file mode 100644 index 000000000..411cedf7b --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/props.ma @@ -0,0 +1,68 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/csubst1/props". + +include "csubst1/defs.ma". + +include "subst1/defs.ma". + +theorem csubst1_head: + \forall (k: K).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall +(u2: T).((subst1 i v u1 u2) \to (\forall (c1: C).(\forall (c2: C).((csubst1 i +v c1 c2) \to (csubst1 (s k i) v (CHead c1 k u1) (CHead c2 k u2)))))))))) +\def + \lambda (k: K).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (H: (subst1 i v u1 u2)).(subst1_ind i v u1 (\lambda (t: +T).(\forall (c1: C).(\forall (c2: C).((csubst1 i v c1 c2) \to (csubst1 (s k +i) v (CHead c1 k u1) (CHead c2 k t)))))) (\lambda (c1: C).(\lambda (c2: +C).(\lambda (H0: (csubst1 i v c1 c2)).(csubst1_ind i v c1 (\lambda (c: +C).(csubst1 (s k i) v (CHead c1 k u1) (CHead c k u1))) (csubst1_refl (s k i) +v (CHead c1 k u1)) (\lambda (c3: C).(\lambda (H1: (csubst0 i v c1 +c3)).(csubst1_sing (s k i) v (CHead c1 k u1) (CHead c3 k u1) (csubst0_fst k i +c1 c3 v H1 u1)))) c2 H0)))) (\lambda (t2: T).(\lambda (H0: (subst0 i v u1 +t2)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (csubst1 i v c1 +c2)).(csubst1_ind i v c1 (\lambda (c: C).(csubst1 (s k i) v (CHead c1 k u1) +(CHead c k t2))) (csubst1_sing (s k i) v (CHead c1 k u1) (CHead c1 k t2) +(csubst0_snd k i v u1 t2 H0 c1)) (\lambda (c3: C).(\lambda (H2: (csubst0 i v +c1 c3)).(csubst1_sing (s k i) v (CHead c1 k u1) (CHead c3 k t2) (csubst0_both +k i v u1 t2 H0 c1 c3 H2)))) c2 H1)))))) u2 H)))))). + +theorem csubst1_bind: + \forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall +(u2: T).((subst1 i v u1 u2) \to (\forall (c1: C).(\forall (c2: C).((csubst1 i +v c1 c2) \to (csubst1 (S i) v (CHead c1 (Bind b) u1) (CHead c2 (Bind b) +u2)))))))))) +\def + \lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (H: (subst1 i v u1 u2)).(\lambda (c1: C).(\lambda (c2: +C).(\lambda (H0: (csubst1 i v c1 c2)).(eq_ind nat (s (Bind b) i) (\lambda (n: +nat).(csubst1 n v (CHead c1 (Bind b) u1) (CHead c2 (Bind b) u2))) +(csubst1_head (Bind b) i v u1 u2 H c1 c2 H0) (S i) (refl_equal nat (S +i))))))))))). + +theorem csubst1_flat: + \forall (f: F).(\forall (i: nat).(\forall (v: T).(\forall (u1: T).(\forall +(u2: T).((subst1 i v u1 u2) \to (\forall (c1: C).(\forall (c2: C).((csubst1 i +v c1 c2) \to (csubst1 i v (CHead c1 (Flat f) u1) (CHead c2 (Flat f) +u2)))))))))) +\def + \lambda (f: F).(\lambda (i: nat).(\lambda (v: T).(\lambda (u1: T).(\lambda +(u2: T).(\lambda (H: (subst1 i v u1 u2)).(\lambda (c1: C).(\lambda (c2: +C).(\lambda (H0: (csubst1 i v c1 c2)).(eq_ind nat (s (Flat f) i) (\lambda (n: +nat).(csubst1 n v (CHead c1 (Flat f) u1) (CHead c2 (Flat f) u2))) +(csubst1_head (Flat f) i v u1 u2 H c1 c2 H0) i (refl_equal nat i)))))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/fsubst0/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/fsubst0/defs.ma new file mode 100644 index 000000000..71ccebcd6 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/fsubst0/defs.ma @@ -0,0 +1,30 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/fsubst0/defs". + +include "csubst0/defs.ma". + +include "subst0/defs.ma". + +inductive fsubst0 (i:nat) (v:T) (c1:C) (t1:T): C \to (T \to Prop) \def +| fsubst0_snd: \forall (t2: T).((subst0 i v t1 t2) \to (fsubst0 i v c1 t1 c1 +t2)) +| fsubst0_fst: \forall (c2: C).((csubst0 i v c1 c2) \to (fsubst0 i v c1 t1 c2 +t1)) +| fsubst0_both: \forall (t2: T).((subst0 i v t1 t2) \to (\forall (c2: +C).((csubst0 i v c1 c2) \to (fsubst0 i v c1 t1 c2 t2)))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/fsubst0/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/fsubst0/fwd.ma new file mode 100644 index 000000000..8d41179d9 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/fsubst0/fwd.ma @@ -0,0 +1,67 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/fsubst0/fwd". + +include "fsubst0/defs.ma". + +theorem fsubst0_gen_base: + \forall (c1: C).(\forall (c2: C).(\forall (t1: T).(\forall (t2: T).(\forall +(v: T).(\forall (i: nat).((fsubst0 i v c1 t1 c2 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))))))))) +\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))))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/defs.ma new file mode 100644 index 000000000..d806b04c9 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/defs.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/defs". + +include "subst0/defs.ma". + +inductive subst1 (i:nat) (v:T) (t1:T): T \to Prop \def +| subst1_refl: subst1 i v t1 t1 +| subst1_single: \forall (t2: T).((subst0 i v t1 t2) \to (subst1 i v t1 t2)). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/fwd.ma new file mode 100644 index 000000000..83e7363fa --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/fwd.ma @@ -0,0 +1,166 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/fwd". + +include "subst1/defs.ma". + +include "subst0/props.ma". + +theorem subst1_gen_sort: + \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst1 +i v (TSort n) x) \to (eq T x (TSort n)))))) +\def + \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda +(H: (subst1 i v (TSort n) x)).(subst1_ind i v (TSort n) (\lambda (t: T).(eq T +t (TSort n))) (refl_equal T (TSort n)) (\lambda (t2: T).(\lambda (H0: (subst0 +i v (TSort n) t2)).(subst0_gen_sort v t2 i n H0 (eq T t2 (TSort n))))) x +H))))). + +theorem subst1_gen_lref: + \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst1 +i v (TLRef n) x) \to (or (eq T x (TLRef n)) (land (eq nat n i) (eq T x (lift +(S n) O v)))))))) +\def + \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda +(H: (subst1 i v (TLRef n) x)).(subst1_ind i v (TLRef n) (\lambda (t: T).(or +(eq T t (TLRef n)) (land (eq nat n i) (eq T t (lift (S n) O v))))) (or_introl +(eq T (TLRef n) (TLRef n)) (land (eq nat n i) (eq T (TLRef n) (lift (S n) O +v))) (refl_equal T (TLRef n))) (\lambda (t2: T).(\lambda (H0: (subst0 i v +(TLRef n) t2)).(and_ind (eq nat n i) (eq T t2 (lift (S n) O v)) (or (eq T t2 +(TLRef n)) (land (eq nat n i) (eq T t2 (lift (S n) O v)))) (\lambda (H1: (eq +nat n i)).(\lambda (H2: (eq T t2 (lift (S n) O v))).(or_intror (eq T t2 +(TLRef n)) (land (eq nat n i) (eq T t2 (lift (S n) O v))) (conj (eq nat n i) +(eq T t2 (lift (S n) O v)) H1 H2)))) (subst0_gen_lref v t2 i n H0)))) x +H))))). + +theorem subst1_gen_head: + \forall (k: K).(\forall (v: T).(\forall (u1: T).(\forall (t1: T).(\forall +(x: T).(\forall (i: nat).((subst1 i v (THead k u1 t1) x) \to (ex3_2 T T +(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: +T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t2: +T).(subst1 (s k i) v t1 t2)))))))))) +\def + \lambda (k: K).(\lambda (v: T).(\lambda (u1: T).(\lambda (t1: T).(\lambda +(x: T).(\lambda (i: nat).(\lambda (H: (subst1 i v (THead k u1 t1) +x)).(subst1_ind i v (THead k u1 t1) (\lambda (t: T).(ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T t (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst1 (s k i) v t1 +t2))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k u1 +t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) +(\lambda (_: T).(\lambda (t2: T).(subst1 (s k i) v t1 t2))) u1 t1 (refl_equal +T (THead k u1 t1)) (subst1_refl i v u1) (subst1_refl (s k i) v t1)) (\lambda +(t2: T).(\lambda (H0: (subst0 i v (THead k u1 t1) t2)).(or3_ind (ex2 T +(\lambda (u2: T).(eq T t2 (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 +u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: +T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v +u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))) (ex3_2 +T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda +(u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(subst1 (s k i) v t1 t3)))) (\lambda (H1: (ex2 T (\lambda (u2: T).(eq T t2 +(THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2)))).(ex2_ind T (\lambda +(u2: T).(eq T t2 (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2)) +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) +(\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst1 (s k i) v t1 t3)))) (\lambda (x0: T).(\lambda +(H2: (eq T t2 (THead k x0 t1))).(\lambda (H3: (subst0 i v u1 +x0)).(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 +t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst1 (s k i) v t1 t3))) x0 t1 H2 (subst1_single i v u1 +x0 H3) (subst1_refl (s k i) v t1))))) H1)) (\lambda (H1: (ex2 T (\lambda (t3: +T).(eq T t2 (THead k u1 t3))) (\lambda (t2: T).(subst0 (s k i) v t1 +t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: +T).(subst0 (s k i) v t1 t3)) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq +T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) +(\lambda (_: T).(\lambda (t3: T).(subst1 (s k i) v t1 t3)))) (\lambda (x0: +T).(\lambda (H2: (eq T t2 (THead k u1 x0))).(\lambda (H3: (subst0 (s k i) v +t1 x0)).(ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: +T).(\lambda (t3: T).(subst1 (s k i) v t1 t3))) u1 x0 H2 (subst1_refl i v u1) +(subst1_single (s k i) v t1 x0 H3))))) H1)) (\lambda (H1: (ex3_2 T T (\lambda +(u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: +T).(subst0 (s k i) v t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: +T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v +u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T +T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst1 i v u1 u2))) (\lambda (_: T).(\lambda (t3: +T).(subst1 (s k i) v t1 t3)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda +(H2: (eq T t2 (THead k x0 x1))).(\lambda (H3: (subst0 i v u1 x0)).(\lambda +(H4: (subst0 (s k i) v t1 x1)).(ex3_2_intro T T (\lambda (u2: T).(\lambda +(t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 +i v u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst1 (s k i) v t1 t3))) x0 +x1 H2 (subst1_single i v u1 x0 H3) (subst1_single (s k i) v t1 x1 H4))))))) +H1)) (subst0_gen_head k v u1 t1 t2 i H0)))) x H))))))). + +theorem subst1_gen_lift_lt: + \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall +(h: nat).(\forall (d: nat).((subst1 i (lift h d u) (lift h (S (plus i d)) t1) +x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda +(t2: T).(subst1 i u t1 t2))))))))) +\def + \lambda (u: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (i: nat).(\lambda +(h: nat).(\lambda (d: nat).(\lambda (H: (subst1 i (lift h d u) (lift h (S +(plus i d)) t1) x)).(subst1_ind i (lift h d u) (lift h (S (plus i d)) t1) +(\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h (S (plus i d)) t2))) +(\lambda (t2: T).(subst1 i u t1 t2)))) (ex_intro2 T (\lambda (t2: T).(eq T +(lift h (S (plus i d)) t1) (lift h (S (plus i d)) t2))) (\lambda (t2: +T).(subst1 i u t1 t2)) t1 (refl_equal T (lift h (S (plus i d)) t1)) +(subst1_refl i u t1)) (\lambda (t2: T).(\lambda (H0: (subst0 i (lift h d u) +(lift h (S (plus i d)) t1) t2)).(ex2_ind T (\lambda (t3: T).(eq T t2 (lift h +(S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u t1 t3)) (ex2 T (\lambda +(t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst1 i u t1 +t3))) (\lambda (x0: T).(\lambda (H1: (eq T t2 (lift h (S (plus i d)) +x0))).(\lambda (H2: (subst0 i u t1 x0)).(ex_intro2 T (\lambda (t3: T).(eq T +t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst1 i u t1 t3)) x0 H1 +(subst1_single i u t1 x0 H2))))) (subst0_gen_lift_lt u t1 t2 i h d H0)))) x +H))))))). + +theorem subst1_gen_lift_eq: + \forall (t: T).(\forall (u: T).(\forall (x: T).(\forall (h: nat).(\forall +(d: nat).(\forall (i: nat).((le d i) \to ((lt i (plus d h)) \to ((subst1 i u +(lift h d t) x) \to (eq T x (lift h d t)))))))))) +\def + \lambda (t: T).(\lambda (u: T).(\lambda (x: T).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (i: nat).(\lambda (H: (le d i)).(\lambda (H0: (lt i (plus d +h))).(\lambda (H1: (subst1 i u (lift h d t) x)).(subst1_ind i u (lift h d t) +(\lambda (t0: T).(eq T t0 (lift h d t))) (refl_equal T (lift h d t)) (\lambda +(t2: T).(\lambda (H2: (subst0 i u (lift h d t) t2)).(subst0_gen_lift_false t +u t2 h d i H H0 H2 (eq T t2 (lift h d t))))) x H1))))))))). + +theorem subst1_gen_lift_ge: + \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall +(h: nat).(\forall (d: nat).((subst1 i u (lift h d t1) x) \to ((le (plus d h) +i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: +T).(subst1 (minus i h) u t1 t2)))))))))) +\def + \lambda (u: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (i: nat).(\lambda +(h: nat).(\lambda (d: nat).(\lambda (H: (subst1 i u (lift h d t1) +x)).(\lambda (H0: (le (plus d h) i)).(subst1_ind i u (lift h d t1) (\lambda +(t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h d t2))) (\lambda (t2: +T).(subst1 (minus i h) u t1 t2)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift +h d t1) (lift h d t2))) (\lambda (t2: T).(subst1 (minus i h) u t1 t2)) t1 +(refl_equal T (lift h d t1)) (subst1_refl (minus i h) u t1)) (\lambda (t2: +T).(\lambda (H1: (subst0 i u (lift h d t1) t2)).(ex2_ind T (\lambda (t3: +T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u t1 t3)) +(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst1 +(minus i h) u t1 t3))) (\lambda (x0: T).(\lambda (H2: (eq T t2 (lift h d +x0))).(\lambda (H3: (subst0 (minus i h) u t1 x0)).(ex_intro2 T (\lambda (t3: +T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst1 (minus i h) u t1 t3)) x0 +H2 (subst1_single (minus i h) u t1 x0 H3))))) (subst0_gen_lift_ge u t1 t2 i h +d H1 H0)))) x H)))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/props.ma new file mode 100644 index 000000000..02251bec2 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/props.ma @@ -0,0 +1,111 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/props". + +include "subst1/defs.ma". + +include "subst0/props.ma". + +theorem subst1_head: + \forall (v: T).(\forall (u1: T).(\forall (u2: T).(\forall (i: nat).((subst1 +i v u1 u2) \to (\forall (k: K).(\forall (t1: T).(\forall (t2: T).((subst1 (s +k i) v t1 t2) \to (subst1 i v (THead k u1 t1) (THead k u2 t2)))))))))) +\def + \lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda +(H: (subst1 i v u1 u2)).(subst1_ind i v u1 (\lambda (t: T).(\forall (k: +K).(\forall (t1: T).(\forall (t2: T).((subst1 (s k i) v t1 t2) \to (subst1 i +v (THead k u1 t1) (THead k t t2))))))) (\lambda (k: K).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (H0: (subst1 (s k i) v t1 t2)).(subst1_ind (s k +i) v t1 (\lambda (t: T).(subst1 i v (THead k u1 t1) (THead k u1 t))) +(subst1_refl i v (THead k u1 t1)) (\lambda (t3: T).(\lambda (H1: (subst0 (s k +i) v t1 t3)).(subst1_single i v (THead k u1 t1) (THead k u1 t3) (subst0_snd k +v t3 t1 i H1 u1)))) t2 H0))))) (\lambda (t2: T).(\lambda (H0: (subst0 i v u1 +t2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t0: T).(\lambda (H1: (subst1 +(s k i) v t1 t0)).(subst1_ind (s k i) v t1 (\lambda (t: T).(subst1 i v (THead +k u1 t1) (THead k t2 t))) (subst1_single i v (THead k u1 t1) (THead k t2 t1) +(subst0_fst v t2 u1 i H0 t1 k)) (\lambda (t3: T).(\lambda (H2: (subst0 (s k +i) v t1 t3)).(subst1_single i v (THead k u1 t1) (THead k t2 t3) (subst0_both +v u1 t2 i H0 k t1 t3 H2)))) t0 H1))))))) u2 H))))). + +theorem subst1_lift_lt: + \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst1 +i u t1 t2) \to (\forall (d: nat).((lt i d) \to (\forall (h: nat).(subst1 i +(lift h (minus d (S i)) u) (lift h d t1) (lift h d t2))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (subst1 i u t1 t2)).(subst1_ind i u t1 (\lambda (t: T).(\forall (d: +nat).((lt i d) \to (\forall (h: nat).(subst1 i (lift h (minus d (S i)) u) +(lift h d t1) (lift h d t)))))) (\lambda (d: nat).(\lambda (_: (lt i +d)).(\lambda (h: nat).(subst1_refl i (lift h (minus d (S i)) u) (lift h d +t1))))) (\lambda (t3: T).(\lambda (H0: (subst0 i u t1 t3)).(\lambda (d: +nat).(\lambda (H1: (lt i d)).(\lambda (h: nat).(subst1_single i (lift h +(minus d (S i)) u) (lift h d t1) (lift h d t3) (subst0_lift_lt t1 t3 u i H0 d +H1 h))))))) t2 H))))). + +theorem subst1_lift_ge: + \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).(\forall +(h: nat).((subst1 i u t1 t2) \to (\forall (d: nat).((le d i) \to (subst1 +(plus i h) u (lift h d t1) (lift h d t2))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda +(h: nat).(\lambda (H: (subst1 i u t1 t2)).(subst1_ind i u t1 (\lambda (t: +T).(\forall (d: nat).((le d i) \to (subst1 (plus i h) u (lift h d t1) (lift h +d t))))) (\lambda (d: nat).(\lambda (_: (le d i)).(subst1_refl (plus i h) u +(lift h d t1)))) (\lambda (t3: T).(\lambda (H0: (subst0 i u t1 t3)).(\lambda +(d: nat).(\lambda (H1: (le d i)).(subst1_single (plus i h) u (lift h d t1) +(lift h d t3) (subst0_lift_ge t1 t3 u i h H0 d H1)))))) t2 H)))))). + +theorem subst1_ex: + \forall (u: T).(\forall (t1: T).(\forall (d: nat).(ex T (\lambda (t2: +T).(subst1 d u t1 (lift (S O) d t2)))))) +\def + \lambda (u: T).(\lambda (t1: T).(T_ind (\lambda (t: T).(\forall (d: nat).(ex +T (\lambda (t2: T).(subst1 d u t (lift (S O) d t2)))))) (\lambda (n: +nat).(\lambda (d: nat).(ex_intro T (\lambda (t2: T).(subst1 d u (TSort n) +(lift (S O) d t2))) (TSort n) (eq_ind_r T (TSort n) (\lambda (t: T).(subst1 d +u (TSort n) t)) (subst1_refl d u (TSort n)) (lift (S O) d (TSort n)) +(lift_sort n (S O) d))))) (\lambda (n: nat).(\lambda (d: nat).(lt_eq_gt_e n d +(ex T (\lambda (t2: T).(subst1 d u (TLRef n) (lift (S O) d t2)))) (\lambda +(H: (lt n d)).(ex_intro T (\lambda (t2: T).(subst1 d u (TLRef n) (lift (S O) +d t2))) (TLRef n) (eq_ind_r T (TLRef n) (\lambda (t: T).(subst1 d u (TLRef n) +t)) (subst1_refl d u (TLRef n)) (lift (S O) d (TLRef n)) (lift_lref_lt n (S +O) d H)))) (\lambda (H: (eq nat n d)).(eq_ind nat n (\lambda (n0: nat).(ex T +(\lambda (t2: T).(subst1 n0 u (TLRef n) (lift (S O) n0 t2))))) (ex_intro T +(\lambda (t2: T).(subst1 n u (TLRef n) (lift (S O) n t2))) (lift n O u) +(eq_ind_r T (lift (plus (S O) n) O u) (\lambda (t: T).(subst1 n u (TLRef n) +t)) (subst1_single n u (TLRef n) (lift (S n) O u) (subst0_lref u n)) (lift (S +O) n (lift n O u)) (lift_free u n (S O) O n (le_n (plus O n)) (le_O_n n)))) d +H)) (\lambda (H: (lt d n)).(ex_intro T (\lambda (t2: T).(subst1 d u (TLRef n) +(lift (S O) d t2))) (TLRef (pred n)) (eq_ind_r T (TLRef n) (\lambda (t: +T).(subst1 d u (TLRef n) t)) (subst1_refl d u (TLRef n)) (lift (S O) d (TLRef +(pred n))) (lift_lref_gt d n H))))))) (\lambda (k: K).(\lambda (t: +T).(\lambda (H: ((\forall (d: nat).(ex T (\lambda (t2: T).(subst1 d u t (lift +(S O) d t2))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (d: nat).(ex T +(\lambda (t2: T).(subst1 d u t0 (lift (S O) d t2))))))).(\lambda (d: +nat).(let H_x \def (H d) in (let H1 \def H_x in (ex_ind T (\lambda (t2: +T).(subst1 d u t (lift (S O) d t2))) (ex T (\lambda (t2: T).(subst1 d u +(THead k t t0) (lift (S O) d t2)))) (\lambda (x: T).(\lambda (H2: (subst1 d u +t (lift (S O) d x))).(let H_x0 \def (H0 (s k d)) in (let H3 \def H_x0 in +(ex_ind T (\lambda (t2: T).(subst1 (s k d) u t0 (lift (S O) (s k d) t2))) (ex +T (\lambda (t2: T).(subst1 d u (THead k t t0) (lift (S O) d t2)))) (\lambda +(x0: T).(\lambda (H4: (subst1 (s k d) u t0 (lift (S O) (s k d) +x0))).(ex_intro T (\lambda (t2: T).(subst1 d u (THead k t t0) (lift (S O) d +t2))) (THead k x x0) (eq_ind_r T (THead k (lift (S O) d x) (lift (S O) (s k +d) x0)) (\lambda (t2: T).(subst1 d u (THead k t t0) t2)) (subst1_head u t +(lift (S O) d x) d H2 k t0 (lift (S O) (s k d) x0) H4) (lift (S O) d (THead k +x x0)) (lift_head k x x0 (S O) d))))) H3))))) H1))))))))) t1)). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/subst1.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/subst1.ma new file mode 100644 index 000000000..182118963 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/subst1.ma @@ -0,0 +1,198 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/subst1/subst1". + +include "subst1/fwd.ma". + +include "subst0/subst0.ma". + +theorem subst1_subst1: + \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst1 +j u2 t1 t2) \to (\forall (u1: T).(\forall (u: T).(\forall (i: nat).((subst1 i +u u1 u2) \to (ex2 T (\lambda (t: T).(subst1 j u1 t1 t)) (\lambda (t: +T).(subst1 (S (plus i j)) u t t2))))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u2: T).(\lambda (j: nat).(\lambda +(H: (subst1 j u2 t1 t2)).(subst1_ind j u2 t1 (\lambda (t: T).(\forall (u1: +T).(\forall (u: T).(\forall (i: nat).((subst1 i u u1 u2) \to (ex2 T (\lambda +(t0: T).(subst1 j u1 t1 t0)) (\lambda (t0: T).(subst1 (S (plus i j)) u t0 +t)))))))) (\lambda (u1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: +(subst1 i u u1 u2)).(ex_intro2 T (\lambda (t: T).(subst1 j u1 t1 t)) (\lambda +(t: T).(subst1 (S (plus i j)) u t t1)) t1 (subst1_refl j u1 t1) (subst1_refl +(S (plus i j)) u t1)))))) (\lambda (t3: T).(\lambda (H0: (subst0 j u2 t1 +t3)).(\lambda (u1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (H1: (subst1 +i u u1 u2)).(insert_eq T u2 (\lambda (t: T).(subst1 i u u1 t)) (ex2 T +(\lambda (t: T).(subst1 j u1 t1 t)) (\lambda (t: T).(subst1 (S (plus i j)) u +t t3))) (\lambda (y: T).(\lambda (H2: (subst1 i u u1 y)).(subst1_ind i u u1 +(\lambda (t: T).((eq T t u2) \to (ex2 T (\lambda (t0: T).(subst1 j u1 t1 t0)) +(\lambda (t0: T).(subst1 (S (plus i j)) u t0 t3))))) (\lambda (H3: (eq T u1 +u2)).(eq_ind_r T u2 (\lambda (t: T).(ex2 T (\lambda (t0: T).(subst1 j t t1 +t0)) (\lambda (t0: T).(subst1 (S (plus i j)) u t0 t3)))) (ex_intro2 T +(\lambda (t: T).(subst1 j u2 t1 t)) (\lambda (t: T).(subst1 (S (plus i j)) u +t t3)) t3 (subst1_single j u2 t1 t3 H0) (subst1_refl (S (plus i j)) u t3)) u1 +H3)) (\lambda (t0: T).(\lambda (H3: (subst0 i u u1 t0)).(\lambda (H4: (eq T +t0 u2)).(let H5 \def (eq_ind T t0 (\lambda (t: T).(subst0 i u u1 t)) H3 u2 +H4) in (ex2_ind T (\lambda (t: T).(subst0 j u1 t1 t)) (\lambda (t: T).(subst0 +(S (plus i j)) u t t3)) (ex2 T (\lambda (t: T).(subst1 j u1 t1 t)) (\lambda +(t: T).(subst1 (S (plus i j)) u t t3))) (\lambda (x: T).(\lambda (H6: (subst0 +j u1 t1 x)).(\lambda (H7: (subst0 (S (plus i j)) u x t3)).(ex_intro2 T +(\lambda (t: T).(subst1 j u1 t1 t)) (\lambda (t: T).(subst1 (S (plus i j)) u +t t3)) x (subst1_single j u1 t1 x H6) (subst1_single (S (plus i j)) u x t3 +H7))))) (subst0_subst0 t1 t3 u2 j H0 u1 u i H5)))))) y H2))) H1))))))) t2 +H))))). + +theorem subst1_subst1_back: + \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst1 +j u2 t1 t2) \to (\forall (u1: T).(\forall (u: T).(\forall (i: nat).((subst1 i +u u2 u1) \to (ex2 T (\lambda (t: T).(subst1 j u1 t1 t)) (\lambda (t: +T).(subst1 (S (plus i j)) u t2 t))))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u2: T).(\lambda (j: nat).(\lambda +(H: (subst1 j u2 t1 t2)).(subst1_ind j u2 t1 (\lambda (t: T).(\forall (u1: +T).(\forall (u: T).(\forall (i: nat).((subst1 i u u2 u1) \to (ex2 T (\lambda +(t0: T).(subst1 j u1 t1 t0)) (\lambda (t0: T).(subst1 (S (plus i j)) u t +t0)))))))) (\lambda (u1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: +(subst1 i u u2 u1)).(ex_intro2 T (\lambda (t: T).(subst1 j u1 t1 t)) (\lambda +(t: T).(subst1 (S (plus i j)) u t1 t)) t1 (subst1_refl j u1 t1) (subst1_refl +(S (plus i j)) u t1)))))) (\lambda (t3: T).(\lambda (H0: (subst0 j u2 t1 +t3)).(\lambda (u1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (H1: (subst1 +i u u2 u1)).(subst1_ind i u u2 (\lambda (t: T).(ex2 T (\lambda (t0: +T).(subst1 j t t1 t0)) (\lambda (t0: T).(subst1 (S (plus i j)) u t3 t0)))) +(ex_intro2 T (\lambda (t: T).(subst1 j u2 t1 t)) (\lambda (t: T).(subst1 (S +(plus i j)) u t3 t)) t3 (subst1_single j u2 t1 t3 H0) (subst1_refl (S (plus i +j)) u t3)) (\lambda (t0: T).(\lambda (H2: (subst0 i u u2 t0)).(ex2_ind T +(\lambda (t: T).(subst0 j t0 t1 t)) (\lambda (t: T).(subst0 (S (plus i j)) u +t3 t)) (ex2 T (\lambda (t: T).(subst1 j t0 t1 t)) (\lambda (t: T).(subst1 (S +(plus i j)) u t3 t))) (\lambda (x: T).(\lambda (H3: (subst0 j t0 t1 +x)).(\lambda (H4: (subst0 (S (plus i j)) u t3 x)).(ex_intro2 T (\lambda (t: +T).(subst1 j t0 t1 t)) (\lambda (t: T).(subst1 (S (plus i j)) u t3 t)) x +(subst1_single j t0 t1 x H3) (subst1_single (S (plus i j)) u t3 x H4))))) +(subst0_subst0_back t1 t3 u2 j H0 t0 u i H2)))) u1 H1))))))) t2 H))))). + +theorem subst1_trans: + \forall (t2: T).(\forall (t1: T).(\forall (v: T).(\forall (i: nat).((subst1 +i v t1 t2) \to (\forall (t3: T).((subst1 i v t2 t3) \to (subst1 i v t1 +t3))))))) +\def + \lambda (t2: T).(\lambda (t1: T).(\lambda (v: T).(\lambda (i: nat).(\lambda +(H: (subst1 i v t1 t2)).(subst1_ind i v t1 (\lambda (t: T).(\forall (t3: +T).((subst1 i v t t3) \to (subst1 i v t1 t3)))) (\lambda (t3: T).(\lambda +(H0: (subst1 i v t1 t3)).H0)) (\lambda (t3: T).(\lambda (H0: (subst0 i v t1 +t3)).(\lambda (t4: T).(\lambda (H1: (subst1 i v t3 t4)).(subst1_ind i v t3 +(\lambda (t: T).(subst1 i v t1 t)) (subst1_single i v t1 t3 H0) (\lambda (t0: +T).(\lambda (H2: (subst0 i v t3 t0)).(subst1_single i v t1 t0 (subst0_trans +t3 t1 v i H0 t0 H2)))) t4 H1))))) t2 H))))). + +theorem subst1_confluence_neq: + \forall (t0: T).(\forall (t1: T).(\forall (u1: T).(\forall (i1: +nat).((subst1 i1 u1 t0 t1) \to (\forall (t2: T).(\forall (u2: T).(\forall +(i2: nat).((subst1 i2 u2 t0 t2) \to ((not (eq nat i1 i2)) \to (ex2 T (\lambda +(t: T).(subst1 i2 u2 t1 t)) (\lambda (t: T).(subst1 i1 u1 t2 t)))))))))))) +\def + \lambda (t0: T).(\lambda (t1: T).(\lambda (u1: T).(\lambda (i1: +nat).(\lambda (H: (subst1 i1 u1 t0 t1)).(subst1_ind i1 u1 t0 (\lambda (t: +T).(\forall (t2: T).(\forall (u2: T).(\forall (i2: nat).((subst1 i2 u2 t0 t2) +\to ((not (eq nat i1 i2)) \to (ex2 T (\lambda (t3: T).(subst1 i2 u2 t t3)) +(\lambda (t3: T).(subst1 i1 u1 t2 t3))))))))) (\lambda (t2: T).(\lambda (u2: +T).(\lambda (i2: nat).(\lambda (H0: (subst1 i2 u2 t0 t2)).(\lambda (_: (not +(eq nat i1 i2))).(ex_intro2 T (\lambda (t: T).(subst1 i2 u2 t0 t)) (\lambda +(t: T).(subst1 i1 u1 t2 t)) t2 H0 (subst1_refl i1 u1 t2))))))) (\lambda (t2: +T).(\lambda (H0: (subst0 i1 u1 t0 t2)).(\lambda (t3: T).(\lambda (u2: +T).(\lambda (i2: nat).(\lambda (H1: (subst1 i2 u2 t0 t3)).(\lambda (H2: (not +(eq nat i1 i2))).(subst1_ind i2 u2 t0 (\lambda (t: T).(ex2 T (\lambda (t4: +T).(subst1 i2 u2 t2 t4)) (\lambda (t4: T).(subst1 i1 u1 t t4)))) (ex_intro2 T +(\lambda (t: T).(subst1 i2 u2 t2 t)) (\lambda (t: T).(subst1 i1 u1 t0 t)) t2 +(subst1_refl i2 u2 t2) (subst1_single i1 u1 t0 t2 H0)) (\lambda (t4: +T).(\lambda (H3: (subst0 i2 u2 t0 t4)).(ex2_ind T (\lambda (t: T).(subst0 i1 +u1 t4 t)) (\lambda (t: T).(subst0 i2 u2 t2 t)) (ex2 T (\lambda (t: T).(subst1 +i2 u2 t2 t)) (\lambda (t: T).(subst1 i1 u1 t4 t))) (\lambda (x: T).(\lambda +(H4: (subst0 i1 u1 t4 x)).(\lambda (H5: (subst0 i2 u2 t2 x)).(ex_intro2 T +(\lambda (t: T).(subst1 i2 u2 t2 t)) (\lambda (t: T).(subst1 i1 u1 t4 t)) x +(subst1_single i2 u2 t2 x H5) (subst1_single i1 u1 t4 x H4))))) +(subst0_confluence_neq t0 t4 u2 i2 H3 t2 u1 i1 H0 (sym_not_eq nat i1 i2 +H2))))) t3 H1)))))))) t1 H))))). + +theorem subst1_confluence_eq: + \forall (t0: T).(\forall (t1: T).(\forall (u: T).(\forall (i: nat).((subst1 +i u t0 t1) \to (\forall (t2: T).((subst1 i u t0 t2) \to (ex2 T (\lambda (t: +T).(subst1 i u t1 t)) (\lambda (t: T).(subst1 i u t2 t))))))))) +\def + \lambda (t0: T).(\lambda (t1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (subst1 i u t0 t1)).(subst1_ind i u t0 (\lambda (t: T).(\forall (t2: +T).((subst1 i u t0 t2) \to (ex2 T (\lambda (t3: T).(subst1 i u t t3)) +(\lambda (t3: T).(subst1 i u t2 t3)))))) (\lambda (t2: T).(\lambda (H0: +(subst1 i u t0 t2)).(ex_intro2 T (\lambda (t: T).(subst1 i u t0 t)) (\lambda +(t: T).(subst1 i u t2 t)) t2 H0 (subst1_refl i u t2)))) (\lambda (t2: +T).(\lambda (H0: (subst0 i u t0 t2)).(\lambda (t3: T).(\lambda (H1: (subst1 i +u t0 t3)).(subst1_ind i u t0 (\lambda (t: T).(ex2 T (\lambda (t4: T).(subst1 +i u t2 t4)) (\lambda (t4: T).(subst1 i u t t4)))) (ex_intro2 T (\lambda (t: +T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i u t0 t)) t2 (subst1_refl i u +t2) (subst1_single i u t0 t2 H0)) (\lambda (t4: T).(\lambda (H2: (subst0 i u +t0 t4)).(or4_ind (eq T t4 t2) (ex2 T (\lambda (t: T).(subst0 i u t4 t)) +(\lambda (t: T).(subst0 i u t2 t))) (subst0 i u t4 t2) (subst0 i u t2 t4) +(ex2 T (\lambda (t: T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i u t4 t))) +(\lambda (H3: (eq T t4 t2)).(eq_ind_r T t2 (\lambda (t: T).(ex2 T (\lambda +(t5: T).(subst1 i u t2 t5)) (\lambda (t5: T).(subst1 i u t t5)))) (ex_intro2 +T (\lambda (t: T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i u t2 t)) t2 +(subst1_refl i u t2) (subst1_refl i u t2)) t4 H3)) (\lambda (H3: (ex2 T +(\lambda (t: T).(subst0 i u t4 t)) (\lambda (t: T).(subst0 i u t2 +t)))).(ex2_ind T (\lambda (t: T).(subst0 i u t4 t)) (\lambda (t: T).(subst0 i +u t2 t)) (ex2 T (\lambda (t: T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i +u t4 t))) (\lambda (x: T).(\lambda (H4: (subst0 i u t4 x)).(\lambda (H5: +(subst0 i u t2 x)).(ex_intro2 T (\lambda (t: T).(subst1 i u t2 t)) (\lambda +(t: T).(subst1 i u t4 t)) x (subst1_single i u t2 x H5) (subst1_single i u t4 +x H4))))) H3)) (\lambda (H3: (subst0 i u t4 t2)).(ex_intro2 T (\lambda (t: +T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 i u t4 t)) t2 (subst1_refl i u +t2) (subst1_single i u t4 t2 H3))) (\lambda (H3: (subst0 i u t2 +t4)).(ex_intro2 T (\lambda (t: T).(subst1 i u t2 t)) (\lambda (t: T).(subst1 +i u t4 t)) t4 (subst1_single i u t2 t4 H3) (subst1_refl i u t4))) +(subst0_confluence_eq t0 t4 u i H2 t2 H0)))) t3 H1))))) t1 H))))). + +theorem subst1_confluence_lift: + \forall (t0: T).(\forall (t1: T).(\forall (u: T).(\forall (i: nat).((subst1 +i u t0 (lift (S O) i t1)) \to (\forall (t2: T).((subst1 i u t0 (lift (S O) i +t2)) \to (eq T t1 t2))))))) +\def + \lambda (t0: T).(\lambda (t1: T).(\lambda (u: T).(\lambda (i: nat).(\lambda +(H: (subst1 i u t0 (lift (S O) i t1))).(insert_eq T (lift (S O) i t1) +(\lambda (t: T).(subst1 i u t0 t)) (\forall (t2: T).((subst1 i u t0 (lift (S +O) i t2)) \to (eq T t1 t2))) (\lambda (y: T).(\lambda (H0: (subst1 i u t0 +y)).(subst1_ind i u t0 (\lambda (t: T).((eq T t (lift (S O) i t1)) \to +(\forall (t2: T).((subst1 i u t0 (lift (S O) i t2)) \to (eq T t1 t2))))) +(\lambda (H1: (eq T t0 (lift (S O) i t1))).(\lambda (t2: T).(\lambda (H2: +(subst1 i u t0 (lift (S O) i t2))).(let H3 \def (eq_ind T t0 (\lambda (t: +T).(subst1 i u t (lift (S O) i t2))) H2 (lift (S O) i t1) H1) in (let H4 \def +(sym_equal T (lift (S O) i t2) (lift (S O) i t1) (subst1_gen_lift_eq t1 u +(lift (S O) i t2) (S O) i i (le_n i) (eq_ind_r nat (plus (S O) i) (\lambda +(n: nat).(lt i n)) (le_n (plus (S O) i)) (plus i (S O)) (plus_comm i (S O))) +H3)) in (lift_inj t1 t2 (S O) i H4)))))) (\lambda (t2: T).(\lambda (H1: +(subst0 i u t0 t2)).(\lambda (H2: (eq T t2 (lift (S O) i t1))).(\lambda (t3: +T).(\lambda (H3: (subst1 i u t0 (lift (S O) i t3))).(let H4 \def (eq_ind T t2 +(\lambda (t: T).(subst0 i u t0 t)) H1 (lift (S O) i t1) H2) in (insert_eq T +(lift (S O) i t3) (\lambda (t: T).(subst1 i u t0 t)) (eq T t1 t3) (\lambda +(y0: T).(\lambda (H5: (subst1 i u t0 y0)).(subst1_ind i u t0 (\lambda (t: +T).((eq T t (lift (S O) i t3)) \to (eq T t1 t3))) (\lambda (H6: (eq T t0 +(lift (S O) i t3))).(let H7 \def (eq_ind T t0 (\lambda (t: T).(subst0 i u t +(lift (S O) i t1))) H4 (lift (S O) i t3) H6) in (subst0_gen_lift_false t3 u +(lift (S O) i t1) (S O) i i (le_n i) (eq_ind_r nat (plus (S O) i) (\lambda +(n: nat).(lt i n)) (le_n (plus (S O) i)) (plus i (S O)) (plus_comm i (S O))) +H7 (eq T t1 t3)))) (\lambda (t4: T).(\lambda (H6: (subst0 i u t0 +t4)).(\lambda (H7: (eq T t4 (lift (S O) i t3))).(let H8 \def (eq_ind T t4 +(\lambda (t: T).(subst0 i u t0 t)) H6 (lift (S O) i t3) H7) in (sym_eq T t3 +t1 (subst0_confluence_lift t0 t3 u i H8 t1 H4)))))) y0 H5))) H3))))))) y +H0))) H))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/defs.ma new file mode 100644 index 000000000..14373ffcd --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/defs.ma @@ -0,0 +1,41 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/defs". + +include "G/defs.ma". + +include "getl/defs.ma". + +inductive tau0 (g:G): C \to (T \to (T \to Prop)) \def +| tau0_sort: \forall (c: C).(\forall (n: nat).(tau0 g c (TSort n) (TSort +(next g n)))) +| tau0_abbr: \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: +nat).((getl i c (CHead d (Bind Abbr) v)) \to (\forall (w: T).((tau0 g d v w) +\to (tau0 g c (TLRef i) (lift (S i) O w)))))))) +| tau0_abst: \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: +nat).((getl i c (CHead d (Bind Abst) v)) \to (\forall (w: T).((tau0 g d v w) +\to (tau0 g c (TLRef i) (lift (S i) O v)))))))) +| tau0_bind: \forall (b: B).(\forall (c: C).(\forall (v: T).(\forall (t1: +T).(\forall (t2: T).((tau0 g (CHead c (Bind b) v) t1 t2) \to (tau0 g c (THead +(Bind b) v t1) (THead (Bind b) v t2))))))) +| tau0_appl: \forall (c: C).(\forall (v: T).(\forall (t1: T).(\forall (t2: +T).((tau0 g c t1 t2) \to (tau0 g c (THead (Flat Appl) v t1) (THead (Flat +Appl) v t2)))))) +| tau0_cast: \forall (c: C).(\forall (v1: T).(\forall (v2: T).((tau0 g c v1 +v2) \to (\forall (t1: T).(\forall (t2: T).((tau0 g c t1 t2) \to (tau0 g c +(THead (Flat Cast) v1 t1) (THead (Flat Cast) v2 t2)))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/props.ma new file mode 100644 index 000000000..bae0524e6 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/props.ma @@ -0,0 +1,213 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/tau0/props". + +include "tau0/defs.ma". + +include "getl/drop.ma". + +theorem tau0_lift: + \forall (g: G).(\forall (e: C).(\forall (t1: T).(\forall (t2: T).((tau0 g e +t1 t2) \to (\forall (c: C).(\forall (h: nat).(\forall (d: nat).((drop h d c +e) \to (tau0 g c (lift h d t1) (lift h d t2)))))))))) +\def + \lambda (g: G).(\lambda (e: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(H: (tau0 g e t1 t2)).(tau0_ind g (\lambda (c: C).(\lambda (t: T).(\lambda +(t0: T).(\forall (c0: C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 c) +\to (tau0 g c0 (lift h d t) (lift h d t0))))))))) (\lambda (c: C).(\lambda +(n: nat).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (_: +(drop h d c0 c)).(eq_ind_r T (TSort n) (\lambda (t: T).(tau0 g c0 t (lift h d +(TSort (next g n))))) (eq_ind_r T (TSort (next g n)) (\lambda (t: T).(tau0 g +c0 (TSort n) t)) (tau0_sort g c0 n) (lift h d (TSort (next g n))) (lift_sort +(next g n) h d)) (lift h d (TSort n)) (lift_sort n h d)))))))) (\lambda (c: +C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl i c +(CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (H1: (tau0 g d v +w)).(\lambda (H2: ((\forall (c: C).(\forall (h: nat).(\forall (d0: +nat).((drop h d0 c d) \to (tau0 g c (lift h d0 v) (lift h d0 +w)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d0: nat).(\lambda (H3: +(drop h d0 c0 c)).(lt_le_e i d0 (tau0 g c0 (lift h d0 (TLRef i)) (lift h d0 +(lift (S i) O w))) (\lambda (H4: (lt i d0)).(let H5 \def (drop_getl_trans_le +i d0 (le_S_n i d0 (le_S (S i) d0 H4)) c0 c h H3 (CHead d (Bind Abbr) v) H0) +in (ex3_2_ind C C (\lambda (e0: C).(\lambda (_: C).(drop i O c0 e0))) +(\lambda (e0: C).(\lambda (e1: C).(drop h (minus d0 i) e0 e1))) (\lambda (_: +C).(\lambda (e1: C).(clear e1 (CHead d (Bind Abbr) v)))) (tau0 g c0 (lift h +d0 (TLRef i)) (lift h d0 (lift (S i) O w))) (\lambda (x0: C).(\lambda (x1: +C).(\lambda (H6: (drop i O c0 x0)).(\lambda (H7: (drop h (minus d0 i) x0 +x1)).(\lambda (H8: (clear x1 (CHead d (Bind Abbr) v))).(let H9 \def (eq_ind +nat (minus d0 i) (\lambda (n: nat).(drop h n x0 x1)) H7 (S (minus d0 (S i))) +(minus_x_Sy d0 i H4)) in (let H10 \def (drop_clear_S x1 x0 h (minus d0 (S i)) +H9 Abbr d v H8) in (ex2_ind C (\lambda (c1: C).(clear x0 (CHead c1 (Bind +Abbr) (lift h (minus d0 (S i)) v)))) (\lambda (c1: C).(drop h (minus d0 (S +i)) c1 d)) (tau0 g c0 (lift h d0 (TLRef i)) (lift h d0 (lift (S i) O w))) +(\lambda (x: C).(\lambda (H11: (clear x0 (CHead x (Bind Abbr) (lift h (minus +d0 (S i)) v)))).(\lambda (H12: (drop h (minus d0 (S i)) x d)).(eq_ind_r T +(TLRef i) (\lambda (t: T).(tau0 g c0 t (lift h d0 (lift (S i) O w)))) (eq_ind +nat (plus (S i) (minus d0 (S i))) (\lambda (n: nat).(tau0 g c0 (TLRef i) +(lift h n (lift (S i) O w)))) (eq_ind_r T (lift (S i) O (lift h (minus d0 (S +i)) w)) (\lambda (t: T).(tau0 g c0 (TLRef i) t)) (eq_ind nat d0 (\lambda (_: +nat).(tau0 g c0 (TLRef i) (lift (S i) O (lift h (minus d0 (S i)) w)))) +(tau0_abbr g c0 x (lift h (minus d0 (S i)) v) i (getl_intro i c0 (CHead x +(Bind Abbr) (lift h (minus d0 (S i)) v)) x0 H6 H11) (lift h (minus d0 (S i)) +w) (H2 x h (minus d0 (S i)) H12)) (plus (S i) (minus d0 (S i))) +(le_plus_minus (S i) d0 H4)) (lift h (plus (S i) (minus d0 (S i))) (lift (S +i) O w)) (lift_d w h (S i) (minus d0 (S i)) O (le_O_n (minus d0 (S i))))) d0 +(le_plus_minus_r (S i) d0 H4)) (lift h d0 (TLRef i)) (lift_lref_lt i h d0 +H4))))) H10)))))))) H5))) (\lambda (H4: (le d0 i)).(eq_ind_r T (TLRef (plus i +h)) (\lambda (t: T).(tau0 g c0 t (lift h d0 (lift (S i) O w)))) (eq_ind nat +(S i) (\lambda (_: nat).(tau0 g c0 (TLRef (plus i h)) (lift h d0 (lift (S i) +O w)))) (eq_ind_r T (lift (plus h (S i)) O w) (\lambda (t: T).(tau0 g c0 +(TLRef (plus i h)) t)) (eq_ind_r nat (plus (S i) h) (\lambda (n: nat).(tau0 g +c0 (TLRef (plus i h)) (lift n O w))) (tau0_abbr g c0 d v (plus i h) +(drop_getl_trans_ge i c0 c d0 h H3 (CHead d (Bind Abbr) v) H0 H4) w H1) (plus +h (S i)) (plus_comm h (S i))) (lift h d0 (lift (S i) O w)) (lift_free w (S i) +h O d0 (le_S d0 i H4) (le_O_n d0))) (plus i (S O)) (eq_ind_r nat (plus (S O) +i) (\lambda (n: nat).(eq nat (S i) n)) (refl_equal nat (plus (S O) i)) (plus +i (S O)) (plus_comm i (S O)))) (lift h d0 (TLRef i)) (lift_lref_ge i h d0 +H4)))))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda +(i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abst) v))).(\lambda (w: +T).(\lambda (H1: (tau0 g d v w)).(\lambda (H2: ((\forall (c: C).(\forall (h: +nat).(\forall (d0: nat).((drop h d0 c d) \to (tau0 g c (lift h d0 v) (lift h +d0 w)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d0: nat).(\lambda +(H3: (drop h d0 c0 c)).(lt_le_e i d0 (tau0 g c0 (lift h d0 (TLRef i)) (lift h +d0 (lift (S i) O v))) (\lambda (H4: (lt i d0)).(let H5 \def +(drop_getl_trans_le i d0 (le_S_n i d0 (le_S (S i) d0 H4)) c0 c h H3 (CHead d +(Bind Abst) v) H0) in (ex3_2_ind C C (\lambda (e0: C).(\lambda (_: C).(drop i +O c0 e0))) (\lambda (e0: C).(\lambda (e1: C).(drop h (minus d0 i) e0 e1))) +(\lambda (_: C).(\lambda (e1: C).(clear e1 (CHead d (Bind Abst) v)))) (tau0 g +c0 (lift h d0 (TLRef i)) (lift h d0 (lift (S i) O v))) (\lambda (x0: +C).(\lambda (x1: C).(\lambda (H6: (drop i O c0 x0)).(\lambda (H7: (drop h +(minus d0 i) x0 x1)).(\lambda (H8: (clear x1 (CHead d (Bind Abst) v))).(let +H9 \def (eq_ind nat (minus d0 i) (\lambda (n: nat).(drop h n x0 x1)) H7 (S +(minus d0 (S i))) (minus_x_Sy d0 i H4)) in (let H10 \def (drop_clear_S x1 x0 +h (minus d0 (S i)) H9 Abst d v H8) in (ex2_ind C (\lambda (c1: C).(clear x0 +(CHead c1 (Bind Abst) (lift h (minus d0 (S i)) v)))) (\lambda (c1: C).(drop h +(minus d0 (S i)) c1 d)) (tau0 g c0 (lift h d0 (TLRef i)) (lift h d0 (lift (S +i) O v))) (\lambda (x: C).(\lambda (H11: (clear x0 (CHead x (Bind Abst) (lift +h (minus d0 (S i)) v)))).(\lambda (H12: (drop h (minus d0 (S i)) x +d)).(eq_ind_r T (TLRef i) (\lambda (t: T).(tau0 g c0 t (lift h d0 (lift (S i) +O v)))) (eq_ind nat (plus (S i) (minus d0 (S i))) (\lambda (n: nat).(tau0 g +c0 (TLRef i) (lift h n (lift (S i) O v)))) (eq_ind_r T (lift (S i) O (lift h +(minus d0 (S i)) v)) (\lambda (t: T).(tau0 g c0 (TLRef i) t)) (eq_ind nat d0 +(\lambda (_: nat).(tau0 g c0 (TLRef i) (lift (S i) O (lift h (minus d0 (S i)) +v)))) (tau0_abst g c0 x (lift h (minus d0 (S i)) v) i (getl_intro i c0 (CHead +x (Bind Abst) (lift h (minus d0 (S i)) v)) x0 H6 H11) (lift h (minus d0 (S +i)) w) (H2 x h (minus d0 (S i)) H12)) (plus (S i) (minus d0 (S i))) +(le_plus_minus (S i) d0 H4)) (lift h (plus (S i) (minus d0 (S i))) (lift (S +i) O v)) (lift_d v h (S i) (minus d0 (S i)) O (le_O_n (minus d0 (S i))))) d0 +(le_plus_minus_r (S i) d0 H4)) (lift h d0 (TLRef i)) (lift_lref_lt i h d0 +H4))))) H10)))))))) H5))) (\lambda (H4: (le d0 i)).(eq_ind_r T (TLRef (plus i +h)) (\lambda (t: T).(tau0 g c0 t (lift h d0 (lift (S i) O v)))) (eq_ind nat +(S i) (\lambda (_: nat).(tau0 g c0 (TLRef (plus i h)) (lift h d0 (lift (S i) +O v)))) (eq_ind_r T (lift (plus h (S i)) O v) (\lambda (t: T).(tau0 g c0 +(TLRef (plus i h)) t)) (eq_ind_r nat (plus (S i) h) (\lambda (n: nat).(tau0 g +c0 (TLRef (plus i h)) (lift n O v))) (tau0_abst g c0 d v (plus i h) +(drop_getl_trans_ge i c0 c d0 h H3 (CHead d (Bind Abst) v) H0 H4) w H1) (plus +h (S i)) (plus_comm h (S i))) (lift h d0 (lift (S i) O v)) (lift_free v (S i) +h O d0 (le_S d0 i H4) (le_O_n d0))) (plus i (S O)) (eq_ind_r nat (plus (S O) +i) (\lambda (n: nat).(eq nat (S i) n)) (refl_equal nat (plus (S O) i)) (plus +i (S O)) (plus_comm i (S O)))) (lift h d0 (TLRef i)) (lift_lref_ge i h d0 +H4)))))))))))))))) (\lambda (b: B).(\lambda (c: C).(\lambda (v: T).(\lambda +(t3: T).(\lambda (t4: T).(\lambda (_: (tau0 g (CHead c (Bind b) v) t3 +t4)).(\lambda (H1: ((\forall (c0: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c0 (CHead c (Bind b) v)) \to (tau0 g c0 (lift h d t3) (lift h +d t4)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda +(H2: (drop h d c0 c)).(eq_ind_r T (THead (Bind b) (lift h d v) (lift h (s +(Bind b) d) t3)) (\lambda (t: T).(tau0 g c0 t (lift h d (THead (Bind b) v +t4)))) (eq_ind_r T (THead (Bind b) (lift h d v) (lift h (s (Bind b) d) t4)) +(\lambda (t: T).(tau0 g c0 (THead (Bind b) (lift h d v) (lift h (s (Bind b) +d) t3)) t)) (tau0_bind g b c0 (lift h d v) (lift h (S d) t3) (lift h (S d) +t4) (H1 (CHead c0 (Bind b) (lift h d v)) h (S d) (drop_skip_bind h d c0 c H2 +b v))) (lift h d (THead (Bind b) v t4)) (lift_head (Bind b) v t4 h d)) (lift +h d (THead (Bind b) v t3)) (lift_head (Bind b) v t3 h d))))))))))))) (\lambda +(c: C).(\lambda (v: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (tau0 g +c t3 t4)).(\lambda (H1: ((\forall (c0: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c0 c) \to (tau0 g c0 (lift h d t3) (lift h d +t4)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: +(drop h d c0 c)).(eq_ind_r T (THead (Flat Appl) (lift h d v) (lift h (s (Flat +Appl) d) t3)) (\lambda (t: T).(tau0 g c0 t (lift h d (THead (Flat Appl) v +t4)))) (eq_ind_r T (THead (Flat Appl) (lift h d v) (lift h (s (Flat Appl) d) +t4)) (\lambda (t: T).(tau0 g c0 (THead (Flat Appl) (lift h d v) (lift h (s +(Flat Appl) d) t3)) t)) (tau0_appl g c0 (lift h d v) (lift h (s (Flat Appl) +d) t3) (lift h (s (Flat Appl) d) t4) (H1 c0 h (s (Flat Appl) d) H2)) (lift h +d (THead (Flat Appl) v t4)) (lift_head (Flat Appl) v t4 h d)) (lift h d +(THead (Flat Appl) v t3)) (lift_head (Flat Appl) v t3 h d)))))))))))) +(\lambda (c: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (tau0 g c v1 +v2)).(\lambda (H1: ((\forall (c0: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c0 c) \to (tau0 g c0 (lift h d v1) (lift h d +v2)))))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (tau0 g c t3 +t4)).(\lambda (H3: ((\forall (c0: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c0 c) \to (tau0 g c0 (lift h d t3) (lift h d +t4)))))))).(\lambda (c0: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H4: +(drop h d c0 c)).(eq_ind_r T (THead (Flat Cast) (lift h d v1) (lift h (s +(Flat Cast) d) t3)) (\lambda (t: T).(tau0 g c0 t (lift h d (THead (Flat Cast) +v2 t4)))) (eq_ind_r T (THead (Flat Cast) (lift h d v2) (lift h (s (Flat Cast) +d) t4)) (\lambda (t: T).(tau0 g c0 (THead (Flat Cast) (lift h d v1) (lift h +(s (Flat Cast) d) t3)) t)) (tau0_cast g c0 (lift h d v1) (lift h d v2) (H1 c0 +h d H4) (lift h (s (Flat Cast) d) t3) (lift h (s (Flat Cast) d) t4) (H3 c0 h +(s (Flat Cast) d) H4)) (lift h d (THead (Flat Cast) v2 t4)) (lift_head (Flat +Cast) v2 t4 h d)) (lift h d (THead (Flat Cast) v1 t3)) (lift_head (Flat Cast) +v1 t3 h d))))))))))))))) e t1 t2 H))))). + +theorem tau0_correct: + \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t: T).((tau0 g c +t1 t) \to (ex T (\lambda (t2: T).(tau0 g c t t2))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: +(tau0 g c t1 t)).(tau0_ind g (\lambda (c0: C).(\lambda (_: T).(\lambda (t2: +T).(ex T (\lambda (t3: T).(tau0 g c0 t2 t3)))))) (\lambda (c0: C).(\lambda +(n: nat).(ex_intro T (\lambda (t2: T).(tau0 g c0 (TSort (next g n)) t2)) +(TSort (next g (next g n))) (tau0_sort g c0 (next g n))))) (\lambda (c0: +C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 +(CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (_: (tau0 g d v +w)).(\lambda (H2: (ex T (\lambda (t2: T).(tau0 g d w t2)))).(let H3 \def H2 +in (ex_ind T (\lambda (t2: T).(tau0 g d w t2)) (ex T (\lambda (t2: T).(tau0 g +c0 (lift (S i) O w) t2))) (\lambda (x: T).(\lambda (H4: (tau0 g d w +x)).(ex_intro T (\lambda (t2: T).(tau0 g c0 (lift (S i) O w) t2)) (lift (S i) +O x) (tau0_lift g d w x H4 c0 (S i) O (getl_drop Abbr c0 d v i H0))))) +H3)))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: +nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abst) v))).(\lambda (w: +T).(\lambda (H1: (tau0 g d v w)).(\lambda (H2: (ex T (\lambda (t2: T).(tau0 g +d w t2)))).(let H3 \def H2 in (ex_ind T (\lambda (t2: T).(tau0 g d w t2)) (ex +T (\lambda (t2: T).(tau0 g c0 (lift (S i) O v) t2))) (\lambda (x: T).(\lambda +(_: (tau0 g d w x)).(ex_intro T (\lambda (t2: T).(tau0 g c0 (lift (S i) O v) +t2)) (lift (S i) O w) (tau0_lift g d v w H1 c0 (S i) O (getl_drop Abst c0 d v +i H0))))) H3)))))))))) (\lambda (b: B).(\lambda (c0: C).(\lambda (v: +T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (tau0 g (CHead c0 (Bind b) +v) t2 t3)).(\lambda (H1: (ex T (\lambda (t2: T).(tau0 g (CHead c0 (Bind b) v) +t3 t2)))).(let H2 \def H1 in (ex_ind T (\lambda (t4: T).(tau0 g (CHead c0 +(Bind b) v) t3 t4)) (ex T (\lambda (t4: T).(tau0 g c0 (THead (Bind b) v t3) +t4))) (\lambda (x: T).(\lambda (H3: (tau0 g (CHead c0 (Bind b) v) t3 +x)).(ex_intro T (\lambda (t4: T).(tau0 g c0 (THead (Bind b) v t3) t4)) (THead +(Bind b) v x) (tau0_bind g b c0 v t3 x H3)))) H2))))))))) (\lambda (c0: +C).(\lambda (v: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (tau0 g c0 +t2 t3)).(\lambda (H1: (ex T (\lambda (t2: T).(tau0 g c0 t3 t2)))).(let H2 +\def H1 in (ex_ind T (\lambda (t4: T).(tau0 g c0 t3 t4)) (ex T (\lambda (t4: +T).(tau0 g c0 (THead (Flat Appl) v t3) t4))) (\lambda (x: T).(\lambda (H3: +(tau0 g c0 t3 x)).(ex_intro T (\lambda (t4: T).(tau0 g c0 (THead (Flat Appl) +v t3) t4)) (THead (Flat Appl) v x) (tau0_appl g c0 v t3 x H3)))) H2)))))))) +(\lambda (c0: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (tau0 g c0 v1 +v2)).(\lambda (H1: (ex T (\lambda (t2: T).(tau0 g c0 v2 t2)))).(\lambda (t2: +T).(\lambda (t3: T).(\lambda (_: (tau0 g c0 t2 t3)).(\lambda (H3: (ex T +(\lambda (t2: T).(tau0 g c0 t3 t2)))).(let H4 \def H1 in (ex_ind T (\lambda +(t4: T).(tau0 g c0 v2 t4)) (ex T (\lambda (t4: T).(tau0 g c0 (THead (Flat +Cast) v2 t3) t4))) (\lambda (x: T).(\lambda (H5: (tau0 g c0 v2 x)).(let H6 +\def H3 in (ex_ind T (\lambda (t4: T).(tau0 g c0 t3 t4)) (ex T (\lambda (t4: +T).(tau0 g c0 (THead (Flat Cast) v2 t3) t4))) (\lambda (x0: T).(\lambda (H7: +(tau0 g c0 t3 x0)).(ex_intro T (\lambda (t4: T).(tau0 g c0 (THead (Flat Cast) +v2 t3) t4)) (THead (Flat Cast) x x0) (tau0_cast g c0 v2 x H5 t3 x0 H7)))) +H6)))) H4))))))))))) c t1 t H))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/theory.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/theory.ma index b6324afbd..4a9a6d76f 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/theory.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/theory.ma @@ -122,9 +122,45 @@ include "subst0/tlt.ma". include "subst0/dec.ma". +include "subst1/defs.ma". + +include "subst1/fwd.ma". + +include "subst1/props.ma". + +include "subst1/subst1.ma". + +include "csubst0/defs.ma". + +include "csubst0/fwd.ma". + +include "csubst0/props.ma". + +include "csubst0/drop.ma". + +include "csubst0/clear.ma". + +include "csubst0/getl.ma". + +include "csubst1/defs.ma". + +include "csubst1/fwd.ma". + +include "csubst1/props.ma". + +include "csubst1/getl.ma". + +include "fsubst0/defs.ma". + +include "fsubst0/fwd.ma". + include "G/defs.ma". include "next_plus/defs.ma". include "next_plus/props.ma". +include "tau0/defs.ma". + +include "tau0/props.ma". + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/problems.ma b/matita/contribs/LAMBDA-TYPES/Level-1/problems.ma index 72b810c22..c727f77db 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/problems.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/problems.ma @@ -24,14 +24,9 @@ include "LambdaDelta/theory.ma". * drop1_getl_trans (in problems-2) *) -(* Problem 2: does not typecheck a match on an empty type *) +(* Problem 2: assertion failure raised by type checker on this object *) -theorem subst0_confluence_neq: - \forall (t0: T).(\forall (t1: T).(\forall (u1: T).(\forall (i1: nat).((subst0 i1 u1 t0 t1) \to (\forall (t2: T).(\forall (u2: T).(\forall (i2: nat).((subst0 i2 u2 t0 t2) \to ((not (eq nat i1 i2)) \to (ex2 T (\lambda (t: T).(subst0 i2 u2 t1 t)) (\lambda (t: T).(subst0 i1 u1 t2 t)))))))))))) -\def - \lambda (t0: T).(\lambda (t1: T).(\lambda (u1: T).(\lambda (i1: nat).(\lambda (H: (subst0 i1 u1 t0 t1)).(subst0_ind (\lambda (n: nat).(\lambda (t: T).(\lambda (t2: T).(\lambda (t3: T).(\forall (t4: T).(\forall (u2: T).(\forall (i2: nat).((subst0 i2 u2 t2 t4) \to ((not (eq nat n i2)) \to (ex2 T (\lambda (t5: T).(subst0 i2 u2 t3 t5)) (\lambda (t5: T).(subst0 n t t4 t5)))))))))))) (\lambda (v: T).(\lambda (i: nat).(\lambda (t2: T).(\lambda (u2: T).(\lambda (i2: nat).(\lambda (H0: (subst0 i2 u2 (TLRef i) t2)).(\lambda (H1: (not (eq nat i i2))).(and_ind (eq nat i i2) (eq T t2 (lift (S i) O u2)) (ex2 T (\lambda (t: T).(subst0 i2 u2 (lift (S i) O v) t)) (\lambda (t: T).(subst0 i v t2 t))) (\lambda (H2: (eq nat i i2)).(\lambda (H3: (eq T t2 (lift (S i) O u2))).(let H4 \def (eq_ind nat i (\lambda (n: nat).(not (eq nat n i2))) H1 i2 H2) in (eq_ind_r T (lift (S i) O u2) (\lambda (t: T).(ex2 T (\lambda (t3: T).(subst0 i2 u2 (lift (S i) O v) t3)) (\lambda (t3: T).(subst0 i v t t3)))) (let H5 \def (match (H4 (refl_equal nat i2)) return (\lambda (_: False).(ex2 T (\lambda (t: T).(subst0 i2 u2 (lift (S i) O v) t)) (\lambda (t: T).(subst0 i v (lift (S i) O u2) t)))) with []) in H5) t2 H3)))) (subst0_gen_lref u2 t2 i2 i H0))))))))) (\lambda (v: T).(\lambda (u2: T).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H0: (subst0 i v u0 u2)).(\lambda (H1: ((\forall (t2: T).(\forall (u3: T).(\forall (i2: nat).((subst0 i2 u3 u0 t2) \to ((not (eq nat i i2)) \to (ex2 T (\lambda (t: T).(subst0 i2 u3 u2 t)) (\lambda (t: T).(subst0 i v t2 t)))))))))).(\lambda (t: T).(\lambda (k: K).(\lambda (t2: T).(\lambda (u3: T).(\lambda (i2: nat).(\lambda (H2: (subst0 i2 u3 (THead k u0 t) t2)).(\lambda (H3: (not (eq nat i i2))).(or3_ind (ex2 T (\lambda (u4: T).(eq T t2 (THead k u4 t))) (\lambda (u4: T).(subst0 i2 u3 u0 u4))) (ex2 T (\lambda (t3: T).(eq T t2 (THead k u0 t3))) (\lambda (t3: T).(subst0 (s k i2) u3 t t3))) (ex3_2 T T (\lambda (u4: T).(\lambda (t3: T).(eq T t2 (THead k u4 t3)))) (\lambda (u4: T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i2) u3 t t3)))) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v t2 t3))) (\lambda (H4: (ex2 T (\lambda (u2: T).(eq T t2 (THead k u2 t))) (\lambda (u2: T).(subst0 i2 u3 u0 u2)))).(ex2_ind T (\lambda (u4: T).(eq T t2 (THead k u4 t))) (\lambda (u4: T).(subst0 i2 u3 u0 u4)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v t2 t3))) (\lambda (x: T).(\lambda (H5: (eq T t2 (THead k x t))).(\lambda (H6: (subst0 i2 u3 u0 x)).(eq_ind_r T (THead k x t) (\lambda (t3: T).(ex2 T (\lambda (t4: T).(subst0 i2 u3 (THead k u2 t) t4)) (\lambda (t4: T).(subst0 i v t3 t4)))) (ex2_ind T (\lambda (t3: T).(subst0 i2 u3 u2 t3)) (\lambda (t3: T).(subst0 i v x t3)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v (THead k x t) t3))) (\lambda (x0: T).(\lambda (H7: (subst0 i2 u3 u2 x0)).(\lambda (H8: (subst0 i v x x0)).(ex_intro2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v (THead k x t) t3)) (THead k x0 t) (subst0_fst u3 x0 u2 i2 H7 t k) (subst0_fst v x0 x i H8 t k))))) (H1 x u3 i2 H6 H3)) t2 H5)))) H4)) (\lambda (H4: (ex2 T (\lambda (t3: T).(eq T t2 (THead k u0 t3))) (\lambda (t2: T).(subst0 (s k i2) u3 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead k u0 t3))) (\lambda (t3: T).(subst0 (s k i2) u3 t t3)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v t2 t3))) (\lambda (x: T).(\lambda (H5: (eq T t2 (THead k u0 x))).(\lambda (H6: (subst0 (s k i2) u3 t x)).(eq_ind_r T (THead k u0 x) (\lambda (t3: T).(ex2 T (\lambda (t4: T).(subst0 i2 u3 (THead k u2 t) t4)) (\lambda (t4: T).(subst0 i v t3 t4)))) (ex_intro2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v (THead k u0 x) t3)) (THead k u2 x) (subst0_snd k u3 x t i2 H6 u2) (subst0_fst v u2 u0 i H0 x k)) t2 H5)))) H4)) (\lambda (H4: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i2 u3 u0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i2) u3 t t2))))).(ex3_2_ind T T (\lambda (u4: T).(\lambda (t3: T).(eq T t2 (THead k u4 t3)))) (\lambda (u4: T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i2) u3 t t3))) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v t2 t3))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T t2 (THead k x0 x1))).(\lambda (H6: (subst0 i2 u3 u0 x0)).(\lambda (H7: (subst0 (s k i2) u3 t x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t3: T).(ex2 T (\lambda (t4: T).(subst0 i2 u3 (THead k u2 t) t4)) (\lambda (t4: T).(subst0 i v t3 t4)))) (ex2_ind T (\lambda (t3: T).(subst0 i2 u3 u2 t3)) (\lambda (t3: T).(subst0 i v x0 t3)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v (THead k x0 x1) t3))) (\lambda (x: T).(\lambda (H8: (subst0 i2 u3 u2 x)).(\lambda (H9: (subst0 i v x0 x)).(ex_intro2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v (THead k x0 x1) t3)) (THead k x x1) (subst0_both u3 u2 x i2 H8 k t x1 H7) (subst0_fst v x x0 i H9 x1 k))))) (H1 x0 u3 i2 H6 H3)) t2 H5)))))) H4)) (subst0_gen_head k u3 u0 t t2 i2 H2))))))))))))))) (\lambda (k: K).(\lambda (v: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (i: nat).(\lambda (H0: (subst0 (s k i) v t3 t2)).(\lambda (H1: ((\forall (t4: T).(\forall (u2: T).(\forall (i2: nat).((subst0 i2 u2 t3 t4) \to ((not (eq nat (s k i) i2)) \to (ex2 T (\lambda (t: T).(subst0 i2 u2 t2 t)) (\lambda (t: T).(subst0 (s k i) v t4 t)))))))))).(\lambda (u: T).(\lambda (t4: T).(\lambda (u2: T).(\lambda (i2: nat).(\lambda (H2: (subst0 i2 u2 (THead k u t3) t4)).(\lambda (H3: (not (eq nat i i2))).(or3_ind (ex2 T (\lambda (u3: T).(eq T t4 (THead k u3 t3))) (\lambda (u3: T).(subst0 i2 u2 u u3))) (ex2 T (\lambda (t5: T).(eq T t4 (THead k u t5))) (\lambda (t5: T).(subst0 (s k i2) u2 t3 t5))) (ex3_2 T T (\lambda (u3: T).(\lambda (t5: T).(eq T t4 (THead k u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i2 u2 u u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i2) u2 t3 t5)))) (ex2 T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (H4: (ex2 T (\lambda (u2: T).(eq T t4 (THead k u2 t3))) (\lambda (u3: T).(subst0 i2 u2 u u3)))).(ex2_ind T (\lambda (u3: T).(eq T t4 (THead k u3 t3))) (\lambda (u3: T).(subst0 i2 u2 u u3)) (ex2 T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (x: T).(\lambda (H5: (eq T t4 (THead k x t3))).(\lambda (H6: (subst0 i2 u2 u x)).(eq_ind_r T (THead k x t3) (\lambda (t: T).(ex2 T (\lambda (t5: T).(subst0 i2 u2 (THead k u t2) t5)) (\lambda (t5: T).(subst0 i v t t5)))) (ex_intro2 T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v (THead k x t3) t)) (THead k x t2) (subst0_fst u2 x u i2 H6 t2 k) (subst0_snd k v t2 t3 i H0 x)) t4 H5)))) H4)) (\lambda (H4: (ex2 T (\lambda (t2: T).(eq T t4 (THead k u t2))) (\lambda (t2: T).(subst0 (s k i2) u2 t3 t2)))).(ex2_ind T (\lambda (t5: T).(eq T t4 (THead k u t5))) (\lambda (t5: T).(subst0 (s k i2) u2 t3 t5)) (ex2 T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (x: T).(\lambda (H5: (eq T t4 (THead k u x))).(\lambda (H6: (subst0 (s k i2) u2 t3 x)).(eq_ind_r T (THead k u x) (\lambda (t: T).(ex2 T (\lambda (t5: T).(subst0 i2 u2 (THead k u t2) t5)) (\lambda (t5: T).(subst0 i v t t5)))) (ex2_ind T (\lambda (t: T).(subst0 (s k i2) u2 t2 t)) (\lambda (t: T).(subst0 (s k i) v x t)) (ex2 T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v (THead k u x) t))) (\lambda (x0: T).(\lambda (H7: (subst0 (s k i2) u2 t2 x0)).(\lambda (H8: (subst0 (s k i) v x x0)).(ex_intro2 T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v (THead k u x) t)) (THead k u x0) (subst0_snd k u2 x0 t2 i2 H7 u) (subst0_snd k v x0 x i H8 u))))) (H1 x u2 (s k i2) H6 (\lambda (H7: (eq nat (s k i) (s k i2))).(H3 (s_inj k i i2 H7))))) t4 H5)))) H4)) (\lambda (H4: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t4 (THead k u2 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i2 u2 u u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i2) u2 t3 t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t5: T).(eq T t4 (THead k u3 t5)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i2 u2 u u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i2) u2 t3 t5))) (ex2 T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T t4 (THead k x0 x1))).(\lambda (H6: (subst0 i2 u2 u x0)).(\lambda (H7: (subst0 (s k i2) u2 t3 x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t: T).(ex2 T (\lambda (t5: T).(subst0 i2 u2 (THead k u t2) t5)) (\lambda (t5: T).(subst0 i v t t5)))) (ex2_ind T (\lambda (t: T).(subst0 (s k i2) u2 t2 t)) (\lambda (t: T).(subst0 (s k i) v x1 t)) (ex2 T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v (THead k x0 x1) t))) (\lambda (x: T).(\lambda (H8: (subst0 (s k i2) u2 t2 x)).(\lambda (H9: (subst0 (s k i) v x1 x)).(ex_intro2 T (\lambda (t: T).(subst0 i2 u2 (THead k u t2) t)) (\lambda (t: T).(subst0 i v (THead k x0 x1) t)) (THead k x0 x) (subst0_both u2 u x0 i2 H6 k t2 x H8) (subst0_snd k v x x1 i H9 x0))))) (H1 x1 u2 (s k i2) H7 (\lambda (H8: (eq nat (s k i) (s k i2))).(H3 (s_inj k i i2 H8))))) t4 H5)))))) H4)) (subst0_gen_head k u2 u t3 t4 i2 H2))))))))))))))) (\lambda (v: T).(\lambda (u0: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda (H0: (subst0 i v u0 u2)).(\lambda (H1: ((\forall (t2: T).(\forall (u3: T).(\forall (i2: nat).((subst0 i2 u3 u0 t2) \to ((not (eq nat i i2)) \to (ex2 T (\lambda (t: T).(subst0 i2 u3 u2 t)) (\lambda (t: T).(subst0 i v t2 t)))))))))).(\lambda (k: K).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H2: (subst0 (s k i) v t2 t3)).(\lambda (H3: ((\forall (t4: T).(\forall (u2: T).(\forall (i2: nat).((subst0 i2 u2 t2 t4) \to ((not (eq nat (s k i) i2)) \to (ex2 T (\lambda (t: T).(subst0 i2 u2 t3 t)) (\lambda (t: T).(subst0 (s k i) v t4 t)))))))))).(\lambda (t4: T).(\lambda (u3: T).(\lambda (i2: nat).(\lambda (H4: (subst0 i2 u3 (THead k u0 t2) t4)).(\lambda (H5: (not (eq nat i i2))).(or3_ind (ex2 T (\lambda (u4: T).(eq T t4 (THead k u4 t2))) (\lambda (u4: T).(subst0 i2 u3 u0 u4))) (ex2 T (\lambda (t5: T).(eq T t4 (THead k u0 t5))) (\lambda (t5: T).(subst0 (s k i2) u3 t2 t5))) (ex3_2 T T (\lambda (u4: T).(\lambda (t5: T).(eq T t4 (THead k u4 t5)))) (\lambda (u4: T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i2) u3 t2 t5)))) (ex2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (H6: (ex2 T (\lambda (u2: T).(eq T t4 (THead k u2 t2))) (\lambda (u2: T).(subst0 i2 u3 u0 u2)))).(ex2_ind T (\lambda (u4: T).(eq T t4 (THead k u4 t2))) (\lambda (u4: T).(subst0 i2 u3 u0 u4)) (ex2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (x: T).(\lambda (H7: (eq T t4 (THead k x t2))).(\lambda (H8: (subst0 i2 u3 u0 x)).(eq_ind_r T (THead k x t2) (\lambda (t: T).(ex2 T (\lambda (t5: T).(subst0 i2 u3 (THead k u2 t3) t5)) (\lambda (t5: T).(subst0 i v t t5)))) (ex2_ind T (\lambda (t: T).(subst0 i2 u3 u2 t)) (\lambda (t: T).(subst0 i v x t)) (ex2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v (THead k x t2) t))) (\lambda (x0: T).(\lambda (H9: (subst0 i2 u3 u2 x0)).(\lambda (H10: (subst0 i v x x0)).(ex_intro2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v (THead k x t2) t)) (THead k x0 t3) (subst0_fst u3 x0 u2 i2 H9 t3 k) (subst0_both v x x0 i H10 k t2 t3 H2))))) (H1 x u3 i2 H8 H5)) t4 H7)))) H6)) (\lambda (H6: (ex2 T (\lambda (t2: T).(eq T t4 (THead k u0 t2))) (\lambda (t3: T).(subst0 (s k i2) u3 t2 t3)))).(ex2_ind T (\lambda (t5: T).(eq T t4 (THead k u0 t5))) (\lambda (t5: T).(subst0 (s k i2) u3 t2 t5)) (ex2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (x: T).(\lambda (H7: (eq T t4 (THead k u0 x))).(\lambda (H8: (subst0 (s k i2) u3 t2 x)).(eq_ind_r T (THead k u0 x) (\lambda (t: T).(ex2 T (\lambda (t5: T).(subst0 i2 u3 (THead k u2 t3) t5)) (\lambda (t5: T).(subst0 i v t t5)))) (ex2_ind T (\lambda (t: T).(subst0 (s k i2) u3 t3 t)) (\lambda (t: T).(subst0 (s k i) v x t)) (ex2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v (THead k u0 x) t))) (\lambda (x0: T).(\lambda (H9: (subst0 (s k i2) u3 t3 x0)).(\lambda (H10: (subst0 (s k i) v x x0)).(ex_intro2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v (THead k u0 x) t)) (THead k u2 x0) (subst0_snd k u3 x0 t3 i2 H9 u2) (subst0_both v u0 u2 i H0 k x x0 H10))))) (H3 x u3 (s k i2) H8 (\lambda (H9: (eq nat (s k i) (s k i2))).(H5 (s_inj k i i2 H9))))) t4 H7)))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t4 (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i2 u3 u0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i2) u3 t2 t3))))).(ex3_2_ind T T (\lambda (u4: T).(\lambda (t5: T).(eq T t4 (THead k u4 t5)))) (\lambda (u4: T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i2) u3 t2 t5))) (ex2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v t4 t))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T t4 (THead k x0 x1))).(\lambda (H8: (subst0 i2 u3 u0 x0)).(\lambda (H9: (subst0 (s k i2) u3 t2 x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t: T).(ex2 T (\lambda (t5: T).(subst0 i2 u3 (THead k u2 t3) t5)) (\lambda (t5: T).(subst0 i v t t5)))) (ex2_ind T (\lambda (t: T).(subst0 i2 u3 u2 t)) (\lambda (t: T).(subst0 i v x0 t)) (ex2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v (THead k x0 x1) t))) (\lambda (x: T).(\lambda (H10: (subst0 i2 u3 u2 x)).(\lambda (H11: (subst0 i v x0 x)).(ex2_ind T (\lambda (t: T).(subst0 (s k i2) u3 t3 t)) (\lambda (t: T).(subst0 (s k i) v x1 t)) (ex2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v (THead k x0 x1) t))) (\lambda (x2: T).(\lambda (H12: (subst0 (s k i2) u3 t3 x2)).(\lambda (H13: (subst0 (s k i) v x1 x2)).(ex_intro2 T (\lambda (t: T).(subst0 i2 u3 (THead k u2 t3) t)) (\lambda (t: T).(subst0 i v (THead k x0 x1) t)) (THead k x x2) (subst0_both u3 u2 x i2 H10 k t3 x2 H12) (subst0_both v x0 x i H11 k x1 x2 H13))))) (H3 x1 u3 (s k i2) H9 (\lambda (H12: (eq nat (s k i) (s k i2))).(H5 (s_inj k i i2 H12)))))))) (H1 x0 u3 i2 H8 H5)) t4 H7)))))) H6)) (subst0_gen_head k u3 u0 t2 t4 i2 H4)))))))))))))))))) i1 u1 t0 t1 H))))). - -(* Problem 3: assertion failure raised by type checker on this object *) - -(* tau1 - *) +inductive tau1 (g:G) (c:C) (t1:T): T \to Prop \def +| tau1_tau0: \forall (t2: T).((tau0 g c t1 t2) \to (tau1 g c t1 t2)) +| tau1_sing: \forall (t: T).((tau1 g c t1 t) \to (\forall (t2: T).((tau0 g c +t t2) \to (tau1 g c t1 t2)))).