From 5baf68bea00b0ee84fd3ebc97069c1cab88001f2 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Sat, 2 Sep 2006 12:53:45 +0000 Subject: [PATCH] LambdaDelta.ma and some slices of it that typecheck ok! --- matita/contribs/LAMBDA-TYPES/Level-1/Base.ma | 24 +- .../LAMBDA-TYPES/Level-1/LambdaDelta-1.ma | 224 ++++++++++ .../LAMBDA-TYPES/Level-1/LambdaDelta-3.ma | 186 ++++++++ .../LAMBDA-TYPES/Level-1/LambdaDelta-4.ma | 245 ++++++++++ .../LAMBDA-TYPES/Level-1/LambdaDelta-5.ma | 193 ++++++++ .../LAMBDA-TYPES/Level-1/LambdaDelta-6.ma | 187 ++++++++ .../LAMBDA-TYPES/Level-1/LambdaDelta-8.ma | 93 ++++ .../LAMBDA-TYPES/Level-1/LambdaDelta.ma | 418 +++++++++--------- .../contribs/LAMBDA-TYPES/Level-1/Preamble.ma | 3 + .../contribs/LAMBDA-TYPES/Level-1/problems.ma | 15 +- 10 files changed, 1364 insertions(+), 224 deletions(-) create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-1.ma create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-3.ma create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-4.ma create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-5.ma create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-6.ma create mode 100644 matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-8.ma diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/Base.ma b/matita/contribs/LAMBDA-TYPES/Level-1/Base.ma index 7380acd28..a1b10e703 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/Base.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/Base.ma @@ -36,7 +36,7 @@ theorem xinduction: theorem nat_dec: \forall (n1: nat).(\forall (n2: nat).(or (eq nat n1 n2) ((eq nat n1 n2) \to (\forall (P: Prop).P)))) \def - \lambda (n1: nat).(nat_ind (\lambda (n: nat).(\forall (n2: nat).(or (eq nat n n2) ((eq nat n n2) \to (\forall (P: Prop).P))))) (\lambda (n2: nat).(nat_ind (\lambda (n: nat).(or (eq nat O n) ((eq nat O n) \to (\forall (P: Prop).P)))) (or_introl (eq nat O O) ((eq nat O O) \to (\forall (P: Prop).P)) (refl_equal nat O)) (\lambda (n: nat).(\lambda (_: (or (eq nat O n) ((eq nat O n) \to (\forall (P: Prop).P)))).(or_intror (eq nat O (S n)) ((eq nat O (S n)) \to (\forall (P: Prop).P)) (\lambda (H0: (eq nat O (S n))).(\lambda (P: Prop).(let H1 \def (eq_ind nat O (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n) H0) in (False_ind P H1))))))) n2)) (\lambda (n: nat).(\lambda (H: ((\forall (n2: nat).(or (eq nat n n2) ((eq nat n n2) \to (\forall (P: Prop).P)))))).(\lambda (n2: nat).(nat_ind (\lambda (n0: nat).(or (eq nat (S n) n0) ((eq nat (S n) n0) \to (\forall (P: Prop).P)))) (or_intror (eq nat (S n) O) ((eq nat (S n) O) \to (\forall (P: Prop).P)) (\lambda (H0: (eq nat (S n) O)).(\lambda (P: Prop).(let H1 \def (eq_ind nat (S n) (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind P H1))))) (\lambda (n0: nat).(\lambda (H0: (or (eq nat (S n) n0) ((eq nat (S n) n0) \to (\forall (P: Prop).P)))).(or_ind (eq nat n n0) ((eq nat n n0) \to (\forall (P: Prop).P)) (or (eq nat (S n) (S n0)) ((eq nat (S n) (S n0)) \to (\forall (P: Prop).P))) (\lambda (H1: (eq nat n n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n0: nat).(or (eq nat (S n) n0) ((eq nat (S n) n0) \to (\forall (P: Prop).P)))) H0 n H1) in (eq_ind nat n (\lambda (n3: nat).(or (eq nat (S n) (S n3)) ((eq nat (S n) (S n3)) \to (\forall (P: Prop).P)))) (or_introl (eq nat (S n) (S n)) ((eq nat (S n) (S n)) \to (\forall (P: Prop).P)) (refl_equal nat (S n))) n0 H1))) (\lambda (H1: (((eq nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq nat (S n) (S n0)) ((eq nat (S n) (S n0)) \to (\forall (P: Prop).P)) (\lambda (H2: (eq nat (S n) (S n0))).(\lambda (P: Prop).(let H3 \def (f_equal nat nat (\lambda (e: nat).(match e return (\lambda (_: ?).nat) with [O \Rightarrow n | (S n) \Rightarrow n])) (S n) (S n0) H2) in (let H4 \def (eq_ind_r nat n0 (\lambda (n0: nat).((eq nat n n0) \to (\forall (P: Prop).P))) H1 n H3) in (let H5 \def (eq_ind_r nat n0 (\lambda (n0: nat).(or (eq nat (S n) n0) ((eq nat (S n) n0) \to (\forall (P: Prop).P)))) H0 n H3) in (H4 (refl_equal nat n) P)))))))) (H n0)))) n2)))) n1). + \lambda (n1: nat).(nat_ind (\lambda (n: nat).(\forall (n2: nat).(or (eq nat n n2) ((eq nat n n2) \to (\forall (P: Prop).P))))) (\lambda (n2: nat).(nat_ind (\lambda (n: nat).(or (eq nat O n) ((eq nat O n) \to (\forall (P: Prop).P)))) (or_introl (eq nat O O) ((eq nat O O) \to (\forall (P: Prop).P)) (refl_equal nat O)) (\lambda (n: nat).(\lambda (_: (or (eq nat O n) ((eq nat O n) \to (\forall (P: Prop).P)))).(or_intror (eq nat O (S n)) ((eq nat O (S n)) \to (\forall (P: Prop).P)) (\lambda (H0: (eq nat O (S n))).(\lambda (P: Prop).(let H1 \def (eq_ind nat O (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n) H0) in (False_ind P H1))))))) n2)) (\lambda (n: nat).(\lambda (H: ((\forall (n2: nat).(or (eq nat n n2) ((eq nat n n2) \to (\forall (P: Prop).P)))))).(\lambda (n2: nat).(nat_ind (\lambda (n0: nat).(or (eq nat (S n) n0) ((eq nat (S n) n0) \to (\forall (P: Prop).P)))) (or_intror (eq nat (S n) O) ((eq nat (S n) O) \to (\forall (P: Prop).P)) (\lambda (H0: (eq nat (S n) O)).(\lambda (P: Prop).(let H1 \def (eq_ind nat (S n) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind P H1))))) (\lambda (n0: nat).(\lambda (H0: (or (eq nat (S n) n0) ((eq nat (S n) n0) \to (\forall (P: Prop).P)))).(or_ind (eq nat n n0) ((eq nat n n0) \to (\forall (P: Prop).P)) (or (eq nat (S n) (S n0)) ((eq nat (S n) (S n0)) \to (\forall (P: Prop).P))) (\lambda (H1: (eq nat n n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n0: nat).(or (eq nat (S n) n0) ((eq nat (S n) n0) \to (\forall (P: Prop).P)))) H0 n H1) in (eq_ind nat n (\lambda (n3: nat).(or (eq nat (S n) (S n3)) ((eq nat (S n) (S n3)) \to (\forall (P: Prop).P)))) (or_introl (eq nat (S n) (S n)) ((eq nat (S n) (S n)) \to (\forall (P: Prop).P)) (refl_equal nat (S n))) n0 H1))) (\lambda (H1: (((eq nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq nat (S n) (S n0)) ((eq nat (S n) (S n0)) \to (\forall (P: Prop).P)) (\lambda (H2: (eq nat (S n) (S n0))).(\lambda (P: Prop).(let H3 \def (f_equal nat nat (\lambda (e: nat).(match e return (\lambda (_: nat).nat) with [O \Rightarrow n | (S n) \Rightarrow n])) (S n) (S n0) H2) in (let H4 \def (eq_ind_r nat n0 (\lambda (n0: nat).((eq nat n n0) \to (\forall (P: Prop).P))) H1 n H3) in (let H5 \def (eq_ind_r nat n0 (\lambda (n0: nat).(or (eq nat (S n) n0) ((eq nat (S n) n0) \to (\forall (P: Prop).P)))) H0 n H3) in (H4 (refl_equal nat n) P)))))))) (H n0)))) n2)))) n1). theorem simpl_plus_r: \forall (n: nat).(\forall (m: nat).(\forall (p: nat).((eq nat (plus m n) (plus p n)) \to (eq nat m p)))) @@ -61,7 +61,7 @@ theorem plus_permute_2_in_3_assoc: theorem plus_O: \forall (x: nat).(\forall (y: nat).((eq nat (plus x y) O) \to (land (eq nat x O) (eq nat y O)))) \def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((eq nat (plus n y) O) \to (land (eq nat n O) (eq nat y O))))) (\lambda (y: nat).(\lambda (H: (eq nat (plus O y) O)).(conj (eq nat O O) (eq nat y O) (refl_equal nat O) H))) (\lambda (n: nat).(\lambda (_: ((\forall (y: nat).((eq nat (plus n y) O) \to (land (eq nat n O) (eq nat y O)))))).(\lambda (y: nat).(\lambda (H0: (eq nat (plus (S n) y) O)).(let H1 \def (match H0 return (\lambda (n0: nat).(\lambda (_: (eq ? ? n0)).((eq nat n0 O) \to (land (eq nat (S n) O) (eq nat y O))))) with [refl_equal \Rightarrow (\lambda (H1: (eq nat (plus (S n) y) O)).(let H2 \def (eq_ind nat (plus (S n) y) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind (land (eq nat (S n) O) (eq nat y O)) H2)))]) in (H1 (refl_equal nat O))))))) x). + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((eq nat (plus n y) O) \to (land (eq nat n O) (eq nat y O))))) (\lambda (y: nat).(\lambda (H: (eq nat (plus O y) O)).(conj (eq nat O O) (eq nat y O) (refl_equal nat O) H))) (\lambda (n: nat).(\lambda (_: ((\forall (y: nat).((eq nat (plus n y) O) \to (land (eq nat n O) (eq nat y O)))))).(\lambda (y: nat).(\lambda (H0: (eq nat (plus (S n) y) O)).(let H1 \def (match H0 return (\lambda (n0: nat).(\lambda (_: (eq ? ? n0)).((eq nat n0 O) \to (land (eq nat (S n) O) (eq nat y O))))) with [refl_equal \Rightarrow (\lambda (H1: (eq nat (plus (S n) y) O)).(let H2 \def (eq_ind nat (plus (S n) y) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind (land (eq nat (S n) O) (eq nat y O)) H2)))]) in (H1 (refl_equal nat O))))))) x). theorem minus_Sx_SO: \forall (x: nat).(eq nat (minus (S x) (S O)) x) @@ -81,7 +81,7 @@ theorem neq_eq_e: theorem le_false: \forall (m: nat).(\forall (n: nat).(\forall (P: Prop).((le m n) \to ((le (S n) m) \to P)))) \def - \lambda (m: nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).(\forall (P: Prop).((le n n0) \to ((le (S n0) n) \to P))))) (\lambda (n: nat).(\lambda (P: Prop).(\lambda (_: (le O n)).(\lambda (H0: (le (S n) O)).(let H1 \def (match H0 return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to P))) with [le_n \Rightarrow (\lambda (H1: (eq nat (S n) O)).(let H2 \def (eq_ind nat (S n) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind P H2))) | (le_S m H1) \Rightarrow (\lambda (H2: (eq nat (S m) O)).((let H3 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind ((le (S n) m) \to P) H3)) H1))]) in (H1 (refl_equal nat O))))))) (\lambda (n: nat).(\lambda (H: ((\forall (n0: nat).(\forall (P: Prop).((le n n0) \to ((le (S n0) n) \to P)))))).(\lambda (n0: nat).(nat_ind (\lambda (n1: nat).(\forall (P: Prop).((le (S n) n1) \to ((le (S n1) (S n)) \to P)))) (\lambda (P: Prop).(\lambda (H0: (le (S n) O)).(\lambda (_: (le (S O) (S n))).(let H2 \def (match H0 return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to P))) with [le_n \Rightarrow (\lambda (H2: (eq nat (S n) O)).(let H3 \def (eq_ind nat (S n) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind P H3))) | (le_S m H2) \Rightarrow (\lambda (H3: (eq nat (S m) O)).((let H4 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H3) in (False_ind ((le (S n) m) \to P) H4)) H2))]) in (H2 (refl_equal nat O)))))) (\lambda (n1: nat).(\lambda (_: ((\forall (P: Prop).((le (S n) n1) \to ((le (S n1) (S n)) \to P))))).(\lambda (P: Prop).(\lambda (H1: (le (S n) (S n1))).(\lambda (H2: (le (S (S n1)) (S n))).(H n1 P (le_S_n n n1 H1) (le_S_n (S n1) n H2))))))) n0)))) m). + \lambda (m: nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).(\forall (P: Prop).((le n n0) \to ((le (S n0) n) \to P))))) (\lambda (n: nat).(\lambda (P: Prop).(\lambda (_: (le O n)).(\lambda (H0: (le (S n) O)).(let H1 \def (match H0 return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to P))) with [le_n \Rightarrow (\lambda (H1: (eq nat (S n) O)).(let H2 \def (eq_ind nat (S n) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind P H2))) | (le_S m H1) \Rightarrow (\lambda (H2: (eq nat (S m) O)).((let H3 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind ((le (S n) m) \to P) H3)) H1))]) in (H1 (refl_equal nat O))))))) (\lambda (n: nat).(\lambda (H: ((\forall (n0: nat).(\forall (P: Prop).((le n n0) \to ((le (S n0) n) \to P)))))).(\lambda (n0: nat).(nat_ind (\lambda (n1: nat).(\forall (P: Prop).((le (S n) n1) \to ((le (S n1) (S n)) \to P)))) (\lambda (P: Prop).(\lambda (H0: (le (S n) O)).(\lambda (_: (le (S O) (S n))).(let H2 \def (match H0 return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to P))) with [le_n \Rightarrow (\lambda (H2: (eq nat (S n) O)).(let H3 \def (eq_ind nat (S n) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind P H3))) | (le_S m H2) \Rightarrow (\lambda (H3: (eq nat (S m) O)).((let H4 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H3) in (False_ind ((le (S n) m) \to P) H4)) H2))]) in (H2 (refl_equal nat O)))))) (\lambda (n1: nat).(\lambda (_: ((\forall (P: Prop).((le (S n) n1) \to ((le (S n1) (S n)) \to P))))).(\lambda (P: Prop).(\lambda (H1: (le (S n) (S n1))).(\lambda (H2: (le (S (S n1)) (S n))).(H n1 P (le_S_n n n1 H1) (le_S_n (S n1) n H2))))))) n0)))) m). theorem le_Sx_x: \forall (x: nat).((le (S x) x) \to (\forall (P: Prop).P)) @@ -106,7 +106,7 @@ theorem le_minus_minus: theorem le_minus_plus: \forall (z: nat).(\forall (x: nat).((le z x) \to (\forall (y: nat).(eq nat (minus (plus x y) z) (plus (minus x z) y))))) \def - \lambda (z: nat).(nat_ind (\lambda (n: nat).(\forall (x: nat).((le n x) \to (\forall (y: nat).(eq nat (minus (plus x y) n) (plus (minus x n) y)))))) (\lambda (x: nat).(\lambda (H: (le O x)).(let H0 \def (match H return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n x) \to (\forall (y: nat).(eq nat (minus (plus x y) O) (plus (minus x O) y)))))) with [le_n \Rightarrow (\lambda (H0: (eq nat O x)).(eq_ind nat O (\lambda (n: nat).(\forall (y: nat).(eq nat (minus (plus n y) O) (plus (minus n O) y)))) (\lambda (y: nat).(sym_eq nat (plus (minus O O) y) (minus (plus O y) O) (minus_n_O (plus O y)))) x H0)) | (le_S m H0) \Rightarrow (\lambda (H1: (eq nat (S m) x)).(eq_ind nat (S m) (\lambda (n: nat).((le O m) \to (\forall (y: nat).(eq nat (minus (plus n y) O) (plus (minus n O) y))))) (\lambda (_: (le O m)).(\lambda (y: nat).(refl_equal nat (plus (minus (S m) O) y)))) x H1 H0))]) in (H0 (refl_equal nat x))))) (\lambda (z0: nat).(\lambda (H: ((\forall (x: nat).((le z0 x) \to (\forall (y: nat).(eq nat (minus (plus x y) z0) (plus (minus x z0) y))))))).(\lambda (x: nat).(nat_ind (\lambda (n: nat).((le (S z0) n) \to (\forall (y: nat).(eq nat (minus (plus n y) (S z0)) (plus (minus n (S z0)) y))))) (\lambda (H0: (le (S z0) O)).(\lambda (y: nat).(let H1 \def (match H0 return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to (eq nat (minus (plus O y) (S z0)) (plus (minus O (S z0)) y))))) with [le_n \Rightarrow (\lambda (H1: (eq nat (S z0) O)).(let H2 \def (eq_ind nat (S z0) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind (eq nat (minus (plus O y) (S z0)) (plus (minus O (S z0)) y)) H2))) | (le_S m H1) \Rightarrow (\lambda (H2: (eq nat (S m) O)).((let H3 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind ((le (S z0) m) \to (eq nat (minus (plus O y) (S z0)) (plus (minus O (S z0)) y))) H3)) H1))]) in (H1 (refl_equal nat O))))) (\lambda (n: nat).(\lambda (_: (((le (S z0) n) \to (\forall (y: nat).(eq nat (minus (plus n y) (S z0)) (plus (minus n (S z0)) y)))))).(\lambda (H1: (le (S z0) (S n))).(\lambda (y: nat).(H n (le_S_n z0 n H1) y))))) x)))) z). + \lambda (z: nat).(nat_ind (\lambda (n: nat).(\forall (x: nat).((le n x) \to (\forall (y: nat).(eq nat (minus (plus x y) n) (plus (minus x n) y)))))) (\lambda (x: nat).(\lambda (H: (le O x)).(let H0 \def (match H return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n x) \to (\forall (y: nat).(eq nat (minus (plus x y) O) (plus (minus x O) y)))))) with [le_n \Rightarrow (\lambda (H0: (eq nat O x)).(eq_ind nat O (\lambda (n: nat).(\forall (y: nat).(eq nat (minus (plus n y) O) (plus (minus n O) y)))) (\lambda (y: nat).(sym_eq nat (plus (minus O O) y) (minus (plus O y) O) (minus_n_O (plus O y)))) x H0)) | (le_S m H0) \Rightarrow (\lambda (H1: (eq nat (S m) x)).(eq_ind nat (S m) (\lambda (n: nat).((le O m) \to (\forall (y: nat).(eq nat (minus (plus n y) O) (plus (minus n O) y))))) (\lambda (_: (le O m)).(\lambda (y: nat).(refl_equal nat (plus (minus (S m) O) y)))) x H1 H0))]) in (H0 (refl_equal nat x))))) (\lambda (z0: nat).(\lambda (H: ((\forall (x: nat).((le z0 x) \to (\forall (y: nat).(eq nat (minus (plus x y) z0) (plus (minus x z0) y))))))).(\lambda (x: nat).(nat_ind (\lambda (n: nat).((le (S z0) n) \to (\forall (y: nat).(eq nat (minus (plus n y) (S z0)) (plus (minus n (S z0)) y))))) (\lambda (H0: (le (S z0) O)).(\lambda (y: nat).(let H1 \def (match H0 return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to (eq nat (minus (plus O y) (S z0)) (plus (minus O (S z0)) y))))) with [le_n \Rightarrow (\lambda (H1: (eq nat (S z0) O)).(let H2 \def (eq_ind nat (S z0) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind (eq nat (minus (plus O y) (S z0)) (plus (minus O (S z0)) y)) H2))) | (le_S m H1) \Rightarrow (\lambda (H2: (eq nat (S m) O)).((let H3 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind ((le (S z0) m) \to (eq nat (minus (plus O y) (S z0)) (plus (minus O (S z0)) y))) H3)) H1))]) in (H1 (refl_equal nat O))))) (\lambda (n: nat).(\lambda (_: (((le (S z0) n) \to (\forall (y: nat).(eq nat (minus (plus n y) (S z0)) (plus (minus n (S z0)) y)))))).(\lambda (H1: (le (S z0) (S n))).(\lambda (y: nat).(H n (le_S_n z0 n H1) y))))) x)))) z). theorem le_minus: \forall (x: nat).(\forall (z: nat).(\forall (y: nat).((le (plus x y) z) \to (le x (minus z y))))) @@ -136,7 +136,7 @@ theorem simpl_lt_plus_r: theorem minus_x_Sy: \forall (x: nat).(\forall (y: nat).((lt y x) \to (eq nat (minus x y) (S (minus x (S y)))))) \def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((lt y n) \to (eq nat (minus n y) (S (minus n (S y))))))) (\lambda (y: nat).(\lambda (H: (lt y O)).(let H0 \def (match H return (\lambda (n: nat).(\lambda (_: (lt ? n)).((eq nat n O) \to (eq nat (minus O y) (S (minus O (S y))))))) with [le_n \Rightarrow (\lambda (H0: (eq nat (S y) O)).(let H1 \def (eq_ind nat (S y) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind (eq nat (minus O y) (S (minus O (S y)))) H1))) | (le_S m H0) \Rightarrow (\lambda (H1: (eq nat (S m) O)).((let H2 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind ((le (S y) m) \to (eq nat (minus O y) (S (minus O (S y))))) H2)) H0))]) in (H0 (refl_equal nat O))))) (\lambda (n: nat).(\lambda (H: ((\forall (y: nat).((lt y n) \to (eq nat (minus n y) (S (minus n (S y)))))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((lt n0 (S n)) \to (eq nat (minus (S n) n0) (S (minus (S n) (S n0)))))) (\lambda (_: (lt O (S n))).(eq_ind nat n (\lambda (n0: nat).(eq nat (S n) (S n0))) (refl_equal nat (S n)) (minus n O) (minus_n_O n))) (\lambda (n0: nat).(\lambda (_: (((lt n0 (S n)) \to (eq nat (minus (S n) n0) (S (minus (S n) (S n0))))))).(\lambda (H1: (lt (S n0) (S n))).(let H2 \def (le_S_n (S n0) n H1) in (H n0 H2))))) y)))) x). + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((lt y n) \to (eq nat (minus n y) (S (minus n (S y))))))) (\lambda (y: nat).(\lambda (H: (lt y O)).(let H0 \def (match H return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to (eq nat (minus O y) (S (minus O (S y))))))) with [le_n \Rightarrow (\lambda (H0: (eq nat (S y) O)).(let H1 \def (eq_ind nat (S y) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind (eq nat (minus O y) (S (minus O (S y)))) H1))) | (le_S m H0) \Rightarrow (\lambda (H1: (eq nat (S m) O)).((let H2 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind ((le (S y) m) \to (eq nat (minus O y) (S (minus O (S y))))) H2)) H0))]) in (H0 (refl_equal nat O))))) (\lambda (n: nat).(\lambda (H: ((\forall (y: nat).((lt y n) \to (eq nat (minus n y) (S (minus n (S y)))))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((lt n0 (S n)) \to (eq nat (minus (S n) n0) (S (minus (S n) (S n0)))))) (\lambda (_: (lt O (S n))).(eq_ind nat n (\lambda (n0: nat).(eq nat (S n) (S n0))) (refl_equal nat (S n)) (minus n O) (minus_n_O n))) (\lambda (n0: nat).(\lambda (_: (((lt n0 (S n)) \to (eq nat (minus (S n) n0) (S (minus (S n) (S n0))))))).(\lambda (H1: (lt (S n0) (S n))).(let H2 \def (le_S_n (S n0) n H1) in (H n0 H2))))) y)))) x). theorem lt_plus_minus: \forall (x: nat).(\forall (y: nat).((lt x y) \to (eq nat y (S (plus x (minus y (S x))))))) @@ -156,7 +156,7 @@ theorem minus_x_SO: theorem le_x_pred_y: \forall (y: nat).(\forall (x: nat).((lt x y) \to (le x (pred y)))) \def - \lambda (y: nat).(nat_ind (\lambda (n: nat).(\forall (x: nat).((lt x n) \to (le x (pred n))))) (\lambda (x: nat).(\lambda (H: (lt x O)).(let H0 \def (match H return (\lambda (n: nat).(\lambda (_: (lt ? n)).((eq nat n O) \to (le x O)))) with [le_n \Rightarrow (\lambda (H0: (eq nat (S x) O)).(let H1 \def (eq_ind nat (S x) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind (le x O) H1))) | (le_S m H0) \Rightarrow (\lambda (H1: (eq nat (S m) O)).((let H2 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind ((le (S x) m) \to (le x O)) H2)) H0))]) in (H0 (refl_equal nat O))))) (\lambda (n: nat).(\lambda (_: ((\forall (x: nat).((lt x n) \to (le x (pred n)))))).(\lambda (x: nat).(\lambda (H0: (lt x (S n))).(le_S_n x n H0))))) y). + \lambda (y: nat).(nat_ind (\lambda (n: nat).(\forall (x: nat).((lt x n) \to (le x (pred n))))) (\lambda (x: nat).(\lambda (H: (lt x O)).(let H0 \def (match H return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to (le x O)))) with [le_n \Rightarrow (\lambda (H0: (eq nat (S x) O)).(let H1 \def (eq_ind nat (S x) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind (le x O) H1))) | (le_S m H0) \Rightarrow (\lambda (H1: (eq nat (S m) O)).((let H2 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind ((le (S x) m) \to (le x O)) H2)) H0))]) in (H0 (refl_equal nat O))))) (\lambda (n: nat).(\lambda (_: ((\forall (x: nat).((lt x n) \to (le x (pred n)))))).(\lambda (x: nat).(\lambda (H0: (lt x (S n))).(le_S_n x n H0))))) y). theorem lt_le_minus: \forall (x: nat).(\forall (y: nat).((lt x y) \to (le x (minus y (S O))))) @@ -201,12 +201,12 @@ theorem arith0: theorem O_minus: \forall (x: nat).(\forall (y: nat).((le x y) \to (eq nat (minus x y) O))) \def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((le n y) \to (eq nat (minus n y) O)))) (\lambda (y: nat).(\lambda (_: (le O y)).(refl_equal nat O))) (\lambda (x0: nat).(\lambda (H: ((\forall (y: nat).((le x0 y) \to (eq nat (minus x0 y) O))))).(\lambda (y: nat).(nat_ind (\lambda (n: nat).((le (S x0) n) \to (eq nat (match n with [O \Rightarrow (S x0) | (S l) \Rightarrow (minus x0 l)]) O))) (\lambda (H0: (le (S x0) O)).(ex2_ind nat (\lambda (n: nat).(eq nat O (S n))) (\lambda (n: nat).(le x0 n)) (eq nat (S x0) O) (\lambda (x1: nat).(\lambda (H1: (eq nat O (S x1))).(\lambda (_: (le x0 x1)).(let H3 \def (eq_ind nat O (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x1) H1) in (False_ind (eq nat (S x0) O) H3))))) (le_gen_S x0 O H0))) (\lambda (n: nat).(\lambda (_: (((le (S x0) n) \to (eq nat (match n with [O \Rightarrow (S x0) | (S l) \Rightarrow (minus x0 l)]) O)))).(\lambda (H1: (le (S x0) (S n))).(H n (le_S_n x0 n H1))))) y)))) x). + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((le n y) \to (eq nat (minus n y) O)))) (\lambda (y: nat).(\lambda (_: (le O y)).(refl_equal nat O))) (\lambda (x0: nat).(\lambda (H: ((\forall (y: nat).((le x0 y) \to (eq nat (minus x0 y) O))))).(\lambda (y: nat).(nat_ind (\lambda (n: nat).((le (S x0) n) \to (eq nat (match n with [O \Rightarrow (S x0) | (S l) \Rightarrow (minus x0 l)]) O))) (\lambda (H0: (le (S x0) O)).(ex2_ind nat (\lambda (n: nat).(eq nat O (S n))) (\lambda (n: nat).(le x0 n)) (eq nat (S x0) O) (\lambda (x1: nat).(\lambda (H1: (eq nat O (S x1))).(\lambda (_: (le x0 x1)).(let H3 \def (eq_ind nat O (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x1) H1) in (False_ind (eq nat (S x0) O) H3))))) (le_gen_S x0 O H0))) (\lambda (n: nat).(\lambda (_: (((le (S x0) n) \to (eq nat (match n with [O \Rightarrow (S x0) | (S l) \Rightarrow (minus x0 l)]) O)))).(\lambda (H1: (le (S x0) (S n))).(H n (le_S_n x0 n H1))))) y)))) x). theorem minus_minus: \forall (z: nat).(\forall (x: nat).(\forall (y: nat).((le z x) \to ((le z y) \to ((eq nat (minus x z) (minus y z)) \to (eq nat x y)))))) \def - \lambda (z: nat).(nat_ind (\lambda (n: nat).(\forall (x: nat).(\forall (y: nat).((le n x) \to ((le n y) \to ((eq nat (minus x n) (minus y n)) \to (eq nat x y))))))) (\lambda (x: nat).(\lambda (y: nat).(\lambda (_: (le O x)).(\lambda (_: (le O y)).(\lambda (H1: (eq nat (minus x O) (minus y O))).(let H2 \def (eq_ind_r nat (minus x O) (\lambda (n: nat).(eq nat n (minus y O))) H1 x (minus_n_O x)) in (let H3 \def (eq_ind_r nat (minus y O) (\lambda (n: nat).(eq nat x n)) H2 y (minus_n_O y)) in H3))))))) (\lambda (z0: nat).(\lambda (IH: ((\forall (x: nat).(\forall (y: nat).((le z0 x) \to ((le z0 y) \to ((eq nat (minus x z0) (minus y z0)) \to (eq nat x y)))))))).(\lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((le (S z0) n) \to ((le (S z0) y) \to ((eq nat (minus n (S z0)) (minus y (S z0))) \to (eq nat n y)))))) (\lambda (y: nat).(\lambda (H: (le (S z0) O)).(\lambda (_: (le (S z0) y)).(\lambda (_: (eq nat (minus O (S z0)) (minus y (S z0)))).(ex2_ind nat (\lambda (n: nat).(eq nat O (S n))) (\lambda (n: nat).(le z0 n)) (eq nat O y) (\lambda (x0: nat).(\lambda (H2: (eq nat O (S x0))).(\lambda (_: (le z0 x0)).(let H4 \def (eq_ind nat O (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x0) H2) in (False_ind (eq nat O y) H4))))) (le_gen_S z0 O H)))))) (\lambda (x0: nat).(\lambda (_: ((\forall (y: nat).((le (S z0) x0) \to ((le (S z0) y) \to ((eq nat (minus x0 (S z0)) (minus y (S z0))) \to (eq nat x0 y))))))).(\lambda (y: nat).(nat_ind (\lambda (n: nat).((le (S z0) (S x0)) \to ((le (S z0) n) \to ((eq nat (minus (S x0) (S z0)) (minus n (S z0))) \to (eq nat (S x0) n))))) (\lambda (_: (le (S z0) (S x0))).(\lambda (H0: (le (S z0) O)).(\lambda (_: (eq nat (minus (S x0) (S z0)) (minus O (S z0)))).(ex2_ind nat (\lambda (n: nat).(eq nat O (S n))) (\lambda (n: nat).(le z0 n)) (eq nat (S x0) O) (\lambda (x1: nat).(\lambda (H2: (eq nat O (S x1))).(\lambda (_: (le z0 x1)).(let H4 \def (eq_ind nat O (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x1) H2) in (False_ind (eq nat (S x0) O) H4))))) (le_gen_S z0 O H0))))) (\lambda (y0: nat).(\lambda (_: (((le (S z0) (S x0)) \to ((le (S z0) y0) \to ((eq nat (minus (S x0) (S z0)) (minus y0 (S z0))) \to (eq nat (S x0) y0)))))).(\lambda (H: (le (S z0) (S x0))).(\lambda (H0: (le (S z0) (S y0))).(\lambda (H1: (eq nat (minus (S x0) (S z0)) (minus (S y0) (S z0)))).(f_equal nat nat S x0 y0 (IH x0 y0 (le_S_n z0 x0 H) (le_S_n z0 y0 H0) H1))))))) y)))) x)))) z). + \lambda (z: nat).(nat_ind (\lambda (n: nat).(\forall (x: nat).(\forall (y: nat).((le n x) \to ((le n y) \to ((eq nat (minus x n) (minus y n)) \to (eq nat x y))))))) (\lambda (x: nat).(\lambda (y: nat).(\lambda (_: (le O x)).(\lambda (_: (le O y)).(\lambda (H1: (eq nat (minus x O) (minus y O))).(let H2 \def (eq_ind_r nat (minus x O) (\lambda (n: nat).(eq nat n (minus y O))) H1 x (minus_n_O x)) in (let H3 \def (eq_ind_r nat (minus y O) (\lambda (n: nat).(eq nat x n)) H2 y (minus_n_O y)) in H3))))))) (\lambda (z0: nat).(\lambda (IH: ((\forall (x: nat).(\forall (y: nat).((le z0 x) \to ((le z0 y) \to ((eq nat (minus x z0) (minus y z0)) \to (eq nat x y)))))))).(\lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((le (S z0) n) \to ((le (S z0) y) \to ((eq nat (minus n (S z0)) (minus y (S z0))) \to (eq nat n y)))))) (\lambda (y: nat).(\lambda (H: (le (S z0) O)).(\lambda (_: (le (S z0) y)).(\lambda (_: (eq nat (minus O (S z0)) (minus y (S z0)))).(ex2_ind nat (\lambda (n: nat).(eq nat O (S n))) (\lambda (n: nat).(le z0 n)) (eq nat O y) (\lambda (x0: nat).(\lambda (H2: (eq nat O (S x0))).(\lambda (_: (le z0 x0)).(let H4 \def (eq_ind nat O (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x0) H2) in (False_ind (eq nat O y) H4))))) (le_gen_S z0 O H)))))) (\lambda (x0: nat).(\lambda (_: ((\forall (y: nat).((le (S z0) x0) \to ((le (S z0) y) \to ((eq nat (minus x0 (S z0)) (minus y (S z0))) \to (eq nat x0 y))))))).(\lambda (y: nat).(nat_ind (\lambda (n: nat).((le (S z0) (S x0)) \to ((le (S z0) n) \to ((eq nat (minus (S x0) (S z0)) (minus n (S z0))) \to (eq nat (S x0) n))))) (\lambda (_: (le (S z0) (S x0))).(\lambda (H0: (le (S z0) O)).(\lambda (_: (eq nat (minus (S x0) (S z0)) (minus O (S z0)))).(ex2_ind nat (\lambda (n: nat).(eq nat O (S n))) (\lambda (n: nat).(le z0 n)) (eq nat (S x0) O) (\lambda (x1: nat).(\lambda (H2: (eq nat O (S x1))).(\lambda (_: (le z0 x1)).(let H4 \def (eq_ind nat O (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x1) H2) in (False_ind (eq nat (S x0) O) H4))))) (le_gen_S z0 O H0))))) (\lambda (y0: nat).(\lambda (_: (((le (S z0) (S x0)) \to ((le (S z0) y0) \to ((eq nat (minus (S x0) (S z0)) (minus y0 (S z0))) \to (eq nat (S x0) y0)))))).(\lambda (H: (le (S z0) (S x0))).(\lambda (H0: (le (S z0) (S y0))).(\lambda (H1: (eq nat (minus (S x0) (S z0)) (minus (S y0) (S z0)))).(f_equal nat nat S x0 y0 (IH x0 y0 (le_S_n z0 x0 H) (le_S_n z0 y0 H0) H1))))))) y)))) x)))) z). theorem plus_plus: \forall (z: nat).(\forall (x1: nat).(\forall (x2: nat).(\forall (y1: nat).(\forall (y2: nat).((le x1 z) \to ((le x2 z) \to ((eq nat (plus (minus z x1) y1) (plus (minus z x2) y2)) \to (eq nat (plus x1 y2) (plus x2 y1))))))))) @@ -288,20 +288,20 @@ definition blt: theorem lt_blt: \forall (x: nat).(\forall (y: nat).((lt y x) \to (eq bool (blt y x) true))) \def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((lt y n) \to (eq bool (blt y n) true)))) (\lambda (y: nat).(\lambda (H: (lt y O)).(let H0 \def (match H return (\lambda (n: nat).(\lambda (_: (lt ? n)).((eq nat n O) \to (eq bool (blt y O) true)))) with [le_n \Rightarrow (\lambda (H0: (eq nat (S y) O)).(let H1 \def (eq_ind nat (S y) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind (eq bool (blt y O) true) H1))) | (le_S m H0) \Rightarrow (\lambda (H1: (eq nat (S m) O)).((let H2 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind ((le (S y) m) \to (eq bool (blt y O) true)) H2)) H0))]) in (H0 (refl_equal nat O))))) (\lambda (n: nat).(\lambda (H: ((\forall (y: nat).((lt y n) \to (eq bool (blt y n) true))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((lt n0 (S n)) \to (eq bool (blt n0 (S n)) true))) (\lambda (_: (lt O (S n))).(refl_equal bool true)) (\lambda (n0: nat).(\lambda (_: (((lt n0 (S n)) \to (eq bool (match n0 with [O \Rightarrow true | (S m) \Rightarrow (blt m n)]) true)))).(\lambda (H1: (lt (S n0) (S n))).(H n0 (le_S_n (S n0) n H1))))) y)))) x). + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((lt y n) \to (eq bool (blt y n) true)))) (\lambda (y: nat).(\lambda (H: (lt y O)).(let H0 \def (match H return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to (eq bool (blt y O) true)))) with [le_n \Rightarrow (\lambda (H0: (eq nat (S y) O)).(let H1 \def (eq_ind nat (S y) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind (eq bool (blt y O) true) H1))) | (le_S m H0) \Rightarrow (\lambda (H1: (eq nat (S m) O)).((let H2 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind ((le (S y) m) \to (eq bool (blt y O) true)) H2)) H0))]) in (H0 (refl_equal nat O))))) (\lambda (n: nat).(\lambda (H: ((\forall (y: nat).((lt y n) \to (eq bool (blt y n) true))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((lt n0 (S n)) \to (eq bool (blt n0 (S n)) true))) (\lambda (_: (lt O (S n))).(refl_equal bool true)) (\lambda (n0: nat).(\lambda (_: (((lt n0 (S n)) \to (eq bool (match n0 with [O \Rightarrow true | (S m) \Rightarrow (blt m n)]) true)))).(\lambda (H1: (lt (S n0) (S n))).(H n0 (le_S_n (S n0) n H1))))) y)))) x). theorem le_bge: \forall (x: nat).(\forall (y: nat).((le x y) \to (eq bool (blt y x) false))) \def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((le n y) \to (eq bool (blt y n) false)))) (\lambda (y: nat).(\lambda (_: (le O y)).(refl_equal bool false))) (\lambda (n: nat).(\lambda (H: ((\forall (y: nat).((le n y) \to (eq bool (blt y n) false))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((le (S n) n0) \to (eq bool (blt n0 (S n)) false))) (\lambda (H0: (le (S n) O)).(let H1 \def (match H0 return (\lambda (n0: nat).(\lambda (_: (le ? n0)).((eq nat n0 O) \to (eq bool (blt O (S n)) false)))) with [le_n \Rightarrow (\lambda (H1: (eq nat (S n) O)).(let H2 \def (eq_ind nat (S n) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind (eq bool (blt O (S n)) false) H2))) | (le_S m H1) \Rightarrow (\lambda (H2: (eq nat (S m) O)).((let H3 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind ((le (S n) m) \to (eq bool (blt O (S n)) false)) H3)) H1))]) in (H1 (refl_equal nat O)))) (\lambda (n0: nat).(\lambda (_: (((le (S n) n0) \to (eq bool (blt n0 (S n)) false)))).(\lambda (H1: (le (S n) (S n0))).(H n0 (le_S_n n n0 H1))))) y)))) x). + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((le n y) \to (eq bool (blt y n) false)))) (\lambda (y: nat).(\lambda (_: (le O y)).(refl_equal bool false))) (\lambda (n: nat).(\lambda (H: ((\forall (y: nat).((le n y) \to (eq bool (blt y n) false))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((le (S n) n0) \to (eq bool (blt n0 (S n)) false))) (\lambda (H0: (le (S n) O)).(let H1 \def (match H0 return (\lambda (n0: nat).(\lambda (_: (le ? n0)).((eq nat n0 O) \to (eq bool (blt O (S n)) false)))) with [le_n \Rightarrow (\lambda (H1: (eq nat (S n) O)).(let H2 \def (eq_ind nat (S n) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind (eq bool (blt O (S n)) false) H2))) | (le_S m H1) \Rightarrow (\lambda (H2: (eq nat (S m) O)).((let H3 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind ((le (S n) m) \to (eq bool (blt O (S n)) false)) H3)) H1))]) in (H1 (refl_equal nat O)))) (\lambda (n0: nat).(\lambda (_: (((le (S n) n0) \to (eq bool (blt n0 (S n)) false)))).(\lambda (H1: (le (S n) (S n0))).(H n0 (le_S_n n n0 H1))))) y)))) x). theorem blt_lt: \forall (x: nat).(\forall (y: nat).((eq bool (blt y x) true) \to (lt y x))) \def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((eq bool (blt y n) true) \to (lt y n)))) (\lambda (y: nat).(\lambda (H: (eq bool (blt y O) true)).(let H0 \def (match H return (\lambda (b: bool).(\lambda (_: (eq ? ? b)).((eq bool b true) \to (lt y O)))) with [refl_equal \Rightarrow (\lambda (H0: (eq bool (blt y O) true)).(let H1 \def (eq_ind bool (blt y O) (\lambda (e: bool).(match e return (\lambda (_: ?).Prop) with [true \Rightarrow False | false \Rightarrow True])) I true H0) in (False_ind (lt y O) H1)))]) in (H0 (refl_equal bool true))))) (\lambda (n: nat).(\lambda (H: ((\forall (y: nat).((eq bool (blt y n) true) \to (lt y n))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((eq bool (blt n0 (S n)) true) \to (lt n0 (S n)))) (\lambda (_: (eq bool true true)).(le_S_n (S O) (S n) (le_n_S (S O) (S n) (le_n_S O n (le_O_n n))))) (\lambda (n0: nat).(\lambda (_: (((eq bool (match n0 with [O \Rightarrow true | (S m) \Rightarrow (blt m n)]) true) \to (lt n0 (S n))))).(\lambda (H1: (eq bool (blt n0 n) true)).(lt_le_S (S n0) (S n) (lt_n_S n0 n (H n0 H1)))))) y)))) x). + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((eq bool (blt y n) true) \to (lt y n)))) (\lambda (y: nat).(\lambda (H: (eq bool (blt y O) true)).(let H0 \def (match H return (\lambda (b: bool).(\lambda (_: (eq ? ? b)).((eq bool b true) \to (lt y O)))) with [refl_equal \Rightarrow (\lambda (H0: (eq bool (blt y O) true)).(let H1 \def (eq_ind bool (blt y O) (\lambda (e: bool).(match e return (\lambda (_: bool).Prop) with [true \Rightarrow False | false \Rightarrow True])) I true H0) in (False_ind (lt y O) H1)))]) in (H0 (refl_equal bool true))))) (\lambda (n: nat).(\lambda (H: ((\forall (y: nat).((eq bool (blt y n) true) \to (lt y n))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((eq bool (blt n0 (S n)) true) \to (lt n0 (S n)))) (\lambda (_: (eq bool true true)).(le_S_n (S O) (S n) (le_n_S (S O) (S n) (le_n_S O n (le_O_n n))))) (\lambda (n0: nat).(\lambda (_: (((eq bool (match n0 with [O \Rightarrow true | (S m) \Rightarrow (blt m n)]) true) \to (lt n0 (S n))))).(\lambda (H1: (eq bool (blt n0 n) true)).(lt_le_S (S n0) (S n) (lt_n_S n0 n (H n0 H1)))))) y)))) x). theorem bge_le: \forall (x: nat).(\forall (y: nat).((eq bool (blt y x) false) \to (le x y))) \def - \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((eq bool (blt y n) false) \to (le n y)))) (\lambda (y: nat).(\lambda (_: (eq bool (blt y O) false)).(le_O_n y))) (\lambda (n: nat).(\lambda (H: ((\forall (y: nat).((eq bool (blt y n) false) \to (le n y))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((eq bool (blt n0 (S n)) false) \to (le (S n) n0))) (\lambda (H0: (eq bool (blt O (S n)) false)).(let H1 \def (match H0 return (\lambda (b: bool).(\lambda (_: (eq ? ? b)).((eq bool b false) \to (le (S n) O)))) with [refl_equal \Rightarrow (\lambda (H1: (eq bool (blt O (S n)) false)).(let H2 \def (eq_ind bool (blt O (S n)) (\lambda (e: bool).(match e return (\lambda (_: ?).Prop) with [true \Rightarrow True | false \Rightarrow False])) I false H1) in (False_ind (le (S n) O) H2)))]) in (H1 (refl_equal bool false)))) (\lambda (n0: nat).(\lambda (_: (((eq bool (blt n0 (S n)) false) \to (le (S n) n0)))).(\lambda (H1: (eq bool (blt (S n0) (S n)) false)).(le_S_n (S n) (S n0) (le_n_S (S n) (S n0) (le_n_S n n0 (H n0 H1))))))) y)))) x). + \lambda (x: nat).(nat_ind (\lambda (n: nat).(\forall (y: nat).((eq bool (blt y n) false) \to (le n y)))) (\lambda (y: nat).(\lambda (_: (eq bool (blt y O) false)).(le_O_n y))) (\lambda (n: nat).(\lambda (H: ((\forall (y: nat).((eq bool (blt y n) false) \to (le n y))))).(\lambda (y: nat).(nat_ind (\lambda (n0: nat).((eq bool (blt n0 (S n)) false) \to (le (S n) n0))) (\lambda (H0: (eq bool (blt O (S n)) false)).(let H1 \def (match H0 return (\lambda (b: bool).(\lambda (_: (eq ? ? b)).((eq bool b false) \to (le (S n) O)))) with [refl_equal \Rightarrow (\lambda (H1: (eq bool (blt O (S n)) false)).(let H2 \def (eq_ind bool (blt O (S n)) (\lambda (e: bool).(match e return (\lambda (_: bool).Prop) with [true \Rightarrow True | false \Rightarrow False])) I false H1) in (False_ind (le (S n) O) H2)))]) in (H1 (refl_equal bool false)))) (\lambda (n0: nat).(\lambda (_: (((eq bool (blt n0 (S n)) false) \to (le (S n) n0)))).(\lambda (H1: (eq bool (blt (S n0) (S n)) false)).(le_S_n (S n) (S n0) (le_n_S (S n) (S n0) (le_n_S n n0 (H n0 H1))))))) y)))) x). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-1.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-1.ma new file mode 100644 index 000000000..40ddd3d5a --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-1.ma @@ -0,0 +1,224 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta-1". + +include "Base.ma". + +inductive B: Set \def +| Abbr: B +| Abst: B +| Void: B. + +inductive F: Set \def +| Appl: F +| Cast: F. + +inductive K: Set \def +| Bind: B \to K +| Flat: F \to K. + +inductive T: Set \def +| TSort: nat \to T +| TLRef: nat \to T +| THead: K \to (T \to (T \to T)). + +inductive TList: Set \def +| TNil: TList +| TCons: T \to (TList \to TList). + +definition THeads: + K \to (TList \to (T \to T)) +\def + let rec THeads (k: K) (us: TList) on us: (T \to T) \def (\lambda (t: T).(match us with [TNil \Rightarrow t | (TCons u ul) \Rightarrow (THead k u (THeads k ul t))])) in THeads. + +definition s: + K \to (nat \to nat) +\def + \lambda (k: K).(\lambda (i: nat).(match k with [(Bind _) \Rightarrow (S i) | (Flat _) \Rightarrow i])). + +theorem not_abbr_abst: + not (eq B Abbr Abst) +\def + \lambda (H: (eq B Abbr Abst)).(let H0 \def (eq_ind B Abbr (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False])) I Abst H) in (False_ind False H0)). + +theorem not_void_abst: + not (eq B Void Abst) +\def + \lambda (H: (eq B Void Abst)).(let H0 \def (eq_ind B Void (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True])) I Abst H) in (False_ind False H0)). + +theorem terms_props__bind_dec: + \forall (b1: B).(\forall (b2: B).(or (eq B b1 b2) ((eq B b1 b2) \to (\forall (P: Prop).P)))) +\def + \lambda (b1: B).(B_ind (\lambda (b: B).(\forall (b2: B).(or (eq B b b2) ((eq B b b2) \to (\forall (P: Prop).P))))) (\lambda (b2: B).(B_ind (\lambda (b: B).(or (eq B Abbr b) ((eq B Abbr b) \to (\forall (P: Prop).P)))) (or_introl (eq B Abbr Abbr) ((eq B Abbr Abbr) \to (\forall (P: Prop).P)) (refl_equal B Abbr)) (or_intror (eq B Abbr Abst) ((eq B Abbr Abst) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abbr Abst)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abbr (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False])) I Abst H) in (False_ind P H0))))) (or_intror (eq B Abbr Void) ((eq B Abbr Void) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abbr Void)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abbr (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False])) I Void H) in (False_ind P H0))))) b2)) (\lambda (b2: B).(B_ind (\lambda (b: B).(or (eq B Abst b) ((eq B Abst b) \to (\forall (P: Prop).P)))) (or_intror (eq B Abst Abbr) ((eq B Abst Abbr) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abst Abbr)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abst (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False])) I Abbr H) in (False_ind P H0))))) (or_introl (eq B Abst Abst) ((eq B Abst Abst) \to (\forall (P: Prop).P)) (refl_equal B Abst)) (or_intror (eq B Abst Void) ((eq B Abst Void) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abst Void)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abst (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False])) I Void H) in (False_ind P H0))))) b2)) (\lambda (b2: B).(B_ind (\lambda (b: B).(or (eq B Void b) ((eq B Void b) \to (\forall (P: Prop).P)))) (or_intror (eq B Void Abbr) ((eq B Void Abbr) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Void Abbr)).(\lambda (P: Prop).(let H0 \def (eq_ind B Void (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True])) I Abbr H) in (False_ind P H0))))) (or_intror (eq B Void Abst) ((eq B Void Abst) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Void Abst)).(\lambda (P: Prop).(let H0 \def (eq_ind B Void (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True])) I Abst H) in (False_ind P H0))))) (or_introl (eq B Void Void) ((eq B Void Void) \to (\forall (P: Prop).P)) (refl_equal B Void)) b2)) b1). + +theorem terms_props__flat_dec: + \forall (f1: F).(\forall (f2: F).(or (eq F f1 f2) ((eq F f1 f2) \to (\forall (P: Prop).P)))) +\def + \lambda (f1: F).(F_ind (\lambda (f: F).(\forall (f2: F).(or (eq F f f2) ((eq F f f2) \to (\forall (P: Prop).P))))) (\lambda (f2: F).(F_ind (\lambda (f: F).(or (eq F Appl f) ((eq F Appl f) \to (\forall (P: Prop).P)))) (or_introl (eq F Appl Appl) ((eq F Appl Appl) \to (\forall (P: Prop).P)) (refl_equal F Appl)) (or_intror (eq F Appl Cast) ((eq F Appl Cast) \to (\forall (P: Prop).P)) (\lambda (H: (eq F Appl Cast)).(\lambda (P: Prop).(let H0 \def (eq_ind F Appl (\lambda (ee: F).(match ee return (\lambda (_: F).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])) I Cast H) in (False_ind P H0))))) f2)) (\lambda (f2: F).(F_ind (\lambda (f: F).(or (eq F Cast f) ((eq F Cast f) \to (\forall (P: Prop).P)))) (or_intror (eq F Cast Appl) ((eq F Cast Appl) \to (\forall (P: Prop).P)) (\lambda (H: (eq F Cast Appl)).(\lambda (P: Prop).(let H0 \def (eq_ind F Cast (\lambda (ee: F).(match ee return (\lambda (_: F).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])) I Appl H) in (False_ind P H0))))) (or_introl (eq F Cast Cast) ((eq F Cast Cast) \to (\forall (P: Prop).P)) (refl_equal F Cast)) f2)) f1). + +theorem terms_props__kind_dec: + \forall (k1: K).(\forall (k2: K).(or (eq K k1 k2) ((eq K k1 k2) \to (\forall (P: Prop).P)))) +\def + \lambda (k1: K).(K_ind (\lambda (k: K).(\forall (k2: K).(or (eq K k k2) ((eq K k k2) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (k2: K).(K_ind (\lambda (k: K).(or (eq K (Bind b) k) ((eq K (Bind b) k) \to (\forall (P: Prop).P)))) (\lambda (b0: B).(let H_x \def (terms_props__bind_dec b b0) in (let H \def H_x in (or_ind (eq B b b0) ((eq B b b0) \to (\forall (P: Prop).P)) (or (eq K (Bind b) (Bind b0)) ((eq K (Bind b) (Bind b0)) \to (\forall (P: Prop).P))) (\lambda (H0: (eq B b b0)).(eq_ind B b (\lambda (b1: B).(or (eq K (Bind b) (Bind b1)) ((eq K (Bind b) (Bind b1)) \to (\forall (P: Prop).P)))) (or_introl (eq K (Bind b) (Bind b)) ((eq K (Bind b) (Bind b)) \to (\forall (P: Prop).P)) (refl_equal K (Bind b))) b0 H0)) (\lambda (H0: (((eq B b b0) \to (\forall (P: Prop).P)))).(or_intror (eq K (Bind b) (Bind b0)) ((eq K (Bind b) (Bind b0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq K (Bind b) (Bind b0))).(\lambda (P: Prop).(let H2 \def (f_equal K B (\lambda (e: K).(match e return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])) (Bind b) (Bind b0) H1) in (let H3 \def (eq_ind_r B b0 (\lambda (b0: B).((eq B b b0) \to (\forall (P: Prop).P))) H0 b H2) in (H3 (refl_equal B b) P))))))) H)))) (\lambda (f: F).(or_intror (eq K (Bind b) (Flat f)) ((eq K (Bind b) (Flat f)) \to (\forall (P: Prop).P)) (\lambda (H: (eq K (Bind b) (Flat f))).(\lambda (P: Prop).(let H0 \def (eq_ind K (Bind b) (\lambda (ee: K).(match ee return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])) I (Flat f) H) in (False_ind P H0)))))) k2))) (\lambda (f: F).(\lambda (k2: K).(K_ind (\lambda (k: K).(or (eq K (Flat f) k) ((eq K (Flat f) k) \to (\forall (P: Prop).P)))) (\lambda (b: B).(or_intror (eq K (Flat f) (Bind b)) ((eq K (Flat f) (Bind b)) \to (\forall (P: Prop).P)) (\lambda (H: (eq K (Flat f) (Bind b))).(\lambda (P: Prop).(let H0 \def (eq_ind K (Flat f) (\lambda (ee: K).(match ee return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])) I (Bind b) H) in (False_ind P H0)))))) (\lambda (f0: F).(let H_x \def (terms_props__flat_dec f f0) in (let H \def H_x in (or_ind (eq F f f0) ((eq F f f0) \to (\forall (P: Prop).P)) (or (eq K (Flat f) (Flat f0)) ((eq K (Flat f) (Flat f0)) \to (\forall (P: Prop).P))) (\lambda (H0: (eq F f f0)).(eq_ind F f (\lambda (f1: F).(or (eq K (Flat f) (Flat f1)) ((eq K (Flat f) (Flat f1)) \to (\forall (P: Prop).P)))) (or_introl (eq K (Flat f) (Flat f)) ((eq K (Flat f) (Flat f)) \to (\forall (P: Prop).P)) (refl_equal K (Flat f))) f0 H0)) (\lambda (H0: (((eq F f f0) \to (\forall (P: Prop).P)))).(or_intror (eq K (Flat f) (Flat f0)) ((eq K (Flat f) (Flat f0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq K (Flat f) (Flat f0))).(\lambda (P: Prop).(let H2 \def (f_equal K F (\lambda (e: K).(match e return (\lambda (_: K).F) with [(Bind _) \Rightarrow f | (Flat f) \Rightarrow f])) (Flat f) (Flat f0) H1) in (let H3 \def (eq_ind_r F f0 (\lambda (f0: F).((eq F f f0) \to (\forall (P: Prop).P))) H0 f H2) in (H3 (refl_equal F f) P))))))) H)))) k2))) k1). + +theorem term_dec: + \forall (t1: T).(\forall (t2: T).(or (eq T t1 t2) ((eq T t1 t2) \to (\forall (P: Prop).P)))) +\def + \lambda (t1: T).(T_ind (\lambda (t: T).(\forall (t2: T).(or (eq T t t2) ((eq T t t2) \to (\forall (P: Prop).P))))) (\lambda (n: nat).(\lambda (t2: T).(T_ind (\lambda (t: T).(or (eq T (TSort n) t) ((eq T (TSort n) t) \to (\forall (P: Prop).P)))) (\lambda (n0: nat).(let H_x \def (nat_dec n n0) in (let H \def H_x in (or_ind (eq nat n n0) ((eq nat n n0) \to (\forall (P: Prop).P)) (or (eq T (TSort n) (TSort n0)) ((eq T (TSort n) (TSort n0)) \to (\forall (P: Prop).P))) (\lambda (H0: (eq nat n n0)).(eq_ind nat n (\lambda (n1: nat).(or (eq T (TSort n) (TSort n1)) ((eq T (TSort n) (TSort n1)) \to (\forall (P: Prop).P)))) (or_introl (eq T (TSort n) (TSort n)) ((eq T (TSort n) (TSort n)) \to (\forall (P: Prop).P)) (refl_equal T (TSort n))) n0 H0)) (\lambda (H0: (((eq nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TSort n) (TSort n0)) ((eq T (TSort n) (TSort n0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TSort n) (TSort n0))).(\lambda (P: Prop).(let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort n) \Rightarrow n | (TLRef _) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TSort n) (TSort n0) H1) in (let H3 \def (eq_ind_r nat n0 (\lambda (n0: nat).((eq nat n n0) \to (\forall (P: Prop).P))) H0 n H2) in (H3 (refl_equal nat n) P))))))) H)))) (\lambda (n0: nat).(or_intror (eq T (TSort n) (TLRef n0)) ((eq T (TSort n) (TLRef n0)) \to (\forall (P: Prop).P)) (\lambda (H: (eq T (TSort n) (TLRef n0))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef n0) H) in (False_ind P H0)))))) (\lambda (k: K).(\lambda (t: T).(\lambda (_: (or (eq T (TSort n) t) ((eq T (TSort n) t) \to (\forall (P: Prop).P)))).(\lambda (t0: T).(\lambda (_: (or (eq T (TSort n) t0) ((eq T (TSort n) t0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TSort n) (THead k t t0)) ((eq T (TSort n) (THead k t t0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TSort n) (THead k t t0))).(\lambda (P: Prop).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead k t t0) H1) in (False_ind P H2)))))))))) t2))) (\lambda (n: nat).(\lambda (t2: T).(T_ind (\lambda (t: T).(or (eq T (TLRef n) t) ((eq T (TLRef n) t) \to (\forall (P: Prop).P)))) (\lambda (n0: nat).(or_intror (eq T (TLRef n) (TSort n0)) ((eq T (TLRef n) (TSort n0)) \to (\forall (P: Prop).P)) (\lambda (H: (eq T (TLRef n) (TSort n0))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n0) H) in (False_ind P H0)))))) (\lambda (n0: nat).(let H_x \def (nat_dec n n0) in (let H \def H_x in (or_ind (eq nat n n0) ((eq nat n n0) \to (\forall (P: Prop).P)) (or (eq T (TLRef n) (TLRef n0)) ((eq T (TLRef n) (TLRef n0)) \to (\forall (P: Prop).P))) (\lambda (H0: (eq nat n n0)).(eq_ind nat n (\lambda (n1: nat).(or (eq T (TLRef n) (TLRef n1)) ((eq T (TLRef n) (TLRef n1)) \to (\forall (P: Prop).P)))) (or_introl (eq T (TLRef n) (TLRef n)) ((eq T (TLRef n) (TLRef n)) \to (\forall (P: Prop).P)) (refl_equal T (TLRef n))) n0 H0)) (\lambda (H0: (((eq nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TLRef n) (TLRef n0)) ((eq T (TLRef n) (TLRef n0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TLRef n) (TLRef n0))).(\lambda (P: Prop).(let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow n | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef n0) H1) in (let H3 \def (eq_ind_r nat n0 (\lambda (n0: nat).((eq nat n n0) \to (\forall (P: Prop).P))) H0 n H2) in (H3 (refl_equal nat n) P))))))) H)))) (\lambda (k: K).(\lambda (t: T).(\lambda (_: (or (eq T (TLRef n) t) ((eq T (TLRef n) t) \to (\forall (P: Prop).P)))).(\lambda (t0: T).(\lambda (_: (or (eq T (TLRef n) t0) ((eq T (TLRef n) t0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TLRef n) (THead k t t0)) ((eq T (TLRef n) (THead k t t0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TLRef n) (THead k t t0))).(\lambda (P: Prop).(let H2 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k t t0) H1) in (False_ind P H2)))))))))) t2))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: ((\forall (t2: T).(or (eq T t t2) ((eq T t t2) \to (\forall (P: Prop).P)))))).(\lambda (t0: T).(\lambda (H0: ((\forall (t2: T).(or (eq T t0 t2) ((eq T t0 t2) \to (\forall (P: Prop).P)))))).(\lambda (t2: T).(T_ind (\lambda (t3: T).(or (eq T (THead k t t0) t3) ((eq T (THead k t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(or_intror (eq T (THead k t t0) (TSort n)) ((eq T (THead k t t0) (TSort n)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (THead k t t0) (TSort n))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead k t t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H1) in (False_ind P H2)))))) (\lambda (n: nat).(or_intror (eq T (THead k t t0) (TLRef n)) ((eq T (THead k t t0) (TLRef n)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (THead k t t0) (TLRef n))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead k t t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind P H2)))))) (\lambda (k0: K).(\lambda (t3: T).(\lambda (H1: (or (eq T (THead k t t0) t3) ((eq T (THead k t t0) t3) \to (\forall (P: Prop).P)))).(\lambda (t4: T).(\lambda (H2: (or (eq T (THead k t t0) t4) ((eq T (THead k t t0) t4) \to (\forall (P: Prop).P)))).(let H_x \def (H t3) in (let H3 \def H_x in (or_ind (eq T t t3) ((eq T t t3) \to (\forall (P: Prop).P)) (or (eq T (THead k t t0) (THead k0 t3 t4)) ((eq T (THead k t t0) (THead k0 t3 t4)) \to (\forall (P: Prop).P))) (\lambda (H4: (eq T t t3)).(let H5 \def (eq_ind_r T t3 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H1 t H4) in (eq_ind T t (\lambda (t5: T).(or (eq T (THead k t t0) (THead k0 t5 t4)) ((eq T (THead k t t0) (THead k0 t5 t4)) \to (\forall (P: Prop).P)))) (let H_x0 \def (H0 t4) in (let H6 \def H_x0 in (or_ind (eq T t0 t4) ((eq T t0 t4) \to (\forall (P: Prop).P)) (or (eq T (THead k t t0) (THead k0 t t4)) ((eq T (THead k t t0) (THead k0 t t4)) \to (\forall (P: Prop).P))) (\lambda (H7: (eq T t0 t4)).(let H8 \def (eq_ind_r T t4 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H2 t0 H7) in (eq_ind T t0 (\lambda (t5: T).(or (eq T (THead k t t0) (THead k0 t t5)) ((eq T (THead k t t0) (THead k0 t t5)) \to (\forall (P: Prop).P)))) (let H_x1 \def (terms_props__kind_dec k k0) in (let H9 \def H_x1 in (or_ind (eq K k k0) ((eq K k k0) \to (\forall (P: Prop).P)) (or (eq T (THead k t t0) (THead k0 t t0)) ((eq T (THead k t t0) (THead k0 t t0)) \to (\forall (P: Prop).P))) (\lambda (H10: (eq K k k0)).(eq_ind K k (\lambda (k1: K).(or (eq T (THead k t t0) (THead k1 t t0)) ((eq T (THead k t t0) (THead k1 t t0)) \to (\forall (P: Prop).P)))) (or_introl (eq T (THead k t t0) (THead k t t0)) ((eq T (THead k t t0) (THead k t t0)) \to (\forall (P: Prop).P)) (refl_equal T (THead k t t0))) k0 H10)) (\lambda (H10: (((eq K k k0) \to (\forall (P: Prop).P)))).(or_intror (eq T (THead k t t0) (THead k0 t t0)) ((eq T (THead k t t0) (THead k0 t t0)) \to (\forall (P: Prop).P)) (\lambda (H11: (eq T (THead k t t0) (THead k0 t t0))).(\lambda (P: Prop).(let H12 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k t t0) (THead k0 t t0) H11) in (let H13 \def (eq_ind_r K k0 (\lambda (k0: K).((eq K k k0) \to (\forall (P: Prop).P))) H10 k H12) in (H13 (refl_equal K k) P))))))) H9))) t4 H7))) (\lambda (H7: (((eq T t0 t4) \to (\forall (P: Prop).P)))).(or_intror (eq T (THead k t t0) (THead k0 t t4)) ((eq T (THead k t t0) (THead k0 t t4)) \to (\forall (P: Prop).P)) (\lambda (H8: (eq T (THead k t t0) (THead k0 t t4))).(\lambda (P: Prop).(let H9 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k t t0) (THead k0 t t4) H8) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k t t0) (THead k0 t t4) H8) in (\lambda (_: (eq K k k0)).(let H12 \def (eq_ind_r T t4 (\lambda (t: T).((eq T t0 t) \to (\forall (P: Prop).P))) H7 t0 H10) in (let H13 \def (eq_ind_r T t4 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H2 t0 H10) in (H12 (refl_equal T t0) P))))) H9)))))) H6))) t3 H4))) (\lambda (H4: (((eq T t t3) \to (\forall (P: Prop).P)))).(or_intror (eq T (THead k t t0) (THead k0 t3 t4)) ((eq T (THead k t t0) (THead k0 t3 t4)) \to (\forall (P: Prop).P)) (\lambda (H5: (eq T (THead k t t0) (THead k0 t3 t4))).(\lambda (P: Prop).(let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k t t0) (THead k0 t3 t4) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead k t t0) (THead k0 t3 t4) H5) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k t t0) (THead k0 t3 t4) H5) in (\lambda (H9: (eq T t t3)).(\lambda (_: (eq K k k0)).(let H11 \def (eq_ind_r T t4 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H2 t0 H8) in (let H12 \def (eq_ind_r T t3 (\lambda (t0: T).((eq T t t0) \to (\forall (P: Prop).P))) H4 t H9) in (let H13 \def (eq_ind_r T t3 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H1 t H9) in (H12 (refl_equal T t) P))))))) H7)) H6)))))) H3)))))))) t2))))))) t1). + +theorem binder_dec: + \forall (t: T).(or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))) (\lambda (n: nat).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (TSort n) (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (TSort n) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(\lambda (H: (eq T (TSort n) (THead (Bind b) w u))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) w u) H) in (False_ind P H0))))))))) (\lambda (n: nat).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (TLRef n) (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (TLRef n) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(\lambda (H: (eq T (TLRef n) (THead (Bind b) w u))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) w u) H) in (False_ind P H0))))))))) (\lambda (k: K).(match k return (\lambda (k0: K).(\forall (t0: T).((or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (\forall (t1: T).((or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead k0 t0 t1) (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (THead k0 t0 t1) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))))))) with [(Bind b) \Rightarrow (\lambda (t0: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(or_introl (ex_3 B T T (\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u)))))) (\forall (b0: B).(\forall (w: T).(\forall (u: T).((eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u)) \to (\forall (P: Prop).P))))) (ex_3_intro B T T (\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u))))) b t0 t1 (refl_equal T (THead (Bind b) t0 t1)))))))) | (Flat f) \Rightarrow (\lambda (t0: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Flat f) t0 t1) (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (THead (Flat f) t0 t1) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(\lambda (H1: (eq T (THead (Flat f) t0 t1) (THead (Bind b) w u))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead (Flat f) t0 t1) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) w u) H1) in (False_ind P H2))))))))))))])) t). + +theorem abst_dec: + \forall (u: T).(\forall (v: T).(or (ex T (\lambda (t: T).(eq T u (THead (Bind Abst) v t)))) (\forall (t: T).((eq T u (THead (Bind Abst) v t)) \to (\forall (P: Prop).P))))) +\def + \lambda (u: T).(match u return (\lambda (t: T).(\forall (v: T).(or (ex T (\lambda (t0: T).(eq T t (THead (Bind Abst) v t0)))) (\forall (t0: T).((eq T t (THead (Bind Abst) v t0)) \to (\forall (P: Prop).P)))))) with [(TSort n) \Rightarrow (\lambda (v: T).(or_intror (ex T (\lambda (t: T).(eq T (TSort n) (THead (Bind Abst) v t)))) (\forall (t: T).((eq T (TSort n) (THead (Bind Abst) v t)) \to (\forall (P: Prop).P))) (\lambda (t: T).(\lambda (H: (eq T (TSort n) (THead (Bind Abst) v t))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) v t) H) in (False_ind P H0))))))) | (TLRef n) \Rightarrow (\lambda (v: T).(or_intror (ex T (\lambda (t: T).(eq T (TLRef n) (THead (Bind Abst) v t)))) (\forall (t: T).((eq T (TLRef n) (THead (Bind Abst) v t)) \to (\forall (P: Prop).P))) (\lambda (t: T).(\lambda (H: (eq T (TLRef n) (THead (Bind Abst) v t))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) v t) H) in (False_ind P H0))))))) | (THead k t t0) \Rightarrow (\lambda (v: T).(let H_x \def (terms_props__kind_dec k (Bind Abst)) in (let H \def H_x in (or_ind (eq K k (Bind Abst)) ((eq K k (Bind Abst)) \to (\forall (P: Prop).P)) (or (ex T (\lambda (t1: T).(eq T (THead k t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P)))) (\lambda (H0: (eq K k (Bind Abst))).(eq_ind_r K (Bind Abst) (\lambda (k0: K).(or (ex T (\lambda (t1: T).(eq T (THead k0 t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k0 t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))))) (let H_x0 \def (term_dec t v) in (let H1 \def H_x0 in (or_ind (eq T t v) ((eq T t v) \to (\forall (P: Prop).P)) (or (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P)))) (\lambda (H2: (eq T t v)).(eq_ind T t (\lambda (t1: T).(or (ex T (\lambda (t2: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t1 t2)))) (\forall (t2: T).((eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t1 t2)) \to (\forall (P: Prop).P))))) (or_introl (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t t1)) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t t1))) t0 (refl_equal T (THead (Bind Abst) t t0)))) v H2)) (\lambda (H2: (((eq T t v) \to (\forall (P: Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))) (\lambda (t1: T).(\lambda (H3: (eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1))).(\lambda (P: Prop).(let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead (Bind Abst) t t0) (THead (Bind Abst) v t1) H3) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abst) t t0) (THead (Bind Abst) v t1) H3) in (\lambda (H6: (eq T t v)).(H2 H6 P))) H4))))))) H1))) k H0)) (\lambda (H0: (((eq K k (Bind Abst)) \to (\forall (P: Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead k t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))) (\lambda (t1: T).(\lambda (H1: (eq T (THead k t t0) (THead (Bind Abst) v t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k t t0) (THead (Bind Abst) v t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead k t t0) (THead (Bind Abst) v t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k t t0) (THead (Bind Abst) v t1) H1) in (\lambda (_: (eq T t v)).(\lambda (H6: (eq K k (Bind Abst))).(H0 H6 P)))) H3)) H2))))))) H))))]). + +theorem thead_x_y_y: + \forall (k: K).(\forall (v: T).(\forall (t: T).((eq T (THead k v t) t) \to (\forall (P: Prop).P)))) +\def + \lambda (k: K).(\lambda (v: T).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (THead k v t0) t0) \to (\forall (P: Prop).P))) (\lambda (n: nat).(\lambda (H: (eq T (THead k v (TSort n)) (TSort n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (TSort n)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H) in (False_ind P H0))))) (\lambda (n: nat).(\lambda (H: (eq T (THead k v (TLRef n)) (TLRef n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (TLRef n)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H) in (False_ind P H0))))) (\lambda (k0: K).(\lambda (t0: T).(\lambda (_: (((eq T (THead k v t0) t0) \to (\forall (P: Prop).P)))).(\lambda (t1: T).(\lambda (H0: (((eq T (THead k v t1) t1) \to (\forall (P: Prop).P)))).(\lambda (H1: (eq T (THead k v (THead k0 t0 t1)) (THead k0 t0 t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v | (TLRef _) \Rightarrow v | (THead _ t _) \Rightarrow t])) (THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead k0 t0 t1) | (TLRef _) \Rightarrow (THead k0 t0 t1) | (THead _ _ t) \Rightarrow t])) (THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in (\lambda (H5: (eq T v t0)).(\lambda (H6: (eq K k k0)).(let H7 \def (eq_ind T v (\lambda (t: T).((eq T (THead k t t1) t1) \to (\forall (P: Prop).P))) H0 t0 H5) in (let H8 \def (eq_ind K k (\lambda (k: K).((eq T (THead k t0 t1) t1) \to (\forall (P: Prop).P))) H7 k0 H6) in (H8 H4 P)))))) H3)) H2))))))))) t))). + +theorem s_S: + \forall (k: K).(\forall (i: nat).(eq nat (s k (S i)) (S (s k i)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(eq nat (s k0 (S i)) (S (s k0 i))))) (\lambda (b: B).(\lambda (i: nat).(refl_equal nat (S (s (Bind b) i))))) (\lambda (f: F).(\lambda (i: nat).(refl_equal nat (S (s (Flat f) i))))) k). + +theorem s_plus: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (s k (plus i j)) (plus (s k i) j)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: nat).(eq nat (s k0 (plus i j)) (plus (s k0 i) j))))) (\lambda (b: B).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (plus (s (Bind b) i) j))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (plus (s (Flat f) i) j))))) k). + +theorem s_plus_sym: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (s k (plus i j)) (plus i (s k j))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: nat).(eq nat (s k0 (plus i j)) (plus i (s k0 j)))))) (\lambda (_: B).(\lambda (i: nat).(\lambda (j: nat).(eq_ind_r nat (plus i (S j)) (\lambda (n: nat).(eq nat n (plus i (S j)))) (refl_equal nat (plus i (S j))) (S (plus i j)) (plus_n_Sm i j))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (plus i (s (Flat f) j)))))) k). + +theorem s_minus: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).((le j i) \to (eq nat (s k (minus i j)) (minus (s k i) j))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: nat).((le j i) \to (eq nat (s k0 (minus i j)) (minus (s k0 i) j)))))) (\lambda (_: B).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (le j i)).(eq_ind_r nat (minus (S i) j) (\lambda (n: nat).(eq nat n (minus (S i) j))) (refl_equal nat (minus (S i) j)) (S (minus i j)) (minus_Sn_m i j H)))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(\lambda (_: (le j i)).(refl_equal nat (minus (s (Flat f) i) j)))))) k). + +theorem minus_s_s: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (minus (s k i) (s k j)) (minus i j)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: nat).(eq nat (minus (s k0 i) (s k0 j)) (minus i j))))) (\lambda (_: B).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (minus i j))))) (\lambda (_: F).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (minus i j))))) k). + +theorem s_le: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).((le i j) \to (le (s k i) (s k j))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: nat).((le i j) \to (le (s k0 i) (s k0 j)))))) (\lambda (_: B).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (le i j)).(le_S_n (S i) (S j) (lt_le_S (S i) (S (S j)) (lt_n_S i (S j) (le_lt_n_Sm i j H)))))))) (\lambda (_: F).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (le i j)).H)))) k). + +theorem s_lt: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).((lt i j) \to (lt (s k i) (s k j))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: nat).((lt i j) \to (lt (s k0 i) (s k0 j)))))) (\lambda (_: B).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (lt i j)).(le_S_n (S (S i)) (S j) (le_n_S (S (S i)) (S j) (le_n_S (S i) j H))))))) (\lambda (_: F).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (lt i j)).H)))) k). + +theorem s_inj: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).((eq nat (s k i) (s k j)) \to (eq nat i j)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: nat).((eq nat (s k0 i) (s k0 j)) \to (eq nat i j))))) (\lambda (b: B).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (eq nat (s (Bind b) i) (s (Bind b) j))).(eq_add_S i j H))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(\lambda (H: (eq nat (s (Flat f) i) (s (Flat f) j))).H)))) k). + +theorem s_arith0: + \forall (k: K).(\forall (i: nat).(eq nat (minus (s k i) (s k O)) i)) +\def + \lambda (k: K).(\lambda (i: nat).(eq_ind_r nat (minus i O) (\lambda (n: nat).(eq nat n i)) (eq_ind nat i (\lambda (n: nat).(eq nat n i)) (refl_equal nat i) (minus i O) (minus_n_O i)) (minus (s k i) (s k O)) (minus_s_s k i O))). + +theorem s_arith1: + \forall (b: B).(\forall (i: nat).(eq nat (minus (s (Bind b) i) (S O)) i)) +\def + \lambda (_: B).(\lambda (i: nat).(eq_ind nat i (\lambda (n: nat).(eq nat n i)) (refl_equal nat i) (minus i O) (minus_n_O i))). + +definition wadd: + ((nat \to nat)) \to (nat \to (nat \to nat)) +\def + \lambda (f: ((nat \to nat))).(\lambda (w: nat).(\lambda (n: nat).(match n with [O \Rightarrow w | (S m) \Rightarrow (f m)]))). + +definition weight_map: + ((nat \to nat)) \to (T \to nat) +\def + let rec weight_map (f: ((nat \to nat))) (t: T) on t: nat \def (match t with [(TSort _) \Rightarrow O | (TLRef n) \Rightarrow (f n) | (THead k u t0) \Rightarrow (match k with [(Bind b) \Rightarrow (match b with [Abbr \Rightarrow (S (plus (weight_map f u) (weight_map (wadd f (S (weight_map f u))) t0))) | Abst \Rightarrow (S (plus (weight_map f u) (weight_map (wadd f O) t0))) | Void \Rightarrow (S (plus (weight_map f u) (weight_map (wadd f O) t0)))]) | (Flat _) \Rightarrow (S (plus (weight_map f u) (weight_map f t0)))])]) in weight_map. + +definition weight: + T \to nat +\def + weight_map (\lambda (_: nat).O). + +definition tlt: + T \to (T \to Prop) +\def + \lambda (t1: T).(\lambda (t2: T).(lt (weight t1) (weight t2))). + +theorem wadd_le: + \forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (\forall (v: nat).(\forall (w: nat).((le v w) \to (\forall (n: nat).(le (wadd f v n) (wadd g w n)))))))) +\def + \lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H: ((\forall (n: nat).(le (f n) (g n))))).(\lambda (v: nat).(\lambda (w: nat).(\lambda (H0: (le v w)).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(le (wadd f v n0) (wadd g w n0))) H0 (\lambda (n0: nat).(\lambda (_: (le (wadd f v n0) (wadd g w n0))).(H n0))) n))))))). + +theorem wadd_lt: + \forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (\forall (v: nat).(\forall (w: nat).((lt v w) \to (\forall (n: nat).(le (wadd f v n) (wadd g w n)))))))) +\def + \lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H: ((\forall (n: nat).(le (f n) (g n))))).(\lambda (v: nat).(\lambda (w: nat).(\lambda (H0: (lt v w)).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(le (wadd f v n0) (wadd g w n0))) (le_S_n v w (le_S (S v) w H0)) (\lambda (n0: nat).(\lambda (_: (le (wadd f v n0) (wadd g w n0))).(H n0))) n))))))). + +theorem wadd_O: + \forall (n: nat).(eq nat (wadd (\lambda (_: nat).O) O n) O) +\def + \lambda (n: nat).(nat_ind (\lambda (n0: nat).(eq nat (wadd (\lambda (_: nat).O) O n0) O)) (refl_equal nat O) (\lambda (n0: nat).(\lambda (_: (eq nat (wadd (\lambda (_: nat).O) O n0) O)).(refl_equal nat O))) n). + +theorem weight_le: + \forall (t: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t) (weight_map g t))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t0) (weight_map g t0)))))) (\lambda (n: nat).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (_: ((\forall (n: nat).(le (f n) (g n))))).(le_n (weight_map g (TSort n))))))) (\lambda (n: nat).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H: ((\forall (n: nat).(le (f n) (g n))))).(H n))))) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t0: T).(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t0) (weight_map g t0)))))) \to (\forall (t1: T).(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t1) (weight_map g t1)))))) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f (THead k0 t0 t1)) (weight_map g (THead k0 t0 t1))))))))))) (\lambda (b: B).(B_ind (\lambda (b0: B).(\forall (t0: T).(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t0) (weight_map g t0)))))) \to (\forall (t1: T).(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t1) (weight_map g t1)))))) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (match b0 with [Abbr \Rightarrow (S (plus (weight_map f t0) (weight_map (wadd f (S (weight_map f t0))) t1))) | Abst \Rightarrow (S (plus (weight_map f t0) (weight_map (wadd f O) t1))) | Void \Rightarrow (S (plus (weight_map f t0) (weight_map (wadd f O) t1)))]) (match b0 with [Abbr \Rightarrow (S (plus (weight_map g t0) (weight_map (wadd g (S (weight_map g t0))) t1))) | Abst \Rightarrow (S (plus (weight_map g t0) (weight_map (wadd g O) t1))) | Void \Rightarrow (S (plus (weight_map g t0) (weight_map (wadd g O) t1)))])))))))))) (\lambda (t0: T).(\lambda (H: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t0) (weight_map g t0))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t1) (weight_map g t1))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H1: ((\forall (n: nat).(le (f n) (g n))))).(le_n_S (plus (weight_map f t0) (weight_map (wadd f (S (weight_map f t0))) t1)) (plus (weight_map g t0) (weight_map (wadd g (S (weight_map g t0))) t1)) (plus_le_compat (weight_map f t0) (weight_map g t0) (weight_map (wadd f (S (weight_map f t0))) t1) (weight_map (wadd g (S (weight_map g t0))) t1) (H f g H1) (H0 (wadd f (S (weight_map f t0))) (wadd g (S (weight_map g t0))) (\lambda (n: nat).(wadd_le f g H1 (S (weight_map f t0)) (S (weight_map g t0)) (le_n_S (weight_map f t0) (weight_map g t0) (H f g H1)) n)))))))))))) (\lambda (t0: T).(\lambda (H: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t0) (weight_map g t0))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t1) (weight_map g t1))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H1: ((\forall (n: nat).(le (f n) (g n))))).(le_S_n (S (plus (weight_map f t0) (weight_map (wadd f O) t1))) (S (plus (weight_map g t0) (weight_map (wadd g O) t1))) (le_n_S (S (plus (weight_map f t0) (weight_map (wadd f O) t1))) (S (plus (weight_map g t0) (weight_map (wadd g O) t1))) (le_n_S (plus (weight_map f t0) (weight_map (wadd f O) t1)) (plus (weight_map g t0) (weight_map (wadd g O) t1)) (plus_le_compat (weight_map f t0) (weight_map g t0) (weight_map (wadd f O) t1) (weight_map (wadd g O) t1) (H f g H1) (H0 (wadd f O) (wadd g O) (\lambda (n: nat).(wadd_le f g H1 O O (le_n O) n)))))))))))))) (\lambda (t0: T).(\lambda (H: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t0) (weight_map g t0))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t1) (weight_map g t1))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H1: ((\forall (n: nat).(le (f n) (g n))))).(le_S_n (S (plus (weight_map f t0) (weight_map (wadd f O) t1))) (S (plus (weight_map g t0) (weight_map (wadd g O) t1))) (le_n_S (S (plus (weight_map f t0) (weight_map (wadd f O) t1))) (S (plus (weight_map g t0) (weight_map (wadd g O) t1))) (le_n_S (plus (weight_map f t0) (weight_map (wadd f O) t1)) (plus (weight_map g t0) (weight_map (wadd g O) t1)) (plus_le_compat (weight_map f t0) (weight_map g t0) (weight_map (wadd f O) t1) (weight_map (wadd g O) t1) (H f g H1) (H0 (wadd f O) (wadd g O) (\lambda (n: nat).(wadd_le f g H1 O O (le_n O) n)))))))))))))) b)) (\lambda (_: F).(\lambda (t0: T).(\lambda (H: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t0) (weight_map g t0))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(le (f n) (g n)))) \to (le (weight_map f t1) (weight_map g t1))))))).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H1: ((\forall (n: nat).(le (f0 n) (g n))))).(lt_le_S (plus (weight_map f0 t0) (weight_map f0 t1)) (S (plus (weight_map g t0) (weight_map g t1))) (le_lt_n_Sm (plus (weight_map f0 t0) (weight_map f0 t1)) (plus (weight_map g t0) (weight_map g t1)) (plus_le_compat (weight_map f0 t0) (weight_map g t0) (weight_map f0 t1) (weight_map g t1) (H f0 g H1) (H0 f0 g H1)))))))))))) k)) t). + +theorem weight_eq: + \forall (t: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (n: nat).(eq nat (f n) (g n)))) \to (eq nat (weight_map f t) (weight_map g t))))) +\def + \lambda (t: T).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H: ((\forall (n: nat).(eq nat (f n) (g n))))).(le_antisym (weight_map f t) (weight_map g t) (weight_le t f g (\lambda (n: nat).(eq_ind_r nat (g n) (\lambda (n0: nat).(le n0 (g n))) (le_n (g n)) (f n) (H n)))) (weight_le t g f (\lambda (n: nat).(eq_ind_r nat (g n) (\lambda (n0: nat).(le (g n) n0)) (le_n (g n)) (f n) (H n)))))))). + +theorem weight_add_O: + \forall (t: T).(eq nat (weight_map (wadd (\lambda (_: nat).O) O) t) (weight_map (\lambda (_: nat).O) t)) +\def + \lambda (t: T).(weight_eq t (wadd (\lambda (_: nat).O) O) (\lambda (_: nat).O) (\lambda (n: nat).(wadd_O n))). + +theorem weight_add_S: + \forall (t: T).(\forall (m: nat).(le (weight_map (wadd (\lambda (_: nat).O) O) t) (weight_map (wadd (\lambda (_: nat).O) (S m)) t))) +\def + \lambda (t: T).(\lambda (m: nat).(weight_le t (wadd (\lambda (_: nat).O) O) (wadd (\lambda (_: nat).O) (S m)) (\lambda (n: nat).(le_S_n (wadd (\lambda (_: nat).O) O n) (wadd (\lambda (_: nat).O) (S m) n) (le_n_S (wadd (\lambda (_: nat).O) O n) (wadd (\lambda (_: nat).O) (S m) n) (wadd_le (\lambda (_: nat).O) (\lambda (_: nat).O) (\lambda (_: nat).(le_n O)) O (S m) (le_O_n (S m)) n)))))). + +theorem tlt_trans: + \forall (v: T).(\forall (u: T).(\forall (t: T).((tlt u v) \to ((tlt v t) \to (tlt u t))))) +\def + \lambda (v: T).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (lt (weight u) (weight v))).(\lambda (H0: (lt (weight v) (weight t))).(lt_trans (weight u) (weight v) (weight t) H H0))))). + +theorem tlt_head_sx: + \forall (k: K).(\forall (u: T).(\forall (t: T).(tlt u (THead k u t)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (t: T).(lt (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) (THead k0 u t)))))) (\lambda (b: B).(B_ind (\lambda (b0: B).(\forall (u: T).(\forall (t: T).(lt (weight_map (\lambda (_: nat).O) u) (match b0 with [Abbr \Rightarrow (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))) | Abst \Rightarrow (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t))) | Void \Rightarrow (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t)))]))))) (\lambda (u: T).(\lambda (t: T).(le_S_n (S (weight_map (\lambda (_: nat).O) u)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))) (le_n_S (S (weight_map (\lambda (_: nat).O) u)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))) (le_n_S (weight_map (\lambda (_: nat).O) u) (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t)) (le_plus_l (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))))))) (\lambda (u: T).(\lambda (t: T).(le_S_n (S (weight_map (\lambda (_: nat).O) u)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t))) (le_n_S (S (weight_map (\lambda (_: nat).O) u)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t))) (le_n_S (weight_map (\lambda (_: nat).O) u) (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t)) (le_plus_l (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t))))))) (\lambda (u: T).(\lambda (t: T).(le_S_n (S (weight_map (\lambda (_: nat).O) u)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t))) (le_n_S (S (weight_map (\lambda (_: nat).O) u)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t))) (le_n_S (weight_map (\lambda (_: nat).O) u) (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t)) (le_plus_l (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t))))))) b)) (\lambda (_: F).(\lambda (u: T).(\lambda (t: T).(le_S_n (S (weight_map (\lambda (_: nat).O) u)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t))) (le_n_S (S (weight_map (\lambda (_: nat).O) u)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t))) (le_n_S (weight_map (\lambda (_: nat).O) u) (plus (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t)) (le_plus_l (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t)))))))) k). + +theorem tlt_head_dx: + \forall (k: K).(\forall (u: T).(\forall (t: T).(tlt t (THead k u t)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (t: T).(lt (weight_map (\lambda (_: nat).O) t) (weight_map (\lambda (_: nat).O) (THead k0 u t)))))) (\lambda (b: B).(B_ind (\lambda (b0: B).(\forall (u: T).(\forall (t: T).(lt (weight_map (\lambda (_: nat).O) t) (match b0 with [Abbr \Rightarrow (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))) | Abst \Rightarrow (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t))) | Void \Rightarrow (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) O) t)))]))))) (\lambda (u: T).(\lambda (t: T).(lt_le_trans (weight_map (\lambda (_: nat).O) t) (S (weight_map (\lambda (_: nat).O) t)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))) (lt_n_Sn (weight_map (\lambda (_: nat).O) t)) (le_n_S (weight_map (\lambda (_: nat).O) t) (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t)) (le_trans (weight_map (\lambda (_: nat).O) t) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t) (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t)) (eq_ind nat (weight_map (wadd (\lambda (_: nat).O) O) t) (\lambda (n: nat).(le n (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))) (weight_add_S t (weight_map (\lambda (_: nat).O) u)) (weight_map (\lambda (_: nat).O) t) (weight_add_O t)) (le_plus_r (weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t))))))) (\lambda (u: T).(\lambda (t: T).(eq_ind_r nat (weight_map (\lambda (_: nat).O) t) (\lambda (n: nat).(lt (weight_map (\lambda (_: nat).O) t) (S (plus (weight_map (\lambda (_: nat).O) u) n)))) (le_S_n (S (weight_map (\lambda (_: nat).O) t)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t))) (le_n_S (S (weight_map (\lambda (_: nat).O) t)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t))) (le_n_S (weight_map (\lambda (_: nat).O) t) (plus (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t)) (le_plus_r (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t))))) (weight_map (wadd (\lambda (_: nat).O) O) t) (weight_add_O t)))) (\lambda (u: T).(\lambda (t: T).(eq_ind_r nat (weight_map (\lambda (_: nat).O) t) (\lambda (n: nat).(lt (weight_map (\lambda (_: nat).O) t) (S (plus (weight_map (\lambda (_: nat).O) u) n)))) (le_S_n (S (weight_map (\lambda (_: nat).O) t)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t))) (le_n_S (S (weight_map (\lambda (_: nat).O) t)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t))) (le_n_S (weight_map (\lambda (_: nat).O) t) (plus (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t)) (le_plus_r (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t))))) (weight_map (wadd (\lambda (_: nat).O) O) t) (weight_add_O t)))) b)) (\lambda (_: F).(\lambda (u: T).(\lambda (t: T).(le_S_n (S (weight_map (\lambda (_: nat).O) t)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t))) (le_n_S (S (weight_map (\lambda (_: nat).O) t)) (S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t))) (le_n_S (weight_map (\lambda (_: nat).O) t) (plus (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t)) (le_plus_r (weight_map (\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) t)))))))) k). + +theorem tlt_wf__q_ind: + \forall (P: ((T \to Prop))).(((\forall (n: nat).((\lambda (P: ((T \to Prop))).(\lambda (n0: nat).(\forall (t: T).((eq nat (weight t) n0) \to (P t))))) P n))) \to (\forall (t: T).(P t))) +\def + let Q \def (\lambda (P: ((T \to Prop))).(\lambda (n: nat).(\forall (t: T).((eq nat (weight t) n) \to (P t))))) in (\lambda (P: ((T \to Prop))).(\lambda (H: ((\forall (n: nat).(\forall (t: T).((eq nat (weight t) n) \to (P t)))))).(\lambda (t: T).(H (weight t) t (refl_equal nat (weight t)))))). + +theorem tlt_wf_ind: + \forall (P: ((T \to Prop))).(((\forall (t: T).(((\forall (v: T).((tlt v t) \to (P v)))) \to (P t)))) \to (\forall (t: T).(P t))) +\def + let Q \def (\lambda (P: ((T \to Prop))).(\lambda (n: nat).(\forall (t: T).((eq nat (weight t) n) \to (P t))))) in (\lambda (P: ((T \to Prop))).(\lambda (H: ((\forall (t: T).(((\forall (v: T).((lt (weight v) (weight t)) \to (P v)))) \to (P t))))).(\lambda (t: T).(tlt_wf__q_ind (\lambda (t0: T).(P t0)) (\lambda (n: nat).(lt_wf_ind n (Q (\lambda (t0: T).(P t0))) (\lambda (n0: nat).(\lambda (H0: ((\forall (m: nat).((lt m n0) \to (Q (\lambda (t: T).(P t)) m))))).(\lambda (t0: T).(\lambda (H1: (eq nat (weight t0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n: nat).(\forall (m: nat).((lt m n) \to (\forall (t: T).((eq nat (weight t) m) \to (P t)))))) H0 (weight t0) H1) in (H t0 (\lambda (v: T).(\lambda (H3: (lt (weight v) (weight t0))).(H2 (weight v) H3 v (refl_equal nat (weight v))))))))))))) t)))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-3.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-3.ma new file mode 100644 index 000000000..6e3c54e0c --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-3.ma @@ -0,0 +1,186 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta-3". + +include "LambdaDelta-1.ma". + +inductive C: Set \def +| CSort: nat \to C +| CHead: C \to (K \to (T \to C)). + +definition r: + K \to (nat \to nat) +\def + \lambda (k: K).(\lambda (i: nat).(match k with [(Bind _) \Rightarrow i | (Flat _) \Rightarrow (S i)])). + +definition clen: + C \to nat +\def + let rec clen (c: C) on c: nat \def (match c with [(CSort _) \Rightarrow O | (CHead c0 k _) \Rightarrow (s k (clen c0))]) in clen. + +theorem r_S: + \forall (k: K).(\forall (i: nat).(eq nat (r k (S i)) (S (r k i)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(eq nat (r k0 (S i)) (S (r k0 i))))) (\lambda (b: B).(\lambda (i: nat).(refl_equal nat (S (r (Bind b) i))))) (\lambda (f: F).(\lambda (i: nat).(refl_equal nat (S (r (Flat f) i))))) k). + +theorem r_plus: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (r k (plus i j)) (plus (r k i) j)))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: nat).(eq nat (r k0 (plus i j)) (plus (r k0 i) j))))) (\lambda (b: B).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (plus (r (Bind b) i) j))))) (\lambda (f: F).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (plus (r (Flat f) i) j))))) k). + +theorem r_plus_sym: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (r k (plus i j)) (plus i (r k j))))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (i: nat).(\forall (j: nat).(eq nat (r k0 (plus i j)) (plus i (r k0 j)))))) (\lambda (_: B).(\lambda (i: nat).(\lambda (j: nat).(refl_equal nat (plus i j))))) (\lambda (_: F).(\lambda (i: nat).(\lambda (j: nat).(plus_n_Sm i j)))) k). + +theorem r_minus: + \forall (i: nat).(\forall (n: nat).((lt n i) \to (\forall (k: K).(eq nat (minus (r k i) (S n)) (r k (minus i (S n))))))) +\def + \lambda (i: nat).(\lambda (n: nat).(\lambda (H: (lt n i)).(\lambda (k: K).(K_ind (\lambda (k0: K).(eq nat (minus (r k0 i) (S n)) (r k0 (minus i (S n))))) (\lambda (_: B).(refl_equal nat (minus i (S n)))) (\lambda (_: F).(minus_x_Sy i n H)) k)))). + +theorem r_dis: + \forall (k: K).(\forall (P: Prop).(((((\forall (i: nat).(eq nat (r k i) i))) \to P)) \to (((((\forall (i: nat).(eq nat (r k i) (S i)))) \to P)) \to P))) +\def + \lambda (k: K).(K_ind (\lambda (k0: K).(\forall (P: Prop).(((((\forall (i: nat).(eq nat (r k0 i) i))) \to P)) \to (((((\forall (i: nat).(eq nat (r k0 i) (S i)))) \to P)) \to P)))) (\lambda (b: B).(\lambda (P: Prop).(\lambda (H: ((((\forall (i: nat).(eq nat (r (Bind b) i) i))) \to P))).(\lambda (_: ((((\forall (i: nat).(eq nat (r (Bind b) i) (S i)))) \to P))).(H (\lambda (i: nat).(refl_equal nat i))))))) (\lambda (f: F).(\lambda (P: Prop).(\lambda (_: ((((\forall (i: nat).(eq nat (r (Flat f) i) i))) \to P))).(\lambda (H0: ((((\forall (i: nat).(eq nat (r (Flat f) i) (S i)))) \to P))).(H0 (\lambda (i: nat).(refl_equal nat (S i)))))))) k). + +theorem s_r: + \forall (k: K).(\forall (i: nat).(eq nat (s k (r k i)) (S i))) +\def + \lambda (k: K).(match k return (\lambda (k0: K).(\forall (i: nat).(eq nat (s k0 (r k0 i)) (S i)))) with [(Bind _) \Rightarrow (\lambda (i: nat).(refl_equal nat (S i))) | (Flat _) \Rightarrow (\lambda (i: nat).(refl_equal nat (S i)))]). + +theorem r_arith0: + \forall (k: K).(\forall (i: nat).(eq nat (minus (r k (S i)) (S O)) (r k i))) +\def + \lambda (k: K).(\lambda (i: nat).(eq_ind_r nat (S (r k i)) (\lambda (n: nat).(eq nat (minus n (S O)) (r k i))) (eq_ind_r nat (r k i) (\lambda (n: nat).(eq nat n (r k i))) (refl_equal nat (r k i)) (minus (S (r k i)) (S O)) (minus_Sx_SO (r k i))) (r k (S i)) (r_S k i))). + +theorem r_arith1: + \forall (k: K).(\forall (i: nat).(\forall (j: nat).(eq nat (minus (r k (S i)) (S j)) (minus (r k i) j)))) +\def + \lambda (k: K).(\lambda (i: nat).(\lambda (j: nat).(eq_ind_r nat (S (r k i)) (\lambda (n: nat).(eq nat (minus n (S j)) (minus (r k i) j))) (refl_equal nat (minus (r k i) j)) (r k (S i)) (r_S k i)))). + +definition tweight: + T \to nat +\def + let rec tweight (t: T) on t: nat \def (match t with [(TSort _) \Rightarrow (S O) | (TLRef _) \Rightarrow (S O) | (THead _ u t0) \Rightarrow (S (plus (tweight u) (tweight t0)))]) in tweight. + +definition cweight: + C \to nat +\def + let rec cweight (c: C) on c: nat \def (match c with [(CSort _) \Rightarrow O | (CHead c0 _ t) \Rightarrow (plus (cweight c0) (tweight t))]) in cweight. + +definition clt: + C \to (C \to Prop) +\def + \lambda (c1: C).(\lambda (c2: C).(lt (cweight c1) (cweight c2))). + +definition cle: + C \to (C \to Prop) +\def + \lambda (c1: C).(\lambda (c2: C).(le (cweight c1) (cweight c2))). + +theorem tweight_lt: + \forall (t: T).(lt O (tweight t)) +\def + \lambda (t: T).(match t return (\lambda (t0: T).(lt O (tweight t0))) with [(TSort _) \Rightarrow (le_n (S O)) | (TLRef _) \Rightarrow (le_n (S O)) | (THead _ t0 t1) \Rightarrow (le_S_n (S O) (S (plus (tweight t0) (tweight t1))) (le_n_S (S O) (S (plus (tweight t0) (tweight t1))) (le_n_S O (plus (tweight t0) (tweight t1)) (le_O_n (plus (tweight t0) (tweight t1))))))]). + +theorem clt_cong: + \forall (c: C).(\forall (d: C).((clt c d) \to (\forall (k: K).(\forall (t: T).(clt (CHead c k t) (CHead d k t)))))) +\def + \lambda (c: C).(\lambda (d: C).(\lambda (H: (lt (cweight c) (cweight d))).(\lambda (_: K).(\lambda (t: T).(lt_le_S (plus (cweight c) (tweight t)) (plus (cweight d) (tweight t)) (plus_lt_compat_r (cweight c) (cweight d) (tweight t) H)))))). + +theorem clt_head: + \forall (k: K).(\forall (c: C).(\forall (u: T).(clt c (CHead c k u)))) +\def + \lambda (_: K).(\lambda (c: C).(\lambda (u: T).(eq_ind_r nat (plus (cweight c) O) (\lambda (n: nat).(lt n (plus (cweight c) (tweight u)))) (lt_le_S (plus (cweight c) O) (plus (cweight c) (tweight u)) (plus_le_lt_compat (cweight c) (cweight c) O (tweight u) (le_n (cweight c)) (tweight_lt u))) (cweight c) (plus_n_O (cweight c))))). + +theorem clt_wf__q_ind: + \forall (P: ((C \to Prop))).(((\forall (n: nat).((\lambda (P: ((C \to Prop))).(\lambda (n0: nat).(\forall (c: C).((eq nat (cweight c) n0) \to (P c))))) P n))) \to (\forall (c: C).(P c))) +\def + let Q \def (\lambda (P: ((C \to Prop))).(\lambda (n: nat).(\forall (c: C).((eq nat (cweight c) n) \to (P c))))) in (\lambda (P: ((C \to Prop))).(\lambda (H: ((\forall (n: nat).(\forall (c: C).((eq nat (cweight c) n) \to (P c)))))).(\lambda (c: C).(H (cweight c) c (refl_equal nat (cweight c)))))). + +theorem clt_wf_ind: + \forall (P: ((C \to Prop))).(((\forall (c: C).(((\forall (d: C).((clt d c) \to (P d)))) \to (P c)))) \to (\forall (c: C).(P c))) +\def + let Q \def (\lambda (P: ((C \to Prop))).(\lambda (n: nat).(\forall (c: C).((eq nat (cweight c) n) \to (P c))))) in (\lambda (P: ((C \to Prop))).(\lambda (H: ((\forall (c: C).(((\forall (d: C).((lt (cweight d) (cweight c)) \to (P d)))) \to (P c))))).(\lambda (c: C).(clt_wf__q_ind (\lambda (c0: C).(P c0)) (\lambda (n: nat).(lt_wf_ind n (Q (\lambda (c0: C).(P c0))) (\lambda (n0: nat).(\lambda (H0: ((\forall (m: nat).((lt m n0) \to (Q (\lambda (c: C).(P c)) m))))).(\lambda (c0: C).(\lambda (H1: (eq nat (cweight c0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n: nat).(\forall (m: nat).((lt m n) \to (\forall (c: C).((eq nat (cweight c) m) \to (P c)))))) H0 (cweight c0) H1) in (H c0 (\lambda (d: C).(\lambda (H3: (lt (cweight d) (cweight c0))).(H2 (cweight d) H3 d (refl_equal nat (cweight d))))))))))))) c)))). + +definition CTail: + K \to (T \to (C \to C)) +\def + let rec CTail (k: K) (t: T) (c: C) on c: C \def (match c with [(CSort n) \Rightarrow (CHead (CSort n) k t) | (CHead d h u) \Rightarrow (CHead (CTail k t d) h u)]) in CTail. + +theorem chead_ctail: + \forall (c: C).(\forall (t: T).(\forall (k: K).(ex_3 K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c k t) (CTail h u d)))))))) +\def + \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (t: T).(\forall (k: K).(ex_3 K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c0 k t) (CTail h u d))))))))) (\lambda (n: nat).(\lambda (t: T).(\lambda (k: K).(ex_3_intro K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead (CSort n) k t) (CTail h u d))))) k (CSort n) t (refl_equal C (CHead (CSort n) k t)))))) (\lambda (c0: C).(\lambda (H: ((\forall (t: T).(\forall (k: K).(ex_3 K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c0 k t) (CTail h u d)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (t0: T).(\lambda (k0: K).(let H_x \def (H t k) in (let H0 \def H_x in (ex_3_ind K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c0 k t) (CTail h u d))))) (ex_3 K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead (CHead c0 k t) k0 t0) (CTail h u d)))))) (\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H1: (eq C (CHead c0 k t) (CTail x0 x2 x1))).(eq_ind_r C (CTail x0 x2 x1) (\lambda (c1: C).(ex_3 K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c1 k0 t0) (CTail h u d))))))) (ex_3_intro K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead (CTail x0 x2 x1) k0 t0) (CTail h u d))))) x0 (CHead x1 k0 t0) x2 (refl_equal C (CHead (CTail x0 x2 x1) k0 t0))) (CHead c0 k t) H1))))) H0))))))))) c). + +theorem clt_thead: + \forall (k: K).(\forall (u: T).(\forall (c: C).(clt c (CTail k u c)))) +\def + \lambda (k: K).(\lambda (u: T).(\lambda (c: C).(C_ind (\lambda (c0: C).(clt c0 (CTail k u c0))) (\lambda (n: nat).(clt_head k (CSort n) u)) (\lambda (c0: C).(\lambda (H: (clt c0 (CTail k u c0))).(\lambda (k0: K).(\lambda (t: T).(clt_cong c0 (CTail k u c0) H k0 t))))) c))). + +theorem c_tail_ind: + \forall (P: ((C \to Prop))).(((\forall (n: nat).(P (CSort n)))) \to (((\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: T).(P (CTail k t c))))))) \to (\forall (c: C).(P c)))) +\def + \lambda (P: ((C \to Prop))).(\lambda (H: ((\forall (n: nat).(P (CSort n))))).(\lambda (H0: ((\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: T).(P (CTail k t c)))))))).(\lambda (c: C).(clt_wf_ind (\lambda (c0: C).(P c0)) (\lambda (c0: C).(match c0 return (\lambda (c1: C).(((\forall (d: C).((clt d c1) \to (P d)))) \to (P c1))) with [(CSort n) \Rightarrow (\lambda (_: ((\forall (d: C).((clt d (CSort n)) \to (P d))))).(H n)) | (CHead c1 k t) \Rightarrow (\lambda (H1: ((\forall (d: C).((clt d (CHead c1 k t)) \to (P d))))).(let H_x \def (chead_ctail c1 t k) in (let H2 \def H_x in (ex_3_ind K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c1 k t) (CTail h u d))))) (P (CHead c1 k t)) (\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H3: (eq C (CHead c1 k t) (CTail x0 x2 x1))).(eq_ind_r C (CTail x0 x2 x1) (\lambda (c2: C).(P c2)) (let H4 \def (eq_ind C (CHead c1 k t) (\lambda (c: C).(\forall (d: C).((clt d c) \to (P d)))) H1 (CTail x0 x2 x1) H3) in (H0 x1 (H4 x1 (clt_thead x0 x2 x1)) x0 x2)) (CHead c1 k t) H3))))) H2))))])) c)))). + +definition fweight: + C \to (T \to nat) +\def + \lambda (c: C).(\lambda (t: T).(plus (cweight c) (tweight t))). + +definition flt: + C \to (T \to (C \to (T \to Prop))) +\def + \lambda (c1: C).(\lambda (t1: T).(\lambda (c2: C).(\lambda (t2: T).(lt (fweight c1 t1) (fweight c2 t2))))). + +theorem flt_thead_sx: + \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).(flt c u c (THead k u t))))) +\def + \lambda (_: K).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(lt_le_S (plus (cweight c) (tweight u)) (plus (cweight c) (S (plus (tweight u) (tweight t)))) (plus_le_lt_compat (cweight c) (cweight c) (tweight u) (S (plus (tweight u) (tweight t))) (le_n (cweight c)) (le_lt_n_Sm (tweight u) (plus (tweight u) (tweight t)) (le_plus_l (tweight u) (tweight t)))))))). + +theorem flt_thead_dx: + \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).(flt c t c (THead k u t))))) +\def + \lambda (_: K).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(lt_le_S (plus (cweight c) (tweight t)) (plus (cweight c) (S (plus (tweight u) (tweight t)))) (plus_le_lt_compat (cweight c) (cweight c) (tweight t) (S (plus (tweight u) (tweight t))) (le_n (cweight c)) (le_lt_n_Sm (tweight t) (plus (tweight u) (tweight t)) (le_plus_r (tweight u) (tweight t)))))))). + +theorem flt_shift: + \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t: T).(flt (CHead c k u) t c (THead k u t))))) +\def + \lambda (_: K).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(eq_ind nat (S (plus (cweight c) (plus (tweight u) (tweight t)))) (\lambda (n: nat).(lt (plus (plus (cweight c) (tweight u)) (tweight t)) n)) (eq_ind_r nat (plus (plus (cweight c) (tweight u)) (tweight t)) (\lambda (n: nat).(lt (plus (plus (cweight c) (tweight u)) (tweight t)) (S n))) (le_n (S (plus (plus (cweight c) (tweight u)) (tweight t)))) (plus (cweight c) (plus (tweight u) (tweight t))) (plus_assoc (cweight c) (tweight u) (tweight t))) (plus (cweight c) (S (plus (tweight u) (tweight t)))) (plus_n_Sm (cweight c) (plus (tweight u) (tweight t))))))). + +theorem flt_arith0: + \forall (k: K).(\forall (c: C).(\forall (t: T).(\forall (i: nat).(flt c t (CHead c k t) (TLRef i))))) +\def + \lambda (_: K).(\lambda (c: C).(\lambda (t: T).(\lambda (_: nat).(le_S_n (S (plus (cweight c) (tweight t))) (plus (plus (cweight c) (tweight t)) (S O)) (lt_le_S (S (plus (cweight c) (tweight t))) (S (plus (plus (cweight c) (tweight t)) (S O))) (lt_n_S (plus (cweight c) (tweight t)) (plus (plus (cweight c) (tweight t)) (S O)) (lt_x_plus_x_Sy (plus (cweight c) (tweight t)) O))))))). + +theorem flt_arith1: + \forall (k1: K).(\forall (c1: C).(\forall (c2: C).(\forall (t1: T).((cle (CHead c1 k1 t1) c2) \to (\forall (k2: K).(\forall (t2: T).(\forall (i: nat).(flt c1 t1 (CHead c2 k2 t2) (TLRef i))))))))) +\def + \lambda (_: K).(\lambda (c1: C).(\lambda (c2: C).(\lambda (t1: T).(\lambda (H: (le (plus (cweight c1) (tweight t1)) (cweight c2))).(\lambda (_: K).(\lambda (t2: T).(\lambda (_: nat).(le_lt_trans (plus (cweight c1) (tweight t1)) (cweight c2) (plus (plus (cweight c2) (tweight t2)) (S O)) H (eq_ind_r nat (plus (S O) (plus (cweight c2) (tweight t2))) (\lambda (n: nat).(lt (cweight c2) n)) (le_lt_n_Sm (cweight c2) (plus (cweight c2) (tweight t2)) (le_plus_l (cweight c2) (tweight t2))) (plus (plus (cweight c2) (tweight t2)) (S O)) (plus_comm (plus (cweight c2) (tweight t2)) (S O))))))))))). + +theorem flt_arith2: + \forall (c1: C).(\forall (c2: C).(\forall (t1: T).(\forall (i: nat).((flt c1 t1 c2 (TLRef i)) \to (\forall (k2: K).(\forall (t2: T).(\forall (j: nat).(flt c1 t1 (CHead c2 k2 t2) (TLRef j))))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (t1: T).(\lambda (_: nat).(\lambda (H: (lt (plus (cweight c1) (tweight t1)) (plus (cweight c2) (S O)))).(\lambda (_: K).(\lambda (t2: T).(\lambda (_: nat).(lt_le_trans (plus (cweight c1) (tweight t1)) (plus (cweight c2) (S O)) (plus (plus (cweight c2) (tweight t2)) (S O)) H (le_S_n (plus (cweight c2) (S O)) (plus (plus (cweight c2) (tweight t2)) (S O)) (lt_le_S (plus (cweight c2) (S O)) (S (plus (plus (cweight c2) (tweight t2)) (S O))) (le_lt_n_Sm (plus (cweight c2) (S O)) (plus (plus (cweight c2) (tweight t2)) (S O)) (plus_le_compat (cweight c2) (plus (cweight c2) (tweight t2)) (S O) (S O) (le_plus_l (cweight c2) (tweight t2)) (le_n (S O)))))))))))))). + +theorem flt_wf__q_ind: + \forall (P: ((C \to (T \to Prop)))).(((\forall (n: nat).((\lambda (P: ((C \to (T \to Prop)))).(\lambda (n0: nat).(\forall (c: C).(\forall (t: T).((eq nat (fweight c t) n0) \to (P c t)))))) P n))) \to (\forall (c: C).(\forall (t: T).(P c t)))) +\def + let Q \def (\lambda (P: ((C \to (T \to Prop)))).(\lambda (n: nat).(\forall (c: C).(\forall (t: T).((eq nat (fweight c t) n) \to (P c t)))))) in (\lambda (P: ((C \to (T \to Prop)))).(\lambda (H: ((\forall (n: nat).(\forall (c: C).(\forall (t: T).((eq nat (fweight c t) n) \to (P c t))))))).(\lambda (c: C).(\lambda (t: T).(H (fweight c t) c t (refl_equal nat (fweight c t))))))). + +theorem flt_wf_ind: + \forall (P: ((C \to (T \to Prop)))).(((\forall (c2: C).(\forall (t2: T).(((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 t2) \to (P c1 t1))))) \to (P c2 t2))))) \to (\forall (c: C).(\forall (t: T).(P c t)))) +\def + let Q \def (\lambda (P: ((C \to (T \to Prop)))).(\lambda (n: nat).(\forall (c: C).(\forall (t: T).((eq nat (fweight c t) n) \to (P c t)))))) in (\lambda (P: ((C \to (T \to Prop)))).(\lambda (H: ((\forall (c2: C).(\forall (t2: T).(((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 t2) \to (P c1 t1))))) \to (P c2 t2)))))).(\lambda (c: C).(\lambda (t: T).(flt_wf__q_ind P (\lambda (n: nat).(lt_wf_ind n (Q P) (\lambda (n0: nat).(\lambda (H0: ((\forall (m: nat).((lt m n0) \to (Q P m))))).(\lambda (c0: C).(\lambda (t0: T).(\lambda (H1: (eq nat (fweight c0 t0) n0)).(let H2 \def (eq_ind_r nat n0 (\lambda (n: nat).(\forall (m: nat).((lt m n) \to (\forall (c: C).(\forall (t: T).((eq nat (fweight c t) m) \to (P c t))))))) H0 (fweight c0 t0) H1) in (H c0 t0 (\lambda (c1: C).(\lambda (t1: T).(\lambda (H3: (flt c1 t1 c0 t0)).(H2 (fweight c1 t1) H3 c1 t1 (refl_equal nat (fweight c1 t1))))))))))))))) c t))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-4.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-4.ma new file mode 100644 index 000000000..cc21d60e1 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-4.ma @@ -0,0 +1,245 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta-4". + +include "LambdaDelta-3.ma". + +definition lref_map: + ((nat \to nat)) \to (nat \to (T \to T)) +\def + let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map. + +definition lift: + nat \to (nat \to (T \to T)) +\def + \lambda (h: nat).(\lambda (i: nat).(\lambda (t: T).(lref_map (\lambda (x: nat).(plus x h)) i t))). + +definition lifts: + nat \to (nat \to (TList \to TList)) +\def + let rec lifts (h: nat) (d: nat) (ts: TList) on ts: TList \def (match ts with [TNil \Rightarrow TNil | (TCons t ts0) \Rightarrow (TCons (lift h d t) (lifts h d ts0))]) in lifts. + +theorem lift_sort: + \forall (n: nat).(\forall (h: nat).(\forall (d: nat).(eq T (lift h d (TSort n)) (TSort n)))) +\def + \lambda (n: nat).(\lambda (_: nat).(\lambda (_: nat).(refl_equal T (TSort n)))). + +theorem lift_lref_lt: + \forall (n: nat).(\forall (h: nat).(\forall (d: nat).((lt n d) \to (eq T (lift h d (TLRef n)) (TLRef n))))) +\def + \lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (lt n d)).(eq_ind bool true (\lambda (b: bool).(eq T (TLRef (match b with [true \Rightarrow n | false \Rightarrow (plus n h)])) (TLRef n))) (refl_equal T (TLRef n)) (blt n d) (sym_equal bool (blt n d) true (lt_blt d n H)))))). + +theorem lift_lref_ge: + \forall (n: nat).(\forall (h: nat).(\forall (d: nat).((le d n) \to (eq T (lift h d (TLRef n)) (TLRef (plus n h)))))) +\def + \lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (le d n)).(eq_ind bool false (\lambda (b: bool).(eq T (TLRef (match b with [true \Rightarrow n | false \Rightarrow (plus n h)])) (TLRef (plus n h)))) (refl_equal T (TLRef (plus n h))) (blt n d) (sym_equal bool (blt n d) false (le_bge d n H)))))). + +theorem lift_head: + \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).(eq T (lift h d (THead k u t)) (THead k (lift h d u) (lift h (s k d) t))))))) +\def + \lambda (k: K).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(refl_equal T (THead k (lift h d u) (lift h (s k d) t))))))). + +theorem lift_bind: + \forall (b: B).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).(eq T (lift h d (THead (Bind b) u t)) (THead (Bind b) (lift h d u) (lift h (S d) t))))))) +\def + \lambda (b: B).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(refl_equal T (THead (Bind b) (lift h d u) (lift h (S d) t))))))). + +theorem lift_flat: + \forall (f: F).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).(eq T (lift h d (THead (Flat f) u t)) (THead (Flat f) (lift h d u) (lift h d t))))))) +\def + \lambda (f: F).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(refl_equal T (THead (Flat f) (lift h d u) (lift h d t))))))). + +theorem lift_gen_sort: + \forall (h: nat).(\forall (d: nat).(\forall (n: nat).(\forall (t: T).((eq T (TSort n) (lift h d t)) \to (eq T t (TSort n)))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TSort n) (lift h d t0)) \to (eq T t0 (TSort n)))) (\lambda (n0: nat).(\lambda (H: (eq T (TSort n) (lift h d (TSort n0)))).(sym_eq T (TSort n) (TSort n0) H))) (\lambda (n0: nat).(\lambda (H: (eq T (TSort n) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TSort n)) (\lambda (H0: (lt n0 d)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TSort n) t)) H (TLRef n0) (lift_lref_lt n0 h d H0)) in (let H2 \def (match H1 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef n0)) \to (eq T (TLRef n0) (TSort n))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (TSort n) (TLRef n0))).(let H2 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef n0) H1) in (False_ind (eq T (TLRef n0) (TSort n)) H2)))]) in (H2 (refl_equal T (TLRef n0)))))) (\lambda (H0: (le d n0)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TSort n) t)) H (TLRef (plus n0 h)) (lift_lref_ge n0 h d H0)) in (let H2 \def (match H1 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef (plus n0 h))) \to (eq T (TLRef n0) (TSort n))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (TSort n) (TLRef (plus n0 h)))).(let H2 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef (plus n0 h)) H1) in (False_ind (eq T (TLRef n0) (TSort n)) H2)))]) in (H2 (refl_equal T (TLRef (plus n0 h)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TSort n) (lift h d t0)) \to (eq T t0 (TSort n))))).(\lambda (t1: T).(\lambda (_: (((eq T (TSort n) (lift h d t1)) \to (eq T t1 (TSort n))))).(\lambda (H1: (eq T (TSort n) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TSort n) t)) H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (match H2 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k (lift h d t0) (lift h (s k d) t1))) \to (eq T (THead k t0 t1) (TSort n))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TSort n) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H3 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H2) in (False_ind (eq T (THead k t0 t1) (TSort n)) H3)))]) in (H3 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))) t)))). + +theorem lift_gen_lref: + \forall (t: T).(\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t)) \to (or (land (lt i d) (eq T t (TLRef i))) (land (le (plus d h) i) (eq T t (TLRef (minus i h))))))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t0)) \to (or (land (lt i d) (eq T t0 (TLRef i))) (land (le (plus d h) i) (eq T t0 (TLRef (minus i h)))))))))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H: (eq T (TLRef i) (lift h d (TSort n)))).(let H0 \def (eq_ind T (lift h d (TSort n)) (\lambda (t: T).(eq T (TLRef i) t)) H (TSort n) (lift_sort n h d)) in (let H1 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H0) in (False_ind (or (land (lt i d) (eq T (TSort n) (TLRef i))) (land (le (plus d h) i) (eq T (TSort n) (TLRef (minus i h))))) H1)))))))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H: (eq T (TLRef i) (lift h d (TLRef n)))).(lt_le_e n d (or (land (lt i d) (eq T (TLRef n) (TLRef i))) (land (le (plus d h) i) (eq T (TLRef n) (TLRef (minus i h))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t: T).(eq T (TLRef i) t)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H1) in (eq_ind_r nat n (\lambda (n0: nat).(or (land (lt n0 d) (eq T (TLRef n) (TLRef n0))) (land (le (plus d h) n0) (eq T (TLRef n) (TLRef (minus n0 h)))))) (or_introl (land (lt n d) (eq T (TLRef n) (TLRef n))) (land (le (plus d h) n) (eq T (TLRef n) (TLRef (minus n h)))) (conj (lt n d) (eq T (TLRef n) (TLRef n)) H0 (refl_equal T (TLRef n)))) i H2)))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t: T).(eq T (TLRef i) t)) H (TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef (plus n h)) H1) in (eq_ind_r nat (plus n h) (\lambda (n0: nat).(or (land (lt n0 d) (eq T (TLRef n) (TLRef n0))) (land (le (plus d h) n0) (eq T (TLRef n) (TLRef (minus n0 h)))))) (eq_ind_r nat n (\lambda (n0: nat).(or (land (lt (plus n h) d) (eq T (TLRef n) (TLRef (plus n h)))) (land (le (plus d h) (plus n h)) (eq T (TLRef n) (TLRef n0))))) (or_intror (land (lt (plus n h) d) (eq T (TLRef n) (TLRef (plus n h)))) (land (le (plus d h) (plus n h)) (eq T (TLRef n) (TLRef n))) (conj (le (plus d h) (plus n h)) (eq T (TLRef n) (TLRef n)) (plus_le_compat d n h h H0 (le_n h)) (refl_equal T (TLRef n)))) (minus (plus n h) h) (minus_plus_r n h)) i H2)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: ((\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t0)) \to (or (land (lt i d) (eq T t0 (TLRef i))) (land (le (plus d h) i) (eq T t0 (TLRef (minus i h))))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t1)) \to (or (land (lt i d) (eq T t1 (TLRef i))) (land (le (plus d h) i) (eq T t1 (TLRef (minus i h))))))))))).(\lambda (d: nat).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H1: (eq T (TLRef i) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TLRef i) t)) H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H2) in (False_ind (or (land (lt i d) (eq T (THead k t0 t1) (TLRef i))) (land (le (plus d h) i) (eq T (THead k t0 t1) (TLRef (minus i h))))) H3)))))))))))) t). + +theorem lift_gen_lref_lt: + \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((lt n d) \to (\forall (t: T).((eq T (TLRef n) (lift h d t)) \to (eq T t (TLRef n))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (lt n d)).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TLRef n) (lift h d t0)) \to (eq T t0 (TLRef n)))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef n) (lift h d (TSort n0)))).(sym_eq T (TLRef n) (TSort n0) H0))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef n) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TLRef n)) (\lambda (H1: (lt n0 d)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef n) t)) H0 (TLRef n0) (lift_lref_lt n0 h d H1)) in (sym_eq T (TLRef n) (TLRef n0) H2))) (\lambda (H1: (le d n0)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef n) t)) H0 (TLRef (plus n0 h)) (lift_lref_ge n0 h d H1)) in (let H3 \def (match H2 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef (plus n0 h))) \to (eq T (TLRef n0) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TLRef n) (TLRef (plus n0 h)))).(let H3 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow n | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef (plus n0 h)) H2) in (eq_ind nat (plus n0 h) (\lambda (n: nat).(eq T (TLRef n0) (TLRef n))) (let H0 \def (eq_ind nat n (\lambda (n: nat).(lt n d)) H (plus n0 h) H3) in (le_false d n0 (eq T (TLRef n0) (TLRef (plus n0 h))) H1 (lt_le_S n0 d (le_lt_trans n0 (plus n0 h) d (le_plus_l n0 h) H0)))) n (sym_eq nat n (plus n0 h) H3))))]) in (H3 (refl_equal T (TLRef (plus n0 h)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TLRef n) (lift h d t0)) \to (eq T t0 (TLRef n))))).(\lambda (t1: T).(\lambda (_: (((eq T (TLRef n) (lift h d t1)) \to (eq T t1 (TLRef n))))).(\lambda (H2: (eq T (TLRef n) (lift h d (THead k t0 t1)))).(let H3 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TLRef n) t)) H2 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H4 \def (match H3 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k (lift h d t0) (lift h (s k d) t1))) \to (eq T (THead k t0 t1) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H3: (eq T (TLRef n) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H4 \def (eq_ind T (TLRef n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H3) in (False_ind (eq T (THead k t0 t1) (TLRef n)) H4)))]) in (H4 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))) t))))). + +theorem lift_gen_lref_false: + \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((le d n) \to ((lt n (plus d h)) \to (\forall (t: T).((eq T (TLRef n) (lift h d t)) \to (\forall (P: Prop).P))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (le d n)).(\lambda (H0: (lt n (plus d h))).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TLRef n) (lift h d t0)) \to (\forall (P: Prop).P))) (\lambda (n0: nat).(\lambda (H1: (eq T (TLRef n) (lift h d (TSort n0)))).(\lambda (P: Prop).(let H2 \def (match H1 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (lift h d (TSort n0))) \to P))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TLRef n) (lift h d (TSort n0)))).(let H3 \def (eq_ind T (TLRef n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (lift h d (TSort n0)) H2) in (False_ind P H3)))]) in (H2 (refl_equal T (lift h d (TSort n0)))))))) (\lambda (n0: nat).(\lambda (H1: (eq T (TLRef n) (lift h d (TLRef n0)))).(\lambda (P: Prop).(lt_le_e n0 d P (\lambda (H2: (lt n0 d)).(let H3 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef n) t)) H1 (TLRef n0) (lift_lref_lt n0 h d H2)) in (let H4 \def (match H3 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef n0)) \to P))) with [refl_equal \Rightarrow (\lambda (H3: (eq T (TLRef n) (TLRef n0))).(let H4 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow n | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef n0) H3) in (eq_ind nat n0 (\lambda (_: nat).P) (let H1 \def (eq_ind_r nat n0 (\lambda (n: nat).(lt n d)) H2 n H4) in (le_false d n P H H1)) n (sym_eq nat n n0 H4))))]) in (H4 (refl_equal T (TLRef n0)))))) (\lambda (H2: (le d n0)).(let H3 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef n) t)) H1 (TLRef (plus n0 h)) (lift_lref_ge n0 h d H2)) in (let H4 \def (match H3 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef (plus n0 h))) \to P))) with [refl_equal \Rightarrow (\lambda (H3: (eq T (TLRef n) (TLRef (plus n0 h)))).(let H4 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow n | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef (plus n0 h)) H3) in (eq_ind nat (plus n0 h) (\lambda (_: nat).P) (let H1 \def (eq_ind nat n (\lambda (n: nat).(lt n (plus d h))) H0 (plus n0 h) H4) in (le_false d n0 P H2 (lt_le_S n0 d (simpl_lt_plus_r h n0 d H1)))) n (sym_eq nat n (plus n0 h) H4))))]) in (H4 (refl_equal T (TLRef (plus n0 h))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TLRef n) (lift h d t0)) \to (\forall (P: Prop).P)))).(\lambda (t1: T).(\lambda (_: (((eq T (TLRef n) (lift h d t1)) \to (\forall (P: Prop).P)))).(\lambda (H3: (eq T (TLRef n) (lift h d (THead k t0 t1)))).(\lambda (P: Prop).(let H4 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TLRef n) t)) H3 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H5 \def (match H4 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k (lift h d t0) (lift h (s k d) t1))) \to P))) with [refl_equal \Rightarrow (\lambda (H4: (eq T (TLRef n) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H5 \def (eq_ind T (TLRef n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H4) in (False_ind P H5)))]) in (H5 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1))))))))))))) t)))))). + +theorem lift_gen_lref_ge: + \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((le d n) \to (\forall (t: T).((eq T (TLRef (plus n h)) (lift h d t)) \to (eq T t (TLRef n))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (le d n)).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TLRef (plus n h)) (lift h d t0)) \to (eq T t0 (TLRef n)))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef (plus n h)) (lift h d (TSort n0)))).(let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (lift h d (TSort n0))) \to (eq T (TSort n0) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (TLRef (plus n h)) (lift h d (TSort n0)))).(let H2 \def (eq_ind T (TLRef (plus n h)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (lift h d (TSort n0)) H1) in (False_ind (eq T (TSort n0) (TLRef n)) H2)))]) in (H1 (refl_equal T (lift h d (TSort n0))))))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef (plus n h)) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TLRef n)) (\lambda (H1: (lt n0 d)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef (plus n h)) t)) H0 (TLRef n0) (lift_lref_lt n0 h d H1)) in (let H3 \def (match H2 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef n0)) \to (eq T (TLRef n0) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TLRef (plus n h)) (TLRef n0))).(let H3 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h) | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h)])) (TLRef (plus n h)) (TLRef n0) H2) in (eq_ind nat (plus n h) (\lambda (n0: nat).(eq T (TLRef n0) (TLRef n))) (let H0 \def (eq_ind_r nat n0 (\lambda (n: nat).(lt n d)) H1 (plus n h) H3) in (le_false d n (eq T (TLRef (plus n h)) (TLRef n)) H (lt_le_S n d (le_lt_trans n (plus n h) d (le_plus_l n h) H0)))) n0 H3)))]) in (H3 (refl_equal T (TLRef n0)))))) (\lambda (H1: (le d n0)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef (plus n h)) t)) H0 (TLRef (plus n0 h)) (lift_lref_ge n0 h d H1)) in (let H3 \def (match H2 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef (plus n0 h))) \to (eq T (TLRef n0) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TLRef (plus n h)) (TLRef (plus n0 h)))).(let H3 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h) | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h)])) (TLRef (plus n h)) (TLRef (plus n0 h)) H2) in (eq_ind nat (plus n h) (\lambda (_: nat).(eq T (TLRef n0) (TLRef n))) (f_equal nat T TLRef n0 n (simpl_plus_r h n0 n (sym_eq nat (plus n h) (plus n0 h) H3))) (plus n0 h) H3)))]) in (H3 (refl_equal T (TLRef (plus n0 h)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TLRef (plus n h)) (lift h d t0)) \to (eq T t0 (TLRef n))))).(\lambda (t1: T).(\lambda (_: (((eq T (TLRef (plus n h)) (lift h d t1)) \to (eq T t1 (TLRef n))))).(\lambda (H2: (eq T (TLRef (plus n h)) (lift h d (THead k t0 t1)))).(let H3 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TLRef (plus n h)) t)) H2 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H4 \def (match H3 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k (lift h d t0) (lift h (s k d) t1))) \to (eq T (THead k t0 t1) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H3: (eq T (TLRef (plus n h)) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H4 \def (eq_ind T (TLRef (plus n h)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H3) in (False_ind (eq T (THead k t0 t1) (TLRef n)) H4)))]) in (H4 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))) t))))). + +theorem lift_gen_head: + \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) (lift h d x)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))))))))) +\def + \lambda (k: K).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k u t) (lift h d (TSort n)))).(let H0 \def (match H return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (lift h d (TSort n))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u t) (lift h d (TSort n)))).(let H1 \def (eq_ind T (THead k u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (lift h d (TSort n)) H0) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) H1)))]) in (H0 (refl_equal T (lift h d (TSort n))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k u t) (lift h d (TLRef n)))).(lt_le_e n d (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead k u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef n)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead k u t) (TLRef n))).(let H2 \def (eq_ind T (THead k u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) H2)))]) in (H2 (refl_equal T (TLRef n)))))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead k u t) t0)) H (TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (match H1 return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead k u t) (TLRef (plus n h)))).(let H2 \def (eq_ind T (THead k u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef (plus n h)) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) H2)))]) in (H2 (refl_equal T (TLRef (plus n h)))))))))))) (\lambda (k0: K).(\lambda (t0: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) (lift h d t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead k u t) (lift h d (THead k0 t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k0 t0 t1)) (\lambda (t0: T).(eq T (THead k u t) t0)) H1 (THead k0 (lift h d t0) (lift h (s k0 d) t1)) (lift_head k0 t0 t1 h d)) in (let H3 \def (match H2 return (\lambda (t2: T).(\lambda (_: (eq ? ? t2)).((eq T t2 (THead k0 (lift h d t0) (lift h (s k0 d) t1))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)))).(let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) H2) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) H2) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) H2) in (eq_ind K k0 (\lambda (k: K).((eq T u (lift h d t0)) \to ((eq T t (lift h (s k0 d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) (\lambda (H6: (eq T u (lift h d t0))).(eq_ind T (lift h d t0) (\lambda (t2: T).((eq T t (lift h (s k0 d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k0 d) z))))))) (\lambda (H7: (eq T t (lift h (s k0 d) t1))).(eq_ind T (lift h (s k0 d) t1) (\lambda (t: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k0 d) z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s k0 d) t1) (lift h (s k0 d) z)))) t0 t1 (refl_equal T (THead k0 t0 t1)) (refl_equal T (lift h d t0)) (refl_equal T (lift h (s k0 d) t1))) t (sym_eq T t (lift h (s k0 d) t1) H7))) u (sym_eq T u (lift h d t0) H6))) k (sym_eq K k k0 H5))) H4)) H3)))]) in (H3 (refl_equal T (THead k0 (lift h d t0) (lift h (s k0 d) t1)))))))))))))) x)))). + +theorem lift_gen_bind: + \forall (b: B).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u t) (lift h d x)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))))))))) +\def + \lambda (b: B).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Bind b) u t) (lift h d (TSort n)))).(let H0 \def (match H return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (lift h d (TSort n))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u t) (lift h d (TSort n)))).(let H1 \def (eq_ind T (THead (Bind b) u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (lift h d (TSort n)) H0) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))) H1)))]) in (H0 (refl_equal T (lift h d (TSort n))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Bind b) u t) (lift h d (TLRef n)))).(lt_le_e n d (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Bind b) u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef n)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead (Bind b) u t) (TLRef n))).(let H2 \def (eq_ind T (THead (Bind b) u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))) H2)))]) in (H2 (refl_equal T (TLRef n)))))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Bind b) u t) t0)) H (TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (match H1 return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead (Bind b) u t) (TLRef (plus n h)))).(let H2 \def (eq_ind T (THead (Bind b) u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef (plus n h)) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))) H2)))]) in (H2 (refl_equal T (TLRef (plus n h)))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u t) (lift h d t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead (Bind b) u t) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t0: T).(eq T (THead (Bind b) u t) t0)) H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (match H2 return (\lambda (t2: T).(\lambda (_: (eq ? ? t2)).((eq T t2 (THead k (lift h d t0) (lift h (s k d) t1))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u t) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow (Bind b) | (TLRef _) \Rightarrow (Bind b) | (THead k _ _) \Rightarrow k])) (THead (Bind b) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in (eq_ind K (Bind b) (\lambda (k: K).((eq T u (lift h d t0)) \to ((eq T t (lift h (s k d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) (\lambda (H6: (eq T u (lift h d t0))).(eq_ind T (lift h d t0) (\lambda (t2: T).((eq T t (lift h (s (Bind b) d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))))) (\lambda (H7: (eq T t (lift h (s (Bind b) d) t1))).(eq_ind T (lift h (s (Bind b) d) t1) (\lambda (t: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s (Bind b) d) t1) (lift h (S d) z)))) t0 t1 (refl_equal T (THead (Bind b) t0 t1)) (refl_equal T (lift h d t0)) (refl_equal T (lift h (S d) t1))) t (sym_eq T t (lift h (s (Bind b) d) t1) H7))) u (sym_eq T u (lift h d t0) H6))) k H5)) H4)) H3)))]) in (H3 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))))) x)))). + +theorem lift_gen_flat: + \forall (f: F).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d x)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))))))))) +\def + \lambda (f: F).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Flat f) u t) (lift h d (TSort n)))).(let H0 \def (match H return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (lift h d (TSort n))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat f) u t) (lift h d (TSort n)))).(let H1 \def (eq_ind T (THead (Flat f) u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (lift h d (TSort n)) H0) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))) H1)))]) in (H0 (refl_equal T (lift h d (TSort n))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Flat f) u t) (lift h d (TLRef n)))).(lt_le_e n d (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Flat f) u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef n)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead (Flat f) u t) (TLRef n))).(let H2 \def (eq_ind T (THead (Flat f) u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))) H2)))]) in (H2 (refl_equal T (TLRef n)))))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Flat f) u t) t0)) H (TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (match H1 return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead (Flat f) u t) (TLRef (plus n h)))).(let H2 \def (eq_ind T (THead (Flat f) u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef (plus n h)) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))) H2)))]) in (H2 (refl_equal T (TLRef (plus n h)))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead (Flat f) u t) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t0: T).(eq T (THead (Flat f) u t) t0)) H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (match H2 return (\lambda (t2: T).(\lambda (_: (eq ? ? t2)).((eq T t2 (THead k (lift h d t0) (lift h (s k d) t1))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (THead (Flat f) u t) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead (Flat f) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat f) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow (Flat f) | (TLRef _) \Rightarrow (Flat f) | (THead k _ _) \Rightarrow k])) (THead (Flat f) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in (eq_ind K (Flat f) (\lambda (k: K).((eq T u (lift h d t0)) \to ((eq T t (lift h (s k d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) (\lambda (H6: (eq T u (lift h d t0))).(eq_ind T (lift h d t0) (\lambda (t2: T).((eq T t (lift h (s (Flat f) d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Flat f) t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))))) (\lambda (H7: (eq T t (lift h (s (Flat f) d) t1))).(eq_ind T (lift h (s (Flat f) d) t1) (\lambda (t: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Flat f) t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Flat f) t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s (Flat f) d) t1) (lift h d z)))) t0 t1 (refl_equal T (THead (Flat f) t0 t1)) (refl_equal T (lift h d t0)) (refl_equal T (lift h d t1))) t (sym_eq T t (lift h (s (Flat f) d) t1) H7))) u (sym_eq T u (lift h d t0) H6))) k H5)) H4)) H3)))]) in (H3 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))))) x)))). + +theorem thead_x_lift_y_y: + \forall (k: K).(\forall (t: T).(\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t)) t) \to (\forall (P: Prop).P)))))) +\def + \lambda (k: K).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t0)) t0) \to (\forall (P: Prop).P)))))) (\lambda (n: nat).(\lambda (v: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k v (lift h d (TSort n))) (TSort n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (lift h d (TSort n))) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H) in (False_ind P H0)))))))) (\lambda (n: nat).(\lambda (v: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k v (lift h d (TLRef n))) (TLRef n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (lift h d (TLRef n))) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H) in (False_ind P H0)))))))) (\lambda (k0: K).(\lambda (t0: T).(\lambda (_: ((\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t0)) t0) \to (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t1)) t1) \to (\forall (P: Prop).P))))))).(\lambda (v: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v | (TLRef _) \Rightarrow v | (THead _ t _) \Rightarrow t])) (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead k0 ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) d t0) ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) (s k0 d) t1)) | (TLRef _) \Rightarrow (THead k0 ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) d t0) ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) (s k0 d) t1)) | (THead _ _ t) \Rightarrow t])) (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1) H1) in (\lambda (_: (eq T v t0)).(\lambda (H6: (eq K k k0)).(let H7 \def (eq_ind K k (\lambda (k: K).(\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t1)) t1) \to (\forall (P: Prop).P)))))) H0 k0 H6) in (let H8 \def (eq_ind T (lift h d (THead k0 t0 t1)) (\lambda (t: T).(eq T t t1)) H4 (THead k0 (lift h d t0) (lift h (s k0 d) t1)) (lift_head k0 t0 t1 h d)) in (H7 (lift h d t0) h (s k0 d) H8 P)))))) H3)) H2)))))))))))) t)). + +theorem lift_r: + \forall (t: T).(\forall (d: nat).(eq T (lift O d t) t)) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(eq T (lift O d t0) t0))) (\lambda (n: nat).(\lambda (_: nat).(refl_equal T (TSort n)))) (\lambda (n: nat).(\lambda (d: nat).(lt_le_e n d (eq T (lift O d (TLRef n)) (TLRef n)) (\lambda (H: (lt n d)).(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 (TLRef n))) (refl_equal T (TLRef n)) (lift O d (TLRef n)) (lift_lref_lt n O d H))) (\lambda (H: (le d n)).(eq_ind_r T (TLRef (plus n O)) (\lambda (t0: T).(eq T t0 (TLRef n))) (f_equal nat T TLRef (plus n O) n (sym_eq nat n (plus n O) (plus_n_O n))) (lift O d (TLRef n)) (lift_lref_ge n O d H)))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (H: ((\forall (d: nat).(eq T (lift O d t0) t0)))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).(eq T (lift O d t1) t1)))).(\lambda (d: nat).(eq_ind_r T (THead k (lift O d t0) (lift O (s k d) t1)) (\lambda (t2: T).(eq T t2 (THead k t0 t1))) (sym_equal T (THead k t0 t1) (THead k (lift O d t0) (lift O (s k d) t1)) (sym_equal T (THead k (lift O d t0) (lift O (s k d) t1)) (THead k t0 t1) (sym_equal T (THead k t0 t1) (THead k (lift O d t0) (lift O (s k d) t1)) (f_equal3 K T T T THead k k t0 (lift O d t0) t1 (lift O (s k d) t1) (refl_equal K k) (sym_eq T (lift O d t0) t0 (H d)) (sym_eq T (lift O (s k d) t1) t1 (H0 (s k d))))))) (lift O d (THead k t0 t1)) (lift_head k t0 t1 O d)))))))) t). + +theorem lift_lref_gt: + \forall (d: nat).(\forall (n: nat).((lt d n) \to (eq T (lift (S O) d (TLRef (pred n))) (TLRef n)))) +\def + \lambda (d: nat).(\lambda (n: nat).(\lambda (H: (lt d n)).(eq_ind_r T (TLRef (plus (pred n) (S O))) (\lambda (t: T).(eq T t (TLRef n))) (eq_ind nat (plus (S O) (pred n)) (\lambda (n0: nat).(eq T (TLRef n0) (TLRef n))) (eq_ind nat n (\lambda (n0: nat).(eq T (TLRef n0) (TLRef n))) (refl_equal T (TLRef n)) (S (pred n)) (S_pred n d H)) (plus (pred n) (S O)) (plus_comm (S O) (pred n))) (lift (S O) d (TLRef (pred n))) (lift_lref_ge (pred n) (S O) d (le_S_n d (pred n) (eq_ind nat n (\lambda (n0: nat).(le (S d) n0)) H (S (pred n)) (S_pred n d H))))))). + +theorem lift_inj: + \forall (x: T).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d x) (lift h d t)) \to (eq T x t))))) +\def + \lambda (x: T).(T_ind (\lambda (t: T).(\forall (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t) (lift h d t0)) \to (eq T t t0)))))) (\lambda (n: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (lift h d (TSort n)) (lift h d t))).(let H0 \def (eq_ind T (lift h d (TSort n)) (\lambda (t0: T).(eq T t0 (lift h d t))) H (TSort n) (lift_sort n h d)) in (sym_eq T t (TSort n) (lift_gen_sort h d n t H0)))))))) (\lambda (n: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (lift h d (TLRef n)) (lift h d t))).(lt_le_e n d (eq T (TLRef n) t) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T t0 (lift h d t))) H (TLRef n) (lift_lref_lt n h d H0)) in (sym_eq T t (TLRef n) (lift_gen_lref_lt h d n (lt_le_trans n d d H0 (le_n d)) t H1)))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T t0 (lift h d t))) H (TLRef (plus n h)) (lift_lref_ge n h d H0)) in (sym_eq T t (TLRef n) (lift_gen_lref_ge h d n H0 t H1)))))))))) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).(((\forall (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t) (lift h d t0)) \to (eq T t t0)))))) \to (\forall (t0: T).(((\forall (t: T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t0) (lift h d t)) \to (eq T t0 t)))))) \to (\forall (t1: T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d (THead k0 t t0)) (lift h d t1)) \to (eq T (THead k0 t t0) t1)))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H: ((\forall (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t) (lift h d t0)) \to (eq T t t0))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (t: T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t0) (lift h d t)) \to (eq T t0 t))))))).(\lambda (t1: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T (lift h d (THead (Bind b) t t0)) (lift h d t1))).(let H2 \def (eq_ind T (lift h d (THead (Bind b) t t0)) (\lambda (t: T).(eq T t (lift h d t1))) H1 (THead (Bind b) (lift h d t) (lift h (S d) t0)) (lift_bind b t t0 h d)) in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (S d) t0) (lift h (S d) z)))) (eq T (THead (Bind b) t t0) t1) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq T t1 (THead (Bind b) x0 x1))).(\lambda (H4: (eq T (lift h d t) (lift h d x0))).(\lambda (H5: (eq T (lift h (S d) t0) (lift h (S d) x1))).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t2: T).(eq T (THead (Bind b) t t0) t2)) (sym_equal T (THead (Bind b) x0 x1) (THead (Bind b) t t0) (sym_equal T (THead (Bind b) t t0) (THead (Bind b) x0 x1) (sym_equal T (THead (Bind b) x0 x1) (THead (Bind b) t t0) (f_equal3 K T T T THead (Bind b) (Bind b) x0 t x1 t0 (refl_equal K (Bind b)) (sym_eq T t x0 (H x0 h d H4)) (sym_eq T t0 x1 (H0 x1 h (S d) H5)))))) t1 H3)))))) (lift_gen_bind b (lift h d t) (lift h (S d) t0) t1 h d H2)))))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (H: ((\forall (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t) (lift h d t0)) \to (eq T t t0))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (t: T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t0) (lift h d t)) \to (eq T t0 t))))))).(\lambda (t1: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T (lift h d (THead (Flat f) t t0)) (lift h d t1))).(let H2 \def (eq_ind T (lift h d (THead (Flat f) t t0)) (\lambda (t: T).(eq T t (lift h d t1))) H1 (THead (Flat f) (lift h d t) (lift h d t0)) (lift_flat f t t0 h d)) in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h d t0) (lift h d z)))) (eq T (THead (Flat f) t t0) t1) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq T t1 (THead (Flat f) x0 x1))).(\lambda (H4: (eq T (lift h d t) (lift h d x0))).(\lambda (H5: (eq T (lift h d t0) (lift h d x1))).(eq_ind_r T (THead (Flat f) x0 x1) (\lambda (t2: T).(eq T (THead (Flat f) t t0) t2)) (sym_equal T (THead (Flat f) x0 x1) (THead (Flat f) t t0) (sym_equal T (THead (Flat f) t t0) (THead (Flat f) x0 x1) (sym_equal T (THead (Flat f) x0 x1) (THead (Flat f) t t0) (f_equal3 K T T T THead (Flat f) (Flat f) x0 t x1 t0 (refl_equal K (Flat f)) (sym_eq T t x0 (H x0 h d H4)) (sym_eq T t0 x1 (H0 x1 h d H5)))))) t1 H3)))))) (lift_gen_flat f (lift h d t) (lift h d t0) t1 h d H2)))))))))))) k)) x). + +theorem lift_gen_lift: + \forall (t1: T).(\forall (x: T).(\forall (h1: nat).(\forall (h2: nat).(\forall (d1: nat).(\forall (d2: nat).((le d1 d2) \to ((eq T (lift h1 d1 t1) (lift h2 (plus d2 h1) x)) \to (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T t1 (lift h2 d2 t2))))))))))) +\def + \lambda (t1: T).(T_ind (\lambda (t: T).(\forall (x: T).(\forall (h1: nat).(\forall (h2: nat).(\forall (d1: nat).(\forall (d2: nat).((le d1 d2) \to ((eq T (lift h1 d1 t) (lift h2 (plus d2 h1) x)) \to (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T t (lift h2 d2 t2)))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (h1: nat).(\lambda (h2: nat).(\lambda (d1: nat).(\lambda (d2: nat).(\lambda (_: (le d1 d2)).(\lambda (H0: (eq T (lift h1 d1 (TSort n)) (lift h2 (plus d2 h1) x))).(let H1 \def (eq_ind T (lift h1 d1 (TSort n)) (\lambda (t: T).(eq T t (lift h2 (plus d2 h1) x))) H0 (TSort n) (lift_sort n h1 d1)) in (eq_ind_r T (TSort n) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TSort n) (lift h2 d2 t2))))) (ex_intro2 T (\lambda (t2: T).(eq T (TSort n) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TSort n) (lift h2 d2 t2))) (TSort n) (eq_ind_r T (TSort n) (\lambda (t: T).(eq T (TSort n) t)) (refl_equal T (TSort n)) (lift h1 d1 (TSort n)) (lift_sort n h1 d1)) (eq_ind_r T (TSort n) (\lambda (t: T).(eq T (TSort n) t)) (refl_equal T (TSort n)) (lift h2 d2 (TSort n)) (lift_sort n h2 d2))) x (lift_gen_sort h2 (plus d2 h1) n x H1))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (h1: nat).(\lambda (h2: nat).(\lambda (d1: nat).(\lambda (d2: nat).(\lambda (H: (le d1 d2)).(\lambda (H0: (eq T (lift h1 d1 (TLRef n)) (lift h2 (plus d2 h1) x))).(lt_le_e n d1 (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2)))) (\lambda (H1: (lt n d1)).(let H2 \def (eq_ind T (lift h1 d1 (TLRef n)) (\lambda (t: T).(eq T t (lift h2 (plus d2 h1) x))) H0 (TLRef n) (lift_lref_lt n h1 d1 H1)) in (eq_ind_r T (TLRef n) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))))) (ex_intro2 T (\lambda (t2: T).(eq T (TLRef n) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))) (TLRef n) (eq_ind_r T (TLRef n) (\lambda (t: T).(eq T (TLRef n) t)) (refl_equal T (TLRef n)) (lift h1 d1 (TLRef n)) (lift_lref_lt n h1 d1 H1)) (eq_ind_r T (TLRef n) (\lambda (t: T).(eq T (TLRef n) t)) (refl_equal T (TLRef n)) (lift h2 d2 (TLRef n)) (lift_lref_lt n h2 d2 (lt_le_trans n d1 d2 H1 H)))) x (lift_gen_lref_lt h2 (plus d2 h1) n (lt_le_trans n d1 (plus d2 h1) H1 (le_plus_trans d1 d2 h1 H)) x H2)))) (\lambda (H1: (le d1 n)).(let H2 \def (eq_ind T (lift h1 d1 (TLRef n)) (\lambda (t: T).(eq T t (lift h2 (plus d2 h1) x))) H0 (TLRef (plus n h1)) (lift_lref_ge n h1 d1 H1)) in (lt_le_e n d2 (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2)))) (\lambda (H3: (lt n d2)).(eq_ind_r T (TLRef (plus n h1)) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))))) (ex_intro2 T (\lambda (t2: T).(eq T (TLRef (plus n h1)) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))) (TLRef n) (eq_ind_r T (TLRef (plus n h1)) (\lambda (t: T).(eq T (TLRef (plus n h1)) t)) (refl_equal T (TLRef (plus n h1))) (lift h1 d1 (TLRef n)) (lift_lref_ge n h1 d1 H1)) (eq_ind_r T (TLRef n) (\lambda (t: T).(eq T (TLRef n) t)) (refl_equal T (TLRef n)) (lift h2 d2 (TLRef n)) (lift_lref_lt n h2 d2 H3))) x (lift_gen_lref_lt h2 (plus d2 h1) (plus n h1) (plus_lt_compat_r n d2 h1 H3) x H2))) (\lambda (H3: (le d2 n)).(lt_le_e n (plus d2 h2) (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2)))) (\lambda (H4: (lt n (plus d2 h2))).(lift_gen_lref_false h2 (plus d2 h1) (plus n h1) (le_S_n (plus d2 h1) (plus n h1) (lt_le_S (plus d2 h1) (S (plus n h1)) (le_lt_n_Sm (plus d2 h1) (plus n h1) (plus_le_compat d2 n h1 h1 H3 (le_n h1))))) (eq_ind_r nat (plus (plus d2 h2) h1) (\lambda (n0: nat).(lt (plus n h1) n0)) (lt_le_S (plus n h1) (plus (plus d2 h2) h1) (plus_lt_compat_r n (plus d2 h2) h1 H4)) (plus (plus d2 h1) h2) (plus_permute_2_in_3 d2 h1 h2)) x H2 (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2)))))) (\lambda (H4: (le (plus d2 h2) n)).(let H5 \def (eq_ind nat (plus n h1) (\lambda (n: nat).(eq T (TLRef n) (lift h2 (plus d2 h1) x))) H2 (plus (minus (plus n h1) h2) h2) (le_plus_minus_sym h2 (plus n h1) (le_plus_trans h2 n h1 (le_trans_plus_r d2 h2 n H4)))) in (eq_ind_r T (TLRef (minus (plus n h1) h2)) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))))) (ex_intro2 T (\lambda (t2: T).(eq T (TLRef (minus (plus n h1) h2)) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))) (TLRef (minus n h2)) (eq_ind_r nat (plus (minus n h2) h1) (\lambda (n0: nat).(eq T (TLRef n0) (lift h1 d1 (TLRef (minus n h2))))) (eq_ind_r T (TLRef (plus (minus n h2) h1)) (\lambda (t: T).(eq T (TLRef (plus (minus n h2) h1)) t)) (refl_equal T (TLRef (plus (minus n h2) h1))) (lift h1 d1 (TLRef (minus n h2))) (lift_lref_ge (minus n h2) h1 d1 (le_trans d1 d2 (minus n h2) H (le_minus d2 n h2 H4)))) (minus (plus n h1) h2) (le_minus_plus h2 n (le_trans_plus_r d2 h2 n H4) h1)) (eq_ind_r nat (plus (minus n h2) h2) (\lambda (n0: nat).(eq T (TLRef n0) (lift h2 d2 (TLRef (minus n0 h2))))) (eq_ind_r T (TLRef (plus (minus (plus (minus n h2) h2) h2) h2)) (\lambda (t: T).(eq T (TLRef (plus (minus n h2) h2)) t)) (f_equal nat T TLRef (plus (minus n h2) h2) (plus (minus (plus (minus n h2) h2) h2) h2) (f_equal2 nat nat nat plus (minus n h2) (minus (plus (minus n h2) h2) h2) h2 h2 (sym_eq nat (minus (plus (minus n h2) h2) h2) (minus n h2) (minus_plus_r (minus n h2) h2)) (refl_equal nat h2))) (lift h2 d2 (TLRef (minus (plus (minus n h2) h2) h2))) (lift_lref_ge (minus (plus (minus n h2) h2) h2) h2 d2 (le_minus d2 (plus (minus n h2) h2) h2 (plus_le_compat d2 (minus n h2) h2 h2 (le_minus d2 n h2 H4) (le_n h2))))) n (le_plus_minus_sym h2 n (le_trans_plus_r d2 h2 n H4)))) x (lift_gen_lref_ge h2 (plus d2 h1) (minus (plus n h1) h2) (arith0 h2 d2 n H4 h1) x H5)))))))))))))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: ((\forall (x: T).(\forall (h1: nat).(\forall (h2: nat).(\forall (d1: nat).(\forall (d2: nat).((le d1 d2) \to ((eq T (lift h1 d1 t) (lift h2 (plus d2 h1) x)) \to (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T t (lift h2 d2 t2))))))))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (x: T).(\forall (h1: nat).(\forall (h2: nat).(\forall (d1: nat).(\forall (d2: nat).((le d1 d2) \to ((eq T (lift h1 d1 t0) (lift h2 (plus d2 h1) x)) \to (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T t0 (lift h2 d2 t2))))))))))))).(\lambda (x: T).(\lambda (h1: nat).(\lambda (h2: nat).(\lambda (d1: nat).(\lambda (d2: nat).(\lambda (H1: (le d1 d2)).(\lambda (H2: (eq T (lift h1 d1 (THead k t t0)) (lift h2 (plus d2 h1) x))).(K_ind (\lambda (k0: K).((eq T (lift h1 d1 (THead k0 t t0)) (lift h2 (plus d2 h1) x)) \to (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (THead k0 t t0) (lift h2 d2 t2)))))) (\lambda (b: B).(\lambda (H3: (eq T (lift h1 d1 (THead (Bind b) t t0)) (lift h2 (plus d2 h1) x))).(let H4 \def (eq_ind T (lift h1 d1 (THead (Bind b) t t0)) (\lambda (t: T).(eq T t (lift h2 (plus d2 h1) x))) H3 (THead (Bind b) (lift h1 d1 t) (lift h1 (S d1) t0)) (lift_bind b t t0 h1 d1)) in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h1 d1 t) (lift h2 (plus d2 h1) y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h1 (S d1) t0) (lift h2 (S (plus d2 h1)) z)))) (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (THead (Bind b) t t0) (lift h2 d2 t2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T x (THead (Bind b) x0 x1))).(\lambda (H6: (eq T (lift h1 d1 t) (lift h2 (plus d2 h1) x0))).(\lambda (H7: (eq T (lift h1 (S d1) t0) (lift h2 (S (plus d2 h1)) x1))).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Bind b) t t0) (lift h2 d2 t3))))) (ex2_ind T (\lambda (t2: T).(eq T x0 (lift h1 d1 t2))) (\lambda (t2: T).(eq T t (lift h2 d2 t2))) (ex2 T (\lambda (t2: T).(eq T (THead (Bind b) x0 x1) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (THead (Bind b) t t0) (lift h2 d2 t2)))) (\lambda (x2: T).(\lambda (H8: (eq T x0 (lift h1 d1 x2))).(\lambda (H9: (eq T t (lift h2 d2 x2))).(eq_ind_r T (lift h1 d1 x2) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Bind b) t2 x1) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Bind b) t t0) (lift h2 d2 t3))))) (eq_ind_r T (lift h2 d2 x2) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Bind b) (lift h1 d1 x2) x1) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Bind b) t2 t0) (lift h2 d2 t3))))) (let H10 \def (refl_equal nat (plus (S d2) h1)) in (let H11 \def (eq_ind nat (S (plus d2 h1)) (\lambda (n: nat).(eq T (lift h1 (S d1) t0) (lift h2 n x1))) H7 (plus (S d2) h1) H10) in (ex2_ind T (\lambda (t2: T).(eq T x1 (lift h1 (S d1) t2))) (\lambda (t2: T).(eq T t0 (lift h2 (S d2) t2))) (ex2 T (\lambda (t2: T).(eq T (THead (Bind b) (lift h1 d1 x2) x1) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (THead (Bind b) (lift h2 d2 x2) t0) (lift h2 d2 t2)))) (\lambda (x3: T).(\lambda (H12: (eq T x1 (lift h1 (S d1) x3))).(\lambda (H13: (eq T t0 (lift h2 (S d2) x3))).(eq_ind_r T (lift h1 (S d1) x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Bind b) (lift h1 d1 x2) t2) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Bind b) (lift h2 d2 x2) t0) (lift h2 d2 t3))))) (eq_ind_r T (lift h2 (S d2) x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Bind b) (lift h1 d1 x2) (lift h1 (S d1) x3)) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Bind b) (lift h2 d2 x2) t2) (lift h2 d2 t3))))) (ex_intro2 T (\lambda (t2: T).(eq T (THead (Bind b) (lift h1 d1 x2) (lift h1 (S d1) x3)) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (THead (Bind b) (lift h2 d2 x2) (lift h2 (S d2) x3)) (lift h2 d2 t2))) (THead (Bind b) x2 x3) (eq_ind_r T (THead (Bind b) (lift h1 d1 x2) (lift h1 (S d1) x3)) (\lambda (t2: T).(eq T (THead (Bind b) (lift h1 d1 x2) (lift h1 (S d1) x3)) t2)) (refl_equal T (THead (Bind b) (lift h1 d1 x2) (lift h1 (S d1) x3))) (lift h1 d1 (THead (Bind b) x2 x3)) (lift_bind b x2 x3 h1 d1)) (eq_ind_r T (THead (Bind b) (lift h2 d2 x2) (lift h2 (S d2) x3)) (\lambda (t2: T).(eq T (THead (Bind b) (lift h2 d2 x2) (lift h2 (S d2) x3)) t2)) (refl_equal T (THead (Bind b) (lift h2 d2 x2) (lift h2 (S d2) x3))) (lift h2 d2 (THead (Bind b) x2 x3)) (lift_bind b x2 x3 h2 d2))) t0 H13) x1 H12)))) (H0 x1 h1 h2 (S d1) (S d2) (le_S_n (S d1) (S d2) (lt_le_S (S d1) (S (S d2)) (lt_n_S d1 (S d2) (le_lt_n_Sm d1 d2 H1)))) H11)))) t H9) x0 H8)))) (H x0 h1 h2 d1 d2 H1 H6)) x H5)))))) (lift_gen_bind b (lift h1 d1 t) (lift h1 (S d1) t0) x h2 (plus d2 h1) H4))))) (\lambda (f: F).(\lambda (H3: (eq T (lift h1 d1 (THead (Flat f) t t0)) (lift h2 (plus d2 h1) x))).(let H4 \def (eq_ind T (lift h1 d1 (THead (Flat f) t t0)) (\lambda (t: T).(eq T t (lift h2 (plus d2 h1) x))) H3 (THead (Flat f) (lift h1 d1 t) (lift h1 d1 t0)) (lift_flat f t t0 h1 d1)) in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h1 d1 t) (lift h2 (plus d2 h1) y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h1 d1 t0) (lift h2 (plus d2 h1) z)))) (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (THead (Flat f) t t0) (lift h2 d2 t2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T x (THead (Flat f) x0 x1))).(\lambda (H6: (eq T (lift h1 d1 t) (lift h2 (plus d2 h1) x0))).(\lambda (H7: (eq T (lift h1 d1 t0) (lift h2 (plus d2 h1) x1))).(eq_ind_r T (THead (Flat f) x0 x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Flat f) t t0) (lift h2 d2 t3))))) (ex2_ind T (\lambda (t2: T).(eq T x0 (lift h1 d1 t2))) (\lambda (t2: T).(eq T t (lift h2 d2 t2))) (ex2 T (\lambda (t2: T).(eq T (THead (Flat f) x0 x1) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (THead (Flat f) t t0) (lift h2 d2 t2)))) (\lambda (x2: T).(\lambda (H8: (eq T x0 (lift h1 d1 x2))).(\lambda (H9: (eq T t (lift h2 d2 x2))).(eq_ind_r T (lift h1 d1 x2) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Flat f) t2 x1) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Flat f) t t0) (lift h2 d2 t3))))) (eq_ind_r T (lift h2 d2 x2) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Flat f) (lift h1 d1 x2) x1) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Flat f) t2 t0) (lift h2 d2 t3))))) (ex2_ind T (\lambda (t2: T).(eq T x1 (lift h1 d1 t2))) (\lambda (t2: T).(eq T t0 (lift h2 d2 t2))) (ex2 T (\lambda (t2: T).(eq T (THead (Flat f) (lift h1 d1 x2) x1) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (THead (Flat f) (lift h2 d2 x2) t0) (lift h2 d2 t2)))) (\lambda (x3: T).(\lambda (H10: (eq T x1 (lift h1 d1 x3))).(\lambda (H11: (eq T t0 (lift h2 d2 x3))).(eq_ind_r T (lift h1 d1 x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Flat f) (lift h1 d1 x2) t2) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Flat f) (lift h2 d2 x2) t0) (lift h2 d2 t3))))) (eq_ind_r T (lift h2 d2 x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Flat f) (lift h1 d1 x2) (lift h1 d1 x3)) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Flat f) (lift h2 d2 x2) t2) (lift h2 d2 t3))))) (ex_intro2 T (\lambda (t2: T).(eq T (THead (Flat f) (lift h1 d1 x2) (lift h1 d1 x3)) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3)) (lift h2 d2 t2))) (THead (Flat f) x2 x3) (eq_ind_r T (THead (Flat f) (lift h1 d1 x2) (lift h1 d1 x3)) (\lambda (t2: T).(eq T (THead (Flat f) (lift h1 d1 x2) (lift h1 d1 x3)) t2)) (refl_equal T (THead (Flat f) (lift h1 d1 x2) (lift h1 d1 x3))) (lift h1 d1 (THead (Flat f) x2 x3)) (lift_flat f x2 x3 h1 d1)) (eq_ind_r T (THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3)) (\lambda (t2: T).(eq T (THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3)) t2)) (refl_equal T (THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3))) (lift h2 d2 (THead (Flat f) x2 x3)) (lift_flat f x2 x3 h2 d2))) t0 H11) x1 H10)))) (H0 x1 h1 h2 d1 d2 H1 H7)) t H9) x0 H8)))) (H x0 h1 h2 d1 d2 H1 H6)) x H5)))))) (lift_gen_flat f (lift h1 d1 t) (lift h1 d1 t0) x h2 (plus d2 h1) H4))))) k H2))))))))))))) t1). + +theorem lift_free: + \forall (t: T).(\forall (h: nat).(\forall (k: nat).(\forall (d: nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to (eq T (lift k e (lift h d t)) (lift (plus k h) d t)))))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (k: nat).(\forall (d: nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to (eq T (lift k e (lift h d t0)) (lift (plus k h) d t0))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (k: nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (_: (le e (plus d h))).(\lambda (_: (le d e)).(eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (lift k e t0) (lift (plus k h) d (TSort n)))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T t0 (lift (plus k h) d (TSort n)))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (TSort n) t0)) (refl_equal T (TSort n)) (lift (plus k h) d (TSort n)) (lift_sort n (plus k h) d)) (lift k e (TSort n)) (lift_sort n k e)) (lift h d (TSort n)) (lift_sort n h d))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (k: nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (H: (le e (plus d h))).(\lambda (H0: (le d e)).(lt_le_e n d (eq T (lift k e (lift h d (TLRef n))) (lift (plus k h) d (TLRef n))) (\lambda (H1: (lt n d)).(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (lift k e t0) (lift (plus k h) d (TLRef n)))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 (lift (plus k h) d (TLRef n)))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) t0)) (refl_equal T (TLRef n)) (lift (plus k h) d (TLRef n)) (lift_lref_lt n (plus k h) d H1)) (lift k e (TLRef n)) (lift_lref_lt n k e (lt_le_trans n d e H1 H0))) (lift h d (TLRef n)) (lift_lref_lt n h d H1))) (\lambda (H1: (le d n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(eq T (lift k e t0) (lift (plus k h) d (TLRef n)))) (eq_ind_r T (TLRef (plus (plus n h) k)) (\lambda (t0: T).(eq T t0 (lift (plus k h) d (TLRef n)))) (eq_ind_r T (TLRef (plus n (plus k h))) (\lambda (t0: T).(eq T (TLRef (plus (plus n h) k)) t0)) (f_equal nat T TLRef (plus (plus n h) k) (plus n (plus k h)) (plus_permute_2_in_3_assoc n h k)) (lift (plus k h) d (TLRef n)) (lift_lref_ge n (plus k h) d H1)) (lift k e (TLRef (plus n h))) (lift_lref_ge (plus n h) k e (le_trans e (plus d h) (plus n h) H (plus_le_compat d n h h H1 (le_n h))))) (lift h d (TLRef n)) (lift_lref_ge n h d H1))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (H: ((\forall (h: nat).(\forall (k: nat).(\forall (d: nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to (eq T (lift k e (lift h d t0)) (lift (plus k h) d t0)))))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (h: nat).(\forall (k: nat).(\forall (d: nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to (eq T (lift k e (lift h d t1)) (lift (plus k h) d t1)))))))))).(\lambda (h: nat).(\lambda (k0: nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (H1: (le e (plus d h))).(\lambda (H2: (le d e)).(eq_ind_r T (THead k (lift h d t0) (lift h (s k d) t1)) (\lambda (t2: T).(eq T (lift k0 e t2) (lift (plus k0 h) d (THead k t0 t1)))) (eq_ind_r T (THead k (lift k0 e (lift h d t0)) (lift k0 (s k e) (lift h (s k d) t1))) (\lambda (t2: T).(eq T t2 (lift (plus k0 h) d (THead k t0 t1)))) (eq_ind_r T (THead k (lift (plus k0 h) d t0) (lift (plus k0 h) (s k d) t1)) (\lambda (t2: T).(eq T (THead k (lift k0 e (lift h d t0)) (lift k0 (s k e) (lift h (s k d) t1))) t2)) (f_equal3 K T T T THead k k (lift k0 e (lift h d t0)) (lift (plus k0 h) d t0) (lift k0 (s k e) (lift h (s k d) t1)) (lift (plus k0 h) (s k d) t1) (refl_equal K k) (H h k0 d e H1 H2) (H0 h k0 (s k d) (s k e) (eq_ind nat (s k (plus d h)) (\lambda (n: nat).(le (s k e) n)) (s_le k e (plus d h) H1) (plus (s k d) h) (s_plus k d h)) (s_le k d e H2))) (lift (plus k0 h) d (THead k t0 t1)) (lift_head k t0 t1 (plus k0 h) d)) (lift k0 e (THead k (lift h d t0) (lift h (s k d) t1))) (lift_head k (lift h d t0) (lift h (s k d) t1) k0 e)) (lift h d (THead k t0 t1)) (lift_head k t0 t1 h d))))))))))))) t). + +theorem lift_d: + \forall (t: T).(\forall (h: nat).(\forall (k: nat).(\forall (d: nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k d) (lift k e t)) (lift k e (lift h d t)))))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (k: nat).(\forall (d: nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k d) (lift k e t0)) (lift k e (lift h d t0))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (k: nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (_: (le e d)).(eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (lift h (plus k d) t0) (lift k e (lift h d (TSort n))))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T t0 (lift k e (lift h d (TSort n))))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (TSort n) (lift k e t0))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (TSort n) t0)) (refl_equal T (TSort n)) (lift k e (TSort n)) (lift_sort n k e)) (lift h d (TSort n)) (lift_sort n h d)) (lift h (plus k d) (TSort n)) (lift_sort n h (plus k d))) (lift k e (TSort n)) (lift_sort n k e)))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (k: nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (H: (le e d)).(lt_le_e n e (eq T (lift h (plus k d) (lift k e (TLRef n))) (lift k e (lift h d (TLRef n)))) (\lambda (H0: (lt n e)).(let H1 \def (lt_le_trans n e d H0 H) in (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (lift h (plus k d) t0) (lift k e (lift h d (TLRef n))))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 (lift k e (lift h d (TLRef n))))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) (lift k e t0))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) t0)) (refl_equal T (TLRef n)) (lift k e (TLRef n)) (lift_lref_lt n k e H0)) (lift h d (TLRef n)) (lift_lref_lt n h d H1)) (lift h (plus k d) (TLRef n)) (lift_lref_lt n h (plus k d) (lt_le_trans n d (plus k d) H1 (le_plus_r k d)))) (lift k e (TLRef n)) (lift_lref_lt n k e H0)))) (\lambda (H0: (le e n)).(eq_ind_r T (TLRef (plus n k)) (\lambda (t0: T).(eq T (lift h (plus k d) t0) (lift k e (lift h d (TLRef n))))) (eq_ind_r nat (plus d k) (\lambda (n0: nat).(eq T (lift h n0 (TLRef (plus n k))) (lift k e (lift h d (TLRef n))))) (lt_le_e n d (eq T (lift h (plus d k) (TLRef (plus n k))) (lift k e (lift h d (TLRef n)))) (\lambda (H1: (lt n d)).(eq_ind_r T (TLRef (plus n k)) (\lambda (t0: T).(eq T t0 (lift k e (lift h d (TLRef n))))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef (plus n k)) (lift k e t0))) (eq_ind_r T (TLRef (plus n k)) (\lambda (t0: T).(eq T (TLRef (plus n k)) t0)) (refl_equal T (TLRef (plus n k))) (lift k e (TLRef n)) (lift_lref_ge n k e H0)) (lift h d (TLRef n)) (lift_lref_lt n h d H1)) (lift h (plus d k) (TLRef (plus n k))) (lift_lref_lt (plus n k) h (plus d k) (lt_le_S (plus n k) (plus d k) (plus_lt_compat_r n d k H1))))) (\lambda (H1: (le d n)).(eq_ind_r T (TLRef (plus (plus n k) h)) (\lambda (t0: T).(eq T t0 (lift k e (lift h d (TLRef n))))) (eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(eq T (TLRef (plus (plus n k) h)) (lift k e t0))) (eq_ind_r T (TLRef (plus (plus n h) k)) (\lambda (t0: T).(eq T (TLRef (plus (plus n k) h)) t0)) (f_equal nat T TLRef (plus (plus n k) h) (plus (plus n h) k) (sym_eq nat (plus (plus n h) k) (plus (plus n k) h) (plus_permute_2_in_3 n h k))) (lift k e (TLRef (plus n h))) (lift_lref_ge (plus n h) k e (le_S_n e (plus n h) (lt_le_S e (S (plus n h)) (le_lt_n_Sm e (plus n h) (le_plus_trans e n h H0)))))) (lift h d (TLRef n)) (lift_lref_ge n h d H1)) (lift h (plus d k) (TLRef (plus n k))) (lift_lref_ge (plus n k) h (plus d k) (le_S_n (plus d k) (plus n k) (lt_le_S (plus d k) (S (plus n k)) (le_lt_n_Sm (plus d k) (plus n k) (plus_le_compat d n k k H1 (le_n k))))))))) (plus k d) (plus_comm k d)) (lift k e (TLRef n)) (lift_lref_ge n k e H0)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (H: ((\forall (h: nat).(\forall (k: nat).(\forall (d: nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k d) (lift k e t0)) (lift k e (lift h d t0)))))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (h: nat).(\forall (k: nat).(\forall (d: nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k d) (lift k e t1)) (lift k e (lift h d t1)))))))))).(\lambda (h: nat).(\lambda (k0: nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (H1: (le e d)).(eq_ind_r T (THead k (lift k0 e t0) (lift k0 (s k e) t1)) (\lambda (t2: T).(eq T (lift h (plus k0 d) t2) (lift k0 e (lift h d (THead k t0 t1))))) (eq_ind_r T (THead k (lift h (plus k0 d) (lift k0 e t0)) (lift h (s k (plus k0 d)) (lift k0 (s k e) t1))) (\lambda (t2: T).(eq T t2 (lift k0 e (lift h d (THead k t0 t1))))) (eq_ind_r T (THead k (lift h d t0) (lift h (s k d) t1)) (\lambda (t2: T).(eq T (THead k (lift h (plus k0 d) (lift k0 e t0)) (lift h (s k (plus k0 d)) (lift k0 (s k e) t1))) (lift k0 e t2))) (eq_ind_r T (THead k (lift k0 e (lift h d t0)) (lift k0 (s k e) (lift h (s k d) t1))) (\lambda (t2: T).(eq T (THead k (lift h (plus k0 d) (lift k0 e t0)) (lift h (s k (plus k0 d)) (lift k0 (s k e) t1))) t2)) (eq_ind_r nat (plus k0 (s k d)) (\lambda (n: nat).(eq T (THead k (lift h (plus k0 d) (lift k0 e t0)) (lift h n (lift k0 (s k e) t1))) (THead k (lift k0 e (lift h d t0)) (lift k0 (s k e) (lift h (s k d) t1))))) (f_equal3 K T T T THead k k (lift h (plus k0 d) (lift k0 e t0)) (lift k0 e (lift h d t0)) (lift h (plus k0 (s k d)) (lift k0 (s k e) t1)) (lift k0 (s k e) (lift h (s k d) t1)) (refl_equal K k) (H h k0 d e H1) (H0 h k0 (s k d) (s k e) (s_le k e d H1))) (s k (plus k0 d)) (s_plus_sym k k0 d)) (lift k0 e (THead k (lift h d t0) (lift h (s k d) t1))) (lift_head k (lift h d t0) (lift h (s k d) t1) k0 e)) (lift h d (THead k t0 t1)) (lift_head k t0 t1 h d)) (lift h (plus k0 d) (THead k (lift k0 e t0) (lift k0 (s k e) t1))) (lift_head k (lift k0 e t0) (lift k0 (s k e) t1) h (plus k0 d))) (lift k0 e (THead k t0 t1)) (lift_head k t0 t1 k0 e)))))))))))) t). + +theorem lift_weight_map: + \forall (t: T).(\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to nat))).(((\forall (m: nat).((le d m) \to (eq nat (f m) O)))) \to (eq nat (weight_map f (lift h d t)) (weight_map f t)))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to nat))).(((\forall (m: nat).((le d m) \to (eq nat (f m) O)))) \to (eq nat (weight_map f (lift h d t0)) (weight_map f t0))))))) (\lambda (n: nat).(\lambda (_: nat).(\lambda (d: nat).(\lambda (f: ((nat \to nat))).(\lambda (_: ((\forall (m: nat).((le d m) \to (eq nat (f m) O))))).(refl_equal nat (weight_map f (TSort n)))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat \to nat))).(\lambda (H: ((\forall (m: nat).((le d m) \to (eq nat (f m) O))))).(lt_le_e n d (eq nat (weight_map f (lift h d (TLRef n))) (weight_map f (TLRef n))) (\lambda (H0: (lt n d)).(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq nat (weight_map f t0) (weight_map f (TLRef n)))) (refl_equal nat (weight_map f (TLRef n))) (lift h d (TLRef n)) (lift_lref_lt n h d H0))) (\lambda (H0: (le d n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(eq nat (weight_map f t0) (weight_map f (TLRef n)))) (eq_ind_r nat O (\lambda (n0: nat).(eq nat (f (plus n h)) n0)) (H (plus n h) (le_S_n d (plus n h) (le_n_S d (plus n h) (le_plus_trans d n h H0)))) (f n) (H n H0)) (lift h d (TLRef n)) (lift_lref_ge n h d H0))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (H: ((\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to nat))).(((\forall (m: nat).((le d m) \to (eq nat (f m) O)))) \to (eq nat (weight_map f (lift h d t0)) (weight_map f t0)))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to nat))).(((\forall (m: nat).((le d m) \to (eq nat (f m) O)))) \to (eq nat (weight_map f (lift h d t1)) (weight_map f t1)))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat \to nat))).(\lambda (H1: ((\forall (m: nat).((le d m) \to (eq nat (f m) O))))).(K_ind (\lambda (k0: K).(eq nat (weight_map f (lift h d (THead k0 t0 t1))) (weight_map f (THead k0 t0 t1)))) (\lambda (b: B).(eq_ind_r T (THead (Bind b) (lift h d t0) (lift h (s (Bind b) d) t1)) (\lambda (t2: T).(eq nat (weight_map f t2) (weight_map f (THead (Bind b) t0 t1)))) (B_ind (\lambda (b0: B).(eq nat (match b0 with [Abbr \Rightarrow (S (plus (weight_map f (lift h d t0)) (weight_map (wadd f (S (weight_map f (lift h d t0)))) (lift h (S d) t1)))) | Abst \Rightarrow (S (plus (weight_map f (lift h d t0)) (weight_map (wadd f O) (lift h (S d) t1)))) | Void \Rightarrow (S (plus (weight_map f (lift h d t0)) (weight_map (wadd f O) (lift h (S d) t1))))]) (match b0 with [Abbr \Rightarrow (S (plus (weight_map f t0) (weight_map (wadd f (S (weight_map f t0))) t1))) | Abst \Rightarrow (S (plus (weight_map f t0) (weight_map (wadd f O) t1))) | Void \Rightarrow (S (plus (weight_map f t0) (weight_map (wadd f O) t1)))]))) (eq_ind_r nat (weight_map f t0) (\lambda (n: nat).(eq nat (S (plus n (weight_map (wadd f (S n)) (lift h (S d) t1)))) (S (plus (weight_map f t0) (weight_map (wadd f (S (weight_map f t0))) t1))))) (eq_ind_r nat (weight_map (wadd f (S (weight_map f t0))) t1) (\lambda (n: nat).(eq nat (S (plus (weight_map f t0) n)) (S (plus (weight_map f t0) (weight_map (wadd f (S (weight_map f t0))) t1))))) (refl_equal nat (S (plus (weight_map f t0) (weight_map (wadd f (S (weight_map f t0))) t1)))) (weight_map (wadd f (S (weight_map f t0))) (lift h (S d) t1)) (H0 h (S d) (wadd f (S (weight_map f t0))) (\lambda (m: nat).(\lambda (H2: (le (S d) m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d n)) (eq nat (wadd f (S (weight_map f t0)) m) O) (\lambda (x: nat).(\lambda (H3: (eq nat m (S x))).(\lambda (H4: (le d x)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (wadd f (S (weight_map f t0)) n) O)) (H1 x H4) m H3)))) (le_gen_S d m H2)))))) (weight_map f (lift h d t0)) (H h d f H1)) (eq_ind_r nat (weight_map (wadd f O) t1) (\lambda (n: nat).(eq nat (S (plus (weight_map f (lift h d t0)) n)) (S (plus (weight_map f t0) (weight_map (wadd f O) t1))))) (f_equal nat nat S (plus (weight_map f (lift h d t0)) (weight_map (wadd f O) t1)) (plus (weight_map f t0) (weight_map (wadd f O) t1)) (f_equal2 nat nat nat plus (weight_map f (lift h d t0)) (weight_map f t0) (weight_map (wadd f O) t1) (weight_map (wadd f O) t1) (H h d f H1) (refl_equal nat (weight_map (wadd f O) t1)))) (weight_map (wadd f O) (lift h (S d) t1)) (H0 h (S d) (wadd f O) (\lambda (m: nat).(\lambda (H2: (le (S d) m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d n)) (eq nat (wadd f O m) O) (\lambda (x: nat).(\lambda (H3: (eq nat m (S x))).(\lambda (H4: (le d x)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (wadd f O n) O)) (H1 x H4) m H3)))) (le_gen_S d m H2)))))) (eq_ind_r nat (weight_map (wadd f O) t1) (\lambda (n: nat).(eq nat (S (plus (weight_map f (lift h d t0)) n)) (S (plus (weight_map f t0) (weight_map (wadd f O) t1))))) (f_equal nat nat S (plus (weight_map f (lift h d t0)) (weight_map (wadd f O) t1)) (plus (weight_map f t0) (weight_map (wadd f O) t1)) (f_equal2 nat nat nat plus (weight_map f (lift h d t0)) (weight_map f t0) (weight_map (wadd f O) t1) (weight_map (wadd f O) t1) (H h d f H1) (refl_equal nat (weight_map (wadd f O) t1)))) (weight_map (wadd f O) (lift h (S d) t1)) (H0 h (S d) (wadd f O) (\lambda (m: nat).(\lambda (H2: (le (S d) m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d n)) (eq nat (wadd f O m) O) (\lambda (x: nat).(\lambda (H3: (eq nat m (S x))).(\lambda (H4: (le d x)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (wadd f O n) O)) (H1 x H4) m H3)))) (le_gen_S d m H2)))))) b) (lift h d (THead (Bind b) t0 t1)) (lift_head (Bind b) t0 t1 h d))) (\lambda (f0: F).(eq_ind_r T (THead (Flat f0) (lift h d t0) (lift h (s (Flat f0) d) t1)) (\lambda (t2: T).(eq nat (weight_map f t2) (weight_map f (THead (Flat f0) t0 t1)))) (f_equal nat nat S (plus (weight_map f (lift h d t0)) (weight_map f (lift h d t1))) (plus (weight_map f t0) (weight_map f t1)) (f_equal2 nat nat nat plus (weight_map f (lift h d t0)) (weight_map f t0) (weight_map f (lift h d t1)) (weight_map f t1) (H h d f H1) (H0 h d f H1))) (lift h d (THead (Flat f0) t0 t1)) (lift_head (Flat f0) t0 t1 h d))) k)))))))))) t). + +theorem lift_weight: + \forall (t: T).(\forall (h: nat).(\forall (d: nat).(eq nat (weight (lift h d t)) (weight t)))) +\def + \lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(lift_weight_map t h d (\lambda (_: nat).O) (\lambda (m: nat).(\lambda (_: (le d m)).(refl_equal nat O)))))). + +theorem lift_weight_add: + \forall (w: nat).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).((lt m d) \to (eq nat (g m) (f m))))) \to ((eq nat (g d) w) \to (((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m))))) \to (eq nat (weight_map f (lift h d t)) (weight_map g (lift (S h) d t))))))))))) +\def + \lambda (w: nat).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).((lt m d) \to (eq nat (g m) (f m))))) \to ((eq nat (g d) w) \to (((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m))))) \to (eq nat (weight_map f (lift h d t0)) (weight_map g (lift (S h) d t0))))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (_: ((\forall (m: nat).((lt m d) \to (eq nat (g m) (f m)))))).(\lambda (_: (eq nat (g d) w)).(\lambda (_: ((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m)))))).(refl_equal nat (weight_map g (lift (S h) d (TSort n)))))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H: ((\forall (m: nat).((lt m d) \to (eq nat (g m) (f m)))))).(\lambda (_: (eq nat (g d) w)).(\lambda (H1: ((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m)))))).(lt_le_e n d (eq nat (weight_map f (lift h d (TLRef n))) (weight_map g (lift (S h) d (TLRef n)))) (\lambda (H2: (lt n d)).(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq nat (weight_map f t0) (weight_map g (lift (S h) d (TLRef n))))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq nat (weight_map f (TLRef n)) (weight_map g t0))) (sym_equal nat (g n) (f n) (H n H2)) (lift (S h) d (TLRef n)) (lift_lref_lt n (S h) d H2)) (lift h d (TLRef n)) (lift_lref_lt n h d H2))) (\lambda (H2: (le d n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(eq nat (weight_map f t0) (weight_map g (lift (S h) d (TLRef n))))) (eq_ind_r T (TLRef (plus n (S h))) (\lambda (t0: T).(eq nat (weight_map f (TLRef (plus n h))) (weight_map g t0))) (eq_ind nat (S (plus n h)) (\lambda (n0: nat).(eq nat (f (plus n h)) (g n0))) (sym_equal nat (g (S (plus n h))) (f (plus n h)) (H1 (plus n h) (le_plus_trans d n h H2))) (plus n (S h)) (plus_n_Sm n h)) (lift (S h) d (TLRef n)) (lift_lref_ge n (S h) d H2)) (lift h d (TLRef n)) (lift_lref_ge n h d H2)))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (H: ((\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).((lt m d) \to (eq nat (g m) (f m))))) \to ((eq nat (g d) w) \to (((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m))))) \to (eq nat (weight_map f (lift h d t0)) (weight_map g (lift (S h) d t0)))))))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).((lt m d) \to (eq nat (g m) (f m))))) \to ((eq nat (g d) w) \to (((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m))))) \to (eq nat (weight_map f (lift h d t1)) (weight_map g (lift (S h) d t1)))))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H1: ((\forall (m: nat).((lt m d) \to (eq nat (g m) (f m)))))).(\lambda (H2: (eq nat (g d) w)).(\lambda (H3: ((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m)))))).(K_ind (\lambda (k0: K).(eq nat (weight_map f (lift h d (THead k0 t0 t1))) (weight_map g (lift (S h) d (THead k0 t0 t1))))) (\lambda (b: B).(eq_ind_r T (THead (Bind b) (lift h d t0) (lift h (s (Bind b) d) t1)) (\lambda (t2: T).(eq nat (weight_map f t2) (weight_map g (lift (S h) d (THead (Bind b) t0 t1))))) (eq_ind_r T (THead (Bind b) (lift (S h) d t0) (lift (S h) (s (Bind b) d) t1)) (\lambda (t2: T).(eq nat (weight_map f (THead (Bind b) (lift h d t0) (lift h (s (Bind b) d) t1))) (weight_map g t2))) (B_ind (\lambda (b0: B).(eq nat (match b0 with [Abbr \Rightarrow (S (plus (weight_map f (lift h d t0)) (weight_map (wadd f (S (weight_map f (lift h d t0)))) (lift h (S d) t1)))) | Abst \Rightarrow (S (plus (weight_map f (lift h d t0)) (weight_map (wadd f O) (lift h (S d) t1)))) | Void \Rightarrow (S (plus (weight_map f (lift h d t0)) (weight_map (wadd f O) (lift h (S d) t1))))]) (match b0 with [Abbr \Rightarrow (S (plus (weight_map g (lift (S h) d t0)) (weight_map (wadd g (S (weight_map g (lift (S h) d t0)))) (lift (S h) (S d) t1)))) | Abst \Rightarrow (S (plus (weight_map g (lift (S h) d t0)) (weight_map (wadd g O) (lift (S h) (S d) t1)))) | Void \Rightarrow (S (plus (weight_map g (lift (S h) d t0)) (weight_map (wadd g O) (lift (S h) (S d) t1))))]))) (f_equal nat nat S (plus (weight_map f (lift h d t0)) (weight_map (wadd f (S (weight_map f (lift h d t0)))) (lift h (S d) t1))) (plus (weight_map g (lift (S h) d t0)) (weight_map (wadd g (S (weight_map g (lift (S h) d t0)))) (lift (S h) (S d) t1))) (f_equal2 nat nat nat plus (weight_map f (lift h d t0)) (weight_map g (lift (S h) d t0)) (weight_map (wadd f (S (weight_map f (lift h d t0)))) (lift h (S d) t1)) (weight_map (wadd g (S (weight_map g (lift (S h) d t0)))) (lift (S h) (S d) t1)) (H h d f g H1 H2 H3) (H0 h (S d) (wadd f (S (weight_map f (lift h d t0)))) (wadd g (S (weight_map g (lift (S h) d t0)))) (\lambda (m: nat).(\lambda (H4: (lt m (S d))).(or_ind (eq nat m O) (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d))) (eq nat (wadd g (S (weight_map g (lift (S h) d t0))) m) (wadd f (S (weight_map f (lift h d t0))) m)) (\lambda (H5: (eq nat m O)).(eq_ind_r nat O (\lambda (n: nat).(eq nat (wadd g (S (weight_map g (lift (S h) d t0))) n) (wadd f (S (weight_map f (lift h d t0))) n))) (f_equal nat nat S (weight_map g (lift (S h) d t0)) (weight_map f (lift h d t0)) (sym_equal nat (weight_map f (lift h d t0)) (weight_map g (lift (S h) d t0)) (H h d f g H1 H2 H3))) m H5)) (\lambda (H5: (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda (m: nat).(lt m d)))).(ex2_ind nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d)) (eq nat (wadd g (S (weight_map g (lift (S h) d t0))) m) (wadd f (S (weight_map f (lift h d t0))) m)) (\lambda (x: nat).(\lambda (H6: (eq nat m (S x))).(\lambda (H7: (lt x d)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (wadd g (S (weight_map g (lift (S h) d t0))) n) (wadd f (S (weight_map f (lift h d t0))) n))) (H1 x H7) m H6)))) H5)) (lt_gen_xS m d H4)))) H2 (\lambda (m: nat).(\lambda (H4: (le (S d) m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d n)) (eq nat (g m) (wadd f (S (weight_map f (lift h d t0))) m)) (\lambda (x: nat).(\lambda (H5: (eq nat m (S x))).(\lambda (H6: (le d x)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (g n) (wadd f (S (weight_map f (lift h d t0))) n))) (H3 x H6) m H5)))) (le_gen_S d m H4))))))) (f_equal nat nat S (plus (weight_map f (lift h d t0)) (weight_map (wadd f O) (lift h (S d) t1))) (plus (weight_map g (lift (S h) d t0)) (weight_map (wadd g O) (lift (S h) (S d) t1))) (f_equal2 nat nat nat plus (weight_map f (lift h d t0)) (weight_map g (lift (S h) d t0)) (weight_map (wadd f O) (lift h (S d) t1)) (weight_map (wadd g O) (lift (S h) (S d) t1)) (H h d f g H1 H2 H3) (H0 h (S d) (wadd f O) (wadd g O) (\lambda (m: nat).(\lambda (H4: (lt m (S d))).(or_ind (eq nat m O) (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d))) (eq nat (wadd g O m) (wadd f O m)) (\lambda (H5: (eq nat m O)).(eq_ind_r nat O (\lambda (n: nat).(eq nat (wadd g O n) (wadd f O n))) (refl_equal nat O) m H5)) (\lambda (H5: (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda (m: nat).(lt m d)))).(ex2_ind nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d)) (eq nat (wadd g O m) (wadd f O m)) (\lambda (x: nat).(\lambda (H6: (eq nat m (S x))).(\lambda (H7: (lt x d)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (wadd g O n) (wadd f O n))) (H1 x H7) m H6)))) H5)) (lt_gen_xS m d H4)))) H2 (\lambda (m: nat).(\lambda (H4: (le (S d) m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d n)) (eq nat (g m) (wadd f O m)) (\lambda (x: nat).(\lambda (H5: (eq nat m (S x))).(\lambda (H6: (le d x)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (g n) (wadd f O n))) (H3 x H6) m H5)))) (le_gen_S d m H4))))))) (f_equal nat nat S (plus (weight_map f (lift h d t0)) (weight_map (wadd f O) (lift h (S d) t1))) (plus (weight_map g (lift (S h) d t0)) (weight_map (wadd g O) (lift (S h) (S d) t1))) (f_equal2 nat nat nat plus (weight_map f (lift h d t0)) (weight_map g (lift (S h) d t0)) (weight_map (wadd f O) (lift h (S d) t1)) (weight_map (wadd g O) (lift (S h) (S d) t1)) (H h d f g H1 H2 H3) (H0 h (S d) (wadd f O) (wadd g O) (\lambda (m: nat).(\lambda (H4: (lt m (S d))).(or_ind (eq nat m O) (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d))) (eq nat (wadd g O m) (wadd f O m)) (\lambda (H5: (eq nat m O)).(eq_ind_r nat O (\lambda (n: nat).(eq nat (wadd g O n) (wadd f O n))) (refl_equal nat O) m H5)) (\lambda (H5: (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda (m: nat).(lt m d)))).(ex2_ind nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d)) (eq nat (wadd g O m) (wadd f O m)) (\lambda (x: nat).(\lambda (H6: (eq nat m (S x))).(\lambda (H7: (lt x d)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (wadd g O n) (wadd f O n))) (H1 x H7) m H6)))) H5)) (lt_gen_xS m d H4)))) H2 (\lambda (m: nat).(\lambda (H4: (le (S d) m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d n)) (eq nat (g m) (wadd f O m)) (\lambda (x: nat).(\lambda (H5: (eq nat m (S x))).(\lambda (H6: (le d x)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (g n) (wadd f O n))) (H3 x H6) m H5)))) (le_gen_S d m H4))))))) b) (lift (S h) d (THead (Bind b) t0 t1)) (lift_head (Bind b) t0 t1 (S h) d)) (lift h d (THead (Bind b) t0 t1)) (lift_head (Bind b) t0 t1 h d))) (\lambda (f0: F).(eq_ind_r T (THead (Flat f0) (lift h d t0) (lift h (s (Flat f0) d) t1)) (\lambda (t2: T).(eq nat (weight_map f t2) (weight_map g (lift (S h) d (THead (Flat f0) t0 t1))))) (eq_ind_r T (THead (Flat f0) (lift (S h) d t0) (lift (S h) (s (Flat f0) d) t1)) (\lambda (t2: T).(eq nat (weight_map f (THead (Flat f0) (lift h d t0) (lift h (s (Flat f0) d) t1))) (weight_map g t2))) (f_equal nat nat S (plus (weight_map f (lift h d t0)) (weight_map f (lift h d t1))) (plus (weight_map g (lift (S h) d t0)) (weight_map g (lift (S h) d t1))) (f_equal2 nat nat nat plus (weight_map f (lift h d t0)) (weight_map g (lift (S h) d t0)) (weight_map f (lift h d t1)) (weight_map g (lift (S h) d t1)) (H h d f g H1 H2 H3) (H0 h d f g H1 H2 H3))) (lift (S h) d (THead (Flat f0) t0 t1)) (lift_head (Flat f0) t0 t1 (S h) d)) (lift h d (THead (Flat f0) t0 t1)) (lift_head (Flat f0) t0 t1 h d))) k))))))))))))) t)). + +theorem lift_weight_add_O: + \forall (w: nat).(\forall (t: T).(\forall (h: nat).(\forall (f: ((nat \to nat))).(eq nat (weight_map f (lift h O t)) (weight_map (wadd f w) (lift (S h) O t)))))) +\def + \lambda (w: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (f: ((nat \to nat))).(lift_weight_add (plus (wadd f w O) O) t h O f (wadd f w) (\lambda (m: nat).(\lambda (H: (lt m O)).(let H0 \def (match H return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to (eq nat (wadd f w m) (f m))))) with [le_n \Rightarrow (\lambda (H0: (eq nat (S m) O)).(let H1 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind (eq nat (wadd f w m) (f m)) H1))) | (le_S m0 H0) \Rightarrow (\lambda (H1: (eq nat (S m0) O)).((let H2 \def (eq_ind nat (S m0) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind ((le (S m) m0) \to (eq nat (wadd f w m) (f m))) H2)) H0))]) in (H0 (refl_equal nat O))))) (plus_n_O (wadd f w O)) (\lambda (m: nat).(\lambda (_: (le O m)).(refl_equal nat (f m)))))))). + +theorem lift_tlt_dx: + \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).(tlt t (THead k u (lift h d t))))))) +\def + \lambda (k: K).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(eq_ind nat (weight (lift h d t)) (\lambda (n: nat).(lt n (weight (THead k u (lift h d t))))) (tlt_head_dx k u (lift h d t)) (weight t) (lift_weight t h d)))))). + +inductive PList: Set \def +| PNil: PList +| PCons: nat \to (nat \to (PList \to PList)). + +definition PConsTail: + PList \to (nat \to (nat \to PList)) +\def + let rec PConsTail (hds: PList) on hds: (nat \to (nat \to PList)) \def (\lambda (h0: nat).(\lambda (d0: nat).(match hds with [PNil \Rightarrow (PCons h0 d0 PNil) | (PCons h d hds0) \Rightarrow (PCons h d (PConsTail hds0 h0 d0))]))) in PConsTail. + +definition trans: + PList \to (nat \to nat) +\def + let rec trans (hds: PList) on hds: (nat \to nat) \def (\lambda (i: nat).(match hds with [PNil \Rightarrow i | (PCons h d hds0) \Rightarrow (let j \def (trans hds0 i) in (match (blt j d) with [true \Rightarrow j | false \Rightarrow (plus j h)]))])) in trans. + +definition Ss: + PList \to PList +\def + let rec Ss (hds: PList) on hds: PList \def (match hds with [PNil \Rightarrow PNil | (PCons h d hds0) \Rightarrow (PCons h (S d) (Ss hds0))]) in Ss. + +definition lift1: + PList \to (T \to T) +\def + let rec lift1 (hds: PList) on hds: (T \to T) \def (\lambda (t: T).(match hds with [PNil \Rightarrow t | (PCons h d hds0) \Rightarrow (lift h d (lift1 hds0 t))])) in lift1. + +definition lifts1: + PList \to (TList \to TList) +\def + let rec lifts1 (hds: PList) (ts: TList) on ts: TList \def (match ts with [TNil \Rightarrow TNil | (TCons t ts0) \Rightarrow (TCons (lift1 hds t) (lifts1 hds ts0))]) in lifts1. + +theorem lift1_lref: + \forall (hds: PList).(\forall (i: nat).(eq T (lift1 hds (TLRef i)) (TLRef (trans hds i)))) +\def + \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (i: nat).(eq T (lift1 p (TLRef i)) (TLRef (trans p i))))) (\lambda (i: nat).(refl_equal T (TLRef (trans PNil i)))) (\lambda (h: nat).(\lambda (d: nat).(\lambda (p: PList).(\lambda (H: ((\forall (i: nat).(eq T (lift1 p (TLRef i)) (TLRef (trans p i)))))).(\lambda (i: nat).(eq_ind_r T (TLRef (trans p i)) (\lambda (t: T).(eq T (lift h d t) (TLRef (match (blt (trans p i) d) with [true \Rightarrow (trans p i) | false \Rightarrow (plus (trans p i) h)])))) (refl_equal T (TLRef (match (blt (trans p i) d) with [true \Rightarrow (trans p i) | false \Rightarrow (plus (trans p i) h)]))) (lift1 p (TLRef i)) (H i))))))) hds). + +theorem lift1_bind: + \forall (b: B).(\forall (hds: PList).(\forall (u: T).(\forall (t: T).(eq T (lift1 hds (THead (Bind b) u t)) (THead (Bind b) (lift1 hds u) (lift1 (Ss hds) t)))))) +\def + \lambda (b: B).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (u: T).(\forall (t: T).(eq T (lift1 p (THead (Bind b) u t)) (THead (Bind b) (lift1 p u) (lift1 (Ss p) t)))))) (\lambda (u: T).(\lambda (t: T).(refl_equal T (THead (Bind b) (lift1 PNil u) (lift1 (Ss PNil) t))))) (\lambda (h: nat).(\lambda (d: nat).(\lambda (p: PList).(\lambda (H: ((\forall (u: T).(\forall (t: T).(eq T (lift1 p (THead (Bind b) u t)) (THead (Bind b) (lift1 p u) (lift1 (Ss p) t))))))).(\lambda (u: T).(\lambda (t: T).(eq_ind_r T (THead (Bind b) (lift1 p u) (lift1 (Ss p) t)) (\lambda (t0: T).(eq T (lift h d t0) (THead (Bind b) (lift h d (lift1 p u)) (lift h (S d) (lift1 (Ss p) t))))) (eq_ind_r T (THead (Bind b) (lift h d (lift1 p u)) (lift h (S d) (lift1 (Ss p) t))) (\lambda (t0: T).(eq T t0 (THead (Bind b) (lift h d (lift1 p u)) (lift h (S d) (lift1 (Ss p) t))))) (refl_equal T (THead (Bind b) (lift h d (lift1 p u)) (lift h (S d) (lift1 (Ss p) t)))) (lift h d (THead (Bind b) (lift1 p u) (lift1 (Ss p) t))) (lift_bind b (lift1 p u) (lift1 (Ss p) t) h d)) (lift1 p (THead (Bind b) u t)) (H u t)))))))) hds)). + +theorem lift1_flat: + \forall (f: F).(\forall (hds: PList).(\forall (u: T).(\forall (t: T).(eq T (lift1 hds (THead (Flat f) u t)) (THead (Flat f) (lift1 hds u) (lift1 hds t)))))) +\def + \lambda (f: F).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (u: T).(\forall (t: T).(eq T (lift1 p (THead (Flat f) u t)) (THead (Flat f) (lift1 p u) (lift1 p t)))))) (\lambda (u: T).(\lambda (t: T).(refl_equal T (THead (Flat f) (lift1 PNil u) (lift1 PNil t))))) (\lambda (h: nat).(\lambda (d: nat).(\lambda (p: PList).(\lambda (H: ((\forall (u: T).(\forall (t: T).(eq T (lift1 p (THead (Flat f) u t)) (THead (Flat f) (lift1 p u) (lift1 p t))))))).(\lambda (u: T).(\lambda (t: T).(eq_ind_r T (THead (Flat f) (lift1 p u) (lift1 p t)) (\lambda (t0: T).(eq T (lift h d t0) (THead (Flat f) (lift h d (lift1 p u)) (lift h d (lift1 p t))))) (eq_ind_r T (THead (Flat f) (lift h d (lift1 p u)) (lift h d (lift1 p t))) (\lambda (t0: T).(eq T t0 (THead (Flat f) (lift h d (lift1 p u)) (lift h d (lift1 p t))))) (refl_equal T (THead (Flat f) (lift h d (lift1 p u)) (lift h d (lift1 p t)))) (lift h d (THead (Flat f) (lift1 p u) (lift1 p t))) (lift_flat f (lift1 p u) (lift1 p t) h d)) (lift1 p (THead (Flat f) u t)) (H u t)))))))) hds)). + +theorem lift1_cons_tail: + \forall (t: T).(\forall (h: nat).(\forall (d: nat).(\forall (hds: PList).(eq T (lift1 (PConsTail hds h d) t) (lift1 hds (lift h d t)))))) +\def + \lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(eq T (lift1 (PConsTail p h d) t) (lift1 p (lift h d t)))) (refl_equal T (lift h d t)) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: (eq T (lift1 (PConsTail p h d) t) (lift1 p (lift h d t)))).(eq_ind_r T (lift1 p (lift h d t)) (\lambda (t0: T).(eq T (lift n n0 t0) (lift n n0 (lift1 p (lift h d t))))) (refl_equal T (lift n n0 (lift1 p (lift h d t)))) (lift1 (PConsTail p h d) t) H))))) hds)))). + +theorem lifts1_flat: + \forall (f: F).(\forall (hds: PList).(\forall (t: T).(\forall (ts: TList).(eq T (lift1 hds (THeads (Flat f) ts t)) (THeads (Flat f) (lifts1 hds ts) (lift1 hds t)))))) +\def + \lambda (f: F).(\lambda (hds: PList).(\lambda (t: T).(\lambda (ts: TList).(TList_ind (\lambda (t0: TList).(eq T (lift1 hds (THeads (Flat f) t0 t)) (THeads (Flat f) (lifts1 hds t0) (lift1 hds t)))) (refl_equal T (lift1 hds t)) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (H: (eq T (lift1 hds (THeads (Flat f) t1 t)) (THeads (Flat f) (lifts1 hds t1) (lift1 hds t)))).(eq_ind_r T (THead (Flat f) (lift1 hds t0) (lift1 hds (THeads (Flat f) t1 t))) (\lambda (t2: T).(eq T t2 (THead (Flat f) (lift1 hds t0) (THeads (Flat f) (lifts1 hds t1) (lift1 hds t))))) (eq_ind_r T (THeads (Flat f) (lifts1 hds t1) (lift1 hds t)) (\lambda (t2: T).(eq T (THead (Flat f) (lift1 hds t0) t2) (THead (Flat f) (lift1 hds t0) (THeads (Flat f) (lifts1 hds t1) (lift1 hds t))))) (refl_equal T (THead (Flat f) (lift1 hds t0) (THeads (Flat f) (lifts1 hds t1) (lift1 hds t)))) (lift1 hds (THeads (Flat f) t1 t)) H) (lift1 hds (THead (Flat f) t0 (THeads (Flat f) t1 t))) (lift1_flat f hds t0 (THeads (Flat f) t1 t)))))) ts)))). + +theorem lifts1_nil: + \forall (ts: TList).(eq TList (lifts1 PNil ts) ts) +\def + \lambda (ts: TList).(TList_ind (\lambda (t: TList).(eq TList (lifts1 PNil t) t)) (refl_equal TList TNil) (\lambda (t: T).(\lambda (t0: TList).(\lambda (H: (eq TList (lifts1 PNil t0) t0)).(eq_ind_r TList t0 (\lambda (t1: TList).(eq TList (TCons t t1) (TCons t t0))) (refl_equal TList (TCons t t0)) (lifts1 PNil t0) H)))) ts). + +theorem lifts1_cons: + \forall (h: nat).(\forall (d: nat).(\forall (hds: PList).(\forall (ts: TList).(eq TList (lifts1 (PCons h d hds) ts) (lifts h d (lifts1 hds ts)))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (hds: PList).(\lambda (ts: TList).(TList_ind (\lambda (t: TList).(eq TList (lifts1 (PCons h d hds) t) (lifts h d (lifts1 hds t)))) (refl_equal TList TNil) (\lambda (t: T).(\lambda (t0: TList).(\lambda (H: (eq TList (lifts1 (PCons h d hds) t0) (lifts h d (lifts1 hds t0)))).(eq_ind_r TList (lifts h d (lifts1 hds t0)) (\lambda (t1: TList).(eq TList (TCons (lift h d (lift1 hds t)) t1) (TCons (lift h d (lift1 hds t)) (lifts h d (lifts1 hds t0))))) (refl_equal TList (TCons (lift h d (lift1 hds t)) (lifts h d (lifts1 hds t0)))) (lifts1 (PCons h d hds) t0) H)))) ts)))). + +theorem lift1_xhg: + \forall (hds: PList).(\forall (t: T).(eq T (lift1 (Ss hds) (lift (S O) O t)) (lift (S O) O (lift1 hds t)))) +\def + \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (t: T).(eq T (lift1 (Ss p) (lift (S O) O t)) (lift (S O) O (lift1 p t))))) (\lambda (t: T).(refl_equal T (lift (S O) O t))) (\lambda (h: nat).(\lambda (d: nat).(\lambda (p: PList).(\lambda (H: ((\forall (t: T).(eq T (lift1 (Ss p) (lift (S O) O t)) (lift (S O) O (lift1 p t)))))).(\lambda (t: T).(eq_ind_r T (lift (S O) O (lift1 p t)) (\lambda (t0: T).(eq T (lift h (S d) t0) (lift (S O) O (lift h d (lift1 p t))))) (eq_ind nat (plus (S O) d) (\lambda (n: nat).(eq T (lift h n (lift (S O) O (lift1 p t))) (lift (S O) O (lift h d (lift1 p t))))) (eq_ind_r T (lift (S O) O (lift h d (lift1 p t))) (\lambda (t0: T).(eq T t0 (lift (S O) O (lift h d (lift1 p t))))) (refl_equal T (lift (S O) O (lift h d (lift1 p t)))) (lift h (plus (S O) d) (lift (S O) O (lift1 p t))) (lift_d (lift1 p t) h (S O) d O (le_O_n d))) (S d) (refl_equal nat (S d))) (lift1 (Ss p) (lift (S O) O t)) (H t))))))) hds). + +theorem lifts1_xhg: + \forall (hds: PList).(\forall (ts: TList).(eq TList (lifts1 (Ss hds) (lifts (S O) O ts)) (lifts (S O) O (lifts1 hds ts)))) +\def + \lambda (hds: PList).(\lambda (ts: TList).(TList_ind (\lambda (t: TList).(eq TList (lifts1 (Ss hds) (lifts (S O) O t)) (lifts (S O) O (lifts1 hds t)))) (refl_equal TList TNil) (\lambda (t: T).(\lambda (t0: TList).(\lambda (H: (eq TList (lifts1 (Ss hds) (lifts (S O) O t0)) (lifts (S O) O (lifts1 hds t0)))).(eq_ind_r T (lift (S O) O (lift1 hds t)) (\lambda (t1: T).(eq TList (TCons t1 (lifts1 (Ss hds) (lifts (S O) O t0))) (TCons (lift (S O) O (lift1 hds t)) (lifts (S O) O (lifts1 hds t0))))) (eq_ind_r TList (lifts (S O) O (lifts1 hds t0)) (\lambda (t1: TList).(eq TList (TCons (lift (S O) O (lift1 hds t)) t1) (TCons (lift (S O) O (lift1 hds t)) (lifts (S O) O (lifts1 hds t0))))) (refl_equal TList (TCons (lift (S O) O (lift1 hds t)) (lifts (S O) O (lifts1 hds t0)))) (lifts1 (Ss hds) (lifts (S O) O t0)) H) (lift1 (Ss hds) (lift (S O) O t)) (lift1_xhg hds t))))) ts)). + +inductive cnt: T \to Prop \def +| cnt_sort: \forall (n: nat).(cnt (TSort n)) +| cnt_head: \forall (t: T).((cnt t) \to (\forall (k: K).(\forall (v: T).(cnt (THead k v t))))). + +theorem cnt_lift: + \forall (t: T).((cnt t) \to (\forall (i: nat).(\forall (d: nat).(cnt (lift i d t))))) +\def + \lambda (t: T).(\lambda (H: (cnt t)).(cnt_ind (\lambda (t0: T).(\forall (i: nat).(\forall (d: nat).(cnt (lift i d t0))))) (\lambda (n: nat).(\lambda (i: nat).(\lambda (d: nat).(eq_ind_r T (TSort n) (\lambda (t0: T).(cnt t0)) (cnt_sort n) (lift i d (TSort n)) (lift_sort n i d))))) (\lambda (t0: T).(\lambda (_: (cnt t0)).(\lambda (H1: ((\forall (i: nat).(\forall (d: nat).(cnt (lift i d t0)))))).(\lambda (k: K).(\lambda (v: T).(\lambda (i: nat).(\lambda (d: nat).(eq_ind_r T (THead k (lift i d v) (lift i (s k d) t0)) (\lambda (t1: T).(cnt t1)) (cnt_head (lift i (s k d) t0) (H1 i (s k d)) k (lift i d v)) (lift i d (THead k v t0)) (lift_head k v t0 i d))))))))) t H)). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-5.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-5.ma new file mode 100644 index 000000000..1f15ba061 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-5.ma @@ -0,0 +1,193 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta-5". + +include "LambdaDelta-4.ma". + +inductive drop: nat \to (nat \to (C \to (C \to Prop))) \def +| drop_refl: \forall (c: C).(drop O O c c) +| drop_drop: \forall (k: K).(\forall (h: nat).(\forall (c: C).(\forall (e: C).((drop (r k h) O c e) \to (\forall (u: T).(drop (S h) O (CHead c k u) e)))))) +| drop_skip: \forall (k: K).(\forall (h: nat).(\forall (d: nat).(\forall (c: C).(\forall (e: C).((drop h (r k d) c e) \to (\forall (u: T).(drop h (S d) (CHead c k (lift h (r k d) u)) (CHead e k u)))))))). + +theorem drop_gen_sort: + \forall (n: nat).(\forall (h: nat).(\forall (d: nat).(\forall (x: C).((drop h d (CSort n) x) \to (and3 (eq C x (CSort n)) (eq nat h O) (eq nat d O)))))) +\def + \lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (x: C).(\lambda (H: (drop h d (CSort n) x)).(insert_eq C (CSort n) (\lambda (c: C).(drop h d c x)) (and3 (eq C x (CSort n)) (eq nat h O) (eq nat d O)) (\lambda (y: C).(\lambda (H0: (drop h d y x)).(drop_ind (\lambda (n0: nat).(\lambda (n1: nat).(\lambda (c: C).(\lambda (c0: C).((eq C c (CSort n)) \to (and3 (eq C c0 (CSort n)) (eq nat n0 O) (eq nat n1 O))))))) (\lambda (c: C).(\lambda (H1: (eq C c (CSort n))).(let H2 \def (f_equal C C (\lambda (e: C).e) c (CSort n) H1) in (eq_ind_r C (CSort n) (\lambda (c0: C).(and3 (eq C c0 (CSort n)) (eq nat O O) (eq nat O O))) (and3_intro (eq C (CSort n) (CSort n)) (eq nat O O) (eq nat O O) (refl_equal C (CSort n)) (refl_equal nat O) (refl_equal nat O)) c H2)))) (\lambda (k: K).(\lambda (h0: nat).(\lambda (c: C).(\lambda (e: C).(\lambda (_: (drop (r k h0) O c e)).(\lambda (_: (((eq C c (CSort n)) \to (and3 (eq C e (CSort n)) (eq nat (r k h0) O) (eq nat O O))))).(\lambda (u: T).(\lambda (H3: (eq C (CHead c k u) (CSort n))).(let H4 \def (eq_ind C (CHead c k u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in (False_ind (and3 (eq C e (CSort n)) (eq nat (S h0) O) (eq nat O O)) H4)))))))))) (\lambda (k: K).(\lambda (h0: nat).(\lambda (d0: nat).(\lambda (c: C).(\lambda (e: C).(\lambda (_: (drop h0 (r k d0) c e)).(\lambda (_: (((eq C c (CSort n)) \to (and3 (eq C e (CSort n)) (eq nat h0 O) (eq nat (r k d0) O))))).(\lambda (u: T).(\lambda (H3: (eq C (CHead c k (lift h0 (r k d0) u)) (CSort n))).(let H4 \def (eq_ind C (CHead c k (lift h0 (r k d0) u)) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in (False_ind (and3 (eq C (CHead e k u) (CSort n)) (eq nat h0 O) (eq nat (S d0) O)) H4))))))))))) h d y x H0))) H))))). + +theorem drop_gen_refl: + \forall (x: C).(\forall (e: C).((drop O O x e) \to (eq C x e))) +\def + \lambda (x: C).(\lambda (e: C).(\lambda (H: (drop O O x e)).(insert_eq nat O (\lambda (n: nat).(drop n O x e)) (eq C x e) (\lambda (y: nat).(\lambda (H0: (drop y O x e)).(insert_eq nat O (\lambda (n: nat).(drop y n x e)) ((eq nat y O) \to (eq C x e)) (\lambda (y0: nat).(\lambda (H1: (drop y y0 x e)).(drop_ind (\lambda (n: nat).(\lambda (n0: nat).(\lambda (c: C).(\lambda (c0: C).((eq nat n0 O) \to ((eq nat n O) \to (eq C c c0))))))) (\lambda (c: C).(\lambda (_: (eq nat O O)).(\lambda (_: (eq nat O O)).(refl_equal C c)))) (\lambda (k: K).(\lambda (h: nat).(\lambda (c: C).(\lambda (e0: C).(\lambda (_: (drop (r k h) O c e0)).(\lambda (_: (((eq nat O O) \to ((eq nat (r k h) O) \to (eq C c e0))))).(\lambda (u: T).(\lambda (_: (eq nat O O)).(\lambda (H5: (eq nat (S h) O)).(let H6 \def (eq_ind nat (S h) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H5) in (False_ind (eq C (CHead c k u) e0) H6))))))))))) (\lambda (k: K).(\lambda (h: nat).(\lambda (d: nat).(\lambda (c: C).(\lambda (e0: C).(\lambda (H2: (drop h (r k d) c e0)).(\lambda (H3: (((eq nat (r k d) O) \to ((eq nat h O) \to (eq C c e0))))).(\lambda (u: T).(\lambda (H4: (eq nat (S d) O)).(\lambda (H5: (eq nat h O)).(let H6 \def (f_equal nat nat (\lambda (e1: nat).e1) h O H5) in (let H7 \def (eq_ind nat h (\lambda (n: nat).((eq nat (r k d) O) \to ((eq nat n O) \to (eq C c e0)))) H3 O H6) in (let H8 \def (eq_ind nat h (\lambda (n: nat).(drop n (r k d) c e0)) H2 O H6) in (eq_ind_r nat O (\lambda (n: nat).(eq C (CHead c k (lift n (r k d) u)) (CHead e0 k u))) (let H9 \def (eq_ind nat (S d) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (eq C (CHead c k (lift O (r k d) u)) (CHead e0 k u)) H9)) h H6)))))))))))))) y y0 x e H1))) H0))) H))). + +theorem drop_gen_drop: + \forall (k: K).(\forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).((drop (S h) O (CHead c k u) x) \to (drop (r k h) O c x)))))) +\def + \lambda (k: K).(\lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (H: (drop (S h) O (CHead c k u) x)).(insert_eq C (CHead c k u) (\lambda (c0: C).(drop (S h) O c0 x)) (drop (r k h) O c x) (\lambda (y: C).(\lambda (H0: (drop (S h) O y x)).(insert_eq nat O (\lambda (n: nat).(drop (S h) n y x)) ((eq C y (CHead c k u)) \to (drop (r k h) O c x)) (\lambda (y0: nat).(\lambda (H1: (drop (S h) y0 y x)).(insert_eq nat (S h) (\lambda (n: nat).(drop n y0 y x)) ((eq nat y0 O) \to ((eq C y (CHead c k u)) \to (drop (r k h) O c x))) (\lambda (y1: nat).(\lambda (H2: (drop y1 y0 y x)).(drop_ind (\lambda (n: nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq nat n (S h)) \to ((eq nat n0 O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) O c c1)))))))) (\lambda (c0: C).(\lambda (H3: (eq nat O (S h))).(\lambda (_: (eq nat O O)).(\lambda (_: (eq C c0 (CHead c k u))).(let H6 \def (match H3 return (\lambda (n: nat).(\lambda (_: (eq ? ? n)).((eq nat n (S h)) \to (drop (r k h) O c c0)))) with [refl_equal \Rightarrow (\lambda (H2: (eq nat O (S h))).(let H3 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S h) H2) in (False_ind (drop (r k h) O c c0) H3)))]) in (H6 (refl_equal nat (S h)))))))) (\lambda (k0: K).(\lambda (h0: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (H3: (drop (r k0 h0) O c0 e)).(\lambda (_: (((eq nat (r k0 h0) (S h)) \to ((eq nat O O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) O c e)))))).(\lambda (u0: T).(\lambda (H5: (eq nat (S h0) (S h))).(\lambda (_: (eq nat O O)).(\lambda (H7: (eq C (CHead c0 k0 u0) (CHead c k u))).(let H8 \def (match H5 return (\lambda (n: nat).(\lambda (_: (eq ? ? n)).((eq nat n (S h)) \to (drop (r k h) O c e)))) with [refl_equal \Rightarrow (\lambda (H4: (eq nat (S h0) (S h))).(let H5 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: nat).nat) with [O \Rightarrow h0 | (S n) \Rightarrow n])) (S h0) (S h) H4) in (eq_ind nat h (\lambda (_: nat).(drop (r k h) O c e)) (let H6 \def (match H7 return (\lambda (c0: C).(\lambda (_: (eq ? ? c0)).((eq C c0 (CHead c k u)) \to (drop (r k h) O c e)))) with [refl_equal \Rightarrow (\lambda (H4: (eq C (CHead c0 k0 u0) (CHead c k u))).(let H6 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u0) (CHead c k u) H4) in ((let H7 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c0 k0 u0) (CHead c k u) H4) in ((let H8 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 u0) (CHead c k u) H4) in (eq_ind C c (\lambda (_: C).((eq K k0 k) \to ((eq T u0 u) \to (drop (r k h) O c e)))) (\lambda (H9: (eq K k0 k)).(eq_ind K k (\lambda (_: K).((eq T u0 u) \to (drop (r k h) O c e))) (\lambda (H10: (eq T u0 u)).(eq_ind T u (\lambda (_: T).(drop (r k h) O c e)) (eq_ind nat h0 (\lambda (n: nat).(drop (r k n) O c e)) (eq_ind C c0 (\lambda (c: C).(drop (r k h0) O c e)) (eq_ind K k0 (\lambda (k: K).(drop (r k h0) O c0 e)) H3 k H9) c H8) h H5) u0 (sym_eq T u0 u H10))) k0 (sym_eq K k0 k H9))) c0 (sym_eq C c0 c H8))) H7)) H6)))]) in (H6 (refl_equal C (CHead c k u)))) h0 (sym_eq nat h0 h H5))))]) in (H8 (refl_equal nat (S h)))))))))))))) (\lambda (k0: K).(\lambda (h0: nat).(\lambda (d: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (_: (drop h0 (r k0 d) c0 e)).(\lambda (_: (((eq nat h0 (S h)) \to ((eq nat (r k0 d) O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) O c e)))))).(\lambda (u0: T).(\lambda (_: (eq nat h0 (S h))).(\lambda (H6: (eq nat (S d) O)).(\lambda (_: (eq C (CHead c0 k0 (lift h0 (r k0 d) u0)) (CHead c k u))).(let H8 \def (match H6 return (\lambda (n: nat).(\lambda (_: (eq ? ? n)).((eq nat n O) \to (drop (r k h) O c (CHead e k0 u0))))) with [refl_equal \Rightarrow (\lambda (H4: (eq nat (S d) O)).(let H5 \def (eq_ind nat (S d) (\lambda (e0: nat).(match e0 return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (drop (r k h) O c (CHead e k0 u0)) H5)))]) in (H8 (refl_equal nat O)))))))))))))) y1 y0 y x H2))) H1))) H0))) H)))))). + +theorem drop_gen_skip_r: + \forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).(\forall (d: nat).(\forall (k: K).((drop h (S d) x (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C x (CHead e k (lift h (r k d) u)))) (\lambda (e: C).(drop h (r k d) e c))))))))) +\def + \lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) x (CHead c k u))).(let H0 \def (match H return (\lambda (n: nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop n n0 c0 c1)).((eq nat n h) \to ((eq nat n0 (S d)) \to ((eq C c0 x) \to ((eq C c1 (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C x (CHead e k (lift h (r k d) u)))) (\lambda (e: C).(drop h (r k d) e c)))))))))))) with [(drop_refl c0) \Rightarrow (\lambda (H0: (eq nat O h)).(\lambda (H1: (eq nat O (S d))).(\lambda (H2: (eq C c0 x)).(\lambda (H3: (eq C c0 (CHead c k u))).(eq_ind nat O (\lambda (n: nat).((eq nat O (S d)) \to ((eq C c0 x) \to ((eq C c0 (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C x (CHead e k (lift n (r k d) u)))) (\lambda (e: C).(drop n (r k d) e c))))))) (\lambda (H4: (eq nat O (S d))).(let H5 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) H4) in (False_ind ((eq C c0 x) \to ((eq C c0 (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C x (CHead e k (lift O (r k d) u)))) (\lambda (e: C).(drop O (r k d) e c))))) H5))) h H0 H1 H2 H3))))) | (drop_drop k0 h0 c0 e H0 u0) \Rightarrow (\lambda (H1: (eq nat (S h0) h)).(\lambda (H2: (eq nat O (S d))).(\lambda (H3: (eq C (CHead c0 k0 u0) x)).(\lambda (H4: (eq C e (CHead c k u))).(eq_ind nat (S h0) (\lambda (n: nat).((eq nat O (S d)) \to ((eq C (CHead c0 k0 u0) x) \to ((eq C e (CHead c k u)) \to ((drop (r k0 h0) O c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift n (r k d) u)))) (\lambda (e0: C).(drop n (r k d) e0 c)))))))) (\lambda (H5: (eq nat O (S d))).(let H6 \def (eq_ind nat O (\lambda (e0: nat).(match e0 return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) H5) in (False_ind ((eq C (CHead c0 k0 u0) x) \to ((eq C e (CHead c k u)) \to ((drop (r k0 h0) O c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift (S h0) (r k d) u)))) (\lambda (e0: C).(drop (S h0) (r k d) e0 c)))))) H6))) h H1 H2 H3 H4 H0))))) | (drop_skip k0 h0 d0 c0 e H0 u0) \Rightarrow (\lambda (H1: (eq nat h0 h)).(\lambda (H2: (eq nat (S d0) (S d))).(\lambda (H3: (eq C (CHead c0 k0 (lift h0 (r k0 d0) u0)) x)).(\lambda (H4: (eq C (CHead e k0 u0) (CHead c k u))).(eq_ind nat h (\lambda (n: nat).((eq nat (S d0) (S d)) \to ((eq C (CHead c0 k0 (lift n (r k0 d0) u0)) x) \to ((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop n (r k0 d0) c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)))))))) (\lambda (H5: (eq nat (S d0) (S d))).(let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: nat).nat) with [O \Rightarrow d0 | (S n) \Rightarrow n])) (S d0) (S d) H5) in (eq_ind nat d (\lambda (n: nat).((eq C (CHead c0 k0 (lift h (r k0 n) u0)) x) \to ((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop h (r k0 n) c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c))))))) (\lambda (H7: (eq C (CHead c0 k0 (lift h (r k0 d) u0)) x)).(eq_ind C (CHead c0 k0 (lift h (r k0 d) u0)) (\lambda (c1: C).((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop h (r k0 d) c0 e) \to (ex2 C (\lambda (e0: C).(eq C c1 (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)))))) (\lambda (H8: (eq C (CHead e k0 u0) (CHead c k u))).(let H9 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e k0 u0) (CHead c k u) H8) in ((let H10 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead e k0 u0) (CHead c k u) H8) in ((let H11 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow c])) (CHead e k0 u0) (CHead c k u) H8) in (eq_ind C c (\lambda (c1: C).((eq K k0 k) \to ((eq T u0 u) \to ((drop h (r k0 d) c0 c1) \to (ex2 C (\lambda (e0: C).(eq C (CHead c0 k0 (lift h (r k0 d) u0)) (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c))))))) (\lambda (H12: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T u0 u) \to ((drop h (r k1 d) c0 c) \to (ex2 C (\lambda (e0: C).(eq C (CHead c0 k1 (lift h (r k1 d) u0)) (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)))))) (\lambda (H13: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((drop h (r k d) c0 c) \to (ex2 C (\lambda (e0: C).(eq C (CHead c0 k (lift h (r k d) t)) (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c))))) (\lambda (H14: (drop h (r k d) c0 c)).(let H15 \def (eq_ind T u0 (\lambda (t: T).(eq C (CHead c0 k0 (lift h (r k0 d) t)) x)) H7 u H13) in (let H16 \def (eq_ind K k0 (\lambda (k: K).(eq C (CHead c0 k (lift h (r k d) u)) x)) H15 k H12) in (let H17 \def (eq_ind_r C x (\lambda (c0: C).(drop h (S d) c0 (CHead c k u))) H (CHead c0 k (lift h (r k d) u)) H16) in (ex_intro2 C (\lambda (e0: C).(eq C (CHead c0 k (lift h (r k d) u)) (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)) c0 (refl_equal C (CHead c0 k (lift h (r k d) u))) H14))))) u0 (sym_eq T u0 u H13))) k0 (sym_eq K k0 k H12))) e (sym_eq C e c H11))) H10)) H9))) x H7)) d0 (sym_eq nat d0 d H6)))) h0 (sym_eq nat h0 h H1) H2 H3 H4 H0)))))]) in (H0 (refl_equal nat h) (refl_equal nat (S d)) (refl_equal C x) (refl_equal C (CHead c k u)))))))))). + +theorem drop_gen_skip_l: + \forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).(\forall (d: nat).(\forall (k: K).((drop h (S d) (CHead c k u) x) \to (ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k d) c e)))))))))) +\def + \lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) (CHead c k u) x)).(let H0 \def (match H return (\lambda (n: nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop n n0 c0 c1)).((eq nat n h) \to ((eq nat n0 (S d)) \to ((eq C c0 (CHead c k u)) \to ((eq C c1 x) \to (ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k d) c e))))))))))))) with [(drop_refl c0) \Rightarrow (\lambda (H0: (eq nat O h)).(\lambda (H1: (eq nat O (S d))).(\lambda (H2: (eq C c0 (CHead c k u))).(\lambda (H3: (eq C c0 x)).(eq_ind nat O (\lambda (n: nat).((eq nat O (S d)) \to ((eq C c0 (CHead c k u)) \to ((eq C c0 x) \to (ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift n (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop n (r k d) c e)))))))) (\lambda (H4: (eq nat O (S d))).(let H5 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) H4) in (False_ind ((eq C c0 (CHead c k u)) \to ((eq C c0 x) \to (ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift O (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop O (r k d) c e)))))) H5))) h H0 H1 H2 H3))))) | (drop_drop k0 h0 c0 e H0 u0) \Rightarrow (\lambda (H1: (eq nat (S h0) h)).(\lambda (H2: (eq nat O (S d))).(\lambda (H3: (eq C (CHead c0 k0 u0) (CHead c k u))).(\lambda (H4: (eq C e x)).(eq_ind nat (S h0) (\lambda (n: nat).((eq nat O (S d)) \to ((eq C (CHead c0 k0 u0) (CHead c k u)) \to ((eq C e x) \to ((drop (r k0 h0) O c0 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift n (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop n (r k d) c e0))))))))) (\lambda (H5: (eq nat O (S d))).(let H6 \def (eq_ind nat O (\lambda (e0: nat).(match e0 return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) H5) in (False_ind ((eq C (CHead c0 k0 u0) (CHead c k u)) \to ((eq C e x) \to ((drop (r k0 h0) O c0 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift (S h0) (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop (S h0) (r k d) c e0))))))) H6))) h H1 H2 H3 H4 H0))))) | (drop_skip k0 h0 d0 c0 e H0 u0) \Rightarrow (\lambda (H1: (eq nat h0 h)).(\lambda (H2: (eq nat (S d0) (S d))).(\lambda (H3: (eq C (CHead c0 k0 (lift h0 (r k0 d0) u0)) (CHead c k u))).(\lambda (H4: (eq C (CHead e k0 u0) x)).(eq_ind nat h (\lambda (n: nat).((eq nat (S d0) (S d)) \to ((eq C (CHead c0 k0 (lift n (r k0 d0) u0)) (CHead c k u)) \to ((eq C (CHead e k0 u0) x) \to ((drop n (r k0 d0) c0 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0))))))))) (\lambda (H5: (eq nat (S d0) (S d))).(let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: nat).nat) with [O \Rightarrow d0 | (S n) \Rightarrow n])) (S d0) (S d) H5) in (eq_ind nat d (\lambda (n: nat).((eq C (CHead c0 k0 (lift h (r k0 n) u0)) (CHead c k u)) \to ((eq C (CHead e k0 u0) x) \to ((drop h (r k0 n) c0 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))))) (\lambda (H7: (eq C (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u))).(let H8 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) (r k0 d) u0) | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) in ((let H9 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) in ((let H10 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) in (eq_ind C c (\lambda (c1: C).((eq K k0 k) \to ((eq T (lift h (r k0 d) u0) u) \to ((eq C (CHead e k0 u0) x) \to ((drop h (r k0 d) c1 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0))))))))) (\lambda (H11: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T (lift h (r k1 d) u0) u) \to ((eq C (CHead e k1 u0) x) \to ((drop h (r k1 d) c e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))))) (\lambda (H12: (eq T (lift h (r k d) u0) u)).(eq_ind T (lift h (r k d) u0) (\lambda (t: T).((eq C (CHead e k u0) x) \to ((drop h (r k d) c e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0))))))) (\lambda (H13: (eq C (CHead e k u0) x)).(eq_ind C (CHead e k u0) (\lambda (c1: C).((drop h (r k d) c e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C c1 (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift h (r k d) u0) (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))) (\lambda (H14: (drop h (r k d) c e)).(let H15 \def (eq_ind_r T u (\lambda (t: T).(drop h (S d) (CHead c k t) x)) H (lift h (r k d) u0) H12) in (let H16 \def (eq_ind_r C x (\lambda (c0: C).(drop h (S d) (CHead c k (lift h (r k d) u0)) c0)) H15 (CHead e k u0) H13) in (ex3_2_intro C T (\lambda (e0: C).(\lambda (v: T).(eq C (CHead e k u0) (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift h (r k d) u0) (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0))) e u0 (refl_equal C (CHead e k u0)) (refl_equal T (lift h (r k d) u0)) H14)))) x H13)) u H12)) k0 (sym_eq K k0 k H11))) c0 (sym_eq C c0 c H10))) H9)) H8))) d0 (sym_eq nat d0 d H6)))) h0 (sym_eq nat h0 h H1) H2 H3 H4 H0)))))]) in (H0 (refl_equal nat h) (refl_equal nat (S d)) (refl_equal C (CHead c k u)) (refl_equal C x))))))))). + +theorem drop_skip_bind: + \forall (h: nat).(\forall (d: nat).(\forall (c: C).(\forall (e: C).((drop h d c e) \to (\forall (b: B).(\forall (u: T).(drop h (S d) (CHead c (Bind b) (lift h d u)) (CHead e (Bind b) u)))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (c: C).(\lambda (e: C).(\lambda (H: (drop h d c e)).(\lambda (b: B).(\lambda (u: T).(eq_ind nat (r (Bind b) d) (\lambda (n: nat).(drop h (S d) (CHead c (Bind b) (lift h n u)) (CHead e (Bind b) u))) (drop_skip (Bind b) h d c e H u) d (refl_equal nat d)))))))). + +theorem drop_skip_flat: + \forall (h: nat).(\forall (d: nat).(\forall (c: C).(\forall (e: C).((drop h (S d) c e) \to (\forall (f: F).(\forall (u: T).(drop h (S d) (CHead c (Flat f) (lift h (S d) u)) (CHead e (Flat f) u)))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (c: C).(\lambda (e: C).(\lambda (H: (drop h (S d) c e)).(\lambda (f: F).(\lambda (u: T).(eq_ind nat (r (Flat f) d) (\lambda (n: nat).(drop h (S d) (CHead c (Flat f) (lift h n u)) (CHead e (Flat f) u))) (drop_skip (Flat f) h d c e H u) (S d) (refl_equal nat (S d))))))))). + +theorem drop_S: + \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (h: nat).((drop h O c (CHead e (Bind b) u)) \to (drop (S h) O c e)))))) +\def + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: C).(\forall (u: T).(\forall (h: nat).((drop h O c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 e)))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (H: (drop h O (CSort n) (CHead e (Bind b) u))).(and3_ind (eq C (CHead e (Bind b) u) (CSort n)) (eq nat h O) (eq nat O O) (drop (S h) O (CSort n) e) (\lambda (H0: (eq C (CHead e (Bind b) u) (CSort n))).(\lambda (H1: (eq nat h O)).(\lambda (_: (eq nat O O)).(eq_ind_r nat O (\lambda (n0: nat).(drop (S n0) O (CSort n) e)) (let H3 \def (eq_ind C (CHead e (Bind b) u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H0) in (False_ind (drop (S O) O (CSort n) e) H3)) h H1)))) (drop_gen_sort n h O (CHead e (Bind b) u) H))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: T).(\forall (h: nat).((drop h O c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 e))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e))) (\lambda (H0: (drop O O (CHead c0 k t) (CHead e (Bind b) u))).(let H1 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 k t) (CHead e (Bind b) u) H0)) in ((let H2 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 k t) (CHead e (Bind b) u) H0)) in ((let H3 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 k t) (CHead e (Bind b) u) H0)) in (\lambda (H4: (eq K k (Bind b))).(\lambda (H5: (eq C c0 e)).(eq_ind C c0 (\lambda (c1: C).(drop (S O) O (CHead c0 k t) c1)) (eq_ind_r K (Bind b) (\lambda (k0: K).(drop (S O) O (CHead c0 k0 t) c0)) (drop_drop (Bind b) O c0 c0 (drop_refl c0) t) k H4) e H5)))) H2)) H1))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e)))).(\lambda (H1: (drop (S n) O (CHead c0 k t) (CHead e (Bind b) u))).(drop_drop k (S n) c0 e (eq_ind_r nat (S (r k n)) (\lambda (n0: nat).(drop n0 O c0 e)) (H e u (r k n) (drop_gen_drop k c0 (CHead e (Bind b) u) t n H1)) (r k (S n)) (r_S k n)) t)))) h)))))))) c)). + +theorem drop_ctail: + \forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (k: K).(\forall (u: T).(drop h d (CTail k u c1) (CTail k u c2)))))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c c2) \to (\forall (k: K).(\forall (u: T).(drop h d (CTail k u c) (CTail k u c2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) c2)).(\lambda (k: K).(\lambda (u: T).(and3_ind (eq C c2 (CSort n)) (eq nat h O) (eq nat d O) (drop h d (CTail k u (CSort n)) (CTail k u c2)) (\lambda (H0: (eq C c2 (CSort n))).(\lambda (H1: (eq nat h O)).(\lambda (H2: (eq nat d O)).(eq_ind_r nat O (\lambda (n0: nat).(drop n0 d (CTail k u (CSort n)) (CTail k u c2))) (eq_ind_r nat O (\lambda (n0: nat).(drop O n0 (CTail k u (CSort n)) (CTail k u c2))) (eq_ind_r C (CSort n) (\lambda (c: C).(drop O O (CTail k u (CSort n)) (CTail k u c))) (drop_refl (CTail k u (CSort n))) c2 H0) d H2) h H1)))) (drop_gen_sort n h d c2 H))))))))) (\lambda (c2: C).(\lambda (IHc: ((\forall (c3: C).(\forall (d: nat).(\forall (h: nat).((drop h d c2 c3) \to (\forall (k: K).(\forall (u: T).(drop h d (CTail k u c2) (CTail k u c3)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: C).(\lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c2 k t) c3) \to (\forall (k0: K).(\forall (u: T).(drop h n (CTail k0 u (CHead c2 k t)) (CTail k0 u c3))))))) (\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c2 k t) c3) \to (\forall (k0: K).(\forall (u: T).(drop n O (CTail k0 u (CHead c2 k t)) (CTail k0 u c3)))))) (\lambda (H: (drop O O (CHead c2 k t) c3)).(\lambda (k0: K).(\lambda (u: T).(eq_ind C (CHead c2 k t) (\lambda (c: C).(drop O O (CTail k0 u (CHead c2 k t)) (CTail k0 u c))) (drop_refl (CTail k0 u (CHead c2 k t))) c3 (drop_gen_refl (CHead c2 k t) c3 H))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c2 k t) c3) \to (\forall (k0: K).(\forall (u: T).(drop n O (CTail k0 u (CHead c2 k t)) (CTail k0 u c3))))))).(\lambda (H0: (drop (S n) O (CHead c2 k t) c3)).(\lambda (k0: K).(\lambda (u: T).(drop_drop k n (CTail k0 u c2) (CTail k0 u c3) (IHc c3 O (r k n) (drop_gen_drop k c2 c3 t n H0) k0 u) t)))))) h)) (\lambda (n: nat).(\lambda (H: ((\forall (h: nat).((drop h n (CHead c2 k t) c3) \to (\forall (k0: K).(\forall (u: T).(drop h n (CTail k0 u (CHead c2 k t)) (CTail k0 u c3)))))))).(\lambda (h: nat).(\lambda (H0: (drop h (S n) (CHead c2 k t) c3)).(\lambda (k0: K).(\lambda (u: T).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C c3 (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k n) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k n) c2 e))) (drop h (S n) (CTail k0 u (CHead c2 k t)) (CTail k0 u c3)) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H1: (eq C c3 (CHead x0 k x1))).(\lambda (H2: (eq T t (lift h (r k n) x1))).(\lambda (H3: (drop h (r k n) c2 x0)).(let H4 \def (eq_ind C c3 (\lambda (c: C).(\forall (h: nat).((drop h n (CHead c2 k t) c) \to (\forall (k0: K).(\forall (u: T).(drop h n (CTail k0 u (CHead c2 k t)) (CTail k0 u c))))))) H (CHead x0 k x1) H1) in (eq_ind_r C (CHead x0 k x1) (\lambda (c: C).(drop h (S n) (CTail k0 u (CHead c2 k t)) (CTail k0 u c))) (let H5 \def (eq_ind T t (\lambda (t: T).(\forall (h: nat).((drop h n (CHead c2 k t) (CHead x0 k x1)) \to (\forall (k0: K).(\forall (u: T).(drop h n (CTail k0 u (CHead c2 k t)) (CTail k0 u (CHead x0 k x1)))))))) H4 (lift h (r k n) x1) H2) in (eq_ind_r T (lift h (r k n) x1) (\lambda (t0: T).(drop h (S n) (CTail k0 u (CHead c2 k t0)) (CTail k0 u (CHead x0 k x1)))) (drop_skip k h n (CTail k0 u c2) (CTail k0 u x0) (IHc x0 (r k n) h H3 k0 u) x1) t H2)) c3 H1))))))) (drop_gen_skip_l c2 c3 t h n k H0)))))))) d))))))) c1). + +theorem drop_mono: + \forall (c: C).(\forall (x1: C).(\forall (d: nat).(\forall (h: nat).((drop h d c x1) \to (\forall (x2: C).((drop h d c x2) \to (eq C x1 x2))))))) +\def + \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (x1: C).(\forall (d: nat).(\forall (h: nat).((drop h d c0 x1) \to (\forall (x2: C).((drop h d c0 x2) \to (eq C x1 x2)))))))) (\lambda (n: nat).(\lambda (x1: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) x1)).(\lambda (x2: C).(\lambda (H0: (drop h d (CSort n) x2)).(and3_ind (eq C x2 (CSort n)) (eq nat h O) (eq nat d O) (eq C x1 x2) (\lambda (H1: (eq C x2 (CSort n))).(\lambda (H2: (eq nat h O)).(\lambda (H3: (eq nat d O)).(and3_ind (eq C x1 (CSort n)) (eq nat h O) (eq nat d O) (eq C x1 x2) (\lambda (H4: (eq C x1 (CSort n))).(\lambda (H5: (eq nat h O)).(\lambda (H6: (eq nat d O)).(eq_ind_r C (CSort n) (\lambda (c0: C).(eq C x1 c0)) (let H7 \def (eq_ind nat h (\lambda (n: nat).(eq nat n O)) H2 O H5) in (let H8 \def (eq_ind nat d (\lambda (n: nat).(eq nat n O)) H3 O H6) in (eq_ind_r C (CSort n) (\lambda (c0: C).(eq C c0 (CSort n))) (refl_equal C (CSort n)) x1 H4))) x2 H1)))) (drop_gen_sort n h d x1 H))))) (drop_gen_sort n h d x2 H0))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (x1: C).(\forall (d: nat).(\forall (h: nat).((drop h d c0 x1) \to (\forall (x2: C).((drop h d c0 x2) \to (eq C x1 x2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (x1: C).(\lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c0 k t) x1) \to (\forall (x2: C).((drop h n (CHead c0 k t) x2) \to (eq C x1 x2)))))) (\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 k t) x1) \to (\forall (x2: C).((drop n O (CHead c0 k t) x2) \to (eq C x1 x2))))) (\lambda (H0: (drop O O (CHead c0 k t) x1)).(\lambda (x2: C).(\lambda (H1: (drop O O (CHead c0 k t) x2)).(eq_ind C (CHead c0 k t) (\lambda (c1: C).(eq C x1 c1)) (eq_ind C (CHead c0 k t) (\lambda (c1: C).(eq C c1 (CHead c0 k t))) (refl_equal C (CHead c0 k t)) x1 (drop_gen_refl (CHead c0 k t) x1 H0)) x2 (drop_gen_refl (CHead c0 k t) x2 H1))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c0 k t) x1) \to (\forall (x2: C).((drop n O (CHead c0 k t) x2) \to (eq C x1 x2)))))).(\lambda (H1: (drop (S n) O (CHead c0 k t) x1)).(\lambda (x2: C).(\lambda (H2: (drop (S n) O (CHead c0 k t) x2)).(H x1 O (r k n) (drop_gen_drop k c0 x1 t n H1) x2 (drop_gen_drop k c0 x2 t n H2))))))) h)) (\lambda (n: nat).(\lambda (H0: ((\forall (h: nat).((drop h n (CHead c0 k t) x1) \to (\forall (x2: C).((drop h n (CHead c0 k t) x2) \to (eq C x1 x2))))))).(\lambda (h: nat).(\lambda (H1: (drop h (S n) (CHead c0 k t) x1)).(\lambda (x2: C).(\lambda (H2: (drop h (S n) (CHead c0 k t) x2)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C x2 (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k n) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k n) c0 e))) (eq C x1 x2) (\lambda (x0: C).(\lambda (x3: T).(\lambda (H3: (eq C x2 (CHead x0 k x3))).(\lambda (H4: (eq T t (lift h (r k n) x3))).(\lambda (H5: (drop h (r k n) c0 x0)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C x1 (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k n) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k n) c0 e))) (eq C x1 x2) (\lambda (x4: C).(\lambda (x5: T).(\lambda (H6: (eq C x1 (CHead x4 k x5))).(\lambda (H7: (eq T t (lift h (r k n) x5))).(\lambda (H8: (drop h (r k n) c0 x4)).(eq_ind_r C (CHead x0 k x3) (\lambda (c1: C).(eq C x1 c1)) (let H9 \def (eq_ind C x1 (\lambda (c: C).(\forall (h: nat).((drop h n (CHead c0 k t) c) \to (\forall (x2: C).((drop h n (CHead c0 k t) x2) \to (eq C c x2)))))) H0 (CHead x4 k x5) H6) in (eq_ind_r C (CHead x4 k x5) (\lambda (c1: C).(eq C c1 (CHead x0 k x3))) (let H10 \def (eq_ind T t (\lambda (t: T).(\forall (h: nat).((drop h n (CHead c0 k t) (CHead x4 k x5)) \to (\forall (x2: C).((drop h n (CHead c0 k t) x2) \to (eq C (CHead x4 k x5) x2)))))) H9 (lift h (r k n) x5) H7) in (let H11 \def (eq_ind T t (\lambda (t: T).(eq T t (lift h (r k n) x3))) H4 (lift h (r k n) x5) H7) in (let H12 \def (eq_ind T x5 (\lambda (t: T).(\forall (h0: nat).((drop h0 n (CHead c0 k (lift h (r k n) t)) (CHead x4 k t)) \to (\forall (x2: C).((drop h0 n (CHead c0 k (lift h (r k n) t)) x2) \to (eq C (CHead x4 k t) x2)))))) H10 x3 (lift_inj x5 x3 h (r k n) H11)) in (eq_ind_r T x3 (\lambda (t0: T).(eq C (CHead x4 k t0) (CHead x0 k x3))) (sym_equal C (CHead x0 k x3) (CHead x4 k x3) (sym_equal C (CHead x4 k x3) (CHead x0 k x3) (sym_equal C (CHead x0 k x3) (CHead x4 k x3) (f_equal3 C K T C CHead x0 x4 k k x3 x3 (H x0 (r k n) h H5 x4 H8) (refl_equal K k) (refl_equal T x3))))) x5 (lift_inj x5 x3 h (r k n) H11))))) x1 H6)) x2 H3)))))) (drop_gen_skip_l c0 x1 t h n k H1))))))) (drop_gen_skip_l c0 x2 t h n k H2)))))))) d))))))) c). + +theorem drop_conf_lt: + \forall (k: K).(\forall (i: nat).(\forall (u: T).(\forall (c0: C).(\forall (c: C).((drop i O c (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i d)) c e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))))) +\def + \lambda (k: K).(\lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (u: T).(\forall (c0: C).(\forall (c: C).((drop n O c (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus n d)) c e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop n O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))))) (\lambda (u: T).(\lambda (c0: C).(\lambda (c: C).(\lambda (H: (drop O O c (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h (S (plus O d)) c e)).(let H1 \def (eq_ind C c (\lambda (c: C).(drop h (S (plus O d)) c e)) H0 (CHead c0 k u) (drop_gen_refl c (CHead c0 k u) H)) in (ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k (plus O d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k (plus O d)) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C e (CHead x0 k x1))).(\lambda (H3: (eq T u (lift h (r k (plus O d)) x1))).(\lambda (H4: (drop h (r k (plus O d)) c0 x0)).(eq_ind_r C (CHead x0 k x1) (\lambda (c1: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O c1 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (eq_ind_r T (lift h (r k (plus O d)) x1) (\lambda (t: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O (CHead x0 k x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h (r k (plus O d)) x1) (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O (CHead x0 k x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) x1 x0 (refl_equal T (lift h (r k d) x1)) (drop_refl (CHead x0 k x1)) H4) u H3) e H2)))))) (drop_gen_skip_l c0 e u h (plus O d) k H1))))))))))) (\lambda (i0: nat).(\lambda (H: ((\forall (u: T).(\forall (c0: C).(\forall (c: C).((drop i0 O c (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i0 d)) c e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i0 O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))))))))))))).(\lambda (u: T).(\lambda (c0: C).(\lambda (c: C).(C_ind (\lambda (c1: C).((drop (S i0) O c1 (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus (S i0) d)) c1 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))))))))) (\lambda (n: nat).(\lambda (_: (drop (S i0) O (CSort n) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (drop h (S (plus (S i0) d)) (CSort n) e)).(and3_ind (eq C e (CSort n)) (eq nat h O) (eq nat (S (plus (S i0) d)) O) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (_: (eq C e (CSort n))).(\lambda (_: (eq nat h O)).(\lambda (H4: (eq nat (S (plus (S i0) d)) O)).(let H5 \def (eq_ind nat (S (plus (S i0) d)) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) H5))))) (drop_gen_sort n h (S (plus (S i0) d)) e H1)))))))) (\lambda (c1: C).(\lambda (H0: (((drop (S i0) O c1 (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus (S i0) d)) c1 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))).(\lambda (k0: K).(K_ind (\lambda (k1: K).(\forall (t: T).((drop (S i0) O (CHead c1 k1 t) (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus (S i0) d)) (CHead c1 k1 t) e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c1 (Bind b) t) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h (S (plus (S i0) d)) (CHead c1 (Bind b) t) e)).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Bind b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Bind b) (plus (S i0) d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Bind b) (plus (S i0) d)) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: (eq C e (CHead x0 (Bind b) x1))).(\lambda (_: (eq T t (lift h (r (Bind b) (plus (S i0) d)) x1))).(\lambda (H5: (drop h (r (Bind b) (plus (S i0) d)) c1 x0)).(eq_ind_r C (CHead x0 (Bind b) x1) (\lambda (c2: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O c2 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (let H6 \def (H u c0 c1 (drop_gen_drop (Bind b) c1 (CHead c0 k u) t i0 H1) x0 h d H5) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i0 O x0 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Bind b) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H7: (eq T u (lift h (r k d) x2))).(\lambda (H8: (drop i0 O x0 (CHead x3 k x2))).(\lambda (H9: (drop h (r k d) c0 x3)).(ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Bind b) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) x2 x3 H7 (drop_drop (Bind b) i0 x0 (CHead x3 k x2) H8 x1) H9)))))) H6)) e H3)))))) (drop_gen_skip_l c1 e t h (plus (S i0) d) (Bind b) H2))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c1 (Flat f) t) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h (S (plus (S i0) d)) (CHead c1 (Flat f) t) e)).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) (plus (S i0) d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat f) (plus (S i0) d)) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: (eq C e (CHead x0 (Flat f) x1))).(\lambda (_: (eq T t (lift h (r (Flat f) (plus (S i0) d)) x1))).(\lambda (H5: (drop h (r (Flat f) (plus (S i0) d)) c1 x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c2: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O c2 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O x0 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Flat f) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H6: (eq T u (lift h (r k d) x2))).(\lambda (H7: (drop (S i0) O x0 (CHead x3 k x2))).(\lambda (H8: (drop h (r k d) c0 x3)).(ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Flat f) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) x2 x3 H6 (drop_drop (Flat f) i0 x0 (CHead x3 k x2) H7 x1) H8)))))) (H0 (drop_gen_drop (Flat f) c1 (CHead c0 k u) t i0 H1) x0 h d H5)) e H3)))))) (drop_gen_skip_l c1 e t h (plus (S i0) d) (Flat f) H2))))))))) k0)))) c)))))) i)). + +theorem drop_conf_ge: + \forall (i: nat).(\forall (a: C).(\forall (c: C).((drop i O c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le (plus d h) i) \to (drop (minus i h) O e a))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (a: C).(\forall (c: C).((drop n O c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le (plus d h) n) \to (drop (minus n h) O e a)))))))))) (\lambda (a: C).(\lambda (c: C).(\lambda (H: (drop O O c a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h d c e)).(\lambda (H1: (le (plus d h) O)).(let H2 \def (eq_ind C c (\lambda (c: C).(drop h d c e)) H0 a (drop_gen_refl c a H)) in (let H3 \def (match H1 return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to (drop (minus O h) O e a)))) with [le_n \Rightarrow (\lambda (H: (eq nat (plus d h) O)).(let H3 \def (f_equal nat nat (\lambda (e0: nat).e0) (plus d h) O H) in (eq_ind nat (plus d h) (\lambda (n: nat).(drop (minus n h) n e a)) (eq_ind_r nat O (\lambda (n: nat).(drop (minus n h) n e a)) (and_ind (eq nat d O) (eq nat h O) (drop O O e a) (\lambda (H0: (eq nat d O)).(\lambda (H1: (eq nat h O)).(let H2 \def (eq_ind nat d (\lambda (n: nat).(drop h n a e)) H2 O H0) in (let H4 \def (eq_ind nat h (\lambda (n: nat).(drop n O a e)) H2 O H1) in (eq_ind C a (\lambda (c: C).(drop O O c a)) (drop_refl a) e (drop_gen_refl a e H4)))))) (plus_O d h H3)) (plus d h) H3) O H3))) | (le_S m H) \Rightarrow (\lambda (H2: (eq nat (S m) O)).((let H0 \def (eq_ind nat (S m) (\lambda (e0: nat).(match e0 return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind ((le (plus d h) m) \to (drop (minus O h) O e a)) H0)) H))]) in (H3 (refl_equal nat O)))))))))))) (\lambda (i0: nat).(\lambda (H: ((\forall (a: C).(\forall (c: C).((drop i0 O c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le (plus d h) i0) \to (drop (minus i0 h) O e a))))))))))).(\lambda (a: C).(\lambda (c: C).(C_ind (\lambda (c0: C).((drop (S i0) O c0 a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e a)))))))) (\lambda (n: nat).(\lambda (H0: (drop (S i0) O (CSort n) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (drop h d (CSort n) e)).(\lambda (H2: (le (plus d h) (S i0))).(and3_ind (eq C e (CSort n)) (eq nat h O) (eq nat d O) (drop (minus (S i0) h) O e a) (\lambda (H3: (eq C e (CSort n))).(\lambda (H4: (eq nat h O)).(\lambda (H5: (eq nat d O)).(and3_ind (eq C a (CSort n)) (eq nat (S i0) O) (eq nat O O) (drop (minus (S i0) h) O e a) (\lambda (H6: (eq C a (CSort n))).(\lambda (H7: (eq nat (S i0) O)).(\lambda (_: (eq nat O O)).(let H9 \def (eq_ind nat d (\lambda (n: nat).(le (plus n h) (S i0))) H2 O H5) in (let H10 \def (eq_ind nat h (\lambda (n: nat).(le (plus O n) (S i0))) H9 O H4) in (eq_ind_r nat O (\lambda (n0: nat).(drop (minus (S i0) n0) O e a)) (eq_ind_r C (CSort n) (\lambda (c0: C).(drop (minus (S i0) O) O c0 a)) (eq_ind_r C (CSort n) (\lambda (c0: C).(drop (minus (S i0) O) O (CSort n) c0)) (let H11 \def (eq_ind nat (S i0) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H7) in (False_ind (drop (minus (S i0) O) O (CSort n) (CSort n)) H11)) a H6) e H3) h H4)))))) (drop_gen_sort n (S i0) O a H0))))) (drop_gen_sort n h d e H1))))))))) (\lambda (c0: C).(\lambda (H0: (((drop (S i0) O c0 a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e a))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).((drop (S i0) O (CHead c0 k0 t) a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d (CHead c0 k0 t) e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e a))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c0 (Bind b) t) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h d (CHead c0 (Bind b) t) e)).(\lambda (H3: (le (plus d h) (S i0))).(nat_ind (\lambda (n: nat).((drop h n (CHead c0 (Bind b) t) e) \to ((le (plus n h) (S i0)) \to (drop (minus (S i0) h) O e a)))) (\lambda (H4: (drop h O (CHead c0 (Bind b) t) e)).(\lambda (H5: (le (plus O h) (S i0))).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 (Bind b) t) e) \to ((le (plus O n) (S i0)) \to (drop (minus (S i0) n) O e a)))) (\lambda (H6: (drop O O (CHead c0 (Bind b) t) e)).(\lambda (_: (le (plus O O) (S i0))).(eq_ind C (CHead c0 (Bind b) t) (\lambda (c1: C).(drop (minus (S i0) O) O c1 a)) (drop_drop (Bind b) i0 c0 a (drop_gen_drop (Bind b) c0 a t i0 H1) t) e (drop_gen_refl (CHead c0 (Bind b) t) e H6)))) (\lambda (h0: nat).(\lambda (_: (((drop h0 O (CHead c0 (Bind b) t) e) \to ((le (plus O h0) (S i0)) \to (drop (minus (S i0) h0) O e a))))).(\lambda (H6: (drop (S h0) O (CHead c0 (Bind b) t) e)).(\lambda (H7: (le (plus O (S h0)) (S i0))).(H a c0 (drop_gen_drop (Bind b) c0 a t i0 H1) e h0 O (drop_gen_drop (Bind b) c0 e t h0 H6) (le_S_n (plus O h0) i0 H7)))))) h H4 H5))) (\lambda (d0: nat).(\lambda (_: (((drop h d0 (CHead c0 (Bind b) t) e) \to ((le (plus d0 h) (S i0)) \to (drop (minus (S i0) h) O e a))))).(\lambda (H4: (drop h (S d0) (CHead c0 (Bind b) t) e)).(\lambda (H5: (le (plus (S d0) h) (S i0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Bind b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Bind b) d0) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Bind b) d0) c0 e0))) (drop (minus (S i0) h) O e a) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C e (CHead x0 (Bind b) x1))).(\lambda (_: (eq T t (lift h (r (Bind b) d0) x1))).(\lambda (H8: (drop h (r (Bind b) d0) c0 x0)).(eq_ind_r C (CHead x0 (Bind b) x1) (\lambda (c1: C).(drop (minus (S i0) h) O c1 a)) (eq_ind nat (S (minus i0 h)) (\lambda (n: nat).(drop n O (CHead x0 (Bind b) x1) a)) (drop_drop (Bind b) (minus i0 h) x0 a (H a c0 (drop_gen_drop (Bind b) c0 a t i0 H1) x0 h d0 H8 (le_S_n (plus d0 h) i0 H5)) x1) (minus (S i0) h) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5)))) e H6)))))) (drop_gen_skip_l c0 e t h d0 (Bind b) H4)))))) d H2 H3))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c0 (Flat f) t) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h d (CHead c0 (Flat f) t) e)).(\lambda (H3: (le (plus d h) (S i0))).(nat_ind (\lambda (n: nat).((drop h n (CHead c0 (Flat f) t) e) \to ((le (plus n h) (S i0)) \to (drop (minus (S i0) h) O e a)))) (\lambda (H4: (drop h O (CHead c0 (Flat f) t) e)).(\lambda (H5: (le (plus O h) (S i0))).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 (Flat f) t) e) \to ((le (plus O n) (S i0)) \to (drop (minus (S i0) n) O e a)))) (\lambda (H6: (drop O O (CHead c0 (Flat f) t) e)).(\lambda (_: (le (plus O O) (S i0))).(eq_ind C (CHead c0 (Flat f) t) (\lambda (c1: C).(drop (minus (S i0) O) O c1 a)) (drop_drop (Flat f) i0 c0 a (drop_gen_drop (Flat f) c0 a t i0 H1) t) e (drop_gen_refl (CHead c0 (Flat f) t) e H6)))) (\lambda (h0: nat).(\lambda (_: (((drop h0 O (CHead c0 (Flat f) t) e) \to ((le (plus O h0) (S i0)) \to (drop (minus (S i0) h0) O e a))))).(\lambda (H6: (drop (S h0) O (CHead c0 (Flat f) t) e)).(\lambda (H7: (le (plus O (S h0)) (S i0))).(H0 (drop_gen_drop (Flat f) c0 a t i0 H1) e (S h0) O (drop_gen_drop (Flat f) c0 e t h0 H6) H7))))) h H4 H5))) (\lambda (d0: nat).(\lambda (_: (((drop h d0 (CHead c0 (Flat f) t) e) \to ((le (plus d0 h) (S i0)) \to (drop (minus (S i0) h) O e a))))).(\lambda (H4: (drop h (S d0) (CHead c0 (Flat f) t) e)).(\lambda (H5: (le (plus (S d0) h) (S i0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) d0) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat f) d0) c0 e0))) (drop (minus (S i0) h) O e a) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C e (CHead x0 (Flat f) x1))).(\lambda (_: (eq T t (lift h (r (Flat f) d0) x1))).(\lambda (H8: (drop h (r (Flat f) d0) c0 x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c1: C).(drop (minus (S i0) h) O c1 a)) (let H9 \def (eq_ind_r nat (minus (S i0) h) (\lambda (n: nat).(drop n O x0 a)) (H0 (drop_gen_drop (Flat f) c0 a t i0 H1) x0 h (S d0) H8 H5) (S (minus i0 h)) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5)))) in (eq_ind nat (S (minus i0 h)) (\lambda (n: nat).(drop n O (CHead x0 (Flat f) x1) a)) (drop_drop (Flat f) (minus i0 h) x0 a H9 x1) (minus (S i0) h) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5))))) e H6)))))) (drop_gen_skip_l c0 e t h d0 (Flat f) H4)))))) d H2 H3))))))))) k)))) c))))) i). + +theorem drop_conf_rev: + \forall (j: nat).(\forall (e1: C).(\forall (e2: C).((drop j O e1 e2) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop j O c1 c2)) (\lambda (c1: C).(drop i j c1 e1))))))))) +\def + \lambda (j: nat).(nat_ind (\lambda (n: nat).(\forall (e1: C).(\forall (e2: C).((drop n O e1 e2) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop n O c1 c2)) (\lambda (c1: C).(drop i n c1 e1)))))))))) (\lambda (e1: C).(\lambda (e2: C).(\lambda (H: (drop O O e1 e2)).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e2)).(let H1 \def (eq_ind_r C e2 (\lambda (c: C).(drop i O c2 c)) H0 e1 (drop_gen_refl e1 e2 H)) in (ex_intro2 C (\lambda (c1: C).(drop O O c1 c2)) (\lambda (c1: C).(drop i O c1 e1)) c2 (drop_refl c2) H1)))))))) (\lambda (j0: nat).(\lambda (IHj: ((\forall (e1: C).(\forall (e2: C).((drop j0 O e1 e2) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop j0 O c1 c2)) (\lambda (c1: C).(drop i j0 c1 e1))))))))))).(\lambda (e1: C).(C_ind (\lambda (c: C).(\forall (e2: C).((drop (S j0) O c e2) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 c))))))))) (\lambda (n: nat).(\lambda (e2: C).(\lambda (H: (drop (S j0) O (CSort n) e2)).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e2)).(and3_ind (eq C e2 (CSort n)) (eq nat (S j0) O) (eq nat O O) (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CSort n)))) (\lambda (H1: (eq C e2 (CSort n))).(\lambda (H2: (eq nat (S j0) O)).(\lambda (_: (eq nat O O)).(let H4 \def (eq_ind C e2 (\lambda (c: C).(drop i O c2 c)) H0 (CSort n) H1) in (let H5 \def (eq_ind nat (S j0) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CSort n)))) H5)))))) (drop_gen_sort n (S j0) O e2 H)))))))) (\lambda (e2: C).(\lambda (IHe1: ((\forall (e3: C).((drop (S j0) O e2 e3) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e3) \to (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 e2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e3: C).(\lambda (H: (drop (S j0) O (CHead e2 k t) e3)).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e3)).((match k return (\lambda (k0: K).((drop (r k0 j0) O e2 e3) \to (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 k0 t)))))) with [(Bind b) \Rightarrow (\lambda (H1: (drop (r (Bind b) j0) O e2 e3)).(let H_x \def (IHj e2 e3 H1 c2 i H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c1: C).(drop j0 O c1 c2)) (\lambda (c1: C).(drop i j0 c1 e2)) (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Bind b) t)))) (\lambda (x: C).(\lambda (H3: (drop j0 O x c2)).(\lambda (H4: (drop i j0 x e2)).(ex_intro2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Bind b) t))) (CHead x (Bind b) (lift i (r (Bind b) j0) t)) (drop_drop (Bind b) j0 x c2 H3 (lift i (r (Bind b) j0) t)) (drop_skip (Bind b) i j0 x e2 H4 t))))) H2)))) | (Flat f) \Rightarrow (\lambda (H1: (drop (r (Flat f) j0) O e2 e3)).(let H_x \def (IHe1 e3 H1 c2 i H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 e2)) (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Flat f) t)))) (\lambda (x: C).(\lambda (H3: (drop (S j0) O x c2)).(\lambda (H4: (drop i (S j0) x e2)).(ex_intro2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Flat f) t))) (CHead x (Flat f) (lift i (r (Flat f) j0) t)) (drop_drop (Flat f) j0 x c2 H3 (lift i (r (Flat f) j0) t)) (drop_skip (Flat f) i j0 x e2 H4 t))))) H2))))]) (drop_gen_drop k e2 e3 t j0 H))))))))))) e1)))) j). + +theorem drop_trans_le: + \forall (i: nat).(\forall (d: nat).((le i d) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i O c2 e2) \to (ex2 C (\lambda (e1: C).(drop i O c1 e1)) (\lambda (e1: C).(drop h (minus d i) e1 e2))))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (d: nat).((le n d) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop n O c2 e2) \to (ex2 C (\lambda (e1: C).(drop n O c1 e1)) (\lambda (e1: C).(drop h (minus d n) e1 e2)))))))))))) (\lambda (d: nat).(\lambda (_: (le O d)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H0: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H1: (drop O O c2 e2)).(let H2 \def (eq_ind C c2 (\lambda (c: C).(drop h d c1 c)) H0 e2 (drop_gen_refl c2 e2 H1)) in (eq_ind nat d (\lambda (n: nat).(ex2 C (\lambda (e1: C).(drop O O c1 e1)) (\lambda (e1: C).(drop h n e1 e2)))) (ex_intro2 C (\lambda (e1: C).(drop O O c1 e1)) (\lambda (e1: C).(drop h d e1 e2)) c1 (drop_refl c1) H2) (minus d O) (minus_n_O d))))))))))) (\lambda (i0: nat).(\lambda (IHi: ((\forall (d: nat).((le i0 d) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i0 O c2 e2) \to (ex2 C (\lambda (e1: C).(drop i0 O c1 e1)) (\lambda (e1: C).(drop h (minus d i0) e1 e2))))))))))))).(\lambda (d: nat).(nat_ind (\lambda (n: nat).((le (S i0) n) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h n c1 c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus n (S i0)) e1 e2))))))))))) (\lambda (H: (le (S i0) O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (_: (drop h O c1 c2)).(\lambda (e2: C).(\lambda (_: (drop (S i0) O c2 e2)).(let H2 \def (match H return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus O (S i0)) e1 e2)))))) with [le_n \Rightarrow (\lambda (H2: (eq nat (S i0) O)).(let H3 \def (eq_ind nat (S i0) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus O (S i0)) e1 e2))) H3))) | (le_S m H2) \Rightarrow (\lambda (H3: (eq nat (S m) O)).((let H4 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H3) in (False_ind ((le (S i0) m) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus O (S i0)) e1 e2)))) H4)) H2))]) in (H2 (refl_equal nat O)))))))))) (\lambda (d0: nat).(\lambda (_: (((le (S i0) d0) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d0 c1 c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus d0 (S i0)) e1 e2)))))))))))).(\lambda (H: (le (S i0) (S d0))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (h: nat).((drop h (S d0) c c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H0: (drop h (S d0) (CSort n) c2)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c2 e2)).(and3_ind (eq C c2 (CSort n)) (eq nat h O) (eq nat (S d0) O) (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (H2: (eq C c2 (CSort n))).(\lambda (_: (eq nat h O)).(\lambda (_: (eq nat (S d0) O)).(let H5 \def (eq_ind C c2 (\lambda (c: C).(drop (S i0) O c e2)) H1 (CSort n) H2) in (and3_ind (eq C e2 (CSort n)) (eq nat (S i0) O) (eq nat O O) (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (H6: (eq C e2 (CSort n))).(\lambda (H7: (eq nat (S i0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n) (\lambda (c: C).(ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 c)))) (let H9 \def (eq_ind nat (S i0) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H7) in (False_ind (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 (CSort n)))) H9)) e2 H6)))) (drop_gen_sort n (S i0) O e2 H5)))))) (drop_gen_sort n h (S d0) c2 H0)))))))) (\lambda (c2: C).(\lambda (IHc: ((\forall (c3: C).(\forall (h: nat).((drop h (S d0) c2 c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c2 e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).(\forall (c3: C).(\forall (h: nat).((drop h (S d0) (CHead c2 k0 t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 k0 t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (c3: C).(\lambda (h: nat).(\lambda (H0: (drop h (S d0) (CHead c2 (Bind b) t) c3)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c3 e2)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C c3 (CHead e (Bind b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Bind b) d0) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r (Bind b) d0) c2 e))) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Bind b) t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C c3 (CHead x0 (Bind b) x1))).(\lambda (H3: (eq T t (lift h (r (Bind b) d0) x1))).(\lambda (H4: (drop h (r (Bind b) d0) c2 x0)).(let H5 \def (eq_ind C c3 (\lambda (c: C).(drop (S i0) O c e2)) H1 (CHead x0 (Bind b) x1) H2) in (eq_ind_r T (lift h (r (Bind b) d0) x1) (\lambda (t0: T).(ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Bind b) t0) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)))) (ex2_ind C (\lambda (e1: C).(drop i0 O c2 e1)) (\lambda (e1: C).(drop h (minus d0 i0) e1 e2)) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Bind b) (lift h (r (Bind b) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x: C).(\lambda (H6: (drop i0 O c2 x)).(\lambda (H7: (drop h (minus d0 i0) x e2)).(ex_intro2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Bind b) (lift h (r (Bind b) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)) x (drop_drop (Bind b) i0 c2 x H6 (lift h (r (Bind b) d0) x1)) H7)))) (IHi d0 (le_S_n i0 d0 H) c2 x0 h H4 e2 (drop_gen_drop (Bind b) x0 e2 x1 i0 H5))) t H3))))))) (drop_gen_skip_l c2 c3 t h d0 (Bind b) H0))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (c3: C).(\lambda (h: nat).(\lambda (H0: (drop h (S d0) (CHead c2 (Flat f) t) c3)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c3 e2)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C c3 (CHead e (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) d0) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r (Flat f) d0) c2 e))) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C c3 (CHead x0 (Flat f) x1))).(\lambda (H3: (eq T t (lift h (r (Flat f) d0) x1))).(\lambda (H4: (drop h (r (Flat f) d0) c2 x0)).(let H5 \def (eq_ind C c3 (\lambda (c: C).(drop (S i0) O c e2)) H1 (CHead x0 (Flat f) x1) H2) in (eq_ind_r T (lift h (r (Flat f) d0) x1) (\lambda (t0: T).(ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) t0) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)))) (ex2_ind C (\lambda (e1: C).(drop (S i0) O c2 e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) (lift h (r (Flat f) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x: C).(\lambda (H6: (drop (S i0) O c2 x)).(\lambda (H7: (drop h (minus (S d0) (S i0)) x e2)).(ex_intro2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) (lift h (r (Flat f) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)) x (drop_drop (Flat f) i0 c2 x H6 (lift h (r (Flat f) d0) x1)) H7)))) (IHc x0 h H4 e2 (drop_gen_drop (Flat f) x0 e2 x1 i0 H5))) t H3))))))) (drop_gen_skip_l c2 c3 t h d0 (Flat f) H0))))))))) k)))) c1))))) d)))) i). + +theorem drop_trans_ge: + \forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i O c2 e2) \to ((le d i) \to (drop (plus i h) O c1 e2))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop n O c2 e2) \to ((le d n) \to (drop (plus n h) O c1 e2)))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H0: (drop O O c2 e2)).(\lambda (H1: (le d O)).(eq_ind C c2 (\lambda (c: C).(drop (plus O h) O c1 c)) (let H2 \def (match H1 return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to (drop (plus O h) O c1 c2)))) with [le_n \Rightarrow (\lambda (H0: (eq nat d O)).(eq_ind nat O (\lambda (_: nat).(drop (plus O h) O c1 c2)) (let H2 \def (eq_ind nat d (\lambda (n: nat).(le n O)) H1 O H0) in (let H3 \def (eq_ind nat d (\lambda (n: nat).(drop h n c1 c2)) H O H0) in H3)) d (sym_eq nat d O H0))) | (le_S m H0) \Rightarrow (\lambda (H2: (eq nat (S m) O)).((let H1 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind ((le d m) \to (drop (plus O h) O c1 c2)) H1)) H0))]) in (H2 (refl_equal nat O))) e2 (drop_gen_refl c2 e2 H0)))))))))) (\lambda (i0: nat).(\lambda (IHi: ((\forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i0 O c2 e2) \to ((le d i0) \to (drop (plus i0 h) O c1 e2))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to ((le d (S i0)) \to (drop (plus (S i0) h) O c e2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) c2)).(\lambda (e2: C).(\lambda (H0: (drop (S i0) O c2 e2)).(\lambda (H1: (le d (S i0))).(and3_ind (eq C c2 (CSort n)) (eq nat h O) (eq nat d O) (drop (S (plus i0 h)) O (CSort n) e2) (\lambda (H2: (eq C c2 (CSort n))).(\lambda (H3: (eq nat h O)).(\lambda (H4: (eq nat d O)).(eq_ind_r nat O (\lambda (n0: nat).(drop (S (plus i0 n0)) O (CSort n) e2)) (let H5 \def (eq_ind nat d (\lambda (n: nat).(le n (S i0))) H1 O H4) in (let H6 \def (eq_ind C c2 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CSort n) H2) in (and3_ind (eq C e2 (CSort n)) (eq nat (S i0) O) (eq nat O O) (drop (S (plus i0 O)) O (CSort n) e2) (\lambda (H7: (eq C e2 (CSort n))).(\lambda (H8: (eq nat (S i0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n) (\lambda (c: C).(drop (S (plus i0 O)) O (CSort n) c)) (let H10 \def (eq_ind nat (S i0) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H8) in (False_ind (drop (S (plus i0 O)) O (CSort n) (CSort n)) H10)) e2 H7)))) (drop_gen_sort n (S i0) O e2 H6)))) h H3)))) (drop_gen_sort n h d c2 H)))))))))) (\lambda (c2: C).(\lambda (IHc: ((\forall (c3: C).(\forall (d: nat).(\forall (h: nat).((drop h d c2 c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le d (S i0)) \to (drop (S (plus i0 h)) O c2 e2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: C).(\lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le n (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) e2))))))) (\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le O (S i0)) \to (drop (S (plus i0 n)) O (CHead c2 k t) e2)))))) (\lambda (H: (drop O O (CHead c2 k t) c3)).(\lambda (e2: C).(\lambda (H0: (drop (S i0) O c3 e2)).(\lambda (_: (le O (S i0))).(let H2 \def (eq_ind_r C c3 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CHead c2 k t) (drop_gen_refl (CHead c2 k t) c3 H)) in (eq_ind nat i0 (\lambda (n: nat).(drop (S n) O (CHead c2 k t) e2)) (drop_drop k i0 c2 e2 (drop_gen_drop k c2 e2 t i0 H2) t) (plus i0 O) (plus_n_O i0))))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le O (S i0)) \to (drop (S (plus i0 n)) O (CHead c2 k t) e2))))))).(\lambda (H0: (drop (S n) O (CHead c2 k t) c3)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c3 e2)).(\lambda (H2: (le O (S i0))).(eq_ind nat (S (plus i0 n)) (\lambda (n0: nat).(drop (S n0) O (CHead c2 k t) e2)) (drop_drop k (S (plus i0 n)) c2 e2 (eq_ind_r nat (S (r k (plus i0 n))) (\lambda (n0: nat).(drop n0 O c2 e2)) (eq_ind_r nat (plus i0 (r k n)) (\lambda (n0: nat).(drop (S n0) O c2 e2)) (IHc c3 O (r k n) (drop_gen_drop k c2 c3 t n H0) e2 H1 H2) (r k (plus i0 n)) (r_plus_sym k i0 n)) (r k (S (plus i0 n))) (r_S k (plus i0 n))) t) (plus i0 (S n)) (plus_n_Sm i0 n)))))))) h)) (\lambda (d0: nat).(\lambda (IHd: ((\forall (h: nat).((drop h d0 (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le d0 (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) e2)))))))).(\lambda (h: nat).(\lambda (H: (drop h (S d0) (CHead c2 k t) c3)).(\lambda (e2: C).(\lambda (H0: (drop (S i0) O c3 e2)).(\lambda (H1: (le (S d0) (S i0))).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C c3 (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k d0) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k d0) c2 e))) (drop (S (plus i0 h)) O (CHead c2 k t) e2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C c3 (CHead x0 k x1))).(\lambda (H3: (eq T t (lift h (r k d0) x1))).(\lambda (H4: (drop h (r k d0) c2 x0)).(let H5 \def (eq_ind C c3 (\lambda (c: C).(\forall (h: nat).((drop h d0 (CHead c2 k t) c) \to (\forall (e2: C).((drop (S i0) O c e2) \to ((le d0 (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) e2))))))) IHd (CHead x0 k x1) H2) in (let H6 \def (eq_ind C c3 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CHead x0 k x1) H2) in (let H7 \def (eq_ind T t (\lambda (t: T).(\forall (h: nat).((drop h d0 (CHead c2 k t) (CHead x0 k x1)) \to (\forall (e2: C).((drop (S i0) O (CHead x0 k x1) e2) \to ((le d0 (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) e2))))))) H5 (lift h (r k d0) x1) H3) in (eq_ind_r T (lift h (r k d0) x1) (\lambda (t0: T).(drop (S (plus i0 h)) O (CHead c2 k t0) e2)) (drop_drop k (plus i0 h) c2 e2 (K_ind (\lambda (k0: K).((drop h (r k0 d0) c2 x0) \to ((drop (r k0 i0) O x0 e2) \to (drop (r k0 (plus i0 h)) O c2 e2)))) (\lambda (b: B).(\lambda (H8: (drop h (r (Bind b) d0) c2 x0)).(\lambda (H9: (drop (r (Bind b) i0) O x0 e2)).(IHi c2 x0 (r (Bind b) d0) h H8 e2 H9 (le_S_n (r (Bind b) d0) i0 H1))))) (\lambda (f: F).(\lambda (H8: (drop h (r (Flat f) d0) c2 x0)).(\lambda (H9: (drop (r (Flat f) i0) O x0 e2)).(IHc x0 (r (Flat f) d0) h H8 e2 H9 H1)))) k H4 (drop_gen_drop k x0 e2 x1 i0 H6)) (lift h (r k d0) x1)) t H3))))))))) (drop_gen_skip_l c2 c3 t h d0 k H))))))))) d))))))) c1)))) i). + +inductive drop1: PList \to (C \to (C \to Prop)) \def +| drop1_nil: \forall (c: C).(drop1 PNil c c) +| drop1_cons: \forall (c1: C).(\forall (c2: C).(\forall (h: nat).(\forall (d: nat).((drop h d c1 c2) \to (\forall (c3: C).(\forall (hds: PList).((drop1 hds c2 c3) \to (drop1 (PCons h d hds) c1 c3)))))))). + +definition ctrans: + PList \to (nat \to (T \to T)) +\def + let rec ctrans (hds: PList) on hds: (nat \to (T \to T)) \def (\lambda (i: nat).(\lambda (t: T).(match hds with [PNil \Rightarrow t | (PCons h d hds0) \Rightarrow (let j \def (trans hds0 i) in (let u \def (ctrans hds0 i t) in (match (blt j d) with [true \Rightarrow (lift h (minus d (S j)) u) | false \Rightarrow u])))]))) in ctrans. + +theorem drop1_skip_bind: + \forall (b: B).(\forall (e: C).(\forall (hds: PList).(\forall (c: C).(\forall (u: T).((drop1 hds c e) \to (drop1 (Ss hds) (CHead c (Bind b) (lift1 hds u)) (CHead e (Bind b) u))))))) +\def + \lambda (b: B).(\lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c: C).(\forall (u: T).((drop1 p c e) \to (drop1 (Ss p) (CHead c (Bind b) (lift1 p u)) (CHead e (Bind b) u)))))) (\lambda (c: C).(\lambda (u: T).(\lambda (H: (drop1 PNil c e)).(let H0 \def (match H return (\lambda (p: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p c0 c1)).((eq PList p PNil) \to ((eq C c0 c) \to ((eq C c1 e) \to (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq C c0 e)).(eq_ind C c (\lambda (c1: C).((eq C c1 e) \to (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u)))) (\lambda (H3: (eq C c e)).(eq_ind C e (\lambda (c: C).(drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u))) (drop1_nil (CHead e (Bind b) u)) c (sym_eq C c e H3))) c0 (sym_eq C c0 c H1) H2)))) | (drop1_cons c1 c2 h d H0 c3 hds H1) \Rightarrow (\lambda (H2: (eq PList (PCons h d hds) PNil)).(\lambda (H3: (eq C c1 c)).(\lambda (H4: (eq C c3 e)).((let H5 \def (eq_ind PList (PCons h d hds) (\lambda (e0: PList).(match e0 return (\lambda (_: PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H2) in (False_ind ((eq C c1 c) \to ((eq C c3 e) \to ((drop h d c1 c2) \to ((drop1 hds c2 c3) \to (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u)))))) H5)) H3 H4 H0 H1))))]) in (H0 (refl_equal PList PNil) (refl_equal C c) (refl_equal C e)))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: C).(\forall (u: T).((drop1 p c e) \to (drop1 (Ss p) (CHead c (Bind b) (lift1 p u)) (CHead e (Bind b) u))))))).(\lambda (c: C).(\lambda (u: T).(\lambda (H0: (drop1 (PCons n n0 p) c e)).(let H1 \def (match H0 return (\lambda (p0: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p0 c0 c1)).((eq PList p0 (PCons n n0 p)) \to ((eq C c0 c) \to ((eq C c1 e) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (H1: (eq PList PNil (PCons n n0 p))).(\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq C c0 e)).((let H4 \def (eq_ind PList PNil (\lambda (e0: PList).(match e0 return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H1) in (False_ind ((eq C c0 c) \to ((eq C c0 e) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)))) H4)) H2 H3)))) | (drop1_cons c1 c2 h d H1 c3 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H4: (eq C c1 c)).(\lambda (H5: (eq C c3 e)).((let H6 \def (f_equal PList PList (\lambda (e0: PList).(match e0 return (\lambda (_: PList).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H3) in ((let H7 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: PList).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H3) in ((let H8 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: PList).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H3) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n1 d c1 c2) \to ((drop1 hds c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))))))) (\lambda (H9: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n n1 c1 c2) \to ((drop1 hds c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)))))))) (\lambda (H10: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c1 c) \to ((eq C c3 e) \to ((drop n n0 c1 c2) \to ((drop1 p0 c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))))) (\lambda (H11: (eq C c1 c)).(eq_ind C c (\lambda (c0: C).((eq C c3 e) \to ((drop n n0 c0 c2) \to ((drop1 p c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)))))) (\lambda (H12: (eq C c3 e)).(eq_ind C e (\lambda (c0: C).((drop n n0 c c2) \to ((drop1 p c2 c0) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))) (\lambda (H13: (drop n n0 c c2)).(\lambda (H14: (drop1 p c2 e)).(drop1_cons (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead c2 (Bind b) (lift1 p u)) n (S n0) (drop_skip_bind n n0 c c2 H13 b (lift1 p u)) (CHead e (Bind b) u) (Ss p) (H c2 u H14)))) c3 (sym_eq C c3 e H12))) c1 (sym_eq C c1 c H11))) hds (sym_eq PList hds p H10))) d (sym_eq nat d n0 H9))) h (sym_eq nat h n H8))) H7)) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList (PCons n n0 p)) (refl_equal C c) (refl_equal C e)))))))))) hds))). + +theorem drop1_cons_tail: + \forall (c2: C).(\forall (c3: C).(\forall (h: nat).(\forall (d: nat).((drop h d c2 c3) \to (\forall (hds: PList).(\forall (c1: C).((drop1 hds c1 c2) \to (drop1 (PConsTail hds h d) c1 c3)))))))) +\def + \lambda (c2: C).(\lambda (c3: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (drop h d c2 c3)).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c1: C).((drop1 p c1 c2) \to (drop1 (PConsTail p h d) c1 c3)))) (\lambda (c1: C).(\lambda (H0: (drop1 PNil c1 c2)).(let H1 \def (match H0 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p c c0)).((eq PList p PNil) \to ((eq C c c1) \to ((eq C c0 c2) \to (drop1 (PCons h d PNil) c1 c3)))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c c1)).(\lambda (H3: (eq C c c2)).(eq_ind C c1 (\lambda (c0: C).((eq C c0 c2) \to (drop1 (PCons h d PNil) c1 c3))) (\lambda (H4: (eq C c1 c2)).(eq_ind C c2 (\lambda (c0: C).(drop1 (PCons h d PNil) c0 c3)) (drop1_cons c2 c3 h d H c3 PNil (drop1_nil c3)) c1 (sym_eq C c1 c2 H4))) c (sym_eq C c c1 H2) H3)))) | (drop1_cons c0 c4 h0 d0 H1 c5 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h0 d0 hds) PNil)).(\lambda (H4: (eq C c0 c1)).(\lambda (H5: (eq C c5 c2)).((let H6 \def (eq_ind PList (PCons h0 d0 hds) (\lambda (e: PList).(match e return (\lambda (_: PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c0 c1) \to ((eq C c5 c2) \to ((drop h0 d0 c0 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons h d PNil) c1 c3))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c1) (refl_equal C c2))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H0: ((\forall (c1: C).((drop1 p c1 c2) \to (drop1 (PConsTail p h d) c1 c3))))).(\lambda (c1: C).(\lambda (H1: (drop1 (PCons n n0 p) c1 c2)).(let H2 \def (match H1 return (\lambda (p0: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p0 c c0)).((eq PList p0 (PCons n n0 p)) \to ((eq C c c1) \to ((eq C c0 c2) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3)))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c c1)).(\lambda (H4: (eq C c c2)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c1) \to ((eq C c c2) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3))) H5)) H3 H4)))) | (drop1_cons c0 c4 h0 d0 H2 c5 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h0 d0 hds) (PCons n n0 p))).(\lambda (H5: (eq C c0 c1)).(\lambda (H6: (eq C c5 c2)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e return (\lambda (_: PList).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h0 d0 hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: PList).nat) with [PNil \Rightarrow d0 | (PCons _ n _) \Rightarrow n])) (PCons h0 d0 hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: PList).nat) with [PNil \Rightarrow h0 | (PCons n _ _) \Rightarrow n])) (PCons h0 d0 hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d0 n0) \to ((eq PList hds p) \to ((eq C c0 c1) \to ((eq C c5 c2) \to ((drop n1 d0 c0 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3)))))))) (\lambda (H10: (eq nat d0 n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c0 c1) \to ((eq C c5 c2) \to ((drop n n1 c0 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c0 c1) \to ((eq C c5 c2) \to ((drop n n0 c0 c4) \to ((drop1 p0 c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3)))))) (\lambda (H12: (eq C c0 c1)).(eq_ind C c1 (\lambda (c: C).((eq C c5 c2) \to ((drop n n0 c c4) \to ((drop1 p c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3))))) (\lambda (H13: (eq C c5 c2)).(eq_ind C c2 (\lambda (c: C).((drop n n0 c1 c4) \to ((drop1 p c4 c) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3)))) (\lambda (H14: (drop n n0 c1 c4)).(\lambda (H15: (drop1 p c4 c2)).(drop1_cons c1 c4 n n0 H14 c3 (PConsTail p h d) (H0 c4 H15)))) c5 (sym_eq C c5 c2 H13))) c0 (sym_eq C c0 c1 H12))) hds (sym_eq PList hds p H11))) d0 (sym_eq nat d0 n0 H10))) h0 (sym_eq nat h0 n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c1) (refl_equal C c2))))))))) hds)))))). + +theorem lift1_free: + \forall (hds: PList).(\forall (i: nat).(\forall (t: T).(eq T (lift1 hds (lift (S i) O t)) (lift (S (trans hds i)) O (ctrans hds i t))))) +\def + \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (i: nat).(\forall (t: T).(eq T (lift1 p (lift (S i) O t)) (lift (S (trans p i)) O (ctrans p i t)))))) (\lambda (i: nat).(\lambda (t: T).(refl_equal T (lift (S i) O t)))) (\lambda (h: nat).(\lambda (d: nat).(\lambda (hds0: PList).(\lambda (H: ((\forall (i: nat).(\forall (t: T).(eq T (lift1 hds0 (lift (S i) O t)) (lift (S (trans hds0 i)) O (ctrans hds0 i t))))))).(\lambda (i: nat).(\lambda (t: T).(eq_ind_r T (lift (S (trans hds0 i)) O (ctrans hds0 i t)) (\lambda (t0: T).(eq T (lift h d t0) (lift (S (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)])) O (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i t)) | false \Rightarrow (ctrans hds0 i t)])))) (xinduction bool (blt (trans hds0 i) d) (\lambda (b: bool).(eq T (lift h d (lift (S (trans hds0 i)) O (ctrans hds0 i t))) (lift (S (match b with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)])) O (match b with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i t)) | false \Rightarrow (ctrans hds0 i t)])))) (\lambda (x_x: bool).(bool_ind (\lambda (b: bool).((eq bool (blt (trans hds0 i) d) b) \to (eq T (lift h d (lift (S (trans hds0 i)) O (ctrans hds0 i t))) (lift (S (match b with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)])) O (match b with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i t)) | false \Rightarrow (ctrans hds0 i t)]))))) (\lambda (H0: (eq bool (blt (trans hds0 i) d) true)).(eq_ind_r nat (plus (S (trans hds0 i)) (minus d (S (trans hds0 i)))) (\lambda (n: nat).(eq T (lift h n (lift (S (trans hds0 i)) O (ctrans hds0 i t))) (lift (S (trans hds0 i)) O (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i t))))) (eq_ind_r T (lift (S (trans hds0 i)) O (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i t))) (\lambda (t0: T).(eq T t0 (lift (S (trans hds0 i)) O (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i t))))) (refl_equal T (lift (S (trans hds0 i)) O (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i t)))) (lift h (plus (S (trans hds0 i)) (minus d (S (trans hds0 i)))) (lift (S (trans hds0 i)) O (ctrans hds0 i t))) (lift_d (ctrans hds0 i t) h (S (trans hds0 i)) (minus d (S (trans hds0 i))) O (le_O_n (minus d (S (trans hds0 i)))))) d (le_plus_minus (S (trans hds0 i)) d (bge_le (S (trans hds0 i)) d (le_bge (S (trans hds0 i)) d (lt_le_S (trans hds0 i) d (blt_lt d (trans hds0 i) H0))))))) (\lambda (H0: (eq bool (blt (trans hds0 i) d) false)).(eq_ind_r T (lift (plus h (S (trans hds0 i))) O (ctrans hds0 i t)) (\lambda (t0: T).(eq T t0 (lift (S (plus (trans hds0 i) h)) O (ctrans hds0 i t)))) (eq_ind nat (S (plus h (trans hds0 i))) (\lambda (n: nat).(eq T (lift n O (ctrans hds0 i t)) (lift (S (plus (trans hds0 i) h)) O (ctrans hds0 i t)))) (eq_ind_r nat (plus (trans hds0 i) h) (\lambda (n: nat).(eq T (lift (S n) O (ctrans hds0 i t)) (lift (S (plus (trans hds0 i) h)) O (ctrans hds0 i t)))) (refl_equal T (lift (S (plus (trans hds0 i) h)) O (ctrans hds0 i t))) (plus h (trans hds0 i)) (plus_comm h (trans hds0 i))) (plus h (S (trans hds0 i))) (plus_n_Sm h (trans hds0 i))) (lift h d (lift (S (trans hds0 i)) O (ctrans hds0 i t))) (lift_free (ctrans hds0 i t) (S (trans hds0 i)) h O d (eq_ind nat (S (plus O (trans hds0 i))) (\lambda (n: nat).(le d n)) (eq_ind_r nat (plus (trans hds0 i) O) (\lambda (n: nat).(le d (S n))) (le_S d (plus (trans hds0 i) O) (le_plus_trans d (trans hds0 i) O (bge_le d (trans hds0 i) H0))) (plus O (trans hds0 i)) (plus_comm O (trans hds0 i))) (plus O (S (trans hds0 i))) (plus_n_Sm O (trans hds0 i))) (le_O_n d)))) x_x))) (lift1 hds0 (lift (S i) O t)) (H i t)))))))) hds). + +inductive clear: C \to (C \to Prop) \def +| clear_bind: \forall (b: B).(\forall (e: C).(\forall (u: T).(clear (CHead e (Bind b) u) (CHead e (Bind b) u)))) +| clear_flat: \forall (e: C).(\forall (c: C).((clear e c) \to (\forall (f: F).(\forall (u: T).(clear (CHead e (Flat f) u) c))))). + +inductive getl (h:nat) (c1:C) (c2:C): Prop \def +| getl_intro: \forall (e: C).((drop h O c1 e) \to ((clear e c2) \to (getl h c1 c2))). + +definition cimp: + C \to (C \to Prop) +\def + \lambda (c1: C).(\lambda (c2: C).(\forall (b: B).(\forall (d1: C).(\forall (w: T).(\forall (h: nat).((getl h c1 (CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl h c2 (CHead d2 (Bind b) w)))))))))). + +theorem clear_gen_sort: + \forall (x: C).(\forall (n: nat).((clear (CSort n) x) \to (\forall (P: Prop).P))) +\def + \lambda (x: C).(\lambda (n: nat).(\lambda (H: (clear (CSort n) x)).(\lambda (P: Prop).(let H0 \def (match H return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (clear c c0)).((eq C c (CSort n)) \to ((eq C c0 x) \to P))))) with [(clear_bind b e u) \Rightarrow (\lambda (H0: (eq C (CHead e (Bind b) u) (CSort n))).(\lambda (H1: (eq C (CHead e (Bind b) u) x)).((let H2 \def (eq_ind C (CHead e (Bind b) u) (\lambda (e0: C).(match e0 return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H0) in (False_ind ((eq C (CHead e (Bind b) u) x) \to P) H2)) H1))) | (clear_flat e c H0 f u) \Rightarrow (\lambda (H1: (eq C (CHead e (Flat f) u) (CSort n))).(\lambda (H2: (eq C c x)).((let H3 \def (eq_ind C (CHead e (Flat f) u) (\lambda (e0: C).(match e0 return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H1) in (False_ind ((eq C c x) \to ((clear e c) \to P)) H3)) H2 H0)))]) in (H0 (refl_equal C (CSort n)) (refl_equal C x)))))). + +theorem clear_gen_bind: + \forall (b: B).(\forall (e: C).(\forall (x: C).(\forall (u: T).((clear (CHead e (Bind b) u) x) \to (eq C x (CHead e (Bind b) u)))))) +\def + \lambda (b: B).(\lambda (e: C).(\lambda (x: C).(\lambda (u: T).(\lambda (H: (clear (CHead e (Bind b) u) x)).(let H0 \def (match H return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (clear c c0)).((eq C c (CHead e (Bind b) u)) \to ((eq C c0 x) \to (eq C x (CHead e (Bind b) u))))))) with [(clear_bind b0 e0 u0) \Rightarrow (\lambda (H0: (eq C (CHead e0 (Bind b0) u0) (CHead e (Bind b) u))).(\lambda (H1: (eq C (CHead e0 (Bind b0) u0) x)).((let H2 \def (f_equal C T (\lambda (e1: C).(match e1 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H0) in ((let H3 \def (f_equal C B (\lambda (e1: C).(match e1 return (\lambda (_: C).B) with [(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H0) in ((let H4 \def (f_equal C C (\lambda (e1: C).(match e1 return (\lambda (_: C).C) with [(CSort _) \Rightarrow e0 | (CHead c _ _) \Rightarrow c])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H0) in (eq_ind C e (\lambda (c: C).((eq B b0 b) \to ((eq T u0 u) \to ((eq C (CHead c (Bind b0) u0) x) \to (eq C x (CHead e (Bind b) u)))))) (\lambda (H5: (eq B b0 b)).(eq_ind B b (\lambda (b1: B).((eq T u0 u) \to ((eq C (CHead e (Bind b1) u0) x) \to (eq C x (CHead e (Bind b) u))))) (\lambda (H6: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C (CHead e (Bind b) t) x) \to (eq C x (CHead e (Bind b) u)))) (\lambda (H7: (eq C (CHead e (Bind b) u) x)).(eq_ind C (CHead e (Bind b) u) (\lambda (c: C).(eq C c (CHead e (Bind b) u))) (refl_equal C (CHead e (Bind b) u)) x H7)) u0 (sym_eq T u0 u H6))) b0 (sym_eq B b0 b H5))) e0 (sym_eq C e0 e H4))) H3)) H2)) H1))) | (clear_flat e0 c H0 f u0) \Rightarrow (\lambda (H1: (eq C (CHead e0 (Flat f) u0) (CHead e (Bind b) u))).(\lambda (H2: (eq C c x)).((let H3 \def (eq_ind C (CHead e0 (Flat f) u0) (\lambda (e1: C).(match e1 return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (CHead e (Bind b) u) H1) in (False_ind ((eq C c x) \to ((clear e0 c) \to (eq C x (CHead e (Bind b) u)))) H3)) H2 H0)))]) in (H0 (refl_equal C (CHead e (Bind b) u)) (refl_equal C x))))))). + +theorem clear_gen_flat: + \forall (f: F).(\forall (e: C).(\forall (x: C).(\forall (u: T).((clear (CHead e (Flat f) u) x) \to (clear e x))))) +\def + \lambda (f: F).(\lambda (e: C).(\lambda (x: C).(\lambda (u: T).(\lambda (H: (clear (CHead e (Flat f) u) x)).(let H0 \def (match H return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (clear c c0)).((eq C c (CHead e (Flat f) u)) \to ((eq C c0 x) \to (clear e x)))))) with [(clear_bind b e0 u0) \Rightarrow (\lambda (H0: (eq C (CHead e0 (Bind b) u0) (CHead e (Flat f) u))).(\lambda (H1: (eq C (CHead e0 (Bind b) u0) x)).((let H2 \def (eq_ind C (CHead e0 (Bind b) u0) (\lambda (e1: C).(match e1 return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e (Flat f) u) H0) in (False_ind ((eq C (CHead e0 (Bind b) u0) x) \to (clear e x)) H2)) H1))) | (clear_flat e0 c H0 f0 u0) \Rightarrow (\lambda (H1: (eq C (CHead e0 (Flat f0) u0) (CHead e (Flat f) u))).(\lambda (H2: (eq C c x)).((let H3 \def (f_equal C T (\lambda (e1: C).(match e1 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) H1) in ((let H4 \def (f_equal C F (\lambda (e1: C).(match e1 return (\lambda (_: C).F) with [(CSort _) \Rightarrow f0 | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).F) with [(Bind _) \Rightarrow f0 | (Flat f) \Rightarrow f])])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) H1) in ((let H5 \def (f_equal C C (\lambda (e1: C).(match e1 return (\lambda (_: C).C) with [(CSort _) \Rightarrow e0 | (CHead c _ _) \Rightarrow c])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) H1) in (eq_ind C e (\lambda (c0: C).((eq F f0 f) \to ((eq T u0 u) \to ((eq C c x) \to ((clear c0 c) \to (clear e x)))))) (\lambda (H6: (eq F f0 f)).(eq_ind F f (\lambda (_: F).((eq T u0 u) \to ((eq C c x) \to ((clear e c) \to (clear e x))))) (\lambda (H7: (eq T u0 u)).(eq_ind T u (\lambda (_: T).((eq C c x) \to ((clear e c) \to (clear e x)))) (\lambda (H8: (eq C c x)).(eq_ind C x (\lambda (c0: C).((clear e c0) \to (clear e x))) (\lambda (H9: (clear e x)).H9) c (sym_eq C c x H8))) u0 (sym_eq T u0 u H7))) f0 (sym_eq F f0 f H6))) e0 (sym_eq C e0 e H5))) H4)) H3)) H2 H0)))]) in (H0 (refl_equal C (CHead e (Flat f) u)) (refl_equal C x))))))). + +theorem clear_gen_flat_r: + \forall (f: F).(\forall (x: C).(\forall (e: C).(\forall (u: T).((clear x (CHead e (Flat f) u)) \to (\forall (P: Prop).P))))) +\def + \lambda (f: F).(\lambda (x: C).(\lambda (e: C).(\lambda (u: T).(\lambda (H: (clear x (CHead e (Flat f) u))).(\lambda (P: Prop).(insert_eq C (CHead e (Flat f) u) (\lambda (c: C).(clear x c)) P (\lambda (y: C).(\lambda (H0: (clear x y)).(clear_ind (\lambda (_: C).(\lambda (c0: C).((eq C c0 (CHead e (Flat f) u)) \to P))) (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (H1: (eq C (CHead e0 (Bind b) u0) (CHead e (Flat f) u))).(let H2 \def (eq_ind C (CHead e0 (Bind b) u0) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e (Flat f) u) H1) in (False_ind P H2)))))) (\lambda (e0: C).(\lambda (c: C).(\lambda (H1: (clear e0 c)).(\lambda (H2: (((eq C c (CHead e (Flat f) u)) \to P))).(\lambda (_: F).(\lambda (_: T).(\lambda (H3: (eq C c (CHead e (Flat f) u))).(let H4 \def (eq_ind C c (\lambda (c: C).((eq C c (CHead e (Flat f) u)) \to P)) H2 (CHead e (Flat f) u) H3) in (let H5 \def (eq_ind C c (\lambda (c: C).(clear e0 c)) H1 (CHead e (Flat f) u) H3) in (H4 (refl_equal C (CHead e (Flat f) u)))))))))))) x y H0))) H)))))). + +theorem clear_gen_all: + \forall (c1: C).(\forall (c2: C).((clear c1 c2) \to (ex_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(eq C c2 (CHead e (Bind b) u)))))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (clear c1 c2)).(clear_ind (\lambda (_: C).(\lambda (c0: C).(ex_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(eq C c0 (CHead e (Bind b) u)))))))) (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(ex_3_intro B C T (\lambda (b0: B).(\lambda (e0: C).(\lambda (u0: T).(eq C (CHead e (Bind b) u) (CHead e0 (Bind b0) u0))))) b e u (refl_equal C (CHead e (Bind b) u)))))) (\lambda (e: C).(\lambda (c: C).(\lambda (H0: (clear e c)).(\lambda (H1: (ex_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(eq C c (CHead e (Bind b) u))))))).(\lambda (_: F).(\lambda (_: T).(let H2 \def H1 in (ex_3_ind B C T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(eq C c (CHead e0 (Bind b) u0))))) (ex_3 B C T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(eq C c (CHead e0 (Bind b) u0)))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H3: (eq C c (CHead x1 (Bind x0) x2))).(let H4 \def (eq_ind C c (\lambda (c: C).(clear e c)) H0 (CHead x1 (Bind x0) x2) H3) in (eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c0: C).(ex_3 B C T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(eq C c0 (CHead e0 (Bind b) u0))))))) (ex_3_intro B C T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(eq C (CHead x1 (Bind x0) x2) (CHead e0 (Bind b) u0))))) x0 x1 x2 (refl_equal C (CHead x1 (Bind x0) x2))) c H3)))))) H2)))))))) c1 c2 H))). + +theorem drop_clear: + \forall (c1: C).(\forall (c2: C).(\forall (i: nat).((drop (S i) O c1 c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c1 (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (i: nat).((drop (S i) O c c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H: (drop (S i) O (CSort n) c2)).(and3_ind (eq C c2 (CSort n)) (eq nat (S i) O) (eq nat O O) (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CSort n) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))) (\lambda (_: (eq C c2 (CSort n))).(\lambda (H1: (eq nat (S i) O)).(\lambda (_: (eq nat O O)).(let H3 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CSort n) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))) H3))))) (drop_gen_sort n (S i) O c2 H)))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (i: nat).((drop (S i) O c c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop (S i) O (CHead c k t) c2)).((match k return (\lambda (k0: K).((drop (r k0 i) O c c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c k0 t) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))))) with [(Bind b) \Rightarrow (\lambda (H1: (drop (r (Bind b) i) O c c2)).(ex2_3_intro B C T (\lambda (b0: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Bind b) t) (CHead e (Bind b0) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) b c t (clear_bind b c t) H1)) | (Flat f) \Rightarrow (\lambda (H1: (drop (r (Flat f) i) O c c2)).(let H2 \def (H c2 i H1) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Flat f) t) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H3: (clear c (CHead x1 (Bind x0) x2))).(\lambda (H4: (drop i O x1 c2)).(ex2_3_intro B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Flat f) t) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) x0 x1 x2 (clear_flat c (CHead x1 (Bind x0) x2) H3 f t) H4)))))) H2)))]) (drop_gen_drop k c c2 t i H0))))))))) c1). + +theorem drop_clear_O: + \forall (b: B).(\forall (c: C).(\forall (e1: C).(\forall (u: T).((clear c (CHead e1 (Bind b) u)) \to (\forall (e2: C).(\forall (i: nat).((drop i O e1 e2) \to (drop (S i) O c e2)))))))) +\def + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e1: C).(\forall (u: T).((clear c0 (CHead e1 (Bind b) u)) \to (\forall (e2: C).(\forall (i: nat).((drop i O e1 e2) \to (drop (S i) O c0 e2)))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (u: T).(\lambda (H: (clear (CSort n) (CHead e1 (Bind b) u))).(\lambda (e2: C).(\lambda (i: nat).(\lambda (_: (drop i O e1 e2)).(clear_gen_sort (CHead e1 (Bind b) u) n H (drop (S i) O (CSort n) e2))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e1: C).(\forall (u: T).((clear c0 (CHead e1 (Bind b) u)) \to (\forall (e2: C).(\forall (i: nat).((drop i O e1 e2) \to (drop (S i) O c0 e2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (u: T).(\lambda (H0: (clear (CHead c0 k t) (CHead e1 (Bind b) u))).(\lambda (e2: C).(\lambda (i: nat).(\lambda (H1: (drop i O e1 e2)).((match k return (\lambda (k0: K).((clear (CHead c0 k0 t) (CHead e1 (Bind b) u)) \to (drop (S i) O (CHead c0 k0 t) e2))) with [(Bind b0) \Rightarrow (\lambda (H2: (clear (CHead c0 (Bind b0) t) (CHead e1 (Bind b) u))).(let H3 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow e1 | (CHead c _ _) \Rightarrow c])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in ((let H4 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in ((let H5 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in (\lambda (H6: (eq B b b0)).(\lambda (H7: (eq C e1 c0)).(let H8 \def (eq_ind C e1 (\lambda (c: C).(drop i O c e2)) H1 c0 H7) in (eq_ind B b (\lambda (b1: B).(drop (S i) O (CHead c0 (Bind b1) t) e2)) (drop_drop (Bind b) i c0 e2 H8 t) b0 H6))))) H4)) H3))) | (Flat f) \Rightarrow (\lambda (H2: (clear (CHead c0 (Flat f) t) (CHead e1 (Bind b) u))).(drop_drop (Flat f) i c0 e2 (H e1 u (clear_gen_flat f c0 (CHead e1 (Bind b) u) t H2) e2 i H1) t))]) H0))))))))))) c)). + +theorem drop_clear_S: + \forall (x2: C).(\forall (x1: C).(\forall (h: nat).(\forall (d: nat).((drop h (S d) x1 x2) \to (\forall (b: B).(\forall (c2: C).(\forall (u: T).((clear x2 (CHead c2 (Bind b) u)) \to (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))))))))))) +\def + \lambda (x2: C).(C_ind (\lambda (c: C).(\forall (x1: C).(\forall (h: nat).(\forall (d: nat).((drop h (S d) x1 c) \to (\forall (b: B).(\forall (c2: C).(\forall (u: T).((clear c (CHead c2 (Bind b) u)) \to (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))))))))))) (\lambda (n: nat).(\lambda (x1: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (_: (drop h (S d) x1 (CSort n))).(\lambda (b: B).(\lambda (c2: C).(\lambda (u: T).(\lambda (H0: (clear (CSort n) (CHead c2 (Bind b) u))).(clear_gen_sort (CHead c2 (Bind b) u) n H0 (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))))))))))))) (\lambda (c: C).(\lambda (H: ((\forall (x1: C).(\forall (h: nat).(\forall (d: nat).((drop h (S d) x1 c) \to (\forall (b: B).(\forall (c2: C).(\forall (u: T).((clear c (CHead c2 (Bind b) u)) \to (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (x1: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h (S d) x1 (CHead c k t))).(\lambda (b: B).(\lambda (c2: C).(\lambda (u: T).(\lambda (H1: (clear (CHead c k t) (CHead c2 (Bind b) u))).(ex2_ind C (\lambda (e: C).(eq C x1 (CHead e k (lift h (r k d) t)))) (\lambda (e: C).(drop h (r k d) e c)) (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))) (\lambda (x: C).(\lambda (H2: (eq C x1 (CHead x k (lift h (r k d) t)))).(\lambda (H3: (drop h (r k d) x c)).(eq_ind_r C (CHead x k (lift h (r k d) t)) (\lambda (c0: C).(ex2 C (\lambda (c1: C).(clear c0 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))) ((match k return (\lambda (k0: K).((clear (CHead c k0 t) (CHead c2 (Bind b) u)) \to ((drop h (r k0 d) x c) \to (ex2 C (\lambda (c1: C).(clear (CHead x k0 (lift h (r k0 d) t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))))) with [(Bind b0) \Rightarrow (\lambda (H4: (clear (CHead c (Bind b0) t) (CHead c2 (Bind b) u))).(\lambda (H5: (drop h (r (Bind b0) d) x c)).(let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in ((let H7 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in ((let H8 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in (\lambda (H9: (eq B b b0)).(\lambda (H10: (eq C c2 c)).(eq_ind_r T t (\lambda (t0: T).(ex2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b) (lift h d t0)))) (\lambda (c1: C).(drop h d c1 c2)))) (eq_ind_r C c (\lambda (c0: C).(ex2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c0)))) (eq_ind_r B b0 (\lambda (b1: B).(ex2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b1) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c)))) (ex_intro2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b0) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c)) x (clear_bind b0 x (lift h d t)) H5) b H9) c2 H10) u H8)))) H7)) H6)))) | (Flat f) \Rightarrow (\lambda (H4: (clear (CHead c (Flat f) t) (CHead c2 (Bind b) u))).(\lambda (H5: (drop h (r (Flat f) d) x c)).(let H6 \def (H x h d H5 b c2 u (clear_gen_flat f c (CHead c2 (Bind b) u) t H4)) in (ex2_ind C (\lambda (c1: C).(clear x (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)) (ex2 C (\lambda (c1: C).(clear (CHead x (Flat f) (lift h (r (Flat f) d) t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))) (\lambda (x0: C).(\lambda (H7: (clear x (CHead x0 (Bind b) (lift h d u)))).(\lambda (H8: (drop h d x0 c2)).(ex_intro2 C (\lambda (c1: C).(clear (CHead x (Flat f) (lift h (r (Flat f) d) t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)) x0 (clear_flat x (CHead x0 (Bind b) (lift h d u)) H7 f (lift h (r (Flat f) d) t)) H8)))) H6))))]) H1 H3) x1 H2)))) (drop_gen_skip_r c x1 t h d k H0)))))))))))))) x2). + +theorem clear_clear: + \forall (c1: C).(\forall (c2: C).((clear c1 c2) \to (clear c2 c2))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).((clear c c2) \to (clear c2 c2)))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (H: (clear (CSort n) c2)).(clear_gen_sort c2 n H (clear c2 c2))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).((clear c c2) \to (clear c2 c2))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (H0: (clear (CHead c k t) c2)).((match k return (\lambda (k0: K).((clear (CHead c k0 t) c2) \to (clear c2 c2))) with [(Bind b) \Rightarrow (\lambda (H1: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: C).(clear c0 c0)) (clear_bind b c t) c2 (clear_gen_bind b c c2 t H1))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead c (Flat f) t) c2)).(H c2 (clear_gen_flat f c c2 t H1)))]) H0))))))) c1). + +theorem clear_mono: + \forall (c: C).(\forall (c1: C).((clear c c1) \to (\forall (c2: C).((clear c c2) \to (eq C c1 c2))))) +\def + \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (c1: C).((clear c0 c1) \to (\forall (c2: C).((clear c0 c2) \to (eq C c1 c2)))))) (\lambda (n: nat).(\lambda (c1: C).(\lambda (_: (clear (CSort n) c1)).(\lambda (c2: C).(\lambda (H0: (clear (CSort n) c2)).(clear_gen_sort c2 n H0 (eq C c1 c2))))))) (\lambda (c0: C).(\lambda (H: ((\forall (c1: C).((clear c0 c1) \to (\forall (c2: C).((clear c0 c2) \to (eq C c1 c2))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c1: C).(\lambda (H0: (clear (CHead c0 k t) c1)).(\lambda (c2: C).(\lambda (H1: (clear (CHead c0 k t) c2)).((match k return (\lambda (k0: K).((clear (CHead c0 k0 t) c1) \to ((clear (CHead c0 k0 t) c2) \to (eq C c1 c2)))) with [(Bind b) \Rightarrow (\lambda (H2: (clear (CHead c0 (Bind b) t) c1)).(\lambda (H3: (clear (CHead c0 (Bind b) t) c2)).(eq_ind_r C (CHead c0 (Bind b) t) (\lambda (c3: C).(eq C c1 c3)) (eq_ind_r C (CHead c0 (Bind b) t) (\lambda (c3: C).(eq C c3 (CHead c0 (Bind b) t))) (refl_equal C (CHead c0 (Bind b) t)) c1 (clear_gen_bind b c0 c1 t H2)) c2 (clear_gen_bind b c0 c2 t H3)))) | (Flat f) \Rightarrow (\lambda (H2: (clear (CHead c0 (Flat f) t) c1)).(\lambda (H3: (clear (CHead c0 (Flat f) t) c2)).(H c1 (clear_gen_flat f c0 c1 t H2) c2 (clear_gen_flat f c0 c2 t H3))))]) H0 H1))))))))) c). + +theorem clear_trans: + \forall (c1: C).(\forall (c: C).((clear c1 c) \to (\forall (c2: C).((clear c c2) \to (clear c1 c2))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c0: C).((clear c c0) \to (\forall (c2: C).((clear c0 c2) \to (clear c c2)))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (H: (clear (CSort n) c)).(\lambda (c2: C).(\lambda (_: (clear c c2)).(clear_gen_sort c n H (clear (CSort n) c2))))))) (\lambda (c: C).(\lambda (H: ((\forall (c0: C).((clear c c0) \to (\forall (c2: C).((clear c0 c2) \to (clear c c2))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c0: C).(\lambda (H0: (clear (CHead c k t) c0)).(\lambda (c2: C).(\lambda (H1: (clear c0 c2)).((match k return (\lambda (k0: K).((clear (CHead c k0 t) c0) \to (clear (CHead c k0 t) c2))) with [(Bind b) \Rightarrow (\lambda (H2: (clear (CHead c (Bind b) t) c0)).(let H3 \def (eq_ind C c0 (\lambda (c: C).(clear c c2)) H1 (CHead c (Bind b) t) (clear_gen_bind b c c0 t H2)) in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(clear (CHead c (Bind b) t) c3)) (clear_bind b c t) c2 (clear_gen_bind b c c2 t H3)))) | (Flat f) \Rightarrow (\lambda (H2: (clear (CHead c (Flat f) t) c0)).(clear_flat c c2 (H c0 (clear_gen_flat f c c0 t H2) c2 H1) f t))]) H0))))))))) c1). + +theorem clear_ctail: + \forall (b: B).(\forall (c1: C).(\forall (c2: C).(\forall (u2: T).((clear c1 (CHead c2 (Bind b) u2)) \to (\forall (k: K).(\forall (u1: T).(clear (CTail k u1 c1) (CHead (CTail k u1 c2) (Bind b) u2)))))))) +\def + \lambda (b: B).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (u2: T).((clear c (CHead c2 (Bind b) u2)) \to (\forall (k: K).(\forall (u1: T).(clear (CTail k u1 c) (CHead (CTail k u1 c2) (Bind b) u2)))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (u2: T).(\lambda (H: (clear (CSort n) (CHead c2 (Bind b) u2))).(\lambda (k: K).(\lambda (u1: T).(match k return (\lambda (k0: K).(clear (CHead (CSort n) k0 u1) (CHead (CTail k0 u1 c2) (Bind b) u2))) with [(Bind b0) \Rightarrow (clear_gen_sort (CHead c2 (Bind b) u2) n H (clear (CHead (CSort n) (Bind b0) u1) (CHead (CTail (Bind b0) u1 c2) (Bind b) u2))) | (Flat f) \Rightarrow (clear_gen_sort (CHead c2 (Bind b) u2) n H (clear (CHead (CSort n) (Flat f) u1) (CHead (CTail (Flat f) u1 c2) (Bind b) u2)))]))))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (u2: T).((clear c (CHead c2 (Bind b) u2)) \to (\forall (k: K).(\forall (u1: T).(clear (CTail k u1 c) (CHead (CTail k u1 c2) (Bind b) u2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (u2: T).(\lambda (H0: (clear (CHead c k t) (CHead c2 (Bind b) u2))).(\lambda (k0: K).(\lambda (u1: T).((match k return (\lambda (k1: K).((clear (CHead c k1 t) (CHead c2 (Bind b) u2)) \to (clear (CHead (CTail k0 u1 c) k1 t) (CHead (CTail k0 u1 c2) (Bind b) u2)))) with [(Bind b0) \Rightarrow (\lambda (H1: (clear (CHead c (Bind b0) t) (CHead c2 (Bind b) u2))).(let H2 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind b) u2) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in ((let H3 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in ((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C c2 c)).(eq_ind_r T t (\lambda (t0: T).(clear (CHead (CTail k0 u1 c) (Bind b0) t) (CHead (CTail k0 u1 c2) (Bind b) t0))) (eq_ind_r C c (\lambda (c0: C).(clear (CHead (CTail k0 u1 c) (Bind b0) t) (CHead (CTail k0 u1 c0) (Bind b) t))) (eq_ind B b (\lambda (b1: B).(clear (CHead (CTail k0 u1 c) (Bind b1) t) (CHead (CTail k0 u1 c) (Bind b) t))) (clear_bind b (CTail k0 u1 c) t) b0 H5) c2 H6) u2 H4)))) H3)) H2))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead c (Flat f) t) (CHead c2 (Bind b) u2))).(clear_flat (CTail k0 u1 c) (CHead (CTail k0 u1 c2) (Bind b) u2) (H c2 u2 (clear_gen_flat f c (CHead c2 (Bind b) u2) t H1) k0 u1) f t))]) H0)))))))))) c1)). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-6.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-6.ma new file mode 100644 index 000000000..7a72c88a2 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-6.ma @@ -0,0 +1,187 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta-6". + +include "LambdaDelta-5.ma". + +theorem getl_gen_all: + \forall (c1: C).(\forall (c2: C).(\forall (i: nat).((getl i c1 c2) \to (ex2 C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e c2)))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H: (getl i c1 c2)).(let H0 \def (match H return (\lambda (_: (getl ? ? ?)).(ex2 C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e c2)))) with [(getl_intro e H0 H1) \Rightarrow (ex_intro2 C (\lambda (e0: C).(drop i O c1 e0)) (\lambda (e0: C).(clear e0 c2)) e H0 H1)]) in H0)))). + +theorem getl_gen_sort: + \forall (n: nat).(\forall (h: nat).(\forall (x: C).((getl h (CSort n) x) \to (\forall (P: Prop).P)))) +\def + \lambda (n: nat).(\lambda (h: nat).(\lambda (x: C).(\lambda (H: (getl h (CSort n) x)).(\lambda (P: Prop).(let H0 \def (getl_gen_all (CSort n) x h H) in (ex2_ind C (\lambda (e: C).(drop h O (CSort n) e)) (\lambda (e: C).(clear e x)) P (\lambda (x0: C).(\lambda (H1: (drop h O (CSort n) x0)).(\lambda (H2: (clear x0 x)).(and3_ind (eq C x0 (CSort n)) (eq nat h O) (eq nat O O) P (\lambda (H3: (eq C x0 (CSort n))).(\lambda (_: (eq nat h O)).(\lambda (_: (eq nat O O)).(let H6 \def (eq_ind C x0 (\lambda (c: C).(clear c x)) H2 (CSort n) H3) in (clear_gen_sort x n H6 P))))) (drop_gen_sort n h O x0 H1))))) H0)))))). + +theorem getl_gen_O: + \forall (e: C).(\forall (x: C).((getl O e x) \to (clear e x))) +\def + \lambda (e: C).(\lambda (x: C).(\lambda (H: (getl O e x)).(let H0 \def (getl_gen_all e x O H) in (ex2_ind C (\lambda (e0: C).(drop O O e e0)) (\lambda (e0: C).(clear e0 x)) (clear e x) (\lambda (x0: C).(\lambda (H1: (drop O O e x0)).(\lambda (H2: (clear x0 x)).(let H3 \def (eq_ind_r C x0 (\lambda (c: C).(clear c x)) H2 e (drop_gen_refl e x0 H1)) in H3)))) H0)))). + +theorem getl_gen_S: + \forall (k: K).(\forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).((getl (S h) (CHead c k u) x) \to (getl (r k h) c x)))))) +\def + \lambda (k: K).(\lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (H: (getl (S h) (CHead c k u) x)).(let H0 \def (getl_gen_all (CHead c k u) x (S h) H) in (ex2_ind C (\lambda (e: C).(drop (S h) O (CHead c k u) e)) (\lambda (e: C).(clear e x)) (getl (r k h) c x) (\lambda (x0: C).(\lambda (H1: (drop (S h) O (CHead c k u) x0)).(\lambda (H2: (clear x0 x)).(getl_intro (r k h) c x x0 (drop_gen_drop k c x0 u h H1) H2)))) H0))))))). + +theorem getl_refl: + \forall (b: B).(\forall (c: C).(\forall (u: T).(getl O (CHead c (Bind b) u) (CHead c (Bind b) u)))) +\def + \lambda (b: B).(\lambda (c: C).(\lambda (u: T).(getl_intro O (CHead c (Bind b) u) (CHead c (Bind b) u) (CHead c (Bind b) u) (drop_refl (CHead c (Bind b) u)) (clear_bind b c u)))). + +theorem clear_getl_trans: + \forall (i: nat).(\forall (c2: C).(\forall (c3: C).((getl i c2 c3) \to (\forall (c1: C).((clear c1 c2) \to (getl i c1 c3)))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c2: C).(\forall (c3: C).((getl n c2 c3) \to (\forall (c1: C).((clear c1 c2) \to (getl n c1 c3))))))) (\lambda (c2: C).(\lambda (c3: C).(\lambda (H: (getl O c2 c3)).(\lambda (c1: C).(\lambda (H0: (clear c1 c2)).(getl_intro O c1 c3 c1 (drop_refl c1) (clear_trans c1 c2 H0 c3 (getl_gen_O c2 c3 H)))))))) (\lambda (n: nat).(\lambda (_: ((\forall (c2: C).(\forall (c3: C).((getl n c2 c3) \to (\forall (c1: C).((clear c1 c2) \to (getl n c1 c3)))))))).(\lambda (c2: C).(C_ind (\lambda (c: C).(\forall (c3: C).((getl (S n) c c3) \to (\forall (c1: C).((clear c1 c) \to (getl (S n) c1 c3)))))) (\lambda (n0: nat).(\lambda (c3: C).(\lambda (H0: (getl (S n) (CSort n0) c3)).(\lambda (c1: C).(\lambda (_: (clear c1 (CSort n0))).(getl_gen_sort n0 (S n) c3 H0 (getl (S n) c1 c3))))))) (\lambda (c: C).(\lambda (_: ((\forall (c3: C).((getl (S n) c c3) \to (\forall (c1: C).((clear c1 c) \to (getl (S n) c1 c3))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: C).(\lambda (H1: (getl (S n) (CHead c k t) c3)).(\lambda (c1: C).(\lambda (H2: (clear c1 (CHead c k t))).((match k return (\lambda (k0: K).((getl (S n) (CHead c k0 t) c3) \to ((clear c1 (CHead c k0 t)) \to (getl (S n) c1 c3)))) with [(Bind b) \Rightarrow (\lambda (H3: (getl (S n) (CHead c (Bind b) t) c3)).(\lambda (H4: (clear c1 (CHead c (Bind b) t))).(let H5 \def (getl_gen_all c c3 (r (Bind b) n) (getl_gen_S (Bind b) c c3 t n H3)) in (ex2_ind C (\lambda (e: C).(drop n O c e)) (\lambda (e: C).(clear e c3)) (getl (S n) c1 c3) (\lambda (x: C).(\lambda (H6: (drop n O c x)).(\lambda (H7: (clear x c3)).(getl_intro (S n) c1 c3 x (drop_clear_O b c1 c t H4 x n H6) H7)))) H5)))) | (Flat f) \Rightarrow (\lambda (_: (getl (S n) (CHead c (Flat f) t) c3)).(\lambda (H4: (clear c1 (CHead c (Flat f) t))).(clear_gen_flat_r f c1 c t H4 (getl (S n) c1 c3))))]) H1 H2))))))))) c2)))) i). + +theorem getl_clear_trans: + \forall (i: nat).(\forall (c1: C).(\forall (c2: C).((getl i c1 c2) \to (\forall (c3: C).((clear c2 c3) \to (getl i c1 c3)))))) +\def + \lambda (i: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (getl i c1 c2)).(\lambda (c3: C).(\lambda (H0: (clear c2 c3)).(let H1 \def (getl_gen_all c1 c2 i H) in (ex2_ind C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e c2)) (getl i c1 c3) (\lambda (x: C).(\lambda (H2: (drop i O c1 x)).(\lambda (H3: (clear x c2)).(let H4 \def (clear_gen_all x c2 H3) in (ex_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(eq C c2 (CHead e (Bind b) u))))) (getl i c1 c3) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H5: (eq C c2 (CHead x1 (Bind x0) x2))).(let H6 \def (eq_ind C c2 (\lambda (c: C).(clear x c)) H3 (CHead x1 (Bind x0) x2) H5) in (let H7 \def (eq_ind C c2 (\lambda (c: C).(clear c c3)) H0 (CHead x1 (Bind x0) x2) H5) in (eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c: C).(getl i c1 c)) (getl_intro i c1 (CHead x1 (Bind x0) x2) x H2 H6) c3 (clear_gen_bind x0 x1 c3 x2 H7)))))))) H4))))) H1))))))). + +theorem getl_head: + \forall (k: K).(\forall (h: nat).(\forall (c: C).(\forall (e: C).((getl (r k h) c e) \to (\forall (u: T).(getl (S h) (CHead c k u) e)))))) +\def + \lambda (k: K).(\lambda (h: nat).(\lambda (c: C).(\lambda (e: C).(\lambda (H: (getl (r k h) c e)).(\lambda (u: T).(let H0 \def (getl_gen_all c e (r k h) H) in (ex2_ind C (\lambda (e0: C).(drop (r k h) O c e0)) (\lambda (e0: C).(clear e0 e)) (getl (S h) (CHead c k u) e) (\lambda (x: C).(\lambda (H1: (drop (r k h) O c x)).(\lambda (H2: (clear x e)).(getl_intro (S h) (CHead c k u) e x (drop_drop k h c x H1 u) H2)))) H0))))))). + +theorem getl_flat: + \forall (c: C).(\forall (e: C).(\forall (h: nat).((getl h c e) \to (\forall (f: F).(\forall (u: T).(getl h (CHead c (Flat f) u) e)))))) +\def + \lambda (c: C).(\lambda (e: C).(\lambda (h: nat).(\lambda (H: (getl h c e)).(\lambda (f: F).(\lambda (u: T).(let H0 \def (getl_gen_all c e h H) in (ex2_ind C (\lambda (e0: C).(drop h O c e0)) (\lambda (e0: C).(clear e0 e)) (getl h (CHead c (Flat f) u) e) (\lambda (x: C).(\lambda (H1: (drop h O c x)).(\lambda (H2: (clear x e)).((match h return (\lambda (n: nat).((drop n O c x) \to (getl n (CHead c (Flat f) u) e))) with [O \Rightarrow (\lambda (H3: (drop O O c x)).(let H4 \def (eq_ind_r C x (\lambda (c: C).(clear c e)) H2 c (drop_gen_refl c x H3)) in (getl_intro O (CHead c (Flat f) u) e (CHead c (Flat f) u) (drop_refl (CHead c (Flat f) u)) (clear_flat c e H4 f u)))) | (S n) \Rightarrow (\lambda (H3: (drop (S n) O c x)).(getl_intro (S n) (CHead c (Flat f) u) e x (drop_drop (Flat f) n c x H3 u) H2))]) H1)))) H0))))))). + +theorem getl_drop: + \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (h: nat).((getl h c (CHead e (Bind b) u)) \to (drop (S h) O c e)))))) +\def + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: C).(\forall (u: T).(\forall (h: nat).((getl h c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 e)))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (H: (getl h (CSort n) (CHead e (Bind b) u))).(getl_gen_sort n h (CHead e (Bind b) u) H (drop (S h) O (CSort n) e))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: T).(\forall (h: nat).((getl h c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 e))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((getl n (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e))) (\lambda (H0: (getl O (CHead c0 k t) (CHead e (Bind b) u))).(K_ind (\lambda (k0: K).((clear (CHead c0 k0 t) (CHead e (Bind b) u)) \to (drop (S O) O (CHead c0 k0 t) e))) (\lambda (b0: B).(\lambda (H1: (clear (CHead c0 (Bind b0) t) (CHead e (Bind b) u))).(let H2 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow c])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H3 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H4 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C e c0)).(eq_ind_r C c0 (\lambda (c1: C).(drop (S O) O (CHead c0 (Bind b0) t) c1)) (eq_ind B b (\lambda (b1: B).(drop (S O) O (CHead c0 (Bind b1) t) c0)) (drop_drop (Bind b) O c0 c0 (drop_refl c0) t) b0 H5) e H6)))) H3)) H2)))) (\lambda (f: F).(\lambda (H1: (clear (CHead c0 (Flat f) t) (CHead e (Bind b) u))).(drop_clear_O b (CHead c0 (Flat f) t) e u (clear_flat c0 (CHead e (Bind b) u) (clear_gen_flat f c0 (CHead e (Bind b) u) t H1) f t) e O (drop_refl e)))) k (getl_gen_O (CHead c0 k t) (CHead e (Bind b) u) H0))) (\lambda (n: nat).(\lambda (_: (((getl n (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e)))).(\lambda (H1: (getl (S n) (CHead c0 k t) (CHead e (Bind b) u))).(drop_drop k (S n) c0 e (eq_ind_r nat (S (r k n)) (\lambda (n0: nat).(drop n0 O c0 e)) (H e u (r k n) (getl_gen_S k c0 (CHead e (Bind b) u) t n H1)) (r k (S n)) (r_S k n)) t)))) h)))))))) c)). + +theorem getl_clear_bind: + \forall (b: B).(\forall (c: C).(\forall (e1: C).(\forall (v: T).((clear c (CHead e1 (Bind b) v)) \to (\forall (e2: C).(\forall (n: nat).((getl n e1 e2) \to (getl (S n) c e2)))))))) +\def + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e1: C).(\forall (v: T).((clear c0 (CHead e1 (Bind b) v)) \to (\forall (e2: C).(\forall (n: nat).((getl n e1 e2) \to (getl (S n) c0 e2)))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (v: T).(\lambda (H: (clear (CSort n) (CHead e1 (Bind b) v))).(\lambda (e2: C).(\lambda (n0: nat).(\lambda (_: (getl n0 e1 e2)).(clear_gen_sort (CHead e1 (Bind b) v) n H (getl (S n0) (CSort n) e2))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e1: C).(\forall (v: T).((clear c0 (CHead e1 (Bind b) v)) \to (\forall (e2: C).(\forall (n: nat).((getl n e1 e2) \to (getl (S n) c0 e2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (v: T).(\lambda (H0: (clear (CHead c0 k t) (CHead e1 (Bind b) v))).(\lambda (e2: C).(\lambda (n: nat).(\lambda (H1: (getl n e1 e2)).((match k return (\lambda (k0: K).((clear (CHead c0 k0 t) (CHead e1 (Bind b) v)) \to (getl (S n) (CHead c0 k0 t) e2))) with [(Bind b0) \Rightarrow (\lambda (H2: (clear (CHead c0 (Bind b0) t) (CHead e1 (Bind b) v))).(let H3 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow e1 | (CHead c _ _) \Rightarrow c])) (CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in ((let H4 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in ((let H5 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in (\lambda (H6: (eq B b b0)).(\lambda (H7: (eq C e1 c0)).(let H8 \def (eq_ind C e1 (\lambda (c: C).(getl n c e2)) H1 c0 H7) in (eq_ind B b (\lambda (b1: B).(getl (S n) (CHead c0 (Bind b1) t) e2)) (getl_head (Bind b) n c0 e2 H8 t) b0 H6))))) H4)) H3))) | (Flat f) \Rightarrow (\lambda (H2: (clear (CHead c0 (Flat f) t) (CHead e1 (Bind b) v))).(getl_flat c0 e2 (S n) (H e1 v (clear_gen_flat f c0 (CHead e1 (Bind b) v) t H2) e2 n H1) f t))]) H0))))))))))) c)). + +theorem getl_ctail: + \forall (b: B).(\forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d (Bind b) u)) \to (\forall (k: K).(\forall (v: T).(getl i (CTail k v c) (CHead (CTail k v d) (Bind b) u))))))))) +\def + \lambda (b: B).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (getl i c (CHead d (Bind b) u))).(\lambda (k: K).(\lambda (v: T).(let H0 \def (getl_gen_all c (CHead d (Bind b) u) i H) in (ex2_ind C (\lambda (e: C).(drop i O c e)) (\lambda (e: C).(clear e (CHead d (Bind b) u))) (getl i (CTail k v c) (CHead (CTail k v d) (Bind b) u)) (\lambda (x: C).(\lambda (H1: (drop i O c x)).(\lambda (H2: (clear x (CHead d (Bind b) u))).(getl_intro i (CTail k v c) (CHead (CTail k v d) (Bind b) u) (CTail k v x) (drop_ctail c x O i H1 k v) (clear_ctail b x d u H2 k v))))) H0))))))))). + +theorem getl_ctail_clen: + \forall (b: B).(\forall (t: T).(\forall (c: C).(ex nat (\lambda (n: nat).(getl (clen c) (CTail (Bind b) t c) (CHead (CSort n) (Bind b) t)))))) +\def + \lambda (b: B).(\lambda (t: T).(\lambda (c: C).(C_ind (\lambda (c0: C).(ex nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort n) (Bind b) t))))) (\lambda (n: nat).(ex_intro nat (\lambda (n0: nat).(getl O (CHead (CSort n) (Bind b) t) (CHead (CSort n0) (Bind b) t))) n (getl_refl b (CSort n) t))) (\lambda (c0: C).(\lambda (H: (ex nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort n) (Bind b) t))))).(\lambda (k: K).(\lambda (t0: T).(let H0 \def H in (ex_ind nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort n) (Bind b) t))) (ex nat (\lambda (n: nat).(getl (s k (clen c0)) (CHead (CTail (Bind b) t c0) k t0) (CHead (CSort n) (Bind b) t)))) (\lambda (x: nat).(\lambda (H1: (getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t))).(match k return (\lambda (k0: K).(ex nat (\lambda (n: nat).(getl (s k0 (clen c0)) (CHead (CTail (Bind b) t c0) k0 t0) (CHead (CSort n) (Bind b) t))))) with [(Bind b0) \Rightarrow (ex_intro nat (\lambda (n: nat).(getl (S (clen c0)) (CHead (CTail (Bind b) t c0) (Bind b0) t0) (CHead (CSort n) (Bind b) t))) x (getl_head (Bind b0) (clen c0) (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t) H1 t0)) | (Flat f) \Rightarrow (ex_intro nat (\lambda (n: nat).(getl (clen c0) (CHead (CTail (Bind b) t c0) (Flat f) t0) (CHead (CSort n) (Bind b) t))) x (getl_flat (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t) (clen c0) H1 f t0))]))) H0)))))) c))). + +theorem getl_dec: + \forall (c: C).(\forall (i: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl i c (CHead e (Bind b) v)))))) (\forall (d: C).((getl i c d) \to (\forall (P: Prop).P))))) +\def + \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (i: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl i c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl i c0 d) \to (\forall (P: Prop).P)))))) (\lambda (n: nat).(\lambda (i: nat).(or_intror (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl i (CSort n) (CHead e (Bind b) v)))))) (\forall (d: C).((getl i (CSort n) d) \to (\forall (P: Prop).P))) (\lambda (d: C).(\lambda (H: (getl i (CSort n) d)).(\lambda (P: Prop).(getl_gen_sort n i d H P))))))) (\lambda (c0: C).(\lambda (H: ((\forall (i: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl i c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl i c0 d) \to (\forall (P: Prop).P))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (i: nat).(match i return (\lambda (n: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl n (CHead c0 k t) d) \to (\forall (P: Prop).P))))) with [O \Rightarrow (match k return (\lambda (k0: K).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 k0 t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 k0 t) d) \to (\forall (P: Prop).P))))) with [(Bind b) \Rightarrow (or_introl (ex_3 C B T (\lambda (e: C).(\lambda (b0: B).(\lambda (v: T).(getl O (CHead c0 (Bind b) t) (CHead e (Bind b0) v)))))) (\forall (d: C).((getl O (CHead c0 (Bind b) t) d) \to (\forall (P: Prop).P))) (ex_3_intro C B T (\lambda (e: C).(\lambda (b0: B).(\lambda (v: T).(getl O (CHead c0 (Bind b) t) (CHead e (Bind b0) v))))) c0 b t (getl_refl b c0 t))) | (Flat f) \Rightarrow (let H_x \def (H O) in (let H0 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl O c0 d) \to (\forall (P: Prop).P))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P)))) (\lambda (H1: (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) v))))))).(ex_3_ind C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) v))))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P)))) (\lambda (x0: C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H2: (getl O c0 (CHead x0 (Bind x1) x2))).(or_introl (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P))) (ex_3_intro C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v))))) x0 x1 x2 (getl_flat c0 (CHead x0 (Bind x1) x2) O H2 f t))))))) H1)) (\lambda (H1: ((\forall (d: C).((getl O c0 d) \to (\forall (P: Prop).P))))).(or_intror (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P))) (\lambda (d: C).(\lambda (H2: (getl O (CHead c0 (Flat f) t) d)).(\lambda (P: Prop).(H1 d (getl_intro O c0 d c0 (drop_refl c0) (clear_gen_flat f c0 d t (getl_gen_O (CHead c0 (Flat f) t) d H2))) P)))))) H0)))]) | (S n) \Rightarrow (let H_x \def (H (r k n)) in (let H0 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl (r k n) c0 d) \to (\forall (P: Prop).P))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P)))) (\lambda (H1: (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v))))))).(ex_3_ind C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v))))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P)))) (\lambda (x0: C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H2: (getl (r k n) c0 (CHead x0 (Bind x1) x2))).(or_introl (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P))) (ex_3_intro C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v))))) x0 x1 x2 (getl_head k n c0 (CHead x0 (Bind x1) x2) H2 t))))))) H1)) (\lambda (H1: ((\forall (d: C).((getl (r k n) c0 d) \to (\forall (P: Prop).P))))).(or_intror (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P))) (\lambda (d: C).(\lambda (H2: (getl (S n) (CHead c0 k t) d)).(\lambda (P: Prop).(H1 d (getl_gen_S k c0 d t n H2) P)))))) H0)))])))))) c). + +theorem clear_cle: + \forall (c1: C).(\forall (c2: C).((clear c1 c2) \to (cle c2 c1))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).((clear c c2) \to (le (cweight c2) (cweight c))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (H: (clear (CSort n) c2)).(clear_gen_sort c2 n H (le (cweight c2) O))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).((clear c c2) \to (le (cweight c2) (cweight c)))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (H0: (clear (CHead c k t) c2)).((match k return (\lambda (k0: K).((clear (CHead c k0 t) c2) \to (le (cweight c2) (plus (cweight c) (tweight t))))) with [(Bind b) \Rightarrow (\lambda (H1: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: C).(le (cweight c0) (plus (cweight c) (tweight t)))) (le_n (plus (cweight c) (tweight t))) c2 (clear_gen_bind b c c2 t H1))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead c (Flat f) t) c2)).(le_S_n (cweight c2) (plus (cweight c) (tweight t)) (le_n_S (cweight c2) (plus (cweight c) (tweight t)) (le_plus_trans (cweight c2) (cweight c) (tweight t) (H c2 (clear_gen_flat f c c2 t H1))))))]) H0))))))) c1). + +theorem getl_flt: + \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead e (Bind b) u)) \to (flt e u c (TLRef i))))))) +\def + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead e (Bind b) u)) \to (flt e u c0 (TLRef i))))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (getl i (CSort n) (CHead e (Bind b) u))).(getl_gen_sort n i (CHead e (Bind b) u) H (flt e u (CSort n) (TLRef i)))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead e (Bind b) u)) \to (flt e u c0 (TLRef i)))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (i: nat).(match i return (\lambda (n: nat).((getl n (CHead c0 k t) (CHead e (Bind b) u)) \to (flt e u (CHead c0 k t) (TLRef n)))) with [O \Rightarrow (\lambda (H0: (getl O (CHead c0 k t) (CHead e (Bind b) u))).((match k return (\lambda (k0: K).((clear (CHead c0 k0 t) (CHead e (Bind b) u)) \to (flt e u (CHead c0 k0 t) (TLRef O)))) with [(Bind b0) \Rightarrow (\lambda (H1: (clear (CHead c0 (Bind b0) t) (CHead e (Bind b) u))).(let H2 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow c])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H3 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H4 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C e c0)).(eq_ind_r T t (\lambda (t0: T).(flt e t0 (CHead c0 (Bind b0) t) (TLRef O))) (eq_ind_r C c0 (\lambda (c1: C).(flt c1 t (CHead c0 (Bind b0) t) (TLRef O))) (eq_ind B b (\lambda (b1: B).(flt c0 t (CHead c0 (Bind b1) t) (TLRef O))) (flt_arith0 (Bind b) c0 t O) b0 H5) e H6) u H4)))) H3)) H2))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead c0 (Flat f) t) (CHead e (Bind b) u))).(flt_arith1 (Bind b) e c0 u (clear_cle c0 (CHead e (Bind b) u) (clear_gen_flat f c0 (CHead e (Bind b) u) t H1)) (Flat f) t O))]) (getl_gen_O (CHead c0 k t) (CHead e (Bind b) u) H0))) | (S n) \Rightarrow (\lambda (H0: (getl (S n) (CHead c0 k t) (CHead e (Bind b) u))).(let H_y \def (H e u (r k n) (getl_gen_S k c0 (CHead e (Bind b) u) t n H0)) in (flt_arith2 e c0 u (r k n) H_y k t (S n))))])))))))) c)). + +theorem getl_gen_flat: + \forall (f: F).(\forall (e: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i (CHead e (Flat f) v) d) \to (getl i e d)))))) +\def + \lambda (f: F).(\lambda (e: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(nat_ind (\lambda (n: nat).((getl n (CHead e (Flat f) v) d) \to (getl n e d))) (\lambda (H: (getl O (CHead e (Flat f) v) d)).(getl_intro O e d e (drop_refl e) (clear_gen_flat f e d v (getl_gen_O (CHead e (Flat f) v) d H)))) (\lambda (n: nat).(\lambda (_: (((getl n (CHead e (Flat f) v) d) \to (getl n e d)))).(\lambda (H0: (getl (S n) (CHead e (Flat f) v) d)).(getl_gen_S (Flat f) e d v n H0)))) i))))). + +theorem getl_gen_bind: + \forall (b: B).(\forall (e: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i (CHead e (Bind b) v) d) \to (or (land (eq nat i O) (eq C d (CHead e (Bind b) v))) (ex2 nat (\lambda (j: nat).(eq nat i (S j))) (\lambda (j: nat).(getl j e d))))))))) +\def + \lambda (b: B).(\lambda (e: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(nat_ind (\lambda (n: nat).((getl n (CHead e (Bind b) v) d) \to (or (land (eq nat n O) (eq C d (CHead e (Bind b) v))) (ex2 nat (\lambda (j: nat).(eq nat n (S j))) (\lambda (j: nat).(getl j e d)))))) (\lambda (H: (getl O (CHead e (Bind b) v) d)).(eq_ind_r C (CHead e (Bind b) v) (\lambda (c: C).(or (land (eq nat O O) (eq C c (CHead e (Bind b) v))) (ex2 nat (\lambda (j: nat).(eq nat O (S j))) (\lambda (j: nat).(getl j e c))))) (or_introl (land (eq nat O O) (eq C (CHead e (Bind b) v) (CHead e (Bind b) v))) (ex2 nat (\lambda (j: nat).(eq nat O (S j))) (\lambda (j: nat).(getl j e (CHead e (Bind b) v)))) (conj (eq nat O O) (eq C (CHead e (Bind b) v) (CHead e (Bind b) v)) (refl_equal nat O) (refl_equal C (CHead e (Bind b) v)))) d (clear_gen_bind b e d v (getl_gen_O (CHead e (Bind b) v) d H)))) (\lambda (n: nat).(\lambda (_: (((getl n (CHead e (Bind b) v) d) \to (or (land (eq nat n O) (eq C d (CHead e (Bind b) v))) (ex2 nat (\lambda (j: nat).(eq nat n (S j))) (\lambda (j: nat).(getl j e d))))))).(\lambda (H0: (getl (S n) (CHead e (Bind b) v) d)).(or_intror (land (eq nat (S n) O) (eq C d (CHead e (Bind b) v))) (ex2 nat (\lambda (j: nat).(eq nat (S n) (S j))) (\lambda (j: nat).(getl j e d))) (ex_intro2 nat (\lambda (j: nat).(eq nat (S n) (S j))) (\lambda (j: nat).(getl j e d)) n (refl_equal nat (S n)) (getl_gen_S (Bind b) e d v n H0)))))) i))))). + +theorem getl_gen_tail: + \forall (k: K).(\forall (b: B).(\forall (u1: T).(\forall (u2: T).(\forall (c2: C).(\forall (c1: C).(\forall (i: nat).((getl i (CTail k u1 c1) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl i c1 (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c1))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))))))))) +\def + \lambda (k: K).(\lambda (b: B).(\lambda (u1: T).(\lambda (u2: T).(\lambda (c2: C).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (i: nat).((getl i (CTail k u1 c) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl i c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))))) (\lambda (n: nat).(\lambda (i: nat).(match i return (\lambda (n0: nat).((getl n0 (CTail k u1 (CSort n)) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n0 (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n0 (clen (CSort n)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n1: nat).(eq C c2 (CSort n1))))))) with [O \Rightarrow (\lambda (H: (getl O (CHead (CSort n) k u1) (CHead c2 (Bind b) u2))).((match k return (\lambda (k0: K).((clear (CHead (CSort n) k0 u1) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k0 u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K k0 (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))))) with [(Bind b0) \Rightarrow (\lambda (H0: (clear (CHead (CSort n) (Bind b0) u1) (CHead c2 (Bind b) u2))).(let H1 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) (clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in ((let H2 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) (clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in ((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) (clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in (\lambda (H4: (eq B b b0)).(\lambda (H5: (eq C c2 (CSort n))).(eq_ind_r C (CSort n) (\lambda (c: C).(or (ex2 C (\lambda (e: C).(eq C c (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c (CSort n0)))))) (eq_ind_r T u1 (\lambda (t: T).(or (ex2 C (\lambda (e: C).(eq C (CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) t)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b))) (\lambda (_: nat).(eq T u1 t)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0)))))) (eq_ind_r B b0 (\lambda (b1: B).(or (ex2 C (\lambda (e: C).(eq C (CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b1) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b1))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0)))))) (or_intror (ex2 C (\lambda (e: C).(eq C (CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b0) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b0))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0)))) (ex4_intro nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b0))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0))) n (refl_equal nat O) (refl_equal K (Bind b0)) (refl_equal T u1) (refl_equal C (CSort n)))) b H4) u2 H3) c2 H5)))) H2)) H1))) | (Flat f) \Rightarrow (\lambda (H0: (clear (CHead (CSort n) (Flat f) u1) (CHead c2 (Bind b) u2))).(clear_gen_sort (CHead c2 (Bind b) u2) n (clear_gen_flat f (CSort n) (CHead c2 (Bind b) u2) u1 H0) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail (Flat f) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Flat f) (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0)))))))]) (getl_gen_O (CHead (CSort n) k u1) (CHead c2 (Bind b) u2) H))) | (S n0) \Rightarrow (\lambda (H: (getl (S n0) (CHead (CSort n) k u1) (CHead c2 (Bind b) u2))).(getl_gen_sort n (r k n0) (CHead c2 (Bind b) u2) (getl_gen_S k (CSort n) (CHead c2 (Bind b) u2) u1 n0 H) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n0) (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n0) O)) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n1: nat).(eq C c2 (CSort n1)))))))]))) (\lambda (c: C).(\lambda (H: ((\forall (i: nat).((getl i (CTail k u1 c) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl i c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))))))).(\lambda (k0: K).(\lambda (t: T).(\lambda (i: nat).(match i return (\lambda (n: nat).((getl n (CTail k u1 (CHead c k0 t)) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n (clen (CHead c k0 t)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))))) with [O \Rightarrow (\lambda (H0: (getl O (CHead (CTail k u1 c) k0 t) (CHead c2 (Bind b) u2))).((match k0 return (\lambda (k1: K).((clear (CHead (CTail k u1 c) k1 t) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c k1 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s k1 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))))) with [(Bind b0) \Rightarrow (\lambda (H1: (clear (CHead (CTail k u1 c) (Bind b0) t) (CHead c2 (Bind b) u2))).(let H2 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) (clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in ((let H3 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) (clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in ((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) (clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C c2 (CTail k u1 c))).(eq_ind T u2 (\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b0) t0) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b0) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))) (eq_ind B b (\lambda (b1: B).(or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b1) u2) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b1) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))) (let H7 \def (eq_ind C c2 (\lambda (c0: C).(\forall (i: nat).((getl i (CTail k u1 c) (CHead c0 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl i c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))))) H (CTail k u1 c) H6) in (eq_ind_r C (CTail k u1 c) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (or_introl (ex2 C (\lambda (e: C).(eq C (CTail k u1 c) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C (CTail k u1 c) (CSort n)))) (ex_intro2 C (\lambda (e: C).(eq C (CTail k u1 c) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) (CHead e (Bind b) u2))) c (refl_equal C (CTail k u1 c)) (getl_refl b c u2))) c2 H6)) b0 H5) t H4)))) H3)) H2))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead (CTail k u1 c) (Flat f) t) (CHead c2 (Bind b) u2))).(let H2 \def (H O (getl_intro O (CTail k u1 c) (CHead c2 (Bind b) u2) (CTail k u1 c) (drop_refl (CTail k u1 c)) (clear_gen_flat f (CTail k u1 c) (CHead c2 (Bind b) u2) t H1))) in (or_ind (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (H3: (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2))))).(ex2_ind C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CTail k u1 x))).(\lambda (H5: (getl O c (CHead x (Bind b) u2))).(eq_ind_r C (CTail k u1 x) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (or_introl (ex2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C (CTail k u1 x) (CSort n)))) (ex_intro2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2))) x (refl_equal C (CTail k u1 x)) (getl_flat c (CHead x (Bind b) u2) O H5 f t))) c2 H4)))) H3)) (\lambda (H3: (ex4 nat (\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))).(ex4_ind nat (\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (x0: nat).(\lambda (H4: (eq nat O (clen c))).(\lambda (H5: (eq K k (Bind b))).(\lambda (H6: (eq T u1 u2)).(\lambda (H7: (eq C c2 (CSort x0))).(eq_ind_r C (CSort x0) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (eq_ind T u1 (\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) t0)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 t0)) (\lambda (n: nat).(eq C (CSort x0) (CSort n)))))) (eq_ind_r K (Bind b) (\lambda (k1: K).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n)))))) (or_intror (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n)))) (ex4_intro nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n))) x0 H4 (refl_equal K (Bind b)) (refl_equal T u1) (refl_equal C (CSort x0)))) k H5) u2 H6) c2 H7)))))) H3)) H2)))]) (getl_gen_O (CHead (CTail k u1 c) k0 t) (CHead c2 (Bind b) u2) H0))) | (S n) \Rightarrow (\lambda (H0: (getl (S n) (CHead (CTail k u1 c) k0 t) (CHead c2 (Bind b) u2))).(let H_x \def (H (r k0 n) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind b) u2) t n H0)) in (let H1 \def H_x in (or_ind (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (r k0 n) c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0)))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (H2: (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (r k0 n) c (CHead e (Bind b) u2))))).(ex2_ind C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (r k0 n) c (CHead e (Bind b) u2))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (x: C).(\lambda (H3: (eq C c2 (CTail k u1 x))).(\lambda (H4: (getl (r k0 n) c (CHead x (Bind b) u2))).(let H5 \def (eq_ind C c2 (\lambda (c0: C).(getl (r k0 n) (CTail k u1 c) (CHead c0 (Bind b) u2))) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind b) u2) t n H0) (CTail k u1 x) H3) in (eq_ind_r C (CTail k u1 x) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c0 (CSort n0)))))) (or_introl (ex2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C (CTail k u1 x) (CSort n0)))) (ex_intro2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2))) x (refl_equal C (CTail k u1 x)) (getl_head k0 n c (CHead x (Bind b) u2) H4 t))) c2 H3))))) H2)) (\lambda (H2: (ex4 nat (\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))).(ex4_ind nat (\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (x0: nat).(\lambda (H3: (eq nat (r k0 n) (clen c))).(\lambda (H4: (eq K k (Bind b))).(\lambda (H5: (eq T u1 u2)).(\lambda (H6: (eq C c2 (CSort x0))).(let H7 \def (eq_ind C c2 (\lambda (c0: C).(getl (r k0 n) (CTail k u1 c) (CHead c0 (Bind b) u2))) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind b) u2) t n H0) (CSort x0) H6) in (eq_ind_r C (CSort x0) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c0 (CSort n0)))))) (let H8 \def (eq_ind_r T u2 (\lambda (t: T).(getl (r k0 n) (CTail k u1 c) (CHead (CSort x0) (Bind b) t))) H7 u1 H5) in (eq_ind T u1 (\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) t0)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 t0)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0)))))) (let H9 \def (eq_ind K k (\lambda (k: K).(getl (r k0 n) (CTail k u1 c) (CHead (CSort x0) (Bind b) u1))) H8 (Bind b) H4) in (eq_ind_r K (Bind b) (\lambda (k1: K).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0)))))) (eq_ind nat (r k0 n) (\lambda (n0: nat).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 n0))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n1: nat).(eq C (CSort x0) (CSort n1)))))) (eq_ind_r nat (S n) (\lambda (n0: nat).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) n0)) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n1: nat).(eq C (CSort x0) (CSort n1)))))) (or_intror (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (S n))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0)))) (ex4_intro nat (\lambda (_: nat).(eq nat (S n) (S n))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0))) x0 (refl_equal nat (S n)) (refl_equal K (Bind b)) (refl_equal T u1) (refl_equal C (CSort x0)))) (s k0 (r k0 n)) (s_r k0 n)) (clen c) H3) k H4)) u2 H5)) c2 H6))))))) H2)) H1))))])))))) c1)))))). + +theorem cimp_flat_sx: + \forall (f: F).(\forall (c: C).(\forall (v: T).(cimp (CHead c (Flat f) v) c))) +\def + \lambda (f: F).(\lambda (c: C).(\lambda (v: T).(\lambda (b: B).(\lambda (d1: C).(\lambda (w: T).(\lambda (h: nat).(\lambda (H: (getl h (CHead c (Flat f) v) (CHead d1 (Bind b) w))).((match h return (\lambda (n: nat).((getl n (CHead c (Flat f) v) (CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl n c (CHead d2 (Bind b) w)))))) with [O \Rightarrow (\lambda (H0: (getl O (CHead c (Flat f) v) (CHead d1 (Bind b) w))).(ex_intro C (\lambda (d2: C).(getl O c (CHead d2 (Bind b) w))) d1 (getl_intro O c (CHead d1 (Bind b) w) c (drop_refl c) (clear_gen_flat f c (CHead d1 (Bind b) w) v (getl_gen_O (CHead c (Flat f) v) (CHead d1 (Bind b) w) H0))))) | (S n) \Rightarrow (\lambda (H0: (getl (S n) (CHead c (Flat f) v) (CHead d1 (Bind b) w))).(ex_intro C (\lambda (d2: C).(getl (S n) c (CHead d2 (Bind b) w))) d1 (getl_gen_S (Flat f) c (CHead d1 (Bind b) w) v n H0)))]) H)))))))). + +theorem cimp_flat_dx: + \forall (f: F).(\forall (c: C).(\forall (v: T).(cimp c (CHead c (Flat f) v)))) +\def + \lambda (f: F).(\lambda (c: C).(\lambda (v: T).(\lambda (b: B).(\lambda (d1: C).(\lambda (w: T).(\lambda (h: nat).(\lambda (H: (getl h c (CHead d1 (Bind b) w))).(ex_intro C (\lambda (d2: C).(getl h (CHead c (Flat f) v) (CHead d2 (Bind b) w))) d1 (getl_flat c (CHead d1 (Bind b) w) h H f v))))))))). + +theorem cimp_bind: + \forall (c1: C).(\forall (c2: C).((cimp c1 c2) \to (\forall (b: B).(\forall (v: T).(cimp (CHead c1 (Bind b) v) (CHead c2 (Bind b) v)))))) +\def + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: ((\forall (b: B).(\forall (d1: C).(\forall (w: T).(\forall (h: nat).((getl h c1 (CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl h c2 (CHead d2 (Bind b) w))))))))))).(\lambda (b: B).(\lambda (v: T).(\lambda (b0: B).(\lambda (d1: C).(\lambda (w: T).(\lambda (h: nat).(\lambda (H0: (getl h (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w))).((match h return (\lambda (n: nat).((getl n (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w)) \to (ex C (\lambda (d2: C).(getl n (CHead c2 (Bind b) v) (CHead d2 (Bind b0) w)))))) with [O \Rightarrow (\lambda (H1: (getl O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w))).(let H2 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in ((let H3 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in ((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in (\lambda (H5: (eq B b0 b)).(\lambda (_: (eq C d1 c1)).(eq_ind_r T v (\lambda (t: T).(ex C (\lambda (d2: C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b0) t))))) (eq_ind_r B b (\lambda (b1: B).(ex C (\lambda (d2: C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b1) v))))) (ex_intro C (\lambda (d2: C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b) v))) c2 (getl_refl b c2 v)) b0 H5) w H4)))) H3)) H2))) | (S n) \Rightarrow (\lambda (H1: (getl (S n) (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w))).(let H_x \def (H b0 d1 w (r (Bind b) n) (getl_gen_S (Bind b) c1 (CHead d1 (Bind b0) w) v n H1)) in (let H2 \def H_x in (ex_ind C (\lambda (d2: C).(getl (r (Bind b) n) c2 (CHead d2 (Bind b0) w))) (ex C (\lambda (d2: C).(getl (S n) (CHead c2 (Bind b) v) (CHead d2 (Bind b0) w)))) (\lambda (x: C).(\lambda (H3: (getl (r (Bind b) n) c2 (CHead x (Bind b0) w))).(ex_intro C (\lambda (d2: C).(getl (S n) (CHead c2 (Bind b) v) (CHead d2 (Bind b0) w))) x (getl_head (Bind b) n c2 (CHead x (Bind b0) w) H3 v)))) H2))))]) H0)))))))))). + +theorem getl_mono: + \forall (c: C).(\forall (x1: C).(\forall (h: nat).((getl h c x1) \to (\forall (x2: C).((getl h c x2) \to (eq C x1 x2)))))) +\def + \lambda (c: C).(\lambda (x1: C).(\lambda (h: nat).(\lambda (H: (getl h c x1)).(\lambda (x2: C).(\lambda (H0: (getl h c x2)).(let H1 \def (getl_gen_all c x2 h H0) in (ex2_ind C (\lambda (e: C).(drop h O c e)) (\lambda (e: C).(clear e x2)) (eq C x1 x2) (\lambda (x: C).(\lambda (H2: (drop h O c x)).(\lambda (H3: (clear x x2)).(let H4 \def (getl_gen_all c x1 h H) in (ex2_ind C (\lambda (e: C).(drop h O c e)) (\lambda (e: C).(clear e x1)) (eq C x1 x2) (\lambda (x0: C).(\lambda (H5: (drop h O c x0)).(\lambda (H6: (clear x0 x1)).(let H7 \def (eq_ind C x (\lambda (c0: C).(drop h O c c0)) H2 x0 (drop_mono c x O h H2 x0 H5)) in (let H8 \def (eq_ind_r C x0 (\lambda (c0: C).(drop h O c c0)) H7 x (drop_mono c x O h H2 x0 H5)) in (let H9 \def (eq_ind_r C x0 (\lambda (c: C).(clear c x1)) H6 x (drop_mono c x O h H2 x0 H5)) in (clear_mono x x1 H9 x2 H3))))))) H4))))) H1))))))). + +theorem getl_clear_conf: + \forall (i: nat).(\forall (c1: C).(\forall (c3: C).((getl i c1 c3) \to (\forall (c2: C).((clear c1 c2) \to (getl i c2 c3)))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (c3: C).((getl n c1 c3) \to (\forall (c2: C).((clear c1 c2) \to (getl n c2 c3))))))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H: (getl O c1 c3)).(\lambda (c2: C).(\lambda (H0: (clear c1 c2)).(eq_ind C c3 (\lambda (c: C).(getl O c c3)) (let H1 \def (clear_gen_all c1 c3 (getl_gen_O c1 c3 H)) in (ex_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(eq C c3 (CHead e (Bind b) u))))) (getl O c3 c3) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H2: (eq C c3 (CHead x1 (Bind x0) x2))).(let H3 \def (eq_ind C c3 (\lambda (c: C).(clear c1 c)) (getl_gen_O c1 c3 H) (CHead x1 (Bind x0) x2) H2) in (eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c: C).(getl O c c)) (getl_refl x0 x1 x2) c3 H2)))))) H1)) c2 (clear_mono c1 c3 (getl_gen_O c1 c3 H) c2 H0))))))) (\lambda (n: nat).(\lambda (_: ((\forall (c1: C).(\forall (c3: C).((getl n c1 c3) \to (\forall (c2: C).((clear c1 c2) \to (getl n c2 c3)))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c3: C).((getl (S n) c c3) \to (\forall (c2: C).((clear c c2) \to (getl (S n) c2 c3)))))) (\lambda (n0: nat).(\lambda (c3: C).(\lambda (H0: (getl (S n) (CSort n0) c3)).(\lambda (c2: C).(\lambda (_: (clear (CSort n0) c2)).(getl_gen_sort n0 (S n) c3 H0 (getl (S n) c2 c3))))))) (\lambda (c: C).(\lambda (H0: ((\forall (c3: C).((getl (S n) c c3) \to (\forall (c2: C).((clear c c2) \to (getl (S n) c2 c3))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: C).(\lambda (H1: (getl (S n) (CHead c k t) c3)).(\lambda (c2: C).(\lambda (H2: (clear (CHead c k t) c2)).((match k return (\lambda (k0: K).((getl (S n) (CHead c k0 t) c3) \to ((clear (CHead c k0 t) c2) \to (getl (S n) c2 c3)))) with [(Bind b) \Rightarrow (\lambda (H3: (getl (S n) (CHead c (Bind b) t) c3)).(\lambda (H4: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: C).(getl (S n) c0 c3)) (getl_head (Bind b) n c c3 (getl_gen_S (Bind b) c c3 t n H3) t) c2 (clear_gen_bind b c c2 t H4)))) | (Flat f) \Rightarrow (\lambda (H3: (getl (S n) (CHead c (Flat f) t) c3)).(\lambda (H4: (clear (CHead c (Flat f) t) c2)).(H0 c3 (getl_gen_S (Flat f) c c3 t n H3) c2 (clear_gen_flat f c c2 t H4))))]) H1 H2))))))))) c1)))) i). + +theorem getl_drop_conf_lt: + \forall (b: B).(\forall (c: C).(\forall (c0: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead c0 (Bind b) u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i d)) c e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c0 e0))))))))))))) +\def + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (c1: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead c1 (Bind b) u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i d)) c0 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (getl i (CSort n) (CHead c0 (Bind b) u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (_: (drop h (S (plus i d)) (CSort n) e)).(getl_gen_sort n i (CHead c0 (Bind b) u) H (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c0 e0)))))))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (c1: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead c1 (Bind b) u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i d)) c0 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i (CHead c0 k t) (CHead c1 (Bind b) u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (drop h (S (plus i d)) (CHead c0 k t) e)).(let H2 \def (getl_gen_all (CHead c0 k t) (CHead c1 (Bind b) u) i H0) in (ex2_ind C (\lambda (e0: C).(drop i O (CHead c0 k t) e0)) (\lambda (e0: C).(clear e0 (CHead c1 (Bind b) u))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x: C).(\lambda (H3: (drop i O (CHead c0 k t) x)).(\lambda (H4: (clear x (CHead c1 (Bind b) u))).((match x return (\lambda (c2: C).((drop i O (CHead c0 k t) c2) \to ((clear c2 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) with [(CSort n) \Rightarrow (\lambda (_: (drop i O (CHead c0 k t) (CSort n))).(\lambda (H6: (clear (CSort n) (CHead c1 (Bind b) u))).(clear_gen_sort (CHead c1 (Bind b) u) n H6 (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) | (CHead c2 k0 t0) \Rightarrow (\lambda (H5: (drop i O (CHead c0 k t) (CHead c2 k0 t0))).(\lambda (H6: (clear (CHead c2 k0 t0) (CHead c1 (Bind b) u))).((match k0 return (\lambda (k1: K).((drop i O (CHead c0 k t) (CHead c2 k1 t0)) \to ((clear (CHead c2 k1 t0) (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) with [(Bind b0) \Rightarrow (\lambda (H7: (drop i O (CHead c0 k t) (CHead c2 (Bind b0) t0))).(\lambda (H8: (clear (CHead c2 (Bind b0) t0) (CHead c1 (Bind b) u))).(let H9 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind b) u) (CHead c2 (Bind b0) t0) (clear_gen_bind b0 c2 (CHead c1 (Bind b) u) t0 H8)) in ((let H10 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c1 (Bind b) u) (CHead c2 (Bind b0) t0) (clear_gen_bind b0 c2 (CHead c1 (Bind b) u) t0 H8)) in ((let H11 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind b) u) (CHead c2 (Bind b0) t0) (clear_gen_bind b0 c2 (CHead c1 (Bind b) u) t0 H8)) in (\lambda (H12: (eq B b b0)).(\lambda (H13: (eq C c1 c2)).(let H14 \def (eq_ind_r T t0 (\lambda (t0: T).(drop i O (CHead c0 k t) (CHead c2 (Bind b0) t0))) H7 u H11) in (let H15 \def (eq_ind_r B b0 (\lambda (b: B).(drop i O (CHead c0 k t) (CHead c2 (Bind b) u))) H14 b H12) in (let H16 \def (eq_ind_r C c2 (\lambda (c: C).(drop i O (CHead c0 k t) (CHead c (Bind b) u))) H15 c1 H13) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r (Bind b) d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i O e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r (Bind b) d) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (H17: (eq T u (lift h (r (Bind b) d) x0))).(\lambda (H18: (drop i O e (CHead x1 (Bind b) x0))).(\lambda (H19: (drop h (r (Bind b) d) c1 x1)).(eq_ind_r T (lift h (r (Bind b) d) x0) (\lambda (t1: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h (r (Bind b) d) x0) (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) x0 x1 (refl_equal T (lift h d x0)) (getl_intro i e (CHead x1 (Bind b) x0) (CHead x1 (Bind b) x0) H18 (clear_bind b x1 x0)) H19) u H17)))))) (drop_conf_lt (Bind b) i u c1 (CHead c0 k t) H16 e h d H1)))))))) H10)) H9)))) | (Flat f) \Rightarrow (\lambda (H7: (drop i O (CHead c0 k t) (CHead c2 (Flat f) t0))).(\lambda (H8: (clear (CHead c2 (Flat f) t0) (CHead c1 (Bind b) u))).((match i return (\lambda (n: nat).((drop h (S (plus n d)) (CHead c0 k t) e) \to ((drop n O (CHead c0 k t) (CHead c2 (Flat f) t0)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl n e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) with [O \Rightarrow (\lambda (H9: (drop h (S (plus O d)) (CHead c0 k t) e)).(\lambda (H10: (drop O O (CHead c0 k t) (CHead c2 (Flat f) t0))).(let H11 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k t) (CHead c2 (Flat f) t0) (drop_gen_refl (CHead c0 k t) (CHead c2 (Flat f) t0) H10)) in ((let H12 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c0 k t) (CHead c2 (Flat f) t0) (drop_gen_refl (CHead c0 k t) (CHead c2 (Flat f) t0) H10)) in ((let H13 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead c0 k t) (CHead c2 (Flat f) t0) (drop_gen_refl (CHead c0 k t) (CHead c2 (Flat f) t0) H10)) in (\lambda (H14: (eq K k (Flat f))).(\lambda (H15: (eq C c0 c2)).(let H16 \def (eq_ind_r C c2 (\lambda (c: C).(clear c (CHead c1 (Bind b) u))) (clear_gen_flat f c2 (CHead c1 (Bind b) u) t0 H8) c0 H15) in (let H17 \def (eq_ind K k (\lambda (k: K).(drop h (S (plus O d)) (CHead c0 k t) e)) H9 (Flat f) H14) in (ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) (plus O d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat f) (plus O d)) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H18: (eq C e (CHead x0 (Flat f) x1))).(\lambda (H19: (eq T t (lift h (r (Flat f) (plus O d)) x1))).(\lambda (H20: (drop h (r (Flat f) (plus O d)) c0 x0)).(let H21 \def (f_equal T T (\lambda (e0: T).e0) t (lift h (r (Flat f) (plus O d)) x1) H19) in (eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c3: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O c3 (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (let H22 \def (H c1 u O (getl_intro O c0 (CHead c1 (Bind b) u) c0 (drop_refl c0) H16) x0 h d H20) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O x0 (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x0 (Flat f) x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H23: (eq T u (lift h d x2))).(\lambda (H24: (getl O x0 (CHead x3 (Bind b) x2))).(\lambda (H25: (drop h d c1 x3)).(let H26 \def (eq_ind T u (\lambda (t: T).(clear c0 (CHead c1 (Bind b) t))) H16 (lift h d x2) H23) in (eq_ind_r T (lift h d x2) (\lambda (t1: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x0 (Flat f) x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h d x2) (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x0 (Flat f) x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) x2 x3 (refl_equal T (lift h d x2)) (getl_flat x0 (CHead x3 (Bind b) x2) O H24 f x1) H25) u H23))))))) H22)) e H18))))))) (drop_gen_skip_l c0 e t h (plus O d) (Flat f) H17))))))) H12)) H11)))) | (S n) \Rightarrow (\lambda (H9: (drop h (S (plus (S n) d)) (CHead c0 k t) e)).(\lambda (H10: (drop (S n) O (CHead c0 k t) (CHead c2 (Flat f) t0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k (plus (S n) d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k (plus (S n) d)) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H11: (eq C e (CHead x0 k x1))).(\lambda (H12: (eq T t (lift h (r k (plus (S n) d)) x1))).(\lambda (H13: (drop h (r k (plus (S n) d)) c0 x0)).(let H14 \def (f_equal T T (\lambda (e0: T).e0) t (lift h (r k (plus (S n) d)) x1) H12) in (eq_ind_r C (CHead x0 k x1) (\lambda (c3: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) c3 (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (let H15 \def (eq_ind nat (r k (plus (S n) d)) (\lambda (n: nat).(drop h n c0 x0)) H13 (plus (r k (S n)) d) (r_plus k (S n) d)) in (let H16 \def (eq_ind nat (r k (S n)) (\lambda (n: nat).(drop h (plus n d) c0 x0)) H15 (S (r k n)) (r_S k n)) in (let H17 \def (H c1 u (r k n) (getl_intro (r k n) c0 (CHead c1 (Bind b) u) (CHead c2 (Flat f) t0) (drop_gen_drop k c0 (CHead c2 (Flat f) t0) t n H10) (clear_flat c2 (CHead c1 (Bind b) u) (clear_gen_flat f c2 (CHead c1 (Bind b) u) t0 H8) f t0)) x0 h d H16) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (r k n) x0 (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) (CHead x0 k x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H18: (eq T u (lift h d x2))).(\lambda (H19: (getl (r k n) x0 (CHead x3 (Bind b) x2))).(\lambda (H20: (drop h d c1 x3)).(let H21 \def (eq_ind T u (\lambda (t: T).(clear c2 (CHead c1 (Bind b) t))) (clear_gen_flat f c2 (CHead c1 (Bind b) u) t0 H8) (lift h d x2) H18) in (eq_ind_r T (lift h d x2) (\lambda (t1: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) (CHead x0 k x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h d x2) (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) (CHead x0 k x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) x2 x3 (refl_equal T (lift h d x2)) (getl_head k n x0 (CHead x3 (Bind b) x2) H19 x1) H20) u H18))))))) H17)))) e H11))))))) (drop_gen_skip_l c0 e t h (plus (S n) d) k H9))))]) H1 H7)))]) H5 H6)))]) H3 H4)))) H2)))))))))))))) c)). + +theorem getl_drop_conf_ge: + \forall (i: nat).(\forall (a: C).(\forall (c: C).((getl i c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le (plus d h) i) \to (getl (minus i h) e a))))))))) +\def + \lambda (i: nat).(\lambda (a: C).(\lambda (c: C).(\lambda (H: (getl i c a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h d c e)).(\lambda (H1: (le (plus d h) i)).(let H2 \def (getl_gen_all c a i H) in (ex2_ind C (\lambda (e0: C).(drop i O c e0)) (\lambda (e0: C).(clear e0 a)) (getl (minus i h) e a) (\lambda (x: C).(\lambda (H3: (drop i O c x)).(\lambda (H4: (clear x a)).(getl_intro (minus i h) e a x (drop_conf_ge i x c H3 e h d H0 H1) H4)))) H2)))))))))). + +theorem getl_conf_ge_drop: + \forall (b: B).(\forall (c1: C).(\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c1 (CHead e (Bind b) u)) \to (\forall (c2: C).((drop (S O) i c1 c2) \to (drop i O c2 e)))))))) +\def + \lambda (b: B).(\lambda (c1: C).(\lambda (e: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (getl i c1 (CHead e (Bind b) u))).(\lambda (c2: C).(\lambda (H0: (drop (S O) i c1 c2)).(let H3 \def (eq_ind nat (minus (S i) (S O)) (\lambda (n: nat).(drop n O c2 e)) (drop_conf_ge (S i) e c1 (getl_drop b c1 e u i H) c2 (S O) i H0 (eq_ind_r nat (plus (S O) i) (\lambda (n: nat).(le n (S i))) (le_n (S i)) (plus i (S O)) (plus_comm i (S O)))) i (minus_Sx_SO i)) in H3)))))))). + +theorem getl_conf_le: + \forall (i: nat).(\forall (a: C).(\forall (c: C).((getl i c a) \to (\forall (e: C).(\forall (h: nat).((getl h c e) \to ((le h i) \to (getl (minus i h) e a)))))))) +\def + \lambda (i: nat).(\lambda (a: C).(\lambda (c: C).(\lambda (H: (getl i c a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (H0: (getl h c e)).(\lambda (H1: (le h i)).(let H2 \def (getl_gen_all c e h H0) in (ex2_ind C (\lambda (e0: C).(drop h O c e0)) (\lambda (e0: C).(clear e0 e)) (getl (minus i h) e a) (\lambda (x: C).(\lambda (H3: (drop h O c x)).(\lambda (H4: (clear x e)).(getl_clear_conf (minus i h) x a (getl_drop_conf_ge i a c H x h O H3 H1) e H4)))) H2))))))))). + +theorem getl_drop_conf_rev: + \forall (j: nat).(\forall (e1: C).(\forall (e2: C).((drop j O e1 e2) \to (\forall (b: B).(\forall (c2: C).(\forall (v2: T).(\forall (i: nat).((getl i c2 (CHead e2 (Bind b) v2)) \to (ex2 C (\lambda (c1: C).(drop j O c1 c2)) (\lambda (c1: C).(drop (S i) j c1 e1))))))))))) +\def + \lambda (j: nat).(\lambda (e1: C).(\lambda (e2: C).(\lambda (H: (drop j O e1 e2)).(\lambda (b: B).(\lambda (c2: C).(\lambda (v2: T).(\lambda (i: nat).(\lambda (H0: (getl i c2 (CHead e2 (Bind b) v2))).(drop_conf_rev j e1 e2 H c2 (S i) (getl_drop b c2 e2 v2 i H0)))))))))). + +theorem drop_getl_trans_lt: + \forall (i: nat).(\forall (d: nat).((lt i d) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (b: B).(\forall (e2: C).(\forall (v: T).((getl i c2 (CHead e2 (Bind b) v)) \to (ex2 C (\lambda (e1: C).(getl i c1 (CHead e1 (Bind b) (lift h (minus d (S i)) v)))) (\lambda (e1: C).(drop h (minus d (S i)) e1 e2))))))))))))) +\def + \lambda (i: nat).(\lambda (d: nat).(\lambda (H: (lt i d)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H0: (drop h d c1 c2)).(\lambda (b: B).(\lambda (e2: C).(\lambda (v: T).(\lambda (H1: (getl i c2 (CHead e2 (Bind b) v))).(let H2 \def (getl_gen_all c2 (CHead e2 (Bind b) v) i H1) in (ex2_ind C (\lambda (e: C).(drop i O c2 e)) (\lambda (e: C).(clear e (CHead e2 (Bind b) v))) (ex2 C (\lambda (e1: C).(getl i c1 (CHead e1 (Bind b) (lift h (minus d (S i)) v)))) (\lambda (e1: C).(drop h (minus d (S i)) e1 e2))) (\lambda (x: C).(\lambda (H3: (drop i O c2 x)).(\lambda (H4: (clear x (CHead e2 (Bind b) v))).(ex2_ind C (\lambda (e1: C).(drop i O c1 e1)) (\lambda (e1: C).(drop h (minus d i) e1 x)) (ex2 C (\lambda (e1: C).(getl i c1 (CHead e1 (Bind b) (lift h (minus d (S i)) v)))) (\lambda (e1: C).(drop h (minus d (S i)) e1 e2))) (\lambda (x0: C).(\lambda (H5: (drop i O c1 x0)).(\lambda (H6: (drop h (minus d i) x0 x)).(let H7 \def (eq_ind nat (minus d i) (\lambda (n: nat).(drop h n x0 x)) H6 (S (minus d (S i))) (minus_x_Sy d i H)) in (let H8 \def (drop_clear_S x x0 h (minus d (S i)) H7 b e2 v H4) in (ex2_ind C (\lambda (c3: C).(clear x0 (CHead c3 (Bind b) (lift h (minus d (S i)) v)))) (\lambda (c3: C).(drop h (minus d (S i)) c3 e2)) (ex2 C (\lambda (e1: C).(getl i c1 (CHead e1 (Bind b) (lift h (minus d (S i)) v)))) (\lambda (e1: C).(drop h (minus d (S i)) e1 e2))) (\lambda (x1: C).(\lambda (H9: (clear x0 (CHead x1 (Bind b) (lift h (minus d (S i)) v)))).(\lambda (H10: (drop h (minus d (S i)) x1 e2)).(ex_intro2 C (\lambda (e1: C).(getl i c1 (CHead e1 (Bind b) (lift h (minus d (S i)) v)))) (\lambda (e1: C).(drop h (minus d (S i)) e1 e2)) x1 (getl_intro i c1 (CHead x1 (Bind b) (lift h (minus d (S i)) v)) x0 H5 H9) H10)))) H8)))))) (drop_trans_le i d (le_S_n i d (le_S (S i) d H)) c1 c2 h H0 x H3))))) H2)))))))))))). + +theorem drop_getl_trans_le: + \forall (i: nat).(\forall (d: nat).((le i d) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((getl i c2 e2) \to (ex3_2 C C (\lambda (e0: C).(\lambda (_: C).(drop i O c1 e0))) (\lambda (e0: C).(\lambda (e1: C).(drop h (minus d i) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 e2)))))))))))) +\def + \lambda (i: nat).(\lambda (d: nat).(\lambda (H: (le i d)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H0: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H1: (getl i c2 e2)).(let H2 \def (getl_gen_all c2 e2 i H1) in (ex2_ind C (\lambda (e: C).(drop i O c2 e)) (\lambda (e: C).(clear e e2)) (ex3_2 C C (\lambda (e0: C).(\lambda (_: C).(drop i O c1 e0))) (\lambda (e0: C).(\lambda (e1: C).(drop h (minus d i) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 e2)))) (\lambda (x: C).(\lambda (H3: (drop i O c2 x)).(\lambda (H4: (clear x e2)).(let H5 \def (drop_trans_le i d H c1 c2 h H0 x H3) in (ex2_ind C (\lambda (e1: C).(drop i O c1 e1)) (\lambda (e1: C).(drop h (minus d i) e1 x)) (ex3_2 C C (\lambda (e0: C).(\lambda (_: C).(drop i O c1 e0))) (\lambda (e0: C).(\lambda (e1: C).(drop h (minus d i) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 e2)))) (\lambda (x0: C).(\lambda (H6: (drop i O c1 x0)).(\lambda (H7: (drop h (minus d i) x0 x)).(ex3_2_intro C C (\lambda (e0: C).(\lambda (_: C).(drop i O c1 e0))) (\lambda (e0: C).(\lambda (e1: C).(drop h (minus d i) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 e2))) x0 x H6 H7 H4)))) H5))))) H2)))))))))). + +theorem drop_getl_trans_ge: + \forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((getl i c2 e2) \to ((le d i) \to (getl (plus i h) c1 e2))))))))) +\def + \lambda (i: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H0: (getl i c2 e2)).(\lambda (H1: (le d i)).(let H2 \def (getl_gen_all c2 e2 i H0) in (ex2_ind C (\lambda (e: C).(drop i O c2 e)) (\lambda (e: C).(clear e e2)) (getl (plus i h) c1 e2) (\lambda (x: C).(\lambda (H3: (drop i O c2 x)).(\lambda (H4: (clear x e2)).(getl_intro (plus i h) c1 e2 x (drop_trans_ge i c1 c2 d h H x H3 H1) H4)))) H2)))))))))). + +theorem getl_drop_trans: + \forall (c1: C).(\forall (c2: C).(\forall (h: nat).((getl h c1 c2) \to (\forall (e2: C).(\forall (i: nat).((drop (S i) O c2 e2) \to (drop (S (plus i h)) O c1 e2))))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (h: nat).((getl h c c2) \to (\forall (e2: C).(\forall (i: nat).((drop (S i) O c2 e2) \to (drop (S (plus i h)) O c e2)))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H: (getl h (CSort n) c2)).(\lambda (e2: C).(\lambda (i: nat).(\lambda (_: (drop (S i) O c2 e2)).(getl_gen_sort n h c2 H (drop (S (plus i h)) O (CSort n) e2))))))))) (\lambda (c2: C).(\lambda (IHc: ((\forall (c3: C).(\forall (h: nat).((getl h c2 c3) \to (\forall (e2: C).(\forall (i: nat).((drop (S i) O c3 e2) \to (drop (S (plus i h)) O c2 e2))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).(\forall (c3: C).(\forall (h: nat).((getl h (CHead c2 k0 t) c3) \to (\forall (e2: C).(\forall (i: nat).((drop (S i) O c3 e2) \to (drop (S (plus i h)) O (CHead c2 k0 t) e2))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (c3: C).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((getl n (CHead c2 (Bind b) t) c3) \to (\forall (e2: C).(\forall (i: nat).((drop (S i) O c3 e2) \to (drop (S (plus i n)) O (CHead c2 (Bind b) t) e2)))))) (\lambda (H: (getl O (CHead c2 (Bind b) t) c3)).(\lambda (e2: C).(\lambda (i: nat).(\lambda (H0: (drop (S i) O c3 e2)).(let H1 \def (eq_ind C c3 (\lambda (c: C).(drop (S i) O c e2)) H0 (CHead c2 (Bind b) t) (clear_gen_bind b c2 c3 t (getl_gen_O (CHead c2 (Bind b) t) c3 H))) in (eq_ind nat i (\lambda (n: nat).(drop (S n) O (CHead c2 (Bind b) t) e2)) (drop_drop (Bind b) i c2 e2 (drop_gen_drop (Bind b) c2 e2 t i H1) t) (plus i O) (plus_n_O i))))))) (\lambda (n: nat).(\lambda (_: (((getl n (CHead c2 (Bind b) t) c3) \to (\forall (e2: C).(\forall (i: nat).((drop (S i) O c3 e2) \to (drop (S (plus i n)) O (CHead c2 (Bind b) t) e2))))))).(\lambda (H0: (getl (S n) (CHead c2 (Bind b) t) c3)).(\lambda (e2: C).(\lambda (i: nat).(\lambda (H1: (drop (S i) O c3 e2)).(eq_ind nat (plus (S i) n) (\lambda (n0: nat).(drop (S n0) O (CHead c2 (Bind b) t) e2)) (drop_drop (Bind b) (plus (S i) n) c2 e2 (IHc c3 n (getl_gen_S (Bind b) c2 c3 t n H0) e2 i H1) t) (plus i (S n)) (plus_Snm_nSm i n)))))))) h))))) (\lambda (f: F).(\lambda (t: T).(\lambda (c3: C).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((getl n (CHead c2 (Flat f) t) c3) \to (\forall (e2: C).(\forall (i: nat).((drop (S i) O c3 e2) \to (drop (S (plus i n)) O (CHead c2 (Flat f) t) e2)))))) (\lambda (H: (getl O (CHead c2 (Flat f) t) c3)).(\lambda (e2: C).(\lambda (i: nat).(\lambda (H0: (drop (S i) O c3 e2)).(drop_drop (Flat f) (plus i O) c2 e2 (IHc c3 O (getl_intro O c2 c3 c2 (drop_refl c2) (clear_gen_flat f c2 c3 t (getl_gen_O (CHead c2 (Flat f) t) c3 H))) e2 i H0) t))))) (\lambda (n: nat).(\lambda (_: (((getl n (CHead c2 (Flat f) t) c3) \to (\forall (e2: C).(\forall (i: nat).((drop (S i) O c3 e2) \to (drop (S (plus i n)) O (CHead c2 (Flat f) t) e2))))))).(\lambda (H0: (getl (S n) (CHead c2 (Flat f) t) c3)).(\lambda (e2: C).(\lambda (i: nat).(\lambda (H1: (drop (S i) O c3 e2)).(drop_drop (Flat f) (plus i (S n)) c2 e2 (IHc c3 (S n) (getl_gen_S (Flat f) c2 c3 t n H0) e2 i H1) t))))))) h))))) k)))) c1). + +theorem getl_trans: + \forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((getl h c1 c2) \to (\forall (e2: C).((getl i c2 e2) \to (getl (plus i h) c1 e2))))))) +\def + \lambda (i: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H: (getl h c1 c2)).(\lambda (e2: C).(\lambda (H0: (getl i c2 e2)).(let H1 \def (getl_gen_all c2 e2 i H0) in (ex2_ind C (\lambda (e: C).(drop i O c2 e)) (\lambda (e: C).(clear e e2)) (getl (plus i h) c1 e2) (\lambda (x: C).(\lambda (H2: (drop i O c2 x)).(\lambda (H3: (clear x e2)).((match i return (\lambda (n: nat).((drop n O c2 x) \to (getl (plus n h) c1 e2))) with [O \Rightarrow (\lambda (H4: (drop O O c2 x)).(let H5 \def (eq_ind_r C x (\lambda (c: C).(clear c e2)) H3 c2 (drop_gen_refl c2 x H4)) in (getl_clear_trans (plus O h) c1 c2 H e2 H5))) | (S n) \Rightarrow (\lambda (H4: (drop (S n) O c2 x)).(let H_y \def (getl_drop_trans c1 c2 h H x n H4) in (getl_intro (plus (S n) h) c1 e2 x H_y H3)))]) H2)))) H1)))))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-8.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-8.ma new file mode 100644 index 000000000..9ad86c0d9 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta-8.ma @@ -0,0 +1,93 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta-8". + +include "LambdaDelta-6.ma". + +inductive subst0: nat \to (T \to (T \to (T \to Prop))) \def +| subst0_lref: \forall (v: T).(\forall (i: nat).(subst0 i v (TLRef i) (lift (S i) O v))) +| subst0_fst: \forall (v: T).(\forall (u2: T).(\forall (u1: T).(\forall (i: nat).((subst0 i v u1 u2) \to (\forall (t: T).(\forall (k: K).(subst0 i v (THead k u1 t) (THead k u2 t)))))))) +| subst0_snd: \forall (k: K).(\forall (v: T).(\forall (t2: T).(\forall (t1: T).(\forall (i: nat).((subst0 (s k i) v t1 t2) \to (\forall (u: T).(subst0 i v (THead k u t1) (THead k u t2)))))))) +| subst0_both: \forall (v: T).(\forall (u1: T).(\forall (u2: T).(\forall (i: nat).((subst0 i v u1 u2) \to (\forall (k: K).(\forall (t1: T).(\forall (t2: T).((subst0 (s k i) v t1 t2) \to (subst0 i v (THead k u1 t1) (THead k u2 t2)))))))))). + +theorem subst0_gen_sort: + \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst0 i v (TSort n) x) \to (\forall (P: Prop).P))))) +\def + \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda (H: (subst0 i v (TSort n) x)).(\lambda (P: Prop).(let H0 \def (match H return (\lambda (n0: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t1: T).(\lambda (_: (subst0 n0 t t0 t1)).((eq nat n0 i) \to ((eq T t v) \to ((eq T t0 (TSort n)) \to ((eq T t1 x) \to P))))))))) with [(subst0_lref v0 i0) \Rightarrow (\lambda (H0: (eq nat i0 i)).(\lambda (H1: (eq T v0 v)).(\lambda (H2: (eq T (TLRef i0) (TSort n))).(\lambda (H3: (eq T (lift (S i0) O v0) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (TLRef n0) (TSort n)) \to ((eq T (lift (S n0) O v0) x) \to P)))) (\lambda (H4: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (TLRef i) (TSort n)) \to ((eq T (lift (S i) O t) x) \to P))) (\lambda (H5: (eq T (TLRef i) (TSort n))).(let H6 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H5) in (False_ind ((eq T (lift (S i) O v) x) \to P) H6))) v0 (sym_eq T v0 v H4))) i0 (sym_eq nat i0 i H0) H1 H2 H3))))) | (subst0_fst v0 u2 u1 i0 H0 t k) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u1 t) (TSort n))).(\lambda (H4: (eq T (THead k u2 t) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t) (TSort n)) \to ((eq T (THead k u2 t) x) \to ((subst0 n0 v0 u1 u2) \to P))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq T (THead k u1 t) (TSort n)) \to ((eq T (THead k u2 t) x) \to ((subst0 i t0 u1 u2) \to P)))) (\lambda (H6: (eq T (THead k u1 t) (TSort n))).(let H7 \def (eq_ind T (THead k u1 t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H6) in (False_ind ((eq T (THead k u2 t) x) \to ((subst0 i v u1 u2) \to P)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_snd k v0 t2 t1 i0 H0 u) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u t1) (TSort n))).(\lambda (H4: (eq T (THead k u t2) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u t1) (TSort n)) \to ((eq T (THead k u t2) x) \to ((subst0 (s k n0) v0 t1 t2) \to P))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k u t1) (TSort n)) \to ((eq T (THead k u t2) x) \to ((subst0 (s k i) t t1 t2) \to P)))) (\lambda (H6: (eq T (THead k u t1) (TSort n))).(let H7 \def (eq_ind T (THead k u t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H6) in (False_ind ((eq T (THead k u t2) x) \to ((subst0 (s k i) v t1 t2) \to P)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_both v0 u1 u2 i0 H0 k t1 t2 H1) \Rightarrow (\lambda (H2: (eq nat i0 i)).(\lambda (H3: (eq T v0 v)).(\lambda (H4: (eq T (THead k u1 t1) (TSort n))).(\lambda (H5: (eq T (THead k u2 t2) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t1) (TSort n)) \to ((eq T (THead k u2 t2) x) \to ((subst0 n0 v0 u1 u2) \to ((subst0 (s k n0) v0 t1 t2) \to P)))))) (\lambda (H6: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k u1 t1) (TSort n)) \to ((eq T (THead k u2 t2) x) \to ((subst0 i t u1 u2) \to ((subst0 (s k i) t t1 t2) \to P))))) (\lambda (H7: (eq T (THead k u1 t1) (TSort n))).(let H8 \def (eq_ind T (THead k u1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H7) in (False_ind ((eq T (THead k u2 t2) x) \to ((subst0 i v u1 u2) \to ((subst0 (s k i) v t1 t2) \to P))) H8))) v0 (sym_eq T v0 v H6))) i0 (sym_eq nat i0 i H2) H3 H4 H5 H0 H1)))))]) in (H0 (refl_equal nat i) (refl_equal T v) (refl_equal T (TSort n)) (refl_equal T x)))))))). + +theorem subst0_gen_lref: + \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst0 i v (TLRef n) x) \to (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: (subst0 i v (TLRef n) x)).(let H0 \def (match H return (\lambda (n0: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t1: T).(\lambda (_: (subst0 n0 t t0 t1)).((eq nat n0 i) \to ((eq T t v) \to ((eq T t0 (TLRef n)) \to ((eq T t1 x) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))))))))) with [(subst0_lref v0 i0) \Rightarrow (\lambda (H0: (eq nat i0 i)).(\lambda (H1: (eq T v0 v)).(\lambda (H2: (eq T (TLRef i0) (TLRef n))).(\lambda (H3: (eq T (lift (S i0) O v0) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (TLRef n0) (TLRef n)) \to ((eq T (lift (S n0) O v0) x) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))) (\lambda (H4: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O t) x) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))) (\lambda (H5: (eq T (TLRef i) (TLRef n))).(let H6 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H5) in (eq_ind nat n (\lambda (n0: nat).((eq T (lift (S n0) O v) x) \to (land (eq nat n n0) (eq T x (lift (S n) O v))))) (\lambda (H7: (eq T (lift (S n) O v) x)).(eq_ind T (lift (S n) O v) (\lambda (t: T).(land (eq nat n n) (eq T t (lift (S n) O v)))) (conj (eq nat n n) (eq T (lift (S n) O v) (lift (S n) O v)) (refl_equal nat n) (refl_equal T (lift (S n) O v))) x H7)) i (sym_eq nat i n H6)))) v0 (sym_eq T v0 v H4))) i0 (sym_eq nat i0 i H0) H1 H2 H3))))) | (subst0_fst v0 u2 u1 i0 H0 t k) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u1 t) (TLRef n))).(\lambda (H4: (eq T (THead k u2 t) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t) (TLRef n)) \to ((eq T (THead k u2 t) x) \to ((subst0 n0 v0 u1 u2) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq T (THead k u1 t) (TLRef n)) \to ((eq T (THead k u2 t) x) \to ((subst0 i t0 u1 u2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))) (\lambda (H6: (eq T (THead k u1 t) (TLRef n))).(let H7 \def (eq_ind T (THead k u1 t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H6) in (False_ind ((eq T (THead k u2 t) x) \to ((subst0 i v u1 u2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_snd k v0 t2 t1 i0 H0 u) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u t1) (TLRef n))).(\lambda (H4: (eq T (THead k u t2) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u t1) (TLRef n)) \to ((eq T (THead k u t2) x) \to ((subst0 (s k n0) v0 t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k u t1) (TLRef n)) \to ((eq T (THead k u t2) x) \to ((subst0 (s k i) t t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))) (\lambda (H6: (eq T (THead k u t1) (TLRef n))).(let H7 \def (eq_ind T (THead k u t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H6) in (False_ind ((eq T (THead k u t2) x) \to ((subst0 (s k i) v t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_both v0 u1 u2 i0 H0 k t1 t2 H1) \Rightarrow (\lambda (H2: (eq nat i0 i)).(\lambda (H3: (eq T v0 v)).(\lambda (H4: (eq T (THead k u1 t1) (TLRef n))).(\lambda (H5: (eq T (THead k u2 t2) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t1) (TLRef n)) \to ((eq T (THead k u2 t2) x) \to ((subst0 n0 v0 u1 u2) \to ((subst0 (s k n0) v0 t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))))) (\lambda (H6: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k u1 t1) (TLRef n)) \to ((eq T (THead k u2 t2) x) \to ((subst0 i t u1 u2) \to ((subst0 (s k i) t t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))))) (\lambda (H7: (eq T (THead k u1 t1) (TLRef n))).(let H8 \def (eq_ind T (THead k u1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H7) in (False_ind ((eq T (THead k u2 t2) x) \to ((subst0 i v u1 u2) \to ((subst0 (s k i) v t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))) H8))) v0 (sym_eq T v0 v H6))) i0 (sym_eq nat i0 i H2) H3 H4 H5 H0 H1)))))]) in (H0 (refl_equal nat i) (refl_equal T v) (refl_equal T (TLRef n)) (refl_equal T x))))))). + +theorem subst0_gen_head: + \forall (k: K).(\forall (v: T).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).((subst0 i v (THead k u1 t1) x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (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: (subst0 i v (THead k u1 t1) x)).(let H0 \def (match H return (\lambda (n: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (subst0 n t t0 t2)).((eq nat n i) \to ((eq T t v) \to ((eq T t0 (THead k u1 t1)) \to ((eq T t2 x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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)))))))))))))) with [(subst0_lref v0 i0) \Rightarrow (\lambda (H0: (eq nat i0 i)).(\lambda (H1: (eq T v0 v)).(\lambda (H2: (eq T (TLRef i0) (THead k u1 t1))).(\lambda (H3: (eq T (lift (S i0) O v0) x)).(eq_ind nat i (\lambda (n: nat).((eq T v0 v) \to ((eq T (TLRef n) (THead k u1 t1)) \to ((eq T (lift (S n) O v0) x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))))) (\lambda (H4: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (TLRef i) (THead k u1 t1)) \to ((eq T (lift (S i) O t) x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))) (\lambda (H5: (eq T (TLRef i) (THead k u1 t1))).(let H6 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k u1 t1) H5) in (False_ind ((eq T (lift (S i) O v) x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))) H6))) v0 (sym_eq T v0 v H4))) i0 (sym_eq nat i0 i H0) H1 H2 H3))))) | (subst0_fst v0 u2 u0 i0 H0 t k0) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k0 u0 t) (THead k u1 t1))).(\lambda (H4: (eq T (THead k0 u2 t) x)).(eq_ind nat i (\lambda (n: nat).((eq T v0 v) \to ((eq T (THead k0 u0 t) (THead k u1 t1)) \to ((eq T (THead k0 u2 t) x) \to ((subst0 n v0 u0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq T (THead k0 u0 t) (THead k u1 t1)) \to ((eq T (THead k0 u2 t) x) \to ((subst0 i t0 u0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))))) (\lambda (H6: (eq T (THead k0 u0 t) (THead k u1 t1))).(let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead k0 u0 t) (THead k u1 t1) H6) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k0 u0 t) (THead k u1 t1) H6) in ((let H9 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 u0 t) (THead k u1 t1) H6) in (eq_ind K k (\lambda (k1: K).((eq T u0 u1) \to ((eq T t t1) \to ((eq T (THead k1 u2 t) x) \to ((subst0 i v u0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))))) (\lambda (H10: (eq T u0 u1)).(eq_ind T u1 (\lambda (t0: T).((eq T t t1) \to ((eq T (THead k u2 t) x) \to ((subst0 i v t0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))))) (\lambda (H11: (eq T t t1)).(eq_ind T t1 (\lambda (t0: T).((eq T (THead k u2 t0) x) \to ((subst0 i v u1 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))) (\lambda (H12: (eq T (THead k u2 t1) x)).(eq_ind T (THead k u2 t1) (\lambda (t0: T).((subst0 i v u1 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T t0 (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T t0 (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T t0 (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))) (\lambda (H13: (subst0 i v u1 u2)).(or3_intro0 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t1) (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T (THead k u2 t1) (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead k u2 t1) (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))) (ex_intro2 T (\lambda (u3: T).(eq T (THead k u2 t1) (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3)) u2 (refl_equal T (THead k u2 t1)) H13))) x H12)) t (sym_eq T t t1 H11))) u0 (sym_eq T u0 u1 H10))) k0 (sym_eq K k0 k H9))) H8)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_snd k0 v0 t2 t0 i0 H0 u) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k0 u t0) (THead k u1 t1))).(\lambda (H4: (eq T (THead k0 u t2) x)).(eq_ind nat i (\lambda (n: nat).((eq T v0 v) \to ((eq T (THead k0 u t0) (THead k u1 t1)) \to ((eq T (THead k0 u t2) x) \to ((subst0 (s k0 n) v0 t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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)))))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k0 u t0) (THead k u1 t1)) \to ((eq T (THead k0 u t2) x) \to ((subst0 (s k0 i) t t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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))))))))) (\lambda (H6: (eq T (THead k0 u t0) (THead k u1 t1))).(let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 u t0) (THead k u1 t1) H6) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead k0 u t0) (THead k u1 t1) H6) in ((let H9 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 u t0) (THead k u1 t1) H6) in (eq_ind K k (\lambda (k1: K).((eq T u u1) \to ((eq T t0 t1) \to ((eq T (THead k1 u t2) x) \to ((subst0 (s k1 i) v t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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)))))))))) (\lambda (H10: (eq T u u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead k t t2) x) \to ((subst0 (s k i) v t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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))))))))) (\lambda (H11: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead k u1 t2) x) \to ((subst0 (s k i) v t t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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)))))))) (\lambda (H12: (eq T (THead k u1 t2) x)).(eq_ind T (THead k u1 t2) (\lambda (t: T).((subst0 (s k i) v t1 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T t (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T t (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 t (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))))))) (\lambda (H13: (subst0 (s k i) v t1 t2)).(or3_intro1 (ex2 T (\lambda (u2: T).(eq T (THead k u1 t2) (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T (THead k u1 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 (THead k u1 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)))) (ex_intro2 T (\lambda (t3: T).(eq T (THead k u1 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3)) t2 (refl_equal T (THead k u1 t2)) H13))) x H12)) t0 (sym_eq T t0 t1 H11))) u (sym_eq T u u1 H10))) k0 (sym_eq K k0 k H9))) H8)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_both v0 u0 u2 i0 H0 k0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq nat i0 i)).(\lambda (H3: (eq T v0 v)).(\lambda (H4: (eq T (THead k0 u0 t0) (THead k u1 t1))).(\lambda (H5: (eq T (THead k0 u2 t2) x)).(eq_ind nat i (\lambda (n: nat).((eq T v0 v) \to ((eq T (THead k0 u0 t0) (THead k u1 t1)) \to ((eq T (THead k0 u2 t2) x) \to ((subst0 n v0 u0 u2) \to ((subst0 (s k0 n) v0 t0 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))))))))))) (\lambda (H6: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k0 u0 t0) (THead k u1 t1)) \to ((eq T (THead k0 u2 t2) x) \to ((subst0 i t u0 u2) \to ((subst0 (s k0 i) t t0 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))))))))) (\lambda (H7: (eq T (THead k0 u0 t0) (THead k u1 t1))).(let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 u0 t0) (THead k u1 t1) H7) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k0 u0 t0) (THead k u1 t1) H7) in ((let H10 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 u0 t0) (THead k u1 t1) H7) in (eq_ind K k (\lambda (k1: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k1 u2 t2) x) \to ((subst0 i v u0 u2) \to ((subst0 (s k1 i) v t0 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))))))))))) (\lambda (H11: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead k u2 t2) x) \to ((subst0 i v t u2) \to ((subst0 (s k i) v t0 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))))))))) (\lambda (H12: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead k u2 t2) x) \to ((subst0 i v u1 u2) \to ((subst0 (s k i) v t t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))))))))) (\lambda (H13: (eq T (THead k u2 t2) x)).(eq_ind T (THead k u2 t2) (\lambda (t: T).((subst0 i v u1 u2) \to ((subst0 (s k i) v t1 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T t (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T t (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))))))) (\lambda (H14: (subst0 i v u1 u2)).(\lambda (H15: (subst0 (s k i) v t1 t2)).(or3_intro2 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t2) (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T (THead k u2 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))) u2 t2 (refl_equal T (THead k u2 t2)) H14 H15)))) x H13)) t0 (sym_eq T t0 t1 H12))) u0 (sym_eq T u0 u1 H11))) k0 (sym_eq K k0 k H10))) H9)) H8))) v0 (sym_eq T v0 v H6))) i0 (sym_eq nat i0 i H2) H3 H4 H5 H0 H1)))))]) in (H0 (refl_equal nat i) (refl_equal T v) (refl_equal T (THead k u1 t1)) (refl_equal T x))))))))). + +theorem subst0_refl: + \forall (u: T).(\forall (t: T).(\forall (d: nat).((subst0 d u t t) \to (\forall (P: Prop).P)))) +\def + \lambda (u: T).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).((subst0 d u t0 t0) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (H: (subst0 d u (TSort n) (TSort n))).(\lambda (P: Prop).(subst0_gen_sort u (TSort n) d n H P))))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (H: (subst0 d u (TLRef n) (TLRef n))).(\lambda (P: Prop).(and_ind (eq nat n d) (eq T (TLRef n) (lift (S n) O u)) P (\lambda (_: (eq nat n d)).(\lambda (H1: (eq T (TLRef n) (lift (S n) O u))).(lift_gen_lref_false (S n) O n (le_O_n n) (le_n (plus O (S n))) u H1 P))) (subst0_gen_lref u (TLRef n) d n H)))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (H: ((\forall (d: nat).((subst0 d u t0 t0) \to (\forall (P: Prop).P))))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).((subst0 d u t1 t1) \to (\forall (P: Prop).P))))).(\lambda (d: nat).(\lambda (H1: (subst0 d u (THead k t0 t1) (THead k t0 t1))).(\lambda (P: Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) (\lambda (u2: T).(subst0 d u t0 u2))) (ex2 T (\lambda (t2: T).(eq T (THead k t0 t1) (THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 t2)))) P (\lambda (H2: (ex2 T (\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) (\lambda (u2: T).(subst0 d u t0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) (\lambda (u2: T).(subst0 d u t0 u2)) P (\lambda (x: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k x t1))).(\lambda (H4: (subst0 d u t0 x)).(let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ t _) \Rightarrow t])) (THead k t0 t1) (THead k x t1) H3) in (let H6 \def (eq_ind_r T x (\lambda (t: T).(subst0 d u t0 t)) H4 t0 H5) in (H d H6 P)))))) H2)) (\lambda (H2: (ex2 T (\lambda (t2: T).(eq T (THead k t0 t1) (THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2)))).(ex2_ind T (\lambda (t2: T).(eq T (THead k t0 t1) (THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2)) P (\lambda (x: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k t0 x))).(\lambda (H4: (subst0 (s k d) u t1 x)).(let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k t0 t1) (THead k t0 x) H3) in (let H6 \def (eq_ind_r T x (\lambda (t: T).(subst0 (s k d) u t1 t)) H4 t1 H5) in (H0 (s k d) H6 P)))))) H2)) (\lambda (H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 t2))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k x0 x1))).(\lambda (H4: (subst0 d u t0 x0)).(\lambda (H5: (subst0 (s k d) u t1 x1)).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ t _) \Rightarrow t])) (THead k t0 t1) (THead k x0 x1) H3) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k t0 t1) (THead k x0 x1) H3) in (\lambda (H8: (eq T t0 x0)).(let H9 \def (eq_ind_r T x1 (\lambda (t: T).(subst0 (s k d) u t1 t)) H5 t1 H7) in (let H10 \def (eq_ind_r T x0 (\lambda (t: T).(subst0 d u t0 t)) H4 t0 H8) in (H d H10 P))))) H6))))))) H2)) (subst0_gen_head k u t0 t1 (THead k t0 t1) d H1)))))))))) t)). + +theorem subst0_gen_lift_lt: + \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 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).(subst0 i u t1 t2))))))))) +\def + \lambda (u: T).(\lambda (t1: T).(T_ind (\lambda (t: T).(\forall (x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i (lift h d u) (lift h (S (plus i d)) t) x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t t2))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (subst0 i (lift h d u) (lift h (S (plus i d)) (TSort n)) x)).(let H0 \def (eq_ind T (lift h (S (plus i d)) (TSort n)) (\lambda (t: T).(subst0 i (lift h d u) t x)) H (TSort n) (lift_sort n h (S (plus i d)))) in (subst0_gen_sort (lift h d u) x i n H0 (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TSort n) t2))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (subst0 i (lift h d u) (lift h (S (plus i d)) (TLRef n)) x)).(lt_le_e n (S (plus i d)) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef n) t2))) (\lambda (H0: (lt n (S (plus i d)))).(let H1 \def (eq_ind T (lift h (S (plus i d)) (TLRef n)) (\lambda (t: T).(subst0 i (lift h d u) t x)) H (TLRef n) (lift_lref_lt n h (S (plus i d)) H0)) in (and_ind (eq nat n i) (eq T x (lift (S n) O (lift h d u))) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef n) t2))) (\lambda (H2: (eq nat n i)).(\lambda (H3: (eq T x (lift (S n) O (lift h d u)))).(eq_ind_r T (lift (S n) O (lift h d u)) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef n) t2)))) (eq_ind_r nat i (\lambda (n0: nat).(ex2 T (\lambda (t2: T).(eq T (lift (S n0) O (lift h d u)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef n0) t2)))) (eq_ind T (lift h (plus (S i) d) (lift (S i) O u)) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef i) t2)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift h (S (plus i d)) (lift (S i) O u)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef i) t2)) (lift (S i) O u) (refl_equal T (lift h (S (plus i d)) (lift (S i) O u))) (subst0_lref u i)) (lift (S i) O (lift h d u)) (lift_d u h (S i) d O (le_O_n d))) n H2) x H3))) (subst0_gen_lref (lift h d u) x i n H1)))) (\lambda (H0: (le (S (plus i d)) n)).(let H1 \def (eq_ind T (lift h (S (plus i d)) (TLRef n)) (\lambda (t: T).(subst0 i (lift h d u) t x)) H (TLRef (plus n h)) (lift_lref_ge n h (S (plus i d)) H0)) in (and_ind (eq nat (plus n h) i) (eq T x (lift (S (plus n h)) O (lift h d u))) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef n) t2))) (\lambda (H2: (eq nat (plus n h) i)).(\lambda (_: (eq T x (lift (S (plus n h)) O (lift h d u)))).(let H4 \def (eq_ind_r nat i (\lambda (n0: nat).(le (S (plus n0 d)) n)) H0 (plus n h) H2) in (le_false n (plus (plus n h) d) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (TLRef n) t2))) (le_plus_trans n (plus n h) d (le_plus_l n h)) H4)))) (subst0_gen_lref (lift h d u) x i (plus n h) H1))))))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: ((\forall (x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i (lift h d u) (lift h (S (plus i d)) t) x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t t2)))))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i (lift h d u) (lift h (S (plus i d)) t0) x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t0 t2)))))))))).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (subst0 i (lift h d u) (lift h (S (plus i d)) (THead k t t0)) x)).(let H2 \def (eq_ind T (lift h (S (plus i d)) (THead k t t0)) (\lambda (t: T).(subst0 i (lift h d u) t x)) H1 (THead k (lift h (S (plus i d)) t) (lift h (s k (S (plus i d))) t0)) (lift_head k t t0 h (S (plus i d)))) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k (S (plus i d))) t0)))) (\lambda (u2: T).(subst0 i (lift h d u) (lift h (S (plus i d)) t) u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h (S (plus i d)) t) t2))) (\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S (plus i d))) t0) t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i (lift h d u) (lift h (S (plus i d)) t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S (plus i d))) t0) t2)))) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (H3: (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k (S (plus i d))) t0)))) (\lambda (u2: T).(subst0 i (lift h d u) (lift h (S (plus i d)) t) u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k (S (plus i d))) t0)))) (\lambda (u2: T).(subst0 i (lift h d u) (lift h (S (plus i d)) t) u2)) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x0: T).(\lambda (H4: (eq T x (THead k x0 (lift h (s k (S (plus i d))) t0)))).(\lambda (H5: (subst0 i (lift h d u) (lift h (S (plus i d)) t) x0)).(eq_ind_r T (THead k x0 (lift h (s k (S (plus i d))) t0)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (ex2_ind T (\lambda (t2: T).(eq T x0 (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t t2)) (ex2 T (\lambda (t2: T).(eq T (THead k x0 (lift h (s k (S (plus i d))) t0)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x1: T).(\lambda (H6: (eq T x0 (lift h (S (plus i d)) x1))).(\lambda (H7: (subst0 i u t x1)).(eq_ind_r T (lift h (S (plus i d)) x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k t2 (lift h (s k (S (plus i d))) t0)) (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (eq_ind T (lift h (S (plus i d)) (THead k x1 t0)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift h (S (plus i d)) (THead k x1 t0)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2)) (THead k x1 t0) (refl_equal T (lift h (S (plus i d)) (THead k x1 t0))) (subst0_fst u x1 t i H7 t0 k)) (THead k (lift h (S (plus i d)) x1) (lift h (s k (S (plus i d))) t0)) (lift_head k x1 t0 h (S (plus i d)))) x0 H6)))) (H x0 i h d H5)) x H4)))) H3)) (\lambda (H3: (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h (S (plus i d)) t) t2))) (\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S (plus i d))) t0) t2)))).(ex2_ind T (\lambda (t2: T).(eq T x (THead k (lift h (S (plus i d)) t) t2))) (\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S (plus i d))) t0) t2)) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x0: T).(\lambda (H4: (eq T x (THead k (lift h (S (plus i d)) t) x0))).(\lambda (H5: (subst0 (s k i) (lift h d u) (lift h (s k (S (plus i d))) t0) x0)).(eq_ind_r T (THead k (lift h (S (plus i d)) t) x0) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (let H6 \def (eq_ind nat (s k (S (plus i d))) (\lambda (n: nat).(subst0 (s k i) (lift h d u) (lift h n t0) x0)) H5 (S (s k (plus i d))) (s_S k (plus i d))) in (let H7 \def (eq_ind nat (s k (plus i d)) (\lambda (n: nat).(subst0 (s k i) (lift h d u) (lift h (S n) t0) x0)) H6 (plus (s k i) d) (s_plus k i d)) in (ex2_ind T (\lambda (t2: T).(eq T x0 (lift h (S (plus (s k i) d)) t2))) (\lambda (t2: T).(subst0 (s k i) u t0 t2)) (ex2 T (\lambda (t2: T).(eq T (THead k (lift h (S (plus i d)) t) x0) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x1: T).(\lambda (H8: (eq T x0 (lift h (S (plus (s k i) d)) x1))).(\lambda (H9: (subst0 (s k i) u t0 x1)).(eq_ind_r T (lift h (S (plus (s k i) d)) x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k (lift h (S (plus i d)) t) t2) (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (eq_ind nat (s k (plus i d)) (\lambda (n: nat).(ex2 T (\lambda (t2: T).(eq T (THead k (lift h (S (plus i d)) t) (lift h (S n) x1)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2)))) (eq_ind nat (s k (S (plus i d))) (\lambda (n: nat).(ex2 T (\lambda (t2: T).(eq T (THead k (lift h (S (plus i d)) t) (lift h n x1)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2)))) (eq_ind T (lift h (S (plus i d)) (THead k t x1)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift h (S (plus i d)) (THead k t x1)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2)) (THead k t x1) (refl_equal T (lift h (S (plus i d)) (THead k t x1))) (subst0_snd k u x1 t0 i H9 t)) (THead k (lift h (S (plus i d)) t) (lift h (s k (S (plus i d))) x1)) (lift_head k t x1 h (S (plus i d)))) (S (s k (plus i d))) (s_S k (plus i d))) (plus (s k i) d) (s_plus k i d)) x0 H8)))) (H0 x0 (s k i) h d H7)))) x H4)))) H3)) (\lambda (H3: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i (lift h d u) (lift h (S (plus i d)) t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S (plus i d))) t0) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i (lift h d u) (lift h (S (plus i d)) t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) (lift h d u) (lift h (s k (S (plus i d))) t0) t2))) (ex2 T (\lambda (t2: T).(eq T x (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T x (THead k x0 x1))).(\lambda (H5: (subst0 i (lift h d u) (lift h (S (plus i d)) t) x0)).(\lambda (H6: (subst0 (s k i) (lift h d u) (lift h (s k (S (plus i d))) t0) x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (let H7 \def (eq_ind nat (s k (S (plus i d))) (\lambda (n: nat).(subst0 (s k i) (lift h d u) (lift h n t0) x1)) H6 (S (s k (plus i d))) (s_S k (plus i d))) in (let H8 \def (eq_ind nat (s k (plus i d)) (\lambda (n: nat).(subst0 (s k i) (lift h d u) (lift h (S n) t0) x1)) H7 (plus (s k i) d) (s_plus k i d)) in (ex2_ind T (\lambda (t2: T).(eq T x1 (lift h (S (plus (s k i) d)) t2))) (\lambda (t2: T).(subst0 (s k i) u t0 t2)) (ex2 T (\lambda (t2: T).(eq T (THead k x0 x1) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x2: T).(\lambda (H9: (eq T x1 (lift h (S (plus (s k i) d)) x2))).(\lambda (H10: (subst0 (s k i) u t0 x2)).(ex2_ind T (\lambda (t2: T).(eq T x0 (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u t t2)) (ex2 T (\lambda (t2: T).(eq T (THead k x0 x1) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2))) (\lambda (x3: T).(\lambda (H11: (eq T x0 (lift h (S (plus i d)) x3))).(\lambda (H12: (subst0 i u t x3)).(eq_ind_r T (lift h (S (plus i d)) x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k t2 x1) (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (eq_ind_r T (lift h (S (plus (s k i) d)) x2) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k (lift h (S (plus i d)) x3) t2) (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (eq_ind nat (s k (plus i d)) (\lambda (n: nat).(ex2 T (\lambda (t2: T).(eq T (THead k (lift h (S (plus i d)) x3) (lift h (S n) x2)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2)))) (eq_ind nat (s k (S (plus i d))) (\lambda (n: nat).(ex2 T (\lambda (t2: T).(eq T (THead k (lift h (S (plus i d)) x3) (lift h n x2)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2)))) (eq_ind T (lift h (S (plus i d)) (THead k x3 x2)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h (S (plus i d)) t3))) (\lambda (t3: T).(subst0 i u (THead k t t0) t3)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift h (S (plus i d)) (THead k x3 x2)) (lift h (S (plus i d)) t2))) (\lambda (t2: T).(subst0 i u (THead k t t0) t2)) (THead k x3 x2) (refl_equal T (lift h (S (plus i d)) (THead k x3 x2))) (subst0_both u t x3 i H12 k t0 x2 H10)) (THead k (lift h (S (plus i d)) x3) (lift h (s k (S (plus i d))) x2)) (lift_head k x3 x2 h (S (plus i d)))) (S (s k (plus i d))) (s_S k (plus i d))) (plus (s k i) d) (s_plus k i d)) x1 H9) x0 H11)))) (H x0 i h d H5))))) (H0 x1 (s k i) h d H8)))) x H4)))))) H3)) (subst0_gen_head k (lift h d u) (lift h (S (plus i d)) t) (lift h (s k (S (plus i d))) t0) x i H2))))))))))))) t1)). + +theorem subst0_gen_lift_false: + \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 ((subst0 i u (lift h d t) x) \to (\forall (P: Prop).P))))))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: 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 ((subst0 i u (lift h d t0) x) \to (\forall (P: Prop).P)))))))))) (\lambda (n: nat).(\lambda (u: T).(\lambda (x: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (i: nat).(\lambda (_: (le d i)).(\lambda (_: (lt i (plus d h))).(\lambda (H1: (subst0 i u (lift h d (TSort n)) x)).(\lambda (P: Prop).(let H2 \def (eq_ind T (lift h d (TSort n)) (\lambda (t: T).(subst0 i u t x)) H1 (TSort n) (lift_sort n h d)) in (subst0_gen_sort u x i n H2 P)))))))))))) (\lambda (n: nat).(\lambda (u: T).(\lambda (x: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (i: nat).(\lambda (H: (le d i)).(\lambda (H0: (lt i (plus d h))).(\lambda (H1: (subst0 i u (lift h d (TLRef n)) x)).(\lambda (P: Prop).(lt_le_e n d P (\lambda (H2: (lt n d)).(let H3 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t: T).(subst0 i u t x)) H1 (TLRef n) (lift_lref_lt n h d H2)) in (and_ind (eq nat n i) (eq T x (lift (S n) O u)) P (\lambda (H4: (eq nat n i)).(\lambda (_: (eq T x (lift (S n) O u))).(let H6 \def (eq_ind nat n (\lambda (n: nat).(lt n d)) H2 i H4) in (le_false d i P H H6)))) (subst0_gen_lref u x i n H3)))) (\lambda (H2: (le d n)).(let H3 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t: T).(subst0 i u t x)) H1 (TLRef (plus n h)) (lift_lref_ge n h d H2)) in (and_ind (eq nat (plus n h) i) (eq T x (lift (S (plus n h)) O u)) P (\lambda (H4: (eq nat (plus n h) i)).(\lambda (_: (eq T x (lift (S (plus n h)) O u))).(let H6 \def (eq_ind_r nat i (\lambda (n: nat).(lt n (plus d h))) H0 (plus n h) H4) in (le_false d n P H2 (lt_le_S n d (simpl_lt_plus_r h n d H6)))))) (subst0_gen_lref u x i (plus n h) H3))))))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (H: ((\forall (u: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).(\forall (i: nat).((le d i) \to ((lt i (plus d h)) \to ((subst0 i u (lift h d t0) x) \to (\forall (P: Prop).P))))))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (u: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).(\forall (i: nat).((le d i) \to ((lt i (plus d h)) \to ((subst0 i u (lift h d t1) x) \to (\forall (P: Prop).P))))))))))).(\lambda (u: T).(\lambda (x: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (i: nat).(\lambda (H1: (le d i)).(\lambda (H2: (lt i (plus d h))).(\lambda (H3: (subst0 i u (lift h d (THead k t0 t1)) x)).(\lambda (P: Prop).(let H4 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(subst0 i u t x)) H3 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k d) t1)))) (\lambda (u2: T).(subst0 i u (lift h d t0) u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t0) t2))) (\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u (lift h d t0) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2)))) P (\lambda (H5: (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k d) t1)))) (\lambda (u2: T).(subst0 i u (lift h d t0) u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k d) t1)))) (\lambda (u2: T).(subst0 i u (lift h d t0) u2)) P (\lambda (x0: T).(\lambda (_: (eq T x (THead k x0 (lift h (s k d) t1)))).(\lambda (H7: (subst0 i u (lift h d t0) x0)).(H u x0 h d i H1 H2 H7 P)))) H5)) (\lambda (H5: (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t0) t2))) (\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2)))).(ex2_ind T (\lambda (t2: T).(eq T x (THead k (lift h d t0) t2))) (\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2)) P (\lambda (x0: T).(\lambda (_: (eq T x (THead k (lift h d t0) x0))).(\lambda (H7: (subst0 (s k i) u (lift h (s k d) t1) x0)).(H0 u x0 h (s k d) (s k i) (s_le k d i H1) (eq_ind nat (s k (plus d h)) (\lambda (n: nat).(lt (s k i) n)) (lt_le_S (s k i) (s k (plus d h)) (s_lt k i (plus d h) H2)) (plus (s k d) h) (s_plus k d h)) H7 P)))) H5)) (\lambda (H5: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u (lift h d t0) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u (lift h d t0) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T x (THead k x0 x1))).(\lambda (H7: (subst0 i u (lift h d t0) x0)).(\lambda (_: (subst0 (s k i) u (lift h (s k d) t1) x1)).(H u x0 h d i H1 H2 H7 P)))))) H5)) (subst0_gen_head k u (lift h d t0) (lift h (s k d) t1) x i H4))))))))))))))))) t). + +theorem subst0_gen_lift_ge: + \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 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).(subst0 (minus i h) u t1 t2)))))))))) +\def + \lambda (u: T).(\lambda (t1: T).(T_ind (\lambda (t: T).(\forall (x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i u (lift h d t) x) \to ((le (plus d h) i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u t t2)))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (subst0 i u (lift h d (TSort n)) x)).(\lambda (_: (le (plus d h) i)).(let H1 \def (eq_ind T (lift h d (TSort n)) (\lambda (t: T).(subst0 i u t x)) H (TSort n) (lift_sort n h d)) in (subst0_gen_sort u x i n H1 (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (TSort n) t2)))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (subst0 i u (lift h d (TLRef n)) x)).(\lambda (H0: (le (plus d h) i)).(lt_le_e n d (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (TLRef n) t2))) (\lambda (H1: (lt n d)).(let H2 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t: T).(subst0 i u t x)) H (TLRef n) (lift_lref_lt n h d H1)) in (and_ind (eq nat n i) (eq T x (lift (S n) O u)) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (TLRef n) t2))) (\lambda (H3: (eq nat n i)).(\lambda (_: (eq T x (lift (S n) O u))).(let H5 \def (eq_ind nat n (\lambda (n: nat).(lt n d)) H1 i H3) in (le_false (plus d h) i (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (TLRef n) t2))) H0 (le_plus_trans (S i) d h H5))))) (subst0_gen_lref u x i n H2)))) (\lambda (H1: (le d n)).(let H2 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t: T).(subst0 i u t x)) H (TLRef (plus n h)) (lift_lref_ge n h d H1)) in (and_ind (eq nat (plus n h) i) (eq T x (lift (S (plus n h)) O u)) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (TLRef n) t2))) (\lambda (H3: (eq nat (plus n h) i)).(\lambda (H4: (eq T x (lift (S (plus n h)) O u))).(eq_ind nat (plus n h) (\lambda (n0: nat).(ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus n0 h) u (TLRef n) t2)))) (eq_ind_r T (lift (S (plus n h)) O u) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h d t2))) (\lambda (t2: T).(subst0 (minus (plus n h) h) u (TLRef n) t2)))) (eq_ind_r nat n (\lambda (n0: nat).(ex2 T (\lambda (t2: T).(eq T (lift (S (plus n h)) O u) (lift h d t2))) (\lambda (t2: T).(subst0 n0 u (TLRef n) t2)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift (S (plus n h)) O u) (lift h d t2))) (\lambda (t2: T).(subst0 n u (TLRef n) t2)) (lift (S n) O u) (eq_ind_r T (lift (plus h (S n)) O u) (\lambda (t: T).(eq T (lift (S (plus n h)) O u) t)) (eq_ind_r nat (plus h n) (\lambda (n0: nat).(eq T (lift (S n0) O u) (lift (plus h (S n)) O u))) (eq_ind_r nat (plus h (S n)) (\lambda (n0: nat).(eq T (lift n0 O u) (lift (plus h (S n)) O u))) (refl_equal T (lift (plus h (S n)) O u)) (S (plus h n)) (plus_n_Sm h n)) (plus n h) (plus_comm n h)) (lift h d (lift (S n) O u)) (lift_free u (S n) h O d (le_trans d (S n) (plus O (S n)) (le_S d n H1) (le_n (plus O (S n)))) (le_O_n d))) (subst0_lref u n)) (minus (plus n h) h) (minus_plus_r n h)) x H4) i H3))) (subst0_gen_lref u x i (plus n h) H2)))))))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: ((\forall (x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i u (lift h d t) x) \to ((le (plus d h) i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u t t2))))))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i u (lift h d t0) x) \to ((le (plus d h) i) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u t0 t2))))))))))).(\lambda (x: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (subst0 i u (lift h d (THead k t t0)) x)).(\lambda (H2: (le (plus d h) i)).(let H3 \def (eq_ind T (lift h d (THead k t t0)) (\lambda (t: T).(subst0 i u t x)) H1 (THead k (lift h d t) (lift h (s k d) t0)) (lift_head k t t0 h d)) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k d) t0)))) (\lambda (u2: T).(subst0 i u (lift h d t) u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t) t2))) (\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t0) t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u (lift h d t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t0) t2)))) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (H4: (ex2 T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k d) t0)))) (\lambda (u2: T).(subst0 i u (lift h d t) u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead k u2 (lift h (s k d) t0)))) (\lambda (u2: T).(subst0 i u (lift h d t) u2)) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x0: T).(\lambda (H5: (eq T x (THead k x0 (lift h (s k d) t0)))).(\lambda (H6: (subst0 i u (lift h d t) x0)).(eq_ind_r T (THead k x0 (lift h (s k d) t0)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (ex2_ind T (\lambda (t2: T).(eq T x0 (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u t t2)) (ex2 T (\lambda (t2: T).(eq T (THead k x0 (lift h (s k d) t0)) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x1: T).(\lambda (H7: (eq T x0 (lift h d x1))).(\lambda (H8: (subst0 (minus i h) u t x1)).(eq_ind_r T (lift h d x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k t2 (lift h (s k d) t0)) (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (eq_ind T (lift h d (THead k x1 t0)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (ex_intro2 T (\lambda (t2: T).(eq T (lift h d (THead k x1 t0)) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2)) (THead k x1 t0) (refl_equal T (lift h d (THead k x1 t0))) (subst0_fst u x1 t (minus i h) H8 t0 k)) (THead k (lift h d x1) (lift h (s k d) t0)) (lift_head k x1 t0 h d)) x0 H7)))) (H x0 i h d H6 H2)) x H5)))) H4)) (\lambda (H4: (ex2 T (\lambda (t2: T).(eq T x (THead k (lift h d t) t2))) (\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t0) t2)))).(ex2_ind T (\lambda (t2: T).(eq T x (THead k (lift h d t) t2))) (\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t0) t2)) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x0: T).(\lambda (H5: (eq T x (THead k (lift h d t) x0))).(\lambda (H6: (subst0 (s k i) u (lift h (s k d) t0) x0)).(eq_ind_r T (THead k (lift h d t) x0) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (ex2_ind T (\lambda (t2: T).(eq T x0 (lift h (s k d) t2))) (\lambda (t2: T).(subst0 (minus (s k i) h) u t0 t2)) (ex2 T (\lambda (t2: T).(eq T (THead k (lift h d t) x0) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x1: T).(\lambda (H7: (eq T x0 (lift h (s k d) x1))).(\lambda (H8: (subst0 (minus (s k i) h) u t0 x1)).(eq_ind_r T (lift h (s k d) x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k (lift h d t) t2) (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (eq_ind T (lift h d (THead k t x1)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (let H9 \def (eq_ind_r nat (minus (s k i) h) (\lambda (n: nat).(subst0 n u t0 x1)) H8 (s k (minus i h)) (s_minus k i h (le_trans_plus_r d h i H2))) in (ex_intro2 T (\lambda (t2: T).(eq T (lift h d (THead k t x1)) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2)) (THead k t x1) (refl_equal T (lift h d (THead k t x1))) (subst0_snd k u x1 t0 (minus i h) H9 t))) (THead k (lift h d t) (lift h (s k d) x1)) (lift_head k t x1 h d)) x0 H7)))) (H0 x0 (s k i) h (s k d) H6 (eq_ind nat (s k (plus d h)) (\lambda (n: nat).(le n (s k i))) (s_le k (plus d h) i H2) (plus (s k d) h) (s_plus k d h)))) x H5)))) H4)) (\lambda (H4: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u (lift h d t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t0) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u (lift h d t) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t0) t2))) (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T x (THead k x0 x1))).(\lambda (H6: (subst0 i u (lift h d t) x0)).(\lambda (H7: (subst0 (s k i) u (lift h (s k d) t0) x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (ex2_ind T (\lambda (t2: T).(eq T x1 (lift h (s k d) t2))) (\lambda (t2: T).(subst0 (minus (s k i) h) u t0 t2)) (ex2 T (\lambda (t2: T).(eq T (THead k x0 x1) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x2: T).(\lambda (H8: (eq T x1 (lift h (s k d) x2))).(\lambda (H9: (subst0 (minus (s k i) h) u t0 x2)).(ex2_ind T (\lambda (t2: T).(eq T x0 (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u t t2)) (ex2 T (\lambda (t2: T).(eq T (THead k x0 x1) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2))) (\lambda (x3: T).(\lambda (H10: (eq T x0 (lift h d x3))).(\lambda (H11: (subst0 (minus i h) u t x3)).(eq_ind_r T (lift h d x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k t2 x1) (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (eq_ind_r T (lift h (s k d) x2) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead k (lift h d x3) t2) (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (eq_ind T (lift h d (THead k x3 x2)) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u (THead k t t0) t3)))) (let H12 \def (eq_ind_r nat (minus (s k i) h) (\lambda (n: nat).(subst0 n u t0 x2)) H9 (s k (minus i h)) (s_minus k i h (le_trans_plus_r d h i H2))) in (ex_intro2 T (\lambda (t2: T).(eq T (lift h d (THead k x3 x2)) (lift h d t2))) (\lambda (t2: T).(subst0 (minus i h) u (THead k t t0) t2)) (THead k x3 x2) (refl_equal T (lift h d (THead k x3 x2))) (subst0_both u t x3 (minus i h) H11 k t0 x2 H12))) (THead k (lift h d x3) (lift h (s k d) x2)) (lift_head k x3 x2 h d)) x1 H8) x0 H10)))) (H x0 i h d H6 H2))))) (H0 x1 (s k i) h (s k d) H7 (eq_ind nat (s k (plus d h)) (\lambda (n: nat).(le n (s k i))) (s_le k (plus d h) i H2) (plus (s k d) h) (s_plus k d h)))) x H5)))))) H4)) (subst0_gen_head k u (lift h d t) (lift h (s k d) t0) x i H3)))))))))))))) t1)). + +theorem subst0_lift_lt: + \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst0 i u t1 t2) \to (\forall (d: nat).((lt i d) \to (\forall (h: nat).(subst0 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: (subst0 i u t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t3: T).(\forall (d: nat).((lt n d) \to (\forall (h: nat).(subst0 n (lift h (minus d (S n)) t) (lift h d t0) (lift h d t3))))))))) (\lambda (v: T).(\lambda (i0: nat).(\lambda (d: nat).(\lambda (H0: (lt i0 d)).(\lambda (h: nat).(eq_ind_r T (TLRef i0) (\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) v) t (lift h d (lift (S i0) O v)))) (let w \def (minus d (S i0)) in (eq_ind nat (plus (S i0) (minus d (S i0))) (\lambda (n: nat).(subst0 i0 (lift h w v) (TLRef i0) (lift h n (lift (S i0) O v)))) (eq_ind_r T (lift (S i0) O (lift h (minus d (S i0)) v)) (\lambda (t: T).(subst0 i0 (lift h w v) (TLRef i0) t)) (subst0_lref (lift h (minus d (S i0)) v) i0) (lift h (plus (S i0) (minus d (S i0))) (lift (S i0) O v)) (lift_d v h (S i0) (minus d (S i0)) O (le_O_n (minus d (S i0))))) d (le_plus_minus_r (S i0) d H0))) (lift h d (TLRef i0)) (lift_lref_lt i0 h d H0))))))) (\lambda (v: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((lt i0 d) \to (\forall (h: nat).(subst0 i0 (lift h (minus d (S i0)) v) (lift h d u1) (lift h d u2))))))).(\lambda (t: T).(\lambda (k: K).(\lambda (d: nat).(\lambda (H2: (lt i0 d)).(\lambda (h: nat).(eq_ind_r T (THead k (lift h d u1) (lift h (s k d) t)) (\lambda (t0: T).(subst0 i0 (lift h (minus d (S i0)) v) t0 (lift h d (THead k u2 t)))) (eq_ind_r T (THead k (lift h d u2) (lift h (s k d) t)) (\lambda (t0: T).(subst0 i0 (lift h (minus d (S i0)) v) (THead k (lift h d u1) (lift h (s k d) t)) t0)) (subst0_fst (lift h (minus d (S i0)) v) (lift h d u2) (lift h d u1) i0 (H1 d H2 h) (lift h (s k d) t) k) (lift h d (THead k u2 t)) (lift_head k u2 t h d)) (lift h d (THead k u1 t)) (lift_head k u1 t h d))))))))))))) (\lambda (k: K).(\lambda (v: T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i0: nat).(\lambda (_: (subst0 (s k i0) v t3 t0)).(\lambda (H1: ((\forall (d: nat).((lt (s k i0) d) \to (\forall (h: nat).(subst0 (s k i0) (lift h (minus d (S (s k i0))) v) (lift h d t3) (lift h d t0))))))).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H2: (lt i0 d)).(\lambda (h: nat).(let H3 \def (eq_ind_r nat (S (s k i0)) (\lambda (n: nat).(\forall (d: nat).((lt (s k i0) d) \to (\forall (h: nat).(subst0 (s k i0) (lift h (minus d n) v) (lift h d t3) (lift h d t0)))))) H1 (s k (S i0)) (s_S k i0)) in (eq_ind_r T (THead k (lift h d u0) (lift h (s k d) t3)) (\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) v) t (lift h d (THead k u0 t0)))) (eq_ind_r T (THead k (lift h d u0) (lift h (s k d) t0)) (\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) v) (THead k (lift h d u0) (lift h (s k d) t3)) t)) (eq_ind nat (minus (s k d) (s k (S i0))) (\lambda (n: nat).(subst0 i0 (lift h n v) (THead k (lift h d u0) (lift h (s k d) t3)) (THead k (lift h d u0) (lift h (s k d) t0)))) (subst0_snd k (lift h (minus (s k d) (s k (S i0))) v) (lift h (s k d) t0) (lift h (s k d) t3) i0 (H3 (s k d) (s_lt k i0 d H2) h) (lift h d u0)) (minus d (S i0)) (minus_s_s k d (S i0))) (lift h d (THead k u0 t0)) (lift_head k u0 t0 h d)) (lift h d (THead k u0 t3)) (lift_head k u0 t3 h d)))))))))))))) (\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((lt i0 d) \to (\forall (h: nat).(subst0 i0 (lift h (minus d (S i0)) v) (lift h d u1) (lift h d u2))))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (subst0 (s k i0) v t0 t3)).(\lambda (H3: ((\forall (d: nat).((lt (s k i0) d) \to (\forall (h: nat).(subst0 (s k i0) (lift h (minus d (S (s k i0))) v) (lift h d t0) (lift h d t3))))))).(\lambda (d: nat).(\lambda (H4: (lt i0 d)).(\lambda (h: nat).(let H5 \def (eq_ind_r nat (S (s k i0)) (\lambda (n: nat).(\forall (d: nat).((lt (s k i0) d) \to (\forall (h: nat).(subst0 (s k i0) (lift h (minus d n) v) (lift h d t0) (lift h d t3)))))) H3 (s k (S i0)) (s_S k i0)) in (eq_ind_r T (THead k (lift h d u1) (lift h (s k d) t0)) (\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) v) t (lift h d (THead k u2 t3)))) (eq_ind_r T (THead k (lift h d u2) (lift h (s k d) t3)) (\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) v) (THead k (lift h d u1) (lift h (s k d) t0)) t)) (subst0_both (lift h (minus d (S i0)) v) (lift h d u1) (lift h d u2) i0 (H1 d H4 h) k (lift h (s k d) t0) (lift h (s k d) t3) (eq_ind nat (minus (s k d) (s k (S i0))) (\lambda (n: nat).(subst0 (s k i0) (lift h n v) (lift h (s k d) t0) (lift h (s k d) t3))) (H5 (s k d) (lt_le_S (s k i0) (s k d) (s_lt k i0 d H4)) h) (minus d (S i0)) (minus_s_s k d (S i0)))) (lift h d (THead k u2 t3)) (lift_head k u2 t3 h d)) (lift h d (THead k u1 t0)) (lift_head k u1 t0 h d))))))))))))))))) i u t1 t2 H))))). + +theorem subst0_lift_ge: + \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).(\forall (h: nat).((subst0 i u t1 t2) \to (\forall (d: nat).((le d i) \to (subst0 (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: (subst0 i u t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t3: T).(\forall (d: nat).((le d n) \to (subst0 (plus n h) t (lift h d t0) (lift h d t3)))))))) (\lambda (v: T).(\lambda (i0: nat).(\lambda (d: nat).(\lambda (H0: (le d i0)).(eq_ind_r T (TLRef (plus i0 h)) (\lambda (t: T).(subst0 (plus i0 h) v t (lift h d (lift (S i0) O v)))) (eq_ind_r T (lift (plus h (S i0)) O v) (\lambda (t: T).(subst0 (plus i0 h) v (TLRef (plus i0 h)) t)) (eq_ind nat (S (plus h i0)) (\lambda (n: nat).(subst0 (plus i0 h) v (TLRef (plus i0 h)) (lift n O v))) (eq_ind_r nat (plus h i0) (\lambda (n: nat).(subst0 n v (TLRef n) (lift (S (plus h i0)) O v))) (subst0_lref v (plus h i0)) (plus i0 h) (plus_comm i0 h)) (plus h (S i0)) (plus_n_Sm h i0)) (lift h d (lift (S i0) O v)) (lift_free v (S i0) h O d (le_S d i0 H0) (le_O_n d))) (lift h d (TLRef i0)) (lift_lref_ge i0 h d H0)))))) (\lambda (v: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((le d i0) \to (subst0 (plus i0 h) v (lift h d u1) (lift h d u2)))))).(\lambda (t: T).(\lambda (k: K).(\lambda (d: nat).(\lambda (H2: (le d i0)).(eq_ind_r T (THead k (lift h d u1) (lift h (s k d) t)) (\lambda (t0: T).(subst0 (plus i0 h) v t0 (lift h d (THead k u2 t)))) (eq_ind_r T (THead k (lift h d u2) (lift h (s k d) t)) (\lambda (t0: T).(subst0 (plus i0 h) v (THead k (lift h d u1) (lift h (s k d) t)) t0)) (subst0_fst v (lift h d u2) (lift h d u1) (plus i0 h) (H1 d H2) (lift h (s k d) t) k) (lift h d (THead k u2 t)) (lift_head k u2 t h d)) (lift h d (THead k u1 t)) (lift_head k u1 t h d)))))))))))) (\lambda (k: K).(\lambda (v: T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i0: nat).(\lambda (_: (subst0 (s k i0) v t3 t0)).(\lambda (H1: ((\forall (d: nat).((le d (s k i0)) \to (subst0 (plus (s k i0) h) v (lift h d t3) (lift h d t0)))))).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H2: (le d i0)).(let H3 \def (eq_ind_r nat (plus (s k i0) h) (\lambda (n: nat).(\forall (d: nat).((le d (s k i0)) \to (subst0 n v (lift h d t3) (lift h d t0))))) H1 (s k (plus i0 h)) (s_plus k i0 h)) in (eq_ind_r T (THead k (lift h d u0) (lift h (s k d) t3)) (\lambda (t: T).(subst0 (plus i0 h) v t (lift h d (THead k u0 t0)))) (eq_ind_r T (THead k (lift h d u0) (lift h (s k d) t0)) (\lambda (t: T).(subst0 (plus i0 h) v (THead k (lift h d u0) (lift h (s k d) t3)) t)) (subst0_snd k v (lift h (s k d) t0) (lift h (s k d) t3) (plus i0 h) (H3 (s k d) (s_le k d i0 H2)) (lift h d u0)) (lift h d (THead k u0 t0)) (lift_head k u0 t0 h d)) (lift h d (THead k u0 t3)) (lift_head k u0 t3 h d))))))))))))) (\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((le d i0) \to (subst0 (plus i0 h) v (lift h d u1) (lift h d u2)))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (subst0 (s k i0) v t0 t3)).(\lambda (H3: ((\forall (d: nat).((le d (s k i0)) \to (subst0 (plus (s k i0) h) v (lift h d t0) (lift h d t3)))))).(\lambda (d: nat).(\lambda (H4: (le d i0)).(let H5 \def (eq_ind_r nat (plus (s k i0) h) (\lambda (n: nat).(\forall (d: nat).((le d (s k i0)) \to (subst0 n v (lift h d t0) (lift h d t3))))) H3 (s k (plus i0 h)) (s_plus k i0 h)) in (eq_ind_r T (THead k (lift h d u1) (lift h (s k d) t0)) (\lambda (t: T).(subst0 (plus i0 h) v t (lift h d (THead k u2 t3)))) (eq_ind_r T (THead k (lift h d u2) (lift h (s k d) t3)) (\lambda (t: T).(subst0 (plus i0 h) v (THead k (lift h d u1) (lift h (s k d) t0)) t)) (subst0_both v (lift h d u1) (lift h d u2) (plus i0 h) (H1 d H4) k (lift h (s k d) t0) (lift h (s k d) t3) (H5 (s k d) (s_le k d i0 H4))) (lift h d (THead k u2 t3)) (lift_head k u2 t3 h d)) (lift h d (THead k u1 t0)) (lift_head k u1 t0 h d)))))))))))))))) i u t1 t2 H)))))). + +theorem subst0_lift_ge_S: + \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst0 i u t1 t2) \to (\forall (d: nat).((le d i) \to (subst0 (S i) u (lift (S O) d t1) (lift (S O) d t2)))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (subst0 i u t1 t2)).(\lambda (d: nat).(\lambda (H0: (le d i)).(eq_ind nat (plus i (S O)) (\lambda (n: nat).(subst0 n u (lift (S O) d t1) (lift (S O) d t2))) (subst0_lift_ge t1 t2 u i (S O) H d H0) (S i) (eq_ind_r nat (plus (S O) i) (\lambda (n: nat).(eq nat n (S i))) (refl_equal nat (S i)) (plus i (S O)) (plus_comm i (S O)))))))))). + +theorem subst0_lift_ge_s: + \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst0 i u t1 t2) \to (\forall (d: nat).((le d i) \to (\forall (b: B).(subst0 (s (Bind b) i) u (lift (S O) d t1) (lift (S O) d t2))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (subst0 i u t1 t2)).(\lambda (d: nat).(\lambda (H0: (le d i)).(\lambda (_: B).(subst0_lift_ge_S t1 t2 u i H d H0)))))))). + +theorem subst0_subst0: + \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst0 j u2 t1 t2) \to (\forall (u1: T).(\forall (u: T).(\forall (i: nat).((subst0 i u u1 u2) \to (ex2 T (\lambda (t: T).(subst0 j u1 t1 t)) (\lambda (t: T).(subst0 (S (plus i j)) u t t2))))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u2: T).(\lambda (j: nat).(\lambda (H: (subst0 j u2 t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t3: T).(\forall (u1: T).(\forall (u: T).(\forall (i: nat).((subst0 i u u1 t) \to (ex2 T (\lambda (t4: T).(subst0 n u1 t0 t4)) (\lambda (t4: T).(subst0 (S (plus i n)) u t4 t3))))))))))) (\lambda (v: T).(\lambda (i: nat).(\lambda (u1: T).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H0: (subst0 i0 u u1 v)).(eq_ind nat (plus i0 (S i)) (\lambda (n: nat).(ex2 T (\lambda (t: T).(subst0 i u1 (TLRef i) t)) (\lambda (t: T).(subst0 n u t (lift (S i) O v))))) (ex_intro2 T (\lambda (t: T).(subst0 i u1 (TLRef i) t)) (\lambda (t: T).(subst0 (plus i0 (S i)) u t (lift (S i) O v))) (lift (S i) O u1) (subst0_lref u1 i) (subst0_lift_ge u1 v u i0 (S i) H0 O (le_O_n i0))) (S (plus i0 i)) (sym_eq nat (S (plus i0 i)) (plus i0 (S i)) (plus_n_Sm i0 i))))))))) (\lambda (v: T).(\lambda (u0: T).(\lambda (u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 u0)).(\lambda (H1: ((\forall (u2: T).(\forall (u: T).(\forall (i0: nat).((subst0 i0 u u2 v) \to (ex2 T (\lambda (t: T).(subst0 i u2 u1 t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u t u0))))))))).(\lambda (t: T).(\lambda (k: K).(\lambda (u3: T).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H2: (subst0 i0 u u3 v)).(ex2_ind T (\lambda (t0: T).(subst0 i u3 u1 t0)) (\lambda (t0: T).(subst0 (S (plus i0 i)) u t0 u0)) (ex2 T (\lambda (t0: T).(subst0 i u3 (THead k u1 t) t0)) (\lambda (t0: T).(subst0 (S (plus i0 i)) u t0 (THead k u0 t)))) (\lambda (x: T).(\lambda (H3: (subst0 i u3 u1 x)).(\lambda (H4: (subst0 (S (plus i0 i)) u x u0)).(ex_intro2 T (\lambda (t0: T).(subst0 i u3 (THead k u1 t) t0)) (\lambda (t0: T).(subst0 (S (plus i0 i)) u t0 (THead k u0 t))) (THead k x t) (subst0_fst u3 x u1 i H3 t k) (subst0_fst u u0 x (S (plus i0 i)) H4 t k))))) (H1 u3 u i0 H2)))))))))))))) (\lambda (k: K).(\lambda (v: T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i: nat).(\lambda (_: (subst0 (s k i) v t3 t0)).(\lambda (H1: ((\forall (u1: T).(\forall (u: T).(\forall (i0: nat).((subst0 i0 u u1 v) \to (ex2 T (\lambda (t: T).(subst0 (s k i) u1 t3 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k i))) u t t0))))))))).(\lambda (u: T).(\lambda (u1: T).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H2: (subst0 i0 u0 u1 v)).(ex2_ind T (\lambda (t: T).(subst0 (s k i) u1 t3 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k i))) u0 t t0)) (ex2 T (\lambda (t: T).(subst0 i u1 (THead k u t3) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u0 t (THead k u t0)))) (\lambda (x: T).(\lambda (H3: (subst0 (s k i) u1 t3 x)).(\lambda (H4: (subst0 (S (plus i0 (s k i))) u0 x t0)).(let H5 \def (eq_ind_r nat (plus i0 (s k i)) (\lambda (n: nat).(subst0 (S n) u0 x t0)) H4 (s k (plus i0 i)) (s_plus_sym k i0 i)) in (let H6 \def (eq_ind_r nat (S (s k (plus i0 i))) (\lambda (n: nat).(subst0 n u0 x t0)) H5 (s k (S (plus i0 i))) (s_S k (plus i0 i))) in (ex_intro2 T (\lambda (t: T).(subst0 i u1 (THead k u t3) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u0 t (THead k u t0))) (THead k u x) (subst0_snd k u1 x t3 i H3 u) (subst0_snd k u0 t0 x (S (plus i0 i)) H6 u))))))) (H1 u1 u0 i0 H2)))))))))))))) (\lambda (v: T).(\lambda (u1: T).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 u0)).(\lambda (H1: ((\forall (u2: T).(\forall (u: T).(\forall (i0: nat).((subst0 i0 u u2 v) \to (ex2 T (\lambda (t: T).(subst0 i u2 u1 t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u t u0))))))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (subst0 (s k i) v t0 t3)).(\lambda (H3: ((\forall (u1: T).(\forall (u: T).(\forall (i0: nat).((subst0 i0 u u1 v) \to (ex2 T (\lambda (t: T).(subst0 (s k i) u1 t0 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k i))) u t t3))))))))).(\lambda (u3: T).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H4: (subst0 i0 u u3 v)).(ex2_ind T (\lambda (t: T).(subst0 (s k i) u3 t0 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k i))) u t t3)) (ex2 T (\lambda (t: T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u t (THead k u0 t3)))) (\lambda (x: T).(\lambda (H5: (subst0 (s k i) u3 t0 x)).(\lambda (H6: (subst0 (S (plus i0 (s k i))) u x t3)).(ex2_ind T (\lambda (t: T).(subst0 i u3 u1 t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u t u0)) (ex2 T (\lambda (t: T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u t (THead k u0 t3)))) (\lambda (x0: T).(\lambda (H7: (subst0 i u3 u1 x0)).(\lambda (H8: (subst0 (S (plus i0 i)) u x0 u0)).(let H9 \def (eq_ind_r nat (plus i0 (s k i)) (\lambda (n: nat).(subst0 (S n) u x t3)) H6 (s k (plus i0 i)) (s_plus_sym k i0 i)) in (let H10 \def (eq_ind_r nat (S (s k (plus i0 i))) (\lambda (n: nat).(subst0 n u x t3)) H9 (s k (S (plus i0 i))) (s_S k (plus i0 i))) in (ex_intro2 T (\lambda (t: T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u t (THead k u0 t3))) (THead k x0 x) (subst0_both u3 u1 x0 i H7 k t0 x H5) (subst0_both u x0 u0 (S (plus i0 i)) H8 k x t3 H10))))))) (H1 u3 u i0 H4))))) (H3 u3 u i0 H4))))))))))))))))) j u2 t1 t2 H))))). + +theorem subst0_subst0_back: + \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst0 j u2 t1 t2) \to (\forall (u1: T).(\forall (u: T).(\forall (i: nat).((subst0 i u u2 u1) \to (ex2 T (\lambda (t: T).(subst0 j u1 t1 t)) (\lambda (t: T).(subst0 (S (plus i j)) u t2 t))))))))))) +\def + \lambda (t1: T).(\lambda (t2: T).(\lambda (u2: T).(\lambda (j: nat).(\lambda (H: (subst0 j u2 t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t3: T).(\forall (u1: T).(\forall (u: T).(\forall (i: nat).((subst0 i u t u1) \to (ex2 T (\lambda (t4: T).(subst0 n u1 t0 t4)) (\lambda (t4: T).(subst0 (S (plus i n)) u t3 t4))))))))))) (\lambda (v: T).(\lambda (i: nat).(\lambda (u1: T).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H0: (subst0 i0 u v u1)).(eq_ind nat (plus i0 (S i)) (\lambda (n: nat).(ex2 T (\lambda (t: T).(subst0 i u1 (TLRef i) t)) (\lambda (t: T).(subst0 n u (lift (S i) O v) t)))) (ex_intro2 T (\lambda (t: T).(subst0 i u1 (TLRef i) t)) (\lambda (t: T).(subst0 (plus i0 (S i)) u (lift (S i) O v) t)) (lift (S i) O u1) (subst0_lref u1 i) (subst0_lift_ge v u1 u i0 (S i) H0 O (le_O_n i0))) (S (plus i0 i)) (sym_eq nat (S (plus i0 i)) (plus i0 (S i)) (plus_n_Sm i0 i))))))))) (\lambda (v: T).(\lambda (u0: T).(\lambda (u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 u0)).(\lambda (H1: ((\forall (u2: T).(\forall (u: T).(\forall (i0: nat).((subst0 i0 u v u2) \to (ex2 T (\lambda (t: T).(subst0 i u2 u1 t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u u0 t))))))))).(\lambda (t: T).(\lambda (k: K).(\lambda (u3: T).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H2: (subst0 i0 u v u3)).(ex2_ind T (\lambda (t0: T).(subst0 i u3 u1 t0)) (\lambda (t0: T).(subst0 (S (plus i0 i)) u u0 t0)) (ex2 T (\lambda (t0: T).(subst0 i u3 (THead k u1 t) t0)) (\lambda (t0: T).(subst0 (S (plus i0 i)) u (THead k u0 t) t0))) (\lambda (x: T).(\lambda (H3: (subst0 i u3 u1 x)).(\lambda (H4: (subst0 (S (plus i0 i)) u u0 x)).(ex_intro2 T (\lambda (t0: T).(subst0 i u3 (THead k u1 t) t0)) (\lambda (t0: T).(subst0 (S (plus i0 i)) u (THead k u0 t) t0)) (THead k x t) (subst0_fst u3 x u1 i H3 t k) (subst0_fst u x u0 (S (plus i0 i)) H4 t k))))) (H1 u3 u i0 H2)))))))))))))) (\lambda (k: K).(\lambda (v: T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i: nat).(\lambda (_: (subst0 (s k i) v t3 t0)).(\lambda (H1: ((\forall (u1: T).(\forall (u: T).(\forall (i0: nat).((subst0 i0 u v u1) \to (ex2 T (\lambda (t: T).(subst0 (s k i) u1 t3 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k i))) u t0 t))))))))).(\lambda (u: T).(\lambda (u1: T).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H2: (subst0 i0 u0 v u1)).(ex2_ind T (\lambda (t: T).(subst0 (s k i) u1 t3 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k i))) u0 t0 t)) (ex2 T (\lambda (t: T).(subst0 i u1 (THead k u t3) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u0 (THead k u t0) t))) (\lambda (x: T).(\lambda (H3: (subst0 (s k i) u1 t3 x)).(\lambda (H4: (subst0 (S (plus i0 (s k i))) u0 t0 x)).(let H5 \def (eq_ind_r nat (plus i0 (s k i)) (\lambda (n: nat).(subst0 (S n) u0 t0 x)) H4 (s k (plus i0 i)) (s_plus_sym k i0 i)) in (let H6 \def (eq_ind_r nat (S (s k (plus i0 i))) (\lambda (n: nat).(subst0 n u0 t0 x)) H5 (s k (S (plus i0 i))) (s_S k (plus i0 i))) in (ex_intro2 T (\lambda (t: T).(subst0 i u1 (THead k u t3) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u0 (THead k u t0) t)) (THead k u x) (subst0_snd k u1 x t3 i H3 u) (subst0_snd k u0 x t0 (S (plus i0 i)) H6 u))))))) (H1 u1 u0 i0 H2)))))))))))))) (\lambda (v: T).(\lambda (u1: T).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 u0)).(\lambda (H1: ((\forall (u2: T).(\forall (u: T).(\forall (i0: nat).((subst0 i0 u v u2) \to (ex2 T (\lambda (t: T).(subst0 i u2 u1 t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u u0 t))))))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (subst0 (s k i) v t0 t3)).(\lambda (H3: ((\forall (u1: T).(\forall (u: T).(\forall (i0: nat).((subst0 i0 u v u1) \to (ex2 T (\lambda (t: T).(subst0 (s k i) u1 t0 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k i))) u t3 t))))))))).(\lambda (u3: T).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H4: (subst0 i0 u v u3)).(ex2_ind T (\lambda (t: T).(subst0 (s k i) u3 t0 t)) (\lambda (t: T).(subst0 (S (plus i0 (s k i))) u t3 t)) (ex2 T (\lambda (t: T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u (THead k u0 t3) t))) (\lambda (x: T).(\lambda (H5: (subst0 (s k i) u3 t0 x)).(\lambda (H6: (subst0 (S (plus i0 (s k i))) u t3 x)).(ex2_ind T (\lambda (t: T).(subst0 i u3 u1 t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u u0 t)) (ex2 T (\lambda (t: T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u (THead k u0 t3) t))) (\lambda (x0: T).(\lambda (H7: (subst0 i u3 u1 x0)).(\lambda (H8: (subst0 (S (plus i0 i)) u u0 x0)).(let H9 \def (eq_ind_r nat (plus i0 (s k i)) (\lambda (n: nat).(subst0 (S n) u t3 x)) H6 (s k (plus i0 i)) (s_plus_sym k i0 i)) in (let H10 \def (eq_ind_r nat (S (s k (plus i0 i))) (\lambda (n: nat).(subst0 n u t3 x)) H9 (s k (S (plus i0 i))) (s_S k (plus i0 i))) in (ex_intro2 T (\lambda (t: T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u (THead k u0 t3) t)) (THead k x0 x) (subst0_both u3 u1 x0 i H7 k t0 x H5) (subst0_both u u0 x0 (S (plus i0 i)) H8 k t3 x H10))))))) (H1 u3 u i0 H4))))) (H3 u3 u i0 H4))))))))))))))))) j u2 t1 t2 H))))). + +theorem subst0_trans: + \forall (t2: T).(\forall (t1: T).(\forall (v: T).(\forall (i: nat).((subst0 i v t1 t2) \to (\forall (t3: T).((subst0 i v t2 t3) \to (subst0 i v t1 t3))))))) +\def + \lambda (t2: T).(\lambda (t1: T).(\lambda (v: T).(\lambda (i: nat).(\lambda (H: (subst0 i v t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t3: T).(\forall (t4: T).((subst0 n t t3 t4) \to (subst0 n t t0 t4))))))) (\lambda (v0: T).(\lambda (i0: nat).(\lambda (t3: T).(\lambda (H0: (subst0 i0 v0 (lift (S i0) O v0) t3)).(subst0_gen_lift_false v0 v0 t3 (S i0) O i0 (le_O_n i0) (le_n (plus O (S i0))) H0 (subst0 i0 v0 (TLRef i0) t3)))))) (\lambda (v0: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: nat).(\lambda (H0: (subst0 i0 v0 u1 u2)).(\lambda (H1: ((\forall (t3: T).((subst0 i0 v0 u2 t3) \to (subst0 i0 v0 u1 t3))))).(\lambda (t: T).(\lambda (k: K).(\lambda (t3: T).(\lambda (H2: (subst0 i0 v0 (THead k u2 t) t3)).(or3_ind (ex2 T (\lambda (u3: T).(eq T t3 (THead k u3 t))) (\lambda (u3: T).(subst0 i0 v0 u2 u3))) (ex2 T (\lambda (t4: T).(eq T t3 (THead k u2 t4))) (\lambda (t4: T).(subst0 (s k i0) v0 t t4))) (ex3_2 T T (\lambda (u3: T).(\lambda (t4: T).(eq T t3 (THead k u3 t4)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s k i0) v0 t t4)))) (subst0 i0 v0 (THead k u1 t) t3) (\lambda (H3: (ex2 T (\lambda (u2: T).(eq T t3 (THead k u2 t))) (\lambda (u3: T).(subst0 i0 v0 u2 u3)))).(ex2_ind T (\lambda (u3: T).(eq T t3 (THead k u3 t))) (\lambda (u3: T).(subst0 i0 v0 u2 u3)) (subst0 i0 v0 (THead k u1 t) t3) (\lambda (x: T).(\lambda (H4: (eq T t3 (THead k x t))).(\lambda (H5: (subst0 i0 v0 u2 x)).(eq_ind_r T (THead k x t) (\lambda (t0: T).(subst0 i0 v0 (THead k u1 t) t0)) (subst0_fst v0 x u1 i0 (H1 x H5) t k) t3 H4)))) H3)) (\lambda (H3: (ex2 T (\lambda (t2: T).(eq T t3 (THead k u2 t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t t2)))).(ex2_ind T (\lambda (t4: T).(eq T t3 (THead k u2 t4))) (\lambda (t4: T).(subst0 (s k i0) v0 t t4)) (subst0 i0 v0 (THead k u1 t) t3) (\lambda (x: T).(\lambda (H4: (eq T t3 (THead k u2 x))).(\lambda (H5: (subst0 (s k i0) v0 t x)).(eq_ind_r T (THead k u2 x) (\lambda (t0: T).(subst0 i0 v0 (THead k u1 t) t0)) (subst0_both v0 u1 u2 i0 H0 k t x H5) t3 H4)))) H3)) (\lambda (H3: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t3 (THead k u2 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i0) v0 t t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t4: T).(eq T t3 (THead k u3 t4)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s k i0) v0 t t4))) (subst0 i0 v0 (THead k u1 t) t3) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t3 (THead k x0 x1))).(\lambda (H5: (subst0 i0 v0 u2 x0)).(\lambda (H6: (subst0 (s k i0) v0 t x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t0: T).(subst0 i0 v0 (THead k u1 t) t0)) (subst0_both v0 u1 x0 i0 (H1 x0 H5) k t x1 H6) t3 H4)))))) H3)) (subst0_gen_head k v0 u2 t t3 i0 H2)))))))))))) (\lambda (k: K).(\lambda (v0: T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i0: nat).(\lambda (H0: (subst0 (s k i0) v0 t3 t0)).(\lambda (H1: ((\forall (t4: T).((subst0 (s k i0) v0 t0 t4) \to (subst0 (s k i0) v0 t3 t4))))).(\lambda (u: T).(\lambda (t4: T).(\lambda (H2: (subst0 i0 v0 (THead k u t0) t4)).(or3_ind (ex2 T (\lambda (u2: T).(eq T t4 (THead k u2 t0))) (\lambda (u2: T).(subst0 i0 v0 u u2))) (ex2 T (\lambda (t5: T).(eq T t4 (THead k u t5))) (\lambda (t5: T).(subst0 (s k i0) v0 t0 t5))) (ex3_2 T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead k u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u u2))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i0) v0 t0 t5)))) (subst0 i0 v0 (THead k u t3) t4) (\lambda (H3: (ex2 T (\lambda (u2: T).(eq T t4 (THead k u2 t0))) (\lambda (u2: T).(subst0 i0 v0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t4 (THead k u2 t0))) (\lambda (u2: T).(subst0 i0 v0 u u2)) (subst0 i0 v0 (THead k u t3) t4) (\lambda (x: T).(\lambda (H4: (eq T t4 (THead k x t0))).(\lambda (H5: (subst0 i0 v0 u x)).(eq_ind_r T (THead k x t0) (\lambda (t: T).(subst0 i0 v0 (THead k u t3) t)) (subst0_both v0 u x i0 H5 k t3 t0 H0) t4 H4)))) H3)) (\lambda (H3: (ex2 T (\lambda (t2: T).(eq T t4 (THead k u t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t0 t2)))).(ex2_ind T (\lambda (t5: T).(eq T t4 (THead k u t5))) (\lambda (t5: T).(subst0 (s k i0) v0 t0 t5)) (subst0 i0 v0 (THead k u t3) t4) (\lambda (x: T).(\lambda (H4: (eq T t4 (THead k u x))).(\lambda (H5: (subst0 (s k i0) v0 t0 x)).(eq_ind_r T (THead k u x) (\lambda (t: T).(subst0 i0 v0 (THead k u t3) t)) (subst0_snd k v0 x t3 i0 (H1 x H5) u) t4 H4)))) H3)) (\lambda (H3: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t4 (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i0) v0 t0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t5: T).(eq T t4 (THead k u2 t5)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u u2))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i0) v0 t0 t5))) (subst0 i0 v0 (THead k u t3) t4) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t4 (THead k x0 x1))).(\lambda (H5: (subst0 i0 v0 u x0)).(\lambda (H6: (subst0 (s k i0) v0 t0 x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t: T).(subst0 i0 v0 (THead k u t3) t)) (subst0_both v0 u x0 i0 H5 k t3 x1 (H1 x1 H6)) t4 H4)))))) H3)) (subst0_gen_head k v0 u t0 t4 i0 H2)))))))))))) (\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda (H0: (subst0 i0 v0 u1 u2)).(\lambda (H1: ((\forall (t3: T).((subst0 i0 v0 u2 t3) \to (subst0 i0 v0 u1 t3))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (H2: (subst0 (s k i0) v0 t0 t3)).(\lambda (H3: ((\forall (t4: T).((subst0 (s k i0) v0 t3 t4) \to (subst0 (s k i0) v0 t0 t4))))).(\lambda (t4: T).(\lambda (H4: (subst0 i0 v0 (THead k u2 t3) t4)).(or3_ind (ex2 T (\lambda (u3: T).(eq T t4 (THead k u3 t3))) (\lambda (u3: T).(subst0 i0 v0 u2 u3))) (ex2 T (\lambda (t5: T).(eq T t4 (THead k u2 t5))) (\lambda (t5: T).(subst0 (s k i0) v0 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 i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i0) v0 t3 t5)))) (subst0 i0 v0 (THead k u1 t0) t4) (\lambda (H5: (ex2 T (\lambda (u2: T).(eq T t4 (THead k u2 t3))) (\lambda (u3: T).(subst0 i0 v0 u2 u3)))).(ex2_ind T (\lambda (u3: T).(eq T t4 (THead k u3 t3))) (\lambda (u3: T).(subst0 i0 v0 u2 u3)) (subst0 i0 v0 (THead k u1 t0) t4) (\lambda (x: T).(\lambda (H6: (eq T t4 (THead k x t3))).(\lambda (H7: (subst0 i0 v0 u2 x)).(eq_ind_r T (THead k x t3) (\lambda (t: T).(subst0 i0 v0 (THead k u1 t0) t)) (subst0_both v0 u1 x i0 (H1 x H7) k t0 t3 H2) t4 H6)))) H5)) (\lambda (H5: (ex2 T (\lambda (t2: T).(eq T t4 (THead k u2 t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t3 t2)))).(ex2_ind T (\lambda (t5: T).(eq T t4 (THead k u2 t5))) (\lambda (t5: T).(subst0 (s k i0) v0 t3 t5)) (subst0 i0 v0 (THead k u1 t0) t4) (\lambda (x: T).(\lambda (H6: (eq T t4 (THead k u2 x))).(\lambda (H7: (subst0 (s k i0) v0 t3 x)).(eq_ind_r T (THead k u2 x) (\lambda (t: T).(subst0 i0 v0 (THead k u1 t0) t)) (subst0_both v0 u1 u2 i0 H0 k t0 x (H3 x H7)) t4 H6)))) H5)) (\lambda (H5: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t4 (THead k u2 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i0) v0 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 i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i0) v0 t3 t5))) (subst0 i0 v0 (THead k u1 t0) t4) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T t4 (THead k x0 x1))).(\lambda (H7: (subst0 i0 v0 u2 x0)).(\lambda (H8: (subst0 (s k i0) v0 t3 x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t: T).(subst0 i0 v0 (THead k u1 t0) t)) (subst0_both v0 u1 x0 i0 (H1 x0 H7) k t0 x1 (H3 x1 H8)) t4 H6)))))) H5)) (subst0_gen_head k v0 u2 t3 t4 i0 H4))))))))))))))) i v t1 t2 H))))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta.ma index d753a1ab3..b281b60b0 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta.ma @@ -53,47 +53,47 @@ definition s: theorem not_abbr_abst: not (eq B Abbr Abst) \def - \lambda (H: (eq B Abbr Abst)).(let H0 \def (eq_ind B Abbr (\lambda (ee: B).(match ee return (\lambda (_: ?).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False])) I Abst H) in (False_ind False H0)). + \lambda (H: (eq B Abbr Abst)).(let H0 \def (eq_ind B Abbr (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False])) I Abst H) in (False_ind False H0)). theorem not_void_abst: not (eq B Void Abst) \def - \lambda (H: (eq B Void Abst)).(let H0 \def (eq_ind B Void (\lambda (ee: B).(match ee return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True])) I Abst H) in (False_ind False H0)). + \lambda (H: (eq B Void Abst)).(let H0 \def (eq_ind B Void (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True])) I Abst H) in (False_ind False H0)). theorem terms_props__bind_dec: \forall (b1: B).(\forall (b2: B).(or (eq B b1 b2) ((eq B b1 b2) \to (\forall (P: Prop).P)))) \def - \lambda (b1: B).(B_ind (\lambda (b: B).(\forall (b2: B).(or (eq B b b2) ((eq B b b2) \to (\forall (P: Prop).P))))) (\lambda (b2: B).(B_ind (\lambda (b: B).(or (eq B Abbr b) ((eq B Abbr b) \to (\forall (P: Prop).P)))) (or_introl (eq B Abbr Abbr) ((eq B Abbr Abbr) \to (\forall (P: Prop).P)) (refl_equal B Abbr)) (or_intror (eq B Abbr Abst) ((eq B Abbr Abst) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abbr Abst)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abbr (\lambda (ee: B).(match ee return (\lambda (_: ?).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False])) I Abst H) in (False_ind P H0))))) (or_intror (eq B Abbr Void) ((eq B Abbr Void) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abbr Void)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abbr (\lambda (ee: B).(match ee return (\lambda (_: ?).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False])) I Void H) in (False_ind P H0))))) b2)) (\lambda (b2: B).(B_ind (\lambda (b: B).(or (eq B Abst b) ((eq B Abst b) \to (\forall (P: Prop).P)))) (or_intror (eq B Abst Abbr) ((eq B Abst Abbr) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abst Abbr)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abst (\lambda (ee: B).(match ee return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False])) I Abbr H) in (False_ind P H0))))) (or_introl (eq B Abst Abst) ((eq B Abst Abst) \to (\forall (P: Prop).P)) (refl_equal B Abst)) (or_intror (eq B Abst Void) ((eq B Abst Void) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abst Void)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abst (\lambda (ee: B).(match ee return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False])) I Void H) in (False_ind P H0))))) b2)) (\lambda (b2: B).(B_ind (\lambda (b: B).(or (eq B Void b) ((eq B Void b) \to (\forall (P: Prop).P)))) (or_intror (eq B Void Abbr) ((eq B Void Abbr) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Void Abbr)).(\lambda (P: Prop).(let H0 \def (eq_ind B Void (\lambda (ee: B).(match ee return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True])) I Abbr H) in (False_ind P H0))))) (or_intror (eq B Void Abst) ((eq B Void Abst) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Void Abst)).(\lambda (P: Prop).(let H0 \def (eq_ind B Void (\lambda (ee: B).(match ee return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True])) I Abst H) in (False_ind P H0))))) (or_introl (eq B Void Void) ((eq B Void Void) \to (\forall (P: Prop).P)) (refl_equal B Void)) b2)) b1). + \lambda (b1: B).(B_ind (\lambda (b: B).(\forall (b2: B).(or (eq B b b2) ((eq B b b2) \to (\forall (P: Prop).P))))) (\lambda (b2: B).(B_ind (\lambda (b: B).(or (eq B Abbr b) ((eq B Abbr b) \to (\forall (P: Prop).P)))) (or_introl (eq B Abbr Abbr) ((eq B Abbr Abbr) \to (\forall (P: Prop).P)) (refl_equal B Abbr)) (or_intror (eq B Abbr Abst) ((eq B Abbr Abst) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abbr Abst)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abbr (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False])) I Abst H) in (False_ind P H0))))) (or_intror (eq B Abbr Void) ((eq B Abbr Void) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abbr Void)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abbr (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False])) I Void H) in (False_ind P H0))))) b2)) (\lambda (b2: B).(B_ind (\lambda (b: B).(or (eq B Abst b) ((eq B Abst b) \to (\forall (P: Prop).P)))) (or_intror (eq B Abst Abbr) ((eq B Abst Abbr) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abst Abbr)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abst (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False])) I Abbr H) in (False_ind P H0))))) (or_introl (eq B Abst Abst) ((eq B Abst Abst) \to (\forall (P: Prop).P)) (refl_equal B Abst)) (or_intror (eq B Abst Void) ((eq B Abst Void) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Abst Void)).(\lambda (P: Prop).(let H0 \def (eq_ind B Abst (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False])) I Void H) in (False_ind P H0))))) b2)) (\lambda (b2: B).(B_ind (\lambda (b: B).(or (eq B Void b) ((eq B Void b) \to (\forall (P: Prop).P)))) (or_intror (eq B Void Abbr) ((eq B Void Abbr) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Void Abbr)).(\lambda (P: Prop).(let H0 \def (eq_ind B Void (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True])) I Abbr H) in (False_ind P H0))))) (or_intror (eq B Void Abst) ((eq B Void Abst) \to (\forall (P: Prop).P)) (\lambda (H: (eq B Void Abst)).(\lambda (P: Prop).(let H0 \def (eq_ind B Void (\lambda (ee: B).(match ee return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True])) I Abst H) in (False_ind P H0))))) (or_introl (eq B Void Void) ((eq B Void Void) \to (\forall (P: Prop).P)) (refl_equal B Void)) b2)) b1). theorem terms_props__flat_dec: \forall (f1: F).(\forall (f2: F).(or (eq F f1 f2) ((eq F f1 f2) \to (\forall (P: Prop).P)))) \def - \lambda (f1: F).(F_ind (\lambda (f: F).(\forall (f2: F).(or (eq F f f2) ((eq F f f2) \to (\forall (P: Prop).P))))) (\lambda (f2: F).(F_ind (\lambda (f: F).(or (eq F Appl f) ((eq F Appl f) \to (\forall (P: Prop).P)))) (or_introl (eq F Appl Appl) ((eq F Appl Appl) \to (\forall (P: Prop).P)) (refl_equal F Appl)) (or_intror (eq F Appl Cast) ((eq F Appl Cast) \to (\forall (P: Prop).P)) (\lambda (H: (eq F Appl Cast)).(\lambda (P: Prop).(let H0 \def (eq_ind F Appl (\lambda (ee: F).(match ee return (\lambda (_: ?).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])) I Cast H) in (False_ind P H0))))) f2)) (\lambda (f2: F).(F_ind (\lambda (f: F).(or (eq F Cast f) ((eq F Cast f) \to (\forall (P: Prop).P)))) (or_intror (eq F Cast Appl) ((eq F Cast Appl) \to (\forall (P: Prop).P)) (\lambda (H: (eq F Cast Appl)).(\lambda (P: Prop).(let H0 \def (eq_ind F Cast (\lambda (ee: F).(match ee return (\lambda (_: ?).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])) I Appl H) in (False_ind P H0))))) (or_introl (eq F Cast Cast) ((eq F Cast Cast) \to (\forall (P: Prop).P)) (refl_equal F Cast)) f2)) f1). + \lambda (f1: F).(F_ind (\lambda (f: F).(\forall (f2: F).(or (eq F f f2) ((eq F f f2) \to (\forall (P: Prop).P))))) (\lambda (f2: F).(F_ind (\lambda (f: F).(or (eq F Appl f) ((eq F Appl f) \to (\forall (P: Prop).P)))) (or_introl (eq F Appl Appl) ((eq F Appl Appl) \to (\forall (P: Prop).P)) (refl_equal F Appl)) (or_intror (eq F Appl Cast) ((eq F Appl Cast) \to (\forall (P: Prop).P)) (\lambda (H: (eq F Appl Cast)).(\lambda (P: Prop).(let H0 \def (eq_ind F Appl (\lambda (ee: F).(match ee return (\lambda (_: F).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])) I Cast H) in (False_ind P H0))))) f2)) (\lambda (f2: F).(F_ind (\lambda (f: F).(or (eq F Cast f) ((eq F Cast f) \to (\forall (P: Prop).P)))) (or_intror (eq F Cast Appl) ((eq F Cast Appl) \to (\forall (P: Prop).P)) (\lambda (H: (eq F Cast Appl)).(\lambda (P: Prop).(let H0 \def (eq_ind F Cast (\lambda (ee: F).(match ee return (\lambda (_: F).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])) I Appl H) in (False_ind P H0))))) (or_introl (eq F Cast Cast) ((eq F Cast Cast) \to (\forall (P: Prop).P)) (refl_equal F Cast)) f2)) f1). theorem terms_props__kind_dec: \forall (k1: K).(\forall (k2: K).(or (eq K k1 k2) ((eq K k1 k2) \to (\forall (P: Prop).P)))) \def - \lambda (k1: K).(K_ind (\lambda (k: K).(\forall (k2: K).(or (eq K k k2) ((eq K k k2) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (k2: K).(K_ind (\lambda (k: K).(or (eq K (Bind b) k) ((eq K (Bind b) k) \to (\forall (P: Prop).P)))) (\lambda (b0: B).(let H_x \def (terms_props__bind_dec b b0) in (let H \def H_x in (or_ind (eq B b b0) ((eq B b b0) \to (\forall (P: Prop).P)) (or (eq K (Bind b) (Bind b0)) ((eq K (Bind b) (Bind b0)) \to (\forall (P: Prop).P))) (\lambda (H0: (eq B b b0)).(eq_ind B b (\lambda (b1: B).(or (eq K (Bind b) (Bind b1)) ((eq K (Bind b) (Bind b1)) \to (\forall (P: Prop).P)))) (or_introl (eq K (Bind b) (Bind b)) ((eq K (Bind b) (Bind b)) \to (\forall (P: Prop).P)) (refl_equal K (Bind b))) b0 H0)) (\lambda (H0: (((eq B b b0) \to (\forall (P: Prop).P)))).(or_intror (eq K (Bind b) (Bind b0)) ((eq K (Bind b) (Bind b0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq K (Bind b) (Bind b0))).(\lambda (P: Prop).(let H2 \def (f_equal K B (\lambda (e: K).(match e return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])) (Bind b) (Bind b0) H1) in (let H3 \def (eq_ind_r B b0 (\lambda (b0: B).((eq B b b0) \to (\forall (P: Prop).P))) H0 b H2) in (H3 (refl_equal B b) P))))))) H)))) (\lambda (f: F).(or_intror (eq K (Bind b) (Flat f)) ((eq K (Bind b) (Flat f)) \to (\forall (P: Prop).P)) (\lambda (H: (eq K (Bind b) (Flat f))).(\lambda (P: Prop).(let H0 \def (eq_ind K (Bind b) (\lambda (ee: K).(match ee return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])) I (Flat f) H) in (False_ind P H0)))))) k2))) (\lambda (f: F).(\lambda (k2: K).(K_ind (\lambda (k: K).(or (eq K (Flat f) k) ((eq K (Flat f) k) \to (\forall (P: Prop).P)))) (\lambda (b: B).(or_intror (eq K (Flat f) (Bind b)) ((eq K (Flat f) (Bind b)) \to (\forall (P: Prop).P)) (\lambda (H: (eq K (Flat f) (Bind b))).(\lambda (P: Prop).(let H0 \def (eq_ind K (Flat f) (\lambda (ee: K).(match ee return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])) I (Bind b) H) in (False_ind P H0)))))) (\lambda (f0: F).(let H_x \def (terms_props__flat_dec f f0) in (let H \def H_x in (or_ind (eq F f f0) ((eq F f f0) \to (\forall (P: Prop).P)) (or (eq K (Flat f) (Flat f0)) ((eq K (Flat f) (Flat f0)) \to (\forall (P: Prop).P))) (\lambda (H0: (eq F f f0)).(eq_ind F f (\lambda (f1: F).(or (eq K (Flat f) (Flat f1)) ((eq K (Flat f) (Flat f1)) \to (\forall (P: Prop).P)))) (or_introl (eq K (Flat f) (Flat f)) ((eq K (Flat f) (Flat f)) \to (\forall (P: Prop).P)) (refl_equal K (Flat f))) f0 H0)) (\lambda (H0: (((eq F f f0) \to (\forall (P: Prop).P)))).(or_intror (eq K (Flat f) (Flat f0)) ((eq K (Flat f) (Flat f0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq K (Flat f) (Flat f0))).(\lambda (P: Prop).(let H2 \def (f_equal K F (\lambda (e: K).(match e return (\lambda (_: ?).F) with [(Bind _) \Rightarrow f | (Flat f) \Rightarrow f])) (Flat f) (Flat f0) H1) in (let H3 \def (eq_ind_r F f0 (\lambda (f0: F).((eq F f f0) \to (\forall (P: Prop).P))) H0 f H2) in (H3 (refl_equal F f) P))))))) H)))) k2))) k1). + \lambda (k1: K).(K_ind (\lambda (k: K).(\forall (k2: K).(or (eq K k k2) ((eq K k k2) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (k2: K).(K_ind (\lambda (k: K).(or (eq K (Bind b) k) ((eq K (Bind b) k) \to (\forall (P: Prop).P)))) (\lambda (b0: B).(let H_x \def (terms_props__bind_dec b b0) in (let H \def H_x in (or_ind (eq B b b0) ((eq B b b0) \to (\forall (P: Prop).P)) (or (eq K (Bind b) (Bind b0)) ((eq K (Bind b) (Bind b0)) \to (\forall (P: Prop).P))) (\lambda (H0: (eq B b b0)).(eq_ind B b (\lambda (b1: B).(or (eq K (Bind b) (Bind b1)) ((eq K (Bind b) (Bind b1)) \to (\forall (P: Prop).P)))) (or_introl (eq K (Bind b) (Bind b)) ((eq K (Bind b) (Bind b)) \to (\forall (P: Prop).P)) (refl_equal K (Bind b))) b0 H0)) (\lambda (H0: (((eq B b b0) \to (\forall (P: Prop).P)))).(or_intror (eq K (Bind b) (Bind b0)) ((eq K (Bind b) (Bind b0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq K (Bind b) (Bind b0))).(\lambda (P: Prop).(let H2 \def (f_equal K B (\lambda (e: K).(match e return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])) (Bind b) (Bind b0) H1) in (let H3 \def (eq_ind_r B b0 (\lambda (b0: B).((eq B b b0) \to (\forall (P: Prop).P))) H0 b H2) in (H3 (refl_equal B b) P))))))) H)))) (\lambda (f: F).(or_intror (eq K (Bind b) (Flat f)) ((eq K (Bind b) (Flat f)) \to (\forall (P: Prop).P)) (\lambda (H: (eq K (Bind b) (Flat f))).(\lambda (P: Prop).(let H0 \def (eq_ind K (Bind b) (\lambda (ee: K).(match ee return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])) I (Flat f) H) in (False_ind P H0)))))) k2))) (\lambda (f: F).(\lambda (k2: K).(K_ind (\lambda (k: K).(or (eq K (Flat f) k) ((eq K (Flat f) k) \to (\forall (P: Prop).P)))) (\lambda (b: B).(or_intror (eq K (Flat f) (Bind b)) ((eq K (Flat f) (Bind b)) \to (\forall (P: Prop).P)) (\lambda (H: (eq K (Flat f) (Bind b))).(\lambda (P: Prop).(let H0 \def (eq_ind K (Flat f) (\lambda (ee: K).(match ee return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])) I (Bind b) H) in (False_ind P H0)))))) (\lambda (f0: F).(let H_x \def (terms_props__flat_dec f f0) in (let H \def H_x in (or_ind (eq F f f0) ((eq F f f0) \to (\forall (P: Prop).P)) (or (eq K (Flat f) (Flat f0)) ((eq K (Flat f) (Flat f0)) \to (\forall (P: Prop).P))) (\lambda (H0: (eq F f f0)).(eq_ind F f (\lambda (f1: F).(or (eq K (Flat f) (Flat f1)) ((eq K (Flat f) (Flat f1)) \to (\forall (P: Prop).P)))) (or_introl (eq K (Flat f) (Flat f)) ((eq K (Flat f) (Flat f)) \to (\forall (P: Prop).P)) (refl_equal K (Flat f))) f0 H0)) (\lambda (H0: (((eq F f f0) \to (\forall (P: Prop).P)))).(or_intror (eq K (Flat f) (Flat f0)) ((eq K (Flat f) (Flat f0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq K (Flat f) (Flat f0))).(\lambda (P: Prop).(let H2 \def (f_equal K F (\lambda (e: K).(match e return (\lambda (_: K).F) with [(Bind _) \Rightarrow f | (Flat f) \Rightarrow f])) (Flat f) (Flat f0) H1) in (let H3 \def (eq_ind_r F f0 (\lambda (f0: F).((eq F f f0) \to (\forall (P: Prop).P))) H0 f H2) in (H3 (refl_equal F f) P))))))) H)))) k2))) k1). theorem term_dec: \forall (t1: T).(\forall (t2: T).(or (eq T t1 t2) ((eq T t1 t2) \to (\forall (P: Prop).P)))) \def - \lambda (t1: T).(T_ind (\lambda (t: T).(\forall (t2: T).(or (eq T t t2) ((eq T t t2) \to (\forall (P: Prop).P))))) (\lambda (n: nat).(\lambda (t2: T).(T_ind (\lambda (t: T).(or (eq T (TSort n) t) ((eq T (TSort n) t) \to (\forall (P: Prop).P)))) (\lambda (n0: nat).(let H_x \def (nat_dec n n0) in (let H \def H_x in (or_ind (eq nat n n0) ((eq nat n n0) \to (\forall (P: Prop).P)) (or (eq T (TSort n) (TSort n0)) ((eq T (TSort n) (TSort n0)) \to (\forall (P: Prop).P))) (\lambda (H0: (eq nat n n0)).(eq_ind nat n (\lambda (n1: nat).(or (eq T (TSort n) (TSort n1)) ((eq T (TSort n) (TSort n1)) \to (\forall (P: Prop).P)))) (or_introl (eq T (TSort n) (TSort n)) ((eq T (TSort n) (TSort n)) \to (\forall (P: Prop).P)) (refl_equal T (TSort n))) n0 H0)) (\lambda (H0: (((eq nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TSort n) (TSort n0)) ((eq T (TSort n) (TSort n0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TSort n) (TSort n0))).(\lambda (P: Prop).(let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort n) \Rightarrow n | (TLRef _) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TSort n) (TSort n0) H1) in (let H3 \def (eq_ind_r nat n0 (\lambda (n0: nat).((eq nat n n0) \to (\forall (P: Prop).P))) H0 n H2) in (H3 (refl_equal nat n) P))))))) H)))) (\lambda (n0: nat).(or_intror (eq T (TSort n) (TLRef n0)) ((eq T (TSort n) (TLRef n0)) \to (\forall (P: Prop).P)) (\lambda (H: (eq T (TSort n) (TLRef n0))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef n0) H) in (False_ind P H0)))))) (\lambda (k: K).(\lambda (t: T).(\lambda (_: (or (eq T (TSort n) t) ((eq T (TSort n) t) \to (\forall (P: Prop).P)))).(\lambda (t0: T).(\lambda (_: (or (eq T (TSort n) t0) ((eq T (TSort n) t0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TSort n) (THead k t t0)) ((eq T (TSort n) (THead k t t0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TSort n) (THead k t t0))).(\lambda (P: Prop).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead k t t0) H1) in (False_ind P H2)))))))))) t2))) (\lambda (n: nat).(\lambda (t2: T).(T_ind (\lambda (t: T).(or (eq T (TLRef n) t) ((eq T (TLRef n) t) \to (\forall (P: Prop).P)))) (\lambda (n0: nat).(or_intror (eq T (TLRef n) (TSort n0)) ((eq T (TLRef n) (TSort n0)) \to (\forall (P: Prop).P)) (\lambda (H: (eq T (TLRef n) (TSort n0))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n0) H) in (False_ind P H0)))))) (\lambda (n0: nat).(let H_x \def (nat_dec n n0) in (let H \def H_x in (or_ind (eq nat n n0) ((eq nat n n0) \to (\forall (P: Prop).P)) (or (eq T (TLRef n) (TLRef n0)) ((eq T (TLRef n) (TLRef n0)) \to (\forall (P: Prop).P))) (\lambda (H0: (eq nat n n0)).(eq_ind nat n (\lambda (n1: nat).(or (eq T (TLRef n) (TLRef n1)) ((eq T (TLRef n) (TLRef n1)) \to (\forall (P: Prop).P)))) (or_introl (eq T (TLRef n) (TLRef n)) ((eq T (TLRef n) (TLRef n)) \to (\forall (P: Prop).P)) (refl_equal T (TLRef n))) n0 H0)) (\lambda (H0: (((eq nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TLRef n) (TLRef n0)) ((eq T (TLRef n) (TLRef n0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TLRef n) (TLRef n0))).(\lambda (P: Prop).(let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow n | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef n0) H1) in (let H3 \def (eq_ind_r nat n0 (\lambda (n0: nat).((eq nat n n0) \to (\forall (P: Prop).P))) H0 n H2) in (H3 (refl_equal nat n) P))))))) H)))) (\lambda (k: K).(\lambda (t: T).(\lambda (_: (or (eq T (TLRef n) t) ((eq T (TLRef n) t) \to (\forall (P: Prop).P)))).(\lambda (t0: T).(\lambda (_: (or (eq T (TLRef n) t0) ((eq T (TLRef n) t0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TLRef n) (THead k t t0)) ((eq T (TLRef n) (THead k t t0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TLRef n) (THead k t t0))).(\lambda (P: Prop).(let H2 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k t t0) H1) in (False_ind P H2)))))))))) t2))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: ((\forall (t2: T).(or (eq T t t2) ((eq T t t2) \to (\forall (P: Prop).P)))))).(\lambda (t0: T).(\lambda (H0: ((\forall (t2: T).(or (eq T t0 t2) ((eq T t0 t2) \to (\forall (P: Prop).P)))))).(\lambda (t2: T).(T_ind (\lambda (t3: T).(or (eq T (THead k t t0) t3) ((eq T (THead k t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(or_intror (eq T (THead k t t0) (TSort n)) ((eq T (THead k t t0) (TSort n)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (THead k t t0) (TSort n))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead k t t0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H1) in (False_ind P H2)))))) (\lambda (n: nat).(or_intror (eq T (THead k t t0) (TLRef n)) ((eq T (THead k t t0) (TLRef n)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (THead k t t0) (TLRef n))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead k t t0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind P H2)))))) (\lambda (k0: K).(\lambda (t3: T).(\lambda (H1: (or (eq T (THead k t t0) t3) ((eq T (THead k t t0) t3) \to (\forall (P: Prop).P)))).(\lambda (t4: T).(\lambda (H2: (or (eq T (THead k t t0) t4) ((eq T (THead k t t0) t4) \to (\forall (P: Prop).P)))).(let H_x \def (H t3) in (let H3 \def H_x in (or_ind (eq T t t3) ((eq T t t3) \to (\forall (P: Prop).P)) (or (eq T (THead k t t0) (THead k0 t3 t4)) ((eq T (THead k t t0) (THead k0 t3 t4)) \to (\forall (P: Prop).P))) (\lambda (H4: (eq T t t3)).(let H5 \def (eq_ind_r T t3 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H1 t H4) in (eq_ind T t (\lambda (t5: T).(or (eq T (THead k t t0) (THead k0 t5 t4)) ((eq T (THead k t t0) (THead k0 t5 t4)) \to (\forall (P: Prop).P)))) (let H_x0 \def (H0 t4) in (let H6 \def H_x0 in (or_ind (eq T t0 t4) ((eq T t0 t4) \to (\forall (P: Prop).P)) (or (eq T (THead k t t0) (THead k0 t t4)) ((eq T (THead k t t0) (THead k0 t t4)) \to (\forall (P: Prop).P))) (\lambda (H7: (eq T t0 t4)).(let H8 \def (eq_ind_r T t4 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H2 t0 H7) in (eq_ind T t0 (\lambda (t5: T).(or (eq T (THead k t t0) (THead k0 t t5)) ((eq T (THead k t t0) (THead k0 t t5)) \to (\forall (P: Prop).P)))) (let H_x1 \def (terms_props__kind_dec k k0) in (let H9 \def H_x1 in (or_ind (eq K k k0) ((eq K k k0) \to (\forall (P: Prop).P)) (or (eq T (THead k t t0) (THead k0 t t0)) ((eq T (THead k t t0) (THead k0 t t0)) \to (\forall (P: Prop).P))) (\lambda (H10: (eq K k k0)).(eq_ind K k (\lambda (k1: K).(or (eq T (THead k t t0) (THead k1 t t0)) ((eq T (THead k t t0) (THead k1 t t0)) \to (\forall (P: Prop).P)))) (or_introl (eq T (THead k t t0) (THead k t t0)) ((eq T (THead k t t0) (THead k t t0)) \to (\forall (P: Prop).P)) (refl_equal T (THead k t t0))) k0 H10)) (\lambda (H10: (((eq K k k0) \to (\forall (P: Prop).P)))).(or_intror (eq T (THead k t t0) (THead k0 t t0)) ((eq T (THead k t t0) (THead k0 t t0)) \to (\forall (P: Prop).P)) (\lambda (H11: (eq T (THead k t t0) (THead k0 t t0))).(\lambda (P: Prop).(let H12 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k t t0) (THead k0 t t0) H11) in (let H13 \def (eq_ind_r K k0 (\lambda (k0: K).((eq K k k0) \to (\forall (P: Prop).P))) H10 k H12) in (H13 (refl_equal K k) P))))))) H9))) t4 H7))) (\lambda (H7: (((eq T t0 t4) \to (\forall (P: Prop).P)))).(or_intror (eq T (THead k t t0) (THead k0 t t4)) ((eq T (THead k t t0) (THead k0 t t4)) \to (\forall (P: Prop).P)) (\lambda (H8: (eq T (THead k t t0) (THead k0 t t4))).(\lambda (P: Prop).(let H9 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k t t0) (THead k0 t t4) H8) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k t t0) (THead k0 t t4) H8) in (\lambda (_: (eq K k k0)).(let H12 \def (eq_ind_r T t4 (\lambda (t: T).((eq T t0 t) \to (\forall (P: Prop).P))) H7 t0 H10) in (let H13 \def (eq_ind_r T t4 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H2 t0 H10) in (H12 (refl_equal T t0) P))))) H9)))))) H6))) t3 H4))) (\lambda (H4: (((eq T t t3) \to (\forall (P: Prop).P)))).(or_intror (eq T (THead k t t0) (THead k0 t3 t4)) ((eq T (THead k t t0) (THead k0 t3 t4)) \to (\forall (P: Prop).P)) (\lambda (H5: (eq T (THead k t t0) (THead k0 t3 t4))).(\lambda (P: Prop).(let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k t t0) (THead k0 t3 t4) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead k t t0) (THead k0 t3 t4) H5) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k t t0) (THead k0 t3 t4) H5) in (\lambda (H9: (eq T t t3)).(\lambda (_: (eq K k k0)).(let H11 \def (eq_ind_r T t4 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H2 t0 H8) in (let H12 \def (eq_ind_r T t3 (\lambda (t0: T).((eq T t t0) \to (\forall (P: Prop).P))) H4 t H9) in (let H13 \def (eq_ind_r T t3 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H1 t H9) in (H12 (refl_equal T t) P))))))) H7)) H6)))))) H3)))))))) t2))))))) t1). + \lambda (t1: T).(T_ind (\lambda (t: T).(\forall (t2: T).(or (eq T t t2) ((eq T t t2) \to (\forall (P: Prop).P))))) (\lambda (n: nat).(\lambda (t2: T).(T_ind (\lambda (t: T).(or (eq T (TSort n) t) ((eq T (TSort n) t) \to (\forall (P: Prop).P)))) (\lambda (n0: nat).(let H_x \def (nat_dec n n0) in (let H \def H_x in (or_ind (eq nat n n0) ((eq nat n n0) \to (\forall (P: Prop).P)) (or (eq T (TSort n) (TSort n0)) ((eq T (TSort n) (TSort n0)) \to (\forall (P: Prop).P))) (\lambda (H0: (eq nat n n0)).(eq_ind nat n (\lambda (n1: nat).(or (eq T (TSort n) (TSort n1)) ((eq T (TSort n) (TSort n1)) \to (\forall (P: Prop).P)))) (or_introl (eq T (TSort n) (TSort n)) ((eq T (TSort n) (TSort n)) \to (\forall (P: Prop).P)) (refl_equal T (TSort n))) n0 H0)) (\lambda (H0: (((eq nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TSort n) (TSort n0)) ((eq T (TSort n) (TSort n0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TSort n) (TSort n0))).(\lambda (P: Prop).(let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort n) \Rightarrow n | (TLRef _) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TSort n) (TSort n0) H1) in (let H3 \def (eq_ind_r nat n0 (\lambda (n0: nat).((eq nat n n0) \to (\forall (P: Prop).P))) H0 n H2) in (H3 (refl_equal nat n) P))))))) H)))) (\lambda (n0: nat).(or_intror (eq T (TSort n) (TLRef n0)) ((eq T (TSort n) (TLRef n0)) \to (\forall (P: Prop).P)) (\lambda (H: (eq T (TSort n) (TLRef n0))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef n0) H) in (False_ind P H0)))))) (\lambda (k: K).(\lambda (t: T).(\lambda (_: (or (eq T (TSort n) t) ((eq T (TSort n) t) \to (\forall (P: Prop).P)))).(\lambda (t0: T).(\lambda (_: (or (eq T (TSort n) t0) ((eq T (TSort n) t0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TSort n) (THead k t t0)) ((eq T (TSort n) (THead k t t0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TSort n) (THead k t t0))).(\lambda (P: Prop).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead k t t0) H1) in (False_ind P H2)))))))))) t2))) (\lambda (n: nat).(\lambda (t2: T).(T_ind (\lambda (t: T).(or (eq T (TLRef n) t) ((eq T (TLRef n) t) \to (\forall (P: Prop).P)))) (\lambda (n0: nat).(or_intror (eq T (TLRef n) (TSort n0)) ((eq T (TLRef n) (TSort n0)) \to (\forall (P: Prop).P)) (\lambda (H: (eq T (TLRef n) (TSort n0))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n0) H) in (False_ind P H0)))))) (\lambda (n0: nat).(let H_x \def (nat_dec n n0) in (let H \def H_x in (or_ind (eq nat n n0) ((eq nat n n0) \to (\forall (P: Prop).P)) (or (eq T (TLRef n) (TLRef n0)) ((eq T (TLRef n) (TLRef n0)) \to (\forall (P: Prop).P))) (\lambda (H0: (eq nat n n0)).(eq_ind nat n (\lambda (n1: nat).(or (eq T (TLRef n) (TLRef n1)) ((eq T (TLRef n) (TLRef n1)) \to (\forall (P: Prop).P)))) (or_introl (eq T (TLRef n) (TLRef n)) ((eq T (TLRef n) (TLRef n)) \to (\forall (P: Prop).P)) (refl_equal T (TLRef n))) n0 H0)) (\lambda (H0: (((eq nat n n0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TLRef n) (TLRef n0)) ((eq T (TLRef n) (TLRef n0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TLRef n) (TLRef n0))).(\lambda (P: Prop).(let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow n | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef n0) H1) in (let H3 \def (eq_ind_r nat n0 (\lambda (n0: nat).((eq nat n n0) \to (\forall (P: Prop).P))) H0 n H2) in (H3 (refl_equal nat n) P))))))) H)))) (\lambda (k: K).(\lambda (t: T).(\lambda (_: (or (eq T (TLRef n) t) ((eq T (TLRef n) t) \to (\forall (P: Prop).P)))).(\lambda (t0: T).(\lambda (_: (or (eq T (TLRef n) t0) ((eq T (TLRef n) t0) \to (\forall (P: Prop).P)))).(or_intror (eq T (TLRef n) (THead k t t0)) ((eq T (TLRef n) (THead k t t0)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (TLRef n) (THead k t t0))).(\lambda (P: Prop).(let H2 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k t t0) H1) in (False_ind P H2)))))))))) t2))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: ((\forall (t2: T).(or (eq T t t2) ((eq T t t2) \to (\forall (P: Prop).P)))))).(\lambda (t0: T).(\lambda (H0: ((\forall (t2: T).(or (eq T t0 t2) ((eq T t0 t2) \to (\forall (P: Prop).P)))))).(\lambda (t2: T).(T_ind (\lambda (t3: T).(or (eq T (THead k t t0) t3) ((eq T (THead k t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(or_intror (eq T (THead k t t0) (TSort n)) ((eq T (THead k t t0) (TSort n)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (THead k t t0) (TSort n))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead k t t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H1) in (False_ind P H2)))))) (\lambda (n: nat).(or_intror (eq T (THead k t t0) (TLRef n)) ((eq T (THead k t t0) (TLRef n)) \to (\forall (P: Prop).P)) (\lambda (H1: (eq T (THead k t t0) (TLRef n))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead k t t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind P H2)))))) (\lambda (k0: K).(\lambda (t3: T).(\lambda (H1: (or (eq T (THead k t t0) t3) ((eq T (THead k t t0) t3) \to (\forall (P: Prop).P)))).(\lambda (t4: T).(\lambda (H2: (or (eq T (THead k t t0) t4) ((eq T (THead k t t0) t4) \to (\forall (P: Prop).P)))).(let H_x \def (H t3) in (let H3 \def H_x in (or_ind (eq T t t3) ((eq T t t3) \to (\forall (P: Prop).P)) (or (eq T (THead k t t0) (THead k0 t3 t4)) ((eq T (THead k t t0) (THead k0 t3 t4)) \to (\forall (P: Prop).P))) (\lambda (H4: (eq T t t3)).(let H5 \def (eq_ind_r T t3 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H1 t H4) in (eq_ind T t (\lambda (t5: T).(or (eq T (THead k t t0) (THead k0 t5 t4)) ((eq T (THead k t t0) (THead k0 t5 t4)) \to (\forall (P: Prop).P)))) (let H_x0 \def (H0 t4) in (let H6 \def H_x0 in (or_ind (eq T t0 t4) ((eq T t0 t4) \to (\forall (P: Prop).P)) (or (eq T (THead k t t0) (THead k0 t t4)) ((eq T (THead k t t0) (THead k0 t t4)) \to (\forall (P: Prop).P))) (\lambda (H7: (eq T t0 t4)).(let H8 \def (eq_ind_r T t4 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H2 t0 H7) in (eq_ind T t0 (\lambda (t5: T).(or (eq T (THead k t t0) (THead k0 t t5)) ((eq T (THead k t t0) (THead k0 t t5)) \to (\forall (P: Prop).P)))) (let H_x1 \def (terms_props__kind_dec k k0) in (let H9 \def H_x1 in (or_ind (eq K k k0) ((eq K k k0) \to (\forall (P: Prop).P)) (or (eq T (THead k t t0) (THead k0 t t0)) ((eq T (THead k t t0) (THead k0 t t0)) \to (\forall (P: Prop).P))) (\lambda (H10: (eq K k k0)).(eq_ind K k (\lambda (k1: K).(or (eq T (THead k t t0) (THead k1 t t0)) ((eq T (THead k t t0) (THead k1 t t0)) \to (\forall (P: Prop).P)))) (or_introl (eq T (THead k t t0) (THead k t t0)) ((eq T (THead k t t0) (THead k t t0)) \to (\forall (P: Prop).P)) (refl_equal T (THead k t t0))) k0 H10)) (\lambda (H10: (((eq K k k0) \to (\forall (P: Prop).P)))).(or_intror (eq T (THead k t t0) (THead k0 t t0)) ((eq T (THead k t t0) (THead k0 t t0)) \to (\forall (P: Prop).P)) (\lambda (H11: (eq T (THead k t t0) (THead k0 t t0))).(\lambda (P: Prop).(let H12 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k t t0) (THead k0 t t0) H11) in (let H13 \def (eq_ind_r K k0 (\lambda (k0: K).((eq K k k0) \to (\forall (P: Prop).P))) H10 k H12) in (H13 (refl_equal K k) P))))))) H9))) t4 H7))) (\lambda (H7: (((eq T t0 t4) \to (\forall (P: Prop).P)))).(or_intror (eq T (THead k t t0) (THead k0 t t4)) ((eq T (THead k t t0) (THead k0 t t4)) \to (\forall (P: Prop).P)) (\lambda (H8: (eq T (THead k t t0) (THead k0 t t4))).(\lambda (P: Prop).(let H9 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k t t0) (THead k0 t t4) H8) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k t t0) (THead k0 t t4) H8) in (\lambda (_: (eq K k k0)).(let H12 \def (eq_ind_r T t4 (\lambda (t: T).((eq T t0 t) \to (\forall (P: Prop).P))) H7 t0 H10) in (let H13 \def (eq_ind_r T t4 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H2 t0 H10) in (H12 (refl_equal T t0) P))))) H9)))))) H6))) t3 H4))) (\lambda (H4: (((eq T t t3) \to (\forall (P: Prop).P)))).(or_intror (eq T (THead k t t0) (THead k0 t3 t4)) ((eq T (THead k t t0) (THead k0 t3 t4)) \to (\forall (P: Prop).P)) (\lambda (H5: (eq T (THead k t t0) (THead k0 t3 t4))).(\lambda (P: Prop).(let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k t t0) (THead k0 t3 t4) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead k t t0) (THead k0 t3 t4) H5) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k t t0) (THead k0 t3 t4) H5) in (\lambda (H9: (eq T t t3)).(\lambda (_: (eq K k k0)).(let H11 \def (eq_ind_r T t4 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H2 t0 H8) in (let H12 \def (eq_ind_r T t3 (\lambda (t0: T).((eq T t t0) \to (\forall (P: Prop).P))) H4 t H9) in (let H13 \def (eq_ind_r T t3 (\lambda (t1: T).(or (eq T (THead k t t0) t1) ((eq T (THead k t t0) t1) \to (\forall (P: Prop).P)))) H1 t H9) in (H12 (refl_equal T t) P))))))) H7)) H6)))))) H3)))))))) t2))))))) t1). theorem binder_dec: \forall (t: T).(or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) \def - \lambda (t: T).(T_ind (\lambda (t0: T).(or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))) (\lambda (n: nat).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (TSort n) (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (TSort n) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(\lambda (H: (eq T (TSort n) (THead (Bind b) w u))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) w u) H) in (False_ind P H0))))))))) (\lambda (n: nat).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (TLRef n) (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (TLRef n) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(\lambda (H: (eq T (TLRef n) (THead (Bind b) w u))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) w u) H) in (False_ind P H0))))))))) (\lambda (k: K).(match k return (\lambda (_: ?).(\lambda (k0: K).(\forall (t0: T).((or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (\forall (t1: T).((or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead k0 t0 t1) (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (THead k0 t0 t1) (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))))))))) with [(Bind b) \Rightarrow (\lambda (t0: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(or_introl (ex_3 B T T (\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u)))))) (\forall (b0: B).(\forall (w: T).(\forall (u: T).((eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u)) \to (\forall (P: Prop).P))))) (ex_3_intro B T T (\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u))))) b t0 t1 (refl_equal T (THead (Bind b) t0 t1)))))))) | (Flat f) \Rightarrow (\lambda (t0: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Flat f) t0 t1) (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (THead (Flat f) t0 t1) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(\lambda (H1: (eq T (THead (Flat f) t0 t1) (THead (Bind b) w u))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead (Flat f) t0 t1) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) w u) H1) in (False_ind P H2))))))))))))])) t). + \lambda (t: T).(T_ind (\lambda (t0: T).(or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))) (\lambda (n: nat).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (TSort n) (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (TSort n) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(\lambda (H: (eq T (TSort n) (THead (Bind b) w u))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) w u) H) in (False_ind P H0))))))))) (\lambda (n: nat).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (TLRef n) (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (TLRef n) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(\lambda (H: (eq T (TLRef n) (THead (Bind b) w u))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) w u) H) in (False_ind P H0))))))))) (\lambda (k: K).(match k return (\lambda (k0: K).(\forall (t0: T).((or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (\forall (t1: T).((or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) \to (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead k0 t0 t1) (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (THead k0 t0 t1) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))))))) with [(Bind b) \Rightarrow (\lambda (t0: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(or_introl (ex_3 B T T (\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u)))))) (\forall (b0: B).(\forall (w: T).(\forall (u: T).((eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u)) \to (\forall (P: Prop).P))))) (ex_3_intro B T T (\lambda (b0: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b0) w u))))) b t0 t1 (refl_equal T (THead (Bind b) t0 t1)))))))) | (Flat f) \Rightarrow (\lambda (t0: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (_: (or (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t1 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t1 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(or_intror (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T (THead (Flat f) t0 t1) (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T (THead (Flat f) t0 t1) (THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(\lambda (H1: (eq T (THead (Flat f) t0 t1) (THead (Bind b) w u))).(\lambda (P: Prop).(let H2 \def (eq_ind T (THead (Flat f) t0 t1) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) w u) H1) in (False_ind P H2))))))))))))])) t). theorem abst_dec: \forall (u: T).(\forall (v: T).(or (ex T (\lambda (t: T).(eq T u (THead (Bind Abst) v t)))) (\forall (t: T).((eq T u (THead (Bind Abst) v t)) \to (\forall (P: Prop).P))))) \def - \lambda (u: T).(match u return (\lambda (_: ?).(\lambda (t: T).(\forall (v: T).(or (ex T (\lambda (t0: T).(eq T t (THead (Bind Abst) v t0)))) (\forall (t0: T).((eq T t (THead (Bind Abst) v t0)) \to (\forall (P: Prop).P))))))) with [(TSort n) \Rightarrow (\lambda (v: T).(or_intror (ex T (\lambda (t: T).(eq T (TSort n) (THead (Bind Abst) v t)))) (\forall (t: T).((eq T (TSort n) (THead (Bind Abst) v t)) \to (\forall (P: Prop).P))) (\lambda (t: T).(\lambda (H: (eq T (TSort n) (THead (Bind Abst) v t))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) v t) H) in (False_ind P H0))))))) | (TLRef n) \Rightarrow (\lambda (v: T).(or_intror (ex T (\lambda (t: T).(eq T (TLRef n) (THead (Bind Abst) v t)))) (\forall (t: T).((eq T (TLRef n) (THead (Bind Abst) v t)) \to (\forall (P: Prop).P))) (\lambda (t: T).(\lambda (H: (eq T (TLRef n) (THead (Bind Abst) v t))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) v t) H) in (False_ind P H0))))))) | (THead k t t0) \Rightarrow (\lambda (v: T).(let H_x \def (terms_props__kind_dec k (Bind Abst)) in (let H \def H_x in (or_ind (eq K k (Bind Abst)) ((eq K k (Bind Abst)) \to (\forall (P: Prop).P)) (or (ex T (\lambda (t1: T).(eq T (THead k t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P)))) (\lambda (H0: (eq K k (Bind Abst))).(eq_ind_r K (Bind Abst) (\lambda (k0: K).(or (ex T (\lambda (t1: T).(eq T (THead k0 t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k0 t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))))) (let H_x0 \def (term_dec t v) in (let H1 \def H_x0 in (or_ind (eq T t v) ((eq T t v) \to (\forall (P: Prop).P)) (or (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P)))) (\lambda (H2: (eq T t v)).(eq_ind T t (\lambda (t1: T).(or (ex T (\lambda (t2: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t1 t2)))) (\forall (t2: T).((eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t1 t2)) \to (\forall (P: Prop).P))))) (or_introl (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t t1)) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t t1))) t0 (refl_equal T (THead (Bind Abst) t t0)))) v H2)) (\lambda (H2: (((eq T t v) \to (\forall (P: Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))) (\lambda (t1: T).(\lambda (H3: (eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1))).(\lambda (P: Prop).(let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead (Bind Abst) t t0) (THead (Bind Abst) v t1) H3) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abst) t t0) (THead (Bind Abst) v t1) H3) in (\lambda (H6: (eq T t v)).(H2 H6 P))) H4))))))) H1))) k H0)) (\lambda (H0: (((eq K k (Bind Abst)) \to (\forall (P: Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead k t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))) (\lambda (t1: T).(\lambda (H1: (eq T (THead k t t0) (THead (Bind Abst) v t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k t t0) (THead (Bind Abst) v t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead k t t0) (THead (Bind Abst) v t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k t t0) (THead (Bind Abst) v t1) H1) in (\lambda (_: (eq T t v)).(\lambda (H6: (eq K k (Bind Abst))).(H0 H6 P)))) H3)) H2))))))) H))))]). + \lambda (u: T).(match u return (\lambda (t: T).(\forall (v: T).(or (ex T (\lambda (t0: T).(eq T t (THead (Bind Abst) v t0)))) (\forall (t0: T).((eq T t (THead (Bind Abst) v t0)) \to (\forall (P: Prop).P)))))) with [(TSort n) \Rightarrow (\lambda (v: T).(or_intror (ex T (\lambda (t: T).(eq T (TSort n) (THead (Bind Abst) v t)))) (\forall (t: T).((eq T (TSort n) (THead (Bind Abst) v t)) \to (\forall (P: Prop).P))) (\lambda (t: T).(\lambda (H: (eq T (TSort n) (THead (Bind Abst) v t))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) v t) H) in (False_ind P H0))))))) | (TLRef n) \Rightarrow (\lambda (v: T).(or_intror (ex T (\lambda (t: T).(eq T (TLRef n) (THead (Bind Abst) v t)))) (\forall (t: T).((eq T (TLRef n) (THead (Bind Abst) v t)) \to (\forall (P: Prop).P))) (\lambda (t: T).(\lambda (H: (eq T (TLRef n) (THead (Bind Abst) v t))).(\lambda (P: Prop).(let H0 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) v t) H) in (False_ind P H0))))))) | (THead k t t0) \Rightarrow (\lambda (v: T).(let H_x \def (terms_props__kind_dec k (Bind Abst)) in (let H \def H_x in (or_ind (eq K k (Bind Abst)) ((eq K k (Bind Abst)) \to (\forall (P: Prop).P)) (or (ex T (\lambda (t1: T).(eq T (THead k t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P)))) (\lambda (H0: (eq K k (Bind Abst))).(eq_ind_r K (Bind Abst) (\lambda (k0: K).(or (ex T (\lambda (t1: T).(eq T (THead k0 t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k0 t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))))) (let H_x0 \def (term_dec t v) in (let H1 \def H_x0 in (or_ind (eq T t v) ((eq T t v) \to (\forall (P: Prop).P)) (or (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P)))) (\lambda (H2: (eq T t v)).(eq_ind T t (\lambda (t1: T).(or (ex T (\lambda (t2: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t1 t2)))) (\forall (t2: T).((eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t1 t2)) \to (\forall (P: Prop).P))))) (or_introl (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t t1)) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t t1))) t0 (refl_equal T (THead (Bind Abst) t t0)))) v H2)) (\lambda (H2: (((eq T t v) \to (\forall (P: Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))) (\lambda (t1: T).(\lambda (H3: (eq T (THead (Bind Abst) t t0) (THead (Bind Abst) v t1))).(\lambda (P: Prop).(let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead (Bind Abst) t t0) (THead (Bind Abst) v t1) H3) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abst) t t0) (THead (Bind Abst) v t1) H3) in (\lambda (H6: (eq T t v)).(H2 H6 P))) H4))))))) H1))) k H0)) (\lambda (H0: (((eq K k (Bind Abst)) \to (\forall (P: Prop).P)))).(or_intror (ex T (\lambda (t1: T).(eq T (THead k t t0) (THead (Bind Abst) v t1)))) (\forall (t1: T).((eq T (THead k t t0) (THead (Bind Abst) v t1)) \to (\forall (P: Prop).P))) (\lambda (t1: T).(\lambda (H1: (eq T (THead k t t0) (THead (Bind Abst) v t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k t t0) (THead (Bind Abst) v t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead k t t0) (THead (Bind Abst) v t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k t t0) (THead (Bind Abst) v t1) H1) in (\lambda (_: (eq T t v)).(\lambda (H6: (eq K k (Bind Abst))).(H0 H6 P)))) H3)) H2))))))) H))))]). theorem thead_x_y_y: \forall (k: K).(\forall (v: T).(\forall (t: T).((eq T (THead k v t) t) \to (\forall (P: Prop).P)))) \def - \lambda (k: K).(\lambda (v: T).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (THead k v t0) t0) \to (\forall (P: Prop).P))) (\lambda (n: nat).(\lambda (H: (eq T (THead k v (TSort n)) (TSort n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (TSort n)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H) in (False_ind P H0))))) (\lambda (n: nat).(\lambda (H: (eq T (THead k v (TLRef n)) (TLRef n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (TLRef n)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H) in (False_ind P H0))))) (\lambda (k0: K).(\lambda (t0: T).(\lambda (_: (((eq T (THead k v t0) t0) \to (\forall (P: Prop).P)))).(\lambda (t1: T).(\lambda (H0: (((eq T (THead k v t1) t1) \to (\forall (P: Prop).P)))).(\lambda (H1: (eq T (THead k v (THead k0 t0 t1)) (THead k0 t0 t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v | (TLRef _) \Rightarrow v | (THead _ t _) \Rightarrow t])) (THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow (THead k0 t0 t1) | (TLRef _) \Rightarrow (THead k0 t0 t1) | (THead _ _ t) \Rightarrow t])) (THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in (\lambda (H5: (eq T v t0)).(\lambda (H6: (eq K k k0)).(let H7 \def (eq_ind T v (\lambda (t: T).((eq T (THead k t t1) t1) \to (\forall (P: Prop).P))) H0 t0 H5) in (let H8 \def (eq_ind K k (\lambda (k: K).((eq T (THead k t0 t1) t1) \to (\forall (P: Prop).P))) H7 k0 H6) in (H8 H4 P)))))) H3)) H2))))))))) t))). + \lambda (k: K).(\lambda (v: T).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (THead k v t0) t0) \to (\forall (P: Prop).P))) (\lambda (n: nat).(\lambda (H: (eq T (THead k v (TSort n)) (TSort n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (TSort n)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H) in (False_ind P H0))))) (\lambda (n: nat).(\lambda (H: (eq T (THead k v (TLRef n)) (TLRef n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (TLRef n)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H) in (False_ind P H0))))) (\lambda (k0: K).(\lambda (t0: T).(\lambda (_: (((eq T (THead k v t0) t0) \to (\forall (P: Prop).P)))).(\lambda (t1: T).(\lambda (H0: (((eq T (THead k v t1) t1) \to (\forall (P: Prop).P)))).(\lambda (H1: (eq T (THead k v (THead k0 t0 t1)) (THead k0 t0 t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v | (TLRef _) \Rightarrow v | (THead _ t _) \Rightarrow t])) (THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead k0 t0 t1) | (TLRef _) \Rightarrow (THead k0 t0 t1) | (THead _ _ t) \Rightarrow t])) (THead k v (THead k0 t0 t1)) (THead k0 t0 t1) H1) in (\lambda (H5: (eq T v t0)).(\lambda (H6: (eq K k k0)).(let H7 \def (eq_ind T v (\lambda (t: T).((eq T (THead k t t1) t1) \to (\forall (P: Prop).P))) H0 t0 H5) in (let H8 \def (eq_ind K k (\lambda (k: K).((eq T (THead k t0 t1) t1) \to (\forall (P: Prop).P))) H7 k0 H6) in (H8 H4 P)))))) H3)) H2))))))))) t))). theorem s_S: \forall (k: K).(\forall (i: nat).(eq nat (s k (S i)) (S (s k i)))) @@ -233,17 +233,17 @@ inductive iso: T \to (T \to Prop) \def theorem iso_flats_lref_bind_false: \forall (f: F).(\forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall (t: T).(\forall (vs: TList).((iso (THeads (Flat f) vs (TLRef i)) (THead (Bind b) v t)) \to (\forall (P: Prop).P))))))) \def - \lambda (f: F).(\lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda (t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: TList).((iso (THeads (Flat f) t0 (TLRef i)) (THead (Bind b) v t)) \to (\forall (P: Prop).P))) (\lambda (H: (iso (TLRef i) (THead (Bind b) v t))).(\lambda (P: Prop).(let H0 \def (match H return (\lambda (_: ?).(\lambda (t0: T).(\lambda (t1: T).((eq T t0 (TLRef i)) \to ((eq T t1 (THead (Bind b) v t)) \to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq T (TSort n1) (TLRef i))).(\lambda (H1: (eq T (TSort n2) (THead (Bind b) v t))).((let H2 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef i) H0) in (False_ind ((eq T (TSort n2) (THead (Bind b) v t)) \to P) H2)) H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: (eq T (TLRef i1) (TLRef i))).(\lambda (H1: (eq T (TLRef i2) (THead (Bind b) v t))).((let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow i1 | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i1])) (TLRef i1) (TLRef i) H0) in (eq_ind nat i (\lambda (_: nat).((eq T (TLRef i2) (THead (Bind b) v t)) \to P)) (\lambda (H3: (eq T (TLRef i2) (THead (Bind b) v t))).(let H4 \def (eq_ind T (TLRef i2) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) v t) H3) in (False_ind P H4))) i1 (sym_eq nat i1 i H2))) H1))) | (iso_head k v1 v2 t1 t2) \Rightarrow (\lambda (H0: (eq T (THead k v1 t1) (TLRef i))).(\lambda (H1: (eq T (THead k v2 t2) (THead (Bind b) v t))).((let H2 \def (eq_ind T (THead k v1 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i) H0) in (False_ind ((eq T (THead k v2 t2) (THead (Bind b) v t)) \to P) H2)) H1)))]) in (H0 (refl_equal T (TLRef i)) (refl_equal T (THead (Bind b) v t)))))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (_: (((iso (THeads (Flat f) t1 (TLRef i)) (THead (Bind b) v t)) \to (\forall (P: Prop).P)))).(\lambda (H0: (iso (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) (THead (Bind b) v t))).(\lambda (P: Prop).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t2: T).(\lambda (t3: T).((eq T t2 (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i)))) \to ((eq T t3 (THead (Bind b) v t)) \to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H1: (eq T (TSort n1) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))))).(\lambda (H2: (eq T (TSort n2) (THead (Bind b) v t))).((let H3 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) H1) in (False_ind ((eq T (TSort n2) (THead (Bind b) v t)) \to P) H3)) H2))) | (iso_lref i1 i2) \Rightarrow (\lambda (H1: (eq T (TLRef i1) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))))).(\lambda (H2: (eq T (TLRef i2) (THead (Bind b) v t))).((let H3 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) H1) in (False_ind ((eq T (TLRef i2) (THead (Bind b) v t)) \to P) H3)) H2))) | (iso_head k v1 v2 t2 t3) \Rightarrow (\lambda (H1: (eq T (THead k v1 t2) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))))).(\lambda (H2: (eq T (THead k v2 t3) (THead (Bind b) v t))).((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t2 | (TLRef _) \Rightarrow t2 | (THead _ _ t) \Rightarrow t])) (THead k v1 t2) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead k v1 t2) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) H1) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v1 t2) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) H1) in (eq_ind K (Flat f) (\lambda (k0: K).((eq T v1 t0) \to ((eq T t2 (THeads (Flat f) t1 (TLRef i))) \to ((eq T (THead k0 v2 t3) (THead (Bind b) v t)) \to P)))) (\lambda (H6: (eq T v1 t0)).(eq_ind T t0 (\lambda (_: T).((eq T t2 (THeads (Flat f) t1 (TLRef i))) \to ((eq T (THead (Flat f) v2 t3) (THead (Bind b) v t)) \to P))) (\lambda (H7: (eq T t2 (THeads (Flat f) t1 (TLRef i)))).(eq_ind T (THeads (Flat f) t1 (TLRef i)) (\lambda (_: T).((eq T (THead (Flat f) v2 t3) (THead (Bind b) v t)) \to P)) (\lambda (H8: (eq T (THead (Flat f) v2 t3) (THead (Bind b) v t))).(let H9 \def (eq_ind T (THead (Flat f) v2 t3) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) v t) H8) in (False_ind P H9))) t2 (sym_eq T t2 (THeads (Flat f) t1 (TLRef i)) H7))) v1 (sym_eq T v1 t0 H6))) k (sym_eq K k (Flat f) H5))) H4)) H3)) H2)))]) in (H1 (refl_equal T (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i)))) (refl_equal T (THead (Bind b) v t))))))))) vs)))))). + \lambda (f: F).(\lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda (t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: TList).((iso (THeads (Flat f) t0 (TLRef i)) (THead (Bind b) v t)) \to (\forall (P: Prop).P))) (\lambda (H: (iso (TLRef i) (THead (Bind b) v t))).(\lambda (P: Prop).(let H0 \def (match H return (\lambda (t0: T).(\lambda (t1: T).(\lambda (_: (iso t0 t1)).((eq T t0 (TLRef i)) \to ((eq T t1 (THead (Bind b) v t)) \to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq T (TSort n1) (TLRef i))).(\lambda (H1: (eq T (TSort n2) (THead (Bind b) v t))).((let H2 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef i) H0) in (False_ind ((eq T (TSort n2) (THead (Bind b) v t)) \to P) H2)) H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: (eq T (TLRef i1) (TLRef i))).(\lambda (H1: (eq T (TLRef i2) (THead (Bind b) v t))).((let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i1 | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i1])) (TLRef i1) (TLRef i) H0) in (eq_ind nat i (\lambda (_: nat).((eq T (TLRef i2) (THead (Bind b) v t)) \to P)) (\lambda (H3: (eq T (TLRef i2) (THead (Bind b) v t))).(let H4 \def (eq_ind T (TLRef i2) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) v t) H3) in (False_ind P H4))) i1 (sym_eq nat i1 i H2))) H1))) | (iso_head k v1 v2 t1 t2) \Rightarrow (\lambda (H0: (eq T (THead k v1 t1) (TLRef i))).(\lambda (H1: (eq T (THead k v2 t2) (THead (Bind b) v t))).((let H2 \def (eq_ind T (THead k v1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i) H0) in (False_ind ((eq T (THead k v2 t2) (THead (Bind b) v t)) \to P) H2)) H1)))]) in (H0 (refl_equal T (TLRef i)) (refl_equal T (THead (Bind b) v t)))))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (_: (((iso (THeads (Flat f) t1 (TLRef i)) (THead (Bind b) v t)) \to (\forall (P: Prop).P)))).(\lambda (H0: (iso (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) (THead (Bind b) v t))).(\lambda (P: Prop).(let H1 \def (match H0 return (\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (iso t2 t3)).((eq T t2 (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i)))) \to ((eq T t3 (THead (Bind b) v t)) \to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H1: (eq T (TSort n1) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))))).(\lambda (H2: (eq T (TSort n2) (THead (Bind b) v t))).((let H3 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) H1) in (False_ind ((eq T (TSort n2) (THead (Bind b) v t)) \to P) H3)) H2))) | (iso_lref i1 i2) \Rightarrow (\lambda (H1: (eq T (TLRef i1) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))))).(\lambda (H2: (eq T (TLRef i2) (THead (Bind b) v t))).((let H3 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) H1) in (False_ind ((eq T (TLRef i2) (THead (Bind b) v t)) \to P) H3)) H2))) | (iso_head k v1 v2 t2 t3) \Rightarrow (\lambda (H1: (eq T (THead k v1 t2) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))))).(\lambda (H2: (eq T (THead k v2 t3) (THead (Bind b) v t))).((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t2 | (TLRef _) \Rightarrow t2 | (THead _ _ t) \Rightarrow t])) (THead k v1 t2) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead k v1 t2) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) H1) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v1 t2) (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) H1) in (eq_ind K (Flat f) (\lambda (k0: K).((eq T v1 t0) \to ((eq T t2 (THeads (Flat f) t1 (TLRef i))) \to ((eq T (THead k0 v2 t3) (THead (Bind b) v t)) \to P)))) (\lambda (H6: (eq T v1 t0)).(eq_ind T t0 (\lambda (_: T).((eq T t2 (THeads (Flat f) t1 (TLRef i))) \to ((eq T (THead (Flat f) v2 t3) (THead (Bind b) v t)) \to P))) (\lambda (H7: (eq T t2 (THeads (Flat f) t1 (TLRef i)))).(eq_ind T (THeads (Flat f) t1 (TLRef i)) (\lambda (_: T).((eq T (THead (Flat f) v2 t3) (THead (Bind b) v t)) \to P)) (\lambda (H8: (eq T (THead (Flat f) v2 t3) (THead (Bind b) v t))).(let H9 \def (eq_ind T (THead (Flat f) v2 t3) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) v t) H8) in (False_ind P H9))) t2 (sym_eq T t2 (THeads (Flat f) t1 (TLRef i)) H7))) v1 (sym_eq T v1 t0 H6))) k (sym_eq K k (Flat f) H5))) H4)) H3)) H2)))]) in (H1 (refl_equal T (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i)))) (refl_equal T (THead (Bind b) v t))))))))) vs)))))). theorem iso_flats_flat_bind_false: \forall (f1: F).(\forall (f2: F).(\forall (b: B).(\forall (v: T).(\forall (v2: T).(\forall (t: T).(\forall (t2: T).(\forall (vs: TList).((iso (THeads (Flat f1) vs (THead (Flat f2) v2 t2)) (THead (Bind b) v t)) \to (\forall (P: Prop).P))))))))) \def - \lambda (f1: F).(\lambda (f2: F).(\lambda (b: B).(\lambda (v: T).(\lambda (v2: T).(\lambda (t: T).(\lambda (t2: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: TList).((iso (THeads (Flat f1) t0 (THead (Flat f2) v2 t2)) (THead (Bind b) v t)) \to (\forall (P: Prop).P))) (\lambda (H: (iso (THead (Flat f2) v2 t2) (THead (Bind b) v t))).(\lambda (P: Prop).(let H0 \def (match H return (\lambda (_: ?).(\lambda (t0: T).(\lambda (t1: T).((eq T t0 (THead (Flat f2) v2 t2)) \to ((eq T t1 (THead (Bind b) v t)) \to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq T (TSort n1) (THead (Flat f2) v2 t2))).(\lambda (H1: (eq T (TSort n2) (THead (Bind b) v t))).((let H2 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat f2) v2 t2) H0) in (False_ind ((eq T (TSort n2) (THead (Bind b) v t)) \to P) H2)) H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: (eq T (TLRef i1) (THead (Flat f2) v2 t2))).(\lambda (H1: (eq T (TLRef i2) (THead (Bind b) v t))).((let H2 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat f2) v2 t2) H0) in (False_ind ((eq T (TLRef i2) (THead (Bind b) v t)) \to P) H2)) H1))) | (iso_head k v1 v0 t1 t0) \Rightarrow (\lambda (H0: (eq T (THead k v1 t1) (THead (Flat f2) v2 t2))).(\lambda (H1: (eq T (THead k v0 t0) (THead (Bind b) v t))).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k v1 t1) (THead (Flat f2) v2 t2) H0) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead k v1 t1) (THead (Flat f2) v2 t2) H0) in ((let H4 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v1 t1) (THead (Flat f2) v2 t2) H0) in (eq_ind K (Flat f2) (\lambda (k0: K).((eq T v1 v2) \to ((eq T t1 t2) \to ((eq T (THead k0 v0 t0) (THead (Bind b) v t)) \to P)))) (\lambda (H5: (eq T v1 v2)).(eq_ind T v2 (\lambda (_: T).((eq T t1 t2) \to ((eq T (THead (Flat f2) v0 t0) (THead (Bind b) v t)) \to P))) (\lambda (H6: (eq T t1 t2)).(eq_ind T t2 (\lambda (_: T).((eq T (THead (Flat f2) v0 t0) (THead (Bind b) v t)) \to P)) (\lambda (H7: (eq T (THead (Flat f2) v0 t0) (THead (Bind b) v t))).(let H8 \def (eq_ind T (THead (Flat f2) v0 t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) v t) H7) in (False_ind P H8))) t1 (sym_eq T t1 t2 H6))) v1 (sym_eq T v1 v2 H5))) k (sym_eq K k (Flat f2) H4))) H3)) H2)) H1)))]) in (H0 (refl_equal T (THead (Flat f2) v2 t2)) (refl_equal T (THead (Bind b) v t)))))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (_: (((iso (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)) (THead (Bind b) v t)) \to (\forall (P: Prop).P)))).(\lambda (H0: (iso (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) (THead (Bind b) v t))).(\lambda (P: Prop).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t3: T).(\lambda (t4: T).((eq T t3 (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)))) \to ((eq T t4 (THead (Bind b) v t)) \to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H1: (eq T (TSort n1) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))))).(\lambda (H2: (eq T (TSort n2) (THead (Bind b) v t))).((let H3 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in (False_ind ((eq T (TSort n2) (THead (Bind b) v t)) \to P) H3)) H2))) | (iso_lref i1 i2) \Rightarrow (\lambda (H1: (eq T (TLRef i1) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))))).(\lambda (H2: (eq T (TLRef i2) (THead (Bind b) v t))).((let H3 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in (False_ind ((eq T (TLRef i2) (THead (Bind b) v t)) \to P) H3)) H2))) | (iso_head k v1 v0 t3 t4) \Rightarrow (\lambda (H1: (eq T (THead k v1 t3) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))))).(\lambda (H2: (eq T (THead k v0 t4) (THead (Bind b) v t))).((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) (THead k v1 t3) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead k v1 t3) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v1 t3) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in (eq_ind K (Flat f1) (\lambda (k0: K).((eq T v1 t0) \to ((eq T t3 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) \to ((eq T (THead k0 v0 t4) (THead (Bind b) v t)) \to P)))) (\lambda (H6: (eq T v1 t0)).(eq_ind T t0 (\lambda (_: T).((eq T t3 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) \to ((eq T (THead (Flat f1) v0 t4) (THead (Bind b) v t)) \to P))) (\lambda (H7: (eq T t3 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)))).(eq_ind T (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)) (\lambda (_: T).((eq T (THead (Flat f1) v0 t4) (THead (Bind b) v t)) \to P)) (\lambda (H8: (eq T (THead (Flat f1) v0 t4) (THead (Bind b) v t))).(let H9 \def (eq_ind T (THead (Flat f1) v0 t4) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) v t) H8) in (False_ind P H9))) t3 (sym_eq T t3 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)) H7))) v1 (sym_eq T v1 t0 H6))) k (sym_eq K k (Flat f1) H5))) H4)) H3)) H2)))]) in (H1 (refl_equal T (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)))) (refl_equal T (THead (Bind b) v t))))))))) vs)))))))). + \lambda (f1: F).(\lambda (f2: F).(\lambda (b: B).(\lambda (v: T).(\lambda (v2: T).(\lambda (t: T).(\lambda (t2: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: TList).((iso (THeads (Flat f1) t0 (THead (Flat f2) v2 t2)) (THead (Bind b) v t)) \to (\forall (P: Prop).P))) (\lambda (H: (iso (THead (Flat f2) v2 t2) (THead (Bind b) v t))).(\lambda (P: Prop).(let H0 \def (match H return (\lambda (t0: T).(\lambda (t1: T).(\lambda (_: (iso t0 t1)).((eq T t0 (THead (Flat f2) v2 t2)) \to ((eq T t1 (THead (Bind b) v t)) \to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq T (TSort n1) (THead (Flat f2) v2 t2))).(\lambda (H1: (eq T (TSort n2) (THead (Bind b) v t))).((let H2 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat f2) v2 t2) H0) in (False_ind ((eq T (TSort n2) (THead (Bind b) v t)) \to P) H2)) H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: (eq T (TLRef i1) (THead (Flat f2) v2 t2))).(\lambda (H1: (eq T (TLRef i2) (THead (Bind b) v t))).((let H2 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat f2) v2 t2) H0) in (False_ind ((eq T (TLRef i2) (THead (Bind b) v t)) \to P) H2)) H1))) | (iso_head k v1 v0 t1 t0) \Rightarrow (\lambda (H0: (eq T (THead k v1 t1) (THead (Flat f2) v2 t2))).(\lambda (H1: (eq T (THead k v0 t0) (THead (Bind b) v t))).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k v1 t1) (THead (Flat f2) v2 t2) H0) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead k v1 t1) (THead (Flat f2) v2 t2) H0) in ((let H4 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v1 t1) (THead (Flat f2) v2 t2) H0) in (eq_ind K (Flat f2) (\lambda (k0: K).((eq T v1 v2) \to ((eq T t1 t2) \to ((eq T (THead k0 v0 t0) (THead (Bind b) v t)) \to P)))) (\lambda (H5: (eq T v1 v2)).(eq_ind T v2 (\lambda (_: T).((eq T t1 t2) \to ((eq T (THead (Flat f2) v0 t0) (THead (Bind b) v t)) \to P))) (\lambda (H6: (eq T t1 t2)).(eq_ind T t2 (\lambda (_: T).((eq T (THead (Flat f2) v0 t0) (THead (Bind b) v t)) \to P)) (\lambda (H7: (eq T (THead (Flat f2) v0 t0) (THead (Bind b) v t))).(let H8 \def (eq_ind T (THead (Flat f2) v0 t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) v t) H7) in (False_ind P H8))) t1 (sym_eq T t1 t2 H6))) v1 (sym_eq T v1 v2 H5))) k (sym_eq K k (Flat f2) H4))) H3)) H2)) H1)))]) in (H0 (refl_equal T (THead (Flat f2) v2 t2)) (refl_equal T (THead (Bind b) v t)))))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (_: (((iso (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)) (THead (Bind b) v t)) \to (\forall (P: Prop).P)))).(\lambda (H0: (iso (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) (THead (Bind b) v t))).(\lambda (P: Prop).(let H1 \def (match H0 return (\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (iso t3 t4)).((eq T t3 (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)))) \to ((eq T t4 (THead (Bind b) v t)) \to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H1: (eq T (TSort n1) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))))).(\lambda (H2: (eq T (TSort n2) (THead (Bind b) v t))).((let H3 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in (False_ind ((eq T (TSort n2) (THead (Bind b) v t)) \to P) H3)) H2))) | (iso_lref i1 i2) \Rightarrow (\lambda (H1: (eq T (TLRef i1) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))))).(\lambda (H2: (eq T (TLRef i2) (THead (Bind b) v t))).((let H3 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in (False_ind ((eq T (TLRef i2) (THead (Bind b) v t)) \to P) H3)) H2))) | (iso_head k v1 v0 t3 t4) \Rightarrow (\lambda (H1: (eq T (THead k v1 t3) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))))).(\lambda (H2: (eq T (THead k v0 t4) (THead (Bind b) v t))).((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) (THead k v1 t3) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead k v1 t3) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v1 t3) (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) H1) in (eq_ind K (Flat f1) (\lambda (k0: K).((eq T v1 t0) \to ((eq T t3 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) \to ((eq T (THead k0 v0 t4) (THead (Bind b) v t)) \to P)))) (\lambda (H6: (eq T v1 t0)).(eq_ind T t0 (\lambda (_: T).((eq T t3 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) \to ((eq T (THead (Flat f1) v0 t4) (THead (Bind b) v t)) \to P))) (\lambda (H7: (eq T t3 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)))).(eq_ind T (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)) (\lambda (_: T).((eq T (THead (Flat f1) v0 t4) (THead (Bind b) v t)) \to P)) (\lambda (H8: (eq T (THead (Flat f1) v0 t4) (THead (Bind b) v t))).(let H9 \def (eq_ind T (THead (Flat f1) v0 t4) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) v t) H8) in (False_ind P H9))) t3 (sym_eq T t3 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)) H7))) v1 (sym_eq T v1 t0 H6))) k (sym_eq K k (Flat f1) H5))) H4)) H3)) H2)))]) in (H1 (refl_equal T (THead (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2)))) (refl_equal T (THead (Bind b) v t))))))))) vs)))))))). theorem iso_trans: \forall (t1: T).(\forall (t2: T).((iso t1 t2) \to (\forall (t3: T).((iso t2 t3) \to (iso t1 t3))))) \def - \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (iso t1 t2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).(\forall (t3: T).((iso t0 t3) \to (iso t t3))))) (\lambda (n1: nat).(\lambda (n2: nat).(\lambda (t3: T).(\lambda (H0: (iso (TSort n2) t3)).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (TSort n2)) \to ((eq T t0 t3) \to (iso (TSort n1) t3)))))) with [(iso_sort n0 n3) \Rightarrow (\lambda (H0: (eq T (TSort n0) (TSort n2))).(\lambda (H1: (eq T (TSort n3) t3)).((let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort n) \Rightarrow n | (TLRef _) \Rightarrow n0 | (THead _ _ _) \Rightarrow n0])) (TSort n0) (TSort n2) H0) in (eq_ind nat n2 (\lambda (_: nat).((eq T (TSort n3) t3) \to (iso (TSort n1) t3))) (\lambda (H3: (eq T (TSort n3) t3)).(eq_ind T (TSort n3) (\lambda (t: T).(iso (TSort n1) t)) (iso_sort n1 n3) t3 H3)) n0 (sym_eq nat n0 n2 H2))) H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: (eq T (TLRef i1) (TSort n2))).(\lambda (H1: (eq T (TLRef i2) t3)).((let H2 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n2) H0) in (False_ind ((eq T (TLRef i2) t3) \to (iso (TSort n1) t3)) H2)) H1))) | (iso_head k v1 v2 t1 t2) \Rightarrow (\lambda (H0: (eq T (THead k v1 t1) (TSort n2))).(\lambda (H1: (eq T (THead k v2 t2) t3)).((let H2 \def (eq_ind T (THead k v1 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n2) H0) in (False_ind ((eq T (THead k v2 t2) t3) \to (iso (TSort n1) t3)) H2)) H1)))]) in (H1 (refl_equal T (TSort n2)) (refl_equal T t3))))))) (\lambda (i1: nat).(\lambda (i2: nat).(\lambda (t3: T).(\lambda (H0: (iso (TLRef i2) t3)).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef i2)) \to ((eq T t0 t3) \to (iso (TLRef i1) t3)))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq T (TSort n1) (TLRef i2))).(\lambda (H1: (eq T (TSort n2) t3)).((let H2 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef i2) H0) in (False_ind ((eq T (TSort n2) t3) \to (iso (TLRef i1) t3)) H2)) H1))) | (iso_lref i0 i3) \Rightarrow (\lambda (H0: (eq T (TLRef i0) (TLRef i2))).(\lambda (H1: (eq T (TLRef i3) t3)).((let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow i0 | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i0])) (TLRef i0) (TLRef i2) H0) in (eq_ind nat i2 (\lambda (_: nat).((eq T (TLRef i3) t3) \to (iso (TLRef i1) t3))) (\lambda (H3: (eq T (TLRef i3) t3)).(eq_ind T (TLRef i3) (\lambda (t: T).(iso (TLRef i1) t)) (iso_lref i1 i3) t3 H3)) i0 (sym_eq nat i0 i2 H2))) H1))) | (iso_head k v1 v2 t1 t2) \Rightarrow (\lambda (H0: (eq T (THead k v1 t1) (TLRef i2))).(\lambda (H1: (eq T (THead k v2 t2) t3)).((let H2 \def (eq_ind T (THead k v1 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i2) H0) in (False_ind ((eq T (THead k v2 t2) t3) \to (iso (TLRef i1) t3)) H2)) H1)))]) in (H1 (refl_equal T (TLRef i2)) (refl_equal T t3))))))) (\lambda (k: K).(\lambda (v1: T).(\lambda (v2: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (t5: T).(\lambda (H0: (iso (THead k v2 t4) t5)).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead k v2 t4)) \to ((eq T t0 t5) \to (iso (THead k v1 t3) t5)))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq T (TSort n1) (THead k v2 t4))).(\lambda (H1: (eq T (TSort n2) t5)).((let H2 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead k v2 t4) H0) in (False_ind ((eq T (TSort n2) t5) \to (iso (THead k v1 t3) t5)) H2)) H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: (eq T (TLRef i1) (THead k v2 t4))).(\lambda (H1: (eq T (TLRef i2) t5)).((let H2 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k v2 t4) H0) in (False_ind ((eq T (TLRef i2) t5) \to (iso (THead k v1 t3) t5)) H2)) H1))) | (iso_head k0 v0 v3 t0 t4) \Rightarrow (\lambda (H0: (eq T (THead k0 v0 t0) (THead k v2 t4))).(\lambda (H1: (eq T (THead k0 v3 t4) t5)).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 v0 t0) (THead k v2 t4) H0) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | (THead _ t _) \Rightarrow t])) (THead k0 v0 t0) (THead k v2 t4) H0) in ((let H4 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 v0 t0) (THead k v2 t4) H0) in (eq_ind K k (\lambda (k1: K).((eq T v0 v2) \to ((eq T t0 t4) \to ((eq T (THead k1 v3 t4) t5) \to (iso (THead k v1 t3) t5))))) (\lambda (H5: (eq T v0 v2)).(eq_ind T v2 (\lambda (_: T).((eq T t0 t4) \to ((eq T (THead k v3 t4) t5) \to (iso (THead k v1 t3) t5)))) (\lambda (H6: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).((eq T (THead k v3 t4) t5) \to (iso (THead k v1 t3) t5))) (\lambda (H7: (eq T (THead k v3 t4) t5)).(eq_ind T (THead k v3 t4) (\lambda (t: T).(iso (THead k v1 t3) t)) (iso_head k v1 v3 t3 t4) t5 H7)) t0 (sym_eq T t0 t4 H6))) v0 (sym_eq T v0 v2 H5))) k0 (sym_eq K k0 k H4))) H3)) H2)) H1)))]) in (H1 (refl_equal T (THead k v2 t4)) (refl_equal T t5)))))))))) t1 t2 H))). + \lambda (t1: T).(\lambda (t2: T).(\lambda (H: (iso t1 t2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).(\forall (t3: T).((iso t0 t3) \to (iso t t3))))) (\lambda (n1: nat).(\lambda (n2: nat).(\lambda (t3: T).(\lambda (H0: (iso (TSort n2) t3)).(let H1 \def (match H0 return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (iso t t0)).((eq T t (TSort n2)) \to ((eq T t0 t3) \to (iso (TSort n1) t3)))))) with [(iso_sort n0 n3) \Rightarrow (\lambda (H0: (eq T (TSort n0) (TSort n2))).(\lambda (H1: (eq T (TSort n3) t3)).((let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort n) \Rightarrow n | (TLRef _) \Rightarrow n0 | (THead _ _ _) \Rightarrow n0])) (TSort n0) (TSort n2) H0) in (eq_ind nat n2 (\lambda (_: nat).((eq T (TSort n3) t3) \to (iso (TSort n1) t3))) (\lambda (H3: (eq T (TSort n3) t3)).(eq_ind T (TSort n3) (\lambda (t: T).(iso (TSort n1) t)) (iso_sort n1 n3) t3 H3)) n0 (sym_eq nat n0 n2 H2))) H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: (eq T (TLRef i1) (TSort n2))).(\lambda (H1: (eq T (TLRef i2) t3)).((let H2 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n2) H0) in (False_ind ((eq T (TLRef i2) t3) \to (iso (TSort n1) t3)) H2)) H1))) | (iso_head k v1 v2 t1 t2) \Rightarrow (\lambda (H0: (eq T (THead k v1 t1) (TSort n2))).(\lambda (H1: (eq T (THead k v2 t2) t3)).((let H2 \def (eq_ind T (THead k v1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n2) H0) in (False_ind ((eq T (THead k v2 t2) t3) \to (iso (TSort n1) t3)) H2)) H1)))]) in (H1 (refl_equal T (TSort n2)) (refl_equal T t3))))))) (\lambda (i1: nat).(\lambda (i2: nat).(\lambda (t3: T).(\lambda (H0: (iso (TLRef i2) t3)).(let H1 \def (match H0 return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (iso t t0)).((eq T t (TLRef i2)) \to ((eq T t0 t3) \to (iso (TLRef i1) t3)))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq T (TSort n1) (TLRef i2))).(\lambda (H1: (eq T (TSort n2) t3)).((let H2 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef i2) H0) in (False_ind ((eq T (TSort n2) t3) \to (iso (TLRef i1) t3)) H2)) H1))) | (iso_lref i0 i3) \Rightarrow (\lambda (H0: (eq T (TLRef i0) (TLRef i2))).(\lambda (H1: (eq T (TLRef i3) t3)).((let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i0 | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i0])) (TLRef i0) (TLRef i2) H0) in (eq_ind nat i2 (\lambda (_: nat).((eq T (TLRef i3) t3) \to (iso (TLRef i1) t3))) (\lambda (H3: (eq T (TLRef i3) t3)).(eq_ind T (TLRef i3) (\lambda (t: T).(iso (TLRef i1) t)) (iso_lref i1 i3) t3 H3)) i0 (sym_eq nat i0 i2 H2))) H1))) | (iso_head k v1 v2 t1 t2) \Rightarrow (\lambda (H0: (eq T (THead k v1 t1) (TLRef i2))).(\lambda (H1: (eq T (THead k v2 t2) t3)).((let H2 \def (eq_ind T (THead k v1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i2) H0) in (False_ind ((eq T (THead k v2 t2) t3) \to (iso (TLRef i1) t3)) H2)) H1)))]) in (H1 (refl_equal T (TLRef i2)) (refl_equal T t3))))))) (\lambda (k: K).(\lambda (v1: T).(\lambda (v2: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (t5: T).(\lambda (H0: (iso (THead k v2 t4) t5)).(let H1 \def (match H0 return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (iso t t0)).((eq T t (THead k v2 t4)) \to ((eq T t0 t5) \to (iso (THead k v1 t3) t5)))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq T (TSort n1) (THead k v2 t4))).(\lambda (H1: (eq T (TSort n2) t5)).((let H2 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead k v2 t4) H0) in (False_ind ((eq T (TSort n2) t5) \to (iso (THead k v1 t3) t5)) H2)) H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: (eq T (TLRef i1) (THead k v2 t4))).(\lambda (H1: (eq T (TLRef i2) t5)).((let H2 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k v2 t4) H0) in (False_ind ((eq T (TLRef i2) t5) \to (iso (THead k v1 t3) t5)) H2)) H1))) | (iso_head k0 v0 v3 t0 t4) \Rightarrow (\lambda (H0: (eq T (THead k0 v0 t0) (THead k v2 t4))).(\lambda (H1: (eq T (THead k0 v3 t4) t5)).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 v0 t0) (THead k v2 t4) H0) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | (THead _ t _) \Rightarrow t])) (THead k0 v0 t0) (THead k v2 t4) H0) in ((let H4 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 v0 t0) (THead k v2 t4) H0) in (eq_ind K k (\lambda (k1: K).((eq T v0 v2) \to ((eq T t0 t4) \to ((eq T (THead k1 v3 t4) t5) \to (iso (THead k v1 t3) t5))))) (\lambda (H5: (eq T v0 v2)).(eq_ind T v2 (\lambda (_: T).((eq T t0 t4) \to ((eq T (THead k v3 t4) t5) \to (iso (THead k v1 t3) t5)))) (\lambda (H6: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).((eq T (THead k v3 t4) t5) \to (iso (THead k v1 t3) t5))) (\lambda (H7: (eq T (THead k v3 t4) t5)).(eq_ind T (THead k v3 t4) (\lambda (t: T).(iso (THead k v1 t3) t)) (iso_head k v1 v3 t3 t4) t5 H7)) t0 (sym_eq T t0 t4 H6))) v0 (sym_eq T v0 v2 H5))) k0 (sym_eq K k0 k H4))) H3)) H2)) H1)))]) in (H1 (refl_equal T (THead k v2 t4)) (refl_equal T t5)))))))))) t1 t2 H))). inductive C: Set \def | CSort: nat \to C @@ -287,7 +287,7 @@ theorem r_dis: theorem s_r: \forall (k: K).(\forall (i: nat).(eq nat (s k (r k i)) (S i))) \def - \lambda (k: K).(match k return (\lambda (_: ?).(\lambda (k0: K).(\forall (i: nat).(eq nat (s k0 (r k0 i)) (S i))))) with [(Bind _) \Rightarrow (\lambda (i: nat).(refl_equal nat (S i))) | (Flat _) \Rightarrow (\lambda (i: nat).(refl_equal nat (S i)))]). + \lambda (k: K).(match k return (\lambda (k0: K).(\forall (i: nat).(eq nat (s k0 (r k0 i)) (S i)))) with [(Bind _) \Rightarrow (\lambda (i: nat).(refl_equal nat (S i))) | (Flat _) \Rightarrow (\lambda (i: nat).(refl_equal nat (S i)))]). theorem r_arith0: \forall (k: K).(\forall (i: nat).(eq nat (minus (r k (S i)) (S O)) (r k i))) @@ -322,7 +322,7 @@ definition cle: theorem tweight_lt: \forall (t: T).(lt O (tweight t)) \def - \lambda (t: T).(match t return (\lambda (_: ?).(\lambda (t0: T).(lt O (tweight t0)))) with [(TSort _) \Rightarrow (le_n (S O)) | (TLRef _) \Rightarrow (le_n (S O)) | (THead _ t0 t1) \Rightarrow (le_S_n (S O) (S (plus (tweight t0) (tweight t1))) (le_n_S (S O) (S (plus (tweight t0) (tweight t1))) (le_n_S O (plus (tweight t0) (tweight t1)) (le_O_n (plus (tweight t0) (tweight t1))))))]). + \lambda (t: T).(match t return (\lambda (t0: T).(lt O (tweight t0))) with [(TSort _) \Rightarrow (le_n (S O)) | (TLRef _) \Rightarrow (le_n (S O)) | (THead _ t0 t1) \Rightarrow (le_S_n (S O) (S (plus (tweight t0) (tweight t1))) (le_n_S (S O) (S (plus (tweight t0) (tweight t1))) (le_n_S O (plus (tweight t0) (tweight t1)) (le_O_n (plus (tweight t0) (tweight t1))))))]). theorem clt_cong: \forall (c: C).(\forall (d: C).((clt c d) \to (\forall (k: K).(\forall (t: T).(clt (CHead c k t) (CHead d k t)))))) @@ -362,7 +362,7 @@ theorem clt_thead: theorem c_tail_ind: \forall (P: ((C \to Prop))).(((\forall (n: nat).(P (CSort n)))) \to (((\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: T).(P (CTail k t c))))))) \to (\forall (c: C).(P c)))) \def - \lambda (P: ((C \to Prop))).(\lambda (H: ((\forall (n: nat).(P (CSort n))))).(\lambda (H0: ((\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: T).(P (CTail k t c)))))))).(\lambda (c: C).(clt_wf_ind (\lambda (c0: C).(P c0)) (\lambda (c0: C).(match c0 return (\lambda (_: ?).(\lambda (c1: C).(((\forall (d: C).((clt d c1) \to (P d)))) \to (P c1)))) with [(CSort n) \Rightarrow (\lambda (_: ((\forall (d: C).((clt d (CSort n)) \to (P d))))).(H n)) | (CHead c1 k t) \Rightarrow (\lambda (H1: ((\forall (d: C).((clt d (CHead c1 k t)) \to (P d))))).(let H_x \def (chead_ctail c1 t k) in (let H2 \def H_x in (ex_3_ind K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c1 k t) (CTail h u d))))) (P (CHead c1 k t)) (\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H3: (eq C (CHead c1 k t) (CTail x0 x2 x1))).(eq_ind_r C (CTail x0 x2 x1) (\lambda (c2: C).(P c2)) (let H4 \def (eq_ind C (CHead c1 k t) (\lambda (c: C).(\forall (d: C).((clt d c) \to (P d)))) H1 (CTail x0 x2 x1) H3) in (H0 x1 (H4 x1 (clt_thead x0 x2 x1)) x0 x2)) (CHead c1 k t) H3))))) H2))))])) c)))). + \lambda (P: ((C \to Prop))).(\lambda (H: ((\forall (n: nat).(P (CSort n))))).(\lambda (H0: ((\forall (c: C).((P c) \to (\forall (k: K).(\forall (t: T).(P (CTail k t c)))))))).(\lambda (c: C).(clt_wf_ind (\lambda (c0: C).(P c0)) (\lambda (c0: C).(match c0 return (\lambda (c1: C).(((\forall (d: C).((clt d c1) \to (P d)))) \to (P c1))) with [(CSort n) \Rightarrow (\lambda (_: ((\forall (d: C).((clt d (CSort n)) \to (P d))))).(H n)) | (CHead c1 k t) \Rightarrow (\lambda (H1: ((\forall (d: C).((clt d (CHead c1 k t)) \to (P d))))).(let H_x \def (chead_ctail c1 t k) in (let H2 \def H_x in (ex_3_ind K C T (\lambda (h: K).(\lambda (d: C).(\lambda (u: T).(eq C (CHead c1 k t) (CTail h u d))))) (P (CHead c1 k t)) (\lambda (x0: K).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H3: (eq C (CHead c1 k t) (CTail x0 x2 x1))).(eq_ind_r C (CTail x0 x2 x1) (\lambda (c2: C).(P c2)) (let H4 \def (eq_ind C (CHead c1 k t) (\lambda (c: C).(\forall (d: C).((clt d c) \to (P d)))) H1 (CTail x0 x2 x1) H3) in (H0 x1 (H4 x1 (clt_thead x0 x2 x1)) x0 x2)) (CHead c1 k t) H3))))) H2))))])) c)))). definition fweight: C \to (T \to nat) @@ -462,47 +462,47 @@ theorem lift_flat: theorem lift_gen_sort: \forall (h: nat).(\forall (d: nat).(\forall (n: nat).(\forall (t: T).((eq T (TSort n) (lift h d t)) \to (eq T t (TSort n)))))) \def - \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TSort n) (lift h d t0)) \to (eq T t0 (TSort n)))) (\lambda (n0: nat).(\lambda (H: (eq T (TSort n) (lift h d (TSort n0)))).(sym_eq T (TSort n) (TSort n0) H))) (\lambda (n0: nat).(\lambda (H: (eq T (TSort n) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TSort n)) (\lambda (H0: (lt n0 d)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TSort n) t)) H (TLRef n0) (lift_lref_lt n0 h d H0)) in (let H2 \def (match H1 return (\lambda (_: ?).(\lambda (t: T).((eq T t (TLRef n0)) \to (eq T (TLRef n0) (TSort n))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (TSort n) (TLRef n0))).(let H2 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef n0) H1) in (False_ind (eq T (TLRef n0) (TSort n)) H2)))]) in (H2 (refl_equal T (TLRef n0)))))) (\lambda (H0: (le d n0)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TSort n) t)) H (TLRef (plus n0 h)) (lift_lref_ge n0 h d H0)) in (let H2 \def (match H1 return (\lambda (_: ?).(\lambda (t: T).((eq T t (TLRef (plus n0 h))) \to (eq T (TLRef n0) (TSort n))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (TSort n) (TLRef (plus n0 h)))).(let H2 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef (plus n0 h)) H1) in (False_ind (eq T (TLRef n0) (TSort n)) H2)))]) in (H2 (refl_equal T (TLRef (plus n0 h)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TSort n) (lift h d t0)) \to (eq T t0 (TSort n))))).(\lambda (t1: T).(\lambda (_: (((eq T (TSort n) (lift h d t1)) \to (eq T t1 (TSort n))))).(\lambda (H1: (eq T (TSort n) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TSort n) t)) H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (match H2 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead k (lift h d t0) (lift h (s k d) t1))) \to (eq T (THead k t0 t1) (TSort n))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TSort n) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H3 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H2) in (False_ind (eq T (THead k t0 t1) (TSort n)) H3)))]) in (H3 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))) t)))). + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TSort n) (lift h d t0)) \to (eq T t0 (TSort n)))) (\lambda (n0: nat).(\lambda (H: (eq T (TSort n) (lift h d (TSort n0)))).(sym_eq T (TSort n) (TSort n0) H))) (\lambda (n0: nat).(\lambda (H: (eq T (TSort n) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TSort n)) (\lambda (H0: (lt n0 d)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TSort n) t)) H (TLRef n0) (lift_lref_lt n0 h d H0)) in (let H2 \def (match H1 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef n0)) \to (eq T (TLRef n0) (TSort n))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (TSort n) (TLRef n0))).(let H2 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef n0) H1) in (False_ind (eq T (TLRef n0) (TSort n)) H2)))]) in (H2 (refl_equal T (TLRef n0)))))) (\lambda (H0: (le d n0)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TSort n) t)) H (TLRef (plus n0 h)) (lift_lref_ge n0 h d H0)) in (let H2 \def (match H1 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef (plus n0 h))) \to (eq T (TLRef n0) (TSort n))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (TSort n) (TLRef (plus n0 h)))).(let H2 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef (plus n0 h)) H1) in (False_ind (eq T (TLRef n0) (TSort n)) H2)))]) in (H2 (refl_equal T (TLRef (plus n0 h)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TSort n) (lift h d t0)) \to (eq T t0 (TSort n))))).(\lambda (t1: T).(\lambda (_: (((eq T (TSort n) (lift h d t1)) \to (eq T t1 (TSort n))))).(\lambda (H1: (eq T (TSort n) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TSort n) t)) H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (match H2 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k (lift h d t0) (lift h (s k d) t1))) \to (eq T (THead k t0 t1) (TSort n))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TSort n) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H3 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H2) in (False_ind (eq T (THead k t0 t1) (TSort n)) H3)))]) in (H3 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))) t)))). theorem lift_gen_lref: \forall (t: T).(\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t)) \to (or (land (lt i d) (eq T t (TLRef i))) (land (le (plus d h) i) (eq T t (TLRef (minus i h))))))))) \def - \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t0)) \to (or (land (lt i d) (eq T t0 (TLRef i))) (land (le (plus d h) i) (eq T t0 (TLRef (minus i h)))))))))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H: (eq T (TLRef i) (lift h d (TSort n)))).(let H0 \def (eq_ind T (lift h d (TSort n)) (\lambda (t: T).(eq T (TLRef i) t)) H (TSort n) (lift_sort n h d)) in (let H1 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H0) in (False_ind (or (land (lt i d) (eq T (TSort n) (TLRef i))) (land (le (plus d h) i) (eq T (TSort n) (TLRef (minus i h))))) H1)))))))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H: (eq T (TLRef i) (lift h d (TLRef n)))).(lt_le_e n d (or (land (lt i d) (eq T (TLRef n) (TLRef i))) (land (le (plus d h) i) (eq T (TLRef n) (TLRef (minus i h))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t: T).(eq T (TLRef i) t)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H1) in (eq_ind_r nat n (\lambda (n0: nat).(or (land (lt n0 d) (eq T (TLRef n) (TLRef n0))) (land (le (plus d h) n0) (eq T (TLRef n) (TLRef (minus n0 h)))))) (or_introl (land (lt n d) (eq T (TLRef n) (TLRef n))) (land (le (plus d h) n) (eq T (TLRef n) (TLRef (minus n h)))) (conj (lt n d) (eq T (TLRef n) (TLRef n)) H0 (refl_equal T (TLRef n)))) i H2)))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t: T).(eq T (TLRef i) t)) H (TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef (plus n h)) H1) in (eq_ind_r nat (plus n h) (\lambda (n0: nat).(or (land (lt n0 d) (eq T (TLRef n) (TLRef n0))) (land (le (plus d h) n0) (eq T (TLRef n) (TLRef (minus n0 h)))))) (eq_ind_r nat n (\lambda (n0: nat).(or (land (lt (plus n h) d) (eq T (TLRef n) (TLRef (plus n h)))) (land (le (plus d h) (plus n h)) (eq T (TLRef n) (TLRef n0))))) (or_intror (land (lt (plus n h) d) (eq T (TLRef n) (TLRef (plus n h)))) (land (le (plus d h) (plus n h)) (eq T (TLRef n) (TLRef n))) (conj (le (plus d h) (plus n h)) (eq T (TLRef n) (TLRef n)) (plus_le_compat d n h h H0 (le_n h)) (refl_equal T (TLRef n)))) (minus (plus n h) h) (minus_plus_r n h)) i H2)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: ((\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t0)) \to (or (land (lt i d) (eq T t0 (TLRef i))) (land (le (plus d h) i) (eq T t0 (TLRef (minus i h))))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t1)) \to (or (land (lt i d) (eq T t1 (TLRef i))) (land (le (plus d h) i) (eq T t1 (TLRef (minus i h))))))))))).(\lambda (d: nat).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H1: (eq T (TLRef i) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TLRef i) t)) H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H2) in (False_ind (or (land (lt i d) (eq T (THead k t0 t1) (TLRef i))) (land (le (plus d h) i) (eq T (THead k t0 t1) (TLRef (minus i h))))) H3)))))))))))) t). + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t0)) \to (or (land (lt i d) (eq T t0 (TLRef i))) (land (le (plus d h) i) (eq T t0 (TLRef (minus i h)))))))))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H: (eq T (TLRef i) (lift h d (TSort n)))).(let H0 \def (eq_ind T (lift h d (TSort n)) (\lambda (t: T).(eq T (TLRef i) t)) H (TSort n) (lift_sort n h d)) in (let H1 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H0) in (False_ind (or (land (lt i d) (eq T (TSort n) (TLRef i))) (land (le (plus d h) i) (eq T (TSort n) (TLRef (minus i h))))) H1)))))))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H: (eq T (TLRef i) (lift h d (TLRef n)))).(lt_le_e n d (or (land (lt i d) (eq T (TLRef n) (TLRef i))) (land (le (plus d h) i) (eq T (TLRef n) (TLRef (minus i h))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t: T).(eq T (TLRef i) t)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H1) in (eq_ind_r nat n (\lambda (n0: nat).(or (land (lt n0 d) (eq T (TLRef n) (TLRef n0))) (land (le (plus d h) n0) (eq T (TLRef n) (TLRef (minus n0 h)))))) (or_introl (land (lt n d) (eq T (TLRef n) (TLRef n))) (land (le (plus d h) n) (eq T (TLRef n) (TLRef (minus n h)))) (conj (lt n d) (eq T (TLRef n) (TLRef n)) H0 (refl_equal T (TLRef n)))) i H2)))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t: T).(eq T (TLRef i) t)) H (TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef (plus n h)) H1) in (eq_ind_r nat (plus n h) (\lambda (n0: nat).(or (land (lt n0 d) (eq T (TLRef n) (TLRef n0))) (land (le (plus d h) n0) (eq T (TLRef n) (TLRef (minus n0 h)))))) (eq_ind_r nat n (\lambda (n0: nat).(or (land (lt (plus n h) d) (eq T (TLRef n) (TLRef (plus n h)))) (land (le (plus d h) (plus n h)) (eq T (TLRef n) (TLRef n0))))) (or_intror (land (lt (plus n h) d) (eq T (TLRef n) (TLRef (plus n h)))) (land (le (plus d h) (plus n h)) (eq T (TLRef n) (TLRef n))) (conj (le (plus d h) (plus n h)) (eq T (TLRef n) (TLRef n)) (plus_le_compat d n h h H0 (le_n h)) (refl_equal T (TLRef n)))) (minus (plus n h) h) (minus_plus_r n h)) i H2)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: ((\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t0)) \to (or (land (lt i d) (eq T t0 (TLRef i))) (land (le (plus d h) i) (eq T t0 (TLRef (minus i h))))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t1)) \to (or (land (lt i d) (eq T t1 (TLRef i))) (land (le (plus d h) i) (eq T t1 (TLRef (minus i h))))))))))).(\lambda (d: nat).(\lambda (h: nat).(\lambda (i: nat).(\lambda (H1: (eq T (TLRef i) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TLRef i) t)) H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H2) in (False_ind (or (land (lt i d) (eq T (THead k t0 t1) (TLRef i))) (land (le (plus d h) i) (eq T (THead k t0 t1) (TLRef (minus i h))))) H3)))))))))))) t). theorem lift_gen_lref_lt: \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((lt n d) \to (\forall (t: T).((eq T (TLRef n) (lift h d t)) \to (eq T t (TLRef n))))))) \def - \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (lt n d)).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TLRef n) (lift h d t0)) \to (eq T t0 (TLRef n)))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef n) (lift h d (TSort n0)))).(sym_eq T (TLRef n) (TSort n0) H0))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef n) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TLRef n)) (\lambda (H1: (lt n0 d)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef n) t)) H0 (TLRef n0) (lift_lref_lt n0 h d H1)) in (sym_eq T (TLRef n) (TLRef n0) H2))) (\lambda (H1: (le d n0)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef n) t)) H0 (TLRef (plus n0 h)) (lift_lref_ge n0 h d H1)) in (let H3 \def (match H2 return (\lambda (_: ?).(\lambda (t: T).((eq T t (TLRef (plus n0 h))) \to (eq T (TLRef n0) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TLRef n) (TLRef (plus n0 h)))).(let H3 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow n | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef (plus n0 h)) H2) in (eq_ind nat (plus n0 h) (\lambda (n: nat).(eq T (TLRef n0) (TLRef n))) (let H0 \def (eq_ind nat n (\lambda (n: nat).(lt n d)) H (plus n0 h) H3) in (le_false d n0 (eq T (TLRef n0) (TLRef (plus n0 h))) H1 (lt_le_S n0 d (le_lt_trans n0 (plus n0 h) d (le_plus_l n0 h) H0)))) n (sym_eq nat n (plus n0 h) H3))))]) in (H3 (refl_equal T (TLRef (plus n0 h)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TLRef n) (lift h d t0)) \to (eq T t0 (TLRef n))))).(\lambda (t1: T).(\lambda (_: (((eq T (TLRef n) (lift h d t1)) \to (eq T t1 (TLRef n))))).(\lambda (H2: (eq T (TLRef n) (lift h d (THead k t0 t1)))).(let H3 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TLRef n) t)) H2 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H4 \def (match H3 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead k (lift h d t0) (lift h (s k d) t1))) \to (eq T (THead k t0 t1) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H3: (eq T (TLRef n) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H4 \def (eq_ind T (TLRef n) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H3) in (False_ind (eq T (THead k t0 t1) (TLRef n)) H4)))]) in (H4 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))) t))))). + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (lt n d)).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TLRef n) (lift h d t0)) \to (eq T t0 (TLRef n)))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef n) (lift h d (TSort n0)))).(sym_eq T (TLRef n) (TSort n0) H0))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef n) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TLRef n)) (\lambda (H1: (lt n0 d)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef n) t)) H0 (TLRef n0) (lift_lref_lt n0 h d H1)) in (sym_eq T (TLRef n) (TLRef n0) H2))) (\lambda (H1: (le d n0)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef n) t)) H0 (TLRef (plus n0 h)) (lift_lref_ge n0 h d H1)) in (let H3 \def (match H2 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef (plus n0 h))) \to (eq T (TLRef n0) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TLRef n) (TLRef (plus n0 h)))).(let H3 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow n | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef (plus n0 h)) H2) in (eq_ind nat (plus n0 h) (\lambda (n: nat).(eq T (TLRef n0) (TLRef n))) (let H0 \def (eq_ind nat n (\lambda (n: nat).(lt n d)) H (plus n0 h) H3) in (le_false d n0 (eq T (TLRef n0) (TLRef (plus n0 h))) H1 (lt_le_S n0 d (le_lt_trans n0 (plus n0 h) d (le_plus_l n0 h) H0)))) n (sym_eq nat n (plus n0 h) H3))))]) in (H3 (refl_equal T (TLRef (plus n0 h)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TLRef n) (lift h d t0)) \to (eq T t0 (TLRef n))))).(\lambda (t1: T).(\lambda (_: (((eq T (TLRef n) (lift h d t1)) \to (eq T t1 (TLRef n))))).(\lambda (H2: (eq T (TLRef n) (lift h d (THead k t0 t1)))).(let H3 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TLRef n) t)) H2 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H4 \def (match H3 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k (lift h d t0) (lift h (s k d) t1))) \to (eq T (THead k t0 t1) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H3: (eq T (TLRef n) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H4 \def (eq_ind T (TLRef n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H3) in (False_ind (eq T (THead k t0 t1) (TLRef n)) H4)))]) in (H4 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))) t))))). theorem lift_gen_lref_false: \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((le d n) \to ((lt n (plus d h)) \to (\forall (t: T).((eq T (TLRef n) (lift h d t)) \to (\forall (P: Prop).P))))))) \def - \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (le d n)).(\lambda (H0: (lt n (plus d h))).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TLRef n) (lift h d t0)) \to (\forall (P: Prop).P))) (\lambda (n0: nat).(\lambda (H1: (eq T (TLRef n) (lift h d (TSort n0)))).(\lambda (P: Prop).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (t: T).((eq T t (lift h d (TSort n0))) \to P))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TLRef n) (lift h d (TSort n0)))).(let H3 \def (eq_ind T (TLRef n) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (lift h d (TSort n0)) H2) in (False_ind P H3)))]) in (H2 (refl_equal T (lift h d (TSort n0)))))))) (\lambda (n0: nat).(\lambda (H1: (eq T (TLRef n) (lift h d (TLRef n0)))).(\lambda (P: Prop).(lt_le_e n0 d P (\lambda (H2: (lt n0 d)).(let H3 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef n) t)) H1 (TLRef n0) (lift_lref_lt n0 h d H2)) in (let H4 \def (match H3 return (\lambda (_: ?).(\lambda (t: T).((eq T t (TLRef n0)) \to P))) with [refl_equal \Rightarrow (\lambda (H3: (eq T (TLRef n) (TLRef n0))).(let H4 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow n | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef n0) H3) in (eq_ind nat n0 (\lambda (_: nat).P) (let H1 \def (eq_ind_r nat n0 (\lambda (n: nat).(lt n d)) H2 n H4) in (le_false d n P H H1)) n (sym_eq nat n n0 H4))))]) in (H4 (refl_equal T (TLRef n0)))))) (\lambda (H2: (le d n0)).(let H3 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef n) t)) H1 (TLRef (plus n0 h)) (lift_lref_ge n0 h d H2)) in (let H4 \def (match H3 return (\lambda (_: ?).(\lambda (t: T).((eq T t (TLRef (plus n0 h))) \to P))) with [refl_equal \Rightarrow (\lambda (H3: (eq T (TLRef n) (TLRef (plus n0 h)))).(let H4 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow n | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef (plus n0 h)) H3) in (eq_ind nat (plus n0 h) (\lambda (_: nat).P) (let H1 \def (eq_ind nat n (\lambda (n: nat).(lt n (plus d h))) H0 (plus n0 h) H4) in (le_false d n0 P H2 (lt_le_S n0 d (simpl_lt_plus_r h n0 d H1)))) n (sym_eq nat n (plus n0 h) H4))))]) in (H4 (refl_equal T (TLRef (plus n0 h))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TLRef n) (lift h d t0)) \to (\forall (P: Prop).P)))).(\lambda (t1: T).(\lambda (_: (((eq T (TLRef n) (lift h d t1)) \to (\forall (P: Prop).P)))).(\lambda (H3: (eq T (TLRef n) (lift h d (THead k t0 t1)))).(\lambda (P: Prop).(let H4 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TLRef n) t)) H3 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H5 \def (match H4 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead k (lift h d t0) (lift h (s k d) t1))) \to P))) with [refl_equal \Rightarrow (\lambda (H4: (eq T (TLRef n) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H5 \def (eq_ind T (TLRef n) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H4) in (False_ind P H5)))]) in (H5 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1))))))))))))) t)))))). + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (le d n)).(\lambda (H0: (lt n (plus d h))).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TLRef n) (lift h d t0)) \to (\forall (P: Prop).P))) (\lambda (n0: nat).(\lambda (H1: (eq T (TLRef n) (lift h d (TSort n0)))).(\lambda (P: Prop).(let H2 \def (match H1 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (lift h d (TSort n0))) \to P))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TLRef n) (lift h d (TSort n0)))).(let H3 \def (eq_ind T (TLRef n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (lift h d (TSort n0)) H2) in (False_ind P H3)))]) in (H2 (refl_equal T (lift h d (TSort n0)))))))) (\lambda (n0: nat).(\lambda (H1: (eq T (TLRef n) (lift h d (TLRef n0)))).(\lambda (P: Prop).(lt_le_e n0 d P (\lambda (H2: (lt n0 d)).(let H3 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef n) t)) H1 (TLRef n0) (lift_lref_lt n0 h d H2)) in (let H4 \def (match H3 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef n0)) \to P))) with [refl_equal \Rightarrow (\lambda (H3: (eq T (TLRef n) (TLRef n0))).(let H4 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow n | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef n0) H3) in (eq_ind nat n0 (\lambda (_: nat).P) (let H1 \def (eq_ind_r nat n0 (\lambda (n: nat).(lt n d)) H2 n H4) in (le_false d n P H H1)) n (sym_eq nat n n0 H4))))]) in (H4 (refl_equal T (TLRef n0)))))) (\lambda (H2: (le d n0)).(let H3 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef n) t)) H1 (TLRef (plus n0 h)) (lift_lref_ge n0 h d H2)) in (let H4 \def (match H3 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef (plus n0 h))) \to P))) with [refl_equal \Rightarrow (\lambda (H3: (eq T (TLRef n) (TLRef (plus n0 h)))).(let H4 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow n | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef (plus n0 h)) H3) in (eq_ind nat (plus n0 h) (\lambda (_: nat).P) (let H1 \def (eq_ind nat n (\lambda (n: nat).(lt n (plus d h))) H0 (plus n0 h) H4) in (le_false d n0 P H2 (lt_le_S n0 d (simpl_lt_plus_r h n0 d H1)))) n (sym_eq nat n (plus n0 h) H4))))]) in (H4 (refl_equal T (TLRef (plus n0 h))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TLRef n) (lift h d t0)) \to (\forall (P: Prop).P)))).(\lambda (t1: T).(\lambda (_: (((eq T (TLRef n) (lift h d t1)) \to (\forall (P: Prop).P)))).(\lambda (H3: (eq T (TLRef n) (lift h d (THead k t0 t1)))).(\lambda (P: Prop).(let H4 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TLRef n) t)) H3 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H5 \def (match H4 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k (lift h d t0) (lift h (s k d) t1))) \to P))) with [refl_equal \Rightarrow (\lambda (H4: (eq T (TLRef n) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H5 \def (eq_ind T (TLRef n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H4) in (False_ind P H5)))]) in (H5 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1))))))))))))) t)))))). theorem lift_gen_lref_ge: \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((le d n) \to (\forall (t: T).((eq T (TLRef (plus n h)) (lift h d t)) \to (eq T t (TLRef n))))))) \def - \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (le d n)).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TLRef (plus n h)) (lift h d t0)) \to (eq T t0 (TLRef n)))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef (plus n h)) (lift h d (TSort n0)))).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (lift h d (TSort n0))) \to (eq T (TSort n0) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (TLRef (plus n h)) (lift h d (TSort n0)))).(let H2 \def (eq_ind T (TLRef (plus n h)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (lift h d (TSort n0)) H1) in (False_ind (eq T (TSort n0) (TLRef n)) H2)))]) in (H1 (refl_equal T (lift h d (TSort n0))))))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef (plus n h)) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TLRef n)) (\lambda (H1: (lt n0 d)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef (plus n h)) t)) H0 (TLRef n0) (lift_lref_lt n0 h d H1)) in (let H3 \def (match H2 return (\lambda (_: ?).(\lambda (t: T).((eq T t (TLRef n0)) \to (eq T (TLRef n0) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TLRef (plus n h)) (TLRef n0))).(let H3 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h) | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h)])) (TLRef (plus n h)) (TLRef n0) H2) in (eq_ind nat (plus n h) (\lambda (n0: nat).(eq T (TLRef n0) (TLRef n))) (let H0 \def (eq_ind_r nat n0 (\lambda (n: nat).(lt n d)) H1 (plus n h) H3) in (le_false d n (eq T (TLRef (plus n h)) (TLRef n)) H (lt_le_S n d (le_lt_trans n (plus n h) d (le_plus_l n h) H0)))) n0 H3)))]) in (H3 (refl_equal T (TLRef n0)))))) (\lambda (H1: (le d n0)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef (plus n h)) t)) H0 (TLRef (plus n0 h)) (lift_lref_ge n0 h d H1)) in (let H3 \def (match H2 return (\lambda (_: ?).(\lambda (t: T).((eq T t (TLRef (plus n0 h))) \to (eq T (TLRef n0) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TLRef (plus n h)) (TLRef (plus n0 h)))).(let H3 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h) | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h)])) (TLRef (plus n h)) (TLRef (plus n0 h)) H2) in (eq_ind nat (plus n h) (\lambda (_: nat).(eq T (TLRef n0) (TLRef n))) (f_equal nat T TLRef n0 n (simpl_plus_r h n0 n (sym_eq nat (plus n h) (plus n0 h) H3))) (plus n0 h) H3)))]) in (H3 (refl_equal T (TLRef (plus n0 h)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TLRef (plus n h)) (lift h d t0)) \to (eq T t0 (TLRef n))))).(\lambda (t1: T).(\lambda (_: (((eq T (TLRef (plus n h)) (lift h d t1)) \to (eq T t1 (TLRef n))))).(\lambda (H2: (eq T (TLRef (plus n h)) (lift h d (THead k t0 t1)))).(let H3 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TLRef (plus n h)) t)) H2 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H4 \def (match H3 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead k (lift h d t0) (lift h (s k d) t1))) \to (eq T (THead k t0 t1) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H3: (eq T (TLRef (plus n h)) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H4 \def (eq_ind T (TLRef (plus n h)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H3) in (False_ind (eq T (THead k t0 t1) (TLRef n)) H4)))]) in (H4 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))) t))))). + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (le d n)).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TLRef (plus n h)) (lift h d t0)) \to (eq T t0 (TLRef n)))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef (plus n h)) (lift h d (TSort n0)))).(let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (lift h d (TSort n0))) \to (eq T (TSort n0) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (TLRef (plus n h)) (lift h d (TSort n0)))).(let H2 \def (eq_ind T (TLRef (plus n h)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (lift h d (TSort n0)) H1) in (False_ind (eq T (TSort n0) (TLRef n)) H2)))]) in (H1 (refl_equal T (lift h d (TSort n0))))))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef (plus n h)) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TLRef n)) (\lambda (H1: (lt n0 d)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef (plus n h)) t)) H0 (TLRef n0) (lift_lref_lt n0 h d H1)) in (let H3 \def (match H2 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef n0)) \to (eq T (TLRef n0) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TLRef (plus n h)) (TLRef n0))).(let H3 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h) | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h)])) (TLRef (plus n h)) (TLRef n0) H2) in (eq_ind nat (plus n h) (\lambda (n0: nat).(eq T (TLRef n0) (TLRef n))) (let H0 \def (eq_ind_r nat n0 (\lambda (n: nat).(lt n d)) H1 (plus n h) H3) in (le_false d n (eq T (TLRef (plus n h)) (TLRef n)) H (lt_le_S n d (le_lt_trans n (plus n h) d (le_plus_l n h) H0)))) n0 H3)))]) in (H3 (refl_equal T (TLRef n0)))))) (\lambda (H1: (le d n0)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef (plus n h)) t)) H0 (TLRef (plus n0 h)) (lift_lref_ge n0 h d H1)) in (let H3 \def (match H2 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef (plus n0 h))) \to (eq T (TLRef n0) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (TLRef (plus n h)) (TLRef (plus n0 h)))).(let H3 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h) | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h)])) (TLRef (plus n h)) (TLRef (plus n0 h)) H2) in (eq_ind nat (plus n h) (\lambda (_: nat).(eq T (TLRef n0) (TLRef n))) (f_equal nat T TLRef n0 n (simpl_plus_r h n0 n (sym_eq nat (plus n h) (plus n0 h) H3))) (plus n0 h) H3)))]) in (H3 (refl_equal T (TLRef (plus n0 h)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TLRef (plus n h)) (lift h d t0)) \to (eq T t0 (TLRef n))))).(\lambda (t1: T).(\lambda (_: (((eq T (TLRef (plus n h)) (lift h d t1)) \to (eq T t1 (TLRef n))))).(\lambda (H2: (eq T (TLRef (plus n h)) (lift h d (THead k t0 t1)))).(let H3 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TLRef (plus n h)) t)) H2 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H4 \def (match H3 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k (lift h d t0) (lift h (s k d) t1))) \to (eq T (THead k t0 t1) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H3: (eq T (TLRef (plus n h)) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H4 \def (eq_ind T (TLRef (plus n h)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H3) in (False_ind (eq T (THead k t0 t1) (TLRef n)) H4)))]) in (H4 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))) t))))). theorem lift_gen_head: \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) (lift h d x)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))))))))) \def - \lambda (k: K).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k u t) (lift h d (TSort n)))).(let H0 \def (match H return (\lambda (_: ?).(\lambda (t0: T).((eq T t0 (lift h d (TSort n))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u t) (lift h d (TSort n)))).(let H1 \def (eq_ind T (THead k u t) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (lift h d (TSort n)) H0) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) H1)))]) in (H0 (refl_equal T (lift h d (TSort n))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k u t) (lift h d (TLRef n)))).(lt_le_e n d (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead k u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 return (\lambda (_: ?).(\lambda (t0: T).((eq T t0 (TLRef n)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead k u t) (TLRef n))).(let H2 \def (eq_ind T (THead k u t) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) H2)))]) in (H2 (refl_equal T (TLRef n)))))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead k u t) t0)) H (TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (match H1 return (\lambda (_: ?).(\lambda (t0: T).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead k u t) (TLRef (plus n h)))).(let H2 \def (eq_ind T (THead k u t) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef (plus n h)) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) H2)))]) in (H2 (refl_equal T (TLRef (plus n h)))))))))))) (\lambda (k0: K).(\lambda (t0: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) (lift h d t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead k u t) (lift h d (THead k0 t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k0 t0 t1)) (\lambda (t0: T).(eq T (THead k u t) t0)) H1 (THead k0 (lift h d t0) (lift h (s k0 d) t1)) (lift_head k0 t0 t1 h d)) in (let H3 \def (match H2 return (\lambda (_: ?).(\lambda (t2: T).((eq T t2 (THead k0 (lift h d t0) (lift h (s k0 d) t1))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)))).(let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) H2) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) H2) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) H2) in (eq_ind K k0 (\lambda (k: K).((eq T u (lift h d t0)) \to ((eq T t (lift h (s k0 d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) (\lambda (H6: (eq T u (lift h d t0))).(eq_ind T (lift h d t0) (\lambda (t2: T).((eq T t (lift h (s k0 d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k0 d) z))))))) (\lambda (H7: (eq T t (lift h (s k0 d) t1))).(eq_ind T (lift h (s k0 d) t1) (\lambda (t: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k0 d) z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s k0 d) t1) (lift h (s k0 d) z)))) t0 t1 (refl_equal T (THead k0 t0 t1)) (refl_equal T (lift h d t0)) (refl_equal T (lift h (s k0 d) t1))) t (sym_eq T t (lift h (s k0 d) t1) H7))) u (sym_eq T u (lift h d t0) H6))) k (sym_eq K k k0 H5))) H4)) H3)))]) in (H3 (refl_equal T (THead k0 (lift h d t0) (lift h (s k0 d) t1)))))))))))))) x)))). + \lambda (k: K).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k u t) (lift h d (TSort n)))).(let H0 \def (match H return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (lift h d (TSort n))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u t) (lift h d (TSort n)))).(let H1 \def (eq_ind T (THead k u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (lift h d (TSort n)) H0) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) H1)))]) in (H0 (refl_equal T (lift h d (TSort n))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k u t) (lift h d (TLRef n)))).(lt_le_e n d (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead k u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef n)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead k u t) (TLRef n))).(let H2 \def (eq_ind T (THead k u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) H2)))]) in (H2 (refl_equal T (TLRef n)))))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead k u t) t0)) H (TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (match H1 return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead k u t) (TLRef (plus n h)))).(let H2 \def (eq_ind T (THead k u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef (plus n h)) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) H2)))]) in (H2 (refl_equal T (TLRef (plus n h)))))))))))) (\lambda (k0: K).(\lambda (t0: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) (lift h d t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead k u t) (lift h d (THead k0 t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k0 t0 t1)) (\lambda (t0: T).(eq T (THead k u t) t0)) H1 (THead k0 (lift h d t0) (lift h (s k0 d) t1)) (lift_head k0 t0 t1 h d)) in (let H3 \def (match H2 return (\lambda (t2: T).(\lambda (_: (eq ? ? t2)).((eq T t2 (THead k0 (lift h d t0) (lift h (s k0 d) t1))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)))).(let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) H2) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) H2) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) H2) in (eq_ind K k0 (\lambda (k: K).((eq T u (lift h d t0)) \to ((eq T t (lift h (s k0 d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) (\lambda (H6: (eq T u (lift h d t0))).(eq_ind T (lift h d t0) (\lambda (t2: T).((eq T t (lift h (s k0 d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k0 d) z))))))) (\lambda (H7: (eq T t (lift h (s k0 d) t1))).(eq_ind T (lift h (s k0 d) t1) (\lambda (t: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k0 d) z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s k0 d) t1) (lift h (s k0 d) z)))) t0 t1 (refl_equal T (THead k0 t0 t1)) (refl_equal T (lift h d t0)) (refl_equal T (lift h (s k0 d) t1))) t (sym_eq T t (lift h (s k0 d) t1) H7))) u (sym_eq T u (lift h d t0) H6))) k (sym_eq K k k0 H5))) H4)) H3)))]) in (H3 (refl_equal T (THead k0 (lift h d t0) (lift h (s k0 d) t1)))))))))))))) x)))). theorem lift_gen_bind: \forall (b: B).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u t) (lift h d x)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))))))))) \def - \lambda (b: B).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Bind b) u t) (lift h d (TSort n)))).(let H0 \def (match H return (\lambda (_: ?).(\lambda (t0: T).((eq T t0 (lift h d (TSort n))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u t) (lift h d (TSort n)))).(let H1 \def (eq_ind T (THead (Bind b) u t) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (lift h d (TSort n)) H0) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))) H1)))]) in (H0 (refl_equal T (lift h d (TSort n))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Bind b) u t) (lift h d (TLRef n)))).(lt_le_e n d (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Bind b) u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 return (\lambda (_: ?).(\lambda (t0: T).((eq T t0 (TLRef n)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead (Bind b) u t) (TLRef n))).(let H2 \def (eq_ind T (THead (Bind b) u t) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))) H2)))]) in (H2 (refl_equal T (TLRef n)))))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Bind b) u t) t0)) H (TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (match H1 return (\lambda (_: ?).(\lambda (t0: T).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead (Bind b) u t) (TLRef (plus n h)))).(let H2 \def (eq_ind T (THead (Bind b) u t) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef (plus n h)) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))) H2)))]) in (H2 (refl_equal T (TLRef (plus n h)))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u t) (lift h d t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead (Bind b) u t) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t0: T).(eq T (THead (Bind b) u t) t0)) H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (match H2 return (\lambda (_: ?).(\lambda (t2: T).((eq T t2 (THead k (lift h d t0) (lift h (s k d) t1))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u t) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow (Bind b) | (TLRef _) \Rightarrow (Bind b) | (THead k _ _) \Rightarrow k])) (THead (Bind b) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in (eq_ind K (Bind b) (\lambda (k: K).((eq T u (lift h d t0)) \to ((eq T t (lift h (s k d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) (\lambda (H6: (eq T u (lift h d t0))).(eq_ind T (lift h d t0) (\lambda (t2: T).((eq T t (lift h (s (Bind b) d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))))) (\lambda (H7: (eq T t (lift h (s (Bind b) d) t1))).(eq_ind T (lift h (s (Bind b) d) t1) (\lambda (t: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s (Bind b) d) t1) (lift h (S d) z)))) t0 t1 (refl_equal T (THead (Bind b) t0 t1)) (refl_equal T (lift h d t0)) (refl_equal T (lift h (S d) t1))) t (sym_eq T t (lift h (s (Bind b) d) t1) H7))) u (sym_eq T u (lift h d t0) H6))) k H5)) H4)) H3)))]) in (H3 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))))) x)))). + \lambda (b: B).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Bind b) u t) (lift h d (TSort n)))).(let H0 \def (match H return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (lift h d (TSort n))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u t) (lift h d (TSort n)))).(let H1 \def (eq_ind T (THead (Bind b) u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (lift h d (TSort n)) H0) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))) H1)))]) in (H0 (refl_equal T (lift h d (TSort n))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Bind b) u t) (lift h d (TLRef n)))).(lt_le_e n d (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Bind b) u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef n)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead (Bind b) u t) (TLRef n))).(let H2 \def (eq_ind T (THead (Bind b) u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))) H2)))]) in (H2 (refl_equal T (TLRef n)))))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Bind b) u t) t0)) H (TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (match H1 return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead (Bind b) u t) (TLRef (plus n h)))).(let H2 \def (eq_ind T (THead (Bind b) u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef (plus n h)) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))) H2)))]) in (H2 (refl_equal T (TLRef (plus n h)))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u t) (lift h d t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead (Bind b) u t) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t0: T).(eq T (THead (Bind b) u t) t0)) H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (match H2 return (\lambda (t2: T).(\lambda (_: (eq ? ? t2)).((eq T t2 (THead k (lift h d t0) (lift h (s k d) t1))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u t) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow (Bind b) | (TLRef _) \Rightarrow (Bind b) | (THead k _ _) \Rightarrow k])) (THead (Bind b) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in (eq_ind K (Bind b) (\lambda (k: K).((eq T u (lift h d t0)) \to ((eq T t (lift h (s k d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) (\lambda (H6: (eq T u (lift h d t0))).(eq_ind T (lift h d t0) (\lambda (t2: T).((eq T t (lift h (s (Bind b) d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))))) (\lambda (H7: (eq T t (lift h (s (Bind b) d) t1))).(eq_ind T (lift h (s (Bind b) d) t1) (\lambda (t: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s (Bind b) d) t1) (lift h (S d) z)))) t0 t1 (refl_equal T (THead (Bind b) t0 t1)) (refl_equal T (lift h d t0)) (refl_equal T (lift h (S d) t1))) t (sym_eq T t (lift h (s (Bind b) d) t1) H7))) u (sym_eq T u (lift h d t0) H6))) k H5)) H4)) H3)))]) in (H3 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))))) x)))). theorem lift_gen_flat: \forall (f: F).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d x)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))))))))) \def - \lambda (f: F).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Flat f) u t) (lift h d (TSort n)))).(let H0 \def (match H return (\lambda (_: ?).(\lambda (t0: T).((eq T t0 (lift h d (TSort n))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat f) u t) (lift h d (TSort n)))).(let H1 \def (eq_ind T (THead (Flat f) u t) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (lift h d (TSort n)) H0) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))) H1)))]) in (H0 (refl_equal T (lift h d (TSort n))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Flat f) u t) (lift h d (TLRef n)))).(lt_le_e n d (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Flat f) u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 return (\lambda (_: ?).(\lambda (t0: T).((eq T t0 (TLRef n)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead (Flat f) u t) (TLRef n))).(let H2 \def (eq_ind T (THead (Flat f) u t) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))) H2)))]) in (H2 (refl_equal T (TLRef n)))))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Flat f) u t) t0)) H (TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (match H1 return (\lambda (_: ?).(\lambda (t0: T).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead (Flat f) u t) (TLRef (plus n h)))).(let H2 \def (eq_ind T (THead (Flat f) u t) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef (plus n h)) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))) H2)))]) in (H2 (refl_equal T (TLRef (plus n h)))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead (Flat f) u t) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t0: T).(eq T (THead (Flat f) u t) t0)) H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (match H2 return (\lambda (_: ?).(\lambda (t2: T).((eq T t2 (THead k (lift h d t0) (lift h (s k d) t1))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (THead (Flat f) u t) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead (Flat f) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat f) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow (Flat f) | (TLRef _) \Rightarrow (Flat f) | (THead k _ _) \Rightarrow k])) (THead (Flat f) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in (eq_ind K (Flat f) (\lambda (k: K).((eq T u (lift h d t0)) \to ((eq T t (lift h (s k d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) (\lambda (H6: (eq T u (lift h d t0))).(eq_ind T (lift h d t0) (\lambda (t2: T).((eq T t (lift h (s (Flat f) d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Flat f) t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))))) (\lambda (H7: (eq T t (lift h (s (Flat f) d) t1))).(eq_ind T (lift h (s (Flat f) d) t1) (\lambda (t: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Flat f) t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Flat f) t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s (Flat f) d) t1) (lift h d z)))) t0 t1 (refl_equal T (THead (Flat f) t0 t1)) (refl_equal T (lift h d t0)) (refl_equal T (lift h d t1))) t (sym_eq T t (lift h (s (Flat f) d) t1) H7))) u (sym_eq T u (lift h d t0) H6))) k H5)) H4)) H3)))]) in (H3 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))))) x)))). + \lambda (f: F).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Flat f) u t) (lift h d (TSort n)))).(let H0 \def (match H return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (lift h d (TSort n))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat f) u t) (lift h d (TSort n)))).(let H1 \def (eq_ind T (THead (Flat f) u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (lift h d (TSort n)) H0) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))) H1)))]) in (H0 (refl_equal T (lift h d (TSort n))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Flat f) u t) (lift h d (TLRef n)))).(lt_le_e n d (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Flat f) u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef n)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead (Flat f) u t) (TLRef n))).(let H2 \def (eq_ind T (THead (Flat f) u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))) H2)))]) in (H2 (refl_equal T (TLRef n)))))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Flat f) u t) t0)) H (TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (match H1 return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead (Flat f) u t) (TLRef (plus n h)))).(let H2 \def (eq_ind T (THead (Flat f) u t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef (plus n h)) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))) H2)))]) in (H2 (refl_equal T (TLRef (plus n h)))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead (Flat f) u t) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t0: T).(eq T (THead (Flat f) u t) t0)) H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (match H2 return (\lambda (t2: T).(\lambda (_: (eq ? ? t2)).((eq T t2 (THead k (lift h d t0) (lift h (s k d) t1))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow (\lambda (H2: (eq T (THead (Flat f) u t) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead (Flat f) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat f) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow (Flat f) | (TLRef _) \Rightarrow (Flat f) | (THead k _ _) \Rightarrow k])) (THead (Flat f) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in (eq_ind K (Flat f) (\lambda (k: K).((eq T u (lift h d t0)) \to ((eq T t (lift h (s k d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) (\lambda (H6: (eq T u (lift h d t0))).(eq_ind T (lift h d t0) (\lambda (t2: T).((eq T t (lift h (s (Flat f) d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Flat f) t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))))) (\lambda (H7: (eq T t (lift h (s (Flat f) d) t1))).(eq_ind T (lift h (s (Flat f) d) t1) (\lambda (t: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Flat f) t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Flat f) t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s (Flat f) d) t1) (lift h d z)))) t0 t1 (refl_equal T (THead (Flat f) t0 t1)) (refl_equal T (lift h d t0)) (refl_equal T (lift h d t1))) t (sym_eq T t (lift h (s (Flat f) d) t1) H7))) u (sym_eq T u (lift h d t0) H6))) k H5)) H4)) H3)))]) in (H3 (refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))))) x)))). theorem thead_x_lift_y_y: \forall (k: K).(\forall (t: T).(\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t)) t) \to (\forall (P: Prop).P)))))) \def - \lambda (k: K).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t0)) t0) \to (\forall (P: Prop).P)))))) (\lambda (n: nat).(\lambda (v: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k v (lift h d (TSort n))) (TSort n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (lift h d (TSort n))) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H) in (False_ind P H0)))))))) (\lambda (n: nat).(\lambda (v: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k v (lift h d (TLRef n))) (TLRef n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (lift h d (TLRef n))) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H) in (False_ind P H0)))))))) (\lambda (k0: K).(\lambda (t0: T).(\lambda (_: ((\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t0)) t0) \to (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t1)) t1) \to (\forall (P: Prop).P))))))).(\lambda (v: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v | (TLRef _) \Rightarrow v | (THead _ t _) \Rightarrow t])) (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow (THead k0 ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) d t0) ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) (s k0 d) t1)) | (TLRef _) \Rightarrow (THead k0 ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) d t0) ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) (s k0 d) t1)) | (THead _ _ t) \Rightarrow t])) (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1) H1) in (\lambda (_: (eq T v t0)).(\lambda (H6: (eq K k k0)).(let H7 \def (eq_ind K k (\lambda (k: K).(\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t1)) t1) \to (\forall (P: Prop).P)))))) H0 k0 H6) in (let H8 \def (eq_ind T (lift h d (THead k0 t0 t1)) (\lambda (t: T).(eq T t t1)) H4 (THead k0 (lift h d t0) (lift h (s k0 d) t1)) (lift_head k0 t0 t1 h d)) in (H7 (lift h d t0) h (s k0 d) H8 P)))))) H3)) H2)))))))))))) t)). + \lambda (k: K).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t0)) t0) \to (\forall (P: Prop).P)))))) (\lambda (n: nat).(\lambda (v: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k v (lift h d (TSort n))) (TSort n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (lift h d (TSort n))) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H) in (False_ind P H0)))))))) (\lambda (n: nat).(\lambda (v: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k v (lift h d (TLRef n))) (TLRef n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (lift h d (TLRef n))) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H) in (False_ind P H0)))))))) (\lambda (k0: K).(\lambda (t0: T).(\lambda (_: ((\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t0)) t0) \to (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t1)) t1) \to (\forall (P: Prop).P))))))).(\lambda (v: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v | (TLRef _) \Rightarrow v | (THead _ t _) \Rightarrow t])) (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead k0 ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) d t0) ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) (s k0 d) t1)) | (TLRef _) \Rightarrow (THead k0 ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) d t0) ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) (s k0 d) t1)) | (THead _ _ t) \Rightarrow t])) (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1) H1) in (\lambda (_: (eq T v t0)).(\lambda (H6: (eq K k k0)).(let H7 \def (eq_ind K k (\lambda (k: K).(\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t1)) t1) \to (\forall (P: Prop).P)))))) H0 k0 H6) in (let H8 \def (eq_ind T (lift h d (THead k0 t0 t1)) (\lambda (t: T).(eq T t t1)) H4 (THead k0 (lift h d t0) (lift h (s k0 d) t1)) (lift_head k0 t0 t1 h d)) in (H7 (lift h d t0) h (s k0 d) H8 P)))))) H3)) H2)))))))))))) t)). theorem lift_r: \forall (t: T).(\forall (d: nat).(eq T (lift O d t) t)) @@ -552,7 +552,7 @@ theorem lift_weight_add: theorem lift_weight_add_O: \forall (w: nat).(\forall (t: T).(\forall (h: nat).(\forall (f: ((nat \to nat))).(eq nat (weight_map f (lift h O t)) (weight_map (wadd f w) (lift (S h) O t)))))) \def - \lambda (w: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (f: ((nat \to nat))).(lift_weight_add (plus (wadd f w O) O) t h O f (wadd f w) (\lambda (m: nat).(\lambda (H: (lt m O)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (n: nat).((eq nat n O) \to (eq nat (wadd f w m) (f m))))) with [le_n \Rightarrow (\lambda (H0: (eq nat (S m) O)).(let H1 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind (eq nat (wadd f w m) (f m)) H1))) | (le_S m0 H0) \Rightarrow (\lambda (H1: (eq nat (S m0) O)).((let H2 \def (eq_ind nat (S m0) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind ((le (S m) m0) \to (eq nat (wadd f w m) (f m))) H2)) H0))]) in (H0 (refl_equal nat O))))) (plus_n_O (wadd f w O)) (\lambda (m: nat).(\lambda (_: (le O m)).(refl_equal nat (f m)))))))). + \lambda (w: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (f: ((nat \to nat))).(lift_weight_add (plus (wadd f w O) O) t h O f (wadd f w) (\lambda (m: nat).(\lambda (H: (lt m O)).(let H0 \def (match H return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to (eq nat (wadd f w m) (f m))))) with [le_n \Rightarrow (\lambda (H0: (eq nat (S m) O)).(let H1 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind (eq nat (wadd f w m) (f m)) H1))) | (le_S m0 H0) \Rightarrow (\lambda (H1: (eq nat (S m0) O)).((let H2 \def (eq_ind nat (S m0) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind ((le (S m) m0) \to (eq nat (wadd f w m) (f m))) H2)) H0))]) in (H0 (refl_equal nat O))))) (plus_n_O (wadd f w O)) (\lambda (m: nat).(\lambda (_: (le O m)).(refl_equal nat (f m)))))))). theorem lift_tlt_dx: \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).(tlt t (THead k u (lift h d t))))))) @@ -650,27 +650,27 @@ inductive drop: nat \to (nat \to (C \to (C \to Prop))) \def theorem drop_gen_sort: \forall (n: nat).(\forall (h: nat).(\forall (d: nat).(\forall (x: C).((drop h d (CSort n) x) \to (and3 (eq C x (CSort n)) (eq nat h O) (eq nat d O)))))) \def - \lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (x: C).(\lambda (H: (drop h d (CSort n) x)).(insert_eq C (CSort n) (\lambda (c: C).(drop h d c x)) (and3 (eq C x (CSort n)) (eq nat h O) (eq nat d O)) (\lambda (y: C).(\lambda (H0: (drop h d y x)).(drop_ind (\lambda (n0: nat).(\lambda (n1: nat).(\lambda (c: C).(\lambda (c0: C).((eq C c (CSort n)) \to (and3 (eq C c0 (CSort n)) (eq nat n0 O) (eq nat n1 O))))))) (\lambda (c: C).(\lambda (H1: (eq C c (CSort n))).(let H2 \def (f_equal C C (\lambda (e: C).e) c (CSort n) H1) in (eq_ind_r C (CSort n) (\lambda (c0: C).(and3 (eq C c0 (CSort n)) (eq nat O O) (eq nat O O))) (and3_intro (eq C (CSort n) (CSort n)) (eq nat O O) (eq nat O O) (refl_equal C (CSort n)) (refl_equal nat O) (refl_equal nat O)) c H2)))) (\lambda (k: K).(\lambda (h0: nat).(\lambda (c: C).(\lambda (e: C).(\lambda (_: (drop (r k h0) O c e)).(\lambda (_: (((eq C c (CSort n)) \to (and3 (eq C e (CSort n)) (eq nat (r k h0) O) (eq nat O O))))).(\lambda (u: T).(\lambda (H3: (eq C (CHead c k u) (CSort n))).(let H4 \def (eq_ind C (CHead c k u) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in (False_ind (and3 (eq C e (CSort n)) (eq nat (S h0) O) (eq nat O O)) H4)))))))))) (\lambda (k: K).(\lambda (h0: nat).(\lambda (d0: nat).(\lambda (c: C).(\lambda (e: C).(\lambda (_: (drop h0 (r k d0) c e)).(\lambda (_: (((eq C c (CSort n)) \to (and3 (eq C e (CSort n)) (eq nat h0 O) (eq nat (r k d0) O))))).(\lambda (u: T).(\lambda (H3: (eq C (CHead c k (lift h0 (r k d0) u)) (CSort n))).(let H4 \def (eq_ind C (CHead c k (lift h0 (r k d0) u)) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in (False_ind (and3 (eq C (CHead e k u) (CSort n)) (eq nat h0 O) (eq nat (S d0) O)) H4))))))))))) h d y x H0))) H))))). + \lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (x: C).(\lambda (H: (drop h d (CSort n) x)).(insert_eq C (CSort n) (\lambda (c: C).(drop h d c x)) (and3 (eq C x (CSort n)) (eq nat h O) (eq nat d O)) (\lambda (y: C).(\lambda (H0: (drop h d y x)).(drop_ind (\lambda (n0: nat).(\lambda (n1: nat).(\lambda (c: C).(\lambda (c0: C).((eq C c (CSort n)) \to (and3 (eq C c0 (CSort n)) (eq nat n0 O) (eq nat n1 O))))))) (\lambda (c: C).(\lambda (H1: (eq C c (CSort n))).(let H2 \def (f_equal C C (\lambda (e: C).e) c (CSort n) H1) in (eq_ind_r C (CSort n) (\lambda (c0: C).(and3 (eq C c0 (CSort n)) (eq nat O O) (eq nat O O))) (and3_intro (eq C (CSort n) (CSort n)) (eq nat O O) (eq nat O O) (refl_equal C (CSort n)) (refl_equal nat O) (refl_equal nat O)) c H2)))) (\lambda (k: K).(\lambda (h0: nat).(\lambda (c: C).(\lambda (e: C).(\lambda (_: (drop (r k h0) O c e)).(\lambda (_: (((eq C c (CSort n)) \to (and3 (eq C e (CSort n)) (eq nat (r k h0) O) (eq nat O O))))).(\lambda (u: T).(\lambda (H3: (eq C (CHead c k u) (CSort n))).(let H4 \def (eq_ind C (CHead c k u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in (False_ind (and3 (eq C e (CSort n)) (eq nat (S h0) O) (eq nat O O)) H4)))))))))) (\lambda (k: K).(\lambda (h0: nat).(\lambda (d0: nat).(\lambda (c: C).(\lambda (e: C).(\lambda (_: (drop h0 (r k d0) c e)).(\lambda (_: (((eq C c (CSort n)) \to (and3 (eq C e (CSort n)) (eq nat h0 O) (eq nat (r k d0) O))))).(\lambda (u: T).(\lambda (H3: (eq C (CHead c k (lift h0 (r k d0) u)) (CSort n))).(let H4 \def (eq_ind C (CHead c k (lift h0 (r k d0) u)) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H3) in (False_ind (and3 (eq C (CHead e k u) (CSort n)) (eq nat h0 O) (eq nat (S d0) O)) H4))))))))))) h d y x H0))) H))))). theorem drop_gen_refl: \forall (x: C).(\forall (e: C).((drop O O x e) \to (eq C x e))) \def - \lambda (x: C).(\lambda (e: C).(\lambda (H: (drop O O x e)).(insert_eq nat O (\lambda (n: nat).(drop n O x e)) (eq C x e) (\lambda (y: nat).(\lambda (H0: (drop y O x e)).(insert_eq nat O (\lambda (n: nat).(drop y n x e)) ((eq nat y O) \to (eq C x e)) (\lambda (y0: nat).(\lambda (H1: (drop y y0 x e)).(drop_ind (\lambda (n: nat).(\lambda (n0: nat).(\lambda (c: C).(\lambda (c0: C).((eq nat n0 O) \to ((eq nat n O) \to (eq C c c0))))))) (\lambda (c: C).(\lambda (_: (eq nat O O)).(\lambda (_: (eq nat O O)).(refl_equal C c)))) (\lambda (k: K).(\lambda (h: nat).(\lambda (c: C).(\lambda (e0: C).(\lambda (_: (drop (r k h) O c e0)).(\lambda (_: (((eq nat O O) \to ((eq nat (r k h) O) \to (eq C c e0))))).(\lambda (u: T).(\lambda (_: (eq nat O O)).(\lambda (H5: (eq nat (S h) O)).(let H6 \def (eq_ind nat (S h) (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H5) in (False_ind (eq C (CHead c k u) e0) H6))))))))))) (\lambda (k: K).(\lambda (h: nat).(\lambda (d: nat).(\lambda (c: C).(\lambda (e0: C).(\lambda (H2: (drop h (r k d) c e0)).(\lambda (H3: (((eq nat (r k d) O) \to ((eq nat h O) \to (eq C c e0))))).(\lambda (u: T).(\lambda (H4: (eq nat (S d) O)).(\lambda (H5: (eq nat h O)).(let H6 \def (f_equal nat nat (\lambda (e1: nat).e1) h O H5) in (let H7 \def (eq_ind nat h (\lambda (n: nat).((eq nat (r k d) O) \to ((eq nat n O) \to (eq C c e0)))) H3 O H6) in (let H8 \def (eq_ind nat h (\lambda (n: nat).(drop n (r k d) c e0)) H2 O H6) in (eq_ind_r nat O (\lambda (n: nat).(eq C (CHead c k (lift n (r k d) u)) (CHead e0 k u))) (let H9 \def (eq_ind nat (S d) (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (eq C (CHead c k (lift O (r k d) u)) (CHead e0 k u)) H9)) h H6)))))))))))))) y y0 x e H1))) H0))) H))). + \lambda (x: C).(\lambda (e: C).(\lambda (H: (drop O O x e)).(insert_eq nat O (\lambda (n: nat).(drop n O x e)) (eq C x e) (\lambda (y: nat).(\lambda (H0: (drop y O x e)).(insert_eq nat O (\lambda (n: nat).(drop y n x e)) ((eq nat y O) \to (eq C x e)) (\lambda (y0: nat).(\lambda (H1: (drop y y0 x e)).(drop_ind (\lambda (n: nat).(\lambda (n0: nat).(\lambda (c: C).(\lambda (c0: C).((eq nat n0 O) \to ((eq nat n O) \to (eq C c c0))))))) (\lambda (c: C).(\lambda (_: (eq nat O O)).(\lambda (_: (eq nat O O)).(refl_equal C c)))) (\lambda (k: K).(\lambda (h: nat).(\lambda (c: C).(\lambda (e0: C).(\lambda (_: (drop (r k h) O c e0)).(\lambda (_: (((eq nat O O) \to ((eq nat (r k h) O) \to (eq C c e0))))).(\lambda (u: T).(\lambda (_: (eq nat O O)).(\lambda (H5: (eq nat (S h) O)).(let H6 \def (eq_ind nat (S h) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H5) in (False_ind (eq C (CHead c k u) e0) H6))))))))))) (\lambda (k: K).(\lambda (h: nat).(\lambda (d: nat).(\lambda (c: C).(\lambda (e0: C).(\lambda (H2: (drop h (r k d) c e0)).(\lambda (H3: (((eq nat (r k d) O) \to ((eq nat h O) \to (eq C c e0))))).(\lambda (u: T).(\lambda (H4: (eq nat (S d) O)).(\lambda (H5: (eq nat h O)).(let H6 \def (f_equal nat nat (\lambda (e1: nat).e1) h O H5) in (let H7 \def (eq_ind nat h (\lambda (n: nat).((eq nat (r k d) O) \to ((eq nat n O) \to (eq C c e0)))) H3 O H6) in (let H8 \def (eq_ind nat h (\lambda (n: nat).(drop n (r k d) c e0)) H2 O H6) in (eq_ind_r nat O (\lambda (n: nat).(eq C (CHead c k (lift n (r k d) u)) (CHead e0 k u))) (let H9 \def (eq_ind nat (S d) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (eq C (CHead c k (lift O (r k d) u)) (CHead e0 k u)) H9)) h H6)))))))))))))) y y0 x e H1))) H0))) H))). theorem drop_gen_drop: \forall (k: K).(\forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).((drop (S h) O (CHead c k u) x) \to (drop (r k h) O c x)))))) \def - \lambda (k: K).(\lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (H: (drop (S h) O (CHead c k u) x)).(insert_eq C (CHead c k u) (\lambda (c0: C).(drop (S h) O c0 x)) (drop (r k h) O c x) (\lambda (y: C).(\lambda (H0: (drop (S h) O y x)).(insert_eq nat O (\lambda (n: nat).(drop (S h) n y x)) ((eq C y (CHead c k u)) \to (drop (r k h) O c x)) (\lambda (y0: nat).(\lambda (H1: (drop (S h) y0 y x)).(insert_eq nat (S h) (\lambda (n: nat).(drop n y0 y x)) ((eq nat y0 O) \to ((eq C y (CHead c k u)) \to (drop (r k h) O c x))) (\lambda (y1: nat).(\lambda (H2: (drop y1 y0 y x)).(drop_ind (\lambda (n: nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq nat n (S h)) \to ((eq nat n0 O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) O c c1)))))))) (\lambda (c0: C).(\lambda (H3: (eq nat O (S h))).(\lambda (_: (eq nat O O)).(\lambda (_: (eq C c0 (CHead c k u))).(let H6 \def (match H3 return (\lambda (_: ?).(\lambda (n: nat).((eq nat n (S h)) \to (drop (r k h) O c c0)))) with [refl_equal \Rightarrow (\lambda (H2: (eq nat O (S h))).(let H3 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S h) H2) in (False_ind (drop (r k h) O c c0) H3)))]) in (H6 (refl_equal nat (S h)))))))) (\lambda (k0: K).(\lambda (h0: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (H3: (drop (r k0 h0) O c0 e)).(\lambda (_: (((eq nat (r k0 h0) (S h)) \to ((eq nat O O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) O c e)))))).(\lambda (u0: T).(\lambda (H5: (eq nat (S h0) (S h))).(\lambda (_: (eq nat O O)).(\lambda (H7: (eq C (CHead c0 k0 u0) (CHead c k u))).(let H8 \def (match H5 return (\lambda (_: ?).(\lambda (n: nat).((eq nat n (S h)) \to (drop (r k h) O c e)))) with [refl_equal \Rightarrow (\lambda (H4: (eq nat (S h0) (S h))).(let H5 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: ?).nat) with [O \Rightarrow h0 | (S n) \Rightarrow n])) (S h0) (S h) H4) in (eq_ind nat h (\lambda (_: nat).(drop (r k h) O c e)) (let H6 \def (match H7 return (\lambda (_: ?).(\lambda (c0: C).((eq C c0 (CHead c k u)) \to (drop (r k h) O c e)))) with [refl_equal \Rightarrow (\lambda (H4: (eq C (CHead c0 k0 u0) (CHead c k u))).(let H6 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u0) (CHead c k u) H4) in ((let H7 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c0 k0 u0) (CHead c k u) H4) in ((let H8 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 u0) (CHead c k u) H4) in (eq_ind C c (\lambda (_: C).((eq K k0 k) \to ((eq T u0 u) \to (drop (r k h) O c e)))) (\lambda (H9: (eq K k0 k)).(eq_ind K k (\lambda (_: K).((eq T u0 u) \to (drop (r k h) O c e))) (\lambda (H10: (eq T u0 u)).(eq_ind T u (\lambda (_: T).(drop (r k h) O c e)) (eq_ind nat h0 (\lambda (n: nat).(drop (r k n) O c e)) (eq_ind C c0 (\lambda (c: C).(drop (r k h0) O c e)) (eq_ind K k0 (\lambda (k: K).(drop (r k h0) O c0 e)) H3 k H9) c H8) h H5) u0 (sym_eq T u0 u H10))) k0 (sym_eq K k0 k H9))) c0 (sym_eq C c0 c H8))) H7)) H6)))]) in (H6 (refl_equal C (CHead c k u)))) h0 (sym_eq nat h0 h H5))))]) in (H8 (refl_equal nat (S h)))))))))))))) (\lambda (k0: K).(\lambda (h0: nat).(\lambda (d: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (_: (drop h0 (r k0 d) c0 e)).(\lambda (_: (((eq nat h0 (S h)) \to ((eq nat (r k0 d) O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) O c e)))))).(\lambda (u0: T).(\lambda (_: (eq nat h0 (S h))).(\lambda (H6: (eq nat (S d) O)).(\lambda (_: (eq C (CHead c0 k0 (lift h0 (r k0 d) u0)) (CHead c k u))).(let H8 \def (match H6 return (\lambda (_: ?).(\lambda (n: nat).((eq nat n O) \to (drop (r k h) O c (CHead e k0 u0))))) with [refl_equal \Rightarrow (\lambda (H4: (eq nat (S d) O)).(let H5 \def (eq_ind nat (S d) (\lambda (e0: nat).(match e0 return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (drop (r k h) O c (CHead e k0 u0)) H5)))]) in (H8 (refl_equal nat O)))))))))))))) y1 y0 y x H2))) H1))) H0))) H)))))). + \lambda (k: K).(\lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (H: (drop (S h) O (CHead c k u) x)).(insert_eq C (CHead c k u) (\lambda (c0: C).(drop (S h) O c0 x)) (drop (r k h) O c x) (\lambda (y: C).(\lambda (H0: (drop (S h) O y x)).(insert_eq nat O (\lambda (n: nat).(drop (S h) n y x)) ((eq C y (CHead c k u)) \to (drop (r k h) O c x)) (\lambda (y0: nat).(\lambda (H1: (drop (S h) y0 y x)).(insert_eq nat (S h) (\lambda (n: nat).(drop n y0 y x)) ((eq nat y0 O) \to ((eq C y (CHead c k u)) \to (drop (r k h) O c x))) (\lambda (y1: nat).(\lambda (H2: (drop y1 y0 y x)).(drop_ind (\lambda (n: nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq nat n (S h)) \to ((eq nat n0 O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) O c c1)))))))) (\lambda (c0: C).(\lambda (H3: (eq nat O (S h))).(\lambda (_: (eq nat O O)).(\lambda (_: (eq C c0 (CHead c k u))).(let H6 \def (match H3 return (\lambda (n: nat).(\lambda (_: (eq ? ? n)).((eq nat n (S h)) \to (drop (r k h) O c c0)))) with [refl_equal \Rightarrow (\lambda (H2: (eq nat O (S h))).(let H3 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S h) H2) in (False_ind (drop (r k h) O c c0) H3)))]) in (H6 (refl_equal nat (S h)))))))) (\lambda (k0: K).(\lambda (h0: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (H3: (drop (r k0 h0) O c0 e)).(\lambda (_: (((eq nat (r k0 h0) (S h)) \to ((eq nat O O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) O c e)))))).(\lambda (u0: T).(\lambda (H5: (eq nat (S h0) (S h))).(\lambda (_: (eq nat O O)).(\lambda (H7: (eq C (CHead c0 k0 u0) (CHead c k u))).(let H8 \def (match H5 return (\lambda (n: nat).(\lambda (_: (eq ? ? n)).((eq nat n (S h)) \to (drop (r k h) O c e)))) with [refl_equal \Rightarrow (\lambda (H4: (eq nat (S h0) (S h))).(let H5 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: nat).nat) with [O \Rightarrow h0 | (S n) \Rightarrow n])) (S h0) (S h) H4) in (eq_ind nat h (\lambda (_: nat).(drop (r k h) O c e)) (let H6 \def (match H7 return (\lambda (c0: C).(\lambda (_: (eq ? ? c0)).((eq C c0 (CHead c k u)) \to (drop (r k h) O c e)))) with [refl_equal \Rightarrow (\lambda (H4: (eq C (CHead c0 k0 u0) (CHead c k u))).(let H6 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u0) (CHead c k u) H4) in ((let H7 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c0 k0 u0) (CHead c k u) H4) in ((let H8 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 u0) (CHead c k u) H4) in (eq_ind C c (\lambda (_: C).((eq K k0 k) \to ((eq T u0 u) \to (drop (r k h) O c e)))) (\lambda (H9: (eq K k0 k)).(eq_ind K k (\lambda (_: K).((eq T u0 u) \to (drop (r k h) O c e))) (\lambda (H10: (eq T u0 u)).(eq_ind T u (\lambda (_: T).(drop (r k h) O c e)) (eq_ind nat h0 (\lambda (n: nat).(drop (r k n) O c e)) (eq_ind C c0 (\lambda (c: C).(drop (r k h0) O c e)) (eq_ind K k0 (\lambda (k: K).(drop (r k h0) O c0 e)) H3 k H9) c H8) h H5) u0 (sym_eq T u0 u H10))) k0 (sym_eq K k0 k H9))) c0 (sym_eq C c0 c H8))) H7)) H6)))]) in (H6 (refl_equal C (CHead c k u)))) h0 (sym_eq nat h0 h H5))))]) in (H8 (refl_equal nat (S h)))))))))))))) (\lambda (k0: K).(\lambda (h0: nat).(\lambda (d: nat).(\lambda (c0: C).(\lambda (e: C).(\lambda (_: (drop h0 (r k0 d) c0 e)).(\lambda (_: (((eq nat h0 (S h)) \to ((eq nat (r k0 d) O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) O c e)))))).(\lambda (u0: T).(\lambda (_: (eq nat h0 (S h))).(\lambda (H6: (eq nat (S d) O)).(\lambda (_: (eq C (CHead c0 k0 (lift h0 (r k0 d) u0)) (CHead c k u))).(let H8 \def (match H6 return (\lambda (n: nat).(\lambda (_: (eq ? ? n)).((eq nat n O) \to (drop (r k h) O c (CHead e k0 u0))))) with [refl_equal \Rightarrow (\lambda (H4: (eq nat (S d) O)).(let H5 \def (eq_ind nat (S d) (\lambda (e0: nat).(match e0 return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (drop (r k h) O c (CHead e k0 u0)) H5)))]) in (H8 (refl_equal nat O)))))))))))))) y1 y0 y x H2))) H1))) H0))) H)))))). theorem drop_gen_skip_r: \forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).(\forall (d: nat).(\forall (k: K).((drop h (S d) x (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C x (CHead e k (lift h (r k d) u)))) (\lambda (e: C).(drop h (r k d) e c))))))))) \def - \lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) x (CHead c k u))).(let H0 \def (match H return (\lambda (_: ?).(\lambda (n: nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq nat n h) \to ((eq nat n0 (S d)) \to ((eq C c0 x) \to ((eq C c1 (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C x (CHead e k (lift h (r k d) u)))) (\lambda (e: C).(drop h (r k d) e c)))))))))))) with [(drop_refl c0) \Rightarrow (\lambda (H0: (eq nat O h)).(\lambda (H1: (eq nat O (S d))).(\lambda (H2: (eq C c0 x)).(\lambda (H3: (eq C c0 (CHead c k u))).(eq_ind nat O (\lambda (n: nat).((eq nat O (S d)) \to ((eq C c0 x) \to ((eq C c0 (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C x (CHead e k (lift n (r k d) u)))) (\lambda (e: C).(drop n (r k d) e c))))))) (\lambda (H4: (eq nat O (S d))).(let H5 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) H4) in (False_ind ((eq C c0 x) \to ((eq C c0 (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C x (CHead e k (lift O (r k d) u)))) (\lambda (e: C).(drop O (r k d) e c))))) H5))) h H0 H1 H2 H3))))) | (drop_drop k0 h0 c0 e H0 u0) \Rightarrow (\lambda (H1: (eq nat (S h0) h)).(\lambda (H2: (eq nat O (S d))).(\lambda (H3: (eq C (CHead c0 k0 u0) x)).(\lambda (H4: (eq C e (CHead c k u))).(eq_ind nat (S h0) (\lambda (n: nat).((eq nat O (S d)) \to ((eq C (CHead c0 k0 u0) x) \to ((eq C e (CHead c k u)) \to ((drop (r k0 h0) O c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift n (r k d) u)))) (\lambda (e0: C).(drop n (r k d) e0 c)))))))) (\lambda (H5: (eq nat O (S d))).(let H6 \def (eq_ind nat O (\lambda (e0: nat).(match e0 return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) H5) in (False_ind ((eq C (CHead c0 k0 u0) x) \to ((eq C e (CHead c k u)) \to ((drop (r k0 h0) O c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift (S h0) (r k d) u)))) (\lambda (e0: C).(drop (S h0) (r k d) e0 c)))))) H6))) h H1 H2 H3 H4 H0))))) | (drop_skip k0 h0 d0 c0 e H0 u0) \Rightarrow (\lambda (H1: (eq nat h0 h)).(\lambda (H2: (eq nat (S d0) (S d))).(\lambda (H3: (eq C (CHead c0 k0 (lift h0 (r k0 d0) u0)) x)).(\lambda (H4: (eq C (CHead e k0 u0) (CHead c k u))).(eq_ind nat h (\lambda (n: nat).((eq nat (S d0) (S d)) \to ((eq C (CHead c0 k0 (lift n (r k0 d0) u0)) x) \to ((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop n (r k0 d0) c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)))))))) (\lambda (H5: (eq nat (S d0) (S d))).(let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: ?).nat) with [O \Rightarrow d0 | (S n) \Rightarrow n])) (S d0) (S d) H5) in (eq_ind nat d (\lambda (n: nat).((eq C (CHead c0 k0 (lift h (r k0 n) u0)) x) \to ((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop h (r k0 n) c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c))))))) (\lambda (H7: (eq C (CHead c0 k0 (lift h (r k0 d) u0)) x)).(eq_ind C (CHead c0 k0 (lift h (r k0 d) u0)) (\lambda (c1: C).((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop h (r k0 d) c0 e) \to (ex2 C (\lambda (e0: C).(eq C c1 (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)))))) (\lambda (H8: (eq C (CHead e k0 u0) (CHead c k u))).(let H9 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e k0 u0) (CHead c k u) H8) in ((let H10 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead e k0 u0) (CHead c k u) H8) in ((let H11 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow c])) (CHead e k0 u0) (CHead c k u) H8) in (eq_ind C c (\lambda (c1: C).((eq K k0 k) \to ((eq T u0 u) \to ((drop h (r k0 d) c0 c1) \to (ex2 C (\lambda (e0: C).(eq C (CHead c0 k0 (lift h (r k0 d) u0)) (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c))))))) (\lambda (H12: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T u0 u) \to ((drop h (r k1 d) c0 c) \to (ex2 C (\lambda (e0: C).(eq C (CHead c0 k1 (lift h (r k1 d) u0)) (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)))))) (\lambda (H13: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((drop h (r k d) c0 c) \to (ex2 C (\lambda (e0: C).(eq C (CHead c0 k (lift h (r k d) t)) (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c))))) (\lambda (H14: (drop h (r k d) c0 c)).(let H15 \def (eq_ind T u0 (\lambda (t: T).(eq C (CHead c0 k0 (lift h (r k0 d) t)) x)) H7 u H13) in (let H16 \def (eq_ind K k0 (\lambda (k: K).(eq C (CHead c0 k (lift h (r k d) u)) x)) H15 k H12) in (let H17 \def (eq_ind_r C x (\lambda (c0: C).(drop h (S d) c0 (CHead c k u))) H (CHead c0 k (lift h (r k d) u)) H16) in (ex_intro2 C (\lambda (e0: C).(eq C (CHead c0 k (lift h (r k d) u)) (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)) c0 (refl_equal C (CHead c0 k (lift h (r k d) u))) H14))))) u0 (sym_eq T u0 u H13))) k0 (sym_eq K k0 k H12))) e (sym_eq C e c H11))) H10)) H9))) x H7)) d0 (sym_eq nat d0 d H6)))) h0 (sym_eq nat h0 h H1) H2 H3 H4 H0)))))]) in (H0 (refl_equal nat h) (refl_equal nat (S d)) (refl_equal C x) (refl_equal C (CHead c k u)))))))))). + \lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) x (CHead c k u))).(let H0 \def (match H return (\lambda (n: nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop n n0 c0 c1)).((eq nat n h) \to ((eq nat n0 (S d)) \to ((eq C c0 x) \to ((eq C c1 (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C x (CHead e k (lift h (r k d) u)))) (\lambda (e: C).(drop h (r k d) e c)))))))))))) with [(drop_refl c0) \Rightarrow (\lambda (H0: (eq nat O h)).(\lambda (H1: (eq nat O (S d))).(\lambda (H2: (eq C c0 x)).(\lambda (H3: (eq C c0 (CHead c k u))).(eq_ind nat O (\lambda (n: nat).((eq nat O (S d)) \to ((eq C c0 x) \to ((eq C c0 (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C x (CHead e k (lift n (r k d) u)))) (\lambda (e: C).(drop n (r k d) e c))))))) (\lambda (H4: (eq nat O (S d))).(let H5 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) H4) in (False_ind ((eq C c0 x) \to ((eq C c0 (CHead c k u)) \to (ex2 C (\lambda (e: C).(eq C x (CHead e k (lift O (r k d) u)))) (\lambda (e: C).(drop O (r k d) e c))))) H5))) h H0 H1 H2 H3))))) | (drop_drop k0 h0 c0 e H0 u0) \Rightarrow (\lambda (H1: (eq nat (S h0) h)).(\lambda (H2: (eq nat O (S d))).(\lambda (H3: (eq C (CHead c0 k0 u0) x)).(\lambda (H4: (eq C e (CHead c k u))).(eq_ind nat (S h0) (\lambda (n: nat).((eq nat O (S d)) \to ((eq C (CHead c0 k0 u0) x) \to ((eq C e (CHead c k u)) \to ((drop (r k0 h0) O c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift n (r k d) u)))) (\lambda (e0: C).(drop n (r k d) e0 c)))))))) (\lambda (H5: (eq nat O (S d))).(let H6 \def (eq_ind nat O (\lambda (e0: nat).(match e0 return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) H5) in (False_ind ((eq C (CHead c0 k0 u0) x) \to ((eq C e (CHead c k u)) \to ((drop (r k0 h0) O c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift (S h0) (r k d) u)))) (\lambda (e0: C).(drop (S h0) (r k d) e0 c)))))) H6))) h H1 H2 H3 H4 H0))))) | (drop_skip k0 h0 d0 c0 e H0 u0) \Rightarrow (\lambda (H1: (eq nat h0 h)).(\lambda (H2: (eq nat (S d0) (S d))).(\lambda (H3: (eq C (CHead c0 k0 (lift h0 (r k0 d0) u0)) x)).(\lambda (H4: (eq C (CHead e k0 u0) (CHead c k u))).(eq_ind nat h (\lambda (n: nat).((eq nat (S d0) (S d)) \to ((eq C (CHead c0 k0 (lift n (r k0 d0) u0)) x) \to ((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop n (r k0 d0) c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)))))))) (\lambda (H5: (eq nat (S d0) (S d))).(let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: nat).nat) with [O \Rightarrow d0 | (S n) \Rightarrow n])) (S d0) (S d) H5) in (eq_ind nat d (\lambda (n: nat).((eq C (CHead c0 k0 (lift h (r k0 n) u0)) x) \to ((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop h (r k0 n) c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c))))))) (\lambda (H7: (eq C (CHead c0 k0 (lift h (r k0 d) u0)) x)).(eq_ind C (CHead c0 k0 (lift h (r k0 d) u0)) (\lambda (c1: C).((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop h (r k0 d) c0 e) \to (ex2 C (\lambda (e0: C).(eq C c1 (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)))))) (\lambda (H8: (eq C (CHead e k0 u0) (CHead c k u))).(let H9 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e k0 u0) (CHead c k u) H8) in ((let H10 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead e k0 u0) (CHead c k u) H8) in ((let H11 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow c])) (CHead e k0 u0) (CHead c k u) H8) in (eq_ind C c (\lambda (c1: C).((eq K k0 k) \to ((eq T u0 u) \to ((drop h (r k0 d) c0 c1) \to (ex2 C (\lambda (e0: C).(eq C (CHead c0 k0 (lift h (r k0 d) u0)) (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c))))))) (\lambda (H12: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T u0 u) \to ((drop h (r k1 d) c0 c) \to (ex2 C (\lambda (e0: C).(eq C (CHead c0 k1 (lift h (r k1 d) u0)) (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)))))) (\lambda (H13: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((drop h (r k d) c0 c) \to (ex2 C (\lambda (e0: C).(eq C (CHead c0 k (lift h (r k d) t)) (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c))))) (\lambda (H14: (drop h (r k d) c0 c)).(let H15 \def (eq_ind T u0 (\lambda (t: T).(eq C (CHead c0 k0 (lift h (r k0 d) t)) x)) H7 u H13) in (let H16 \def (eq_ind K k0 (\lambda (k: K).(eq C (CHead c0 k (lift h (r k d) u)) x)) H15 k H12) in (let H17 \def (eq_ind_r C x (\lambda (c0: C).(drop h (S d) c0 (CHead c k u))) H (CHead c0 k (lift h (r k d) u)) H16) in (ex_intro2 C (\lambda (e0: C).(eq C (CHead c0 k (lift h (r k d) u)) (CHead e0 k (lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)) c0 (refl_equal C (CHead c0 k (lift h (r k d) u))) H14))))) u0 (sym_eq T u0 u H13))) k0 (sym_eq K k0 k H12))) e (sym_eq C e c H11))) H10)) H9))) x H7)) d0 (sym_eq nat d0 d H6)))) h0 (sym_eq nat h0 h H1) H2 H3 H4 H0)))))]) in (H0 (refl_equal nat h) (refl_equal nat (S d)) (refl_equal C x) (refl_equal C (CHead c k u)))))))))). theorem drop_gen_skip_l: \forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).(\forall (d: nat).(\forall (k: K).((drop h (S d) (CHead c k u) x) \to (ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k d) c e)))))))))) \def - \lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) (CHead c k u) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (n: nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq nat n h) \to ((eq nat n0 (S d)) \to ((eq C c0 (CHead c k u)) \to ((eq C c1 x) \to (ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k d) c e))))))))))))) with [(drop_refl c0) \Rightarrow (\lambda (H0: (eq nat O h)).(\lambda (H1: (eq nat O (S d))).(\lambda (H2: (eq C c0 (CHead c k u))).(\lambda (H3: (eq C c0 x)).(eq_ind nat O (\lambda (n: nat).((eq nat O (S d)) \to ((eq C c0 (CHead c k u)) \to ((eq C c0 x) \to (ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift n (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop n (r k d) c e)))))))) (\lambda (H4: (eq nat O (S d))).(let H5 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) H4) in (False_ind ((eq C c0 (CHead c k u)) \to ((eq C c0 x) \to (ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift O (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop O (r k d) c e)))))) H5))) h H0 H1 H2 H3))))) | (drop_drop k0 h0 c0 e H0 u0) \Rightarrow (\lambda (H1: (eq nat (S h0) h)).(\lambda (H2: (eq nat O (S d))).(\lambda (H3: (eq C (CHead c0 k0 u0) (CHead c k u))).(\lambda (H4: (eq C e x)).(eq_ind nat (S h0) (\lambda (n: nat).((eq nat O (S d)) \to ((eq C (CHead c0 k0 u0) (CHead c k u)) \to ((eq C e x) \to ((drop (r k0 h0) O c0 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift n (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop n (r k d) c e0))))))))) (\lambda (H5: (eq nat O (S d))).(let H6 \def (eq_ind nat O (\lambda (e0: nat).(match e0 return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) H5) in (False_ind ((eq C (CHead c0 k0 u0) (CHead c k u)) \to ((eq C e x) \to ((drop (r k0 h0) O c0 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift (S h0) (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop (S h0) (r k d) c e0))))))) H6))) h H1 H2 H3 H4 H0))))) | (drop_skip k0 h0 d0 c0 e H0 u0) \Rightarrow (\lambda (H1: (eq nat h0 h)).(\lambda (H2: (eq nat (S d0) (S d))).(\lambda (H3: (eq C (CHead c0 k0 (lift h0 (r k0 d0) u0)) (CHead c k u))).(\lambda (H4: (eq C (CHead e k0 u0) x)).(eq_ind nat h (\lambda (n: nat).((eq nat (S d0) (S d)) \to ((eq C (CHead c0 k0 (lift n (r k0 d0) u0)) (CHead c k u)) \to ((eq C (CHead e k0 u0) x) \to ((drop n (r k0 d0) c0 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0))))))))) (\lambda (H5: (eq nat (S d0) (S d))).(let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: ?).nat) with [O \Rightarrow d0 | (S n) \Rightarrow n])) (S d0) (S d) H5) in (eq_ind nat d (\lambda (n: nat).((eq C (CHead c0 k0 (lift h (r k0 n) u0)) (CHead c k u)) \to ((eq C (CHead e k0 u0) x) \to ((drop h (r k0 n) c0 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))))) (\lambda (H7: (eq C (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u))).(let H8 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) (r k0 d) u0) | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) in ((let H9 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) in ((let H10 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) in (eq_ind C c (\lambda (c1: C).((eq K k0 k) \to ((eq T (lift h (r k0 d) u0) u) \to ((eq C (CHead e k0 u0) x) \to ((drop h (r k0 d) c1 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0))))))))) (\lambda (H11: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T (lift h (r k1 d) u0) u) \to ((eq C (CHead e k1 u0) x) \to ((drop h (r k1 d) c e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))))) (\lambda (H12: (eq T (lift h (r k d) u0) u)).(eq_ind T (lift h (r k d) u0) (\lambda (t: T).((eq C (CHead e k u0) x) \to ((drop h (r k d) c e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0))))))) (\lambda (H13: (eq C (CHead e k u0) x)).(eq_ind C (CHead e k u0) (\lambda (c1: C).((drop h (r k d) c e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C c1 (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift h (r k d) u0) (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))) (\lambda (H14: (drop h (r k d) c e)).(let H15 \def (eq_ind_r T u (\lambda (t: T).(drop h (S d) (CHead c k t) x)) H (lift h (r k d) u0) H12) in (let H16 \def (eq_ind_r C x (\lambda (c0: C).(drop h (S d) (CHead c k (lift h (r k d) u0)) c0)) H15 (CHead e k u0) H13) in (ex3_2_intro C T (\lambda (e0: C).(\lambda (v: T).(eq C (CHead e k u0) (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift h (r k d) u0) (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0))) e u0 (refl_equal C (CHead e k u0)) (refl_equal T (lift h (r k d) u0)) H14)))) x H13)) u H12)) k0 (sym_eq K k0 k H11))) c0 (sym_eq C c0 c H10))) H9)) H8))) d0 (sym_eq nat d0 d H6)))) h0 (sym_eq nat h0 h H1) H2 H3 H4 H0)))))]) in (H0 (refl_equal nat h) (refl_equal nat (S d)) (refl_equal C (CHead c k u)) (refl_equal C x))))))))). + \lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) (CHead c k u) x)).(let H0 \def (match H return (\lambda (n: nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop n n0 c0 c1)).((eq nat n h) \to ((eq nat n0 (S d)) \to ((eq C c0 (CHead c k u)) \to ((eq C c1 x) \to (ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k d) c e))))))))))))) with [(drop_refl c0) \Rightarrow (\lambda (H0: (eq nat O h)).(\lambda (H1: (eq nat O (S d))).(\lambda (H2: (eq C c0 (CHead c k u))).(\lambda (H3: (eq C c0 x)).(eq_ind nat O (\lambda (n: nat).((eq nat O (S d)) \to ((eq C c0 (CHead c k u)) \to ((eq C c0 x) \to (ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift n (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop n (r k d) c e)))))))) (\lambda (H4: (eq nat O (S d))).(let H5 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) H4) in (False_ind ((eq C c0 (CHead c k u)) \to ((eq C c0 x) \to (ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift O (r k d) v)))) (\lambda (e: C).(\lambda (_: T).(drop O (r k d) c e)))))) H5))) h H0 H1 H2 H3))))) | (drop_drop k0 h0 c0 e H0 u0) \Rightarrow (\lambda (H1: (eq nat (S h0) h)).(\lambda (H2: (eq nat O (S d))).(\lambda (H3: (eq C (CHead c0 k0 u0) (CHead c k u))).(\lambda (H4: (eq C e x)).(eq_ind nat (S h0) (\lambda (n: nat).((eq nat O (S d)) \to ((eq C (CHead c0 k0 u0) (CHead c k u)) \to ((eq C e x) \to ((drop (r k0 h0) O c0 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift n (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop n (r k d) c e0))))))))) (\lambda (H5: (eq nat O (S d))).(let H6 \def (eq_ind nat O (\lambda (e0: nat).(match e0 return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) H5) in (False_ind ((eq C (CHead c0 k0 u0) (CHead c k u)) \to ((eq C e x) \to ((drop (r k0 h0) O c0 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift (S h0) (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop (S h0) (r k d) c e0))))))) H6))) h H1 H2 H3 H4 H0))))) | (drop_skip k0 h0 d0 c0 e H0 u0) \Rightarrow (\lambda (H1: (eq nat h0 h)).(\lambda (H2: (eq nat (S d0) (S d))).(\lambda (H3: (eq C (CHead c0 k0 (lift h0 (r k0 d0) u0)) (CHead c k u))).(\lambda (H4: (eq C (CHead e k0 u0) x)).(eq_ind nat h (\lambda (n: nat).((eq nat (S d0) (S d)) \to ((eq C (CHead c0 k0 (lift n (r k0 d0) u0)) (CHead c k u)) \to ((eq C (CHead e k0 u0) x) \to ((drop n (r k0 d0) c0 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0))))))))) (\lambda (H5: (eq nat (S d0) (S d))).(let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: nat).nat) with [O \Rightarrow d0 | (S n) \Rightarrow n])) (S d0) (S d) H5) in (eq_ind nat d (\lambda (n: nat).((eq C (CHead c0 k0 (lift h (r k0 n) u0)) (CHead c k u)) \to ((eq C (CHead e k0 u0) x) \to ((drop h (r k0 n) c0 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))))) (\lambda (H7: (eq C (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u))).(let H8 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) (r k0 d) u0) | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) in ((let H9 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) in ((let H10 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) in (eq_ind C c (\lambda (c1: C).((eq K k0 k) \to ((eq T (lift h (r k0 d) u0) u) \to ((eq C (CHead e k0 u0) x) \to ((drop h (r k0 d) c1 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0))))))))) (\lambda (H11: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T (lift h (r k1 d) u0) u) \to ((eq C (CHead e k1 u0) x) \to ((drop h (r k1 d) c e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))))) (\lambda (H12: (eq T (lift h (r k d) u0) u)).(eq_ind T (lift h (r k d) u0) (\lambda (t: T).((eq C (CHead e k u0) x) \to ((drop h (r k d) c e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0))))))) (\lambda (H13: (eq C (CHead e k u0) x)).(eq_ind C (CHead e k u0) (\lambda (c1: C).((drop h (r k d) c e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C c1 (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift h (r k d) u0) (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))) (\lambda (H14: (drop h (r k d) c e)).(let H15 \def (eq_ind_r T u (\lambda (t: T).(drop h (S d) (CHead c k t) x)) H (lift h (r k d) u0) H12) in (let H16 \def (eq_ind_r C x (\lambda (c0: C).(drop h (S d) (CHead c k (lift h (r k d) u0)) c0)) H15 (CHead e k u0) H13) in (ex3_2_intro C T (\lambda (e0: C).(\lambda (v: T).(eq C (CHead e k u0) (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift h (r k d) u0) (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0))) e u0 (refl_equal C (CHead e k u0)) (refl_equal T (lift h (r k d) u0)) H14)))) x H13)) u H12)) k0 (sym_eq K k0 k H11))) c0 (sym_eq C c0 c H10))) H9)) H8))) d0 (sym_eq nat d0 d H6)))) h0 (sym_eq nat h0 h H1) H2 H3 H4 H0)))))]) in (H0 (refl_equal nat h) (refl_equal nat (S d)) (refl_equal C (CHead c k u)) (refl_equal C x))))))))). theorem drop_skip_bind: \forall (h: nat).(\forall (d: nat).(\forall (c: C).(\forall (e: C).((drop h d c e) \to (\forall (b: B).(\forall (u: T).(drop h (S d) (CHead c (Bind b) (lift h d u)) (CHead e (Bind b) u)))))))) @@ -685,7 +685,7 @@ theorem drop_skip_flat: theorem drop_S: \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (h: nat).((drop h O c (CHead e (Bind b) u)) \to (drop (S h) O c e)))))) \def - \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: C).(\forall (u: T).(\forall (h: nat).((drop h O c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 e)))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (H: (drop h O (CSort n) (CHead e (Bind b) u))).(and3_ind (eq C (CHead e (Bind b) u) (CSort n)) (eq nat h O) (eq nat O O) (drop (S h) O (CSort n) e) (\lambda (H0: (eq C (CHead e (Bind b) u) (CSort n))).(\lambda (H1: (eq nat h O)).(\lambda (_: (eq nat O O)).(eq_ind_r nat O (\lambda (n0: nat).(drop (S n0) O (CSort n) e)) (let H3 \def (eq_ind C (CHead e (Bind b) u) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H0) in (False_ind (drop (S O) O (CSort n) e) H3)) h H1)))) (drop_gen_sort n h O (CHead e (Bind b) u) H))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: T).(\forall (h: nat).((drop h O c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 e))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e))) (\lambda (H0: (drop O O (CHead c0 k t) (CHead e (Bind b) u))).(let H1 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 k t) (CHead e (Bind b) u) H0)) in ((let H2 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 k t) (CHead e (Bind b) u) H0)) in ((let H3 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 k t) (CHead e (Bind b) u) H0)) in (\lambda (H4: (eq K k (Bind b))).(\lambda (H5: (eq C c0 e)).(eq_ind C c0 (\lambda (c1: C).(drop (S O) O (CHead c0 k t) c1)) (eq_ind_r K (Bind b) (\lambda (k0: K).(drop (S O) O (CHead c0 k0 t) c0)) (drop_drop (Bind b) O c0 c0 (drop_refl c0) t) k H4) e H5)))) H2)) H1))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e)))).(\lambda (H1: (drop (S n) O (CHead c0 k t) (CHead e (Bind b) u))).(drop_drop k (S n) c0 e (eq_ind_r nat (S (r k n)) (\lambda (n0: nat).(drop n0 O c0 e)) (H e u (r k n) (drop_gen_drop k c0 (CHead e (Bind b) u) t n H1)) (r k (S n)) (r_S k n)) t)))) h)))))))) c)). + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: C).(\forall (u: T).(\forall (h: nat).((drop h O c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 e)))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (H: (drop h O (CSort n) (CHead e (Bind b) u))).(and3_ind (eq C (CHead e (Bind b) u) (CSort n)) (eq nat h O) (eq nat O O) (drop (S h) O (CSort n) e) (\lambda (H0: (eq C (CHead e (Bind b) u) (CSort n))).(\lambda (H1: (eq nat h O)).(\lambda (_: (eq nat O O)).(eq_ind_r nat O (\lambda (n0: nat).(drop (S n0) O (CSort n) e)) (let H3 \def (eq_ind C (CHead e (Bind b) u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H0) in (False_ind (drop (S O) O (CSort n) e) H3)) h H1)))) (drop_gen_sort n h O (CHead e (Bind b) u) H))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: T).(\forall (h: nat).((drop h O c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 e))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e))) (\lambda (H0: (drop O O (CHead c0 k t) (CHead e (Bind b) u))).(let H1 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 k t) (CHead e (Bind b) u) H0)) in ((let H2 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 k t) (CHead e (Bind b) u) H0)) in ((let H3 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 k t) (CHead e (Bind b) u) H0)) in (\lambda (H4: (eq K k (Bind b))).(\lambda (H5: (eq C c0 e)).(eq_ind C c0 (\lambda (c1: C).(drop (S O) O (CHead c0 k t) c1)) (eq_ind_r K (Bind b) (\lambda (k0: K).(drop (S O) O (CHead c0 k0 t) c0)) (drop_drop (Bind b) O c0 c0 (drop_refl c0) t) k H4) e H5)))) H2)) H1))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e)))).(\lambda (H1: (drop (S n) O (CHead c0 k t) (CHead e (Bind b) u))).(drop_drop k (S n) c0 e (eq_ind_r nat (S (r k n)) (\lambda (n0: nat).(drop n0 O c0 e)) (H e u (r k n) (drop_gen_drop k c0 (CHead e (Bind b) u) t n H1)) (r k (S n)) (r_S k n)) t)))) h)))))))) c)). theorem drop_ctail: \forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (k: K).(\forall (u: T).(drop h d (CTail k u c1) (CTail k u c2)))))))) @@ -700,27 +700,27 @@ theorem drop_mono: theorem drop_conf_lt: \forall (k: K).(\forall (i: nat).(\forall (u: T).(\forall (c0: C).(\forall (c: C).((drop i O c (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i d)) c e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))))) \def - \lambda (k: K).(\lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (u: T).(\forall (c0: C).(\forall (c: C).((drop n O c (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus n d)) c e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop n O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))))) (\lambda (u: T).(\lambda (c0: C).(\lambda (c: C).(\lambda (H: (drop O O c (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h (S (plus O d)) c e)).(let H1 \def (eq_ind C c (\lambda (c: C).(drop h (S (plus O d)) c e)) H0 (CHead c0 k u) (drop_gen_refl c (CHead c0 k u) H)) in (ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k (plus O d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k (plus O d)) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C e (CHead x0 k x1))).(\lambda (H3: (eq T u (lift h (r k (plus O d)) x1))).(\lambda (H4: (drop h (r k (plus O d)) c0 x0)).(eq_ind_r C (CHead x0 k x1) (\lambda (c1: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O c1 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (eq_ind_r T (lift h (r k (plus O d)) x1) (\lambda (t: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O (CHead x0 k x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h (r k (plus O d)) x1) (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O (CHead x0 k x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) x1 x0 (refl_equal T (lift h (r k d) x1)) (drop_refl (CHead x0 k x1)) H4) u H3) e H2)))))) (drop_gen_skip_l c0 e u h (plus O d) k H1))))))))))) (\lambda (i0: nat).(\lambda (H: ((\forall (u: T).(\forall (c0: C).(\forall (c: C).((drop i0 O c (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i0 d)) c e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i0 O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))))))))))))).(\lambda (u: T).(\lambda (c0: C).(\lambda (c: C).(C_ind (\lambda (c1: C).((drop (S i0) O c1 (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus (S i0) d)) c1 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))))))))) (\lambda (n: nat).(\lambda (_: (drop (S i0) O (CSort n) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (drop h (S (plus (S i0) d)) (CSort n) e)).(and3_ind (eq C e (CSort n)) (eq nat h O) (eq nat (S (plus (S i0) d)) O) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (_: (eq C e (CSort n))).(\lambda (_: (eq nat h O)).(\lambda (H4: (eq nat (S (plus (S i0) d)) O)).(let H5 \def (eq_ind nat (S (plus (S i0) d)) (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) H5))))) (drop_gen_sort n h (S (plus (S i0) d)) e H1)))))))) (\lambda (c1: C).(\lambda (H0: (((drop (S i0) O c1 (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus (S i0) d)) c1 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))).(\lambda (k0: K).(K_ind (\lambda (k1: K).(\forall (t: T).((drop (S i0) O (CHead c1 k1 t) (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus (S i0) d)) (CHead c1 k1 t) e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c1 (Bind b) t) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h (S (plus (S i0) d)) (CHead c1 (Bind b) t) e)).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Bind b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Bind b) (plus (S i0) d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Bind b) (plus (S i0) d)) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: (eq C e (CHead x0 (Bind b) x1))).(\lambda (_: (eq T t (lift h (r (Bind b) (plus (S i0) d)) x1))).(\lambda (H5: (drop h (r (Bind b) (plus (S i0) d)) c1 x0)).(eq_ind_r C (CHead x0 (Bind b) x1) (\lambda (c2: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O c2 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (let H6 \def (H u c0 c1 (drop_gen_drop (Bind b) c1 (CHead c0 k u) t i0 H1) x0 h d H5) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i0 O x0 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Bind b) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H7: (eq T u (lift h (r k d) x2))).(\lambda (H8: (drop i0 O x0 (CHead x3 k x2))).(\lambda (H9: (drop h (r k d) c0 x3)).(ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Bind b) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) x2 x3 H7 (drop_drop (Bind b) i0 x0 (CHead x3 k x2) H8 x1) H9)))))) H6)) e H3)))))) (drop_gen_skip_l c1 e t h (plus (S i0) d) (Bind b) H2))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c1 (Flat f) t) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h (S (plus (S i0) d)) (CHead c1 (Flat f) t) e)).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) (plus (S i0) d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat f) (plus (S i0) d)) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: (eq C e (CHead x0 (Flat f) x1))).(\lambda (_: (eq T t (lift h (r (Flat f) (plus (S i0) d)) x1))).(\lambda (H5: (drop h (r (Flat f) (plus (S i0) d)) c1 x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c2: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O c2 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O x0 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Flat f) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H6: (eq T u (lift h (r k d) x2))).(\lambda (H7: (drop (S i0) O x0 (CHead x3 k x2))).(\lambda (H8: (drop h (r k d) c0 x3)).(ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Flat f) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) x2 x3 H6 (drop_drop (Flat f) i0 x0 (CHead x3 k x2) H7 x1) H8)))))) (H0 (drop_gen_drop (Flat f) c1 (CHead c0 k u) t i0 H1) x0 h d H5)) e H3)))))) (drop_gen_skip_l c1 e t h (plus (S i0) d) (Flat f) H2))))))))) k0)))) c)))))) i)). + \lambda (k: K).(\lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (u: T).(\forall (c0: C).(\forall (c: C).((drop n O c (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus n d)) c e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop n O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))))) (\lambda (u: T).(\lambda (c0: C).(\lambda (c: C).(\lambda (H: (drop O O c (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h (S (plus O d)) c e)).(let H1 \def (eq_ind C c (\lambda (c: C).(drop h (S (plus O d)) c e)) H0 (CHead c0 k u) (drop_gen_refl c (CHead c0 k u) H)) in (ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k (plus O d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k (plus O d)) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C e (CHead x0 k x1))).(\lambda (H3: (eq T u (lift h (r k (plus O d)) x1))).(\lambda (H4: (drop h (r k (plus O d)) c0 x0)).(eq_ind_r C (CHead x0 k x1) (\lambda (c1: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O c1 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (eq_ind_r T (lift h (r k (plus O d)) x1) (\lambda (t: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O (CHead x0 k x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h (r k (plus O d)) x1) (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O (CHead x0 k x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) x1 x0 (refl_equal T (lift h (r k d) x1)) (drop_refl (CHead x0 k x1)) H4) u H3) e H2)))))) (drop_gen_skip_l c0 e u h (plus O d) k H1))))))))))) (\lambda (i0: nat).(\lambda (H: ((\forall (u: T).(\forall (c0: C).(\forall (c: C).((drop i0 O c (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i0 d)) c e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i0 O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))))))))))))).(\lambda (u: T).(\lambda (c0: C).(\lambda (c: C).(C_ind (\lambda (c1: C).((drop (S i0) O c1 (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus (S i0) d)) c1 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))))))))) (\lambda (n: nat).(\lambda (_: (drop (S i0) O (CSort n) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (drop h (S (plus (S i0) d)) (CSort n) e)).(and3_ind (eq C e (CSort n)) (eq nat h O) (eq nat (S (plus (S i0) d)) O) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (_: (eq C e (CSort n))).(\lambda (_: (eq nat h O)).(\lambda (H4: (eq nat (S (plus (S i0) d)) O)).(let H5 \def (eq_ind nat (S (plus (S i0) d)) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) H5))))) (drop_gen_sort n h (S (plus (S i0) d)) e H1)))))))) (\lambda (c1: C).(\lambda (H0: (((drop (S i0) O c1 (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus (S i0) d)) c1 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))).(\lambda (k0: K).(K_ind (\lambda (k1: K).(\forall (t: T).((drop (S i0) O (CHead c1 k1 t) (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus (S i0) d)) (CHead c1 k1 t) e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c1 (Bind b) t) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h (S (plus (S i0) d)) (CHead c1 (Bind b) t) e)).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Bind b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Bind b) (plus (S i0) d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Bind b) (plus (S i0) d)) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: (eq C e (CHead x0 (Bind b) x1))).(\lambda (_: (eq T t (lift h (r (Bind b) (plus (S i0) d)) x1))).(\lambda (H5: (drop h (r (Bind b) (plus (S i0) d)) c1 x0)).(eq_ind_r C (CHead x0 (Bind b) x1) (\lambda (c2: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O c2 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (let H6 \def (H u c0 c1 (drop_gen_drop (Bind b) c1 (CHead c0 k u) t i0 H1) x0 h d H5) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i0 O x0 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Bind b) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H7: (eq T u (lift h (r k d) x2))).(\lambda (H8: (drop i0 O x0 (CHead x3 k x2))).(\lambda (H9: (drop h (r k d) c0 x3)).(ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Bind b) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) x2 x3 H7 (drop_drop (Bind b) i0 x0 (CHead x3 k x2) H8 x1) H9)))))) H6)) e H3)))))) (drop_gen_skip_l c1 e t h (plus (S i0) d) (Bind b) H2))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c1 (Flat f) t) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h (S (plus (S i0) d)) (CHead c1 (Flat f) t) e)).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) (plus (S i0) d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat f) (plus (S i0) d)) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: (eq C e (CHead x0 (Flat f) x1))).(\lambda (_: (eq T t (lift h (r (Flat f) (plus (S i0) d)) x1))).(\lambda (H5: (drop h (r (Flat f) (plus (S i0) d)) c1 x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c2: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O c2 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O x0 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Flat f) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H6: (eq T u (lift h (r k d) x2))).(\lambda (H7: (drop (S i0) O x0 (CHead x3 k x2))).(\lambda (H8: (drop h (r k d) c0 x3)).(ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Flat f) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))) x2 x3 H6 (drop_drop (Flat f) i0 x0 (CHead x3 k x2) H7 x1) H8)))))) (H0 (drop_gen_drop (Flat f) c1 (CHead c0 k u) t i0 H1) x0 h d H5)) e H3)))))) (drop_gen_skip_l c1 e t h (plus (S i0) d) (Flat f) H2))))))))) k0)))) c)))))) i)). theorem drop_conf_ge: \forall (i: nat).(\forall (a: C).(\forall (c: C).((drop i O c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le (plus d h) i) \to (drop (minus i h) O e a))))))))) \def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (a: C).(\forall (c: C).((drop n O c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le (plus d h) n) \to (drop (minus n h) O e a)))))))))) (\lambda (a: C).(\lambda (c: C).(\lambda (H: (drop O O c a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h d c e)).(\lambda (H1: (le (plus d h) O)).(let H2 \def (eq_ind C c (\lambda (c: C).(drop h d c e)) H0 a (drop_gen_refl c a H)) in (let H3 \def (match H1 return (\lambda (_: ?).(\lambda (n: nat).((eq nat n O) \to (drop (minus O h) O e a)))) with [le_n \Rightarrow (\lambda (H: (eq nat (plus d h) O)).(let H3 \def (f_equal nat nat (\lambda (e0: nat).e0) (plus d h) O H) in (eq_ind nat (plus d h) (\lambda (n: nat).(drop (minus n h) n e a)) (eq_ind_r nat O (\lambda (n: nat).(drop (minus n h) n e a)) (and_ind (eq nat d O) (eq nat h O) (drop O O e a) (\lambda (H0: (eq nat d O)).(\lambda (H1: (eq nat h O)).(let H2 \def (eq_ind nat d (\lambda (n: nat).(drop h n a e)) H2 O H0) in (let H4 \def (eq_ind nat h (\lambda (n: nat).(drop n O a e)) H2 O H1) in (eq_ind C a (\lambda (c: C).(drop O O c a)) (drop_refl a) e (drop_gen_refl a e H4)))))) (plus_O d h H3)) (plus d h) H3) O H3))) | (le_S m H) \Rightarrow (\lambda (H2: (eq nat (S m) O)).((let H0 \def (eq_ind nat (S m) (\lambda (e0: nat).(match e0 return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind ((le (plus d h) m) \to (drop (minus O h) O e a)) H0)) H))]) in (H3 (refl_equal nat O)))))))))))) (\lambda (i0: nat).(\lambda (H: ((\forall (a: C).(\forall (c: C).((drop i0 O c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le (plus d h) i0) \to (drop (minus i0 h) O e a))))))))))).(\lambda (a: C).(\lambda (c: C).(C_ind (\lambda (c0: C).((drop (S i0) O c0 a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e a)))))))) (\lambda (n: nat).(\lambda (H0: (drop (S i0) O (CSort n) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (drop h d (CSort n) e)).(\lambda (H2: (le (plus d h) (S i0))).(and3_ind (eq C e (CSort n)) (eq nat h O) (eq nat d O) (drop (minus (S i0) h) O e a) (\lambda (H3: (eq C e (CSort n))).(\lambda (H4: (eq nat h O)).(\lambda (H5: (eq nat d O)).(and3_ind (eq C a (CSort n)) (eq nat (S i0) O) (eq nat O O) (drop (minus (S i0) h) O e a) (\lambda (H6: (eq C a (CSort n))).(\lambda (H7: (eq nat (S i0) O)).(\lambda (_: (eq nat O O)).(let H9 \def (eq_ind nat d (\lambda (n: nat).(le (plus n h) (S i0))) H2 O H5) in (let H10 \def (eq_ind nat h (\lambda (n: nat).(le (plus O n) (S i0))) H9 O H4) in (eq_ind_r nat O (\lambda (n0: nat).(drop (minus (S i0) n0) O e a)) (eq_ind_r C (CSort n) (\lambda (c0: C).(drop (minus (S i0) O) O c0 a)) (eq_ind_r C (CSort n) (\lambda (c0: C).(drop (minus (S i0) O) O (CSort n) c0)) (let H11 \def (eq_ind nat (S i0) (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H7) in (False_ind (drop (minus (S i0) O) O (CSort n) (CSort n)) H11)) a H6) e H3) h H4)))))) (drop_gen_sort n (S i0) O a H0))))) (drop_gen_sort n h d e H1))))))))) (\lambda (c0: C).(\lambda (H0: (((drop (S i0) O c0 a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e a))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).((drop (S i0) O (CHead c0 k0 t) a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d (CHead c0 k0 t) e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e a))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c0 (Bind b) t) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h d (CHead c0 (Bind b) t) e)).(\lambda (H3: (le (plus d h) (S i0))).(nat_ind (\lambda (n: nat).((drop h n (CHead c0 (Bind b) t) e) \to ((le (plus n h) (S i0)) \to (drop (minus (S i0) h) O e a)))) (\lambda (H4: (drop h O (CHead c0 (Bind b) t) e)).(\lambda (H5: (le (plus O h) (S i0))).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 (Bind b) t) e) \to ((le (plus O n) (S i0)) \to (drop (minus (S i0) n) O e a)))) (\lambda (H6: (drop O O (CHead c0 (Bind b) t) e)).(\lambda (_: (le (plus O O) (S i0))).(eq_ind C (CHead c0 (Bind b) t) (\lambda (c1: C).(drop (minus (S i0) O) O c1 a)) (drop_drop (Bind b) i0 c0 a (drop_gen_drop (Bind b) c0 a t i0 H1) t) e (drop_gen_refl (CHead c0 (Bind b) t) e H6)))) (\lambda (h0: nat).(\lambda (_: (((drop h0 O (CHead c0 (Bind b) t) e) \to ((le (plus O h0) (S i0)) \to (drop (minus (S i0) h0) O e a))))).(\lambda (H6: (drop (S h0) O (CHead c0 (Bind b) t) e)).(\lambda (H7: (le (plus O (S h0)) (S i0))).(H a c0 (drop_gen_drop (Bind b) c0 a t i0 H1) e h0 O (drop_gen_drop (Bind b) c0 e t h0 H6) (le_S_n (plus O h0) i0 H7)))))) h H4 H5))) (\lambda (d0: nat).(\lambda (_: (((drop h d0 (CHead c0 (Bind b) t) e) \to ((le (plus d0 h) (S i0)) \to (drop (minus (S i0) h) O e a))))).(\lambda (H4: (drop h (S d0) (CHead c0 (Bind b) t) e)).(\lambda (H5: (le (plus (S d0) h) (S i0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Bind b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Bind b) d0) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Bind b) d0) c0 e0))) (drop (minus (S i0) h) O e a) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C e (CHead x0 (Bind b) x1))).(\lambda (_: (eq T t (lift h (r (Bind b) d0) x1))).(\lambda (H8: (drop h (r (Bind b) d0) c0 x0)).(eq_ind_r C (CHead x0 (Bind b) x1) (\lambda (c1: C).(drop (minus (S i0) h) O c1 a)) (eq_ind nat (S (minus i0 h)) (\lambda (n: nat).(drop n O (CHead x0 (Bind b) x1) a)) (drop_drop (Bind b) (minus i0 h) x0 a (H a c0 (drop_gen_drop (Bind b) c0 a t i0 H1) x0 h d0 H8 (le_S_n (plus d0 h) i0 H5)) x1) (minus (S i0) h) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5)))) e H6)))))) (drop_gen_skip_l c0 e t h d0 (Bind b) H4)))))) d H2 H3))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c0 (Flat f) t) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h d (CHead c0 (Flat f) t) e)).(\lambda (H3: (le (plus d h) (S i0))).(nat_ind (\lambda (n: nat).((drop h n (CHead c0 (Flat f) t) e) \to ((le (plus n h) (S i0)) \to (drop (minus (S i0) h) O e a)))) (\lambda (H4: (drop h O (CHead c0 (Flat f) t) e)).(\lambda (H5: (le (plus O h) (S i0))).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 (Flat f) t) e) \to ((le (plus O n) (S i0)) \to (drop (minus (S i0) n) O e a)))) (\lambda (H6: (drop O O (CHead c0 (Flat f) t) e)).(\lambda (_: (le (plus O O) (S i0))).(eq_ind C (CHead c0 (Flat f) t) (\lambda (c1: C).(drop (minus (S i0) O) O c1 a)) (drop_drop (Flat f) i0 c0 a (drop_gen_drop (Flat f) c0 a t i0 H1) t) e (drop_gen_refl (CHead c0 (Flat f) t) e H6)))) (\lambda (h0: nat).(\lambda (_: (((drop h0 O (CHead c0 (Flat f) t) e) \to ((le (plus O h0) (S i0)) \to (drop (minus (S i0) h0) O e a))))).(\lambda (H6: (drop (S h0) O (CHead c0 (Flat f) t) e)).(\lambda (H7: (le (plus O (S h0)) (S i0))).(H0 (drop_gen_drop (Flat f) c0 a t i0 H1) e (S h0) O (drop_gen_drop (Flat f) c0 e t h0 H6) H7))))) h H4 H5))) (\lambda (d0: nat).(\lambda (_: (((drop h d0 (CHead c0 (Flat f) t) e) \to ((le (plus d0 h) (S i0)) \to (drop (minus (S i0) h) O e a))))).(\lambda (H4: (drop h (S d0) (CHead c0 (Flat f) t) e)).(\lambda (H5: (le (plus (S d0) h) (S i0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) d0) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat f) d0) c0 e0))) (drop (minus (S i0) h) O e a) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C e (CHead x0 (Flat f) x1))).(\lambda (_: (eq T t (lift h (r (Flat f) d0) x1))).(\lambda (H8: (drop h (r (Flat f) d0) c0 x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c1: C).(drop (minus (S i0) h) O c1 a)) (let H9 \def (eq_ind_r nat (minus (S i0) h) (\lambda (n: nat).(drop n O x0 a)) (H0 (drop_gen_drop (Flat f) c0 a t i0 H1) x0 h (S d0) H8 H5) (S (minus i0 h)) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5)))) in (eq_ind nat (S (minus i0 h)) (\lambda (n: nat).(drop n O (CHead x0 (Flat f) x1) a)) (drop_drop (Flat f) (minus i0 h) x0 a H9 x1) (minus (S i0) h) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5))))) e H6)))))) (drop_gen_skip_l c0 e t h d0 (Flat f) H4)))))) d H2 H3))))))))) k)))) c))))) i). + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (a: C).(\forall (c: C).((drop n O c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le (plus d h) n) \to (drop (minus n h) O e a)))))))))) (\lambda (a: C).(\lambda (c: C).(\lambda (H: (drop O O c a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h d c e)).(\lambda (H1: (le (plus d h) O)).(let H2 \def (eq_ind C c (\lambda (c: C).(drop h d c e)) H0 a (drop_gen_refl c a H)) in (let H3 \def (match H1 return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to (drop (minus O h) O e a)))) with [le_n \Rightarrow (\lambda (H: (eq nat (plus d h) O)).(let H3 \def (f_equal nat nat (\lambda (e0: nat).e0) (plus d h) O H) in (eq_ind nat (plus d h) (\lambda (n: nat).(drop (minus n h) n e a)) (eq_ind_r nat O (\lambda (n: nat).(drop (minus n h) n e a)) (and_ind (eq nat d O) (eq nat h O) (drop O O e a) (\lambda (H0: (eq nat d O)).(\lambda (H1: (eq nat h O)).(let H2 \def (eq_ind nat d (\lambda (n: nat).(drop h n a e)) H2 O H0) in (let H4 \def (eq_ind nat h (\lambda (n: nat).(drop n O a e)) H2 O H1) in (eq_ind C a (\lambda (c: C).(drop O O c a)) (drop_refl a) e (drop_gen_refl a e H4)))))) (plus_O d h H3)) (plus d h) H3) O H3))) | (le_S m H) \Rightarrow (\lambda (H2: (eq nat (S m) O)).((let H0 \def (eq_ind nat (S m) (\lambda (e0: nat).(match e0 return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind ((le (plus d h) m) \to (drop (minus O h) O e a)) H0)) H))]) in (H3 (refl_equal nat O)))))))))))) (\lambda (i0: nat).(\lambda (H: ((\forall (a: C).(\forall (c: C).((drop i0 O c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le (plus d h) i0) \to (drop (minus i0 h) O e a))))))))))).(\lambda (a: C).(\lambda (c: C).(C_ind (\lambda (c0: C).((drop (S i0) O c0 a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e a)))))))) (\lambda (n: nat).(\lambda (H0: (drop (S i0) O (CSort n) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (drop h d (CSort n) e)).(\lambda (H2: (le (plus d h) (S i0))).(and3_ind (eq C e (CSort n)) (eq nat h O) (eq nat d O) (drop (minus (S i0) h) O e a) (\lambda (H3: (eq C e (CSort n))).(\lambda (H4: (eq nat h O)).(\lambda (H5: (eq nat d O)).(and3_ind (eq C a (CSort n)) (eq nat (S i0) O) (eq nat O O) (drop (minus (S i0) h) O e a) (\lambda (H6: (eq C a (CSort n))).(\lambda (H7: (eq nat (S i0) O)).(\lambda (_: (eq nat O O)).(let H9 \def (eq_ind nat d (\lambda (n: nat).(le (plus n h) (S i0))) H2 O H5) in (let H10 \def (eq_ind nat h (\lambda (n: nat).(le (plus O n) (S i0))) H9 O H4) in (eq_ind_r nat O (\lambda (n0: nat).(drop (minus (S i0) n0) O e a)) (eq_ind_r C (CSort n) (\lambda (c0: C).(drop (minus (S i0) O) O c0 a)) (eq_ind_r C (CSort n) (\lambda (c0: C).(drop (minus (S i0) O) O (CSort n) c0)) (let H11 \def (eq_ind nat (S i0) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H7) in (False_ind (drop (minus (S i0) O) O (CSort n) (CSort n)) H11)) a H6) e H3) h H4)))))) (drop_gen_sort n (S i0) O a H0))))) (drop_gen_sort n h d e H1))))))))) (\lambda (c0: C).(\lambda (H0: (((drop (S i0) O c0 a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e a))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).((drop (S i0) O (CHead c0 k0 t) a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d (CHead c0 k0 t) e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e a))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c0 (Bind b) t) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h d (CHead c0 (Bind b) t) e)).(\lambda (H3: (le (plus d h) (S i0))).(nat_ind (\lambda (n: nat).((drop h n (CHead c0 (Bind b) t) e) \to ((le (plus n h) (S i0)) \to (drop (minus (S i0) h) O e a)))) (\lambda (H4: (drop h O (CHead c0 (Bind b) t) e)).(\lambda (H5: (le (plus O h) (S i0))).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 (Bind b) t) e) \to ((le (plus O n) (S i0)) \to (drop (minus (S i0) n) O e a)))) (\lambda (H6: (drop O O (CHead c0 (Bind b) t) e)).(\lambda (_: (le (plus O O) (S i0))).(eq_ind C (CHead c0 (Bind b) t) (\lambda (c1: C).(drop (minus (S i0) O) O c1 a)) (drop_drop (Bind b) i0 c0 a (drop_gen_drop (Bind b) c0 a t i0 H1) t) e (drop_gen_refl (CHead c0 (Bind b) t) e H6)))) (\lambda (h0: nat).(\lambda (_: (((drop h0 O (CHead c0 (Bind b) t) e) \to ((le (plus O h0) (S i0)) \to (drop (minus (S i0) h0) O e a))))).(\lambda (H6: (drop (S h0) O (CHead c0 (Bind b) t) e)).(\lambda (H7: (le (plus O (S h0)) (S i0))).(H a c0 (drop_gen_drop (Bind b) c0 a t i0 H1) e h0 O (drop_gen_drop (Bind b) c0 e t h0 H6) (le_S_n (plus O h0) i0 H7)))))) h H4 H5))) (\lambda (d0: nat).(\lambda (_: (((drop h d0 (CHead c0 (Bind b) t) e) \to ((le (plus d0 h) (S i0)) \to (drop (minus (S i0) h) O e a))))).(\lambda (H4: (drop h (S d0) (CHead c0 (Bind b) t) e)).(\lambda (H5: (le (plus (S d0) h) (S i0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Bind b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Bind b) d0) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Bind b) d0) c0 e0))) (drop (minus (S i0) h) O e a) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C e (CHead x0 (Bind b) x1))).(\lambda (_: (eq T t (lift h (r (Bind b) d0) x1))).(\lambda (H8: (drop h (r (Bind b) d0) c0 x0)).(eq_ind_r C (CHead x0 (Bind b) x1) (\lambda (c1: C).(drop (minus (S i0) h) O c1 a)) (eq_ind nat (S (minus i0 h)) (\lambda (n: nat).(drop n O (CHead x0 (Bind b) x1) a)) (drop_drop (Bind b) (minus i0 h) x0 a (H a c0 (drop_gen_drop (Bind b) c0 a t i0 H1) x0 h d0 H8 (le_S_n (plus d0 h) i0 H5)) x1) (minus (S i0) h) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5)))) e H6)))))) (drop_gen_skip_l c0 e t h d0 (Bind b) H4)))))) d H2 H3))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c0 (Flat f) t) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h d (CHead c0 (Flat f) t) e)).(\lambda (H3: (le (plus d h) (S i0))).(nat_ind (\lambda (n: nat).((drop h n (CHead c0 (Flat f) t) e) \to ((le (plus n h) (S i0)) \to (drop (minus (S i0) h) O e a)))) (\lambda (H4: (drop h O (CHead c0 (Flat f) t) e)).(\lambda (H5: (le (plus O h) (S i0))).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 (Flat f) t) e) \to ((le (plus O n) (S i0)) \to (drop (minus (S i0) n) O e a)))) (\lambda (H6: (drop O O (CHead c0 (Flat f) t) e)).(\lambda (_: (le (plus O O) (S i0))).(eq_ind C (CHead c0 (Flat f) t) (\lambda (c1: C).(drop (minus (S i0) O) O c1 a)) (drop_drop (Flat f) i0 c0 a (drop_gen_drop (Flat f) c0 a t i0 H1) t) e (drop_gen_refl (CHead c0 (Flat f) t) e H6)))) (\lambda (h0: nat).(\lambda (_: (((drop h0 O (CHead c0 (Flat f) t) e) \to ((le (plus O h0) (S i0)) \to (drop (minus (S i0) h0) O e a))))).(\lambda (H6: (drop (S h0) O (CHead c0 (Flat f) t) e)).(\lambda (H7: (le (plus O (S h0)) (S i0))).(H0 (drop_gen_drop (Flat f) c0 a t i0 H1) e (S h0) O (drop_gen_drop (Flat f) c0 e t h0 H6) H7))))) h H4 H5))) (\lambda (d0: nat).(\lambda (_: (((drop h d0 (CHead c0 (Flat f) t) e) \to ((le (plus d0 h) (S i0)) \to (drop (minus (S i0) h) O e a))))).(\lambda (H4: (drop h (S d0) (CHead c0 (Flat f) t) e)).(\lambda (H5: (le (plus (S d0) h) (S i0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) d0) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat f) d0) c0 e0))) (drop (minus (S i0) h) O e a) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C e (CHead x0 (Flat f) x1))).(\lambda (_: (eq T t (lift h (r (Flat f) d0) x1))).(\lambda (H8: (drop h (r (Flat f) d0) c0 x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c1: C).(drop (minus (S i0) h) O c1 a)) (let H9 \def (eq_ind_r nat (minus (S i0) h) (\lambda (n: nat).(drop n O x0 a)) (H0 (drop_gen_drop (Flat f) c0 a t i0 H1) x0 h (S d0) H8 H5) (S (minus i0 h)) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5)))) in (eq_ind nat (S (minus i0 h)) (\lambda (n: nat).(drop n O (CHead x0 (Flat f) x1) a)) (drop_drop (Flat f) (minus i0 h) x0 a H9 x1) (minus (S i0) h) (minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5))))) e H6)))))) (drop_gen_skip_l c0 e t h d0 (Flat f) H4)))))) d H2 H3))))))))) k)))) c))))) i). theorem drop_conf_rev: \forall (j: nat).(\forall (e1: C).(\forall (e2: C).((drop j O e1 e2) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop j O c1 c2)) (\lambda (c1: C).(drop i j c1 e1))))))))) \def - \lambda (j: nat).(nat_ind (\lambda (n: nat).(\forall (e1: C).(\forall (e2: C).((drop n O e1 e2) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop n O c1 c2)) (\lambda (c1: C).(drop i n c1 e1)))))))))) (\lambda (e1: C).(\lambda (e2: C).(\lambda (H: (drop O O e1 e2)).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e2)).(let H1 \def (eq_ind_r C e2 (\lambda (c: C).(drop i O c2 c)) H0 e1 (drop_gen_refl e1 e2 H)) in (ex_intro2 C (\lambda (c1: C).(drop O O c1 c2)) (\lambda (c1: C).(drop i O c1 e1)) c2 (drop_refl c2) H1)))))))) (\lambda (j0: nat).(\lambda (IHj: ((\forall (e1: C).(\forall (e2: C).((drop j0 O e1 e2) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop j0 O c1 c2)) (\lambda (c1: C).(drop i j0 c1 e1))))))))))).(\lambda (e1: C).(C_ind (\lambda (c: C).(\forall (e2: C).((drop (S j0) O c e2) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 c))))))))) (\lambda (n: nat).(\lambda (e2: C).(\lambda (H: (drop (S j0) O (CSort n) e2)).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e2)).(and3_ind (eq C e2 (CSort n)) (eq nat (S j0) O) (eq nat O O) (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CSort n)))) (\lambda (H1: (eq C e2 (CSort n))).(\lambda (H2: (eq nat (S j0) O)).(\lambda (_: (eq nat O O)).(let H4 \def (eq_ind C e2 (\lambda (c: C).(drop i O c2 c)) H0 (CSort n) H1) in (let H5 \def (eq_ind nat (S j0) (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CSort n)))) H5)))))) (drop_gen_sort n (S j0) O e2 H)))))))) (\lambda (e2: C).(\lambda (IHe1: ((\forall (e3: C).((drop (S j0) O e2 e3) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e3) \to (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 e2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e3: C).(\lambda (H: (drop (S j0) O (CHead e2 k t) e3)).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e3)).((match k return (\lambda (_: ?).(\lambda (k0: K).((drop (r k0 j0) O e2 e3) \to (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 k0 t))))))) with [(Bind b) \Rightarrow (\lambda (H1: (drop (r (Bind b) j0) O e2 e3)).(let H_x \def (IHj e2 e3 H1 c2 i H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c1: C).(drop j0 O c1 c2)) (\lambda (c1: C).(drop i j0 c1 e2)) (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Bind b) t)))) (\lambda (x: C).(\lambda (H3: (drop j0 O x c2)).(\lambda (H4: (drop i j0 x e2)).(ex_intro2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Bind b) t))) (CHead x (Bind b) (lift i (r (Bind b) j0) t)) (drop_drop (Bind b) j0 x c2 H3 (lift i (r (Bind b) j0) t)) (drop_skip (Bind b) i j0 x e2 H4 t))))) H2)))) | (Flat f) \Rightarrow (\lambda (H1: (drop (r (Flat f) j0) O e2 e3)).(let H_x \def (IHe1 e3 H1 c2 i H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 e2)) (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Flat f) t)))) (\lambda (x: C).(\lambda (H3: (drop (S j0) O x c2)).(\lambda (H4: (drop i (S j0) x e2)).(ex_intro2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Flat f) t))) (CHead x (Flat f) (lift i (r (Flat f) j0) t)) (drop_drop (Flat f) j0 x c2 H3 (lift i (r (Flat f) j0) t)) (drop_skip (Flat f) i j0 x e2 H4 t))))) H2))))]) (drop_gen_drop k e2 e3 t j0 H))))))))))) e1)))) j). + \lambda (j: nat).(nat_ind (\lambda (n: nat).(\forall (e1: C).(\forall (e2: C).((drop n O e1 e2) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop n O c1 c2)) (\lambda (c1: C).(drop i n c1 e1)))))))))) (\lambda (e1: C).(\lambda (e2: C).(\lambda (H: (drop O O e1 e2)).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e2)).(let H1 \def (eq_ind_r C e2 (\lambda (c: C).(drop i O c2 c)) H0 e1 (drop_gen_refl e1 e2 H)) in (ex_intro2 C (\lambda (c1: C).(drop O O c1 c2)) (\lambda (c1: C).(drop i O c1 e1)) c2 (drop_refl c2) H1)))))))) (\lambda (j0: nat).(\lambda (IHj: ((\forall (e1: C).(\forall (e2: C).((drop j0 O e1 e2) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop j0 O c1 c2)) (\lambda (c1: C).(drop i j0 c1 e1))))))))))).(\lambda (e1: C).(C_ind (\lambda (c: C).(\forall (e2: C).((drop (S j0) O c e2) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 c))))))))) (\lambda (n: nat).(\lambda (e2: C).(\lambda (H: (drop (S j0) O (CSort n) e2)).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e2)).(and3_ind (eq C e2 (CSort n)) (eq nat (S j0) O) (eq nat O O) (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CSort n)))) (\lambda (H1: (eq C e2 (CSort n))).(\lambda (H2: (eq nat (S j0) O)).(\lambda (_: (eq nat O O)).(let H4 \def (eq_ind C e2 (\lambda (c: C).(drop i O c2 c)) H0 (CSort n) H1) in (let H5 \def (eq_ind nat (S j0) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CSort n)))) H5)))))) (drop_gen_sort n (S j0) O e2 H)))))))) (\lambda (e2: C).(\lambda (IHe1: ((\forall (e3: C).((drop (S j0) O e2 e3) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e3) \to (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 e2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e3: C).(\lambda (H: (drop (S j0) O (CHead e2 k t) e3)).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e3)).((match k return (\lambda (k0: K).((drop (r k0 j0) O e2 e3) \to (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 k0 t)))))) with [(Bind b) \Rightarrow (\lambda (H1: (drop (r (Bind b) j0) O e2 e3)).(let H_x \def (IHj e2 e3 H1 c2 i H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c1: C).(drop j0 O c1 c2)) (\lambda (c1: C).(drop i j0 c1 e2)) (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Bind b) t)))) (\lambda (x: C).(\lambda (H3: (drop j0 O x c2)).(\lambda (H4: (drop i j0 x e2)).(ex_intro2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Bind b) t))) (CHead x (Bind b) (lift i (r (Bind b) j0) t)) (drop_drop (Bind b) j0 x c2 H3 (lift i (r (Bind b) j0) t)) (drop_skip (Bind b) i j0 x e2 H4 t))))) H2)))) | (Flat f) \Rightarrow (\lambda (H1: (drop (r (Flat f) j0) O e2 e3)).(let H_x \def (IHe1 e3 H1 c2 i H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 e2)) (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Flat f) t)))) (\lambda (x: C).(\lambda (H3: (drop (S j0) O x c2)).(\lambda (H4: (drop i (S j0) x e2)).(ex_intro2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Flat f) t))) (CHead x (Flat f) (lift i (r (Flat f) j0) t)) (drop_drop (Flat f) j0 x c2 H3 (lift i (r (Flat f) j0) t)) (drop_skip (Flat f) i j0 x e2 H4 t))))) H2))))]) (drop_gen_drop k e2 e3 t j0 H))))))))))) e1)))) j). theorem drop_trans_le: \forall (i: nat).(\forall (d: nat).((le i d) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i O c2 e2) \to (ex2 C (\lambda (e1: C).(drop i O c1 e1)) (\lambda (e1: C).(drop h (minus d i) e1 e2))))))))))) \def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (d: nat).((le n d) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop n O c2 e2) \to (ex2 C (\lambda (e1: C).(drop n O c1 e1)) (\lambda (e1: C).(drop h (minus d n) e1 e2)))))))))))) (\lambda (d: nat).(\lambda (_: (le O d)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H0: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H1: (drop O O c2 e2)).(let H2 \def (eq_ind C c2 (\lambda (c: C).(drop h d c1 c)) H0 e2 (drop_gen_refl c2 e2 H1)) in (eq_ind nat d (\lambda (n: nat).(ex2 C (\lambda (e1: C).(drop O O c1 e1)) (\lambda (e1: C).(drop h n e1 e2)))) (ex_intro2 C (\lambda (e1: C).(drop O O c1 e1)) (\lambda (e1: C).(drop h d e1 e2)) c1 (drop_refl c1) H2) (minus d O) (minus_n_O d))))))))))) (\lambda (i0: nat).(\lambda (IHi: ((\forall (d: nat).((le i0 d) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i0 O c2 e2) \to (ex2 C (\lambda (e1: C).(drop i0 O c1 e1)) (\lambda (e1: C).(drop h (minus d i0) e1 e2))))))))))))).(\lambda (d: nat).(nat_ind (\lambda (n: nat).((le (S i0) n) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h n c1 c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus n (S i0)) e1 e2))))))))))) (\lambda (H: (le (S i0) O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (_: (drop h O c1 c2)).(\lambda (e2: C).(\lambda (_: (drop (S i0) O c2 e2)).(let H2 \def (match H return (\lambda (_: ?).(\lambda (n: nat).((eq nat n O) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus O (S i0)) e1 e2)))))) with [le_n \Rightarrow (\lambda (H2: (eq nat (S i0) O)).(let H3 \def (eq_ind nat (S i0) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus O (S i0)) e1 e2))) H3))) | (le_S m H2) \Rightarrow (\lambda (H3: (eq nat (S m) O)).((let H4 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H3) in (False_ind ((le (S i0) m) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus O (S i0)) e1 e2)))) H4)) H2))]) in (H2 (refl_equal nat O)))))))))) (\lambda (d0: nat).(\lambda (_: (((le (S i0) d0) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d0 c1 c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus d0 (S i0)) e1 e2)))))))))))).(\lambda (H: (le (S i0) (S d0))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (h: nat).((drop h (S d0) c c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H0: (drop h (S d0) (CSort n) c2)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c2 e2)).(and3_ind (eq C c2 (CSort n)) (eq nat h O) (eq nat (S d0) O) (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (H2: (eq C c2 (CSort n))).(\lambda (_: (eq nat h O)).(\lambda (_: (eq nat (S d0) O)).(let H5 \def (eq_ind C c2 (\lambda (c: C).(drop (S i0) O c e2)) H1 (CSort n) H2) in (and3_ind (eq C e2 (CSort n)) (eq nat (S i0) O) (eq nat O O) (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (H6: (eq C e2 (CSort n))).(\lambda (H7: (eq nat (S i0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n) (\lambda (c: C).(ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 c)))) (let H9 \def (eq_ind nat (S i0) (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H7) in (False_ind (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 (CSort n)))) H9)) e2 H6)))) (drop_gen_sort n (S i0) O e2 H5)))))) (drop_gen_sort n h (S d0) c2 H0)))))))) (\lambda (c2: C).(\lambda (IHc: ((\forall (c3: C).(\forall (h: nat).((drop h (S d0) c2 c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c2 e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).(\forall (c3: C).(\forall (h: nat).((drop h (S d0) (CHead c2 k0 t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 k0 t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (c3: C).(\lambda (h: nat).(\lambda (H0: (drop h (S d0) (CHead c2 (Bind b) t) c3)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c3 e2)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C c3 (CHead e (Bind b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Bind b) d0) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r (Bind b) d0) c2 e))) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Bind b) t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C c3 (CHead x0 (Bind b) x1))).(\lambda (H3: (eq T t (lift h (r (Bind b) d0) x1))).(\lambda (H4: (drop h (r (Bind b) d0) c2 x0)).(let H5 \def (eq_ind C c3 (\lambda (c: C).(drop (S i0) O c e2)) H1 (CHead x0 (Bind b) x1) H2) in (eq_ind_r T (lift h (r (Bind b) d0) x1) (\lambda (t0: T).(ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Bind b) t0) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)))) (ex2_ind C (\lambda (e1: C).(drop i0 O c2 e1)) (\lambda (e1: C).(drop h (minus d0 i0) e1 e2)) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Bind b) (lift h (r (Bind b) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x: C).(\lambda (H6: (drop i0 O c2 x)).(\lambda (H7: (drop h (minus d0 i0) x e2)).(ex_intro2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Bind b) (lift h (r (Bind b) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)) x (drop_drop (Bind b) i0 c2 x H6 (lift h (r (Bind b) d0) x1)) H7)))) (IHi d0 (le_S_n i0 d0 H) c2 x0 h H4 e2 (drop_gen_drop (Bind b) x0 e2 x1 i0 H5))) t H3))))))) (drop_gen_skip_l c2 c3 t h d0 (Bind b) H0))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (c3: C).(\lambda (h: nat).(\lambda (H0: (drop h (S d0) (CHead c2 (Flat f) t) c3)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c3 e2)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C c3 (CHead e (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) d0) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r (Flat f) d0) c2 e))) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C c3 (CHead x0 (Flat f) x1))).(\lambda (H3: (eq T t (lift h (r (Flat f) d0) x1))).(\lambda (H4: (drop h (r (Flat f) d0) c2 x0)).(let H5 \def (eq_ind C c3 (\lambda (c: C).(drop (S i0) O c e2)) H1 (CHead x0 (Flat f) x1) H2) in (eq_ind_r T (lift h (r (Flat f) d0) x1) (\lambda (t0: T).(ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) t0) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)))) (ex2_ind C (\lambda (e1: C).(drop (S i0) O c2 e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) (lift h (r (Flat f) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x: C).(\lambda (H6: (drop (S i0) O c2 x)).(\lambda (H7: (drop h (minus (S d0) (S i0)) x e2)).(ex_intro2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) (lift h (r (Flat f) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)) x (drop_drop (Flat f) i0 c2 x H6 (lift h (r (Flat f) d0) x1)) H7)))) (IHc x0 h H4 e2 (drop_gen_drop (Flat f) x0 e2 x1 i0 H5))) t H3))))))) (drop_gen_skip_l c2 c3 t h d0 (Flat f) H0))))))))) k)))) c1))))) d)))) i). + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (d: nat).((le n d) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop n O c2 e2) \to (ex2 C (\lambda (e1: C).(drop n O c1 e1)) (\lambda (e1: C).(drop h (minus d n) e1 e2)))))))))))) (\lambda (d: nat).(\lambda (_: (le O d)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H0: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H1: (drop O O c2 e2)).(let H2 \def (eq_ind C c2 (\lambda (c: C).(drop h d c1 c)) H0 e2 (drop_gen_refl c2 e2 H1)) in (eq_ind nat d (\lambda (n: nat).(ex2 C (\lambda (e1: C).(drop O O c1 e1)) (\lambda (e1: C).(drop h n e1 e2)))) (ex_intro2 C (\lambda (e1: C).(drop O O c1 e1)) (\lambda (e1: C).(drop h d e1 e2)) c1 (drop_refl c1) H2) (minus d O) (minus_n_O d))))))))))) (\lambda (i0: nat).(\lambda (IHi: ((\forall (d: nat).((le i0 d) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i0 O c2 e2) \to (ex2 C (\lambda (e1: C).(drop i0 O c1 e1)) (\lambda (e1: C).(drop h (minus d i0) e1 e2))))))))))))).(\lambda (d: nat).(nat_ind (\lambda (n: nat).((le (S i0) n) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h n c1 c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus n (S i0)) e1 e2))))))))))) (\lambda (H: (le (S i0) O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (_: (drop h O c1 c2)).(\lambda (e2: C).(\lambda (_: (drop (S i0) O c2 e2)).(let H2 \def (match H return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus O (S i0)) e1 e2)))))) with [le_n \Rightarrow (\lambda (H2: (eq nat (S i0) O)).(let H3 \def (eq_ind nat (S i0) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus O (S i0)) e1 e2))) H3))) | (le_S m H2) \Rightarrow (\lambda (H3: (eq nat (S m) O)).((let H4 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H3) in (False_ind ((le (S i0) m) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus O (S i0)) e1 e2)))) H4)) H2))]) in (H2 (refl_equal nat O)))))))))) (\lambda (d0: nat).(\lambda (_: (((le (S i0) d0) \to (\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d0 c1 c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h (minus d0 (S i0)) e1 e2)))))))))))).(\lambda (H: (le (S i0) (S d0))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (h: nat).((drop h (S d0) c c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H0: (drop h (S d0) (CSort n) c2)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c2 e2)).(and3_ind (eq C c2 (CSort n)) (eq nat h O) (eq nat (S d0) O) (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (H2: (eq C c2 (CSort n))).(\lambda (_: (eq nat h O)).(\lambda (_: (eq nat (S d0) O)).(let H5 \def (eq_ind C c2 (\lambda (c: C).(drop (S i0) O c e2)) H1 (CSort n) H2) in (and3_ind (eq C e2 (CSort n)) (eq nat (S i0) O) (eq nat O O) (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (H6: (eq C e2 (CSort n))).(\lambda (H7: (eq nat (S i0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n) (\lambda (c: C).(ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 c)))) (let H9 \def (eq_ind nat (S i0) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H7) in (False_ind (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 (CSort n)))) H9)) e2 H6)))) (drop_gen_sort n (S i0) O e2 H5)))))) (drop_gen_sort n h (S d0) c2 H0)))))))) (\lambda (c2: C).(\lambda (IHc: ((\forall (c3: C).(\forall (h: nat).((drop h (S d0) c2 c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c2 e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).(\forall (c3: C).(\forall (h: nat).((drop h (S d0) (CHead c2 k0 t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 k0 t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (c3: C).(\lambda (h: nat).(\lambda (H0: (drop h (S d0) (CHead c2 (Bind b) t) c3)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c3 e2)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C c3 (CHead e (Bind b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Bind b) d0) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r (Bind b) d0) c2 e))) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Bind b) t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C c3 (CHead x0 (Bind b) x1))).(\lambda (H3: (eq T t (lift h (r (Bind b) d0) x1))).(\lambda (H4: (drop h (r (Bind b) d0) c2 x0)).(let H5 \def (eq_ind C c3 (\lambda (c: C).(drop (S i0) O c e2)) H1 (CHead x0 (Bind b) x1) H2) in (eq_ind_r T (lift h (r (Bind b) d0) x1) (\lambda (t0: T).(ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Bind b) t0) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)))) (ex2_ind C (\lambda (e1: C).(drop i0 O c2 e1)) (\lambda (e1: C).(drop h (minus d0 i0) e1 e2)) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Bind b) (lift h (r (Bind b) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x: C).(\lambda (H6: (drop i0 O c2 x)).(\lambda (H7: (drop h (minus d0 i0) x e2)).(ex_intro2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Bind b) (lift h (r (Bind b) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)) x (drop_drop (Bind b) i0 c2 x H6 (lift h (r (Bind b) d0) x1)) H7)))) (IHi d0 (le_S_n i0 d0 H) c2 x0 h H4 e2 (drop_gen_drop (Bind b) x0 e2 x1 i0 H5))) t H3))))))) (drop_gen_skip_l c2 c3 t h d0 (Bind b) H0))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (c3: C).(\lambda (h: nat).(\lambda (H0: (drop h (S d0) (CHead c2 (Flat f) t) c3)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c3 e2)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C c3 (CHead e (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) d0) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r (Flat f) d0) c2 e))) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C c3 (CHead x0 (Flat f) x1))).(\lambda (H3: (eq T t (lift h (r (Flat f) d0) x1))).(\lambda (H4: (drop h (r (Flat f) d0) c2 x0)).(let H5 \def (eq_ind C c3 (\lambda (c: C).(drop (S i0) O c e2)) H1 (CHead x0 (Flat f) x1) H2) in (eq_ind_r T (lift h (r (Flat f) d0) x1) (\lambda (t0: T).(ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) t0) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)))) (ex2_ind C (\lambda (e1: C).(drop (S i0) O c2 e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) (lift h (r (Flat f) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x: C).(\lambda (H6: (drop (S i0) O c2 x)).(\lambda (H7: (drop h (minus (S d0) (S i0)) x e2)).(ex_intro2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) (lift h (r (Flat f) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)) x (drop_drop (Flat f) i0 c2 x H6 (lift h (r (Flat f) d0) x1)) H7)))) (IHc x0 h H4 e2 (drop_gen_drop (Flat f) x0 e2 x1 i0 H5))) t H3))))))) (drop_gen_skip_l c2 c3 t h d0 (Flat f) H0))))))))) k)))) c1))))) d)))) i). theorem drop_trans_ge: \forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i O c2 e2) \to ((le d i) \to (drop (plus i h) O c1 e2))))))))) \def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop n O c2 e2) \to ((le d n) \to (drop (plus n h) O c1 e2)))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H0: (drop O O c2 e2)).(\lambda (H1: (le d O)).(eq_ind C c2 (\lambda (c: C).(drop (plus O h) O c1 c)) (let H2 \def (match H1 return (\lambda (_: ?).(\lambda (n: nat).((eq nat n O) \to (drop (plus O h) O c1 c2)))) with [le_n \Rightarrow (\lambda (H0: (eq nat d O)).(eq_ind nat O (\lambda (_: nat).(drop (plus O h) O c1 c2)) (let H2 \def (eq_ind nat d (\lambda (n: nat).(le n O)) H1 O H0) in (let H3 \def (eq_ind nat d (\lambda (n: nat).(drop h n c1 c2)) H O H0) in H3)) d (sym_eq nat d O H0))) | (le_S m H0) \Rightarrow (\lambda (H2: (eq nat (S m) O)).((let H1 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind ((le d m) \to (drop (plus O h) O c1 c2)) H1)) H0))]) in (H2 (refl_equal nat O))) e2 (drop_gen_refl c2 e2 H0)))))))))) (\lambda (i0: nat).(\lambda (IHi: ((\forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i0 O c2 e2) \to ((le d i0) \to (drop (plus i0 h) O c1 e2))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to ((le d (S i0)) \to (drop (plus (S i0) h) O c e2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) c2)).(\lambda (e2: C).(\lambda (H0: (drop (S i0) O c2 e2)).(\lambda (H1: (le d (S i0))).(and3_ind (eq C c2 (CSort n)) (eq nat h O) (eq nat d O) (drop (S (plus i0 h)) O (CSort n) e2) (\lambda (H2: (eq C c2 (CSort n))).(\lambda (H3: (eq nat h O)).(\lambda (H4: (eq nat d O)).(eq_ind_r nat O (\lambda (n0: nat).(drop (S (plus i0 n0)) O (CSort n) e2)) (let H5 \def (eq_ind nat d (\lambda (n: nat).(le n (S i0))) H1 O H4) in (let H6 \def (eq_ind C c2 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CSort n) H2) in (and3_ind (eq C e2 (CSort n)) (eq nat (S i0) O) (eq nat O O) (drop (S (plus i0 O)) O (CSort n) e2) (\lambda (H7: (eq C e2 (CSort n))).(\lambda (H8: (eq nat (S i0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n) (\lambda (c: C).(drop (S (plus i0 O)) O (CSort n) c)) (let H10 \def (eq_ind nat (S i0) (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H8) in (False_ind (drop (S (plus i0 O)) O (CSort n) (CSort n)) H10)) e2 H7)))) (drop_gen_sort n (S i0) O e2 H6)))) h H3)))) (drop_gen_sort n h d c2 H)))))))))) (\lambda (c2: C).(\lambda (IHc: ((\forall (c3: C).(\forall (d: nat).(\forall (h: nat).((drop h d c2 c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le d (S i0)) \to (drop (S (plus i0 h)) O c2 e2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: C).(\lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le n (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) e2))))))) (\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le O (S i0)) \to (drop (S (plus i0 n)) O (CHead c2 k t) e2)))))) (\lambda (H: (drop O O (CHead c2 k t) c3)).(\lambda (e2: C).(\lambda (H0: (drop (S i0) O c3 e2)).(\lambda (_: (le O (S i0))).(let H2 \def (eq_ind_r C c3 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CHead c2 k t) (drop_gen_refl (CHead c2 k t) c3 H)) in (eq_ind nat i0 (\lambda (n: nat).(drop (S n) O (CHead c2 k t) e2)) (drop_drop k i0 c2 e2 (drop_gen_drop k c2 e2 t i0 H2) t) (plus i0 O) (plus_n_O i0))))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le O (S i0)) \to (drop (S (plus i0 n)) O (CHead c2 k t) e2))))))).(\lambda (H0: (drop (S n) O (CHead c2 k t) c3)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c3 e2)).(\lambda (H2: (le O (S i0))).(eq_ind nat (S (plus i0 n)) (\lambda (n0: nat).(drop (S n0) O (CHead c2 k t) e2)) (drop_drop k (S (plus i0 n)) c2 e2 (eq_ind_r nat (S (r k (plus i0 n))) (\lambda (n0: nat).(drop n0 O c2 e2)) (eq_ind_r nat (plus i0 (r k n)) (\lambda (n0: nat).(drop (S n0) O c2 e2)) (IHc c3 O (r k n) (drop_gen_drop k c2 c3 t n H0) e2 H1 H2) (r k (plus i0 n)) (r_plus_sym k i0 n)) (r k (S (plus i0 n))) (r_S k (plus i0 n))) t) (plus i0 (S n)) (plus_n_Sm i0 n)))))))) h)) (\lambda (d0: nat).(\lambda (IHd: ((\forall (h: nat).((drop h d0 (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le d0 (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) e2)))))))).(\lambda (h: nat).(\lambda (H: (drop h (S d0) (CHead c2 k t) c3)).(\lambda (e2: C).(\lambda (H0: (drop (S i0) O c3 e2)).(\lambda (H1: (le (S d0) (S i0))).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C c3 (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k d0) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k d0) c2 e))) (drop (S (plus i0 h)) O (CHead c2 k t) e2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C c3 (CHead x0 k x1))).(\lambda (H3: (eq T t (lift h (r k d0) x1))).(\lambda (H4: (drop h (r k d0) c2 x0)).(let H5 \def (eq_ind C c3 (\lambda (c: C).(\forall (h: nat).((drop h d0 (CHead c2 k t) c) \to (\forall (e2: C).((drop (S i0) O c e2) \to ((le d0 (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) e2))))))) IHd (CHead x0 k x1) H2) in (let H6 \def (eq_ind C c3 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CHead x0 k x1) H2) in (let H7 \def (eq_ind T t (\lambda (t: T).(\forall (h: nat).((drop h d0 (CHead c2 k t) (CHead x0 k x1)) \to (\forall (e2: C).((drop (S i0) O (CHead x0 k x1) e2) \to ((le d0 (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) e2))))))) H5 (lift h (r k d0) x1) H3) in (eq_ind_r T (lift h (r k d0) x1) (\lambda (t0: T).(drop (S (plus i0 h)) O (CHead c2 k t0) e2)) (drop_drop k (plus i0 h) c2 e2 (K_ind (\lambda (k0: K).((drop h (r k0 d0) c2 x0) \to ((drop (r k0 i0) O x0 e2) \to (drop (r k0 (plus i0 h)) O c2 e2)))) (\lambda (b: B).(\lambda (H8: (drop h (r (Bind b) d0) c2 x0)).(\lambda (H9: (drop (r (Bind b) i0) O x0 e2)).(IHi c2 x0 (r (Bind b) d0) h H8 e2 H9 (le_S_n (r (Bind b) d0) i0 H1))))) (\lambda (f: F).(\lambda (H8: (drop h (r (Flat f) d0) c2 x0)).(\lambda (H9: (drop (r (Flat f) i0) O x0 e2)).(IHc x0 (r (Flat f) d0) h H8 e2 H9 H1)))) k H4 (drop_gen_drop k x0 e2 x1 i0 H6)) (lift h (r k d0) x1)) t H3))))))))) (drop_gen_skip_l c2 c3 t h d0 k H))))))))) d))))))) c1)))) i). + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop n O c2 e2) \to ((le d n) \to (drop (plus n h) O c1 e2)))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H0: (drop O O c2 e2)).(\lambda (H1: (le d O)).(eq_ind C c2 (\lambda (c: C).(drop (plus O h) O c1 c)) (let H2 \def (match H1 return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to (drop (plus O h) O c1 c2)))) with [le_n \Rightarrow (\lambda (H0: (eq nat d O)).(eq_ind nat O (\lambda (_: nat).(drop (plus O h) O c1 c2)) (let H2 \def (eq_ind nat d (\lambda (n: nat).(le n O)) H1 O H0) in (let H3 \def (eq_ind nat d (\lambda (n: nat).(drop h n c1 c2)) H O H0) in H3)) d (sym_eq nat d O H0))) | (le_S m H0) \Rightarrow (\lambda (H2: (eq nat (S m) O)).((let H1 \def (eq_ind nat (S m) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H2) in (False_ind ((le d m) \to (drop (plus O h) O c1 c2)) H1)) H0))]) in (H2 (refl_equal nat O))) e2 (drop_gen_refl c2 e2 H0)))))))))) (\lambda (i0: nat).(\lambda (IHi: ((\forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i0 O c2 e2) \to ((le d i0) \to (drop (plus i0 h) O c1 e2))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c c2) \to (\forall (e2: C).((drop (S i0) O c2 e2) \to ((le d (S i0)) \to (drop (plus (S i0) h) O c e2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) c2)).(\lambda (e2: C).(\lambda (H0: (drop (S i0) O c2 e2)).(\lambda (H1: (le d (S i0))).(and3_ind (eq C c2 (CSort n)) (eq nat h O) (eq nat d O) (drop (S (plus i0 h)) O (CSort n) e2) (\lambda (H2: (eq C c2 (CSort n))).(\lambda (H3: (eq nat h O)).(\lambda (H4: (eq nat d O)).(eq_ind_r nat O (\lambda (n0: nat).(drop (S (plus i0 n0)) O (CSort n) e2)) (let H5 \def (eq_ind nat d (\lambda (n: nat).(le n (S i0))) H1 O H4) in (let H6 \def (eq_ind C c2 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CSort n) H2) in (and3_ind (eq C e2 (CSort n)) (eq nat (S i0) O) (eq nat O O) (drop (S (plus i0 O)) O (CSort n) e2) (\lambda (H7: (eq C e2 (CSort n))).(\lambda (H8: (eq nat (S i0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n) (\lambda (c: C).(drop (S (plus i0 O)) O (CSort n) c)) (let H10 \def (eq_ind nat (S i0) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H8) in (False_ind (drop (S (plus i0 O)) O (CSort n) (CSort n)) H10)) e2 H7)))) (drop_gen_sort n (S i0) O e2 H6)))) h H3)))) (drop_gen_sort n h d c2 H)))))))))) (\lambda (c2: C).(\lambda (IHc: ((\forall (c3: C).(\forall (d: nat).(\forall (h: nat).((drop h d c2 c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le d (S i0)) \to (drop (S (plus i0 h)) O c2 e2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: C).(\lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le n (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) e2))))))) (\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le O (S i0)) \to (drop (S (plus i0 n)) O (CHead c2 k t) e2)))))) (\lambda (H: (drop O O (CHead c2 k t) c3)).(\lambda (e2: C).(\lambda (H0: (drop (S i0) O c3 e2)).(\lambda (_: (le O (S i0))).(let H2 \def (eq_ind_r C c3 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CHead c2 k t) (drop_gen_refl (CHead c2 k t) c3 H)) in (eq_ind nat i0 (\lambda (n: nat).(drop (S n) O (CHead c2 k t) e2)) (drop_drop k i0 c2 e2 (drop_gen_drop k c2 e2 t i0 H2) t) (plus i0 O) (plus_n_O i0))))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le O (S i0)) \to (drop (S (plus i0 n)) O (CHead c2 k t) e2))))))).(\lambda (H0: (drop (S n) O (CHead c2 k t) c3)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c3 e2)).(\lambda (H2: (le O (S i0))).(eq_ind nat (S (plus i0 n)) (\lambda (n0: nat).(drop (S n0) O (CHead c2 k t) e2)) (drop_drop k (S (plus i0 n)) c2 e2 (eq_ind_r nat (S (r k (plus i0 n))) (\lambda (n0: nat).(drop n0 O c2 e2)) (eq_ind_r nat (plus i0 (r k n)) (\lambda (n0: nat).(drop (S n0) O c2 e2)) (IHc c3 O (r k n) (drop_gen_drop k c2 c3 t n H0) e2 H1 H2) (r k (plus i0 n)) (r_plus_sym k i0 n)) (r k (S (plus i0 n))) (r_S k (plus i0 n))) t) (plus i0 (S n)) (plus_n_Sm i0 n)))))))) h)) (\lambda (d0: nat).(\lambda (IHd: ((\forall (h: nat).((drop h d0 (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le d0 (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) e2)))))))).(\lambda (h: nat).(\lambda (H: (drop h (S d0) (CHead c2 k t) c3)).(\lambda (e2: C).(\lambda (H0: (drop (S i0) O c3 e2)).(\lambda (H1: (le (S d0) (S i0))).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C c3 (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k d0) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k d0) c2 e))) (drop (S (plus i0 h)) O (CHead c2 k t) e2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C c3 (CHead x0 k x1))).(\lambda (H3: (eq T t (lift h (r k d0) x1))).(\lambda (H4: (drop h (r k d0) c2 x0)).(let H5 \def (eq_ind C c3 (\lambda (c: C).(\forall (h: nat).((drop h d0 (CHead c2 k t) c) \to (\forall (e2: C).((drop (S i0) O c e2) \to ((le d0 (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) e2))))))) IHd (CHead x0 k x1) H2) in (let H6 \def (eq_ind C c3 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CHead x0 k x1) H2) in (let H7 \def (eq_ind T t (\lambda (t: T).(\forall (h: nat).((drop h d0 (CHead c2 k t) (CHead x0 k x1)) \to (\forall (e2: C).((drop (S i0) O (CHead x0 k x1) e2) \to ((le d0 (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) e2))))))) H5 (lift h (r k d0) x1) H3) in (eq_ind_r T (lift h (r k d0) x1) (\lambda (t0: T).(drop (S (plus i0 h)) O (CHead c2 k t0) e2)) (drop_drop k (plus i0 h) c2 e2 (K_ind (\lambda (k0: K).((drop h (r k0 d0) c2 x0) \to ((drop (r k0 i0) O x0 e2) \to (drop (r k0 (plus i0 h)) O c2 e2)))) (\lambda (b: B).(\lambda (H8: (drop h (r (Bind b) d0) c2 x0)).(\lambda (H9: (drop (r (Bind b) i0) O x0 e2)).(IHi c2 x0 (r (Bind b) d0) h H8 e2 H9 (le_S_n (r (Bind b) d0) i0 H1))))) (\lambda (f: F).(\lambda (H8: (drop h (r (Flat f) d0) c2 x0)).(\lambda (H9: (drop (r (Flat f) i0) O x0 e2)).(IHc x0 (r (Flat f) d0) h H8 e2 H9 H1)))) k H4 (drop_gen_drop k x0 e2 x1 i0 H6)) (lift h (r k d0) x1)) t H3))))))))) (drop_gen_skip_l c2 c3 t h d0 k H))))))))) d))))))) c1)))) i). inductive drop1: PList \to (C \to (C \to Prop)) \def | drop1_nil: \forall (c: C).(drop1 PNil c c) @@ -734,12 +734,12 @@ definition ctrans: theorem drop1_skip_bind: \forall (b: B).(\forall (e: C).(\forall (hds: PList).(\forall (c: C).(\forall (u: T).((drop1 hds c e) \to (drop1 (Ss hds) (CHead c (Bind b) (lift1 hds u)) (CHead e (Bind b) u))))))) \def - \lambda (b: B).(\lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c: C).(\forall (u: T).((drop1 p c e) \to (drop1 (Ss p) (CHead c (Bind b) (lift1 p u)) (CHead e (Bind b) u)))))) (\lambda (c: C).(\lambda (u: T).(\lambda (H: (drop1 PNil c e)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (p: PList).(\lambda (c0: C).(\lambda (c1: C).((eq PList p PNil) \to ((eq C c0 c) \to ((eq C c1 e) \to (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq C c0 e)).(eq_ind C c (\lambda (c1: C).((eq C c1 e) \to (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u)))) (\lambda (H3: (eq C c e)).(eq_ind C e (\lambda (c: C).(drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u))) (drop1_nil (CHead e (Bind b) u)) c (sym_eq C c e H3))) c0 (sym_eq C c0 c H1) H2)))) | (drop1_cons c1 c2 h d H0 c3 hds H1) \Rightarrow (\lambda (H2: (eq PList (PCons h d hds) PNil)).(\lambda (H3: (eq C c1 c)).(\lambda (H4: (eq C c3 e)).((let H5 \def (eq_ind PList (PCons h d hds) (\lambda (e0: PList).(match e0 return (\lambda (_: ?).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H2) in (False_ind ((eq C c1 c) \to ((eq C c3 e) \to ((drop h d c1 c2) \to ((drop1 hds c2 c3) \to (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u)))))) H5)) H3 H4 H0 H1))))]) in (H0 (refl_equal PList PNil) (refl_equal C c) (refl_equal C e)))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: C).(\forall (u: T).((drop1 p c e) \to (drop1 (Ss p) (CHead c (Bind b) (lift1 p u)) (CHead e (Bind b) u))))))).(\lambda (c: C).(\lambda (u: T).(\lambda (H0: (drop1 (PCons n n0 p) c e)).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (p0: PList).(\lambda (c0: C).(\lambda (c1: C).((eq PList p0 (PCons n n0 p)) \to ((eq C c0 c) \to ((eq C c1 e) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (H1: (eq PList PNil (PCons n n0 p))).(\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq C c0 e)).((let H4 \def (eq_ind PList PNil (\lambda (e0: PList).(match e0 return (\lambda (_: ?).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H1) in (False_ind ((eq C c0 c) \to ((eq C c0 e) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)))) H4)) H2 H3)))) | (drop1_cons c1 c2 h d H1 c3 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H4: (eq C c1 c)).(\lambda (H5: (eq C c3 e)).((let H6 \def (f_equal PList PList (\lambda (e0: PList).(match e0 return (\lambda (_: ?).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H3) in ((let H7 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: ?).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H3) in ((let H8 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: ?).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H3) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n1 d c1 c2) \to ((drop1 hds c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))))))) (\lambda (H9: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n n1 c1 c2) \to ((drop1 hds c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)))))))) (\lambda (H10: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c1 c) \to ((eq C c3 e) \to ((drop n n0 c1 c2) \to ((drop1 p0 c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))))) (\lambda (H11: (eq C c1 c)).(eq_ind C c (\lambda (c0: C).((eq C c3 e) \to ((drop n n0 c0 c2) \to ((drop1 p c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)))))) (\lambda (H12: (eq C c3 e)).(eq_ind C e (\lambda (c0: C).((drop n n0 c c2) \to ((drop1 p c2 c0) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))) (\lambda (H13: (drop n n0 c c2)).(\lambda (H14: (drop1 p c2 e)).(drop1_cons (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead c2 (Bind b) (lift1 p u)) n (S n0) (drop_skip_bind n n0 c c2 H13 b (lift1 p u)) (CHead e (Bind b) u) (Ss p) (H c2 u H14)))) c3 (sym_eq C c3 e H12))) c1 (sym_eq C c1 c H11))) hds (sym_eq PList hds p H10))) d (sym_eq nat d n0 H9))) h (sym_eq nat h n H8))) H7)) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList (PCons n n0 p)) (refl_equal C c) (refl_equal C e)))))))))) hds))). + \lambda (b: B).(\lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c: C).(\forall (u: T).((drop1 p c e) \to (drop1 (Ss p) (CHead c (Bind b) (lift1 p u)) (CHead e (Bind b) u)))))) (\lambda (c: C).(\lambda (u: T).(\lambda (H: (drop1 PNil c e)).(let H0 \def (match H return (\lambda (p: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p c0 c1)).((eq PList p PNil) \to ((eq C c0 c) \to ((eq C c1 e) \to (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq C c0 e)).(eq_ind C c (\lambda (c1: C).((eq C c1 e) \to (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u)))) (\lambda (H3: (eq C c e)).(eq_ind C e (\lambda (c: C).(drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u))) (drop1_nil (CHead e (Bind b) u)) c (sym_eq C c e H3))) c0 (sym_eq C c0 c H1) H2)))) | (drop1_cons c1 c2 h d H0 c3 hds H1) \Rightarrow (\lambda (H2: (eq PList (PCons h d hds) PNil)).(\lambda (H3: (eq C c1 c)).(\lambda (H4: (eq C c3 e)).((let H5 \def (eq_ind PList (PCons h d hds) (\lambda (e0: PList).(match e0 return (\lambda (_: PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H2) in (False_ind ((eq C c1 c) \to ((eq C c3 e) \to ((drop h d c1 c2) \to ((drop1 hds c2 c3) \to (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u)))))) H5)) H3 H4 H0 H1))))]) in (H0 (refl_equal PList PNil) (refl_equal C c) (refl_equal C e)))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: C).(\forall (u: T).((drop1 p c e) \to (drop1 (Ss p) (CHead c (Bind b) (lift1 p u)) (CHead e (Bind b) u))))))).(\lambda (c: C).(\lambda (u: T).(\lambda (H0: (drop1 (PCons n n0 p) c e)).(let H1 \def (match H0 return (\lambda (p0: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p0 c0 c1)).((eq PList p0 (PCons n n0 p)) \to ((eq C c0 c) \to ((eq C c1 e) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (H1: (eq PList PNil (PCons n n0 p))).(\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq C c0 e)).((let H4 \def (eq_ind PList PNil (\lambda (e0: PList).(match e0 return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H1) in (False_ind ((eq C c0 c) \to ((eq C c0 e) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)))) H4)) H2 H3)))) | (drop1_cons c1 c2 h d H1 c3 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H4: (eq C c1 c)).(\lambda (H5: (eq C c3 e)).((let H6 \def (f_equal PList PList (\lambda (e0: PList).(match e0 return (\lambda (_: PList).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H3) in ((let H7 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: PList).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H3) in ((let H8 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: PList).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H3) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n1 d c1 c2) \to ((drop1 hds c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))))))) (\lambda (H9: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n n1 c1 c2) \to ((drop1 hds c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)))))))) (\lambda (H10: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c1 c) \to ((eq C c3 e) \to ((drop n n0 c1 c2) \to ((drop1 p0 c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))))) (\lambda (H11: (eq C c1 c)).(eq_ind C c (\lambda (c0: C).((eq C c3 e) \to ((drop n n0 c0 c2) \to ((drop1 p c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u)))))) (\lambda (H12: (eq C c3 e)).(eq_ind C e (\lambda (c0: C).((drop n n0 c c2) \to ((drop1 p c2 c0) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))) (\lambda (H13: (drop n n0 c c2)).(\lambda (H14: (drop1 p c2 e)).(drop1_cons (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead c2 (Bind b) (lift1 p u)) n (S n0) (drop_skip_bind n n0 c c2 H13 b (lift1 p u)) (CHead e (Bind b) u) (Ss p) (H c2 u H14)))) c3 (sym_eq C c3 e H12))) c1 (sym_eq C c1 c H11))) hds (sym_eq PList hds p H10))) d (sym_eq nat d n0 H9))) h (sym_eq nat h n H8))) H7)) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList (PCons n n0 p)) (refl_equal C c) (refl_equal C e)))))))))) hds))). theorem drop1_cons_tail: \forall (c2: C).(\forall (c3: C).(\forall (h: nat).(\forall (d: nat).((drop h d c2 c3) \to (\forall (hds: PList).(\forall (c1: C).((drop1 hds c1 c2) \to (drop1 (PConsTail hds h d) c1 c3)))))))) \def - \lambda (c2: C).(\lambda (c3: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (drop h d c2 c3)).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c1: C).((drop1 p c1 c2) \to (drop1 (PConsTail p h d) c1 c3)))) (\lambda (c1: C).(\lambda (H0: (drop1 PNil c1 c2)).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p PNil) \to ((eq C c c1) \to ((eq C c0 c2) \to (drop1 (PCons h d PNil) c1 c3)))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c c1)).(\lambda (H3: (eq C c c2)).(eq_ind C c1 (\lambda (c0: C).((eq C c0 c2) \to (drop1 (PCons h d PNil) c1 c3))) (\lambda (H4: (eq C c1 c2)).(eq_ind C c2 (\lambda (c0: C).(drop1 (PCons h d PNil) c0 c3)) (drop1_cons c2 c3 h d H c3 PNil (drop1_nil c3)) c1 (sym_eq C c1 c2 H4))) c (sym_eq C c c1 H2) H3)))) | (drop1_cons c0 c4 h0 d0 H1 c5 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h0 d0 hds) PNil)).(\lambda (H4: (eq C c0 c1)).(\lambda (H5: (eq C c5 c2)).((let H6 \def (eq_ind PList (PCons h0 d0 hds) (\lambda (e: PList).(match e return (\lambda (_: ?).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c0 c1) \to ((eq C c5 c2) \to ((drop h0 d0 c0 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons h d PNil) c1 c3))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c1) (refl_equal C c2))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H0: ((\forall (c1: C).((drop1 p c1 c2) \to (drop1 (PConsTail p h d) c1 c3))))).(\lambda (c1: C).(\lambda (H1: (drop1 (PCons n n0 p) c1 c2)).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (p0: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p0 (PCons n n0 p)) \to ((eq C c c1) \to ((eq C c0 c2) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3)))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c c1)).(\lambda (H4: (eq C c c2)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e return (\lambda (_: ?).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c1) \to ((eq C c c2) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3))) H5)) H3 H4)))) | (drop1_cons c0 c4 h0 d0 H2 c5 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h0 d0 hds) (PCons n n0 p))).(\lambda (H5: (eq C c0 c1)).(\lambda (H6: (eq C c5 c2)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e return (\lambda (_: ?).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h0 d0 hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: ?).nat) with [PNil \Rightarrow d0 | (PCons _ n _) \Rightarrow n])) (PCons h0 d0 hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: ?).nat) with [PNil \Rightarrow h0 | (PCons n _ _) \Rightarrow n])) (PCons h0 d0 hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d0 n0) \to ((eq PList hds p) \to ((eq C c0 c1) \to ((eq C c5 c2) \to ((drop n1 d0 c0 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3)))))))) (\lambda (H10: (eq nat d0 n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c0 c1) \to ((eq C c5 c2) \to ((drop n n1 c0 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c0 c1) \to ((eq C c5 c2) \to ((drop n n0 c0 c4) \to ((drop1 p0 c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3)))))) (\lambda (H12: (eq C c0 c1)).(eq_ind C c1 (\lambda (c: C).((eq C c5 c2) \to ((drop n n0 c c4) \to ((drop1 p c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3))))) (\lambda (H13: (eq C c5 c2)).(eq_ind C c2 (\lambda (c: C).((drop n n0 c1 c4) \to ((drop1 p c4 c) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3)))) (\lambda (H14: (drop n n0 c1 c4)).(\lambda (H15: (drop1 p c4 c2)).(drop1_cons c1 c4 n n0 H14 c3 (PConsTail p h d) (H0 c4 H15)))) c5 (sym_eq C c5 c2 H13))) c0 (sym_eq C c0 c1 H12))) hds (sym_eq PList hds p H11))) d0 (sym_eq nat d0 n0 H10))) h0 (sym_eq nat h0 n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c1) (refl_equal C c2))))))))) hds)))))). + \lambda (c2: C).(\lambda (c3: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (drop h d c2 c3)).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c1: C).((drop1 p c1 c2) \to (drop1 (PConsTail p h d) c1 c3)))) (\lambda (c1: C).(\lambda (H0: (drop1 PNil c1 c2)).(let H1 \def (match H0 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p c c0)).((eq PList p PNil) \to ((eq C c c1) \to ((eq C c0 c2) \to (drop1 (PCons h d PNil) c1 c3)))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c c1)).(\lambda (H3: (eq C c c2)).(eq_ind C c1 (\lambda (c0: C).((eq C c0 c2) \to (drop1 (PCons h d PNil) c1 c3))) (\lambda (H4: (eq C c1 c2)).(eq_ind C c2 (\lambda (c0: C).(drop1 (PCons h d PNil) c0 c3)) (drop1_cons c2 c3 h d H c3 PNil (drop1_nil c3)) c1 (sym_eq C c1 c2 H4))) c (sym_eq C c c1 H2) H3)))) | (drop1_cons c0 c4 h0 d0 H1 c5 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h0 d0 hds) PNil)).(\lambda (H4: (eq C c0 c1)).(\lambda (H5: (eq C c5 c2)).((let H6 \def (eq_ind PList (PCons h0 d0 hds) (\lambda (e: PList).(match e return (\lambda (_: PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c0 c1) \to ((eq C c5 c2) \to ((drop h0 d0 c0 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons h d PNil) c1 c3))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c1) (refl_equal C c2))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H0: ((\forall (c1: C).((drop1 p c1 c2) \to (drop1 (PConsTail p h d) c1 c3))))).(\lambda (c1: C).(\lambda (H1: (drop1 (PCons n n0 p) c1 c2)).(let H2 \def (match H1 return (\lambda (p0: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p0 c c0)).((eq PList p0 (PCons n n0 p)) \to ((eq C c c1) \to ((eq C c0 c2) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3)))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c c1)).(\lambda (H4: (eq C c c2)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c1) \to ((eq C c c2) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3))) H5)) H3 H4)))) | (drop1_cons c0 c4 h0 d0 H2 c5 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h0 d0 hds) (PCons n n0 p))).(\lambda (H5: (eq C c0 c1)).(\lambda (H6: (eq C c5 c2)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e return (\lambda (_: PList).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h0 d0 hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: PList).nat) with [PNil \Rightarrow d0 | (PCons _ n _) \Rightarrow n])) (PCons h0 d0 hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: PList).nat) with [PNil \Rightarrow h0 | (PCons n _ _) \Rightarrow n])) (PCons h0 d0 hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d0 n0) \to ((eq PList hds p) \to ((eq C c0 c1) \to ((eq C c5 c2) \to ((drop n1 d0 c0 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3)))))))) (\lambda (H10: (eq nat d0 n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c0 c1) \to ((eq C c5 c2) \to ((drop n n1 c0 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c0 c1) \to ((eq C c5 c2) \to ((drop n n0 c0 c4) \to ((drop1 p0 c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3)))))) (\lambda (H12: (eq C c0 c1)).(eq_ind C c1 (\lambda (c: C).((eq C c5 c2) \to ((drop n n0 c c4) \to ((drop1 p c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3))))) (\lambda (H13: (eq C c5 c2)).(eq_ind C c2 (\lambda (c: C).((drop n n0 c1 c4) \to ((drop1 p c4 c) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3)))) (\lambda (H14: (drop n n0 c1 c4)).(\lambda (H15: (drop1 p c4 c2)).(drop1_cons c1 c4 n n0 H14 c3 (PConsTail p h d) (H0 c4 H15)))) c5 (sym_eq C c5 c2 H13))) c0 (sym_eq C c0 c1 H12))) hds (sym_eq PList hds p H11))) d0 (sym_eq nat d0 n0 H10))) h0 (sym_eq nat h0 n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c1) (refl_equal C c2))))))))) hds)))))). theorem lift1_free: \forall (hds: PList).(\forall (i: nat).(\forall (t: T).(eq T (lift1 hds (lift (S i) O t)) (lift (S (trans hds i)) O (ctrans hds i t))))) @@ -761,22 +761,22 @@ definition cimp: theorem clear_gen_sort: \forall (x: C).(\forall (n: nat).((clear (CSort n) x) \to (\forall (P: Prop).P))) \def - \lambda (x: C).(\lambda (n: nat).(\lambda (H: (clear (CSort n) x)).(\lambda (P: Prop).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c: C).(\lambda (c0: C).((eq C c (CSort n)) \to ((eq C c0 x) \to P))))) with [(clear_bind b e u) \Rightarrow (\lambda (H0: (eq C (CHead e (Bind b) u) (CSort n))).(\lambda (H1: (eq C (CHead e (Bind b) u) x)).((let H2 \def (eq_ind C (CHead e (Bind b) u) (\lambda (e0: C).(match e0 return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H0) in (False_ind ((eq C (CHead e (Bind b) u) x) \to P) H2)) H1))) | (clear_flat e c H0 f u) \Rightarrow (\lambda (H1: (eq C (CHead e (Flat f) u) (CSort n))).(\lambda (H2: (eq C c x)).((let H3 \def (eq_ind C (CHead e (Flat f) u) (\lambda (e0: C).(match e0 return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H1) in (False_ind ((eq C c x) \to ((clear e c) \to P)) H3)) H2 H0)))]) in (H0 (refl_equal C (CSort n)) (refl_equal C x)))))). + \lambda (x: C).(\lambda (n: nat).(\lambda (H: (clear (CSort n) x)).(\lambda (P: Prop).(let H0 \def (match H return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (clear c c0)).((eq C c (CSort n)) \to ((eq C c0 x) \to P))))) with [(clear_bind b e u) \Rightarrow (\lambda (H0: (eq C (CHead e (Bind b) u) (CSort n))).(\lambda (H1: (eq C (CHead e (Bind b) u) x)).((let H2 \def (eq_ind C (CHead e (Bind b) u) (\lambda (e0: C).(match e0 return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H0) in (False_ind ((eq C (CHead e (Bind b) u) x) \to P) H2)) H1))) | (clear_flat e c H0 f u) \Rightarrow (\lambda (H1: (eq C (CHead e (Flat f) u) (CSort n))).(\lambda (H2: (eq C c x)).((let H3 \def (eq_ind C (CHead e (Flat f) u) (\lambda (e0: C).(match e0 return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H1) in (False_ind ((eq C c x) \to ((clear e c) \to P)) H3)) H2 H0)))]) in (H0 (refl_equal C (CSort n)) (refl_equal C x)))))). theorem clear_gen_bind: \forall (b: B).(\forall (e: C).(\forall (x: C).(\forall (u: T).((clear (CHead e (Bind b) u) x) \to (eq C x (CHead e (Bind b) u)))))) \def - \lambda (b: B).(\lambda (e: C).(\lambda (x: C).(\lambda (u: T).(\lambda (H: (clear (CHead e (Bind b) u) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e (Bind b) u)) \to ((eq C c0 x) \to (eq C x (CHead e (Bind b) u))))))) with [(clear_bind b0 e0 u0) \Rightarrow (\lambda (H0: (eq C (CHead e0 (Bind b0) u0) (CHead e (Bind b) u))).(\lambda (H1: (eq C (CHead e0 (Bind b0) u0) x)).((let H2 \def (f_equal C T (\lambda (e1: C).(match e1 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H0) in ((let H3 \def (f_equal C B (\lambda (e1: C).(match e1 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H0) in ((let H4 \def (f_equal C C (\lambda (e1: C).(match e1 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow e0 | (CHead c _ _) \Rightarrow c])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H0) in (eq_ind C e (\lambda (c: C).((eq B b0 b) \to ((eq T u0 u) \to ((eq C (CHead c (Bind b0) u0) x) \to (eq C x (CHead e (Bind b) u)))))) (\lambda (H5: (eq B b0 b)).(eq_ind B b (\lambda (b1: B).((eq T u0 u) \to ((eq C (CHead e (Bind b1) u0) x) \to (eq C x (CHead e (Bind b) u))))) (\lambda (H6: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C (CHead e (Bind b) t) x) \to (eq C x (CHead e (Bind b) u)))) (\lambda (H7: (eq C (CHead e (Bind b) u) x)).(eq_ind C (CHead e (Bind b) u) (\lambda (c: C).(eq C c (CHead e (Bind b) u))) (refl_equal C (CHead e (Bind b) u)) x H7)) u0 (sym_eq T u0 u H6))) b0 (sym_eq B b0 b H5))) e0 (sym_eq C e0 e H4))) H3)) H2)) H1))) | (clear_flat e0 c H0 f u0) \Rightarrow (\lambda (H1: (eq C (CHead e0 (Flat f) u0) (CHead e (Bind b) u))).(\lambda (H2: (eq C c x)).((let H3 \def (eq_ind C (CHead e0 (Flat f) u0) (\lambda (e1: C).(match e1 return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (CHead e (Bind b) u) H1) in (False_ind ((eq C c x) \to ((clear e0 c) \to (eq C x (CHead e (Bind b) u)))) H3)) H2 H0)))]) in (H0 (refl_equal C (CHead e (Bind b) u)) (refl_equal C x))))))). + \lambda (b: B).(\lambda (e: C).(\lambda (x: C).(\lambda (u: T).(\lambda (H: (clear (CHead e (Bind b) u) x)).(let H0 \def (match H return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (clear c c0)).((eq C c (CHead e (Bind b) u)) \to ((eq C c0 x) \to (eq C x (CHead e (Bind b) u))))))) with [(clear_bind b0 e0 u0) \Rightarrow (\lambda (H0: (eq C (CHead e0 (Bind b0) u0) (CHead e (Bind b) u))).(\lambda (H1: (eq C (CHead e0 (Bind b0) u0) x)).((let H2 \def (f_equal C T (\lambda (e1: C).(match e1 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H0) in ((let H3 \def (f_equal C B (\lambda (e1: C).(match e1 return (\lambda (_: C).B) with [(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H0) in ((let H4 \def (f_equal C C (\lambda (e1: C).(match e1 return (\lambda (_: C).C) with [(CSort _) \Rightarrow e0 | (CHead c _ _) \Rightarrow c])) (CHead e0 (Bind b0) u0) (CHead e (Bind b) u) H0) in (eq_ind C e (\lambda (c: C).((eq B b0 b) \to ((eq T u0 u) \to ((eq C (CHead c (Bind b0) u0) x) \to (eq C x (CHead e (Bind b) u)))))) (\lambda (H5: (eq B b0 b)).(eq_ind B b (\lambda (b1: B).((eq T u0 u) \to ((eq C (CHead e (Bind b1) u0) x) \to (eq C x (CHead e (Bind b) u))))) (\lambda (H6: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C (CHead e (Bind b) t) x) \to (eq C x (CHead e (Bind b) u)))) (\lambda (H7: (eq C (CHead e (Bind b) u) x)).(eq_ind C (CHead e (Bind b) u) (\lambda (c: C).(eq C c (CHead e (Bind b) u))) (refl_equal C (CHead e (Bind b) u)) x H7)) u0 (sym_eq T u0 u H6))) b0 (sym_eq B b0 b H5))) e0 (sym_eq C e0 e H4))) H3)) H2)) H1))) | (clear_flat e0 c H0 f u0) \Rightarrow (\lambda (H1: (eq C (CHead e0 (Flat f) u0) (CHead e (Bind b) u))).(\lambda (H2: (eq C c x)).((let H3 \def (eq_ind C (CHead e0 (Flat f) u0) (\lambda (e1: C).(match e1 return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (CHead e (Bind b) u) H1) in (False_ind ((eq C c x) \to ((clear e0 c) \to (eq C x (CHead e (Bind b) u)))) H3)) H2 H0)))]) in (H0 (refl_equal C (CHead e (Bind b) u)) (refl_equal C x))))))). theorem clear_gen_flat: \forall (f: F).(\forall (e: C).(\forall (x: C).(\forall (u: T).((clear (CHead e (Flat f) u) x) \to (clear e x))))) \def - \lambda (f: F).(\lambda (e: C).(\lambda (x: C).(\lambda (u: T).(\lambda (H: (clear (CHead e (Flat f) u) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e (Flat f) u)) \to ((eq C c0 x) \to (clear e x)))))) with [(clear_bind b e0 u0) \Rightarrow (\lambda (H0: (eq C (CHead e0 (Bind b) u0) (CHead e (Flat f) u))).(\lambda (H1: (eq C (CHead e0 (Bind b) u0) x)).((let H2 \def (eq_ind C (CHead e0 (Bind b) u0) (\lambda (e1: C).(match e1 return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e (Flat f) u) H0) in (False_ind ((eq C (CHead e0 (Bind b) u0) x) \to (clear e x)) H2)) H1))) | (clear_flat e0 c H0 f0 u0) \Rightarrow (\lambda (H1: (eq C (CHead e0 (Flat f0) u0) (CHead e (Flat f) u))).(\lambda (H2: (eq C c x)).((let H3 \def (f_equal C T (\lambda (e1: C).(match e1 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) H1) in ((let H4 \def (f_equal C F (\lambda (e1: C).(match e1 return (\lambda (_: ?).F) with [(CSort _) \Rightarrow f0 | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).F) with [(Bind _) \Rightarrow f0 | (Flat f) \Rightarrow f])])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) H1) in ((let H5 \def (f_equal C C (\lambda (e1: C).(match e1 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow e0 | (CHead c _ _) \Rightarrow c])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) H1) in (eq_ind C e (\lambda (c0: C).((eq F f0 f) \to ((eq T u0 u) \to ((eq C c x) \to ((clear c0 c) \to (clear e x)))))) (\lambda (H6: (eq F f0 f)).(eq_ind F f (\lambda (_: F).((eq T u0 u) \to ((eq C c x) \to ((clear e c) \to (clear e x))))) (\lambda (H7: (eq T u0 u)).(eq_ind T u (\lambda (_: T).((eq C c x) \to ((clear e c) \to (clear e x)))) (\lambda (H8: (eq C c x)).(eq_ind C x (\lambda (c0: C).((clear e c0) \to (clear e x))) (\lambda (H9: (clear e x)).H9) c (sym_eq C c x H8))) u0 (sym_eq T u0 u H7))) f0 (sym_eq F f0 f H6))) e0 (sym_eq C e0 e H5))) H4)) H3)) H2 H0)))]) in (H0 (refl_equal C (CHead e (Flat f) u)) (refl_equal C x))))))). + \lambda (f: F).(\lambda (e: C).(\lambda (x: C).(\lambda (u: T).(\lambda (H: (clear (CHead e (Flat f) u) x)).(let H0 \def (match H return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (clear c c0)).((eq C c (CHead e (Flat f) u)) \to ((eq C c0 x) \to (clear e x)))))) with [(clear_bind b e0 u0) \Rightarrow (\lambda (H0: (eq C (CHead e0 (Bind b) u0) (CHead e (Flat f) u))).(\lambda (H1: (eq C (CHead e0 (Bind b) u0) x)).((let H2 \def (eq_ind C (CHead e0 (Bind b) u0) (\lambda (e1: C).(match e1 return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e (Flat f) u) H0) in (False_ind ((eq C (CHead e0 (Bind b) u0) x) \to (clear e x)) H2)) H1))) | (clear_flat e0 c H0 f0 u0) \Rightarrow (\lambda (H1: (eq C (CHead e0 (Flat f0) u0) (CHead e (Flat f) u))).(\lambda (H2: (eq C c x)).((let H3 \def (f_equal C T (\lambda (e1: C).(match e1 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) H1) in ((let H4 \def (f_equal C F (\lambda (e1: C).(match e1 return (\lambda (_: C).F) with [(CSort _) \Rightarrow f0 | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).F) with [(Bind _) \Rightarrow f0 | (Flat f) \Rightarrow f])])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) H1) in ((let H5 \def (f_equal C C (\lambda (e1: C).(match e1 return (\lambda (_: C).C) with [(CSort _) \Rightarrow e0 | (CHead c _ _) \Rightarrow c])) (CHead e0 (Flat f0) u0) (CHead e (Flat f) u) H1) in (eq_ind C e (\lambda (c0: C).((eq F f0 f) \to ((eq T u0 u) \to ((eq C c x) \to ((clear c0 c) \to (clear e x)))))) (\lambda (H6: (eq F f0 f)).(eq_ind F f (\lambda (_: F).((eq T u0 u) \to ((eq C c x) \to ((clear e c) \to (clear e x))))) (\lambda (H7: (eq T u0 u)).(eq_ind T u (\lambda (_: T).((eq C c x) \to ((clear e c) \to (clear e x)))) (\lambda (H8: (eq C c x)).(eq_ind C x (\lambda (c0: C).((clear e c0) \to (clear e x))) (\lambda (H9: (clear e x)).H9) c (sym_eq C c x H8))) u0 (sym_eq T u0 u H7))) f0 (sym_eq F f0 f H6))) e0 (sym_eq C e0 e H5))) H4)) H3)) H2 H0)))]) in (H0 (refl_equal C (CHead e (Flat f) u)) (refl_equal C x))))))). theorem clear_gen_flat_r: \forall (f: F).(\forall (x: C).(\forall (e: C).(\forall (u: T).((clear x (CHead e (Flat f) u)) \to (\forall (P: Prop).P))))) \def - \lambda (f: F).(\lambda (x: C).(\lambda (e: C).(\lambda (u: T).(\lambda (H: (clear x (CHead e (Flat f) u))).(\lambda (P: Prop).(insert_eq C (CHead e (Flat f) u) (\lambda (c: C).(clear x c)) P (\lambda (y: C).(\lambda (H0: (clear x y)).(clear_ind (\lambda (_: C).(\lambda (c0: C).((eq C c0 (CHead e (Flat f) u)) \to P))) (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (H1: (eq C (CHead e0 (Bind b) u0) (CHead e (Flat f) u))).(let H2 \def (eq_ind C (CHead e0 (Bind b) u0) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e (Flat f) u) H1) in (False_ind P H2)))))) (\lambda (e0: C).(\lambda (c: C).(\lambda (H1: (clear e0 c)).(\lambda (H2: (((eq C c (CHead e (Flat f) u)) \to P))).(\lambda (_: F).(\lambda (_: T).(\lambda (H3: (eq C c (CHead e (Flat f) u))).(let H4 \def (eq_ind C c (\lambda (c: C).((eq C c (CHead e (Flat f) u)) \to P)) H2 (CHead e (Flat f) u) H3) in (let H5 \def (eq_ind C c (\lambda (c: C).(clear e0 c)) H1 (CHead e (Flat f) u) H3) in (H4 (refl_equal C (CHead e (Flat f) u)))))))))))) x y H0))) H)))))). + \lambda (f: F).(\lambda (x: C).(\lambda (e: C).(\lambda (u: T).(\lambda (H: (clear x (CHead e (Flat f) u))).(\lambda (P: Prop).(insert_eq C (CHead e (Flat f) u) (\lambda (c: C).(clear x c)) P (\lambda (y: C).(\lambda (H0: (clear x y)).(clear_ind (\lambda (_: C).(\lambda (c0: C).((eq C c0 (CHead e (Flat f) u)) \to P))) (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (H1: (eq C (CHead e0 (Bind b) u0) (CHead e (Flat f) u))).(let H2 \def (eq_ind C (CHead e0 (Bind b) u0) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead e (Flat f) u) H1) in (False_ind P H2)))))) (\lambda (e0: C).(\lambda (c: C).(\lambda (H1: (clear e0 c)).(\lambda (H2: (((eq C c (CHead e (Flat f) u)) \to P))).(\lambda (_: F).(\lambda (_: T).(\lambda (H3: (eq C c (CHead e (Flat f) u))).(let H4 \def (eq_ind C c (\lambda (c: C).((eq C c (CHead e (Flat f) u)) \to P)) H2 (CHead e (Flat f) u) H3) in (let H5 \def (eq_ind C c (\lambda (c: C).(clear e0 c)) H1 (CHead e (Flat f) u) H3) in (H4 (refl_equal C (CHead e (Flat f) u)))))))))))) x y H0))) H)))))). theorem clear_gen_all: \forall (c1: C).(\forall (c2: C).((clear c1 c2) \to (ex_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(eq C c2 (CHead e (Bind b) u)))))))) @@ -786,42 +786,42 @@ theorem clear_gen_all: theorem drop_clear: \forall (c1: C).(\forall (c2: C).(\forall (i: nat).((drop (S i) O c1 c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c1 (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))))))) \def - \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (i: nat).((drop (S i) O c c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H: (drop (S i) O (CSort n) c2)).(and3_ind (eq C c2 (CSort n)) (eq nat (S i) O) (eq nat O O) (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CSort n) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))) (\lambda (_: (eq C c2 (CSort n))).(\lambda (H1: (eq nat (S i) O)).(\lambda (_: (eq nat O O)).(let H3 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CSort n) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))) H3))))) (drop_gen_sort n (S i) O c2 H)))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (i: nat).((drop (S i) O c c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop (S i) O (CHead c k t) c2)).((match k return (\lambda (_: ?).(\lambda (k0: K).((drop (r k0 i) O c c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c k0 t) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))))))) with [(Bind b) \Rightarrow (\lambda (H1: (drop (r (Bind b) i) O c c2)).(ex2_3_intro B C T (\lambda (b0: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Bind b) t) (CHead e (Bind b0) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) b c t (clear_bind b c t) H1)) | (Flat f) \Rightarrow (\lambda (H1: (drop (r (Flat f) i) O c c2)).(let H2 \def (H c2 i H1) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Flat f) t) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H3: (clear c (CHead x1 (Bind x0) x2))).(\lambda (H4: (drop i O x1 c2)).(ex2_3_intro B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Flat f) t) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) x0 x1 x2 (clear_flat c (CHead x1 (Bind x0) x2) H3 f t) H4)))))) H2)))]) (drop_gen_drop k c c2 t i H0))))))))) c1). + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (i: nat).((drop (S i) O c c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H: (drop (S i) O (CSort n) c2)).(and3_ind (eq C c2 (CSort n)) (eq nat (S i) O) (eq nat O O) (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CSort n) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))) (\lambda (_: (eq C c2 (CSort n))).(\lambda (H1: (eq nat (S i) O)).(\lambda (_: (eq nat O O)).(let H3 \def (eq_ind nat (S i) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H1) in (False_ind (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CSort n) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))) H3))))) (drop_gen_sort n (S i) O c2 H)))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (i: nat).((drop (S i) O c c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop (S i) O (CHead c k t) c2)).((match k return (\lambda (k0: K).((drop (r k0 i) O c c2) \to (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c k0 t) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))))) with [(Bind b) \Rightarrow (\lambda (H1: (drop (r (Bind b) i) O c c2)).(ex2_3_intro B C T (\lambda (b0: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Bind b) t) (CHead e (Bind b0) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) b c t (clear_bind b c t) H1)) | (Flat f) \Rightarrow (\lambda (H1: (drop (r (Flat f) i) O c c2)).(let H2 \def (H c2 i H1) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear c (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) (ex2_3 B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Flat f) t) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2))))) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H3: (clear c (CHead x1 (Bind x0) x2))).(\lambda (H4: (drop i O x1 c2)).(ex2_3_intro B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear (CHead c (Flat f) t) (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop i O e c2)))) x0 x1 x2 (clear_flat c (CHead x1 (Bind x0) x2) H3 f t) H4)))))) H2)))]) (drop_gen_drop k c c2 t i H0))))))))) c1). theorem drop_clear_O: \forall (b: B).(\forall (c: C).(\forall (e1: C).(\forall (u: T).((clear c (CHead e1 (Bind b) u)) \to (\forall (e2: C).(\forall (i: nat).((drop i O e1 e2) \to (drop (S i) O c e2)))))))) \def - \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e1: C).(\forall (u: T).((clear c0 (CHead e1 (Bind b) u)) \to (\forall (e2: C).(\forall (i: nat).((drop i O e1 e2) \to (drop (S i) O c0 e2)))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (u: T).(\lambda (H: (clear (CSort n) (CHead e1 (Bind b) u))).(\lambda (e2: C).(\lambda (i: nat).(\lambda (_: (drop i O e1 e2)).(clear_gen_sort (CHead e1 (Bind b) u) n H (drop (S i) O (CSort n) e2))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e1: C).(\forall (u: T).((clear c0 (CHead e1 (Bind b) u)) \to (\forall (e2: C).(\forall (i: nat).((drop i O e1 e2) \to (drop (S i) O c0 e2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (u: T).(\lambda (H0: (clear (CHead c0 k t) (CHead e1 (Bind b) u))).(\lambda (e2: C).(\lambda (i: nat).(\lambda (H1: (drop i O e1 e2)).((match k return (\lambda (_: ?).(\lambda (k0: K).((clear (CHead c0 k0 t) (CHead e1 (Bind b) u)) \to (drop (S i) O (CHead c0 k0 t) e2)))) with [(Bind b0) \Rightarrow (\lambda (H2: (clear (CHead c0 (Bind b0) t) (CHead e1 (Bind b) u))).(let H3 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow e1 | (CHead c _ _) \Rightarrow c])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in ((let H4 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in ((let H5 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in (\lambda (H6: (eq B b b0)).(\lambda (H7: (eq C e1 c0)).(let H8 \def (eq_ind C e1 (\lambda (c: C).(drop i O c e2)) H1 c0 H7) in (eq_ind B b (\lambda (b1: B).(drop (S i) O (CHead c0 (Bind b1) t) e2)) (drop_drop (Bind b) i c0 e2 H8 t) b0 H6))))) H4)) H3))) | (Flat f) \Rightarrow (\lambda (H2: (clear (CHead c0 (Flat f) t) (CHead e1 (Bind b) u))).(drop_drop (Flat f) i c0 e2 (H e1 u (clear_gen_flat f c0 (CHead e1 (Bind b) u) t H2) e2 i H1) t))]) H0))))))))))) c)). + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e1: C).(\forall (u: T).((clear c0 (CHead e1 (Bind b) u)) \to (\forall (e2: C).(\forall (i: nat).((drop i O e1 e2) \to (drop (S i) O c0 e2)))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (u: T).(\lambda (H: (clear (CSort n) (CHead e1 (Bind b) u))).(\lambda (e2: C).(\lambda (i: nat).(\lambda (_: (drop i O e1 e2)).(clear_gen_sort (CHead e1 (Bind b) u) n H (drop (S i) O (CSort n) e2))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e1: C).(\forall (u: T).((clear c0 (CHead e1 (Bind b) u)) \to (\forall (e2: C).(\forall (i: nat).((drop i O e1 e2) \to (drop (S i) O c0 e2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (u: T).(\lambda (H0: (clear (CHead c0 k t) (CHead e1 (Bind b) u))).(\lambda (e2: C).(\lambda (i: nat).(\lambda (H1: (drop i O e1 e2)).((match k return (\lambda (k0: K).((clear (CHead c0 k0 t) (CHead e1 (Bind b) u)) \to (drop (S i) O (CHead c0 k0 t) e2))) with [(Bind b0) \Rightarrow (\lambda (H2: (clear (CHead c0 (Bind b0) t) (CHead e1 (Bind b) u))).(let H3 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow e1 | (CHead c _ _) \Rightarrow c])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in ((let H4 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in ((let H5 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead e1 (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) u) t H2)) in (\lambda (H6: (eq B b b0)).(\lambda (H7: (eq C e1 c0)).(let H8 \def (eq_ind C e1 (\lambda (c: C).(drop i O c e2)) H1 c0 H7) in (eq_ind B b (\lambda (b1: B).(drop (S i) O (CHead c0 (Bind b1) t) e2)) (drop_drop (Bind b) i c0 e2 H8 t) b0 H6))))) H4)) H3))) | (Flat f) \Rightarrow (\lambda (H2: (clear (CHead c0 (Flat f) t) (CHead e1 (Bind b) u))).(drop_drop (Flat f) i c0 e2 (H e1 u (clear_gen_flat f c0 (CHead e1 (Bind b) u) t H2) e2 i H1) t))]) H0))))))))))) c)). theorem drop_clear_S: \forall (x2: C).(\forall (x1: C).(\forall (h: nat).(\forall (d: nat).((drop h (S d) x1 x2) \to (\forall (b: B).(\forall (c2: C).(\forall (u: T).((clear x2 (CHead c2 (Bind b) u)) \to (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))))))))))) \def - \lambda (x2: C).(C_ind (\lambda (c: C).(\forall (x1: C).(\forall (h: nat).(\forall (d: nat).((drop h (S d) x1 c) \to (\forall (b: B).(\forall (c2: C).(\forall (u: T).((clear c (CHead c2 (Bind b) u)) \to (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))))))))))) (\lambda (n: nat).(\lambda (x1: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (_: (drop h (S d) x1 (CSort n))).(\lambda (b: B).(\lambda (c2: C).(\lambda (u: T).(\lambda (H0: (clear (CSort n) (CHead c2 (Bind b) u))).(clear_gen_sort (CHead c2 (Bind b) u) n H0 (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))))))))))))) (\lambda (c: C).(\lambda (H: ((\forall (x1: C).(\forall (h: nat).(\forall (d: nat).((drop h (S d) x1 c) \to (\forall (b: B).(\forall (c2: C).(\forall (u: T).((clear c (CHead c2 (Bind b) u)) \to (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (x1: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h (S d) x1 (CHead c k t))).(\lambda (b: B).(\lambda (c2: C).(\lambda (u: T).(\lambda (H1: (clear (CHead c k t) (CHead c2 (Bind b) u))).(ex2_ind C (\lambda (e: C).(eq C x1 (CHead e k (lift h (r k d) t)))) (\lambda (e: C).(drop h (r k d) e c)) (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))) (\lambda (x: C).(\lambda (H2: (eq C x1 (CHead x k (lift h (r k d) t)))).(\lambda (H3: (drop h (r k d) x c)).(eq_ind_r C (CHead x k (lift h (r k d) t)) (\lambda (c0: C).(ex2 C (\lambda (c1: C).(clear c0 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))) ((match k return (\lambda (_: ?).(\lambda (k0: K).((clear (CHead c k0 t) (CHead c2 (Bind b) u)) \to ((drop h (r k0 d) x c) \to (ex2 C (\lambda (c1: C).(clear (CHead x k0 (lift h (r k0 d) t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))))))) with [(Bind b0) \Rightarrow (\lambda (H4: (clear (CHead c (Bind b0) t) (CHead c2 (Bind b) u))).(\lambda (H5: (drop h (r (Bind b0) d) x c)).(let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in ((let H7 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in ((let H8 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in (\lambda (H9: (eq B b b0)).(\lambda (H10: (eq C c2 c)).(eq_ind_r T t (\lambda (t0: T).(ex2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b) (lift h d t0)))) (\lambda (c1: C).(drop h d c1 c2)))) (eq_ind_r C c (\lambda (c0: C).(ex2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c0)))) (eq_ind_r B b0 (\lambda (b1: B).(ex2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b1) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c)))) (ex_intro2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b0) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c)) x (clear_bind b0 x (lift h d t)) H5) b H9) c2 H10) u H8)))) H7)) H6)))) | (Flat f) \Rightarrow (\lambda (H4: (clear (CHead c (Flat f) t) (CHead c2 (Bind b) u))).(\lambda (H5: (drop h (r (Flat f) d) x c)).(let H6 \def (H x h d H5 b c2 u (clear_gen_flat f c (CHead c2 (Bind b) u) t H4)) in (ex2_ind C (\lambda (c1: C).(clear x (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)) (ex2 C (\lambda (c1: C).(clear (CHead x (Flat f) (lift h (r (Flat f) d) t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))) (\lambda (x0: C).(\lambda (H7: (clear x (CHead x0 (Bind b) (lift h d u)))).(\lambda (H8: (drop h d x0 c2)).(ex_intro2 C (\lambda (c1: C).(clear (CHead x (Flat f) (lift h (r (Flat f) d) t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)) x0 (clear_flat x (CHead x0 (Bind b) (lift h d u)) H7 f (lift h (r (Flat f) d) t)) H8)))) H6))))]) H1 H3) x1 H2)))) (drop_gen_skip_r c x1 t h d k H0)))))))))))))) x2). + \lambda (x2: C).(C_ind (\lambda (c: C).(\forall (x1: C).(\forall (h: nat).(\forall (d: nat).((drop h (S d) x1 c) \to (\forall (b: B).(\forall (c2: C).(\forall (u: T).((clear c (CHead c2 (Bind b) u)) \to (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))))))))))) (\lambda (n: nat).(\lambda (x1: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (_: (drop h (S d) x1 (CSort n))).(\lambda (b: B).(\lambda (c2: C).(\lambda (u: T).(\lambda (H0: (clear (CSort n) (CHead c2 (Bind b) u))).(clear_gen_sort (CHead c2 (Bind b) u) n H0 (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))))))))))))) (\lambda (c: C).(\lambda (H: ((\forall (x1: C).(\forall (h: nat).(\forall (d: nat).((drop h (S d) x1 c) \to (\forall (b: B).(\forall (c2: C).(\forall (u: T).((clear c (CHead c2 (Bind b) u)) \to (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (x1: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h (S d) x1 (CHead c k t))).(\lambda (b: B).(\lambda (c2: C).(\lambda (u: T).(\lambda (H1: (clear (CHead c k t) (CHead c2 (Bind b) u))).(ex2_ind C (\lambda (e: C).(eq C x1 (CHead e k (lift h (r k d) t)))) (\lambda (e: C).(drop h (r k d) e c)) (ex2 C (\lambda (c1: C).(clear x1 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))) (\lambda (x: C).(\lambda (H2: (eq C x1 (CHead x k (lift h (r k d) t)))).(\lambda (H3: (drop h (r k d) x c)).(eq_ind_r C (CHead x k (lift h (r k d) t)) (\lambda (c0: C).(ex2 C (\lambda (c1: C).(clear c0 (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))) ((match k return (\lambda (k0: K).((clear (CHead c k0 t) (CHead c2 (Bind b) u)) \to ((drop h (r k0 d) x c) \to (ex2 C (\lambda (c1: C).(clear (CHead x k0 (lift h (r k0 d) t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)))))) with [(Bind b0) \Rightarrow (\lambda (H4: (clear (CHead c (Bind b0) t) (CHead c2 (Bind b) u))).(\lambda (H5: (drop h (r (Bind b0) d) x c)).(let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in ((let H7 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in ((let H8 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u) t H4)) in (\lambda (H9: (eq B b b0)).(\lambda (H10: (eq C c2 c)).(eq_ind_r T t (\lambda (t0: T).(ex2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b) (lift h d t0)))) (\lambda (c1: C).(drop h d c1 c2)))) (eq_ind_r C c (\lambda (c0: C).(ex2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c0)))) (eq_ind_r B b0 (\lambda (b1: B).(ex2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b1) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c)))) (ex_intro2 C (\lambda (c1: C).(clear (CHead x (Bind b0) (lift h (r (Bind b0) d) t)) (CHead c1 (Bind b0) (lift h d t)))) (\lambda (c1: C).(drop h d c1 c)) x (clear_bind b0 x (lift h d t)) H5) b H9) c2 H10) u H8)))) H7)) H6)))) | (Flat f) \Rightarrow (\lambda (H4: (clear (CHead c (Flat f) t) (CHead c2 (Bind b) u))).(\lambda (H5: (drop h (r (Flat f) d) x c)).(let H6 \def (H x h d H5 b c2 u (clear_gen_flat f c (CHead c2 (Bind b) u) t H4)) in (ex2_ind C (\lambda (c1: C).(clear x (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)) (ex2 C (\lambda (c1: C).(clear (CHead x (Flat f) (lift h (r (Flat f) d) t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2))) (\lambda (x0: C).(\lambda (H7: (clear x (CHead x0 (Bind b) (lift h d u)))).(\lambda (H8: (drop h d x0 c2)).(ex_intro2 C (\lambda (c1: C).(clear (CHead x (Flat f) (lift h (r (Flat f) d) t)) (CHead c1 (Bind b) (lift h d u)))) (\lambda (c1: C).(drop h d c1 c2)) x0 (clear_flat x (CHead x0 (Bind b) (lift h d u)) H7 f (lift h (r (Flat f) d) t)) H8)))) H6))))]) H1 H3) x1 H2)))) (drop_gen_skip_r c x1 t h d k H0)))))))))))))) x2). theorem clear_clear: \forall (c1: C).(\forall (c2: C).((clear c1 c2) \to (clear c2 c2))) \def - \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).((clear c c2) \to (clear c2 c2)))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (H: (clear (CSort n) c2)).(clear_gen_sort c2 n H (clear c2 c2))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).((clear c c2) \to (clear c2 c2))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (H0: (clear (CHead c k t) c2)).((match k return (\lambda (_: ?).(\lambda (k0: K).((clear (CHead c k0 t) c2) \to (clear c2 c2)))) with [(Bind b) \Rightarrow (\lambda (H1: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: C).(clear c0 c0)) (clear_bind b c t) c2 (clear_gen_bind b c c2 t H1))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead c (Flat f) t) c2)).(H c2 (clear_gen_flat f c c2 t H1)))]) H0))))))) c1). + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).((clear c c2) \to (clear c2 c2)))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (H: (clear (CSort n) c2)).(clear_gen_sort c2 n H (clear c2 c2))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).((clear c c2) \to (clear c2 c2))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (H0: (clear (CHead c k t) c2)).((match k return (\lambda (k0: K).((clear (CHead c k0 t) c2) \to (clear c2 c2))) with [(Bind b) \Rightarrow (\lambda (H1: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: C).(clear c0 c0)) (clear_bind b c t) c2 (clear_gen_bind b c c2 t H1))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead c (Flat f) t) c2)).(H c2 (clear_gen_flat f c c2 t H1)))]) H0))))))) c1). theorem clear_mono: \forall (c: C).(\forall (c1: C).((clear c c1) \to (\forall (c2: C).((clear c c2) \to (eq C c1 c2))))) \def - \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (c1: C).((clear c0 c1) \to (\forall (c2: C).((clear c0 c2) \to (eq C c1 c2)))))) (\lambda (n: nat).(\lambda (c1: C).(\lambda (_: (clear (CSort n) c1)).(\lambda (c2: C).(\lambda (H0: (clear (CSort n) c2)).(clear_gen_sort c2 n H0 (eq C c1 c2))))))) (\lambda (c0: C).(\lambda (H: ((\forall (c1: C).((clear c0 c1) \to (\forall (c2: C).((clear c0 c2) \to (eq C c1 c2))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c1: C).(\lambda (H0: (clear (CHead c0 k t) c1)).(\lambda (c2: C).(\lambda (H1: (clear (CHead c0 k t) c2)).((match k return (\lambda (_: ?).(\lambda (k0: K).((clear (CHead c0 k0 t) c1) \to ((clear (CHead c0 k0 t) c2) \to (eq C c1 c2))))) with [(Bind b) \Rightarrow (\lambda (H2: (clear (CHead c0 (Bind b) t) c1)).(\lambda (H3: (clear (CHead c0 (Bind b) t) c2)).(eq_ind_r C (CHead c0 (Bind b) t) (\lambda (c3: C).(eq C c1 c3)) (eq_ind_r C (CHead c0 (Bind b) t) (\lambda (c3: C).(eq C c3 (CHead c0 (Bind b) t))) (refl_equal C (CHead c0 (Bind b) t)) c1 (clear_gen_bind b c0 c1 t H2)) c2 (clear_gen_bind b c0 c2 t H3)))) | (Flat f) \Rightarrow (\lambda (H2: (clear (CHead c0 (Flat f) t) c1)).(\lambda (H3: (clear (CHead c0 (Flat f) t) c2)).(H c1 (clear_gen_flat f c0 c1 t H2) c2 (clear_gen_flat f c0 c2 t H3))))]) H0 H1))))))))) c). + \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (c1: C).((clear c0 c1) \to (\forall (c2: C).((clear c0 c2) \to (eq C c1 c2)))))) (\lambda (n: nat).(\lambda (c1: C).(\lambda (_: (clear (CSort n) c1)).(\lambda (c2: C).(\lambda (H0: (clear (CSort n) c2)).(clear_gen_sort c2 n H0 (eq C c1 c2))))))) (\lambda (c0: C).(\lambda (H: ((\forall (c1: C).((clear c0 c1) \to (\forall (c2: C).((clear c0 c2) \to (eq C c1 c2))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c1: C).(\lambda (H0: (clear (CHead c0 k t) c1)).(\lambda (c2: C).(\lambda (H1: (clear (CHead c0 k t) c2)).((match k return (\lambda (k0: K).((clear (CHead c0 k0 t) c1) \to ((clear (CHead c0 k0 t) c2) \to (eq C c1 c2)))) with [(Bind b) \Rightarrow (\lambda (H2: (clear (CHead c0 (Bind b) t) c1)).(\lambda (H3: (clear (CHead c0 (Bind b) t) c2)).(eq_ind_r C (CHead c0 (Bind b) t) (\lambda (c3: C).(eq C c1 c3)) (eq_ind_r C (CHead c0 (Bind b) t) (\lambda (c3: C).(eq C c3 (CHead c0 (Bind b) t))) (refl_equal C (CHead c0 (Bind b) t)) c1 (clear_gen_bind b c0 c1 t H2)) c2 (clear_gen_bind b c0 c2 t H3)))) | (Flat f) \Rightarrow (\lambda (H2: (clear (CHead c0 (Flat f) t) c1)).(\lambda (H3: (clear (CHead c0 (Flat f) t) c2)).(H c1 (clear_gen_flat f c0 c1 t H2) c2 (clear_gen_flat f c0 c2 t H3))))]) H0 H1))))))))) c). theorem clear_trans: \forall (c1: C).(\forall (c: C).((clear c1 c) \to (\forall (c2: C).((clear c c2) \to (clear c1 c2))))) \def - \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c0: C).((clear c c0) \to (\forall (c2: C).((clear c0 c2) \to (clear c c2)))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (H: (clear (CSort n) c)).(\lambda (c2: C).(\lambda (_: (clear c c2)).(clear_gen_sort c n H (clear (CSort n) c2))))))) (\lambda (c: C).(\lambda (H: ((\forall (c0: C).((clear c c0) \to (\forall (c2: C).((clear c0 c2) \to (clear c c2))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c0: C).(\lambda (H0: (clear (CHead c k t) c0)).(\lambda (c2: C).(\lambda (H1: (clear c0 c2)).((match k return (\lambda (_: ?).(\lambda (k0: K).((clear (CHead c k0 t) c0) \to (clear (CHead c k0 t) c2)))) with [(Bind b) \Rightarrow (\lambda (H2: (clear (CHead c (Bind b) t) c0)).(let H3 \def (eq_ind C c0 (\lambda (c: C).(clear c c2)) H1 (CHead c (Bind b) t) (clear_gen_bind b c c0 t H2)) in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(clear (CHead c (Bind b) t) c3)) (clear_bind b c t) c2 (clear_gen_bind b c c2 t H3)))) | (Flat f) \Rightarrow (\lambda (H2: (clear (CHead c (Flat f) t) c0)).(clear_flat c c2 (H c0 (clear_gen_flat f c c0 t H2) c2 H1) f t))]) H0))))))))) c1). + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c0: C).((clear c c0) \to (\forall (c2: C).((clear c0 c2) \to (clear c c2)))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (H: (clear (CSort n) c)).(\lambda (c2: C).(\lambda (_: (clear c c2)).(clear_gen_sort c n H (clear (CSort n) c2))))))) (\lambda (c: C).(\lambda (H: ((\forall (c0: C).((clear c c0) \to (\forall (c2: C).((clear c0 c2) \to (clear c c2))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c0: C).(\lambda (H0: (clear (CHead c k t) c0)).(\lambda (c2: C).(\lambda (H1: (clear c0 c2)).((match k return (\lambda (k0: K).((clear (CHead c k0 t) c0) \to (clear (CHead c k0 t) c2))) with [(Bind b) \Rightarrow (\lambda (H2: (clear (CHead c (Bind b) t) c0)).(let H3 \def (eq_ind C c0 (\lambda (c: C).(clear c c2)) H1 (CHead c (Bind b) t) (clear_gen_bind b c c0 t H2)) in (eq_ind_r C (CHead c (Bind b) t) (\lambda (c3: C).(clear (CHead c (Bind b) t) c3)) (clear_bind b c t) c2 (clear_gen_bind b c c2 t H3)))) | (Flat f) \Rightarrow (\lambda (H2: (clear (CHead c (Flat f) t) c0)).(clear_flat c c2 (H c0 (clear_gen_flat f c c0 t H2) c2 H1) f t))]) H0))))))))) c1). theorem clear_ctail: \forall (b: B).(\forall (c1: C).(\forall (c2: C).(\forall (u2: T).((clear c1 (CHead c2 (Bind b) u2)) \to (\forall (k: K).(\forall (u1: T).(clear (CTail k u1 c1) (CHead (CTail k u1 c2) (Bind b) u2)))))))) \def - \lambda (b: B).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (u2: T).((clear c (CHead c2 (Bind b) u2)) \to (\forall (k: K).(\forall (u1: T).(clear (CTail k u1 c) (CHead (CTail k u1 c2) (Bind b) u2)))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (u2: T).(\lambda (H: (clear (CSort n) (CHead c2 (Bind b) u2))).(\lambda (k: K).(\lambda (u1: T).(match k return (\lambda (_: ?).(\lambda (k0: K).(clear (CHead (CSort n) k0 u1) (CHead (CTail k0 u1 c2) (Bind b) u2)))) with [(Bind b0) \Rightarrow (clear_gen_sort (CHead c2 (Bind b) u2) n H (clear (CHead (CSort n) (Bind b0) u1) (CHead (CTail (Bind b0) u1 c2) (Bind b) u2))) | (Flat f) \Rightarrow (clear_gen_sort (CHead c2 (Bind b) u2) n H (clear (CHead (CSort n) (Flat f) u1) (CHead (CTail (Flat f) u1 c2) (Bind b) u2)))]))))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (u2: T).((clear c (CHead c2 (Bind b) u2)) \to (\forall (k: K).(\forall (u1: T).(clear (CTail k u1 c) (CHead (CTail k u1 c2) (Bind b) u2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (u2: T).(\lambda (H0: (clear (CHead c k t) (CHead c2 (Bind b) u2))).(\lambda (k0: K).(\lambda (u1: T).((match k return (\lambda (_: ?).(\lambda (k1: K).((clear (CHead c k1 t) (CHead c2 (Bind b) u2)) \to (clear (CHead (CTail k0 u1 c) k1 t) (CHead (CTail k0 u1 c2) (Bind b) u2))))) with [(Bind b0) \Rightarrow (\lambda (H1: (clear (CHead c (Bind b0) t) (CHead c2 (Bind b) u2))).(let H2 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind b) u2) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in ((let H3 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in ((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C c2 c)).(eq_ind_r T t (\lambda (t0: T).(clear (CHead (CTail k0 u1 c) (Bind b0) t) (CHead (CTail k0 u1 c2) (Bind b) t0))) (eq_ind_r C c (\lambda (c0: C).(clear (CHead (CTail k0 u1 c) (Bind b0) t) (CHead (CTail k0 u1 c0) (Bind b) t))) (eq_ind B b (\lambda (b1: B).(clear (CHead (CTail k0 u1 c) (Bind b1) t) (CHead (CTail k0 u1 c) (Bind b) t))) (clear_bind b (CTail k0 u1 c) t) b0 H5) c2 H6) u2 H4)))) H3)) H2))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead c (Flat f) t) (CHead c2 (Bind b) u2))).(clear_flat (CTail k0 u1 c) (CHead (CTail k0 u1 c2) (Bind b) u2) (H c2 u2 (clear_gen_flat f c (CHead c2 (Bind b) u2) t H1) k0 u1) f t))]) H0)))))))))) c1)). + \lambda (b: B).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (u2: T).((clear c (CHead c2 (Bind b) u2)) \to (\forall (k: K).(\forall (u1: T).(clear (CTail k u1 c) (CHead (CTail k u1 c2) (Bind b) u2)))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (u2: T).(\lambda (H: (clear (CSort n) (CHead c2 (Bind b) u2))).(\lambda (k: K).(\lambda (u1: T).(match k return (\lambda (k0: K).(clear (CHead (CSort n) k0 u1) (CHead (CTail k0 u1 c2) (Bind b) u2))) with [(Bind b0) \Rightarrow (clear_gen_sort (CHead c2 (Bind b) u2) n H (clear (CHead (CSort n) (Bind b0) u1) (CHead (CTail (Bind b0) u1 c2) (Bind b) u2))) | (Flat f) \Rightarrow (clear_gen_sort (CHead c2 (Bind b) u2) n H (clear (CHead (CSort n) (Flat f) u1) (CHead (CTail (Flat f) u1 c2) (Bind b) u2)))]))))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).(\forall (u2: T).((clear c (CHead c2 (Bind b) u2)) \to (\forall (k: K).(\forall (u1: T).(clear (CTail k u1 c) (CHead (CTail k u1 c2) (Bind b) u2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (u2: T).(\lambda (H0: (clear (CHead c k t) (CHead c2 (Bind b) u2))).(\lambda (k0: K).(\lambda (u1: T).((match k return (\lambda (k1: K).((clear (CHead c k1 t) (CHead c2 (Bind b) u2)) \to (clear (CHead (CTail k0 u1 c) k1 t) (CHead (CTail k0 u1 c2) (Bind b) u2)))) with [(Bind b0) \Rightarrow (\lambda (H1: (clear (CHead c (Bind b0) t) (CHead c2 (Bind b) u2))).(let H2 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind b) u2) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in ((let H3 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in ((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead c (Bind b0) t) (clear_gen_bind b0 c (CHead c2 (Bind b) u2) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C c2 c)).(eq_ind_r T t (\lambda (t0: T).(clear (CHead (CTail k0 u1 c) (Bind b0) t) (CHead (CTail k0 u1 c2) (Bind b) t0))) (eq_ind_r C c (\lambda (c0: C).(clear (CHead (CTail k0 u1 c) (Bind b0) t) (CHead (CTail k0 u1 c0) (Bind b) t))) (eq_ind B b (\lambda (b1: B).(clear (CHead (CTail k0 u1 c) (Bind b1) t) (CHead (CTail k0 u1 c) (Bind b) t))) (clear_bind b (CTail k0 u1 c) t) b0 H5) c2 H6) u2 H4)))) H3)) H2))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead c (Flat f) t) (CHead c2 (Bind b) u2))).(clear_flat (CTail k0 u1 c) (CHead (CTail k0 u1 c2) (Bind b) u2) (H c2 u2 (clear_gen_flat f c (CHead c2 (Bind b) u2) t H1) k0 u1) f t))]) H0)))))))))) c1)). theorem getl_gen_all: \forall (c1: C).(\forall (c2: C).(\forall (i: nat).((getl i c1 c2) \to (ex2 C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e c2)))))) \def - \lambda (c1: C).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H: (getl i c1 c2)).(let H0 \def (match H return (\lambda (_: ?).(ex2 C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e c2)))) with [(getl_intro e H0 H1) \Rightarrow (ex_intro2 C (\lambda (e0: C).(drop i O c1 e0)) (\lambda (e0: C).(clear e0 c2)) e H0 H1)]) in H0)))). + \lambda (c1: C).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H: (getl i c1 c2)).(let H0 \def (match H return (\lambda (_: (getl ? ? ?)).(ex2 C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e c2)))) with [(getl_intro e H0 H1) \Rightarrow (ex_intro2 C (\lambda (e0: C).(drop i O c1 e0)) (\lambda (e0: C).(clear e0 c2)) e H0 H1)]) in H0)))). theorem getl_gen_sort: \forall (n: nat).(\forall (h: nat).(\forall (x: C).((getl h (CSort n) x) \to (\forall (P: Prop).P)))) @@ -846,7 +846,7 @@ theorem getl_refl: theorem clear_getl_trans: \forall (i: nat).(\forall (c2: C).(\forall (c3: C).((getl i c2 c3) \to (\forall (c1: C).((clear c1 c2) \to (getl i c1 c3)))))) \def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c2: C).(\forall (c3: C).((getl n c2 c3) \to (\forall (c1: C).((clear c1 c2) \to (getl n c1 c3))))))) (\lambda (c2: C).(\lambda (c3: C).(\lambda (H: (getl O c2 c3)).(\lambda (c1: C).(\lambda (H0: (clear c1 c2)).(getl_intro O c1 c3 c1 (drop_refl c1) (clear_trans c1 c2 H0 c3 (getl_gen_O c2 c3 H)))))))) (\lambda (n: nat).(\lambda (_: ((\forall (c2: C).(\forall (c3: C).((getl n c2 c3) \to (\forall (c1: C).((clear c1 c2) \to (getl n c1 c3)))))))).(\lambda (c2: C).(C_ind (\lambda (c: C).(\forall (c3: C).((getl (S n) c c3) \to (\forall (c1: C).((clear c1 c) \to (getl (S n) c1 c3)))))) (\lambda (n0: nat).(\lambda (c3: C).(\lambda (H0: (getl (S n) (CSort n0) c3)).(\lambda (c1: C).(\lambda (_: (clear c1 (CSort n0))).(getl_gen_sort n0 (S n) c3 H0 (getl (S n) c1 c3))))))) (\lambda (c: C).(\lambda (_: ((\forall (c3: C).((getl (S n) c c3) \to (\forall (c1: C).((clear c1 c) \to (getl (S n) c1 c3))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: C).(\lambda (H1: (getl (S n) (CHead c k t) c3)).(\lambda (c1: C).(\lambda (H2: (clear c1 (CHead c k t))).((match k return (\lambda (_: ?).(\lambda (k0: K).((getl (S n) (CHead c k0 t) c3) \to ((clear c1 (CHead c k0 t)) \to (getl (S n) c1 c3))))) with [(Bind b) \Rightarrow (\lambda (H3: (getl (S n) (CHead c (Bind b) t) c3)).(\lambda (H4: (clear c1 (CHead c (Bind b) t))).(let H5 \def (getl_gen_all c c3 (r (Bind b) n) (getl_gen_S (Bind b) c c3 t n H3)) in (ex2_ind C (\lambda (e: C).(drop n O c e)) (\lambda (e: C).(clear e c3)) (getl (S n) c1 c3) (\lambda (x: C).(\lambda (H6: (drop n O c x)).(\lambda (H7: (clear x c3)).(getl_intro (S n) c1 c3 x (drop_clear_O b c1 c t H4 x n H6) H7)))) H5)))) | (Flat f) \Rightarrow (\lambda (_: (getl (S n) (CHead c (Flat f) t) c3)).(\lambda (H4: (clear c1 (CHead c (Flat f) t))).(clear_gen_flat_r f c1 c t H4 (getl (S n) c1 c3))))]) H1 H2))))))))) c2)))) i). + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c2: C).(\forall (c3: C).((getl n c2 c3) \to (\forall (c1: C).((clear c1 c2) \to (getl n c1 c3))))))) (\lambda (c2: C).(\lambda (c3: C).(\lambda (H: (getl O c2 c3)).(\lambda (c1: C).(\lambda (H0: (clear c1 c2)).(getl_intro O c1 c3 c1 (drop_refl c1) (clear_trans c1 c2 H0 c3 (getl_gen_O c2 c3 H)))))))) (\lambda (n: nat).(\lambda (_: ((\forall (c2: C).(\forall (c3: C).((getl n c2 c3) \to (\forall (c1: C).((clear c1 c2) \to (getl n c1 c3)))))))).(\lambda (c2: C).(C_ind (\lambda (c: C).(\forall (c3: C).((getl (S n) c c3) \to (\forall (c1: C).((clear c1 c) \to (getl (S n) c1 c3)))))) (\lambda (n0: nat).(\lambda (c3: C).(\lambda (H0: (getl (S n) (CSort n0) c3)).(\lambda (c1: C).(\lambda (_: (clear c1 (CSort n0))).(getl_gen_sort n0 (S n) c3 H0 (getl (S n) c1 c3))))))) (\lambda (c: C).(\lambda (_: ((\forall (c3: C).((getl (S n) c c3) \to (\forall (c1: C).((clear c1 c) \to (getl (S n) c1 c3))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: C).(\lambda (H1: (getl (S n) (CHead c k t) c3)).(\lambda (c1: C).(\lambda (H2: (clear c1 (CHead c k t))).((match k return (\lambda (k0: K).((getl (S n) (CHead c k0 t) c3) \to ((clear c1 (CHead c k0 t)) \to (getl (S n) c1 c3)))) with [(Bind b) \Rightarrow (\lambda (H3: (getl (S n) (CHead c (Bind b) t) c3)).(\lambda (H4: (clear c1 (CHead c (Bind b) t))).(let H5 \def (getl_gen_all c c3 (r (Bind b) n) (getl_gen_S (Bind b) c c3 t n H3)) in (ex2_ind C (\lambda (e: C).(drop n O c e)) (\lambda (e: C).(clear e c3)) (getl (S n) c1 c3) (\lambda (x: C).(\lambda (H6: (drop n O c x)).(\lambda (H7: (clear x c3)).(getl_intro (S n) c1 c3 x (drop_clear_O b c1 c t H4 x n H6) H7)))) H5)))) | (Flat f) \Rightarrow (\lambda (_: (getl (S n) (CHead c (Flat f) t) c3)).(\lambda (H4: (clear c1 (CHead c (Flat f) t))).(clear_gen_flat_r f c1 c t H4 (getl (S n) c1 c3))))]) H1 H2))))))))) c2)))) i). theorem getl_clear_trans: \forall (i: nat).(\forall (c1: C).(\forall (c2: C).((getl i c1 c2) \to (\forall (c3: C).((clear c2 c3) \to (getl i c1 c3)))))) @@ -861,17 +861,17 @@ theorem getl_head: theorem getl_flat: \forall (c: C).(\forall (e: C).(\forall (h: nat).((getl h c e) \to (\forall (f: F).(\forall (u: T).(getl h (CHead c (Flat f) u) e)))))) \def - \lambda (c: C).(\lambda (e: C).(\lambda (h: nat).(\lambda (H: (getl h c e)).(\lambda (f: F).(\lambda (u: T).(let H0 \def (getl_gen_all c e h H) in (ex2_ind C (\lambda (e0: C).(drop h O c e0)) (\lambda (e0: C).(clear e0 e)) (getl h (CHead c (Flat f) u) e) (\lambda (x: C).(\lambda (H1: (drop h O c x)).(\lambda (H2: (clear x e)).((match h return (\lambda (_: ?).(\lambda (n: nat).((drop n O c x) \to (getl n (CHead c (Flat f) u) e)))) with [O \Rightarrow (\lambda (H3: (drop O O c x)).(let H4 \def (eq_ind_r C x (\lambda (c: C).(clear c e)) H2 c (drop_gen_refl c x H3)) in (getl_intro O (CHead c (Flat f) u) e (CHead c (Flat f) u) (drop_refl (CHead c (Flat f) u)) (clear_flat c e H4 f u)))) | (S n) \Rightarrow (\lambda (H3: (drop (S n) O c x)).(getl_intro (S n) (CHead c (Flat f) u) e x (drop_drop (Flat f) n c x H3 u) H2))]) H1)))) H0))))))). + \lambda (c: C).(\lambda (e: C).(\lambda (h: nat).(\lambda (H: (getl h c e)).(\lambda (f: F).(\lambda (u: T).(let H0 \def (getl_gen_all c e h H) in (ex2_ind C (\lambda (e0: C).(drop h O c e0)) (\lambda (e0: C).(clear e0 e)) (getl h (CHead c (Flat f) u) e) (\lambda (x: C).(\lambda (H1: (drop h O c x)).(\lambda (H2: (clear x e)).((match h return (\lambda (n: nat).((drop n O c x) \to (getl n (CHead c (Flat f) u) e))) with [O \Rightarrow (\lambda (H3: (drop O O c x)).(let H4 \def (eq_ind_r C x (\lambda (c: C).(clear c e)) H2 c (drop_gen_refl c x H3)) in (getl_intro O (CHead c (Flat f) u) e (CHead c (Flat f) u) (drop_refl (CHead c (Flat f) u)) (clear_flat c e H4 f u)))) | (S n) \Rightarrow (\lambda (H3: (drop (S n) O c x)).(getl_intro (S n) (CHead c (Flat f) u) e x (drop_drop (Flat f) n c x H3 u) H2))]) H1)))) H0))))))). theorem getl_drop: \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (h: nat).((getl h c (CHead e (Bind b) u)) \to (drop (S h) O c e)))))) \def - \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: C).(\forall (u: T).(\forall (h: nat).((getl h c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 e)))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (H: (getl h (CSort n) (CHead e (Bind b) u))).(getl_gen_sort n h (CHead e (Bind b) u) H (drop (S h) O (CSort n) e))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: T).(\forall (h: nat).((getl h c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 e))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((getl n (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e))) (\lambda (H0: (getl O (CHead c0 k t) (CHead e (Bind b) u))).(K_ind (\lambda (k0: K).((clear (CHead c0 k0 t) (CHead e (Bind b) u)) \to (drop (S O) O (CHead c0 k0 t) e))) (\lambda (b0: B).(\lambda (H1: (clear (CHead c0 (Bind b0) t) (CHead e (Bind b) u))).(let H2 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow c])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H3 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H4 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C e c0)).(eq_ind_r C c0 (\lambda (c1: C).(drop (S O) O (CHead c0 (Bind b0) t) c1)) (eq_ind B b (\lambda (b1: B).(drop (S O) O (CHead c0 (Bind b1) t) c0)) (drop_drop (Bind b) O c0 c0 (drop_refl c0) t) b0 H5) e H6)))) H3)) H2)))) (\lambda (f: F).(\lambda (H1: (clear (CHead c0 (Flat f) t) (CHead e (Bind b) u))).(drop_clear_O b (CHead c0 (Flat f) t) e u (clear_flat c0 (CHead e (Bind b) u) (clear_gen_flat f c0 (CHead e (Bind b) u) t H1) f t) e O (drop_refl e)))) k (getl_gen_O (CHead c0 k t) (CHead e (Bind b) u) H0))) (\lambda (n: nat).(\lambda (_: (((getl n (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e)))).(\lambda (H1: (getl (S n) (CHead c0 k t) (CHead e (Bind b) u))).(drop_drop k (S n) c0 e (eq_ind_r nat (S (r k n)) (\lambda (n0: nat).(drop n0 O c0 e)) (H e u (r k n) (getl_gen_S k c0 (CHead e (Bind b) u) t n H1)) (r k (S n)) (r_S k n)) t)))) h)))))))) c)). + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: C).(\forall (u: T).(\forall (h: nat).((getl h c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 e)))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (h: nat).(\lambda (H: (getl h (CSort n) (CHead e (Bind b) u))).(getl_gen_sort n h (CHead e (Bind b) u) H (drop (S h) O (CSort n) e))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: T).(\forall (h: nat).((getl h c0 (CHead e (Bind b) u)) \to (drop (S h) O c0 e))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (h: nat).(nat_ind (\lambda (n: nat).((getl n (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e))) (\lambda (H0: (getl O (CHead c0 k t) (CHead e (Bind b) u))).(K_ind (\lambda (k0: K).((clear (CHead c0 k0 t) (CHead e (Bind b) u)) \to (drop (S O) O (CHead c0 k0 t) e))) (\lambda (b0: B).(\lambda (H1: (clear (CHead c0 (Bind b0) t) (CHead e (Bind b) u))).(let H2 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow c])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H3 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H4 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C e c0)).(eq_ind_r C c0 (\lambda (c1: C).(drop (S O) O (CHead c0 (Bind b0) t) c1)) (eq_ind B b (\lambda (b1: B).(drop (S O) O (CHead c0 (Bind b1) t) c0)) (drop_drop (Bind b) O c0 c0 (drop_refl c0) t) b0 H5) e H6)))) H3)) H2)))) (\lambda (f: F).(\lambda (H1: (clear (CHead c0 (Flat f) t) (CHead e (Bind b) u))).(drop_clear_O b (CHead c0 (Flat f) t) e u (clear_flat c0 (CHead e (Bind b) u) (clear_gen_flat f c0 (CHead e (Bind b) u) t H1) f t) e O (drop_refl e)))) k (getl_gen_O (CHead c0 k t) (CHead e (Bind b) u) H0))) (\lambda (n: nat).(\lambda (_: (((getl n (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e)))).(\lambda (H1: (getl (S n) (CHead c0 k t) (CHead e (Bind b) u))).(drop_drop k (S n) c0 e (eq_ind_r nat (S (r k n)) (\lambda (n0: nat).(drop n0 O c0 e)) (H e u (r k n) (getl_gen_S k c0 (CHead e (Bind b) u) t n H1)) (r k (S n)) (r_S k n)) t)))) h)))))))) c)). theorem getl_clear_bind: \forall (b: B).(\forall (c: C).(\forall (e1: C).(\forall (v: T).((clear c (CHead e1 (Bind b) v)) \to (\forall (e2: C).(\forall (n: nat).((getl n e1 e2) \to (getl (S n) c e2)))))))) \def - \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e1: C).(\forall (v: T).((clear c0 (CHead e1 (Bind b) v)) \to (\forall (e2: C).(\forall (n: nat).((getl n e1 e2) \to (getl (S n) c0 e2)))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (v: T).(\lambda (H: (clear (CSort n) (CHead e1 (Bind b) v))).(\lambda (e2: C).(\lambda (n0: nat).(\lambda (_: (getl n0 e1 e2)).(clear_gen_sort (CHead e1 (Bind b) v) n H (getl (S n0) (CSort n) e2))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e1: C).(\forall (v: T).((clear c0 (CHead e1 (Bind b) v)) \to (\forall (e2: C).(\forall (n: nat).((getl n e1 e2) \to (getl (S n) c0 e2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (v: T).(\lambda (H0: (clear (CHead c0 k t) (CHead e1 (Bind b) v))).(\lambda (e2: C).(\lambda (n: nat).(\lambda (H1: (getl n e1 e2)).((match k return (\lambda (_: ?).(\lambda (k0: K).((clear (CHead c0 k0 t) (CHead e1 (Bind b) v)) \to (getl (S n) (CHead c0 k0 t) e2)))) with [(Bind b0) \Rightarrow (\lambda (H2: (clear (CHead c0 (Bind b0) t) (CHead e1 (Bind b) v))).(let H3 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow e1 | (CHead c _ _) \Rightarrow c])) (CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in ((let H4 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in ((let H5 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in (\lambda (H6: (eq B b b0)).(\lambda (H7: (eq C e1 c0)).(let H8 \def (eq_ind C e1 (\lambda (c: C).(getl n c e2)) H1 c0 H7) in (eq_ind B b (\lambda (b1: B).(getl (S n) (CHead c0 (Bind b1) t) e2)) (getl_head (Bind b) n c0 e2 H8 t) b0 H6))))) H4)) H3))) | (Flat f) \Rightarrow (\lambda (H2: (clear (CHead c0 (Flat f) t) (CHead e1 (Bind b) v))).(getl_flat c0 e2 (S n) (H e1 v (clear_gen_flat f c0 (CHead e1 (Bind b) v) t H2) e2 n H1) f t))]) H0))))))))))) c)). + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e1: C).(\forall (v: T).((clear c0 (CHead e1 (Bind b) v)) \to (\forall (e2: C).(\forall (n: nat).((getl n e1 e2) \to (getl (S n) c0 e2)))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (v: T).(\lambda (H: (clear (CSort n) (CHead e1 (Bind b) v))).(\lambda (e2: C).(\lambda (n0: nat).(\lambda (_: (getl n0 e1 e2)).(clear_gen_sort (CHead e1 (Bind b) v) n H (getl (S n0) (CSort n) e2))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e1: C).(\forall (v: T).((clear c0 (CHead e1 (Bind b) v)) \to (\forall (e2: C).(\forall (n: nat).((getl n e1 e2) \to (getl (S n) c0 e2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e1: C).(\lambda (v: T).(\lambda (H0: (clear (CHead c0 k t) (CHead e1 (Bind b) v))).(\lambda (e2: C).(\lambda (n: nat).(\lambda (H1: (getl n e1 e2)).((match k return (\lambda (k0: K).((clear (CHead c0 k0 t) (CHead e1 (Bind b) v)) \to (getl (S n) (CHead c0 k0 t) e2))) with [(Bind b0) \Rightarrow (\lambda (H2: (clear (CHead c0 (Bind b0) t) (CHead e1 (Bind b) v))).(let H3 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow e1 | (CHead c _ _) \Rightarrow c])) (CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in ((let H4 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in ((let H5 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead e1 (Bind b) v) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e1 (Bind b) v) t H2)) in (\lambda (H6: (eq B b b0)).(\lambda (H7: (eq C e1 c0)).(let H8 \def (eq_ind C e1 (\lambda (c: C).(getl n c e2)) H1 c0 H7) in (eq_ind B b (\lambda (b1: B).(getl (S n) (CHead c0 (Bind b1) t) e2)) (getl_head (Bind b) n c0 e2 H8 t) b0 H6))))) H4)) H3))) | (Flat f) \Rightarrow (\lambda (H2: (clear (CHead c0 (Flat f) t) (CHead e1 (Bind b) v))).(getl_flat c0 e2 (S n) (H e1 v (clear_gen_flat f c0 (CHead e1 (Bind b) v) t H2) e2 n H1) f t))]) H0))))))))))) c)). theorem getl_ctail: \forall (b: B).(\forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d (Bind b) u)) \to (\forall (k: K).(\forall (v: T).(getl i (CTail k v c) (CHead (CTail k v d) (Bind b) u))))))))) @@ -881,22 +881,22 @@ theorem getl_ctail: theorem getl_ctail_clen: \forall (b: B).(\forall (t: T).(\forall (c: C).(ex nat (\lambda (n: nat).(getl (clen c) (CTail (Bind b) t c) (CHead (CSort n) (Bind b) t)))))) \def - \lambda (b: B).(\lambda (t: T).(\lambda (c: C).(C_ind (\lambda (c0: C).(ex nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort n) (Bind b) t))))) (\lambda (n: nat).(ex_intro nat (\lambda (n0: nat).(getl O (CHead (CSort n) (Bind b) t) (CHead (CSort n0) (Bind b) t))) n (getl_refl b (CSort n) t))) (\lambda (c0: C).(\lambda (H: (ex nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort n) (Bind b) t))))).(\lambda (k: K).(\lambda (t0: T).(let H0 \def H in (ex_ind nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort n) (Bind b) t))) (ex nat (\lambda (n: nat).(getl (s k (clen c0)) (CHead (CTail (Bind b) t c0) k t0) (CHead (CSort n) (Bind b) t)))) (\lambda (x: nat).(\lambda (H1: (getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t))).(match k return (\lambda (_: ?).(\lambda (k0: K).(ex nat (\lambda (n: nat).(getl (s k0 (clen c0)) (CHead (CTail (Bind b) t c0) k0 t0) (CHead (CSort n) (Bind b) t)))))) with [(Bind b0) \Rightarrow (ex_intro nat (\lambda (n: nat).(getl (S (clen c0)) (CHead (CTail (Bind b) t c0) (Bind b0) t0) (CHead (CSort n) (Bind b) t))) x (getl_head (Bind b0) (clen c0) (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t) H1 t0)) | (Flat f) \Rightarrow (ex_intro nat (\lambda (n: nat).(getl (clen c0) (CHead (CTail (Bind b) t c0) (Flat f) t0) (CHead (CSort n) (Bind b) t))) x (getl_flat (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t) (clen c0) H1 f t0))]))) H0)))))) c))). + \lambda (b: B).(\lambda (t: T).(\lambda (c: C).(C_ind (\lambda (c0: C).(ex nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort n) (Bind b) t))))) (\lambda (n: nat).(ex_intro nat (\lambda (n0: nat).(getl O (CHead (CSort n) (Bind b) t) (CHead (CSort n0) (Bind b) t))) n (getl_refl b (CSort n) t))) (\lambda (c0: C).(\lambda (H: (ex nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort n) (Bind b) t))))).(\lambda (k: K).(\lambda (t0: T).(let H0 \def H in (ex_ind nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort n) (Bind b) t))) (ex nat (\lambda (n: nat).(getl (s k (clen c0)) (CHead (CTail (Bind b) t c0) k t0) (CHead (CSort n) (Bind b) t)))) (\lambda (x: nat).(\lambda (H1: (getl (clen c0) (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t))).(match k return (\lambda (k0: K).(ex nat (\lambda (n: nat).(getl (s k0 (clen c0)) (CHead (CTail (Bind b) t c0) k0 t0) (CHead (CSort n) (Bind b) t))))) with [(Bind b0) \Rightarrow (ex_intro nat (\lambda (n: nat).(getl (S (clen c0)) (CHead (CTail (Bind b) t c0) (Bind b0) t0) (CHead (CSort n) (Bind b) t))) x (getl_head (Bind b0) (clen c0) (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t) H1 t0)) | (Flat f) \Rightarrow (ex_intro nat (\lambda (n: nat).(getl (clen c0) (CHead (CTail (Bind b) t c0) (Flat f) t0) (CHead (CSort n) (Bind b) t))) x (getl_flat (CTail (Bind b) t c0) (CHead (CSort x) (Bind b) t) (clen c0) H1 f t0))]))) H0)))))) c))). theorem getl_dec: \forall (c: C).(\forall (i: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl i c (CHead e (Bind b) v)))))) (\forall (d: C).((getl i c d) \to (\forall (P: Prop).P))))) \def - \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (i: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl i c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl i c0 d) \to (\forall (P: Prop).P)))))) (\lambda (n: nat).(\lambda (i: nat).(or_intror (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl i (CSort n) (CHead e (Bind b) v)))))) (\forall (d: C).((getl i (CSort n) d) \to (\forall (P: Prop).P))) (\lambda (d: C).(\lambda (H: (getl i (CSort n) d)).(\lambda (P: Prop).(getl_gen_sort n i d H P))))))) (\lambda (c0: C).(\lambda (H: ((\forall (i: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl i c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl i c0 d) \to (\forall (P: Prop).P))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (i: nat).(match i return (\lambda (_: ?).(\lambda (n: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl n (CHead c0 k t) d) \to (\forall (P: Prop).P)))))) with [O \Rightarrow (match k return (\lambda (_: ?).(\lambda (k0: K).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 k0 t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 k0 t) d) \to (\forall (P: Prop).P)))))) with [(Bind b) \Rightarrow (or_introl (ex_3 C B T (\lambda (e: C).(\lambda (b0: B).(\lambda (v: T).(getl O (CHead c0 (Bind b) t) (CHead e (Bind b0) v)))))) (\forall (d: C).((getl O (CHead c0 (Bind b) t) d) \to (\forall (P: Prop).P))) (ex_3_intro C B T (\lambda (e: C).(\lambda (b0: B).(\lambda (v: T).(getl O (CHead c0 (Bind b) t) (CHead e (Bind b0) v))))) c0 b t (getl_refl b c0 t))) | (Flat f) \Rightarrow (let H_x \def (H O) in (let H0 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl O c0 d) \to (\forall (P: Prop).P))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P)))) (\lambda (H1: (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) v))))))).(ex_3_ind C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) v))))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P)))) (\lambda (x0: C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H2: (getl O c0 (CHead x0 (Bind x1) x2))).(or_introl (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P))) (ex_3_intro C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v))))) x0 x1 x2 (getl_flat c0 (CHead x0 (Bind x1) x2) O H2 f t))))))) H1)) (\lambda (H1: ((\forall (d: C).((getl O c0 d) \to (\forall (P: Prop).P))))).(or_intror (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P))) (\lambda (d: C).(\lambda (H2: (getl O (CHead c0 (Flat f) t) d)).(\lambda (P: Prop).(H1 d (getl_intro O c0 d c0 (drop_refl c0) (clear_gen_flat f c0 d t (getl_gen_O (CHead c0 (Flat f) t) d H2))) P)))))) H0)))]) | (S n) \Rightarrow (let H_x \def (H (r k n)) in (let H0 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl (r k n) c0 d) \to (\forall (P: Prop).P))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P)))) (\lambda (H1: (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v))))))).(ex_3_ind C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v))))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P)))) (\lambda (x0: C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H2: (getl (r k n) c0 (CHead x0 (Bind x1) x2))).(or_introl (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P))) (ex_3_intro C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v))))) x0 x1 x2 (getl_head k n c0 (CHead x0 (Bind x1) x2) H2 t))))))) H1)) (\lambda (H1: ((\forall (d: C).((getl (r k n) c0 d) \to (\forall (P: Prop).P))))).(or_intror (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P))) (\lambda (d: C).(\lambda (H2: (getl (S n) (CHead c0 k t) d)).(\lambda (P: Prop).(H1 d (getl_gen_S k c0 d t n H2) P)))))) H0)))])))))) c). + \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (i: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl i c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl i c0 d) \to (\forall (P: Prop).P)))))) (\lambda (n: nat).(\lambda (i: nat).(or_intror (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl i (CSort n) (CHead e (Bind b) v)))))) (\forall (d: C).((getl i (CSort n) d) \to (\forall (P: Prop).P))) (\lambda (d: C).(\lambda (H: (getl i (CSort n) d)).(\lambda (P: Prop).(getl_gen_sort n i d H P))))))) (\lambda (c0: C).(\lambda (H: ((\forall (i: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl i c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl i c0 d) \to (\forall (P: Prop).P))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (i: nat).(match i return (\lambda (n: nat).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl n (CHead c0 k t) d) \to (\forall (P: Prop).P))))) with [O \Rightarrow (match k return (\lambda (k0: K).(or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 k0 t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 k0 t) d) \to (\forall (P: Prop).P))))) with [(Bind b) \Rightarrow (or_introl (ex_3 C B T (\lambda (e: C).(\lambda (b0: B).(\lambda (v: T).(getl O (CHead c0 (Bind b) t) (CHead e (Bind b0) v)))))) (\forall (d: C).((getl O (CHead c0 (Bind b) t) d) \to (\forall (P: Prop).P))) (ex_3_intro C B T (\lambda (e: C).(\lambda (b0: B).(\lambda (v: T).(getl O (CHead c0 (Bind b) t) (CHead e (Bind b0) v))))) c0 b t (getl_refl b c0 t))) | (Flat f) \Rightarrow (let H_x \def (H O) in (let H0 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl O c0 d) \to (\forall (P: Prop).P))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P)))) (\lambda (H1: (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) v))))))).(ex_3_ind C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O c0 (CHead e (Bind b) v))))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P)))) (\lambda (x0: C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H2: (getl O c0 (CHead x0 (Bind x1) x2))).(or_introl (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P))) (ex_3_intro C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v))))) x0 x1 x2 (getl_flat c0 (CHead x0 (Bind x1) x2) O H2 f t))))))) H1)) (\lambda (H1: ((\forall (d: C).((getl O c0 d) \to (\forall (P: Prop).P))))).(or_intror (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl O (CHead c0 (Flat f) t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl O (CHead c0 (Flat f) t) d) \to (\forall (P: Prop).P))) (\lambda (d: C).(\lambda (H2: (getl O (CHead c0 (Flat f) t) d)).(\lambda (P: Prop).(H1 d (getl_intro O c0 d c0 (drop_refl c0) (clear_gen_flat f c0 d t (getl_gen_O (CHead c0 (Flat f) t) d H2))) P)))))) H0)))]) | (S n) \Rightarrow (let H_x \def (H (r k n)) in (let H0 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v)))))) (\forall (d: C).((getl (r k n) c0 d) \to (\forall (P: Prop).P))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P)))) (\lambda (H1: (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v))))))).(ex_3_ind C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (r k n) c0 (CHead e (Bind b) v))))) (or (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P)))) (\lambda (x0: C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H2: (getl (r k n) c0 (CHead x0 (Bind x1) x2))).(or_introl (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P))) (ex_3_intro C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v))))) x0 x1 x2 (getl_head k n c0 (CHead x0 (Bind x1) x2) H2 t))))))) H1)) (\lambda (H1: ((\forall (d: C).((getl (r k n) c0 d) \to (\forall (P: Prop).P))))).(or_intror (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl (S n) (CHead c0 k t) (CHead e (Bind b) v)))))) (\forall (d: C).((getl (S n) (CHead c0 k t) d) \to (\forall (P: Prop).P))) (\lambda (d: C).(\lambda (H2: (getl (S n) (CHead c0 k t) d)).(\lambda (P: Prop).(H1 d (getl_gen_S k c0 d t n H2) P)))))) H0)))])))))) c). theorem clear_cle: \forall (c1: C).(\forall (c2: C).((clear c1 c2) \to (cle c2 c1))) \def - \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).((clear c c2) \to (le (cweight c2) (cweight c))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (H: (clear (CSort n) c2)).(clear_gen_sort c2 n H (le (cweight c2) O))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).((clear c c2) \to (le (cweight c2) (cweight c)))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (H0: (clear (CHead c k t) c2)).((match k return (\lambda (_: ?).(\lambda (k0: K).((clear (CHead c k0 t) c2) \to (le (cweight c2) (plus (cweight c) (tweight t)))))) with [(Bind b) \Rightarrow (\lambda (H1: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: C).(le (cweight c0) (plus (cweight c) (tweight t)))) (le_n (plus (cweight c) (tweight t))) c2 (clear_gen_bind b c c2 t H1))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead c (Flat f) t) c2)).(le_S_n (cweight c2) (plus (cweight c) (tweight t)) (le_n_S (cweight c2) (plus (cweight c) (tweight t)) (le_plus_trans (cweight c2) (cweight c) (tweight t) (H c2 (clear_gen_flat f c c2 t H1))))))]) H0))))))) c1). + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).((clear c c2) \to (le (cweight c2) (cweight c))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (H: (clear (CSort n) c2)).(clear_gen_sort c2 n H (le (cweight c2) O))))) (\lambda (c: C).(\lambda (H: ((\forall (c2: C).((clear c c2) \to (le (cweight c2) (cweight c)))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c2: C).(\lambda (H0: (clear (CHead c k t) c2)).((match k return (\lambda (k0: K).((clear (CHead c k0 t) c2) \to (le (cweight c2) (plus (cweight c) (tweight t))))) with [(Bind b) \Rightarrow (\lambda (H1: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: C).(le (cweight c0) (plus (cweight c) (tweight t)))) (le_n (plus (cweight c) (tweight t))) c2 (clear_gen_bind b c c2 t H1))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead c (Flat f) t) c2)).(le_S_n (cweight c2) (plus (cweight c) (tweight t)) (le_n_S (cweight c2) (plus (cweight c) (tweight t)) (le_plus_trans (cweight c2) (cweight c) (tweight t) (H c2 (clear_gen_flat f c c2 t H1))))))]) H0))))))) c1). theorem getl_flt: \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead e (Bind b) u)) \to (flt e u c (TLRef i))))))) \def - \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead e (Bind b) u)) \to (flt e u c0 (TLRef i))))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (getl i (CSort n) (CHead e (Bind b) u))).(getl_gen_sort n i (CHead e (Bind b) u) H (flt e u (CSort n) (TLRef i)))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead e (Bind b) u)) \to (flt e u c0 (TLRef i)))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (i: nat).(match i return (\lambda (_: ?).(\lambda (n: nat).((getl n (CHead c0 k t) (CHead e (Bind b) u)) \to (flt e u (CHead c0 k t) (TLRef n))))) with [O \Rightarrow (\lambda (H0: (getl O (CHead c0 k t) (CHead e (Bind b) u))).((match k return (\lambda (_: ?).(\lambda (k0: K).((clear (CHead c0 k0 t) (CHead e (Bind b) u)) \to (flt e u (CHead c0 k0 t) (TLRef O))))) with [(Bind b0) \Rightarrow (\lambda (H1: (clear (CHead c0 (Bind b0) t) (CHead e (Bind b) u))).(let H2 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow c])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H3 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H4 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C e c0)).(eq_ind_r T t (\lambda (t0: T).(flt e t0 (CHead c0 (Bind b0) t) (TLRef O))) (eq_ind_r C c0 (\lambda (c1: C).(flt c1 t (CHead c0 (Bind b0) t) (TLRef O))) (eq_ind B b (\lambda (b1: B).(flt c0 t (CHead c0 (Bind b1) t) (TLRef O))) (flt_arith0 (Bind b) c0 t O) b0 H5) e H6) u H4)))) H3)) H2))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead c0 (Flat f) t) (CHead e (Bind b) u))).(flt_arith1 (Bind b) e c0 u (clear_cle c0 (CHead e (Bind b) u) (clear_gen_flat f c0 (CHead e (Bind b) u) t H1)) (Flat f) t O))]) (getl_gen_O (CHead c0 k t) (CHead e (Bind b) u) H0))) | (S n) \Rightarrow (\lambda (H0: (getl (S n) (CHead c0 k t) (CHead e (Bind b) u))).(let H_y \def (H e u (r k n) (getl_gen_S k c0 (CHead e (Bind b) u) t n H0)) in (flt_arith2 e c0 u (r k n) H_y k t (S n))))])))))))) c)). + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead e (Bind b) u)) \to (flt e u c0 (TLRef i))))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (getl i (CSort n) (CHead e (Bind b) u))).(getl_gen_sort n i (CHead e (Bind b) u) H (flt e u (CSort n) (TLRef i)))))))) (\lambda (c0: C).(\lambda (H: ((\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead e (Bind b) u)) \to (flt e u c0 (TLRef i)))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e: C).(\lambda (u: T).(\lambda (i: nat).(match i return (\lambda (n: nat).((getl n (CHead c0 k t) (CHead e (Bind b) u)) \to (flt e u (CHead c0 k t) (TLRef n)))) with [O \Rightarrow (\lambda (H0: (getl O (CHead c0 k t) (CHead e (Bind b) u))).((match k return (\lambda (k0: K).((clear (CHead c0 k0 t) (CHead e (Bind b) u)) \to (flt e u (CHead c0 k0 t) (TLRef O)))) with [(Bind b0) \Rightarrow (\lambda (H1: (clear (CHead c0 (Bind b0) t) (CHead e (Bind b) u))).(let H2 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow c])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H3 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in ((let H4 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead e (Bind b) u) (CHead c0 (Bind b0) t) (clear_gen_bind b0 c0 (CHead e (Bind b) u) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C e c0)).(eq_ind_r T t (\lambda (t0: T).(flt e t0 (CHead c0 (Bind b0) t) (TLRef O))) (eq_ind_r C c0 (\lambda (c1: C).(flt c1 t (CHead c0 (Bind b0) t) (TLRef O))) (eq_ind B b (\lambda (b1: B).(flt c0 t (CHead c0 (Bind b1) t) (TLRef O))) (flt_arith0 (Bind b) c0 t O) b0 H5) e H6) u H4)))) H3)) H2))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead c0 (Flat f) t) (CHead e (Bind b) u))).(flt_arith1 (Bind b) e c0 u (clear_cle c0 (CHead e (Bind b) u) (clear_gen_flat f c0 (CHead e (Bind b) u) t H1)) (Flat f) t O))]) (getl_gen_O (CHead c0 k t) (CHead e (Bind b) u) H0))) | (S n) \Rightarrow (\lambda (H0: (getl (S n) (CHead c0 k t) (CHead e (Bind b) u))).(let H_y \def (H e u (r k n) (getl_gen_S k c0 (CHead e (Bind b) u) t n H0)) in (flt_arith2 e c0 u (r k n) H_y k t (S n))))])))))))) c)). theorem getl_gen_flat: \forall (f: F).(\forall (e: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i (CHead e (Flat f) v) d) \to (getl i e d)))))) @@ -911,12 +911,12 @@ theorem getl_gen_bind: theorem getl_gen_tail: \forall (k: K).(\forall (b: B).(\forall (u1: T).(\forall (u2: T).(\forall (c2: C).(\forall (c1: C).(\forall (i: nat).((getl i (CTail k u1 c1) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl i c1 (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c1))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))))))))) \def - \lambda (k: K).(\lambda (b: B).(\lambda (u1: T).(\lambda (u2: T).(\lambda (c2: C).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (i: nat).((getl i (CTail k u1 c) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl i c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))))) (\lambda (n: nat).(\lambda (i: nat).(match i return (\lambda (_: ?).(\lambda (n0: nat).((getl n0 (CTail k u1 (CSort n)) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n0 (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n0 (clen (CSort n)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n1: nat).(eq C c2 (CSort n1)))))))) with [O \Rightarrow (\lambda (H: (getl O (CHead (CSort n) k u1) (CHead c2 (Bind b) u2))).((match k return (\lambda (_: ?).(\lambda (k0: K).((clear (CHead (CSort n) k0 u1) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k0 u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K k0 (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0)))))))) with [(Bind b0) \Rightarrow (\lambda (H0: (clear (CHead (CSort n) (Bind b0) u1) (CHead c2 (Bind b) u2))).(let H1 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) (clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in ((let H2 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) (clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in ((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) (clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in (\lambda (H4: (eq B b b0)).(\lambda (H5: (eq C c2 (CSort n))).(eq_ind_r C (CSort n) (\lambda (c: C).(or (ex2 C (\lambda (e: C).(eq C c (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c (CSort n0)))))) (eq_ind_r T u1 (\lambda (t: T).(or (ex2 C (\lambda (e: C).(eq C (CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) t)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b))) (\lambda (_: nat).(eq T u1 t)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0)))))) (eq_ind_r B b0 (\lambda (b1: B).(or (ex2 C (\lambda (e: C).(eq C (CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b1) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b1))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0)))))) (or_intror (ex2 C (\lambda (e: C).(eq C (CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b0) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b0))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0)))) (ex4_intro nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b0))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0))) n (refl_equal nat O) (refl_equal K (Bind b0)) (refl_equal T u1) (refl_equal C (CSort n)))) b H4) u2 H3) c2 H5)))) H2)) H1))) | (Flat f) \Rightarrow (\lambda (H0: (clear (CHead (CSort n) (Flat f) u1) (CHead c2 (Bind b) u2))).(clear_gen_sort (CHead c2 (Bind b) u2) n (clear_gen_flat f (CSort n) (CHead c2 (Bind b) u2) u1 H0) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail (Flat f) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Flat f) (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0)))))))]) (getl_gen_O (CHead (CSort n) k u1) (CHead c2 (Bind b) u2) H))) | (S n0) \Rightarrow (\lambda (H: (getl (S n0) (CHead (CSort n) k u1) (CHead c2 (Bind b) u2))).(getl_gen_sort n (r k n0) (CHead c2 (Bind b) u2) (getl_gen_S k (CSort n) (CHead c2 (Bind b) u2) u1 n0 H) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n0) (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n0) O)) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n1: nat).(eq C c2 (CSort n1)))))))]))) (\lambda (c: C).(\lambda (H: ((\forall (i: nat).((getl i (CTail k u1 c) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl i c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))))))).(\lambda (k0: K).(\lambda (t: T).(\lambda (i: nat).(match i return (\lambda (_: ?).(\lambda (n: nat).((getl n (CTail k u1 (CHead c k0 t)) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n (clen (CHead c k0 t)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0)))))))) with [O \Rightarrow (\lambda (H0: (getl O (CHead (CTail k u1 c) k0 t) (CHead c2 (Bind b) u2))).((match k0 return (\lambda (_: ?).(\lambda (k1: K).((clear (CHead (CTail k u1 c) k1 t) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c k1 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s k1 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))))) with [(Bind b0) \Rightarrow (\lambda (H1: (clear (CHead (CTail k u1 c) (Bind b0) t) (CHead c2 (Bind b) u2))).(let H2 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) (clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in ((let H3 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) (clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in ((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) (clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C c2 (CTail k u1 c))).(eq_ind T u2 (\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b0) t0) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b0) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))) (eq_ind B b (\lambda (b1: B).(or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b1) u2) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b1) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))) (let H7 \def (eq_ind C c2 (\lambda (c0: C).(\forall (i: nat).((getl i (CTail k u1 c) (CHead c0 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl i c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))))) H (CTail k u1 c) H6) in (eq_ind_r C (CTail k u1 c) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (or_introl (ex2 C (\lambda (e: C).(eq C (CTail k u1 c) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C (CTail k u1 c) (CSort n)))) (ex_intro2 C (\lambda (e: C).(eq C (CTail k u1 c) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) (CHead e (Bind b) u2))) c (refl_equal C (CTail k u1 c)) (getl_refl b c u2))) c2 H6)) b0 H5) t H4)))) H3)) H2))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead (CTail k u1 c) (Flat f) t) (CHead c2 (Bind b) u2))).(let H2 \def (H O (getl_intro O (CTail k u1 c) (CHead c2 (Bind b) u2) (CTail k u1 c) (drop_refl (CTail k u1 c)) (clear_gen_flat f (CTail k u1 c) (CHead c2 (Bind b) u2) t H1))) in (or_ind (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (H3: (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2))))).(ex2_ind C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CTail k u1 x))).(\lambda (H5: (getl O c (CHead x (Bind b) u2))).(eq_ind_r C (CTail k u1 x) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (or_introl (ex2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C (CTail k u1 x) (CSort n)))) (ex_intro2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2))) x (refl_equal C (CTail k u1 x)) (getl_flat c (CHead x (Bind b) u2) O H5 f t))) c2 H4)))) H3)) (\lambda (H3: (ex4 nat (\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))).(ex4_ind nat (\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (x0: nat).(\lambda (H4: (eq nat O (clen c))).(\lambda (H5: (eq K k (Bind b))).(\lambda (H6: (eq T u1 u2)).(\lambda (H7: (eq C c2 (CSort x0))).(eq_ind_r C (CSort x0) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (eq_ind T u1 (\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) t0)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 t0)) (\lambda (n: nat).(eq C (CSort x0) (CSort n)))))) (eq_ind_r K (Bind b) (\lambda (k1: K).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n)))))) (or_intror (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n)))) (ex4_intro nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n))) x0 H4 (refl_equal K (Bind b)) (refl_equal T u1) (refl_equal C (CSort x0)))) k H5) u2 H6) c2 H7)))))) H3)) H2)))]) (getl_gen_O (CHead (CTail k u1 c) k0 t) (CHead c2 (Bind b) u2) H0))) | (S n) \Rightarrow (\lambda (H0: (getl (S n) (CHead (CTail k u1 c) k0 t) (CHead c2 (Bind b) u2))).(let H_x \def (H (r k0 n) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind b) u2) t n H0)) in (let H1 \def H_x in (or_ind (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (r k0 n) c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0)))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (H2: (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (r k0 n) c (CHead e (Bind b) u2))))).(ex2_ind C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (r k0 n) c (CHead e (Bind b) u2))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (x: C).(\lambda (H3: (eq C c2 (CTail k u1 x))).(\lambda (H4: (getl (r k0 n) c (CHead x (Bind b) u2))).(let H5 \def (eq_ind C c2 (\lambda (c0: C).(getl (r k0 n) (CTail k u1 c) (CHead c0 (Bind b) u2))) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind b) u2) t n H0) (CTail k u1 x) H3) in (eq_ind_r C (CTail k u1 x) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c0 (CSort n0)))))) (or_introl (ex2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C (CTail k u1 x) (CSort n0)))) (ex_intro2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2))) x (refl_equal C (CTail k u1 x)) (getl_head k0 n c (CHead x (Bind b) u2) H4 t))) c2 H3))))) H2)) (\lambda (H2: (ex4 nat (\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))).(ex4_ind nat (\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (x0: nat).(\lambda (H3: (eq nat (r k0 n) (clen c))).(\lambda (H4: (eq K k (Bind b))).(\lambda (H5: (eq T u1 u2)).(\lambda (H6: (eq C c2 (CSort x0))).(let H7 \def (eq_ind C c2 (\lambda (c0: C).(getl (r k0 n) (CTail k u1 c) (CHead c0 (Bind b) u2))) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind b) u2) t n H0) (CSort x0) H6) in (eq_ind_r C (CSort x0) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c0 (CSort n0)))))) (let H8 \def (eq_ind_r T u2 (\lambda (t: T).(getl (r k0 n) (CTail k u1 c) (CHead (CSort x0) (Bind b) t))) H7 u1 H5) in (eq_ind T u1 (\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) t0)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 t0)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0)))))) (let H9 \def (eq_ind K k (\lambda (k: K).(getl (r k0 n) (CTail k u1 c) (CHead (CSort x0) (Bind b) u1))) H8 (Bind b) H4) in (eq_ind_r K (Bind b) (\lambda (k1: K).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0)))))) (eq_ind nat (r k0 n) (\lambda (n0: nat).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 n0))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n1: nat).(eq C (CSort x0) (CSort n1)))))) (eq_ind_r nat (S n) (\lambda (n0: nat).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) n0)) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n1: nat).(eq C (CSort x0) (CSort n1)))))) (or_intror (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (S n))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0)))) (ex4_intro nat (\lambda (_: nat).(eq nat (S n) (S n))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0))) x0 (refl_equal nat (S n)) (refl_equal K (Bind b)) (refl_equal T u1) (refl_equal C (CSort x0)))) (s k0 (r k0 n)) (s_r k0 n)) (clen c) H3) k H4)) u2 H5)) c2 H6))))))) H2)) H1))))])))))) c1)))))). + \lambda (k: K).(\lambda (b: B).(\lambda (u1: T).(\lambda (u2: T).(\lambda (c2: C).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (i: nat).((getl i (CTail k u1 c) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl i c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))))) (\lambda (n: nat).(\lambda (i: nat).(match i return (\lambda (n0: nat).((getl n0 (CTail k u1 (CSort n)) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n0 (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n0 (clen (CSort n)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n1: nat).(eq C c2 (CSort n1))))))) with [O \Rightarrow (\lambda (H: (getl O (CHead (CSort n) k u1) (CHead c2 (Bind b) u2))).((match k return (\lambda (k0: K).((clear (CHead (CSort n) k0 u1) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k0 u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K k0 (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))))) with [(Bind b0) \Rightarrow (\lambda (H0: (clear (CHead (CSort n) (Bind b0) u1) (CHead c2 (Bind b) u2))).(let H1 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) (clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in ((let H2 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) (clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in ((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead (CSort n) (Bind b0) u1) (clear_gen_bind b0 (CSort n) (CHead c2 (Bind b) u2) u1 H0)) in (\lambda (H4: (eq B b b0)).(\lambda (H5: (eq C c2 (CSort n))).(eq_ind_r C (CSort n) (\lambda (c: C).(or (ex2 C (\lambda (e: C).(eq C c (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c (CSort n0)))))) (eq_ind_r T u1 (\lambda (t: T).(or (ex2 C (\lambda (e: C).(eq C (CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) t)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b))) (\lambda (_: nat).(eq T u1 t)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0)))))) (eq_ind_r B b0 (\lambda (b1: B).(or (ex2 C (\lambda (e: C).(eq C (CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b1) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b1))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0)))))) (or_intror (ex2 C (\lambda (e: C).(eq C (CSort n) (CTail (Bind b0) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b0) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b0))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0)))) (ex4_intro nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Bind b0) (Bind b0))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort n) (CSort n0))) n (refl_equal nat O) (refl_equal K (Bind b0)) (refl_equal T u1) (refl_equal C (CSort n)))) b H4) u2 H3) c2 H5)))) H2)) H1))) | (Flat f) \Rightarrow (\lambda (H0: (clear (CHead (CSort n) (Flat f) u1) (CHead c2 (Bind b) u2))).(clear_gen_sort (CHead c2 (Bind b) u2) n (clear_gen_flat f (CSort n) (CHead c2 (Bind b) u2) u1 H0) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail (Flat f) u1 e))) (\lambda (e: C).(getl O (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O O)) (\lambda (_: nat).(eq K (Flat f) (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0)))))))]) (getl_gen_O (CHead (CSort n) k u1) (CHead c2 (Bind b) u2) H))) | (S n0) \Rightarrow (\lambda (H: (getl (S n0) (CHead (CSort n) k u1) (CHead c2 (Bind b) u2))).(getl_gen_sort n (r k n0) (CHead c2 (Bind b) u2) (getl_gen_S k (CSort n) (CHead c2 (Bind b) u2) u1 n0 H) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n0) (CSort n) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n0) O)) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n1: nat).(eq C c2 (CSort n1)))))))]))) (\lambda (c: C).(\lambda (H: ((\forall (i: nat).((getl i (CTail k u1 c) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl i c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))))))).(\lambda (k0: K).(\lambda (t: T).(\lambda (i: nat).(match i return (\lambda (n: nat).((getl n (CTail k u1 (CHead c k0 t)) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl n (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat n (clen (CHead c k0 t)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))))) with [O \Rightarrow (\lambda (H0: (getl O (CHead (CTail k u1 c) k0 t) (CHead c2 (Bind b) u2))).((match k0 return (\lambda (k1: K).((clear (CHead (CTail k u1 c) k1 t) (CHead c2 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c k1 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s k1 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))))) with [(Bind b0) \Rightarrow (\lambda (H1: (clear (CHead (CTail k u1 c) (Bind b0) t) (CHead c2 (Bind b) u2))).(let H2 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) (clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in ((let H3 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) (clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in ((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind b) u2) (CHead (CTail k u1 c) (Bind b0) t) (clear_gen_bind b0 (CTail k u1 c) (CHead c2 (Bind b) u2) t H1)) in (\lambda (H5: (eq B b b0)).(\lambda (H6: (eq C c2 (CTail k u1 c))).(eq_ind T u2 (\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b0) t0) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b0) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))) (eq_ind B b (\lambda (b1: B).(or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b1) u2) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b1) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))))) (let H7 \def (eq_ind C c2 (\lambda (c0: C).(\forall (i: nat).((getl i (CTail k u1 c) (CHead c0 (Bind b) u2)) \to (or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl i c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat i (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))))) H (CTail k u1 c) H6) in (eq_ind_r C (CTail k u1 c) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (or_introl (ex2 C (\lambda (e: C).(eq C (CTail k u1 c) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Bind b) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C (CTail k u1 c) (CSort n)))) (ex_intro2 C (\lambda (e: C).(eq C (CTail k u1 c) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Bind b) u2) (CHead e (Bind b) u2))) c (refl_equal C (CTail k u1 c)) (getl_refl b c u2))) c2 H6)) b0 H5) t H4)))) H3)) H2))) | (Flat f) \Rightarrow (\lambda (H1: (clear (CHead (CTail k u1 c) (Flat f) t) (CHead c2 (Bind b) u2))).(let H2 \def (H O (getl_intro O (CTail k u1 c) (CHead c2 (Bind b) u2) (CTail k u1 c) (drop_refl (CTail k u1 c)) (clear_gen_flat f (CTail k u1 c) (CHead c2 (Bind b) u2) t H1))) in (or_ind (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n)))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (H3: (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2))))).(ex2_ind C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O c (CHead e (Bind b) u2))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CTail k u1 x))).(\lambda (H5: (getl O c (CHead x (Bind b) u2))).(eq_ind_r C (CTail k u1 x) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (or_introl (ex2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C (CTail k u1 x) (CSort n)))) (ex_intro2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2))) x (refl_equal C (CTail k u1 x)) (getl_flat c (CHead x (Bind b) u2) O H5 f t))) c2 H4)))) H3)) (\lambda (H3: (ex4 nat (\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))).(ex4_ind nat (\lambda (_: nat).(eq nat O (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))) (\lambda (x0: nat).(\lambda (H4: (eq nat O (clen c))).(\lambda (H5: (eq K k (Bind b))).(\lambda (H6: (eq T u1 u2)).(\lambda (H7: (eq C c2 (CSort x0))).(eq_ind_r C (CSort x0) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c0 (CSort n)))))) (eq_ind T u1 (\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) t0)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 t0)) (\lambda (n: nat).(eq C (CSort x0) (CSort n)))))) (eq_ind_r K (Bind b) (\lambda (k1: K).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n)))))) (or_intror (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl O (CHead c (Flat f) t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n)))) (ex4_intro nat (\lambda (_: nat).(eq nat O (s (Flat f) (clen c)))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n: nat).(eq C (CSort x0) (CSort n))) x0 H4 (refl_equal K (Bind b)) (refl_equal T u1) (refl_equal C (CSort x0)))) k H5) u2 H6) c2 H7)))))) H3)) H2)))]) (getl_gen_O (CHead (CTail k u1 c) k0 t) (CHead c2 (Bind b) u2) H0))) | (S n) \Rightarrow (\lambda (H0: (getl (S n) (CHead (CTail k u1 c) k0 t) (CHead c2 (Bind b) u2))).(let H_x \def (H (r k0 n) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind b) u2) t n H0)) in (let H1 \def H_x in (or_ind (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (r k0 n) c (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0)))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (H2: (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (r k0 n) c (CHead e (Bind b) u2))))).(ex2_ind C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (r k0 n) c (CHead e (Bind b) u2))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (x: C).(\lambda (H3: (eq C c2 (CTail k u1 x))).(\lambda (H4: (getl (r k0 n) c (CHead x (Bind b) u2))).(let H5 \def (eq_ind C c2 (\lambda (c0: C).(getl (r k0 n) (CTail k u1 c) (CHead c0 (Bind b) u2))) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind b) u2) t n H0) (CTail k u1 x) H3) in (eq_ind_r C (CTail k u1 x) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c0 (CSort n0)))))) (or_introl (ex2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C (CTail k u1 x) (CSort n0)))) (ex_intro2 C (\lambda (e: C).(eq C (CTail k u1 x) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2))) x (refl_equal C (CTail k u1 x)) (getl_head k0 n c (CHead x (Bind b) u2) H4 t))) c2 H3))))) H2)) (\lambda (H2: (ex4 nat (\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n: nat).(eq C c2 (CSort n))))).(ex4_ind nat (\lambda (_: nat).(eq nat (r k0 n) (clen c))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))) (or (ex2 C (\lambda (e: C).(eq C c2 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c2 (CSort n0))))) (\lambda (x0: nat).(\lambda (H3: (eq nat (r k0 n) (clen c))).(\lambda (H4: (eq K k (Bind b))).(\lambda (H5: (eq T u1 u2)).(\lambda (H6: (eq C c2 (CSort x0))).(let H7 \def (eq_ind C c2 (\lambda (c0: C).(getl (r k0 n) (CTail k u1 c) (CHead c0 (Bind b) u2))) (getl_gen_S k0 (CTail k u1 c) (CHead c2 (Bind b) u2) t n H0) (CSort x0) H6) in (eq_ind_r C (CSort x0) (\lambda (c0: C).(or (ex2 C (\lambda (e: C).(eq C c0 (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u2)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 u2)) (\lambda (n0: nat).(eq C c0 (CSort n0)))))) (let H8 \def (eq_ind_r T u2 (\lambda (t: T).(getl (r k0 n) (CTail k u1 c) (CHead (CSort x0) (Bind b) t))) H7 u1 H5) in (eq_ind T u1 (\lambda (t0: T).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) t0)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k (Bind b))) (\lambda (_: nat).(eq T u1 t0)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0)))))) (let H9 \def (eq_ind K k (\lambda (k: K).(getl (r k0 n) (CTail k u1 c) (CHead (CSort x0) (Bind b) u1))) H8 (Bind b) H4) in (eq_ind_r K (Bind b) (\lambda (k1: K).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail k1 u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 (clen c)))) (\lambda (_: nat).(eq K k1 (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0)))))) (eq_ind nat (r k0 n) (\lambda (n0: nat).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (s k0 n0))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n1: nat).(eq C (CSort x0) (CSort n1)))))) (eq_ind_r nat (S n) (\lambda (n0: nat).(or (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) n0)) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n1: nat).(eq C (CSort x0) (CSort n1)))))) (or_intror (ex2 C (\lambda (e: C).(eq C (CSort x0) (CTail (Bind b) u1 e))) (\lambda (e: C).(getl (S n) (CHead c k0 t) (CHead e (Bind b) u1)))) (ex4 nat (\lambda (_: nat).(eq nat (S n) (S n))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0)))) (ex4_intro nat (\lambda (_: nat).(eq nat (S n) (S n))) (\lambda (_: nat).(eq K (Bind b) (Bind b))) (\lambda (_: nat).(eq T u1 u1)) (\lambda (n0: nat).(eq C (CSort x0) (CSort n0))) x0 (refl_equal nat (S n)) (refl_equal K (Bind b)) (refl_equal T u1) (refl_equal C (CSort x0)))) (s k0 (r k0 n)) (s_r k0 n)) (clen c) H3) k H4)) u2 H5)) c2 H6))))))) H2)) H1))))])))))) c1)))))). theorem cimp_flat_sx: \forall (f: F).(\forall (c: C).(\forall (v: T).(cimp (CHead c (Flat f) v) c))) \def - \lambda (f: F).(\lambda (c: C).(\lambda (v: T).(\lambda (b: B).(\lambda (d1: C).(\lambda (w: T).(\lambda (h: nat).(\lambda (H: (getl h (CHead c (Flat f) v) (CHead d1 (Bind b) w))).((match h return (\lambda (_: ?).(\lambda (n: nat).((getl n (CHead c (Flat f) v) (CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl n c (CHead d2 (Bind b) w))))))) with [O \Rightarrow (\lambda (H0: (getl O (CHead c (Flat f) v) (CHead d1 (Bind b) w))).(ex_intro C (\lambda (d2: C).(getl O c (CHead d2 (Bind b) w))) d1 (getl_intro O c (CHead d1 (Bind b) w) c (drop_refl c) (clear_gen_flat f c (CHead d1 (Bind b) w) v (getl_gen_O (CHead c (Flat f) v) (CHead d1 (Bind b) w) H0))))) | (S n) \Rightarrow (\lambda (H0: (getl (S n) (CHead c (Flat f) v) (CHead d1 (Bind b) w))).(ex_intro C (\lambda (d2: C).(getl (S n) c (CHead d2 (Bind b) w))) d1 (getl_gen_S (Flat f) c (CHead d1 (Bind b) w) v n H0)))]) H)))))))). + \lambda (f: F).(\lambda (c: C).(\lambda (v: T).(\lambda (b: B).(\lambda (d1: C).(\lambda (w: T).(\lambda (h: nat).(\lambda (H: (getl h (CHead c (Flat f) v) (CHead d1 (Bind b) w))).((match h return (\lambda (n: nat).((getl n (CHead c (Flat f) v) (CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl n c (CHead d2 (Bind b) w)))))) with [O \Rightarrow (\lambda (H0: (getl O (CHead c (Flat f) v) (CHead d1 (Bind b) w))).(ex_intro C (\lambda (d2: C).(getl O c (CHead d2 (Bind b) w))) d1 (getl_intro O c (CHead d1 (Bind b) w) c (drop_refl c) (clear_gen_flat f c (CHead d1 (Bind b) w) v (getl_gen_O (CHead c (Flat f) v) (CHead d1 (Bind b) w) H0))))) | (S n) \Rightarrow (\lambda (H0: (getl (S n) (CHead c (Flat f) v) (CHead d1 (Bind b) w))).(ex_intro C (\lambda (d2: C).(getl (S n) c (CHead d2 (Bind b) w))) d1 (getl_gen_S (Flat f) c (CHead d1 (Bind b) w) v n H0)))]) H)))))))). theorem cimp_flat_dx: \forall (f: F).(\forall (c: C).(\forall (v: T).(cimp c (CHead c (Flat f) v)))) @@ -926,7 +926,7 @@ theorem cimp_flat_dx: theorem cimp_bind: \forall (c1: C).(\forall (c2: C).((cimp c1 c2) \to (\forall (b: B).(\forall (v: T).(cimp (CHead c1 (Bind b) v) (CHead c2 (Bind b) v)))))) \def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: ((\forall (b: B).(\forall (d1: C).(\forall (w: T).(\forall (h: nat).((getl h c1 (CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl h c2 (CHead d2 (Bind b) w))))))))))).(\lambda (b: B).(\lambda (v: T).(\lambda (b0: B).(\lambda (d1: C).(\lambda (w: T).(\lambda (h: nat).(\lambda (H0: (getl h (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w))).((match h return (\lambda (_: ?).(\lambda (n: nat).((getl n (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w)) \to (ex C (\lambda (d2: C).(getl n (CHead c2 (Bind b) v) (CHead d2 (Bind b0) w))))))) with [O \Rightarrow (\lambda (H1: (getl O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w))).(let H2 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in ((let H3 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in ((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in (\lambda (H5: (eq B b0 b)).(\lambda (_: (eq C d1 c1)).(eq_ind_r T v (\lambda (t: T).(ex C (\lambda (d2: C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b0) t))))) (eq_ind_r B b (\lambda (b1: B).(ex C (\lambda (d2: C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b1) v))))) (ex_intro C (\lambda (d2: C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b) v))) c2 (getl_refl b c2 v)) b0 H5) w H4)))) H3)) H2))) | (S n) \Rightarrow (\lambda (H1: (getl (S n) (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w))).(let H_x \def (H b0 d1 w (r (Bind b) n) (getl_gen_S (Bind b) c1 (CHead d1 (Bind b0) w) v n H1)) in (let H2 \def H_x in (ex_ind C (\lambda (d2: C).(getl (r (Bind b) n) c2 (CHead d2 (Bind b0) w))) (ex C (\lambda (d2: C).(getl (S n) (CHead c2 (Bind b) v) (CHead d2 (Bind b0) w)))) (\lambda (x: C).(\lambda (H3: (getl (r (Bind b) n) c2 (CHead x (Bind b0) w))).(ex_intro C (\lambda (d2: C).(getl (S n) (CHead c2 (Bind b) v) (CHead d2 (Bind b0) w))) x (getl_head (Bind b) n c2 (CHead x (Bind b0) w) H3 v)))) H2))))]) H0)))))))))). + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: ((\forall (b: B).(\forall (d1: C).(\forall (w: T).(\forall (h: nat).((getl h c1 (CHead d1 (Bind b) w)) \to (ex C (\lambda (d2: C).(getl h c2 (CHead d2 (Bind b) w))))))))))).(\lambda (b: B).(\lambda (v: T).(\lambda (b0: B).(\lambda (d1: C).(\lambda (w: T).(\lambda (h: nat).(\lambda (H0: (getl h (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w))).((match h return (\lambda (n: nat).((getl n (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w)) \to (ex C (\lambda (d2: C).(getl n (CHead c2 (Bind b) v) (CHead d2 (Bind b0) w)))))) with [O \Rightarrow (\lambda (H1: (getl O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w))).(let H2 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in ((let H3 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in ((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind b0) w) (CHead c1 (Bind b) v) (clear_gen_bind b c1 (CHead d1 (Bind b0) w) v (getl_gen_O (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w) H1))) in (\lambda (H5: (eq B b0 b)).(\lambda (_: (eq C d1 c1)).(eq_ind_r T v (\lambda (t: T).(ex C (\lambda (d2: C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b0) t))))) (eq_ind_r B b (\lambda (b1: B).(ex C (\lambda (d2: C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b1) v))))) (ex_intro C (\lambda (d2: C).(getl O (CHead c2 (Bind b) v) (CHead d2 (Bind b) v))) c2 (getl_refl b c2 v)) b0 H5) w H4)))) H3)) H2))) | (S n) \Rightarrow (\lambda (H1: (getl (S n) (CHead c1 (Bind b) v) (CHead d1 (Bind b0) w))).(let H_x \def (H b0 d1 w (r (Bind b) n) (getl_gen_S (Bind b) c1 (CHead d1 (Bind b0) w) v n H1)) in (let H2 \def H_x in (ex_ind C (\lambda (d2: C).(getl (r (Bind b) n) c2 (CHead d2 (Bind b0) w))) (ex C (\lambda (d2: C).(getl (S n) (CHead c2 (Bind b) v) (CHead d2 (Bind b0) w)))) (\lambda (x: C).(\lambda (H3: (getl (r (Bind b) n) c2 (CHead x (Bind b0) w))).(ex_intro C (\lambda (d2: C).(getl (S n) (CHead c2 (Bind b) v) (CHead d2 (Bind b0) w))) x (getl_head (Bind b) n c2 (CHead x (Bind b0) w) H3 v)))) H2))))]) H0)))))))))). theorem getl_mono: \forall (c: C).(\forall (x1: C).(\forall (h: nat).((getl h c x1) \to (\forall (x2: C).((getl h c x2) \to (eq C x1 x2)))))) @@ -936,12 +936,12 @@ theorem getl_mono: theorem getl_clear_conf: \forall (i: nat).(\forall (c1: C).(\forall (c3: C).((getl i c1 c3) \to (\forall (c2: C).((clear c1 c2) \to (getl i c2 c3)))))) \def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (c3: C).((getl n c1 c3) \to (\forall (c2: C).((clear c1 c2) \to (getl n c2 c3))))))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H: (getl O c1 c3)).(\lambda (c2: C).(\lambda (H0: (clear c1 c2)).(eq_ind C c3 (\lambda (c: C).(getl O c c3)) (let H1 \def (clear_gen_all c1 c3 (getl_gen_O c1 c3 H)) in (ex_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(eq C c3 (CHead e (Bind b) u))))) (getl O c3 c3) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H2: (eq C c3 (CHead x1 (Bind x0) x2))).(let H3 \def (eq_ind C c3 (\lambda (c: C).(clear c1 c)) (getl_gen_O c1 c3 H) (CHead x1 (Bind x0) x2) H2) in (eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c: C).(getl O c c)) (getl_refl x0 x1 x2) c3 H2)))))) H1)) c2 (clear_mono c1 c3 (getl_gen_O c1 c3 H) c2 H0))))))) (\lambda (n: nat).(\lambda (_: ((\forall (c1: C).(\forall (c3: C).((getl n c1 c3) \to (\forall (c2: C).((clear c1 c2) \to (getl n c2 c3)))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c3: C).((getl (S n) c c3) \to (\forall (c2: C).((clear c c2) \to (getl (S n) c2 c3)))))) (\lambda (n0: nat).(\lambda (c3: C).(\lambda (H0: (getl (S n) (CSort n0) c3)).(\lambda (c2: C).(\lambda (_: (clear (CSort n0) c2)).(getl_gen_sort n0 (S n) c3 H0 (getl (S n) c2 c3))))))) (\lambda (c: C).(\lambda (H0: ((\forall (c3: C).((getl (S n) c c3) \to (\forall (c2: C).((clear c c2) \to (getl (S n) c2 c3))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: C).(\lambda (H1: (getl (S n) (CHead c k t) c3)).(\lambda (c2: C).(\lambda (H2: (clear (CHead c k t) c2)).((match k return (\lambda (_: ?).(\lambda (k0: K).((getl (S n) (CHead c k0 t) c3) \to ((clear (CHead c k0 t) c2) \to (getl (S n) c2 c3))))) with [(Bind b) \Rightarrow (\lambda (H3: (getl (S n) (CHead c (Bind b) t) c3)).(\lambda (H4: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: C).(getl (S n) c0 c3)) (getl_head (Bind b) n c c3 (getl_gen_S (Bind b) c c3 t n H3) t) c2 (clear_gen_bind b c c2 t H4)))) | (Flat f) \Rightarrow (\lambda (H3: (getl (S n) (CHead c (Flat f) t) c3)).(\lambda (H4: (clear (CHead c (Flat f) t) c2)).(H0 c3 (getl_gen_S (Flat f) c c3 t n H3) c2 (clear_gen_flat f c c2 t H4))))]) H1 H2))))))))) c1)))) i). + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (c3: C).((getl n c1 c3) \to (\forall (c2: C).((clear c1 c2) \to (getl n c2 c3))))))) (\lambda (c1: C).(\lambda (c3: C).(\lambda (H: (getl O c1 c3)).(\lambda (c2: C).(\lambda (H0: (clear c1 c2)).(eq_ind C c3 (\lambda (c: C).(getl O c c3)) (let H1 \def (clear_gen_all c1 c3 (getl_gen_O c1 c3 H)) in (ex_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(eq C c3 (CHead e (Bind b) u))))) (getl O c3 c3) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (H2: (eq C c3 (CHead x1 (Bind x0) x2))).(let H3 \def (eq_ind C c3 (\lambda (c: C).(clear c1 c)) (getl_gen_O c1 c3 H) (CHead x1 (Bind x0) x2) H2) in (eq_ind_r C (CHead x1 (Bind x0) x2) (\lambda (c: C).(getl O c c)) (getl_refl x0 x1 x2) c3 H2)))))) H1)) c2 (clear_mono c1 c3 (getl_gen_O c1 c3 H) c2 H0))))))) (\lambda (n: nat).(\lambda (_: ((\forall (c1: C).(\forall (c3: C).((getl n c1 c3) \to (\forall (c2: C).((clear c1 c2) \to (getl n c2 c3)))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c3: C).((getl (S n) c c3) \to (\forall (c2: C).((clear c c2) \to (getl (S n) c2 c3)))))) (\lambda (n0: nat).(\lambda (c3: C).(\lambda (H0: (getl (S n) (CSort n0) c3)).(\lambda (c2: C).(\lambda (_: (clear (CSort n0) c2)).(getl_gen_sort n0 (S n) c3 H0 (getl (S n) c2 c3))))))) (\lambda (c: C).(\lambda (H0: ((\forall (c3: C).((getl (S n) c c3) \to (\forall (c2: C).((clear c c2) \to (getl (S n) c2 c3))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: C).(\lambda (H1: (getl (S n) (CHead c k t) c3)).(\lambda (c2: C).(\lambda (H2: (clear (CHead c k t) c2)).((match k return (\lambda (k0: K).((getl (S n) (CHead c k0 t) c3) \to ((clear (CHead c k0 t) c2) \to (getl (S n) c2 c3)))) with [(Bind b) \Rightarrow (\lambda (H3: (getl (S n) (CHead c (Bind b) t) c3)).(\lambda (H4: (clear (CHead c (Bind b) t) c2)).(eq_ind_r C (CHead c (Bind b) t) (\lambda (c0: C).(getl (S n) c0 c3)) (getl_head (Bind b) n c c3 (getl_gen_S (Bind b) c c3 t n H3) t) c2 (clear_gen_bind b c c2 t H4)))) | (Flat f) \Rightarrow (\lambda (H3: (getl (S n) (CHead c (Flat f) t) c3)).(\lambda (H4: (clear (CHead c (Flat f) t) c2)).(H0 c3 (getl_gen_S (Flat f) c c3 t n H3) c2 (clear_gen_flat f c c2 t H4))))]) H1 H2))))))))) c1)))) i). theorem getl_drop_conf_lt: \forall (b: B).(\forall (c: C).(\forall (c0: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead c0 (Bind b) u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i d)) c e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c0 e0))))))))))))) \def - \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (c1: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead c1 (Bind b) u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i d)) c0 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (getl i (CSort n) (CHead c0 (Bind b) u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (_: (drop h (S (plus i d)) (CSort n) e)).(getl_gen_sort n i (CHead c0 (Bind b) u) H (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c0 e0)))))))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (c1: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead c1 (Bind b) u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i d)) c0 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i (CHead c0 k t) (CHead c1 (Bind b) u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (drop h (S (plus i d)) (CHead c0 k t) e)).(let H2 \def (getl_gen_all (CHead c0 k t) (CHead c1 (Bind b) u) i H0) in (ex2_ind C (\lambda (e0: C).(drop i O (CHead c0 k t) e0)) (\lambda (e0: C).(clear e0 (CHead c1 (Bind b) u))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x: C).(\lambda (H3: (drop i O (CHead c0 k t) x)).(\lambda (H4: (clear x (CHead c1 (Bind b) u))).((match x return (\lambda (_: ?).(\lambda (c2: C).((drop i O (CHead c0 k t) c2) \to ((clear c2 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))))))) with [(CSort n) \Rightarrow (\lambda (_: (drop i O (CHead c0 k t) (CSort n))).(\lambda (H6: (clear (CSort n) (CHead c1 (Bind b) u))).(clear_gen_sort (CHead c1 (Bind b) u) n H6 (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) | (CHead c2 k0 t0) \Rightarrow (\lambda (H5: (drop i O (CHead c0 k t) (CHead c2 k0 t0))).(\lambda (H6: (clear (CHead c2 k0 t0) (CHead c1 (Bind b) u))).((match k0 return (\lambda (_: ?).(\lambda (k1: K).((drop i O (CHead c0 k t) (CHead c2 k1 t0)) \to ((clear (CHead c2 k1 t0) (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))))))) with [(Bind b0) \Rightarrow (\lambda (H7: (drop i O (CHead c0 k t) (CHead c2 (Bind b0) t0))).(\lambda (H8: (clear (CHead c2 (Bind b0) t0) (CHead c1 (Bind b) u))).(let H9 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind b) u) (CHead c2 (Bind b0) t0) (clear_gen_bind b0 c2 (CHead c1 (Bind b) u) t0 H8)) in ((let H10 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c1 (Bind b) u) (CHead c2 (Bind b0) t0) (clear_gen_bind b0 c2 (CHead c1 (Bind b) u) t0 H8)) in ((let H11 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind b) u) (CHead c2 (Bind b0) t0) (clear_gen_bind b0 c2 (CHead c1 (Bind b) u) t0 H8)) in (\lambda (H12: (eq B b b0)).(\lambda (H13: (eq C c1 c2)).(let H14 \def (eq_ind_r T t0 (\lambda (t0: T).(drop i O (CHead c0 k t) (CHead c2 (Bind b0) t0))) H7 u H11) in (let H15 \def (eq_ind_r B b0 (\lambda (b: B).(drop i O (CHead c0 k t) (CHead c2 (Bind b) u))) H14 b H12) in (let H16 \def (eq_ind_r C c2 (\lambda (c: C).(drop i O (CHead c0 k t) (CHead c (Bind b) u))) H15 c1 H13) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r (Bind b) d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i O e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r (Bind b) d) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (H17: (eq T u (lift h (r (Bind b) d) x0))).(\lambda (H18: (drop i O e (CHead x1 (Bind b) x0))).(\lambda (H19: (drop h (r (Bind b) d) c1 x1)).(eq_ind_r T (lift h (r (Bind b) d) x0) (\lambda (t1: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h (r (Bind b) d) x0) (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) x0 x1 (refl_equal T (lift h d x0)) (getl_intro i e (CHead x1 (Bind b) x0) (CHead x1 (Bind b) x0) H18 (clear_bind b x1 x0)) H19) u H17)))))) (drop_conf_lt (Bind b) i u c1 (CHead c0 k t) H16 e h d H1)))))))) H10)) H9)))) | (Flat f) \Rightarrow (\lambda (H7: (drop i O (CHead c0 k t) (CHead c2 (Flat f) t0))).(\lambda (H8: (clear (CHead c2 (Flat f) t0) (CHead c1 (Bind b) u))).((match i return (\lambda (_: ?).(\lambda (n: nat).((drop h (S (plus n d)) (CHead c0 k t) e) \to ((drop n O (CHead c0 k t) (CHead c2 (Flat f) t0)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl n e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))))))) with [O \Rightarrow (\lambda (H9: (drop h (S (plus O d)) (CHead c0 k t) e)).(\lambda (H10: (drop O O (CHead c0 k t) (CHead c2 (Flat f) t0))).(let H11 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k t) (CHead c2 (Flat f) t0) (drop_gen_refl (CHead c0 k t) (CHead c2 (Flat f) t0) H10)) in ((let H12 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c0 k t) (CHead c2 (Flat f) t0) (drop_gen_refl (CHead c0 k t) (CHead c2 (Flat f) t0) H10)) in ((let H13 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead c0 k t) (CHead c2 (Flat f) t0) (drop_gen_refl (CHead c0 k t) (CHead c2 (Flat f) t0) H10)) in (\lambda (H14: (eq K k (Flat f))).(\lambda (H15: (eq C c0 c2)).(let H16 \def (eq_ind_r C c2 (\lambda (c: C).(clear c (CHead c1 (Bind b) u))) (clear_gen_flat f c2 (CHead c1 (Bind b) u) t0 H8) c0 H15) in (let H17 \def (eq_ind K k (\lambda (k: K).(drop h (S (plus O d)) (CHead c0 k t) e)) H9 (Flat f) H14) in (ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) (plus O d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat f) (plus O d)) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H18: (eq C e (CHead x0 (Flat f) x1))).(\lambda (H19: (eq T t (lift h (r (Flat f) (plus O d)) x1))).(\lambda (H20: (drop h (r (Flat f) (plus O d)) c0 x0)).(let H21 \def (f_equal T T (\lambda (e0: T).e0) t (lift h (r (Flat f) (plus O d)) x1) H19) in (eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c3: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O c3 (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (let H22 \def (H c1 u O (getl_intro O c0 (CHead c1 (Bind b) u) c0 (drop_refl c0) H16) x0 h d H20) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O x0 (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x0 (Flat f) x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H23: (eq T u (lift h d x2))).(\lambda (H24: (getl O x0 (CHead x3 (Bind b) x2))).(\lambda (H25: (drop h d c1 x3)).(let H26 \def (eq_ind T u (\lambda (t: T).(clear c0 (CHead c1 (Bind b) t))) H16 (lift h d x2) H23) in (eq_ind_r T (lift h d x2) (\lambda (t1: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x0 (Flat f) x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h d x2) (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x0 (Flat f) x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) x2 x3 (refl_equal T (lift h d x2)) (getl_flat x0 (CHead x3 (Bind b) x2) O H24 f x1) H25) u H23))))))) H22)) e H18))))))) (drop_gen_skip_l c0 e t h (plus O d) (Flat f) H17))))))) H12)) H11)))) | (S n) \Rightarrow (\lambda (H9: (drop h (S (plus (S n) d)) (CHead c0 k t) e)).(\lambda (H10: (drop (S n) O (CHead c0 k t) (CHead c2 (Flat f) t0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k (plus (S n) d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k (plus (S n) d)) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H11: (eq C e (CHead x0 k x1))).(\lambda (H12: (eq T t (lift h (r k (plus (S n) d)) x1))).(\lambda (H13: (drop h (r k (plus (S n) d)) c0 x0)).(let H14 \def (f_equal T T (\lambda (e0: T).e0) t (lift h (r k (plus (S n) d)) x1) H12) in (eq_ind_r C (CHead x0 k x1) (\lambda (c3: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) c3 (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (let H15 \def (eq_ind nat (r k (plus (S n) d)) (\lambda (n: nat).(drop h n c0 x0)) H13 (plus (r k (S n)) d) (r_plus k (S n) d)) in (let H16 \def (eq_ind nat (r k (S n)) (\lambda (n: nat).(drop h (plus n d) c0 x0)) H15 (S (r k n)) (r_S k n)) in (let H17 \def (H c1 u (r k n) (getl_intro (r k n) c0 (CHead c1 (Bind b) u) (CHead c2 (Flat f) t0) (drop_gen_drop k c0 (CHead c2 (Flat f) t0) t n H10) (clear_flat c2 (CHead c1 (Bind b) u) (clear_gen_flat f c2 (CHead c1 (Bind b) u) t0 H8) f t0)) x0 h d H16) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (r k n) x0 (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) (CHead x0 k x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H18: (eq T u (lift h d x2))).(\lambda (H19: (getl (r k n) x0 (CHead x3 (Bind b) x2))).(\lambda (H20: (drop h d c1 x3)).(let H21 \def (eq_ind T u (\lambda (t: T).(clear c2 (CHead c1 (Bind b) t))) (clear_gen_flat f c2 (CHead c1 (Bind b) u) t0 H8) (lift h d x2) H18) in (eq_ind_r T (lift h d x2) (\lambda (t1: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) (CHead x0 k x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h d x2) (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) (CHead x0 k x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) x2 x3 (refl_equal T (lift h d x2)) (getl_head k n x0 (CHead x3 (Bind b) x2) H19 x1) H20) u H18))))))) H17)))) e H11))))))) (drop_gen_skip_l c0 e t h (plus (S n) d) k H9))))]) H1 H7)))]) H5 H6)))]) H3 H4)))) H2)))))))))))))) c)). + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (c1: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead c1 (Bind b) u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i d)) c0 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (getl i (CSort n) (CHead c0 (Bind b) u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (_: (drop h (S (plus i d)) (CSort n) e)).(getl_gen_sort n i (CHead c0 (Bind b) u) H (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c0 e0)))))))))))))) (\lambda (c0: C).(\lambda (H: ((\forall (c1: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead c1 (Bind b) u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i d)) c0 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i (CHead c0 k t) (CHead c1 (Bind b) u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (drop h (S (plus i d)) (CHead c0 k t) e)).(let H2 \def (getl_gen_all (CHead c0 k t) (CHead c1 (Bind b) u) i H0) in (ex2_ind C (\lambda (e0: C).(drop i O (CHead c0 k t) e0)) (\lambda (e0: C).(clear e0 (CHead c1 (Bind b) u))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x: C).(\lambda (H3: (drop i O (CHead c0 k t) x)).(\lambda (H4: (clear x (CHead c1 (Bind b) u))).((match x return (\lambda (c2: C).((drop i O (CHead c0 k t) c2) \to ((clear c2 (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) with [(CSort n) \Rightarrow (\lambda (_: (drop i O (CHead c0 k t) (CSort n))).(\lambda (H6: (clear (CSort n) (CHead c1 (Bind b) u))).(clear_gen_sort (CHead c1 (Bind b) u) n H6 (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) | (CHead c2 k0 t0) \Rightarrow (\lambda (H5: (drop i O (CHead c0 k t) (CHead c2 k0 t0))).(\lambda (H6: (clear (CHead c2 k0 t0) (CHead c1 (Bind b) u))).((match k0 return (\lambda (k1: K).((drop i O (CHead c0 k t) (CHead c2 k1 t0)) \to ((clear (CHead c2 k1 t0) (CHead c1 (Bind b) u)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) with [(Bind b0) \Rightarrow (\lambda (H7: (drop i O (CHead c0 k t) (CHead c2 (Bind b0) t0))).(\lambda (H8: (clear (CHead c2 (Bind b0) t0) (CHead c1 (Bind b) u))).(let H9 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind b) u) (CHead c2 (Bind b0) t0) (clear_gen_bind b0 c2 (CHead c1 (Bind b) u) t0 H8)) in ((let H10 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (CHead c1 (Bind b) u) (CHead c2 (Bind b0) t0) (clear_gen_bind b0 c2 (CHead c1 (Bind b) u) t0 H8)) in ((let H11 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind b) u) (CHead c2 (Bind b0) t0) (clear_gen_bind b0 c2 (CHead c1 (Bind b) u) t0 H8)) in (\lambda (H12: (eq B b b0)).(\lambda (H13: (eq C c1 c2)).(let H14 \def (eq_ind_r T t0 (\lambda (t0: T).(drop i O (CHead c0 k t) (CHead c2 (Bind b0) t0))) H7 u H11) in (let H15 \def (eq_ind_r B b0 (\lambda (b: B).(drop i O (CHead c0 k t) (CHead c2 (Bind b) u))) H14 b H12) in (let H16 \def (eq_ind_r C c2 (\lambda (c: C).(drop i O (CHead c0 k t) (CHead c (Bind b) u))) H15 c1 H13) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r (Bind b) d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop i O e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r (Bind b) d) c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (H17: (eq T u (lift h (r (Bind b) d) x0))).(\lambda (H18: (drop i O e (CHead x1 (Bind b) x0))).(\lambda (H19: (drop h (r (Bind b) d) c1 x1)).(eq_ind_r T (lift h (r (Bind b) d) x0) (\lambda (t1: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h (r (Bind b) d) x0) (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) x0 x1 (refl_equal T (lift h d x0)) (getl_intro i e (CHead x1 (Bind b) x0) (CHead x1 (Bind b) x0) H18 (clear_bind b x1 x0)) H19) u H17)))))) (drop_conf_lt (Bind b) i u c1 (CHead c0 k t) H16 e h d H1)))))))) H10)) H9)))) | (Flat f) \Rightarrow (\lambda (H7: (drop i O (CHead c0 k t) (CHead c2 (Flat f) t0))).(\lambda (H8: (clear (CHead c2 (Flat f) t0) (CHead c1 (Bind b) u))).((match i return (\lambda (n: nat).((drop h (S (plus n d)) (CHead c0 k t) e) \to ((drop n O (CHead c0 k t) (CHead c2 (Flat f) t0)) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl n e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))))) with [O \Rightarrow (\lambda (H9: (drop h (S (plus O d)) (CHead c0 k t) e)).(\lambda (H10: (drop O O (CHead c0 k t) (CHead c2 (Flat f) t0))).(let H11 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k t) (CHead c2 (Flat f) t0) (drop_gen_refl (CHead c0 k t) (CHead c2 (Flat f) t0) H10)) in ((let H12 \def (f_equal C K (\lambda (e0: C).(match e0 return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c0 k t) (CHead c2 (Flat f) t0) (drop_gen_refl (CHead c0 k t) (CHead c2 (Flat f) t0) H10)) in ((let H13 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead c0 k t) (CHead c2 (Flat f) t0) (drop_gen_refl (CHead c0 k t) (CHead c2 (Flat f) t0) H10)) in (\lambda (H14: (eq K k (Flat f))).(\lambda (H15: (eq C c0 c2)).(let H16 \def (eq_ind_r C c2 (\lambda (c: C).(clear c (CHead c1 (Bind b) u))) (clear_gen_flat f c2 (CHead c1 (Bind b) u) t0 H8) c0 H15) in (let H17 \def (eq_ind K k (\lambda (k: K).(drop h (S (plus O d)) (CHead c0 k t) e)) H9 (Flat f) H14) in (ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) (plus O d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat f) (plus O d)) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H18: (eq C e (CHead x0 (Flat f) x1))).(\lambda (H19: (eq T t (lift h (r (Flat f) (plus O d)) x1))).(\lambda (H20: (drop h (r (Flat f) (plus O d)) c0 x0)).(let H21 \def (f_equal T T (\lambda (e0: T).e0) t (lift h (r (Flat f) (plus O d)) x1) H19) in (eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c3: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O c3 (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (let H22 \def (H c1 u O (getl_intro O c0 (CHead c1 (Bind b) u) c0 (drop_refl c0) H16) x0 h d H20) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O x0 (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x0 (Flat f) x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H23: (eq T u (lift h d x2))).(\lambda (H24: (getl O x0 (CHead x3 (Bind b) x2))).(\lambda (H25: (drop h d c1 x3)).(let H26 \def (eq_ind T u (\lambda (t: T).(clear c0 (CHead c1 (Bind b) t))) H16 (lift h d x2) H23) in (eq_ind_r T (lift h d x2) (\lambda (t1: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x0 (Flat f) x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h d x2) (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl O (CHead x0 (Flat f) x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) x2 x3 (refl_equal T (lift h d x2)) (getl_flat x0 (CHead x3 (Bind b) x2) O H24 f x1) H25) u H23))))))) H22)) e H18))))))) (drop_gen_skip_l c0 e t h (plus O d) (Flat f) H17))))))) H12)) H11)))) | (S n) \Rightarrow (\lambda (H9: (drop h (S (plus (S n) d)) (CHead c0 k t) e)).(\lambda (H10: (drop (S n) O (CHead c0 k t) (CHead c2 (Flat f) t0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k (plus (S n) d)) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k (plus (S n) d)) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) e (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H11: (eq C e (CHead x0 k x1))).(\lambda (H12: (eq T t (lift h (r k (plus (S n) d)) x1))).(\lambda (H13: (drop h (r k (plus (S n) d)) c0 x0)).(let H14 \def (f_equal T T (\lambda (e0: T).e0) t (lift h (r k (plus (S n) d)) x1) H12) in (eq_ind_r C (CHead x0 k x1) (\lambda (c3: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) c3 (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (let H15 \def (eq_ind nat (r k (plus (S n) d)) (\lambda (n: nat).(drop h n c0 x0)) H13 (plus (r k (S n)) d) (r_plus k (S n) d)) in (let H16 \def (eq_ind nat (r k (S n)) (\lambda (n: nat).(drop h (plus n d) c0 x0)) H15 (S (r k n)) (r_S k n)) in (let H17 \def (H c1 u (r k n) (getl_intro (r k n) c0 (CHead c1 (Bind b) u) (CHead c2 (Flat f) t0) (drop_gen_drop k c0 (CHead c2 (Flat f) t0) t n H10) (clear_flat c2 (CHead c1 (Bind b) u) (clear_gen_flat f c2 (CHead c1 (Bind b) u) t0 H8) f t0)) x0 h d H16) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (r k n) x0 (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) (CHead x0 k x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H18: (eq T u (lift h d x2))).(\lambda (H19: (getl (r k n) x0 (CHead x3 (Bind b) x2))).(\lambda (H20: (drop h d c1 x3)).(let H21 \def (eq_ind T u (\lambda (t: T).(clear c2 (CHead c1 (Bind b) t))) (clear_gen_flat f c2 (CHead c1 (Bind b) u) t0 H8) (lift h d x2) H18) in (eq_ind_r T (lift h d x2) (\lambda (t1: T).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T t1 (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) (CHead x0 k x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T (lift h d x2) (lift h d v)))) (\lambda (v: T).(\lambda (e0: C).(getl (S n) (CHead x0 k x1) (CHead e0 (Bind b) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h d c1 e0))) x2 x3 (refl_equal T (lift h d x2)) (getl_head k n x0 (CHead x3 (Bind b) x2) H19 x1) H20) u H18))))))) H17)))) e H11))))))) (drop_gen_skip_l c0 e t h (plus (S n) d) k H9))))]) H1 H7)))]) H5 H6)))]) H3 H4)))) H2)))))))))))))) c)). theorem getl_drop_conf_ge: \forall (i: nat).(\forall (a: C).(\forall (c: C).((getl i c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le (plus d h) i) \to (getl (minus i h) e a))))))))) @@ -986,12 +986,12 @@ theorem getl_drop_trans: theorem getl_trans: \forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((getl h c1 c2) \to (\forall (e2: C).((getl i c2 e2) \to (getl (plus i h) c1 e2))))))) \def - \lambda (i: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H: (getl h c1 c2)).(\lambda (e2: C).(\lambda (H0: (getl i c2 e2)).(let H1 \def (getl_gen_all c2 e2 i H0) in (ex2_ind C (\lambda (e: C).(drop i O c2 e)) (\lambda (e: C).(clear e e2)) (getl (plus i h) c1 e2) (\lambda (x: C).(\lambda (H2: (drop i O c2 x)).(\lambda (H3: (clear x e2)).((match i return (\lambda (_: ?).(\lambda (n: nat).((drop n O c2 x) \to (getl (plus n h) c1 e2)))) with [O \Rightarrow (\lambda (H4: (drop O O c2 x)).(let H5 \def (eq_ind_r C x (\lambda (c: C).(clear c e2)) H3 c2 (drop_gen_refl c2 x H4)) in (getl_clear_trans (plus O h) c1 c2 H e2 H5))) | (S n) \Rightarrow (\lambda (H4: (drop (S n) O c2 x)).(let H_y \def (getl_drop_trans c1 c2 h H x n H4) in (getl_intro (plus (S n) h) c1 e2 x H_y H3)))]) H2)))) H1)))))))). + \lambda (i: nat).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (H: (getl h c1 c2)).(\lambda (e2: C).(\lambda (H0: (getl i c2 e2)).(let H1 \def (getl_gen_all c2 e2 i H0) in (ex2_ind C (\lambda (e: C).(drop i O c2 e)) (\lambda (e: C).(clear e e2)) (getl (plus i h) c1 e2) (\lambda (x: C).(\lambda (H2: (drop i O c2 x)).(\lambda (H3: (clear x e2)).((match i return (\lambda (n: nat).((drop n O c2 x) \to (getl (plus n h) c1 e2))) with [O \Rightarrow (\lambda (H4: (drop O O c2 x)).(let H5 \def (eq_ind_r C x (\lambda (c: C).(clear c e2)) H3 c2 (drop_gen_refl c2 x H4)) in (getl_clear_trans (plus O h) c1 c2 H e2 H5))) | (S n) \Rightarrow (\lambda (H4: (drop (S n) O c2 x)).(let H_y \def (getl_drop_trans c1 c2 h H x n H4) in (getl_intro (plus (S n) h) c1 e2 x H_y H3)))]) H2)))) H1)))))))). theorem drop1_getl_trans: \forall (hds: PList).(\forall (c1: C).(\forall (c2: C).((drop1 hds c2 c1) \to (\forall (b: B).(\forall (e1: C).(\forall (v: T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to (ex C (\lambda (e2: C).(getl (trans hds i) c2 (CHead e2 (Bind b) (ctrans hds i v))))))))))))) \def - \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c1: C).(\forall (c2: C).((drop1 p c2 c1) \to (\forall (b: B).(\forall (e1: C).(\forall (v: T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to (ex C (\lambda (e2: C).(getl (trans p i) c2 (CHead e2 (Bind b) (ctrans p i v)))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (drop1 PNil c2 c1)).(\lambda (b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl i c1 (CHead e1 (Bind b) v))).(let H1 \def (match H return (\lambda (_: ?).(\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p PNil) \to ((eq C c c2) \to ((eq C c0 c1) \to (ex C (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) v))))))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c c2)).(\lambda (H3: (eq C c c1)).(eq_ind C c2 (\lambda (c0: C).((eq C c0 c1) \to (ex C (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) v)))))) (\lambda (H4: (eq C c2 c1)).(eq_ind C c1 (\lambda (c0: C).(ex C (\lambda (e2: C).(getl i c0 (CHead e2 (Bind b) v))))) (ex_intro C (\lambda (e2: C).(getl i c1 (CHead e2 (Bind b) v))) e1 H0) c2 (sym_eq C c2 c1 H4))) c (sym_eq C c c2 H2) H3)))) | (drop1_cons c0 c3 h d H1 c4 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: (eq C c0 c2)).(\lambda (H5: (eq C c4 c1)).((let H6 \def (eq_ind PList (PCons h d hds) (\lambda (e: PList).(match e return (\lambda (_: ?).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c0 c2) \to ((eq C c4 c1) \to ((drop h d c0 c3) \to ((drop1 hds c3 c4) \to (ex C (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) v)))))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c2) (refl_equal C c1))))))))))) (\lambda (h: nat).(\lambda (d: nat).(\lambda (hds0: PList).(\lambda (H: ((\forall (c1: C).(\forall (c2: C).((drop1 hds0 c2 c1) \to (\forall (b: B).(\forall (e1: C).(\forall (v: T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to (ex C (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (ctrans hds0 i v))))))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H0: (drop1 (PCons h d hds0) c2 c1)).(\lambda (b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H1: (getl i c1 (CHead e1 (Bind b) v))).(let H2 \def (match H0 return (\lambda (_: ?).(\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p (PCons h d hds0)) \to ((eq C c c2) \to ((eq C c0 c1) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)])))))))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil (PCons h d hds0))).(\lambda (H3: (eq C c c2)).(\lambda (H4: (eq C c c1)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e return (\lambda (_: ?).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons h d hds0) H2) in (False_ind ((eq C c c2) \to ((eq C c c1) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)]))))))) H5)) H3 H4)))) | (drop1_cons c0 c3 h0 d0 H2 c4 hds0 H3) \Rightarrow (\lambda (H4: (eq PList (PCons h0 d0 hds0) (PCons h d hds0))).(\lambda (H5: (eq C c0 c2)).(\lambda (H6: (eq C c4 c1)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e return (\lambda (_: ?).PList) with [PNil \Rightarrow hds0 | (PCons _ _ p) \Rightarrow p])) (PCons h0 d0 hds0) (PCons h d hds0) H4) in ((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: ?).nat) with [PNil \Rightarrow d0 | (PCons _ n _) \Rightarrow n])) (PCons h0 d0 hds0) (PCons h d hds0) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: ?).nat) with [PNil \Rightarrow h0 | (PCons n _ _) \Rightarrow n])) (PCons h0 d0 hds0) (PCons h d hds0) H4) in (eq_ind nat h (\lambda (n: nat).((eq nat d0 d) \to ((eq PList hds0 hds0) \to ((eq C c0 c2) \to ((eq C c4 c1) \to ((drop n d0 c0 c3) \to ((drop1 hds0 c3 c4) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)])))))))))))) (\lambda (H10: (eq nat d0 d)).(eq_ind nat d (\lambda (n: nat).((eq PList hds0 hds0) \to ((eq C c0 c2) \to ((eq C c4 c1) \to ((drop h n c0 c3) \to ((drop1 hds0 c3 c4) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)]))))))))))) (\lambda (H11: (eq PList hds0 hds0)).(eq_ind PList hds0 (\lambda (p: PList).((eq C c0 c2) \to ((eq C c4 c1) \to ((drop h d c0 c3) \to ((drop1 p c3 c4) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)])))))))))) (\lambda (H12: (eq C c0 c2)).(eq_ind C c2 (\lambda (c: C).((eq C c4 c1) \to ((drop h d c c3) \to ((drop1 hds0 c3 c4) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)]))))))))) (\lambda (H13: (eq C c4 c1)).(eq_ind C c1 (\lambda (c: C).((drop h d c2 c3) \to ((drop1 hds0 c3 c) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)])))))))) (\lambda (H14: (drop h d c2 c3)).(\lambda (H15: (drop1 hds0 c3 c1)).(xinduction bool (blt (trans hds0 i) d) (\lambda (b0: bool).(ex C (\lambda (e2: C).(getl (match b0 with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match b0 with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)])))))) (\lambda (x_x: bool).(bool_ind (\lambda (b0: bool).((eq bool (blt (trans hds0 i) d) b0) \to (ex C (\lambda (e2: C).(getl (match b0 with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match b0 with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)]))))))) (\lambda (H0: (eq bool (blt (trans hds0 i) d) true)).(let H_x \def (H c1 c3 H15 b e1 v i H1) in (let H16 \def H_x in (ex_ind C (\lambda (e2: C).(getl (trans hds0 i) c3 (CHead e2 (Bind b) (ctrans hds0 i v)))) (ex C (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)))))) (\lambda (x: C).(\lambda (H17: (getl (trans hds0 i) c3 (CHead x (Bind b) (ctrans hds0 i v)))).(let H_x0 \def (drop_getl_trans_lt (trans hds0 i) d (le_S_n (S (trans hds0 i)) d (lt_le_S (S (trans hds0 i)) (S d) (blt_lt (S d) (S (trans hds0 i)) H0))) c2 c3 h H14 b x (ctrans hds0 i v) H17) in (let H \def H_x0 in (ex2_ind C (\lambda (e1: C).(getl (trans hds0 i) c2 (CHead e1 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v))))) (\lambda (e1: C).(drop h (minus d (S (trans hds0 i))) e1 x)) (ex C (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)))))) (\lambda (x0: C).(\lambda (H1: (getl (trans hds0 i) c2 (CHead x0 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v))))).(\lambda (_: (drop h (minus d (S (trans hds0 i))) x0 x)).(ex_intro C (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v))))) x0 H1)))) H))))) H16)))) (\lambda (H0: (eq bool (blt (trans hds0 i) d) false)).(let H_x \def (H c1 c3 H15 b e1 v i H1) in (let H16 \def H_x in (ex_ind C (\lambda (e2: C).(getl (trans hds0 i) c3 (CHead e2 (Bind b) (ctrans hds0 i v)))) (ex C (\lambda (e2: C).(getl (plus (trans hds0 i) h) c2 (CHead e2 (Bind b) (ctrans hds0 i v))))) (\lambda (x: C).(\lambda (H17: (getl (trans hds0 i) c3 (CHead x (Bind b) (ctrans hds0 i v)))).(let H \def (drop_getl_trans_ge (trans hds0 i) c2 c3 d h H14 (CHead x (Bind b) (ctrans hds0 i v)) H17) in (ex_intro C (\lambda (e2: C).(getl (plus (trans hds0 i) h) c2 (CHead e2 (Bind b) (ctrans hds0 i v)))) x (H (bge_le d (trans hds0 i) H0)))))) H16)))) x_x))))) c4 (sym_eq C c4 c1 H13))) c0 (sym_eq C c0 c2 H12))) hds0 (sym_eq PList hds0 hds0 H11))) d0 (sym_eq nat d0 d H10))) h0 (sym_eq nat h0 h H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons h d hds0)) (refl_equal C c2) (refl_equal C c1))))))))))))))) hds). + \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c1: C).(\forall (c2: C).((drop1 p c2 c1) \to (\forall (b: B).(\forall (e1: C).(\forall (v: T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to (ex C (\lambda (e2: C).(getl (trans p i) c2 (CHead e2 (Bind b) (ctrans p i v)))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (drop1 PNil c2 c1)).(\lambda (b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl i c1 (CHead e1 (Bind b) v))).(let H1 \def (match H return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p c c0)).((eq PList p PNil) \to ((eq C c c2) \to ((eq C c0 c1) \to (ex C (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) v))))))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c c2)).(\lambda (H3: (eq C c c1)).(eq_ind C c2 (\lambda (c0: C).((eq C c0 c1) \to (ex C (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) v)))))) (\lambda (H4: (eq C c2 c1)).(eq_ind C c1 (\lambda (c0: C).(ex C (\lambda (e2: C).(getl i c0 (CHead e2 (Bind b) v))))) (ex_intro C (\lambda (e2: C).(getl i c1 (CHead e2 (Bind b) v))) e1 H0) c2 (sym_eq C c2 c1 H4))) c (sym_eq C c c2 H2) H3)))) | (drop1_cons c0 c3 h d H1 c4 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: (eq C c0 c2)).(\lambda (H5: (eq C c4 c1)).((let H6 \def (eq_ind PList (PCons h d hds) (\lambda (e: PList).(match e return (\lambda (_: PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c0 c2) \to ((eq C c4 c1) \to ((drop h d c0 c3) \to ((drop1 hds c3 c4) \to (ex C (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) v)))))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c2) (refl_equal C c1))))))))))) (\lambda (h: nat).(\lambda (d: nat).(\lambda (hds0: PList).(\lambda (H: ((\forall (c1: C).(\forall (c2: C).((drop1 hds0 c2 c1) \to (\forall (b: B).(\forall (e1: C).(\forall (v: T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to (ex C (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (ctrans hds0 i v))))))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H0: (drop1 (PCons h d hds0) c2 c1)).(\lambda (b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H1: (getl i c1 (CHead e1 (Bind b) v))).(let H2 \def (match H0 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p c c0)).((eq PList p (PCons h d hds0)) \to ((eq C c c2) \to ((eq C c0 c1) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)])))))))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil (PCons h d hds0))).(\lambda (H3: (eq C c c2)).(\lambda (H4: (eq C c c1)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons h d hds0) H2) in (False_ind ((eq C c c2) \to ((eq C c c1) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)]))))))) H5)) H3 H4)))) | (drop1_cons c0 c3 h0 d0 H2 c4 hds0 H3) \Rightarrow (\lambda (H4: (eq PList (PCons h0 d0 hds0) (PCons h d hds0))).(\lambda (H5: (eq C c0 c2)).(\lambda (H6: (eq C c4 c1)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e return (\lambda (_: PList).PList) with [PNil \Rightarrow hds0 | (PCons _ _ p) \Rightarrow p])) (PCons h0 d0 hds0) (PCons h d hds0) H4) in ((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: PList).nat) with [PNil \Rightarrow d0 | (PCons _ n _) \Rightarrow n])) (PCons h0 d0 hds0) (PCons h d hds0) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: PList).nat) with [PNil \Rightarrow h0 | (PCons n _ _) \Rightarrow n])) (PCons h0 d0 hds0) (PCons h d hds0) H4) in (eq_ind nat h (\lambda (n: nat).((eq nat d0 d) \to ((eq PList hds0 hds0) \to ((eq C c0 c2) \to ((eq C c4 c1) \to ((drop n d0 c0 c3) \to ((drop1 hds0 c3 c4) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)])))))))))))) (\lambda (H10: (eq nat d0 d)).(eq_ind nat d (\lambda (n: nat).((eq PList hds0 hds0) \to ((eq C c0 c2) \to ((eq C c4 c1) \to ((drop h n c0 c3) \to ((drop1 hds0 c3 c4) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)]))))))))))) (\lambda (H11: (eq PList hds0 hds0)).(eq_ind PList hds0 (\lambda (p: PList).((eq C c0 c2) \to ((eq C c4 c1) \to ((drop h d c0 c3) \to ((drop1 p c3 c4) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)])))))))))) (\lambda (H12: (eq C c0 c2)).(eq_ind C c2 (\lambda (c: C).((eq C c4 c1) \to ((drop h d c c3) \to ((drop1 hds0 c3 c4) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)]))))))))) (\lambda (H13: (eq C c4 c1)).(eq_ind C c1 (\lambda (c: C).((drop h d c2 c3) \to ((drop1 hds0 c3 c) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)])))))))) (\lambda (H14: (drop h d c2 c3)).(\lambda (H15: (drop1 hds0 c3 c1)).(xinduction bool (blt (trans hds0 i) d) (\lambda (b0: bool).(ex C (\lambda (e2: C).(getl (match b0 with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match b0 with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)])))))) (\lambda (x_x: bool).(bool_ind (\lambda (b0: bool).((eq bool (blt (trans hds0 i) d) b0) \to (ex C (\lambda (e2: C).(getl (match b0 with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match b0 with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)]))))))) (\lambda (H0: (eq bool (blt (trans hds0 i) d) true)).(let H_x \def (H c1 c3 H15 b e1 v i H1) in (let H16 \def H_x in (ex_ind C (\lambda (e2: C).(getl (trans hds0 i) c3 (CHead e2 (Bind b) (ctrans hds0 i v)))) (ex C (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)))))) (\lambda (x: C).(\lambda (H17: (getl (trans hds0 i) c3 (CHead x (Bind b) (ctrans hds0 i v)))).(let H_x0 \def (drop_getl_trans_lt (trans hds0 i) d (le_S_n (S (trans hds0 i)) d (lt_le_S (S (trans hds0 i)) (S d) (blt_lt (S d) (S (trans hds0 i)) H0))) c2 c3 h H14 b x (ctrans hds0 i v) H17) in (let H \def H_x0 in (ex2_ind C (\lambda (e1: C).(getl (trans hds0 i) c2 (CHead e1 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v))))) (\lambda (e1: C).(drop h (minus d (S (trans hds0 i))) e1 x)) (ex C (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)))))) (\lambda (x0: C).(\lambda (H1: (getl (trans hds0 i) c2 (CHead x0 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v))))).(\lambda (_: (drop h (minus d (S (trans hds0 i))) x0 x)).(ex_intro C (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v))))) x0 H1)))) H))))) H16)))) (\lambda (H0: (eq bool (blt (trans hds0 i) d) false)).(let H_x \def (H c1 c3 H15 b e1 v i H1) in (let H16 \def H_x in (ex_ind C (\lambda (e2: C).(getl (trans hds0 i) c3 (CHead e2 (Bind b) (ctrans hds0 i v)))) (ex C (\lambda (e2: C).(getl (plus (trans hds0 i) h) c2 (CHead e2 (Bind b) (ctrans hds0 i v))))) (\lambda (x: C).(\lambda (H17: (getl (trans hds0 i) c3 (CHead x (Bind b) (ctrans hds0 i v)))).(let H \def (drop_getl_trans_ge (trans hds0 i) c2 c3 d h H14 (CHead x (Bind b) (ctrans hds0 i v)) H17) in (ex_intro C (\lambda (e2: C).(getl (plus (trans hds0 i) h) c2 (CHead e2 (Bind b) (ctrans hds0 i v)))) x (H (bge_le d (trans hds0 i) H0)))))) H16)))) x_x))))) c4 (sym_eq C c4 c1 H13))) c0 (sym_eq C c0 c2 H12))) hds0 (sym_eq PList hds0 hds0 H11))) d0 (sym_eq nat d0 d H10))) h0 (sym_eq nat h0 h H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons h d hds0)) (refl_equal C c2) (refl_equal C c1))))))))))))))) hds). theorem cimp_getl_conf: \forall (c1: C).(\forall (c2: C).((cimp c1 c2) \to (\forall (b: B).(\forall (d1: C).(\forall (w: T).(\forall (i: nat).((getl i c1 (CHead d1 (Bind b) w)) \to (ex2 C (\lambda (d2: C).(cimp d1 d2)) (\lambda (d2: C).(getl i c2 (CHead d2 (Bind b) w))))))))))) @@ -1007,22 +1007,22 @@ inductive subst0: nat \to (T \to (T \to (T \to Prop))) \def theorem subst0_gen_sort: \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst0 i v (TSort n) x) \to (\forall (P: Prop).P))))) \def - \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda (H: (subst0 i v (TSort n) x)).(\lambda (P: Prop).(let H0 \def (match H return (\lambda (_: ?).(\lambda (n0: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t1: T).((eq nat n0 i) \to ((eq T t v) \to ((eq T t0 (TSort n)) \to ((eq T t1 x) \to P))))))))) with [(subst0_lref v0 i0) \Rightarrow (\lambda (H0: (eq nat i0 i)).(\lambda (H1: (eq T v0 v)).(\lambda (H2: (eq T (TLRef i0) (TSort n))).(\lambda (H3: (eq T (lift (S i0) O v0) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (TLRef n0) (TSort n)) \to ((eq T (lift (S n0) O v0) x) \to P)))) (\lambda (H4: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (TLRef i) (TSort n)) \to ((eq T (lift (S i) O t) x) \to P))) (\lambda (H5: (eq T (TLRef i) (TSort n))).(let H6 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H5) in (False_ind ((eq T (lift (S i) O v) x) \to P) H6))) v0 (sym_eq T v0 v H4))) i0 (sym_eq nat i0 i H0) H1 H2 H3))))) | (subst0_fst v0 u2 u1 i0 H0 t k) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u1 t) (TSort n))).(\lambda (H4: (eq T (THead k u2 t) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t) (TSort n)) \to ((eq T (THead k u2 t) x) \to ((subst0 n0 v0 u1 u2) \to P))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq T (THead k u1 t) (TSort n)) \to ((eq T (THead k u2 t) x) \to ((subst0 i t0 u1 u2) \to P)))) (\lambda (H6: (eq T (THead k u1 t) (TSort n))).(let H7 \def (eq_ind T (THead k u1 t) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H6) in (False_ind ((eq T (THead k u2 t) x) \to ((subst0 i v u1 u2) \to P)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_snd k v0 t2 t1 i0 H0 u) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u t1) (TSort n))).(\lambda (H4: (eq T (THead k u t2) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u t1) (TSort n)) \to ((eq T (THead k u t2) x) \to ((subst0 (s k n0) v0 t1 t2) \to P))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k u t1) (TSort n)) \to ((eq T (THead k u t2) x) \to ((subst0 (s k i) t t1 t2) \to P)))) (\lambda (H6: (eq T (THead k u t1) (TSort n))).(let H7 \def (eq_ind T (THead k u t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H6) in (False_ind ((eq T (THead k u t2) x) \to ((subst0 (s k i) v t1 t2) \to P)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_both v0 u1 u2 i0 H0 k t1 t2 H1) \Rightarrow (\lambda (H2: (eq nat i0 i)).(\lambda (H3: (eq T v0 v)).(\lambda (H4: (eq T (THead k u1 t1) (TSort n))).(\lambda (H5: (eq T (THead k u2 t2) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t1) (TSort n)) \to ((eq T (THead k u2 t2) x) \to ((subst0 n0 v0 u1 u2) \to ((subst0 (s k n0) v0 t1 t2) \to P)))))) (\lambda (H6: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k u1 t1) (TSort n)) \to ((eq T (THead k u2 t2) x) \to ((subst0 i t u1 u2) \to ((subst0 (s k i) t t1 t2) \to P))))) (\lambda (H7: (eq T (THead k u1 t1) (TSort n))).(let H8 \def (eq_ind T (THead k u1 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H7) in (False_ind ((eq T (THead k u2 t2) x) \to ((subst0 i v u1 u2) \to ((subst0 (s k i) v t1 t2) \to P))) H8))) v0 (sym_eq T v0 v H6))) i0 (sym_eq nat i0 i H2) H3 H4 H5 H0 H1)))))]) in (H0 (refl_equal nat i) (refl_equal T v) (refl_equal T (TSort n)) (refl_equal T x)))))))). + \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda (H: (subst0 i v (TSort n) x)).(\lambda (P: Prop).(let H0 \def (match H return (\lambda (n0: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t1: T).(\lambda (_: (subst0 n0 t t0 t1)).((eq nat n0 i) \to ((eq T t v) \to ((eq T t0 (TSort n)) \to ((eq T t1 x) \to P))))))))) with [(subst0_lref v0 i0) \Rightarrow (\lambda (H0: (eq nat i0 i)).(\lambda (H1: (eq T v0 v)).(\lambda (H2: (eq T (TLRef i0) (TSort n))).(\lambda (H3: (eq T (lift (S i0) O v0) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (TLRef n0) (TSort n)) \to ((eq T (lift (S n0) O v0) x) \to P)))) (\lambda (H4: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (TLRef i) (TSort n)) \to ((eq T (lift (S i) O t) x) \to P))) (\lambda (H5: (eq T (TLRef i) (TSort n))).(let H6 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H5) in (False_ind ((eq T (lift (S i) O v) x) \to P) H6))) v0 (sym_eq T v0 v H4))) i0 (sym_eq nat i0 i H0) H1 H2 H3))))) | (subst0_fst v0 u2 u1 i0 H0 t k) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u1 t) (TSort n))).(\lambda (H4: (eq T (THead k u2 t) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t) (TSort n)) \to ((eq T (THead k u2 t) x) \to ((subst0 n0 v0 u1 u2) \to P))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq T (THead k u1 t) (TSort n)) \to ((eq T (THead k u2 t) x) \to ((subst0 i t0 u1 u2) \to P)))) (\lambda (H6: (eq T (THead k u1 t) (TSort n))).(let H7 \def (eq_ind T (THead k u1 t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H6) in (False_ind ((eq T (THead k u2 t) x) \to ((subst0 i v u1 u2) \to P)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_snd k v0 t2 t1 i0 H0 u) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u t1) (TSort n))).(\lambda (H4: (eq T (THead k u t2) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u t1) (TSort n)) \to ((eq T (THead k u t2) x) \to ((subst0 (s k n0) v0 t1 t2) \to P))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k u t1) (TSort n)) \to ((eq T (THead k u t2) x) \to ((subst0 (s k i) t t1 t2) \to P)))) (\lambda (H6: (eq T (THead k u t1) (TSort n))).(let H7 \def (eq_ind T (THead k u t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H6) in (False_ind ((eq T (THead k u t2) x) \to ((subst0 (s k i) v t1 t2) \to P)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_both v0 u1 u2 i0 H0 k t1 t2 H1) \Rightarrow (\lambda (H2: (eq nat i0 i)).(\lambda (H3: (eq T v0 v)).(\lambda (H4: (eq T (THead k u1 t1) (TSort n))).(\lambda (H5: (eq T (THead k u2 t2) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t1) (TSort n)) \to ((eq T (THead k u2 t2) x) \to ((subst0 n0 v0 u1 u2) \to ((subst0 (s k n0) v0 t1 t2) \to P)))))) (\lambda (H6: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k u1 t1) (TSort n)) \to ((eq T (THead k u2 t2) x) \to ((subst0 i t u1 u2) \to ((subst0 (s k i) t t1 t2) \to P))))) (\lambda (H7: (eq T (THead k u1 t1) (TSort n))).(let H8 \def (eq_ind T (THead k u1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H7) in (False_ind ((eq T (THead k u2 t2) x) \to ((subst0 i v u1 u2) \to ((subst0 (s k i) v t1 t2) \to P))) H8))) v0 (sym_eq T v0 v H6))) i0 (sym_eq nat i0 i H2) H3 H4 H5 H0 H1)))))]) in (H0 (refl_equal nat i) (refl_equal T v) (refl_equal T (TSort n)) (refl_equal T x)))))))). theorem subst0_gen_lref: \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst0 i v (TLRef n) x) \to (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: (subst0 i v (TLRef n) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (n0: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t1: T).((eq nat n0 i) \to ((eq T t v) \to ((eq T t0 (TLRef n)) \to ((eq T t1 x) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))))))))) with [(subst0_lref v0 i0) \Rightarrow (\lambda (H0: (eq nat i0 i)).(\lambda (H1: (eq T v0 v)).(\lambda (H2: (eq T (TLRef i0) (TLRef n))).(\lambda (H3: (eq T (lift (S i0) O v0) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (TLRef n0) (TLRef n)) \to ((eq T (lift (S n0) O v0) x) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))) (\lambda (H4: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O t) x) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))) (\lambda (H5: (eq T (TLRef i) (TLRef n))).(let H6 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H5) in (eq_ind nat n (\lambda (n0: nat).((eq T (lift (S n0) O v) x) \to (land (eq nat n n0) (eq T x (lift (S n) O v))))) (\lambda (H7: (eq T (lift (S n) O v) x)).(eq_ind T (lift (S n) O v) (\lambda (t: T).(land (eq nat n n) (eq T t (lift (S n) O v)))) (conj (eq nat n n) (eq T (lift (S n) O v) (lift (S n) O v)) (refl_equal nat n) (refl_equal T (lift (S n) O v))) x H7)) i (sym_eq nat i n H6)))) v0 (sym_eq T v0 v H4))) i0 (sym_eq nat i0 i H0) H1 H2 H3))))) | (subst0_fst v0 u2 u1 i0 H0 t k) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u1 t) (TLRef n))).(\lambda (H4: (eq T (THead k u2 t) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t) (TLRef n)) \to ((eq T (THead k u2 t) x) \to ((subst0 n0 v0 u1 u2) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq T (THead k u1 t) (TLRef n)) \to ((eq T (THead k u2 t) x) \to ((subst0 i t0 u1 u2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))) (\lambda (H6: (eq T (THead k u1 t) (TLRef n))).(let H7 \def (eq_ind T (THead k u1 t) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H6) in (False_ind ((eq T (THead k u2 t) x) \to ((subst0 i v u1 u2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_snd k v0 t2 t1 i0 H0 u) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u t1) (TLRef n))).(\lambda (H4: (eq T (THead k u t2) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u t1) (TLRef n)) \to ((eq T (THead k u t2) x) \to ((subst0 (s k n0) v0 t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k u t1) (TLRef n)) \to ((eq T (THead k u t2) x) \to ((subst0 (s k i) t t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))) (\lambda (H6: (eq T (THead k u t1) (TLRef n))).(let H7 \def (eq_ind T (THead k u t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H6) in (False_ind ((eq T (THead k u t2) x) \to ((subst0 (s k i) v t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_both v0 u1 u2 i0 H0 k t1 t2 H1) \Rightarrow (\lambda (H2: (eq nat i0 i)).(\lambda (H3: (eq T v0 v)).(\lambda (H4: (eq T (THead k u1 t1) (TLRef n))).(\lambda (H5: (eq T (THead k u2 t2) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t1) (TLRef n)) \to ((eq T (THead k u2 t2) x) \to ((subst0 n0 v0 u1 u2) \to ((subst0 (s k n0) v0 t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))))) (\lambda (H6: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k u1 t1) (TLRef n)) \to ((eq T (THead k u2 t2) x) \to ((subst0 i t u1 u2) \to ((subst0 (s k i) t t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))))) (\lambda (H7: (eq T (THead k u1 t1) (TLRef n))).(let H8 \def (eq_ind T (THead k u1 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H7) in (False_ind ((eq T (THead k u2 t2) x) \to ((subst0 i v u1 u2) \to ((subst0 (s k i) v t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))) H8))) v0 (sym_eq T v0 v H6))) i0 (sym_eq nat i0 i H2) H3 H4 H5 H0 H1)))))]) in (H0 (refl_equal nat i) (refl_equal T v) (refl_equal T (TLRef n)) (refl_equal T x))))))). + \lambda (v: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (n: nat).(\lambda (H: (subst0 i v (TLRef n) x)).(let H0 \def (match H return (\lambda (n0: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t1: T).(\lambda (_: (subst0 n0 t t0 t1)).((eq nat n0 i) \to ((eq T t v) \to ((eq T t0 (TLRef n)) \to ((eq T t1 x) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))))))))) with [(subst0_lref v0 i0) \Rightarrow (\lambda (H0: (eq nat i0 i)).(\lambda (H1: (eq T v0 v)).(\lambda (H2: (eq T (TLRef i0) (TLRef n))).(\lambda (H3: (eq T (lift (S i0) O v0) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (TLRef n0) (TLRef n)) \to ((eq T (lift (S n0) O v0) x) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))) (\lambda (H4: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O t) x) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))) (\lambda (H5: (eq T (TLRef i) (TLRef n))).(let H6 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H5) in (eq_ind nat n (\lambda (n0: nat).((eq T (lift (S n0) O v) x) \to (land (eq nat n n0) (eq T x (lift (S n) O v))))) (\lambda (H7: (eq T (lift (S n) O v) x)).(eq_ind T (lift (S n) O v) (\lambda (t: T).(land (eq nat n n) (eq T t (lift (S n) O v)))) (conj (eq nat n n) (eq T (lift (S n) O v) (lift (S n) O v)) (refl_equal nat n) (refl_equal T (lift (S n) O v))) x H7)) i (sym_eq nat i n H6)))) v0 (sym_eq T v0 v H4))) i0 (sym_eq nat i0 i H0) H1 H2 H3))))) | (subst0_fst v0 u2 u1 i0 H0 t k) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u1 t) (TLRef n))).(\lambda (H4: (eq T (THead k u2 t) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t) (TLRef n)) \to ((eq T (THead k u2 t) x) \to ((subst0 n0 v0 u1 u2) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq T (THead k u1 t) (TLRef n)) \to ((eq T (THead k u2 t) x) \to ((subst0 i t0 u1 u2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))) (\lambda (H6: (eq T (THead k u1 t) (TLRef n))).(let H7 \def (eq_ind T (THead k u1 t) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H6) in (False_ind ((eq T (THead k u2 t) x) \to ((subst0 i v u1 u2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_snd k v0 t2 t1 i0 H0 u) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k u t1) (TLRef n))).(\lambda (H4: (eq T (THead k u t2) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u t1) (TLRef n)) \to ((eq T (THead k u t2) x) \to ((subst0 (s k n0) v0 t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k u t1) (TLRef n)) \to ((eq T (THead k u t2) x) \to ((subst0 (s k i) t t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))) (\lambda (H6: (eq T (THead k u t1) (TLRef n))).(let H7 \def (eq_ind T (THead k u t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H6) in (False_ind ((eq T (THead k u t2) x) \to ((subst0 (s k i) v t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_both v0 u1 u2 i0 H0 k t1 t2 H1) \Rightarrow (\lambda (H2: (eq nat i0 i)).(\lambda (H3: (eq T v0 v)).(\lambda (H4: (eq T (THead k u1 t1) (TLRef n))).(\lambda (H5: (eq T (THead k u2 t2) x)).(eq_ind nat i (\lambda (n0: nat).((eq T v0 v) \to ((eq T (THead k u1 t1) (TLRef n)) \to ((eq T (THead k u2 t2) x) \to ((subst0 n0 v0 u1 u2) \to ((subst0 (s k n0) v0 t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v))))))))) (\lambda (H6: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k u1 t1) (TLRef n)) \to ((eq T (THead k u2 t2) x) \to ((subst0 i t u1 u2) \to ((subst0 (s k i) t t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))))) (\lambda (H7: (eq T (THead k u1 t1) (TLRef n))).(let H8 \def (eq_ind T (THead k u1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H7) in (False_ind ((eq T (THead k u2 t2) x) \to ((subst0 i v u1 u2) \to ((subst0 (s k i) v t1 t2) \to (land (eq nat n i) (eq T x (lift (S n) O v)))))) H8))) v0 (sym_eq T v0 v H6))) i0 (sym_eq nat i0 i H2) H3 H4 H5 H0 H1)))))]) in (H0 (refl_equal nat i) (refl_equal T v) (refl_equal T (TLRef n)) (refl_equal T x))))))). theorem subst0_gen_head: \forall (k: K).(\forall (v: T).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).((subst0 i v (THead k u1 t1) x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (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: (subst0 i v (THead k u1 t1) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (n: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t2: T).((eq nat n i) \to ((eq T t v) \to ((eq T t0 (THead k u1 t1)) \to ((eq T t2 x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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)))))))))))))) with [(subst0_lref v0 i0) \Rightarrow (\lambda (H0: (eq nat i0 i)).(\lambda (H1: (eq T v0 v)).(\lambda (H2: (eq T (TLRef i0) (THead k u1 t1))).(\lambda (H3: (eq T (lift (S i0) O v0) x)).(eq_ind nat i (\lambda (n: nat).((eq T v0 v) \to ((eq T (TLRef n) (THead k u1 t1)) \to ((eq T (lift (S n) O v0) x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))))) (\lambda (H4: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (TLRef i) (THead k u1 t1)) \to ((eq T (lift (S i) O t) x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))) (\lambda (H5: (eq T (TLRef i) (THead k u1 t1))).(let H6 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k u1 t1) H5) in (False_ind ((eq T (lift (S i) O v) x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))) H6))) v0 (sym_eq T v0 v H4))) i0 (sym_eq nat i0 i H0) H1 H2 H3))))) | (subst0_fst v0 u2 u0 i0 H0 t k0) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k0 u0 t) (THead k u1 t1))).(\lambda (H4: (eq T (THead k0 u2 t) x)).(eq_ind nat i (\lambda (n: nat).((eq T v0 v) \to ((eq T (THead k0 u0 t) (THead k u1 t1)) \to ((eq T (THead k0 u2 t) x) \to ((subst0 n v0 u0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq T (THead k0 u0 t) (THead k u1 t1)) \to ((eq T (THead k0 u2 t) x) \to ((subst0 i t0 u0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))))) (\lambda (H6: (eq T (THead k0 u0 t) (THead k u1 t1))).(let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead k0 u0 t) (THead k u1 t1) H6) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k0 u0 t) (THead k u1 t1) H6) in ((let H9 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 u0 t) (THead k u1 t1) H6) in (eq_ind K k (\lambda (k1: K).((eq T u0 u1) \to ((eq T t t1) \to ((eq T (THead k1 u2 t) x) \to ((subst0 i v u0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))))) (\lambda (H10: (eq T u0 u1)).(eq_ind T u1 (\lambda (t0: T).((eq T t t1) \to ((eq T (THead k u2 t) x) \to ((subst0 i v t0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))))) (\lambda (H11: (eq T t t1)).(eq_ind T t1 (\lambda (t0: T).((eq T (THead k u2 t0) x) \to ((subst0 i v u1 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))) (\lambda (H12: (eq T (THead k u2 t1) x)).(eq_ind T (THead k u2 t1) (\lambda (t0: T).((subst0 i v u1 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T t0 (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T t0 (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T t0 (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))) (\lambda (H13: (subst0 i v u1 u2)).(or3_intro0 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t1) (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T (THead k u2 t1) (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead k u2 t1) (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))) (ex_intro2 T (\lambda (u3: T).(eq T (THead k u2 t1) (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3)) u2 (refl_equal T (THead k u2 t1)) H13))) x H12)) t (sym_eq T t t1 H11))) u0 (sym_eq T u0 u1 H10))) k0 (sym_eq K k0 k H9))) H8)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_snd k0 v0 t2 t0 i0 H0 u) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k0 u t0) (THead k u1 t1))).(\lambda (H4: (eq T (THead k0 u t2) x)).(eq_ind nat i (\lambda (n: nat).((eq T v0 v) \to ((eq T (THead k0 u t0) (THead k u1 t1)) \to ((eq T (THead k0 u t2) x) \to ((subst0 (s k0 n) v0 t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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)))))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k0 u t0) (THead k u1 t1)) \to ((eq T (THead k0 u t2) x) \to ((subst0 (s k0 i) t t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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))))))))) (\lambda (H6: (eq T (THead k0 u t0) (THead k u1 t1))).(let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 u t0) (THead k u1 t1) H6) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead k0 u t0) (THead k u1 t1) H6) in ((let H9 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 u t0) (THead k u1 t1) H6) in (eq_ind K k (\lambda (k1: K).((eq T u u1) \to ((eq T t0 t1) \to ((eq T (THead k1 u t2) x) \to ((subst0 (s k1 i) v t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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)))))))))) (\lambda (H10: (eq T u u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead k t t2) x) \to ((subst0 (s k i) v t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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))))))))) (\lambda (H11: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead k u1 t2) x) \to ((subst0 (s k i) v t t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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)))))))) (\lambda (H12: (eq T (THead k u1 t2) x)).(eq_ind T (THead k u1 t2) (\lambda (t: T).((subst0 (s k i) v t1 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T t (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T t (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 t (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))))))) (\lambda (H13: (subst0 (s k i) v t1 t2)).(or3_intro1 (ex2 T (\lambda (u2: T).(eq T (THead k u1 t2) (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T (THead k u1 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 (THead k u1 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)))) (ex_intro2 T (\lambda (t3: T).(eq T (THead k u1 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3)) t2 (refl_equal T (THead k u1 t2)) H13))) x H12)) t0 (sym_eq T t0 t1 H11))) u (sym_eq T u u1 H10))) k0 (sym_eq K k0 k H9))) H8)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_both v0 u0 u2 i0 H0 k0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq nat i0 i)).(\lambda (H3: (eq T v0 v)).(\lambda (H4: (eq T (THead k0 u0 t0) (THead k u1 t1))).(\lambda (H5: (eq T (THead k0 u2 t2) x)).(eq_ind nat i (\lambda (n: nat).((eq T v0 v) \to ((eq T (THead k0 u0 t0) (THead k u1 t1)) \to ((eq T (THead k0 u2 t2) x) \to ((subst0 n v0 u0 u2) \to ((subst0 (s k0 n) v0 t0 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))))))))))) (\lambda (H6: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k0 u0 t0) (THead k u1 t1)) \to ((eq T (THead k0 u2 t2) x) \to ((subst0 i t u0 u2) \to ((subst0 (s k0 i) t t0 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))))))))) (\lambda (H7: (eq T (THead k0 u0 t0) (THead k u1 t1))).(let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 u0 t0) (THead k u1 t1) H7) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k0 u0 t0) (THead k u1 t1) H7) in ((let H10 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 u0 t0) (THead k u1 t1) H7) in (eq_ind K k (\lambda (k1: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k1 u2 t2) x) \to ((subst0 i v u0 u2) \to ((subst0 (s k1 i) v t0 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))))))))))) (\lambda (H11: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead k u2 t2) x) \to ((subst0 i v t u2) \to ((subst0 (s k i) v t0 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))))))))) (\lambda (H12: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead k u2 t2) x) \to ((subst0 i v u1 u2) \to ((subst0 (s k i) v t t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))))))))) (\lambda (H13: (eq T (THead k u2 t2) x)).(eq_ind T (THead k u2 t2) (\lambda (t: T).((subst0 i v u1 u2) \to ((subst0 (s k i) v t1 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T t (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T t (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))))))) (\lambda (H14: (subst0 i v u1 u2)).(\lambda (H15: (subst0 (s k i) v t1 t2)).(or3_intro2 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t2) (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T (THead k u2 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))) u2 t2 (refl_equal T (THead k u2 t2)) H14 H15)))) x H13)) t0 (sym_eq T t0 t1 H12))) u0 (sym_eq T u0 u1 H11))) k0 (sym_eq K k0 k H10))) H9)) H8))) v0 (sym_eq T v0 v H6))) i0 (sym_eq nat i0 i H2) H3 H4 H5 H0 H1)))))]) in (H0 (refl_equal nat i) (refl_equal T v) (refl_equal T (THead k u1 t1)) (refl_equal T x))))))))). + \lambda (k: K).(\lambda (v: T).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (i: nat).(\lambda (H: (subst0 i v (THead k u1 t1) x)).(let H0 \def (match H return (\lambda (n: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (subst0 n t t0 t2)).((eq nat n i) \to ((eq T t v) \to ((eq T t0 (THead k u1 t1)) \to ((eq T t2 x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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)))))))))))))) with [(subst0_lref v0 i0) \Rightarrow (\lambda (H0: (eq nat i0 i)).(\lambda (H1: (eq T v0 v)).(\lambda (H2: (eq T (TLRef i0) (THead k u1 t1))).(\lambda (H3: (eq T (lift (S i0) O v0) x)).(eq_ind nat i (\lambda (n: nat).((eq T v0 v) \to ((eq T (TLRef n) (THead k u1 t1)) \to ((eq T (lift (S n) O v0) x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))))) (\lambda (H4: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (TLRef i) (THead k u1 t1)) \to ((eq T (lift (S i) O t) x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))) (\lambda (H5: (eq T (TLRef i) (THead k u1 t1))).(let H6 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k u1 t1) H5) in (False_ind ((eq T (lift (S i) O v) x) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))) H6))) v0 (sym_eq T v0 v H4))) i0 (sym_eq nat i0 i H0) H1 H2 H3))))) | (subst0_fst v0 u2 u0 i0 H0 t k0) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k0 u0 t) (THead k u1 t1))).(\lambda (H4: (eq T (THead k0 u2 t) x)).(eq_ind nat i (\lambda (n: nat).((eq T v0 v) \to ((eq T (THead k0 u0 t) (THead k u1 t1)) \to ((eq T (THead k0 u2 t) x) \to ((subst0 n v0 u0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t0: T).((eq T (THead k0 u0 t) (THead k u1 t1)) \to ((eq T (THead k0 u2 t) x) \to ((subst0 i t0 u0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))))) (\lambda (H6: (eq T (THead k0 u0 t) (THead k u1 t1))).(let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead k0 u0 t) (THead k u1 t1) H6) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k0 u0 t) (THead k u1 t1) H6) in ((let H9 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 u0 t) (THead k u1 t1) H6) in (eq_ind K k (\lambda (k1: K).((eq T u0 u1) \to ((eq T t t1) \to ((eq T (THead k1 u2 t) x) \to ((subst0 i v u0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))))) (\lambda (H10: (eq T u0 u1)).(eq_ind T u1 (\lambda (t0: T).((eq T t t1) \to ((eq T (THead k u2 t) x) \to ((subst0 i v t0 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))))) (\lambda (H11: (eq T t t1)).(eq_ind T t1 (\lambda (t0: T).((eq T (THead k u2 t0) x) \to ((subst0 i v u1 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T x (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T x (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))))))) (\lambda (H12: (eq T (THead k u2 t1) x)).(eq_ind T (THead k u2 t1) (\lambda (t0: T).((subst0 i v u1 u2) \to (or3 (ex2 T (\lambda (u3: T).(eq T t0 (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T t0 (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T t0 (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2))))))) (\lambda (H13: (subst0 i v u1 u2)).(or3_intro0 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t1) (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t2: T).(eq T (THead k u2 t1) (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i) v t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (THead k u2 t1) (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t1 t2)))) (ex_intro2 T (\lambda (u3: T).(eq T (THead k u2 t1) (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3)) u2 (refl_equal T (THead k u2 t1)) H13))) x H12)) t (sym_eq T t t1 H11))) u0 (sym_eq T u0 u1 H10))) k0 (sym_eq K k0 k H9))) H8)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_snd k0 v0 t2 t0 i0 H0 u) \Rightarrow (\lambda (H1: (eq nat i0 i)).(\lambda (H2: (eq T v0 v)).(\lambda (H3: (eq T (THead k0 u t0) (THead k u1 t1))).(\lambda (H4: (eq T (THead k0 u t2) x)).(eq_ind nat i (\lambda (n: nat).((eq T v0 v) \to ((eq T (THead k0 u t0) (THead k u1 t1)) \to ((eq T (THead k0 u t2) x) \to ((subst0 (s k0 n) v0 t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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)))))))))) (\lambda (H5: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k0 u t0) (THead k u1 t1)) \to ((eq T (THead k0 u t2) x) \to ((subst0 (s k0 i) t t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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))))))))) (\lambda (H6: (eq T (THead k0 u t0) (THead k u1 t1))).(let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 u t0) (THead k u1 t1) H6) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead k0 u t0) (THead k u1 t1) H6) in ((let H9 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 u t0) (THead k u1 t1) H6) in (eq_ind K k (\lambda (k1: K).((eq T u u1) \to ((eq T t0 t1) \to ((eq T (THead k1 u t2) x) \to ((subst0 (s k1 i) v t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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)))))))))) (\lambda (H10: (eq T u u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead k t t2) x) \to ((subst0 (s k i) v t0 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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))))))))) (\lambda (H11: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead k u1 t2) x) \to ((subst0 (s k i) v t t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T x (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T x (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 x (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)))))))) (\lambda (H12: (eq T (THead k u1 t2) x)).(eq_ind T (THead k u1 t2) (\lambda (t: T).((subst0 (s k i) v t1 t2) \to (or3 (ex2 T (\lambda (u2: T).(eq T t (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T t (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 t (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))))))) (\lambda (H13: (subst0 (s k i) v t1 t2)).(or3_intro1 (ex2 T (\lambda (u2: T).(eq T (THead k u1 t2) (THead k u2 t1))) (\lambda (u2: T).(subst0 i v u1 u2))) (ex2 T (\lambda (t3: T).(eq T (THead k u1 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 (THead k u1 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)))) (ex_intro2 T (\lambda (t3: T).(eq T (THead k u1 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3)) t2 (refl_equal T (THead k u1 t2)) H13))) x H12)) t0 (sym_eq T t0 t1 H11))) u (sym_eq T u u1 H10))) k0 (sym_eq K k0 k H9))) H8)) H7))) v0 (sym_eq T v0 v H5))) i0 (sym_eq nat i0 i H1) H2 H3 H4 H0))))) | (subst0_both v0 u0 u2 i0 H0 k0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq nat i0 i)).(\lambda (H3: (eq T v0 v)).(\lambda (H4: (eq T (THead k0 u0 t0) (THead k u1 t1))).(\lambda (H5: (eq T (THead k0 u2 t2) x)).(eq_ind nat i (\lambda (n: nat).((eq T v0 v) \to ((eq T (THead k0 u0 t0) (THead k u1 t1)) \to ((eq T (THead k0 u2 t2) x) \to ((subst0 n v0 u0 u2) \to ((subst0 (s k0 n) v0 t0 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))))))))))) (\lambda (H6: (eq T v0 v)).(eq_ind T v (\lambda (t: T).((eq T (THead k0 u0 t0) (THead k u1 t1)) \to ((eq T (THead k0 u2 t2) x) \to ((subst0 i t u0 u2) \to ((subst0 (s k0 i) t t0 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))))))))) (\lambda (H7: (eq T (THead k0 u0 t0) (THead k u1 t1))).(let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 u0 t0) (THead k u1 t1) H7) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k0 u0 t0) (THead k u1 t1) H7) in ((let H10 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 u0 t0) (THead k u1 t1) H7) in (eq_ind K k (\lambda (k1: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k1 u2 t2) x) \to ((subst0 i v u0 u2) \to ((subst0 (s k1 i) v t0 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))))))))))) (\lambda (H11: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead k u2 t2) x) \to ((subst0 i v t u2) \to ((subst0 (s k i) v t0 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))))))))) (\lambda (H12: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead k u2 t2) x) \to ((subst0 i v u1 u2) \to ((subst0 (s k i) v t t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T x (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T x (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))))))))) (\lambda (H13: (eq T (THead k u2 t2) x)).(eq_ind T (THead k u2 t2) (\lambda (t: T).((subst0 i v u1 u2) \to ((subst0 (s k i) v t1 t2) \to (or3 (ex2 T (\lambda (u3: T).(eq T t (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T t (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))))))) (\lambda (H14: (subst0 i v u1 u2)).(\lambda (H15: (subst0 (s k i) v t1 t2)).(or3_intro2 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t2) (THead k u3 t1))) (\lambda (u3: T).(subst0 i v u1 u3))) (ex2 T (\lambda (t3: T).(eq T (THead k u2 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i) v t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3)))) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i) v t1 t3))) u2 t2 (refl_equal T (THead k u2 t2)) H14 H15)))) x H13)) t0 (sym_eq T t0 t1 H12))) u0 (sym_eq T u0 u1 H11))) k0 (sym_eq K k0 k H10))) H9)) H8))) v0 (sym_eq T v0 v H6))) i0 (sym_eq nat i0 i H2) H3 H4 H5 H0 H1)))))]) in (H0 (refl_equal nat i) (refl_equal T v) (refl_equal T (THead k u1 t1)) (refl_equal T x))))))))). theorem subst0_refl: \forall (u: T).(\forall (t: T).(\forall (d: nat).((subst0 d u t t) \to (\forall (P: Prop).P)))) \def - \lambda (u: T).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).((subst0 d u t0 t0) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (H: (subst0 d u (TSort n) (TSort n))).(\lambda (P: Prop).(subst0_gen_sort u (TSort n) d n H P))))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (H: (subst0 d u (TLRef n) (TLRef n))).(\lambda (P: Prop).(and_ind (eq nat n d) (eq T (TLRef n) (lift (S n) O u)) P (\lambda (_: (eq nat n d)).(\lambda (H1: (eq T (TLRef n) (lift (S n) O u))).(lift_gen_lref_false (S n) O n (le_O_n n) (le_n (plus O (S n))) u H1 P))) (subst0_gen_lref u (TLRef n) d n H)))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (H: ((\forall (d: nat).((subst0 d u t0 t0) \to (\forall (P: Prop).P))))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).((subst0 d u t1 t1) \to (\forall (P: Prop).P))))).(\lambda (d: nat).(\lambda (H1: (subst0 d u (THead k t0 t1) (THead k t0 t1))).(\lambda (P: Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) (\lambda (u2: T).(subst0 d u t0 u2))) (ex2 T (\lambda (t2: T).(eq T (THead k t0 t1) (THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 t2)))) P (\lambda (H2: (ex2 T (\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) (\lambda (u2: T).(subst0 d u t0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) (\lambda (u2: T).(subst0 d u t0 u2)) P (\lambda (x: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k x t1))).(\lambda (H4: (subst0 d u t0 x)).(let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ t _) \Rightarrow t])) (THead k t0 t1) (THead k x t1) H3) in (let H6 \def (eq_ind_r T x (\lambda (t: T).(subst0 d u t0 t)) H4 t0 H5) in (H d H6 P)))))) H2)) (\lambda (H2: (ex2 T (\lambda (t2: T).(eq T (THead k t0 t1) (THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2)))).(ex2_ind T (\lambda (t2: T).(eq T (THead k t0 t1) (THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2)) P (\lambda (x: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k t0 x))).(\lambda (H4: (subst0 (s k d) u t1 x)).(let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k t0 t1) (THead k t0 x) H3) in (let H6 \def (eq_ind_r T x (\lambda (t: T).(subst0 (s k d) u t1 t)) H4 t1 H5) in (H0 (s k d) H6 P)))))) H2)) (\lambda (H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 t2))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k x0 x1))).(\lambda (H4: (subst0 d u t0 x0)).(\lambda (H5: (subst0 (s k d) u t1 x1)).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ t _) \Rightarrow t])) (THead k t0 t1) (THead k x0 x1) H3) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k t0 t1) (THead k x0 x1) H3) in (\lambda (H8: (eq T t0 x0)).(let H9 \def (eq_ind_r T x1 (\lambda (t: T).(subst0 (s k d) u t1 t)) H5 t1 H7) in (let H10 \def (eq_ind_r T x0 (\lambda (t: T).(subst0 d u t0 t)) H4 t0 H8) in (H d H10 P))))) H6))))))) H2)) (subst0_gen_head k u t0 t1 (THead k t0 t1) d H1)))))))))) t)). + \lambda (u: T).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).((subst0 d u t0 t0) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (H: (subst0 d u (TSort n) (TSort n))).(\lambda (P: Prop).(subst0_gen_sort u (TSort n) d n H P))))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (H: (subst0 d u (TLRef n) (TLRef n))).(\lambda (P: Prop).(and_ind (eq nat n d) (eq T (TLRef n) (lift (S n) O u)) P (\lambda (_: (eq nat n d)).(\lambda (H1: (eq T (TLRef n) (lift (S n) O u))).(lift_gen_lref_false (S n) O n (le_O_n n) (le_n (plus O (S n))) u H1 P))) (subst0_gen_lref u (TLRef n) d n H)))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (H: ((\forall (d: nat).((subst0 d u t0 t0) \to (\forall (P: Prop).P))))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).((subst0 d u t1 t1) \to (\forall (P: Prop).P))))).(\lambda (d: nat).(\lambda (H1: (subst0 d u (THead k t0 t1) (THead k t0 t1))).(\lambda (P: Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) (\lambda (u2: T).(subst0 d u t0 u2))) (ex2 T (\lambda (t2: T).(eq T (THead k t0 t1) (THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 t2)))) P (\lambda (H2: (ex2 T (\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) (\lambda (u2: T).(subst0 d u t0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) (\lambda (u2: T).(subst0 d u t0 u2)) P (\lambda (x: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k x t1))).(\lambda (H4: (subst0 d u t0 x)).(let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ t _) \Rightarrow t])) (THead k t0 t1) (THead k x t1) H3) in (let H6 \def (eq_ind_r T x (\lambda (t: T).(subst0 d u t0 t)) H4 t0 H5) in (H d H6 P)))))) H2)) (\lambda (H2: (ex2 T (\lambda (t2: T).(eq T (THead k t0 t1) (THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2)))).(ex2_ind T (\lambda (t2: T).(eq T (THead k t0 t1) (THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2)) P (\lambda (x: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k t0 x))).(\lambda (H4: (subst0 (s k d) u t1 x)).(let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k t0 t1) (THead k t0 x) H3) in (let H6 \def (eq_ind_r T x (\lambda (t: T).(subst0 (s k d) u t1 t)) H4 t1 H5) in (H0 (s k d) H6 P)))))) H2)) (\lambda (H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 t2))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k x0 x1))).(\lambda (H4: (subst0 d u t0 x0)).(\lambda (H5: (subst0 (s k d) u t1 x1)).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ t _) \Rightarrow t])) (THead k t0 t1) (THead k x0 x1) H3) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k t0 t1) (THead k x0 x1) H3) in (\lambda (H8: (eq T t0 x0)).(let H9 \def (eq_ind_r T x1 (\lambda (t: T).(subst0 (s k d) u t1 t)) H5 t1 H7) in (let H10 \def (eq_ind_r T x0 (\lambda (t: T).(subst0 d u t0 t)) H4 t0 H8) in (H d H10 P))))) H6))))))) H2)) (subst0_gen_head k u t0 t1 (THead k t0 t1) d H1)))))))))) t)). theorem subst0_gen_lift_lt: \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 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).(subst0 i u t1 t2))))))))) @@ -1077,7 +1077,7 @@ theorem subst0_trans: 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 (_: ?).(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))))). + \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))))). theorem subst0_confluence_eq: \forall (t0: T).(\forall (t1: T).(\forall (u: T).(\forall (i: nat).((subst0 i u t0 t1) \to (\forall (t2: T).((subst0 i u t0 t2) \to (or4 (eq T t1 t2) (ex2 T (\lambda (t: T).(subst0 i u t1 t)) (\lambda (t: T).(subst0 i u t2 t))) (subst0 i u t1 t2) (subst0 i u t2 t1)))))))) @@ -1221,52 +1221,52 @@ theorem csubst0_both_bind: 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 return (\lambda (_: ?).(\lambda (n0: nat).(\lambda (t: T).(\lambda (c: C).(\lambda (c0: C).((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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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)))))))). + \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 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 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 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 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 return (\lambda (_: ?).(\lambda (n: nat).(\lambda (t: T).(\lambda (c: C).(\lambda (c0: C).((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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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))))))))). + \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 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 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 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 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 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 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 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 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 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 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))))))))). 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 return (\lambda (_: ?).(\lambda (n: nat).((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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).(\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). + \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 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 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 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 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 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 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 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 return (\lambda (_: ?).(\lambda (n: nat).((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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).(\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). + \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 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 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 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 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 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 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 return (\lambda (_: ?).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 return (\lambda (_: ?).(\lambda (n: nat).(\lambda (t0: T).(\lambda (c0: C).(\lambda (c1: C).((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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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). + \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 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 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 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 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 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 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 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 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 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 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 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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).(\lambda (n: nat).(\lambda (t0: T).(\lambda (c0: C).(\lambda (c1: C).((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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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). + \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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).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). + \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 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 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 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 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 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 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 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 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 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). 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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).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). + \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 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 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 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 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 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 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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).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). + \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 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 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 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 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 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 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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).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). + \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 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 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 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 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 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 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). 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))))))))) @@ -1276,7 +1276,7 @@ theorem csubst0_getl_ge: 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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).(\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)))))))))). + \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 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 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 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))))))))) @@ -1305,7 +1305,7 @@ theorem csubst1_flat: 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 return (\lambda (_: ?).(\lambda (c: 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))))))))). + \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 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))))))))). 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))))))))) @@ -1325,7 +1325,7 @@ theorem csubst1_getl_ge_back: 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 return (\lambda (_: ?).(\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 return (\lambda (_: ?).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 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).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 return (\lambda (_: ?).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 return (\lambda (_: ?).(\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). + \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 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 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 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match 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 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 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). 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)) @@ -1335,7 +1335,7 @@ inductive fsubst0 (i:nat) (v:T) (c1:C) (t1:T): C \to (T \to Prop) \def 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 return (\lambda (_: ?).(\lambda (c: C).(\lambda (t: 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))))))))). + \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 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))))))))). record G : Set \def { next: (nat \to nat); @@ -1445,22 +1445,22 @@ inductive leq (g:G): A \to (A \to Prop) \def theorem leq_gen_sort: \forall (g: G).(\forall (h1: nat).(\forall (n1: nat).(\forall (a2: A).((leq g (ASort h1 n1) a2) \to (ex2_3 nat nat nat (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (_: nat).(eq A a2 (ASort h2 n2))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)))))))))) \def - \lambda (g: G).(\lambda (h1: nat).(\lambda (n1: nat).(\lambda (a2: A).(\lambda (H: (leq g (ASort h1 n1) a2)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (a: A).(\lambda (a0: A).((eq A a (ASort h1 n1)) \to ((eq A a0 a2) \to (ex2_3 nat nat nat (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (_: nat).(eq A a2 (ASort h2 n2))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k))))))))))) with [(leq_sort h0 h2 n0 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h0 n0) (ASort h1 n1))).(\lambda (H2: (eq A (ASort h2 n2) a2)).((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n0])) (ASort h0 n0) (ASort h1 n1) H1) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h0])) (ASort h0 n0) (ASort h1 n1) H1) in (eq_ind nat h1 (\lambda (n: nat).((eq nat n0 n1) \to ((eq A (ASort h2 n2) a2) \to ((eq A (aplus g (ASort n n0) k) (aplus g (ASort h2 n2) k)) \to (ex2_3 nat nat nat (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A a2 (ASort h3 n3))))) (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (k0: nat).(eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort h3 n3) k0)))))))))) (\lambda (H5: (eq nat n0 n1)).(eq_ind nat n1 (\lambda (n: nat).((eq A (ASort h2 n2) a2) \to ((eq A (aplus g (ASort h1 n) k) (aplus g (ASort h2 n2) k)) \to (ex2_3 nat nat nat (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A a2 (ASort h3 n3))))) (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (k0: nat).(eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort h3 n3) k0))))))))) (\lambda (H6: (eq A (ASort h2 n2) a2)).(eq_ind A (ASort h2 n2) (\lambda (a: A).((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (ex2_3 nat nat nat (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A a (ASort h3 n3))))) (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (k0: nat).(eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort h3 n3) k0)))))))) (\lambda (H7: (eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k))).(ex2_3_intro nat nat nat (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A (ASort h2 n2) (ASort h3 n3))))) (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (k0: nat).(eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort h3 n3) k0))))) n2 h2 k (refl_equal A (ASort h2 n2)) H7)) a2 H6)) n0 (sym_eq nat n0 n1 H5))) h0 (sym_eq nat h0 h1 H4))) H3)) H2 H0))) | (leq_head a1 a0 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort h1 n1))).(\lambda (H3: (eq A (AHead a0 a4) a2)).((let H4 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort h1 n1) H2) in (False_ind ((eq A (AHead a0 a4) a2) \to ((leq g a1 a0) \to ((leq g a3 a4) \to (ex2_3 nat nat nat (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (_: nat).(eq A a2 (ASort h2 n2))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k))))))))) H4)) H3 H0 H1)))]) in (H0 (refl_equal A (ASort h1 n1)) (refl_equal A a2))))))). + \lambda (g: G).(\lambda (h1: nat).(\lambda (n1: nat).(\lambda (a2: A).(\lambda (H: (leq g (ASort h1 n1) a2)).(let H0 \def (match H return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (ASort h1 n1)) \to ((eq A a0 a2) \to (ex2_3 nat nat nat (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (_: nat).(eq A a2 (ASort h2 n2))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k))))))))))) with [(leq_sort h0 h2 n0 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h0 n0) (ASort h1 n1))).(\lambda (H2: (eq A (ASort h2 n2) a2)).((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n0])) (ASort h0 n0) (ASort h1 n1) H1) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h0])) (ASort h0 n0) (ASort h1 n1) H1) in (eq_ind nat h1 (\lambda (n: nat).((eq nat n0 n1) \to ((eq A (ASort h2 n2) a2) \to ((eq A (aplus g (ASort n n0) k) (aplus g (ASort h2 n2) k)) \to (ex2_3 nat nat nat (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A a2 (ASort h3 n3))))) (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (k0: nat).(eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort h3 n3) k0)))))))))) (\lambda (H5: (eq nat n0 n1)).(eq_ind nat n1 (\lambda (n: nat).((eq A (ASort h2 n2) a2) \to ((eq A (aplus g (ASort h1 n) k) (aplus g (ASort h2 n2) k)) \to (ex2_3 nat nat nat (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A a2 (ASort h3 n3))))) (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (k0: nat).(eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort h3 n3) k0))))))))) (\lambda (H6: (eq A (ASort h2 n2) a2)).(eq_ind A (ASort h2 n2) (\lambda (a: A).((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (ex2_3 nat nat nat (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A a (ASort h3 n3))))) (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (k0: nat).(eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort h3 n3) k0)))))))) (\lambda (H7: (eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k))).(ex2_3_intro nat nat nat (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (_: nat).(eq A (ASort h2 n2) (ASort h3 n3))))) (\lambda (n3: nat).(\lambda (h3: nat).(\lambda (k0: nat).(eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort h3 n3) k0))))) n2 h2 k (refl_equal A (ASort h2 n2)) H7)) a2 H6)) n0 (sym_eq nat n0 n1 H5))) h0 (sym_eq nat h0 h1 H4))) H3)) H2 H0))) | (leq_head a1 a0 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort h1 n1))).(\lambda (H3: (eq A (AHead a0 a4) a2)).((let H4 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort h1 n1) H2) in (False_ind ((eq A (AHead a0 a4) a2) \to ((leq g a1 a0) \to ((leq g a3 a4) \to (ex2_3 nat nat nat (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (_: nat).(eq A a2 (ASort h2 n2))))) (\lambda (n2: nat).(\lambda (h2: nat).(\lambda (k: nat).(eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k))))))))) H4)) H3 H0 H1)))]) in (H0 (refl_equal A (ASort h1 n1)) (refl_equal A a2))))))). theorem leq_gen_head: \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (a: A).((leq g (AHead a1 a2) a) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(leq g a1 a3))) (\lambda (_: A).(\lambda (a4: A).(leq g a2 a4)))))))) \def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (a: A).(\lambda (H: (leq g (AHead a1 a2) a)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (a0: A).(\lambda (a3: A).((eq A a0 (AHead a1 a2)) \to ((eq A a3 a) \to (ex3_2 A A (\lambda (a4: A).(\lambda (a5: A).(eq A a (AHead a4 a5)))) (\lambda (a4: A).(\lambda (_: A).(leq g a1 a4))) (\lambda (_: A).(\lambda (a5: A).(leq g a2 a5))))))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (AHead a1 a2))).(\lambda (H2: (eq A (ASort h2 n2) a)).((let H3 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a1 a2) H1) in (False_ind ((eq A (ASort h2 n2) a) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(leq g a1 a3))) (\lambda (_: A).(\lambda (a4: A).(leq g a2 a4)))))) H3)) H2 H0))) | (leq_head a0 a3 H0 a4 a5 H1) \Rightarrow (\lambda (H2: (eq A (AHead a0 a4) (AHead a1 a2))).(\lambda (H3: (eq A (AHead a3 a5) a)).((let H4 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a0 a4) (AHead a1 a2) H2) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a0 | (AHead a _) \Rightarrow a])) (AHead a0 a4) (AHead a1 a2) H2) in (eq_ind A a1 (\lambda (a6: A).((eq A a4 a2) \to ((eq A (AHead a3 a5) a) \to ((leq g a6 a3) \to ((leq g a4 a5) \to (ex3_2 A A (\lambda (a7: A).(\lambda (a8: A).(eq A a (AHead a7 a8)))) (\lambda (a7: A).(\lambda (_: A).(leq g a1 a7))) (\lambda (_: A).(\lambda (a8: A).(leq g a2 a8))))))))) (\lambda (H6: (eq A a4 a2)).(eq_ind A a2 (\lambda (a6: A).((eq A (AHead a3 a5) a) \to ((leq g a1 a3) \to ((leq g a6 a5) \to (ex3_2 A A (\lambda (a7: A).(\lambda (a8: A).(eq A a (AHead a7 a8)))) (\lambda (a7: A).(\lambda (_: A).(leq g a1 a7))) (\lambda (_: A).(\lambda (a8: A).(leq g a2 a8)))))))) (\lambda (H7: (eq A (AHead a3 a5) a)).(eq_ind A (AHead a3 a5) (\lambda (a: A).((leq g a1 a3) \to ((leq g a2 a5) \to (ex3_2 A A (\lambda (a6: A).(\lambda (a7: A).(eq A a (AHead a6 a7)))) (\lambda (a6: A).(\lambda (_: A).(leq g a1 a6))) (\lambda (_: A).(\lambda (a7: A).(leq g a2 a7))))))) (\lambda (H8: (leq g a1 a3)).(\lambda (H9: (leq g a2 a5)).(ex3_2_intro A A (\lambda (a6: A).(\lambda (a7: A).(eq A (AHead a3 a5) (AHead a6 a7)))) (\lambda (a6: A).(\lambda (_: A).(leq g a1 a6))) (\lambda (_: A).(\lambda (a7: A).(leq g a2 a7))) a3 a5 (refl_equal A (AHead a3 a5)) H8 H9))) a H7)) a4 (sym_eq A a4 a2 H6))) a0 (sym_eq A a0 a1 H5))) H4)) H3 H0 H1)))]) in (H0 (refl_equal A (AHead a1 a2)) (refl_equal A a))))))). + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (a: A).(\lambda (H: (leq g (AHead a1 a2) a)).(let H0 \def (match H return (\lambda (a0: A).(\lambda (a3: A).(\lambda (_: (leq ? a0 a3)).((eq A a0 (AHead a1 a2)) \to ((eq A a3 a) \to (ex3_2 A A (\lambda (a4: A).(\lambda (a5: A).(eq A a (AHead a4 a5)))) (\lambda (a4: A).(\lambda (_: A).(leq g a1 a4))) (\lambda (_: A).(\lambda (a5: A).(leq g a2 a5))))))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (AHead a1 a2))).(\lambda (H2: (eq A (ASort h2 n2) a)).((let H3 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a1 a2) H1) in (False_ind ((eq A (ASort h2 n2) a) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(leq g a1 a3))) (\lambda (_: A).(\lambda (a4: A).(leq g a2 a4)))))) H3)) H2 H0))) | (leq_head a0 a3 H0 a4 a5 H1) \Rightarrow (\lambda (H2: (eq A (AHead a0 a4) (AHead a1 a2))).(\lambda (H3: (eq A (AHead a3 a5) a)).((let H4 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a0 a4) (AHead a1 a2) H2) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | (AHead a _) \Rightarrow a])) (AHead a0 a4) (AHead a1 a2) H2) in (eq_ind A a1 (\lambda (a6: A).((eq A a4 a2) \to ((eq A (AHead a3 a5) a) \to ((leq g a6 a3) \to ((leq g a4 a5) \to (ex3_2 A A (\lambda (a7: A).(\lambda (a8: A).(eq A a (AHead a7 a8)))) (\lambda (a7: A).(\lambda (_: A).(leq g a1 a7))) (\lambda (_: A).(\lambda (a8: A).(leq g a2 a8))))))))) (\lambda (H6: (eq A a4 a2)).(eq_ind A a2 (\lambda (a6: A).((eq A (AHead a3 a5) a) \to ((leq g a1 a3) \to ((leq g a6 a5) \to (ex3_2 A A (\lambda (a7: A).(\lambda (a8: A).(eq A a (AHead a7 a8)))) (\lambda (a7: A).(\lambda (_: A).(leq g a1 a7))) (\lambda (_: A).(\lambda (a8: A).(leq g a2 a8)))))))) (\lambda (H7: (eq A (AHead a3 a5) a)).(eq_ind A (AHead a3 a5) (\lambda (a: A).((leq g a1 a3) \to ((leq g a2 a5) \to (ex3_2 A A (\lambda (a6: A).(\lambda (a7: A).(eq A a (AHead a6 a7)))) (\lambda (a6: A).(\lambda (_: A).(leq g a1 a6))) (\lambda (_: A).(\lambda (a7: A).(leq g a2 a7))))))) (\lambda (H8: (leq g a1 a3)).(\lambda (H9: (leq g a2 a5)).(ex3_2_intro A A (\lambda (a6: A).(\lambda (a7: A).(eq A (AHead a3 a5) (AHead a6 a7)))) (\lambda (a6: A).(\lambda (_: A).(leq g a1 a6))) (\lambda (_: A).(\lambda (a7: A).(leq g a2 a7))) a3 a5 (refl_equal A (AHead a3 a5)) H8 H9))) a H7)) a4 (sym_eq A a4 a2 H6))) a0 (sym_eq A a0 a1 H5))) H4)) H3 H0 H1)))]) in (H0 (refl_equal A (AHead a1 a2)) (refl_equal A a))))))). theorem asucc_gen_sort: \forall (g: G).(\forall (h: nat).(\forall (n: nat).(\forall (a: A).((eq A (ASort h n) (asucc g a)) \to (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A a (ASort h0 n0))))))))) \def - \lambda (g: G).(\lambda (h: nat).(\lambda (n: nat).(\lambda (a: A).(A_ind (\lambda (a0: A).((eq A (ASort h n) (asucc g a0)) \to (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A a0 (ASort h0 n0))))))) (\lambda (n0: nat).(\lambda (n1: nat).(\lambda (H: (eq A (ASort h n) (asucc g (ASort n0 n1)))).(let H0 \def (f_equal A A (\lambda (e: A).e) (ASort h n) (match n0 with [O \Rightarrow (ASort O (next g n1)) | (S h) \Rightarrow (ASort h n1)]) H) in (ex_2_intro nat nat (\lambda (h0: nat).(\lambda (n2: nat).(eq A (ASort n0 n1) (ASort h0 n2)))) n0 n1 (refl_equal A (ASort n0 n1))))))) (\lambda (a0: A).(\lambda (_: (((eq A (ASort h n) (asucc g a0)) \to (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A a0 (ASort h0 n0)))))))).(\lambda (a1: A).(\lambda (_: (((eq A (ASort h n) (asucc g a1)) \to (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A a1 (ASort h0 n0)))))))).(\lambda (H1: (eq A (ASort h n) (asucc g (AHead a0 a1)))).(let H2 \def (eq_ind A (ASort h n) (\lambda (ee: A).(match ee return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (asucc g (AHead a0 a1)) H1) in (False_ind (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A (AHead a0 a1) (ASort h0 n0))))) H2))))))) a)))). + \lambda (g: G).(\lambda (h: nat).(\lambda (n: nat).(\lambda (a: A).(A_ind (\lambda (a0: A).((eq A (ASort h n) (asucc g a0)) \to (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A a0 (ASort h0 n0))))))) (\lambda (n0: nat).(\lambda (n1: nat).(\lambda (H: (eq A (ASort h n) (asucc g (ASort n0 n1)))).(let H0 \def (f_equal A A (\lambda (e: A).e) (ASort h n) (match n0 with [O \Rightarrow (ASort O (next g n1)) | (S h) \Rightarrow (ASort h n1)]) H) in (ex_2_intro nat nat (\lambda (h0: nat).(\lambda (n2: nat).(eq A (ASort n0 n1) (ASort h0 n2)))) n0 n1 (refl_equal A (ASort n0 n1))))))) (\lambda (a0: A).(\lambda (_: (((eq A (ASort h n) (asucc g a0)) \to (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A a0 (ASort h0 n0)))))))).(\lambda (a1: A).(\lambda (_: (((eq A (ASort h n) (asucc g a1)) \to (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A a1 (ASort h0 n0)))))))).(\lambda (H1: (eq A (ASort h n) (asucc g (AHead a0 a1)))).(let H2 \def (eq_ind A (ASort h n) (\lambda (ee: A).(match ee return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (asucc g (AHead a0 a1)) H1) in (False_ind (ex_2 nat nat (\lambda (h0: nat).(\lambda (n0: nat).(eq A (AHead a0 a1) (ASort h0 n0))))) H2))))))) a)))). theorem asucc_gen_head: \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (a: A).((eq A (AHead a1 a2) (asucc g a)) \to (ex2 A (\lambda (a0: A).(eq A a (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g a0)))))))) \def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (a: A).(A_ind (\lambda (a0: A).((eq A (AHead a1 a2) (asucc g a0)) \to (ex2 A (\lambda (a3: A).(eq A a0 (AHead a1 a3))) (\lambda (a3: A).(eq A a2 (asucc g a3)))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (H: (eq A (AHead a1 a2) (asucc g (ASort n n0)))).(nat_ind (\lambda (n1: nat).((eq A (AHead a1 a2) (asucc g (ASort n1 n0))) \to (ex2 A (\lambda (a0: A).(eq A (ASort n1 n0) (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g a0)))))) (\lambda (H0: (eq A (AHead a1 a2) (asucc g (ASort O n0)))).(let H1 \def (eq_ind A (AHead a1 a2) (\lambda (ee: A).(match ee return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H0) in (False_ind (ex2 A (\lambda (a0: A).(eq A (ASort O n0) (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g a0)))) H1))) (\lambda (n1: nat).(\lambda (_: (((eq A (AHead a1 a2) (asucc g (ASort n1 n0))) \to (ex2 A (\lambda (a0: A).(eq A (ASort n1 n0) (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g a0))))))).(\lambda (H0: (eq A (AHead a1 a2) (asucc g (ASort (S n1) n0)))).(let H1 \def (eq_ind A (AHead a1 a2) (\lambda (ee: A).(match ee return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 n0) H0) in (False_ind (ex2 A (\lambda (a0: A).(eq A (ASort (S n1) n0) (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g a0)))) H1))))) n H)))) (\lambda (a0: A).(\lambda (H: (((eq A (AHead a1 a2) (asucc g a0)) \to (ex2 A (\lambda (a2: A).(eq A a0 (AHead a1 a2))) (\lambda (a0: A).(eq A a2 (asucc g a0))))))).(\lambda (a3: A).(\lambda (H0: (((eq A (AHead a1 a2) (asucc g a3)) \to (ex2 A (\lambda (a0: A).(eq A a3 (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g a0))))))).(\lambda (H1: (eq A (AHead a1 a2) (asucc g (AHead a0 a3)))).(let H2 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a2) (AHead a0 (asucc g a3)) H1) in ((let H3 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a2 | (AHead _ a) \Rightarrow a])) (AHead a1 a2) (AHead a0 (asucc g a3)) H1) in (\lambda (H4: (eq A a1 a0)).(let H5 \def (eq_ind_r A a0 (\lambda (a: A).((eq A (AHead a1 a2) (asucc g a)) \to (ex2 A (\lambda (a0: A).(eq A a (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g a0)))))) H a1 H4) in (eq_ind A a1 (\lambda (a4: A).(ex2 A (\lambda (a5: A).(eq A (AHead a4 a3) (AHead a1 a5))) (\lambda (a5: A).(eq A a2 (asucc g a5))))) (let H6 \def (eq_ind A a2 (\lambda (a: A).((eq A (AHead a1 a) (asucc g a3)) \to (ex2 A (\lambda (a0: A).(eq A a3 (AHead a1 a0))) (\lambda (a0: A).(eq A a (asucc g a0)))))) H0 (asucc g a3) H3) in (let H7 \def (eq_ind A a2 (\lambda (a: A).((eq A (AHead a1 a) (asucc g a1)) \to (ex2 A (\lambda (a0: A).(eq A a1 (AHead a1 a0))) (\lambda (a0: A).(eq A a (asucc g a0)))))) H5 (asucc g a3) H3) in (eq_ind_r A (asucc g a3) (\lambda (a4: A).(ex2 A (\lambda (a5: A).(eq A (AHead a1 a3) (AHead a1 a5))) (\lambda (a5: A).(eq A a4 (asucc g a5))))) (ex_intro2 A (\lambda (a4: A).(eq A (AHead a1 a3) (AHead a1 a4))) (\lambda (a4: A).(eq A (asucc g a3) (asucc g a4))) a3 (refl_equal A (AHead a1 a3)) (refl_equal A (asucc g a3))) a2 H3))) a0 H4)))) H2))))))) a)))). + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (a: A).(A_ind (\lambda (a0: A).((eq A (AHead a1 a2) (asucc g a0)) \to (ex2 A (\lambda (a3: A).(eq A a0 (AHead a1 a3))) (\lambda (a3: A).(eq A a2 (asucc g a3)))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (H: (eq A (AHead a1 a2) (asucc g (ASort n n0)))).(nat_ind (\lambda (n1: nat).((eq A (AHead a1 a2) (asucc g (ASort n1 n0))) \to (ex2 A (\lambda (a0: A).(eq A (ASort n1 n0) (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g a0)))))) (\lambda (H0: (eq A (AHead a1 a2) (asucc g (ASort O n0)))).(let H1 \def (eq_ind A (AHead a1 a2) (\lambda (ee: A).(match ee return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H0) in (False_ind (ex2 A (\lambda (a0: A).(eq A (ASort O n0) (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g a0)))) H1))) (\lambda (n1: nat).(\lambda (_: (((eq A (AHead a1 a2) (asucc g (ASort n1 n0))) \to (ex2 A (\lambda (a0: A).(eq A (ASort n1 n0) (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g a0))))))).(\lambda (H0: (eq A (AHead a1 a2) (asucc g (ASort (S n1) n0)))).(let H1 \def (eq_ind A (AHead a1 a2) (\lambda (ee: A).(match ee return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 n0) H0) in (False_ind (ex2 A (\lambda (a0: A).(eq A (ASort (S n1) n0) (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g a0)))) H1))))) n H)))) (\lambda (a0: A).(\lambda (H: (((eq A (AHead a1 a2) (asucc g a0)) \to (ex2 A (\lambda (a2: A).(eq A a0 (AHead a1 a2))) (\lambda (a0: A).(eq A a2 (asucc g a0))))))).(\lambda (a3: A).(\lambda (H0: (((eq A (AHead a1 a2) (asucc g a3)) \to (ex2 A (\lambda (a0: A).(eq A a3 (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g a0))))))).(\lambda (H1: (eq A (AHead a1 a2) (asucc g (AHead a0 a3)))).(let H2 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a2) (AHead a0 (asucc g a3)) H1) in ((let H3 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a2 | (AHead _ a) \Rightarrow a])) (AHead a1 a2) (AHead a0 (asucc g a3)) H1) in (\lambda (H4: (eq A a1 a0)).(let H5 \def (eq_ind_r A a0 (\lambda (a: A).((eq A (AHead a1 a2) (asucc g a)) \to (ex2 A (\lambda (a0: A).(eq A a (AHead a1 a0))) (\lambda (a0: A).(eq A a2 (asucc g a0)))))) H a1 H4) in (eq_ind A a1 (\lambda (a4: A).(ex2 A (\lambda (a5: A).(eq A (AHead a4 a3) (AHead a1 a5))) (\lambda (a5: A).(eq A a2 (asucc g a5))))) (let H6 \def (eq_ind A a2 (\lambda (a: A).((eq A (AHead a1 a) (asucc g a3)) \to (ex2 A (\lambda (a0: A).(eq A a3 (AHead a1 a0))) (\lambda (a0: A).(eq A a (asucc g a0)))))) H0 (asucc g a3) H3) in (let H7 \def (eq_ind A a2 (\lambda (a: A).((eq A (AHead a1 a) (asucc g a1)) \to (ex2 A (\lambda (a0: A).(eq A a1 (AHead a1 a0))) (\lambda (a0: A).(eq A a (asucc g a0)))))) H5 (asucc g a3) H3) in (eq_ind_r A (asucc g a3) (\lambda (a4: A).(ex2 A (\lambda (a5: A).(eq A (AHead a1 a3) (AHead a1 a5))) (\lambda (a5: A).(eq A a4 (asucc g a5))))) (ex_intro2 A (\lambda (a4: A).(eq A (AHead a1 a3) (AHead a1 a4))) (\lambda (a4: A).(eq A (asucc g a3) (asucc g a4))) a3 (refl_equal A (AHead a1 a3)) (refl_equal A (asucc g a3))) a2 H3))) a0 H4)))) H2))))))) a)))). theorem aplus_reg_r: \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (h1: nat).(\forall (h2: nat).((eq A (aplus g a1 h1) (aplus g a2 h2)) \to (\forall (h: nat).(eq A (aplus g a1 (plus h h1)) (aplus g a2 (plus h h2))))))))) @@ -1490,12 +1490,12 @@ theorem aplus_sort_S_S_simpl: theorem asucc_repl: \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (leq g (asucc g a1) (asucc g a2))))) \def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(leq g (asucc g a) (asucc g a0)))) (\lambda (h1: nat).(\lambda (h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda (H0: (eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k))).((match h1 return (\lambda (_: ?).(\lambda (n: nat).((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (match n with [O \Rightarrow (ASort O (next g n1)) | (S h) \Rightarrow (ASort h n1)]) (match h2 with [O \Rightarrow (ASort O (next g n2)) | (S h) \Rightarrow (ASort h n2)]))))) with [O \Rightarrow (\lambda (H1: (eq A (aplus g (ASort O n1) k) (aplus g (ASort h2 n2) k))).((match h2 return (\lambda (_: ?).(\lambda (n: nat).((eq A (aplus g (ASort O n1) k) (aplus g (ASort n n2) k)) \to (leq g (ASort O (next g n1)) (match n with [O \Rightarrow (ASort O (next g n2)) | (S h) \Rightarrow (ASort h n2)]))))) with [O \Rightarrow (\lambda (H2: (eq A (aplus g (ASort O n1) k) (aplus g (ASort O n2) k))).(leq_sort g O O (next g n1) (next g n2) k (eq_ind A (aplus g (ASort O n1) (S k)) (\lambda (a: A).(eq A a (aplus g (ASort O (next g n2)) k))) (eq_ind A (aplus g (ASort O n2) (S k)) (\lambda (a: A).(eq A (aplus g (ASort O n1) (S k)) a)) (eq_ind_r A (aplus g (ASort O n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort O n2) k)))) (refl_equal A (asucc g (aplus g (ASort O n2) k))) (aplus g (ASort O n1) k) H2) (aplus g (ASort O (next g n2)) k) (aplus_sort_O_S_simpl g n2 k)) (aplus g (ASort O (next g n1)) k) (aplus_sort_O_S_simpl g n1 k)))) | (S n) \Rightarrow (\lambda (H2: (eq A (aplus g (ASort O n1) k) (aplus g (ASort (S n) n2) k))).(leq_sort g O n (next g n1) n2 k (eq_ind A (aplus g (ASort O n1) (S k)) (\lambda (a: A).(eq A a (aplus g (ASort n n2) k))) (eq_ind A (aplus g (ASort (S n) n2) (S k)) (\lambda (a: A).(eq A (aplus g (ASort O n1) (S k)) a)) (eq_ind_r A (aplus g (ASort (S n) n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort (S n) n2) k)))) (refl_equal A (asucc g (aplus g (ASort (S n) n2) k))) (aplus g (ASort O n1) k) H2) (aplus g (ASort n n2) k) (aplus_sort_S_S_simpl g n2 n k)) (aplus g (ASort O (next g n1)) k) (aplus_sort_O_S_simpl g n1 k))))]) H1)) | (S n) \Rightarrow (\lambda (H1: (eq A (aplus g (ASort (S n) n1) k) (aplus g (ASort h2 n2) k))).((match h2 return (\lambda (_: ?).(\lambda (n0: nat).((eq A (aplus g (ASort (S n) n1) k) (aplus g (ASort n0 n2) k)) \to (leq g (ASort n n1) (match n0 with [O \Rightarrow (ASort O (next g n2)) | (S h) \Rightarrow (ASort h n2)]))))) with [O \Rightarrow (\lambda (H2: (eq A (aplus g (ASort (S n) n1) k) (aplus g (ASort O n2) k))).(leq_sort g n O n1 (next g n2) k (eq_ind A (aplus g (ASort O n2) (S k)) (\lambda (a: A).(eq A (aplus g (ASort n n1) k) a)) (eq_ind A (aplus g (ASort (S n) n1) (S k)) (\lambda (a: A).(eq A a (aplus g (ASort O n2) (S k)))) (eq_ind_r A (aplus g (ASort O n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort O n2) k)))) (refl_equal A (asucc g (aplus g (ASort O n2) k))) (aplus g (ASort (S n) n1) k) H2) (aplus g (ASort n n1) k) (aplus_sort_S_S_simpl g n1 n k)) (aplus g (ASort O (next g n2)) k) (aplus_sort_O_S_simpl g n2 k)))) | (S n0) \Rightarrow (\lambda (H2: (eq A (aplus g (ASort (S n) n1) k) (aplus g (ASort (S n0) n2) k))).(leq_sort g n n0 n1 n2 k (eq_ind A (aplus g (ASort (S n) n1) (S k)) (\lambda (a: A).(eq A a (aplus g (ASort n0 n2) k))) (eq_ind A (aplus g (ASort (S n0) n2) (S k)) (\lambda (a: A).(eq A (aplus g (ASort (S n) n1) (S k)) a)) (eq_ind_r A (aplus g (ASort (S n0) n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort (S n0) n2) k)))) (refl_equal A (asucc g (aplus g (ASort (S n0) n2) k))) (aplus g (ASort (S n) n1) k) H2) (aplus g (ASort n0 n2) k) (aplus_sort_S_S_simpl g n2 n0 k)) (aplus g (ASort n n1) k) (aplus_sort_S_S_simpl g n1 n k))))]) H1))]) H0))))))) (\lambda (a3: A).(\lambda (a4: A).(\lambda (H0: (leq g a3 a4)).(\lambda (_: (leq g (asucc g a3) (asucc g a4))).(\lambda (a5: A).(\lambda (a6: A).(\lambda (_: (leq g a5 a6)).(\lambda (H3: (leq g (asucc g a5) (asucc g a6))).(leq_head g a3 a4 H0 (asucc g a5) (asucc g a6) H3))))))))) a1 a2 H)))). + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(leq g (asucc g a) (asucc g a0)))) (\lambda (h1: nat).(\lambda (h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda (H0: (eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k))).((match h1 return (\lambda (n: nat).((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (match n with [O \Rightarrow (ASort O (next g n1)) | (S h) \Rightarrow (ASort h n1)]) (match h2 with [O \Rightarrow (ASort O (next g n2)) | (S h) \Rightarrow (ASort h n2)])))) with [O \Rightarrow (\lambda (H1: (eq A (aplus g (ASort O n1) k) (aplus g (ASort h2 n2) k))).((match h2 return (\lambda (n: nat).((eq A (aplus g (ASort O n1) k) (aplus g (ASort n n2) k)) \to (leq g (ASort O (next g n1)) (match n with [O \Rightarrow (ASort O (next g n2)) | (S h) \Rightarrow (ASort h n2)])))) with [O \Rightarrow (\lambda (H2: (eq A (aplus g (ASort O n1) k) (aplus g (ASort O n2) k))).(leq_sort g O O (next g n1) (next g n2) k (eq_ind A (aplus g (ASort O n1) (S k)) (\lambda (a: A).(eq A a (aplus g (ASort O (next g n2)) k))) (eq_ind A (aplus g (ASort O n2) (S k)) (\lambda (a: A).(eq A (aplus g (ASort O n1) (S k)) a)) (eq_ind_r A (aplus g (ASort O n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort O n2) k)))) (refl_equal A (asucc g (aplus g (ASort O n2) k))) (aplus g (ASort O n1) k) H2) (aplus g (ASort O (next g n2)) k) (aplus_sort_O_S_simpl g n2 k)) (aplus g (ASort O (next g n1)) k) (aplus_sort_O_S_simpl g n1 k)))) | (S n) \Rightarrow (\lambda (H2: (eq A (aplus g (ASort O n1) k) (aplus g (ASort (S n) n2) k))).(leq_sort g O n (next g n1) n2 k (eq_ind A (aplus g (ASort O n1) (S k)) (\lambda (a: A).(eq A a (aplus g (ASort n n2) k))) (eq_ind A (aplus g (ASort (S n) n2) (S k)) (\lambda (a: A).(eq A (aplus g (ASort O n1) (S k)) a)) (eq_ind_r A (aplus g (ASort (S n) n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort (S n) n2) k)))) (refl_equal A (asucc g (aplus g (ASort (S n) n2) k))) (aplus g (ASort O n1) k) H2) (aplus g (ASort n n2) k) (aplus_sort_S_S_simpl g n2 n k)) (aplus g (ASort O (next g n1)) k) (aplus_sort_O_S_simpl g n1 k))))]) H1)) | (S n) \Rightarrow (\lambda (H1: (eq A (aplus g (ASort (S n) n1) k) (aplus g (ASort h2 n2) k))).((match h2 return (\lambda (n0: nat).((eq A (aplus g (ASort (S n) n1) k) (aplus g (ASort n0 n2) k)) \to (leq g (ASort n n1) (match n0 with [O \Rightarrow (ASort O (next g n2)) | (S h) \Rightarrow (ASort h n2)])))) with [O \Rightarrow (\lambda (H2: (eq A (aplus g (ASort (S n) n1) k) (aplus g (ASort O n2) k))).(leq_sort g n O n1 (next g n2) k (eq_ind A (aplus g (ASort O n2) (S k)) (\lambda (a: A).(eq A (aplus g (ASort n n1) k) a)) (eq_ind A (aplus g (ASort (S n) n1) (S k)) (\lambda (a: A).(eq A a (aplus g (ASort O n2) (S k)))) (eq_ind_r A (aplus g (ASort O n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort O n2) k)))) (refl_equal A (asucc g (aplus g (ASort O n2) k))) (aplus g (ASort (S n) n1) k) H2) (aplus g (ASort n n1) k) (aplus_sort_S_S_simpl g n1 n k)) (aplus g (ASort O (next g n2)) k) (aplus_sort_O_S_simpl g n2 k)))) | (S n0) \Rightarrow (\lambda (H2: (eq A (aplus g (ASort (S n) n1) k) (aplus g (ASort (S n0) n2) k))).(leq_sort g n n0 n1 n2 k (eq_ind A (aplus g (ASort (S n) n1) (S k)) (\lambda (a: A).(eq A a (aplus g (ASort n0 n2) k))) (eq_ind A (aplus g (ASort (S n0) n2) (S k)) (\lambda (a: A).(eq A (aplus g (ASort (S n) n1) (S k)) a)) (eq_ind_r A (aplus g (ASort (S n0) n2) k) (\lambda (a: A).(eq A (asucc g a) (asucc g (aplus g (ASort (S n0) n2) k)))) (refl_equal A (asucc g (aplus g (ASort (S n0) n2) k))) (aplus g (ASort (S n) n1) k) H2) (aplus g (ASort n0 n2) k) (aplus_sort_S_S_simpl g n2 n0 k)) (aplus g (ASort n n1) k) (aplus_sort_S_S_simpl g n1 n k))))]) H1))]) H0))))))) (\lambda (a3: A).(\lambda (a4: A).(\lambda (H0: (leq g a3 a4)).(\lambda (_: (leq g (asucc g a3) (asucc g a4))).(\lambda (a5: A).(\lambda (a6: A).(\lambda (_: (leq g a5 a6)).(\lambda (H3: (leq g (asucc g a5) (asucc g a6))).(leq_head g a3 a4 H0 (asucc g a5) (asucc g a6) H3))))))))) a1 a2 H)))). theorem asucc_inj: \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g (asucc g a1) (asucc g a2)) \to (leq g a1 a2)))) \def - \lambda (g: G).(\lambda (a1: A).(A_ind (\lambda (a: A).(\forall (a2: A).((leq g (asucc g a) (asucc g a2)) \to (leq g a a2)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (a2: A).(A_ind (\lambda (a: A).((leq g (asucc g (ASort n n0)) (asucc g a)) \to (leq g (ASort n n0) a))) (\lambda (n1: nat).(\lambda (n2: nat).(\lambda (H: (leq g (asucc g (ASort n n0)) (asucc g (ASort n1 n2)))).((match n return (\lambda (_: ?).(\lambda (n3: nat).((leq g (asucc g (ASort n3 n0)) (asucc g (ASort n1 n2))) \to (leq g (ASort n3 n0) (ASort n1 n2))))) with [O \Rightarrow (\lambda (H0: (leq g (asucc g (ASort O n0)) (asucc g (ASort n1 n2)))).((match n1 return (\lambda (_: ?).(\lambda (n3: nat).((leq g (asucc g (ASort O n0)) (asucc g (ASort n3 n2))) \to (leq g (ASort O n0) (ASort n3 n2))))) with [O \Rightarrow (\lambda (H1: (leq g (asucc g (ASort O n0)) (asucc g (ASort O n2)))).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (a: A).(\lambda (a0: A).((eq A a (ASort O (next g n0))) \to ((eq A a0 (ASort O (next g n2))) \to (leq g (ASort O n0) (ASort O n2))))))) with [(leq_sort h1 h2 n1 n3 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (ASort O (next g n0)))).(\lambda (H2: (eq A (ASort h2 n3) (ASort O (next g n2)))).((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort O (next g n0)) H1) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) (ASort O (next g n0)) H1) in (eq_ind nat O (\lambda (n: nat).((eq nat n1 (next g n0)) \to ((eq A (ASort h2 n3) (ASort O (next g n2))) \to ((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort O n0) (ASort O n2)))))) (\lambda (H5: (eq nat n1 (next g n0))).(eq_ind nat (next g n0) (\lambda (n: nat).((eq A (ASort h2 n3) (ASort O (next g n2))) \to ((eq A (aplus g (ASort O n) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort O n0) (ASort O n2))))) (\lambda (H6: (eq A (ASort h2 n3) (ASort O (next g n2)))).(let H7 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n3])) (ASort h2 n3) (ASort O (next g n2)) H6) in ((let H8 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h2])) (ASort h2 n3) (ASort O (next g n2)) H6) in (eq_ind nat O (\lambda (n: nat).((eq nat n3 (next g n2)) \to ((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n n3) k)) \to (leq g (ASort O n0) (ASort O n2))))) (\lambda (H9: (eq nat n3 (next g n2))).(eq_ind nat (next g n2) (\lambda (n: nat).((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort O n) k)) \to (leq g (ASort O n0) (ASort O n2)))) (\lambda (H10: (eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort O (next g n2)) k))).(let H \def (eq_ind_r A (aplus g (ASort O (next g n0)) k) (\lambda (a: A).(eq A a (aplus g (ASort O (next g n2)) k))) H10 (aplus g (ASort O n0) (S k)) (aplus_sort_O_S_simpl g n0 k)) in (let H11 \def (eq_ind_r A (aplus g (ASort O (next g n2)) k) (\lambda (a: A).(eq A (aplus g (ASort O n0) (S k)) a)) H (aplus g (ASort O n2) (S k)) (aplus_sort_O_S_simpl g n2 k)) in (leq_sort g O O n0 n2 (S k) H11)))) n3 (sym_eq nat n3 (next g n2) H9))) h2 (sym_eq nat h2 O H8))) H7))) n1 (sym_eq nat n1 (next g n0) H5))) h1 (sym_eq nat h1 O H4))) H3)) H2 H0))) | (leq_head a1 a2 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort O (next g n0)))).(\lambda (H3: (eq A (AHead a2 a4) (ASort O (next g n2)))).((let H4 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H2) in (False_ind ((eq A (AHead a2 a4) (ASort O (next g n2))) \to ((leq g a1 a2) \to ((leq g a3 a4) \to (leq g (ASort O n0) (ASort O n2))))) H4)) H3 H0 H1)))]) in (H2 (refl_equal A (ASort O (next g n0))) (refl_equal A (ASort O (next g n2)))))) | (S n3) \Rightarrow (\lambda (H1: (leq g (asucc g (ASort O n0)) (asucc g (ASort (S n3) n2)))).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (a: A).(\lambda (a0: A).((eq A a (ASort O (next g n0))) \to ((eq A a0 (ASort n3 n2)) \to (leq g (ASort O n0) (ASort (S n3) n2))))))) with [(leq_sort h1 h2 n1 n3 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (ASort O (next g n0)))).(\lambda (H2: (eq A (ASort h2 n3) (ASort n3 n2))).((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort O (next g n0)) H1) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) (ASort O (next g n0)) H1) in (eq_ind nat O (\lambda (n: nat).((eq nat n1 (next g n0)) \to ((eq A (ASort h2 n3) (ASort n3 n2)) \to ((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort O n0) (ASort (S n3) n2)))))) (\lambda (H5: (eq nat n1 (next g n0))).(eq_ind nat (next g n0) (\lambda (n: nat).((eq A (ASort h2 n3) (ASort n3 n2)) \to ((eq A (aplus g (ASort O n) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort O n0) (ASort (S n3) n2))))) (\lambda (H6: (eq A (ASort h2 n3) (ASort n3 n2))).(let H7 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n3])) (ASort h2 n3) (ASort n3 n2) H6) in ((let H8 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h2])) (ASort h2 n3) (ASort n3 n2) H6) in (eq_ind nat n3 (\lambda (n: nat).((eq nat n3 n2) \to ((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n n3) k)) \to (leq g (ASort O n0) (ASort (S n3) n2))))) (\lambda (H9: (eq nat n3 n2)).(eq_ind nat n2 (\lambda (n: nat).((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n3 n) k)) \to (leq g (ASort O n0) (ASort (S n3) n2)))) (\lambda (H10: (eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n3 n2) k))).(let H \def (eq_ind_r A (aplus g (ASort O (next g n0)) k) (\lambda (a: A).(eq A a (aplus g (ASort n3 n2) k))) H10 (aplus g (ASort O n0) (S k)) (aplus_sort_O_S_simpl g n0 k)) in (let H11 \def (eq_ind_r A (aplus g (ASort n3 n2) k) (\lambda (a: A).(eq A (aplus g (ASort O n0) (S k)) a)) H (aplus g (ASort (S n3) n2) (S k)) (aplus_sort_S_S_simpl g n2 n3 k)) in (leq_sort g O (S n3) n0 n2 (S k) H11)))) n3 (sym_eq nat n3 n2 H9))) h2 (sym_eq nat h2 n3 H8))) H7))) n1 (sym_eq nat n1 (next g n0) H5))) h1 (sym_eq nat h1 O H4))) H3)) H2 H0))) | (leq_head a1 a2 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort O (next g n0)))).(\lambda (H3: (eq A (AHead a2 a4) (ASort n3 n2))).((let H4 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H2) in (False_ind ((eq A (AHead a2 a4) (ASort n3 n2)) \to ((leq g a1 a2) \to ((leq g a3 a4) \to (leq g (ASort O n0) (ASort (S n3) n2))))) H4)) H3 H0 H1)))]) in (H2 (refl_equal A (ASort O (next g n0))) (refl_equal A (ASort n3 n2)))))]) H0)) | (S n3) \Rightarrow (\lambda (H0: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort n1 n2)))).((match n1 return (\lambda (_: ?).(\lambda (n4: nat).((leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort n4 n2))) \to (leq g (ASort (S n3) n0) (ASort n4 n2))))) with [O \Rightarrow (\lambda (H1: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort O n2)))).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (a: A).(\lambda (a0: A).((eq A a (ASort n3 n0)) \to ((eq A a0 (ASort O (next g n2))) \to (leq g (ASort (S n3) n0) (ASort O n2))))))) with [(leq_sort h1 h2 n1 n3 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (ASort n3 n0))).(\lambda (H2: (eq A (ASort h2 n3) (ASort O (next g n2)))).((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort n3 n0) H1) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) (ASort n3 n0) H1) in (eq_ind nat n3 (\lambda (n: nat).((eq nat n1 n0) \to ((eq A (ASort h2 n3) (ASort O (next g n2))) \to ((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort (S n3) n0) (ASort O n2)))))) (\lambda (H5: (eq nat n1 n0)).(eq_ind nat n0 (\lambda (n: nat).((eq A (ASort h2 n3) (ASort O (next g n2))) \to ((eq A (aplus g (ASort n3 n) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort (S n3) n0) (ASort O n2))))) (\lambda (H6: (eq A (ASort h2 n3) (ASort O (next g n2)))).(let H7 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n3])) (ASort h2 n3) (ASort O (next g n2)) H6) in ((let H8 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h2])) (ASort h2 n3) (ASort O (next g n2)) H6) in (eq_ind nat O (\lambda (n: nat).((eq nat n3 (next g n2)) \to ((eq A (aplus g (ASort n3 n0) k) (aplus g (ASort n n3) k)) \to (leq g (ASort (S n3) n0) (ASort O n2))))) (\lambda (H9: (eq nat n3 (next g n2))).(eq_ind nat (next g n2) (\lambda (n: nat).((eq A (aplus g (ASort n3 n0) k) (aplus g (ASort O n) k)) \to (leq g (ASort (S n3) n0) (ASort O n2)))) (\lambda (H10: (eq A (aplus g (ASort n3 n0) k) (aplus g (ASort O (next g n2)) k))).(let H \def (eq_ind_r A (aplus g (ASort n3 n0) k) (\lambda (a: A).(eq A a (aplus g (ASort O (next g n2)) k))) H10 (aplus g (ASort (S n3) n0) (S k)) (aplus_sort_S_S_simpl g n0 n3 k)) in (let H11 \def (eq_ind_r A (aplus g (ASort O (next g n2)) k) (\lambda (a: A).(eq A (aplus g (ASort (S n3) n0) (S k)) a)) H (aplus g (ASort O n2) (S k)) (aplus_sort_O_S_simpl g n2 k)) in (leq_sort g (S n3) O n0 n2 (S k) H11)))) n3 (sym_eq nat n3 (next g n2) H9))) h2 (sym_eq nat h2 O H8))) H7))) n1 (sym_eq nat n1 n0 H5))) h1 (sym_eq nat h1 n3 H4))) H3)) H2 H0))) | (leq_head a1 a2 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort n3 n0))).(\lambda (H3: (eq A (AHead a2 a4) (ASort O (next g n2)))).((let H4 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n3 n0) H2) in (False_ind ((eq A (AHead a2 a4) (ASort O (next g n2))) \to ((leq g a1 a2) \to ((leq g a3 a4) \to (leq g (ASort (S n3) n0) (ASort O n2))))) H4)) H3 H0 H1)))]) in (H2 (refl_equal A (ASort n3 n0)) (refl_equal A (ASort O (next g n2)))))) | (S n4) \Rightarrow (\lambda (H1: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort (S n4) n2)))).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (a: A).(\lambda (a0: A).((eq A a (ASort n3 n0)) \to ((eq A a0 (ASort n4 n2)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))))) with [(leq_sort h1 h2 n3 n4 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n3) (ASort n3 n0))).(\lambda (H2: (eq A (ASort h2 n4) (ASort n4 n2))).((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n3])) (ASort h1 n3) (ASort n3 n0) H1) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n3) (ASort n3 n0) H1) in (eq_ind nat n3 (\lambda (n: nat).((eq nat n3 n0) \to ((eq A (ASort h2 n4) (ASort n4 n2)) \to ((eq A (aplus g (ASort n n3) k) (aplus g (ASort h2 n4) k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2)))))) (\lambda (H5: (eq nat n3 n0)).(eq_ind nat n0 (\lambda (n: nat).((eq A (ASort h2 n4) (ASort n4 n2)) \to ((eq A (aplus g (ASort n3 n) k) (aplus g (ASort h2 n4) k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))) (\lambda (H6: (eq A (ASort h2 n4) (ASort n4 n2))).(let H7 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n4])) (ASort h2 n4) (ASort n4 n2) H6) in ((let H8 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h2])) (ASort h2 n4) (ASort n4 n2) H6) in (eq_ind nat n4 (\lambda (n: nat).((eq nat n4 n2) \to ((eq A (aplus g (ASort n3 n0) k) (aplus g (ASort n n4) k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))) (\lambda (H9: (eq nat n4 n2)).(eq_ind nat n2 (\lambda (n: nat).((eq A (aplus g (ASort n3 n0) k) (aplus g (ASort n4 n) k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2)))) (\lambda (H10: (eq A (aplus g (ASort n3 n0) k) (aplus g (ASort n4 n2) k))).(let H \def (eq_ind_r A (aplus g (ASort n3 n0) k) (\lambda (a: A).(eq A a (aplus g (ASort n4 n2) k))) H10 (aplus g (ASort (S n3) n0) (S k)) (aplus_sort_S_S_simpl g n0 n3 k)) in (let H11 \def (eq_ind_r A (aplus g (ASort n4 n2) k) (\lambda (a: A).(eq A (aplus g (ASort (S n3) n0) (S k)) a)) H (aplus g (ASort (S n4) n2) (S k)) (aplus_sort_S_S_simpl g n2 n4 k)) in (leq_sort g (S n3) (S n4) n0 n2 (S k) H11)))) n4 (sym_eq nat n4 n2 H9))) h2 (sym_eq nat h2 n4 H8))) H7))) n3 (sym_eq nat n3 n0 H5))) h1 (sym_eq nat h1 n3 H4))) H3)) H2 H0))) | (leq_head a1 a2 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort n3 n0))).(\lambda (H3: (eq A (AHead a2 a4) (ASort n4 n2))).((let H4 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n3 n0) H2) in (False_ind ((eq A (AHead a2 a4) (ASort n4 n2)) \to ((leq g a1 a2) \to ((leq g a3 a4) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))) H4)) H3 H0 H1)))]) in (H2 (refl_equal A (ASort n3 n0)) (refl_equal A (ASort n4 n2)))))]) H0))]) H)))) (\lambda (a: A).(\lambda (H: (((leq g (asucc g (ASort n n0)) (asucc g a)) \to (leq g (ASort n n0) a)))).(\lambda (a0: A).(\lambda (H0: (((leq g (asucc g (ASort n n0)) (asucc g a0)) \to (leq g (ASort n n0) a0)))).(\lambda (H1: (leq g (asucc g (ASort n n0)) (asucc g (AHead a a0)))).((match n return (\lambda (_: ?).(\lambda (n1: nat).((((leq g (asucc g (ASort n1 n0)) (asucc g a)) \to (leq g (ASort n1 n0) a))) \to ((((leq g (asucc g (ASort n1 n0)) (asucc g a0)) \to (leq g (ASort n1 n0) a0))) \to ((leq g (asucc g (ASort n1 n0)) (asucc g (AHead a a0))) \to (leq g (ASort n1 n0) (AHead a a0))))))) with [O \Rightarrow (\lambda (_: (((leq g (asucc g (ASort O n0)) (asucc g a)) \to (leq g (ASort O n0) a)))).(\lambda (_: (((leq g (asucc g (ASort O n0)) (asucc g a0)) \to (leq g (ASort O n0) a0)))).(\lambda (H4: (leq g (asucc g (ASort O n0)) (asucc g (AHead a a0)))).(let H5 \def (match H4 return (\lambda (_: ?).(\lambda (a1: A).(\lambda (a2: A).((eq A a1 (ASort O (next g n0))) \to ((eq A a2 (AHead a (asucc g a0))) \to (leq g (ASort O n0) (AHead a a0))))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (ASort O (next g n0)))).(\lambda (H4: (eq A (ASort h2 n2) (AHead a (asucc g a0)))).((let H5 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort O (next g n0)) H3) in ((let H6 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) (ASort O (next g n0)) H3) in (eq_ind nat O (\lambda (n: nat).((eq nat n1 (next g n0)) \to ((eq A (ASort h2 n2) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort O n0) (AHead a a0)))))) (\lambda (H7: (eq nat n1 (next g n0))).(eq_ind nat (next g n0) (\lambda (n: nat).((eq A (ASort h2 n2) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort O n) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort O n0) (AHead a a0))))) (\lambda (H8: (eq A (ASort h2 n2) (AHead a (asucc g a0)))).(let H9 \def (eq_ind A (ASort h2 n2) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a (asucc g a0)) H8) in (False_ind ((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort O n0) (AHead a a0))) H9))) n1 (sym_eq nat n1 (next g n0) H7))) h1 (sym_eq nat h1 O H6))) H5)) H4 H2))) | (leq_head a1 a2 H2 a3 a4 H3) \Rightarrow (\lambda (H4: (eq A (AHead a1 a3) (ASort O (next g n0)))).(\lambda (H5: (eq A (AHead a2 a4) (AHead a (asucc g a0)))).((let H6 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H4) in (False_ind ((eq A (AHead a2 a4) (AHead a (asucc g a0))) \to ((leq g a1 a2) \to ((leq g a3 a4) \to (leq g (ASort O n0) (AHead a a0))))) H6)) H5 H2 H3)))]) in (H5 (refl_equal A (ASort O (next g n0))) (refl_equal A (AHead a (asucc g a0)))))))) | (S n1) \Rightarrow (\lambda (_: (((leq g (asucc g (ASort (S n1) n0)) (asucc g a)) \to (leq g (ASort (S n1) n0) a)))).(\lambda (_: (((leq g (asucc g (ASort (S n1) n0)) (asucc g a0)) \to (leq g (ASort (S n1) n0) a0)))).(\lambda (H4: (leq g (asucc g (ASort (S n1) n0)) (asucc g (AHead a a0)))).(let H5 \def (match H4 return (\lambda (_: ?).(\lambda (a1: A).(\lambda (a2: A).((eq A a1 (ASort n1 n0)) \to ((eq A a2 (AHead a (asucc g a0))) \to (leq g (ASort (S n1) n0) (AHead a a0))))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (ASort n1 n0))).(\lambda (H4: (eq A (ASort h2 n2) (AHead a (asucc g a0)))).((let H5 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort n1 n0) H3) in ((let H6 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) (ASort n1 n0) H3) in (eq_ind nat n1 (\lambda (n: nat).((eq nat n1 n0) \to ((eq A (ASort h2 n2) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort (S n1) n0) (AHead a a0)))))) (\lambda (H7: (eq nat n1 n0)).(eq_ind nat n0 (\lambda (n: nat).((eq A (ASort h2 n2) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort n1 n) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort (S n1) n0) (AHead a a0))))) (\lambda (H8: (eq A (ASort h2 n2) (AHead a (asucc g a0)))).(let H9 \def (eq_ind A (ASort h2 n2) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a (asucc g a0)) H8) in (False_ind ((eq A (aplus g (ASort n1 n0) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort (S n1) n0) (AHead a a0))) H9))) n1 (sym_eq nat n1 n0 H7))) h1 (sym_eq nat h1 n1 H6))) H5)) H4 H2))) | (leq_head a1 a2 H2 a3 a4 H3) \Rightarrow (\lambda (H4: (eq A (AHead a1 a3) (ASort n1 n0))).(\lambda (H5: (eq A (AHead a2 a4) (AHead a (asucc g a0)))).((let H6 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 n0) H4) in (False_ind ((eq A (AHead a2 a4) (AHead a (asucc g a0))) \to ((leq g a1 a2) \to ((leq g a3 a4) \to (leq g (ASort (S n1) n0) (AHead a a0))))) H6)) H5 H2 H3)))]) in (H5 (refl_equal A (ASort n1 n0)) (refl_equal A (AHead a (asucc g a0))))))))]) H H0 H1)))))) a2)))) (\lambda (a: A).(\lambda (_: ((\forall (a2: A).((leq g (asucc g a) (asucc g a2)) \to (leq g a a2))))).(\lambda (a0: A).(\lambda (H0: ((\forall (a2: A).((leq g (asucc g a0) (asucc g a2)) \to (leq g a0 a2))))).(\lambda (a2: A).(A_ind (\lambda (a3: A).((leq g (asucc g (AHead a a0)) (asucc g a3)) \to (leq g (AHead a a0) a3))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (H1: (leq g (asucc g (AHead a a0)) (asucc g (ASort n n0)))).((match n return (\lambda (_: ?).(\lambda (n1: nat).((leq g (asucc g (AHead a a0)) (asucc g (ASort n1 n0))) \to (leq g (AHead a a0) (ASort n1 n0))))) with [O \Rightarrow (\lambda (H2: (leq g (asucc g (AHead a a0)) (asucc g (ASort O n0)))).(let H3 \def (match H2 return (\lambda (_: ?).(\lambda (a1: A).(\lambda (a2: A).((eq A a1 (AHead a (asucc g a0))) \to ((eq A a2 (ASort O (next g n0))) \to (leq g (AHead a a0) (ASort O n0))))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (AHead a (asucc g a0)))).(\lambda (H4: (eq A (ASort h2 n2) (ASort O (next g n0)))).((let H5 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a (asucc g a0)) H3) in (False_ind ((eq A (ASort h2 n2) (ASort O (next g n0))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (AHead a a0) (ASort O n0)))) H5)) H4 H2))) | (leq_head a1 a2 H2 a3 a4 H3) \Rightarrow (\lambda (H4: (eq A (AHead a1 a3) (AHead a (asucc g a0)))).(\lambda (H5: (eq A (AHead a2 a4) (ASort O (next g n0)))).((let H6 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a1 a3) (AHead a (asucc g a0)) H4) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a3) (AHead a (asucc g a0)) H4) in (eq_ind A a (\lambda (a5: A).((eq A a3 (asucc g a0)) \to ((eq A (AHead a2 a4) (ASort O (next g n0))) \to ((leq g a5 a2) \to ((leq g a3 a4) \to (leq g (AHead a a0) (ASort O n0))))))) (\lambda (H8: (eq A a3 (asucc g a0))).(eq_ind A (asucc g a0) (\lambda (a5: A).((eq A (AHead a2 a4) (ASort O (next g n0))) \to ((leq g a a2) \to ((leq g a5 a4) \to (leq g (AHead a a0) (ASort O n0)))))) (\lambda (H9: (eq A (AHead a2 a4) (ASort O (next g n0)))).(let H10 \def (eq_ind A (AHead a2 a4) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H9) in (False_ind ((leq g a a2) \to ((leq g (asucc g a0) a4) \to (leq g (AHead a a0) (ASort O n0)))) H10))) a3 (sym_eq A a3 (asucc g a0) H8))) a1 (sym_eq A a1 a H7))) H6)) H5 H2 H3)))]) in (H3 (refl_equal A (AHead a (asucc g a0))) (refl_equal A (ASort O (next g n0)))))) | (S n1) \Rightarrow (\lambda (H2: (leq g (asucc g (AHead a a0)) (asucc g (ASort (S n1) n0)))).(let H3 \def (match H2 return (\lambda (_: ?).(\lambda (a1: A).(\lambda (a2: A).((eq A a1 (AHead a (asucc g a0))) \to ((eq A a2 (ASort n1 n0)) \to (leq g (AHead a a0) (ASort (S n1) n0))))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (AHead a (asucc g a0)))).(\lambda (H4: (eq A (ASort h2 n2) (ASort n1 n0))).((let H5 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a (asucc g a0)) H3) in (False_ind ((eq A (ASort h2 n2) (ASort n1 n0)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (AHead a a0) (ASort (S n1) n0)))) H5)) H4 H2))) | (leq_head a1 a2 H2 a3 a4 H3) \Rightarrow (\lambda (H4: (eq A (AHead a1 a3) (AHead a (asucc g a0)))).(\lambda (H5: (eq A (AHead a2 a4) (ASort n1 n0))).((let H6 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a1 a3) (AHead a (asucc g a0)) H4) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a3) (AHead a (asucc g a0)) H4) in (eq_ind A a (\lambda (a5: A).((eq A a3 (asucc g a0)) \to ((eq A (AHead a2 a4) (ASort n1 n0)) \to ((leq g a5 a2) \to ((leq g a3 a4) \to (leq g (AHead a a0) (ASort (S n1) n0))))))) (\lambda (H8: (eq A a3 (asucc g a0))).(eq_ind A (asucc g a0) (\lambda (a5: A).((eq A (AHead a2 a4) (ASort n1 n0)) \to ((leq g a a2) \to ((leq g a5 a4) \to (leq g (AHead a a0) (ASort (S n1) n0)))))) (\lambda (H9: (eq A (AHead a2 a4) (ASort n1 n0))).(let H10 \def (eq_ind A (AHead a2 a4) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 n0) H9) in (False_ind ((leq g a a2) \to ((leq g (asucc g a0) a4) \to (leq g (AHead a a0) (ASort (S n1) n0)))) H10))) a3 (sym_eq A a3 (asucc g a0) H8))) a1 (sym_eq A a1 a H7))) H6)) H5 H2 H3)))]) in (H3 (refl_equal A (AHead a (asucc g a0))) (refl_equal A (ASort n1 n0)))))]) H1)))) (\lambda (a3: A).(\lambda (_: (((leq g (asucc g (AHead a a0)) (asucc g a3)) \to (leq g (AHead a a0) a3)))).(\lambda (a4: A).(\lambda (_: (((leq g (asucc g (AHead a a0)) (asucc g a4)) \to (leq g (AHead a a0) a4)))).(\lambda (H3: (leq g (asucc g (AHead a a0)) (asucc g (AHead a3 a4)))).(let H4 \def (match H3 return (\lambda (_: ?).(\lambda (a1: A).(\lambda (a2: A).((eq A a1 (AHead a (asucc g a0))) \to ((eq A a2 (AHead a3 (asucc g a4))) \to (leq g (AHead a a0) (AHead a3 a4))))))) with [(leq_sort h1 h2 n1 n2 k H4) \Rightarrow (\lambda (H5: (eq A (ASort h1 n1) (AHead a (asucc g a0)))).(\lambda (H6: (eq A (ASort h2 n2) (AHead a3 (asucc g a4)))).((let H7 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a (asucc g a0)) H5) in (False_ind ((eq A (ASort h2 n2) (AHead a3 (asucc g a4))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (AHead a a0) (AHead a3 a4)))) H7)) H6 H4))) | (leq_head a3 a4 H4 a5 a6 H5) \Rightarrow (\lambda (H6: (eq A (AHead a3 a5) (AHead a (asucc g a0)))).(\lambda (H7: (eq A (AHead a4 a6) (AHead a3 (asucc g a4)))).((let H8 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a5 | (AHead _ a) \Rightarrow a])) (AHead a3 a5) (AHead a (asucc g a0)) H6) in ((let H9 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a3 | (AHead a _) \Rightarrow a])) (AHead a3 a5) (AHead a (asucc g a0)) H6) in (eq_ind A a (\lambda (a1: A).((eq A a5 (asucc g a0)) \to ((eq A (AHead a4 a6) (AHead a3 (asucc g a4))) \to ((leq g a1 a4) \to ((leq g a5 a6) \to (leq g (AHead a a0) (AHead a3 a4))))))) (\lambda (H10: (eq A a5 (asucc g a0))).(eq_ind A (asucc g a0) (\lambda (a1: A).((eq A (AHead a4 a6) (AHead a3 (asucc g a4))) \to ((leq g a a4) \to ((leq g a1 a6) \to (leq g (AHead a a0) (AHead a3 a4)))))) (\lambda (H11: (eq A (AHead a4 a6) (AHead a3 (asucc g a4)))).(let H12 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a6 | (AHead _ a) \Rightarrow a])) (AHead a4 a6) (AHead a3 (asucc g a4)) H11) in ((let H13 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a4 | (AHead a _) \Rightarrow a])) (AHead a4 a6) (AHead a3 (asucc g a4)) H11) in (eq_ind A a3 (\lambda (a1: A).((eq A a6 (asucc g a4)) \to ((leq g a a1) \to ((leq g (asucc g a0) a6) \to (leq g (AHead a a0) (AHead a3 a4)))))) (\lambda (H14: (eq A a6 (asucc g a4))).(eq_ind A (asucc g a4) (\lambda (a1: A).((leq g a a3) \to ((leq g (asucc g a0) a1) \to (leq g (AHead a a0) (AHead a3 a4))))) (\lambda (H15: (leq g a a3)).(\lambda (H16: (leq g (asucc g a0) (asucc g a4))).(leq_head g a a3 H15 a0 a4 (H0 a4 H16)))) a6 (sym_eq A a6 (asucc g a4) H14))) a4 (sym_eq A a4 a3 H13))) H12))) a5 (sym_eq A a5 (asucc g a0) H10))) a3 (sym_eq A a3 a H9))) H8)) H7 H4 H5)))]) in (H4 (refl_equal A (AHead a (asucc g a0))) (refl_equal A (AHead a3 (asucc g a4)))))))))) a2)))))) a1)). + \lambda (g: G).(\lambda (a1: A).(A_ind (\lambda (a: A).(\forall (a2: A).((leq g (asucc g a) (asucc g a2)) \to (leq g a a2)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (a2: A).(A_ind (\lambda (a: A).((leq g (asucc g (ASort n n0)) (asucc g a)) \to (leq g (ASort n n0) a))) (\lambda (n1: nat).(\lambda (n2: nat).(\lambda (H: (leq g (asucc g (ASort n n0)) (asucc g (ASort n1 n2)))).((match n return (\lambda (n3: nat).((leq g (asucc g (ASort n3 n0)) (asucc g (ASort n1 n2))) \to (leq g (ASort n3 n0) (ASort n1 n2)))) with [O \Rightarrow (\lambda (H0: (leq g (asucc g (ASort O n0)) (asucc g (ASort n1 n2)))).((match n1 return (\lambda (n3: nat).((leq g (asucc g (ASort O n0)) (asucc g (ASort n3 n2))) \to (leq g (ASort O n0) (ASort n3 n2)))) with [O \Rightarrow (\lambda (H1: (leq g (asucc g (ASort O n0)) (asucc g (ASort O n2)))).(let H2 \def (match H1 return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (ASort O (next g n0))) \to ((eq A a0 (ASort O (next g n2))) \to (leq g (ASort O n0) (ASort O n2))))))) with [(leq_sort h1 h2 n1 n3 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (ASort O (next g n0)))).(\lambda (H2: (eq A (ASort h2 n3) (ASort O (next g n2)))).((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort O (next g n0)) H1) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) (ASort O (next g n0)) H1) in (eq_ind nat O (\lambda (n: nat).((eq nat n1 (next g n0)) \to ((eq A (ASort h2 n3) (ASort O (next g n2))) \to ((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort O n0) (ASort O n2)))))) (\lambda (H5: (eq nat n1 (next g n0))).(eq_ind nat (next g n0) (\lambda (n: nat).((eq A (ASort h2 n3) (ASort O (next g n2))) \to ((eq A (aplus g (ASort O n) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort O n0) (ASort O n2))))) (\lambda (H6: (eq A (ASort h2 n3) (ASort O (next g n2)))).(let H7 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n3])) (ASort h2 n3) (ASort O (next g n2)) H6) in ((let H8 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h2])) (ASort h2 n3) (ASort O (next g n2)) H6) in (eq_ind nat O (\lambda (n: nat).((eq nat n3 (next g n2)) \to ((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n n3) k)) \to (leq g (ASort O n0) (ASort O n2))))) (\lambda (H9: (eq nat n3 (next g n2))).(eq_ind nat (next g n2) (\lambda (n: nat).((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort O n) k)) \to (leq g (ASort O n0) (ASort O n2)))) (\lambda (H10: (eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort O (next g n2)) k))).(let H \def (eq_ind_r A (aplus g (ASort O (next g n0)) k) (\lambda (a: A).(eq A a (aplus g (ASort O (next g n2)) k))) H10 (aplus g (ASort O n0) (S k)) (aplus_sort_O_S_simpl g n0 k)) in (let H11 \def (eq_ind_r A (aplus g (ASort O (next g n2)) k) (\lambda (a: A).(eq A (aplus g (ASort O n0) (S k)) a)) H (aplus g (ASort O n2) (S k)) (aplus_sort_O_S_simpl g n2 k)) in (leq_sort g O O n0 n2 (S k) H11)))) n3 (sym_eq nat n3 (next g n2) H9))) h2 (sym_eq nat h2 O H8))) H7))) n1 (sym_eq nat n1 (next g n0) H5))) h1 (sym_eq nat h1 O H4))) H3)) H2 H0))) | (leq_head a1 a2 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort O (next g n0)))).(\lambda (H3: (eq A (AHead a2 a4) (ASort O (next g n2)))).((let H4 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H2) in (False_ind ((eq A (AHead a2 a4) (ASort O (next g n2))) \to ((leq g a1 a2) \to ((leq g a3 a4) \to (leq g (ASort O n0) (ASort O n2))))) H4)) H3 H0 H1)))]) in (H2 (refl_equal A (ASort O (next g n0))) (refl_equal A (ASort O (next g n2)))))) | (S n3) \Rightarrow (\lambda (H1: (leq g (asucc g (ASort O n0)) (asucc g (ASort (S n3) n2)))).(let H2 \def (match H1 return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (ASort O (next g n0))) \to ((eq A a0 (ASort n3 n2)) \to (leq g (ASort O n0) (ASort (S n3) n2))))))) with [(leq_sort h1 h2 n1 n3 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (ASort O (next g n0)))).(\lambda (H2: (eq A (ASort h2 n3) (ASort n3 n2))).((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort O (next g n0)) H1) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) (ASort O (next g n0)) H1) in (eq_ind nat O (\lambda (n: nat).((eq nat n1 (next g n0)) \to ((eq A (ASort h2 n3) (ASort n3 n2)) \to ((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort O n0) (ASort (S n3) n2)))))) (\lambda (H5: (eq nat n1 (next g n0))).(eq_ind nat (next g n0) (\lambda (n: nat).((eq A (ASort h2 n3) (ASort n3 n2)) \to ((eq A (aplus g (ASort O n) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort O n0) (ASort (S n3) n2))))) (\lambda (H6: (eq A (ASort h2 n3) (ASort n3 n2))).(let H7 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n3])) (ASort h2 n3) (ASort n3 n2) H6) in ((let H8 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h2])) (ASort h2 n3) (ASort n3 n2) H6) in (eq_ind nat n3 (\lambda (n: nat).((eq nat n3 n2) \to ((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n n3) k)) \to (leq g (ASort O n0) (ASort (S n3) n2))))) (\lambda (H9: (eq nat n3 n2)).(eq_ind nat n2 (\lambda (n: nat).((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n3 n) k)) \to (leq g (ASort O n0) (ASort (S n3) n2)))) (\lambda (H10: (eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n3 n2) k))).(let H \def (eq_ind_r A (aplus g (ASort O (next g n0)) k) (\lambda (a: A).(eq A a (aplus g (ASort n3 n2) k))) H10 (aplus g (ASort O n0) (S k)) (aplus_sort_O_S_simpl g n0 k)) in (let H11 \def (eq_ind_r A (aplus g (ASort n3 n2) k) (\lambda (a: A).(eq A (aplus g (ASort O n0) (S k)) a)) H (aplus g (ASort (S n3) n2) (S k)) (aplus_sort_S_S_simpl g n2 n3 k)) in (leq_sort g O (S n3) n0 n2 (S k) H11)))) n3 (sym_eq nat n3 n2 H9))) h2 (sym_eq nat h2 n3 H8))) H7))) n1 (sym_eq nat n1 (next g n0) H5))) h1 (sym_eq nat h1 O H4))) H3)) H2 H0))) | (leq_head a1 a2 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort O (next g n0)))).(\lambda (H3: (eq A (AHead a2 a4) (ASort n3 n2))).((let H4 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H2) in (False_ind ((eq A (AHead a2 a4) (ASort n3 n2)) \to ((leq g a1 a2) \to ((leq g a3 a4) \to (leq g (ASort O n0) (ASort (S n3) n2))))) H4)) H3 H0 H1)))]) in (H2 (refl_equal A (ASort O (next g n0))) (refl_equal A (ASort n3 n2)))))]) H0)) | (S n3) \Rightarrow (\lambda (H0: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort n1 n2)))).((match n1 return (\lambda (n4: nat).((leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort n4 n2))) \to (leq g (ASort (S n3) n0) (ASort n4 n2)))) with [O \Rightarrow (\lambda (H1: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort O n2)))).(let H2 \def (match H1 return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (ASort n3 n0)) \to ((eq A a0 (ASort O (next g n2))) \to (leq g (ASort (S n3) n0) (ASort O n2))))))) with [(leq_sort h1 h2 n1 n3 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (ASort n3 n0))).(\lambda (H2: (eq A (ASort h2 n3) (ASort O (next g n2)))).((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort n3 n0) H1) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) (ASort n3 n0) H1) in (eq_ind nat n3 (\lambda (n: nat).((eq nat n1 n0) \to ((eq A (ASort h2 n3) (ASort O (next g n2))) \to ((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort (S n3) n0) (ASort O n2)))))) (\lambda (H5: (eq nat n1 n0)).(eq_ind nat n0 (\lambda (n: nat).((eq A (ASort h2 n3) (ASort O (next g n2))) \to ((eq A (aplus g (ASort n3 n) k) (aplus g (ASort h2 n3) k)) \to (leq g (ASort (S n3) n0) (ASort O n2))))) (\lambda (H6: (eq A (ASort h2 n3) (ASort O (next g n2)))).(let H7 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n3])) (ASort h2 n3) (ASort O (next g n2)) H6) in ((let H8 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h2])) (ASort h2 n3) (ASort O (next g n2)) H6) in (eq_ind nat O (\lambda (n: nat).((eq nat n3 (next g n2)) \to ((eq A (aplus g (ASort n3 n0) k) (aplus g (ASort n n3) k)) \to (leq g (ASort (S n3) n0) (ASort O n2))))) (\lambda (H9: (eq nat n3 (next g n2))).(eq_ind nat (next g n2) (\lambda (n: nat).((eq A (aplus g (ASort n3 n0) k) (aplus g (ASort O n) k)) \to (leq g (ASort (S n3) n0) (ASort O n2)))) (\lambda (H10: (eq A (aplus g (ASort n3 n0) k) (aplus g (ASort O (next g n2)) k))).(let H \def (eq_ind_r A (aplus g (ASort n3 n0) k) (\lambda (a: A).(eq A a (aplus g (ASort O (next g n2)) k))) H10 (aplus g (ASort (S n3) n0) (S k)) (aplus_sort_S_S_simpl g n0 n3 k)) in (let H11 \def (eq_ind_r A (aplus g (ASort O (next g n2)) k) (\lambda (a: A).(eq A (aplus g (ASort (S n3) n0) (S k)) a)) H (aplus g (ASort O n2) (S k)) (aplus_sort_O_S_simpl g n2 k)) in (leq_sort g (S n3) O n0 n2 (S k) H11)))) n3 (sym_eq nat n3 (next g n2) H9))) h2 (sym_eq nat h2 O H8))) H7))) n1 (sym_eq nat n1 n0 H5))) h1 (sym_eq nat h1 n3 H4))) H3)) H2 H0))) | (leq_head a1 a2 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort n3 n0))).(\lambda (H3: (eq A (AHead a2 a4) (ASort O (next g n2)))).((let H4 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n3 n0) H2) in (False_ind ((eq A (AHead a2 a4) (ASort O (next g n2))) \to ((leq g a1 a2) \to ((leq g a3 a4) \to (leq g (ASort (S n3) n0) (ASort O n2))))) H4)) H3 H0 H1)))]) in (H2 (refl_equal A (ASort n3 n0)) (refl_equal A (ASort O (next g n2)))))) | (S n4) \Rightarrow (\lambda (H1: (leq g (asucc g (ASort (S n3) n0)) (asucc g (ASort (S n4) n2)))).(let H2 \def (match H1 return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (ASort n3 n0)) \to ((eq A a0 (ASort n4 n2)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))))) with [(leq_sort h1 h2 n3 n4 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n3) (ASort n3 n0))).(\lambda (H2: (eq A (ASort h2 n4) (ASort n4 n2))).((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n3])) (ASort h1 n3) (ASort n3 n0) H1) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n3) (ASort n3 n0) H1) in (eq_ind nat n3 (\lambda (n: nat).((eq nat n3 n0) \to ((eq A (ASort h2 n4) (ASort n4 n2)) \to ((eq A (aplus g (ASort n n3) k) (aplus g (ASort h2 n4) k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2)))))) (\lambda (H5: (eq nat n3 n0)).(eq_ind nat n0 (\lambda (n: nat).((eq A (ASort h2 n4) (ASort n4 n2)) \to ((eq A (aplus g (ASort n3 n) k) (aplus g (ASort h2 n4) k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))) (\lambda (H6: (eq A (ASort h2 n4) (ASort n4 n2))).(let H7 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n4])) (ASort h2 n4) (ASort n4 n2) H6) in ((let H8 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h2])) (ASort h2 n4) (ASort n4 n2) H6) in (eq_ind nat n4 (\lambda (n: nat).((eq nat n4 n2) \to ((eq A (aplus g (ASort n3 n0) k) (aplus g (ASort n n4) k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))) (\lambda (H9: (eq nat n4 n2)).(eq_ind nat n2 (\lambda (n: nat).((eq A (aplus g (ASort n3 n0) k) (aplus g (ASort n4 n) k)) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2)))) (\lambda (H10: (eq A (aplus g (ASort n3 n0) k) (aplus g (ASort n4 n2) k))).(let H \def (eq_ind_r A (aplus g (ASort n3 n0) k) (\lambda (a: A).(eq A a (aplus g (ASort n4 n2) k))) H10 (aplus g (ASort (S n3) n0) (S k)) (aplus_sort_S_S_simpl g n0 n3 k)) in (let H11 \def (eq_ind_r A (aplus g (ASort n4 n2) k) (\lambda (a: A).(eq A (aplus g (ASort (S n3) n0) (S k)) a)) H (aplus g (ASort (S n4) n2) (S k)) (aplus_sort_S_S_simpl g n2 n4 k)) in (leq_sort g (S n3) (S n4) n0 n2 (S k) H11)))) n4 (sym_eq nat n4 n2 H9))) h2 (sym_eq nat h2 n4 H8))) H7))) n3 (sym_eq nat n3 n0 H5))) h1 (sym_eq nat h1 n3 H4))) H3)) H2 H0))) | (leq_head a1 a2 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort n3 n0))).(\lambda (H3: (eq A (AHead a2 a4) (ASort n4 n2))).((let H4 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n3 n0) H2) in (False_ind ((eq A (AHead a2 a4) (ASort n4 n2)) \to ((leq g a1 a2) \to ((leq g a3 a4) \to (leq g (ASort (S n3) n0) (ASort (S n4) n2))))) H4)) H3 H0 H1)))]) in (H2 (refl_equal A (ASort n3 n0)) (refl_equal A (ASort n4 n2)))))]) H0))]) H)))) (\lambda (a: A).(\lambda (H: (((leq g (asucc g (ASort n n0)) (asucc g a)) \to (leq g (ASort n n0) a)))).(\lambda (a0: A).(\lambda (H0: (((leq g (asucc g (ASort n n0)) (asucc g a0)) \to (leq g (ASort n n0) a0)))).(\lambda (H1: (leq g (asucc g (ASort n n0)) (asucc g (AHead a a0)))).((match n return (\lambda (n1: nat).((((leq g (asucc g (ASort n1 n0)) (asucc g a)) \to (leq g (ASort n1 n0) a))) \to ((((leq g (asucc g (ASort n1 n0)) (asucc g a0)) \to (leq g (ASort n1 n0) a0))) \to ((leq g (asucc g (ASort n1 n0)) (asucc g (AHead a a0))) \to (leq g (ASort n1 n0) (AHead a a0)))))) with [O \Rightarrow (\lambda (_: (((leq g (asucc g (ASort O n0)) (asucc g a)) \to (leq g (ASort O n0) a)))).(\lambda (_: (((leq g (asucc g (ASort O n0)) (asucc g a0)) \to (leq g (ASort O n0) a0)))).(\lambda (H4: (leq g (asucc g (ASort O n0)) (asucc g (AHead a a0)))).(let H5 \def (match H4 return (\lambda (a1: A).(\lambda (a2: A).(\lambda (_: (leq ? a1 a2)).((eq A a1 (ASort O (next g n0))) \to ((eq A a2 (AHead a (asucc g a0))) \to (leq g (ASort O n0) (AHead a a0))))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (ASort O (next g n0)))).(\lambda (H4: (eq A (ASort h2 n2) (AHead a (asucc g a0)))).((let H5 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort O (next g n0)) H3) in ((let H6 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) (ASort O (next g n0)) H3) in (eq_ind nat O (\lambda (n: nat).((eq nat n1 (next g n0)) \to ((eq A (ASort h2 n2) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort O n0) (AHead a a0)))))) (\lambda (H7: (eq nat n1 (next g n0))).(eq_ind nat (next g n0) (\lambda (n: nat).((eq A (ASort h2 n2) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort O n) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort O n0) (AHead a a0))))) (\lambda (H8: (eq A (ASort h2 n2) (AHead a (asucc g a0)))).(let H9 \def (eq_ind A (ASort h2 n2) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a (asucc g a0)) H8) in (False_ind ((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort O n0) (AHead a a0))) H9))) n1 (sym_eq nat n1 (next g n0) H7))) h1 (sym_eq nat h1 O H6))) H5)) H4 H2))) | (leq_head a1 a2 H2 a3 a4 H3) \Rightarrow (\lambda (H4: (eq A (AHead a1 a3) (ASort O (next g n0)))).(\lambda (H5: (eq A (AHead a2 a4) (AHead a (asucc g a0)))).((let H6 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H4) in (False_ind ((eq A (AHead a2 a4) (AHead a (asucc g a0))) \to ((leq g a1 a2) \to ((leq g a3 a4) \to (leq g (ASort O n0) (AHead a a0))))) H6)) H5 H2 H3)))]) in (H5 (refl_equal A (ASort O (next g n0))) (refl_equal A (AHead a (asucc g a0)))))))) | (S n1) \Rightarrow (\lambda (_: (((leq g (asucc g (ASort (S n1) n0)) (asucc g a)) \to (leq g (ASort (S n1) n0) a)))).(\lambda (_: (((leq g (asucc g (ASort (S n1) n0)) (asucc g a0)) \to (leq g (ASort (S n1) n0) a0)))).(\lambda (H4: (leq g (asucc g (ASort (S n1) n0)) (asucc g (AHead a a0)))).(let H5 \def (match H4 return (\lambda (a1: A).(\lambda (a2: A).(\lambda (_: (leq ? a1 a2)).((eq A a1 (ASort n1 n0)) \to ((eq A a2 (AHead a (asucc g a0))) \to (leq g (ASort (S n1) n0) (AHead a a0))))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (ASort n1 n0))).(\lambda (H4: (eq A (ASort h2 n2) (AHead a (asucc g a0)))).((let H5 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort n1 n0) H3) in ((let H6 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) (ASort n1 n0) H3) in (eq_ind nat n1 (\lambda (n: nat).((eq nat n1 n0) \to ((eq A (ASort h2 n2) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort (S n1) n0) (AHead a a0)))))) (\lambda (H7: (eq nat n1 n0)).(eq_ind nat n0 (\lambda (n: nat).((eq A (ASort h2 n2) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort n1 n) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort (S n1) n0) (AHead a a0))))) (\lambda (H8: (eq A (ASort h2 n2) (AHead a (asucc g a0)))).(let H9 \def (eq_ind A (ASort h2 n2) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a (asucc g a0)) H8) in (False_ind ((eq A (aplus g (ASort n1 n0) k) (aplus g (ASort h2 n2) k)) \to (leq g (ASort (S n1) n0) (AHead a a0))) H9))) n1 (sym_eq nat n1 n0 H7))) h1 (sym_eq nat h1 n1 H6))) H5)) H4 H2))) | (leq_head a1 a2 H2 a3 a4 H3) \Rightarrow (\lambda (H4: (eq A (AHead a1 a3) (ASort n1 n0))).(\lambda (H5: (eq A (AHead a2 a4) (AHead a (asucc g a0)))).((let H6 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 n0) H4) in (False_ind ((eq A (AHead a2 a4) (AHead a (asucc g a0))) \to ((leq g a1 a2) \to ((leq g a3 a4) \to (leq g (ASort (S n1) n0) (AHead a a0))))) H6)) H5 H2 H3)))]) in (H5 (refl_equal A (ASort n1 n0)) (refl_equal A (AHead a (asucc g a0))))))))]) H H0 H1)))))) a2)))) (\lambda (a: A).(\lambda (_: ((\forall (a2: A).((leq g (asucc g a) (asucc g a2)) \to (leq g a a2))))).(\lambda (a0: A).(\lambda (H0: ((\forall (a2: A).((leq g (asucc g a0) (asucc g a2)) \to (leq g a0 a2))))).(\lambda (a2: A).(A_ind (\lambda (a3: A).((leq g (asucc g (AHead a a0)) (asucc g a3)) \to (leq g (AHead a a0) a3))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (H1: (leq g (asucc g (AHead a a0)) (asucc g (ASort n n0)))).((match n return (\lambda (n1: nat).((leq g (asucc g (AHead a a0)) (asucc g (ASort n1 n0))) \to (leq g (AHead a a0) (ASort n1 n0)))) with [O \Rightarrow (\lambda (H2: (leq g (asucc g (AHead a a0)) (asucc g (ASort O n0)))).(let H3 \def (match H2 return (\lambda (a1: A).(\lambda (a2: A).(\lambda (_: (leq ? a1 a2)).((eq A a1 (AHead a (asucc g a0))) \to ((eq A a2 (ASort O (next g n0))) \to (leq g (AHead a a0) (ASort O n0))))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (AHead a (asucc g a0)))).(\lambda (H4: (eq A (ASort h2 n2) (ASort O (next g n0)))).((let H5 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a (asucc g a0)) H3) in (False_ind ((eq A (ASort h2 n2) (ASort O (next g n0))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (AHead a a0) (ASort O n0)))) H5)) H4 H2))) | (leq_head a1 a2 H2 a3 a4 H3) \Rightarrow (\lambda (H4: (eq A (AHead a1 a3) (AHead a (asucc g a0)))).(\lambda (H5: (eq A (AHead a2 a4) (ASort O (next g n0)))).((let H6 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a1 a3) (AHead a (asucc g a0)) H4) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a3) (AHead a (asucc g a0)) H4) in (eq_ind A a (\lambda (a5: A).((eq A a3 (asucc g a0)) \to ((eq A (AHead a2 a4) (ASort O (next g n0))) \to ((leq g a5 a2) \to ((leq g a3 a4) \to (leq g (AHead a a0) (ASort O n0))))))) (\lambda (H8: (eq A a3 (asucc g a0))).(eq_ind A (asucc g a0) (\lambda (a5: A).((eq A (AHead a2 a4) (ASort O (next g n0))) \to ((leq g a a2) \to ((leq g a5 a4) \to (leq g (AHead a a0) (ASort O n0)))))) (\lambda (H9: (eq A (AHead a2 a4) (ASort O (next g n0)))).(let H10 \def (eq_ind A (AHead a2 a4) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H9) in (False_ind ((leq g a a2) \to ((leq g (asucc g a0) a4) \to (leq g (AHead a a0) (ASort O n0)))) H10))) a3 (sym_eq A a3 (asucc g a0) H8))) a1 (sym_eq A a1 a H7))) H6)) H5 H2 H3)))]) in (H3 (refl_equal A (AHead a (asucc g a0))) (refl_equal A (ASort O (next g n0)))))) | (S n1) \Rightarrow (\lambda (H2: (leq g (asucc g (AHead a a0)) (asucc g (ASort (S n1) n0)))).(let H3 \def (match H2 return (\lambda (a1: A).(\lambda (a2: A).(\lambda (_: (leq ? a1 a2)).((eq A a1 (AHead a (asucc g a0))) \to ((eq A a2 (ASort n1 n0)) \to (leq g (AHead a a0) (ASort (S n1) n0))))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (AHead a (asucc g a0)))).(\lambda (H4: (eq A (ASort h2 n2) (ASort n1 n0))).((let H5 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a (asucc g a0)) H3) in (False_ind ((eq A (ASort h2 n2) (ASort n1 n0)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (AHead a a0) (ASort (S n1) n0)))) H5)) H4 H2))) | (leq_head a1 a2 H2 a3 a4 H3) \Rightarrow (\lambda (H4: (eq A (AHead a1 a3) (AHead a (asucc g a0)))).(\lambda (H5: (eq A (AHead a2 a4) (ASort n1 n0))).((let H6 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a1 a3) (AHead a (asucc g a0)) H4) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a3) (AHead a (asucc g a0)) H4) in (eq_ind A a (\lambda (a5: A).((eq A a3 (asucc g a0)) \to ((eq A (AHead a2 a4) (ASort n1 n0)) \to ((leq g a5 a2) \to ((leq g a3 a4) \to (leq g (AHead a a0) (ASort (S n1) n0))))))) (\lambda (H8: (eq A a3 (asucc g a0))).(eq_ind A (asucc g a0) (\lambda (a5: A).((eq A (AHead a2 a4) (ASort n1 n0)) \to ((leq g a a2) \to ((leq g a5 a4) \to (leq g (AHead a a0) (ASort (S n1) n0)))))) (\lambda (H9: (eq A (AHead a2 a4) (ASort n1 n0))).(let H10 \def (eq_ind A (AHead a2 a4) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 n0) H9) in (False_ind ((leq g a a2) \to ((leq g (asucc g a0) a4) \to (leq g (AHead a a0) (ASort (S n1) n0)))) H10))) a3 (sym_eq A a3 (asucc g a0) H8))) a1 (sym_eq A a1 a H7))) H6)) H5 H2 H3)))]) in (H3 (refl_equal A (AHead a (asucc g a0))) (refl_equal A (ASort n1 n0)))))]) H1)))) (\lambda (a3: A).(\lambda (_: (((leq g (asucc g (AHead a a0)) (asucc g a3)) \to (leq g (AHead a a0) a3)))).(\lambda (a4: A).(\lambda (_: (((leq g (asucc g (AHead a a0)) (asucc g a4)) \to (leq g (AHead a a0) a4)))).(\lambda (H3: (leq g (asucc g (AHead a a0)) (asucc g (AHead a3 a4)))).(let H4 \def (match H3 return (\lambda (a1: A).(\lambda (a2: A).(\lambda (_: (leq ? a1 a2)).((eq A a1 (AHead a (asucc g a0))) \to ((eq A a2 (AHead a3 (asucc g a4))) \to (leq g (AHead a a0) (AHead a3 a4))))))) with [(leq_sort h1 h2 n1 n2 k H4) \Rightarrow (\lambda (H5: (eq A (ASort h1 n1) (AHead a (asucc g a0)))).(\lambda (H6: (eq A (ASort h2 n2) (AHead a3 (asucc g a4)))).((let H7 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a (asucc g a0)) H5) in (False_ind ((eq A (ASort h2 n2) (AHead a3 (asucc g a4))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (AHead a a0) (AHead a3 a4)))) H7)) H6 H4))) | (leq_head a3 a4 H4 a5 a6 H5) \Rightarrow (\lambda (H6: (eq A (AHead a3 a5) (AHead a (asucc g a0)))).(\lambda (H7: (eq A (AHead a4 a6) (AHead a3 (asucc g a4)))).((let H8 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a5 | (AHead _ a) \Rightarrow a])) (AHead a3 a5) (AHead a (asucc g a0)) H6) in ((let H9 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead a _) \Rightarrow a])) (AHead a3 a5) (AHead a (asucc g a0)) H6) in (eq_ind A a (\lambda (a1: A).((eq A a5 (asucc g a0)) \to ((eq A (AHead a4 a6) (AHead a3 (asucc g a4))) \to ((leq g a1 a4) \to ((leq g a5 a6) \to (leq g (AHead a a0) (AHead a3 a4))))))) (\lambda (H10: (eq A a5 (asucc g a0))).(eq_ind A (asucc g a0) (\lambda (a1: A).((eq A (AHead a4 a6) (AHead a3 (asucc g a4))) \to ((leq g a a4) \to ((leq g a1 a6) \to (leq g (AHead a a0) (AHead a3 a4)))))) (\lambda (H11: (eq A (AHead a4 a6) (AHead a3 (asucc g a4)))).(let H12 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a6 | (AHead _ a) \Rightarrow a])) (AHead a4 a6) (AHead a3 (asucc g a4)) H11) in ((let H13 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead a _) \Rightarrow a])) (AHead a4 a6) (AHead a3 (asucc g a4)) H11) in (eq_ind A a3 (\lambda (a1: A).((eq A a6 (asucc g a4)) \to ((leq g a a1) \to ((leq g (asucc g a0) a6) \to (leq g (AHead a a0) (AHead a3 a4)))))) (\lambda (H14: (eq A a6 (asucc g a4))).(eq_ind A (asucc g a4) (\lambda (a1: A).((leq g a a3) \to ((leq g (asucc g a0) a1) \to (leq g (AHead a a0) (AHead a3 a4))))) (\lambda (H15: (leq g a a3)).(\lambda (H16: (leq g (asucc g a0) (asucc g a4))).(leq_head g a a3 H15 a0 a4 (H0 a4 H16)))) a6 (sym_eq A a6 (asucc g a4) H14))) a4 (sym_eq A a4 a3 H13))) H12))) a5 (sym_eq A a5 (asucc g a0) H10))) a3 (sym_eq A a3 a H9))) H8)) H7 H4 H5)))]) in (H4 (refl_equal A (AHead a (asucc g a0))) (refl_equal A (AHead a3 (asucc g a4)))))))))) a2)))))) a1)). theorem aplus_asort_O_simpl: \forall (g: G).(\forall (h: nat).(\forall (n: nat).(eq A (aplus g (ASort O n) h) (ASort O (next_plus g n h))))) @@ -1505,7 +1505,7 @@ theorem aplus_asort_O_simpl: theorem aplus_asort_le_simpl: \forall (g: G).(\forall (h: nat).(\forall (k: nat).(\forall (n: nat).((le h k) \to (eq A (aplus g (ASort k n) h) (ASort (minus k h) n)))))) \def - \lambda (g: G).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (k: nat).(\forall (n0: nat).((le n k) \to (eq A (aplus g (ASort k n0) n) (ASort (minus k n) n0)))))) (\lambda (k: nat).(\lambda (n: nat).(\lambda (_: (le O k)).(eq_ind nat k (\lambda (n0: nat).(eq A (ASort k n) (ASort n0 n))) (refl_equal A (ASort k n)) (minus k O) (minus_n_O k))))) (\lambda (h0: nat).(\lambda (H: ((\forall (k: nat).(\forall (n: nat).((le h0 k) \to (eq A (aplus g (ASort k n) h0) (ASort (minus k h0) n))))))).(\lambda (k: nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).((le (S h0) n) \to (eq A (asucc g (aplus g (ASort n n0) h0)) (ASort (minus n (S h0)) n0))))) (\lambda (n: nat).(\lambda (H0: (le (S h0) O)).(ex2_ind nat (\lambda (n0: nat).(eq nat O (S n0))) (\lambda (n0: nat).(le h0 n0)) (eq A (asucc g (aplus g (ASort O n) h0)) (ASort (minus O (S h0)) n)) (\lambda (x: nat).(\lambda (H1: (eq nat O (S x))).(\lambda (_: (le h0 x)).(let H3 \def (eq_ind nat O (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x) H1) in (False_ind (eq A (asucc g (aplus g (ASort O n) h0)) (ASort (minus O (S h0)) n)) H3))))) (le_gen_S h0 O H0)))) (\lambda (n: nat).(\lambda (_: ((\forall (n0: nat).((le (S h0) n) \to (eq A (asucc g (aplus g (ASort n n0) h0)) (ASort (minus n (S h0)) n0)))))).(\lambda (n0: nat).(\lambda (H1: (le (S h0) (S n))).(eq_ind A (aplus g (asucc g (ASort (S n) n0)) h0) (\lambda (a: A).(eq A a (ASort (minus (S n) (S h0)) n0))) (H n n0 (le_S_n h0 n H1)) (asucc g (aplus g (ASort (S n) n0) h0)) (aplus_asucc g h0 (ASort (S n) n0))))))) k)))) h)). + \lambda (g: G).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (k: nat).(\forall (n0: nat).((le n k) \to (eq A (aplus g (ASort k n0) n) (ASort (minus k n) n0)))))) (\lambda (k: nat).(\lambda (n: nat).(\lambda (_: (le O k)).(eq_ind nat k (\lambda (n0: nat).(eq A (ASort k n) (ASort n0 n))) (refl_equal A (ASort k n)) (minus k O) (minus_n_O k))))) (\lambda (h0: nat).(\lambda (H: ((\forall (k: nat).(\forall (n: nat).((le h0 k) \to (eq A (aplus g (ASort k n) h0) (ASort (minus k h0) n))))))).(\lambda (k: nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).((le (S h0) n) \to (eq A (asucc g (aplus g (ASort n n0) h0)) (ASort (minus n (S h0)) n0))))) (\lambda (n: nat).(\lambda (H0: (le (S h0) O)).(ex2_ind nat (\lambda (n0: nat).(eq nat O (S n0))) (\lambda (n0: nat).(le h0 n0)) (eq A (asucc g (aplus g (ASort O n) h0)) (ASort (minus O (S h0)) n)) (\lambda (x: nat).(\lambda (H1: (eq nat O (S x))).(\lambda (_: (le h0 x)).(let H3 \def (eq_ind nat O (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x) H1) in (False_ind (eq A (asucc g (aplus g (ASort O n) h0)) (ASort (minus O (S h0)) n)) H3))))) (le_gen_S h0 O H0)))) (\lambda (n: nat).(\lambda (_: ((\forall (n0: nat).((le (S h0) n) \to (eq A (asucc g (aplus g (ASort n n0) h0)) (ASort (minus n (S h0)) n0)))))).(\lambda (n0: nat).(\lambda (H1: (le (S h0) (S n))).(eq_ind A (aplus g (asucc g (ASort (S n) n0)) h0) (\lambda (a: A).(eq A a (ASort (minus (S n) (S h0)) n0))) (H n n0 (le_S_n h0 n H1)) (asucc g (aplus g (ASort (S n) n0) h0)) (aplus_asucc g h0 (ASort (S n) n0))))))) k)))) h)). theorem aplus_asort_simpl: \forall (g: G).(\forall (h: nat).(\forall (k: nat).(\forall (n: nat).(eq A (aplus g (ASort k n) h) (ASort (minus k h) (next_plus g n (minus h k))))))) @@ -1520,7 +1520,7 @@ theorem aplus_ahead_simpl: theorem aplus_asucc_false: \forall (g: G).(\forall (a: A).(\forall (h: nat).((eq A (aplus g (asucc g a) h) a) \to (\forall (P: Prop).P)))) \def - \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(\forall (h: nat).((eq A (aplus g (asucc g a0) h) a0) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (h: nat).(\lambda (H: (eq A (aplus g (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) h) (ASort n n0))).(\lambda (P: Prop).((match n return (\lambda (_: ?).(\lambda (n1: nat).((eq A (aplus g (match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) h) (ASort n1 n0)) \to P))) with [O \Rightarrow (\lambda (H0: (eq A (aplus g (ASort O (next g n0)) h) (ASort O n0))).(let H1 \def (eq_ind A (aplus g (ASort O (next g n0)) h) (\lambda (a: A).(eq A a (ASort O n0))) H0 (ASort (minus O h) (next_plus g (next g n0) (minus h O))) (aplus_asort_simpl g h O (next g n0))) in (let H2 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow ((let rec next_plus (g: G) (n: nat) (i: nat) on i: nat \def (match i with [O \Rightarrow n | (S i0) \Rightarrow (next g (next_plus g n i0))]) in next_plus) g (next g n0) (minus h O))])) (ASort (minus O h) (next_plus g (next g n0) (minus h O))) (ASort O n0) H1) in (let H3 \def (eq_ind_r nat (minus h O) (\lambda (n: nat).(eq nat (next_plus g (next g n0) n) n0)) H2 h (minus_n_O h)) in (le_lt_false (next_plus g (next g n0) h) n0 (eq_ind nat (next_plus g (next g n0) h) (\lambda (n1: nat).(le (next_plus g (next g n0) h) n1)) (le_n (next_plus g (next g n0) h)) n0 H3) (next_plus_lt g h n0) P))))) | (S n1) \Rightarrow (\lambda (H0: (eq A (aplus g (ASort n1 n0) h) (ASort (S n1) n0))).(let H1 \def (eq_ind A (aplus g (ASort n1 n0) h) (\lambda (a: A).(eq A a (ASort (S n1) n0))) H0 (ASort (minus n1 h) (next_plus g n0 (minus h n1))) (aplus_asort_simpl g h n1 n0)) in (let H2 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow ((let rec minus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow O | (S k) \Rightarrow (match m with [O \Rightarrow (S k) | (S l) \Rightarrow (minus k l)])])) in minus) n1 h)])) (ASort (minus n1 h) (next_plus g n0 (minus h n1))) (ASort (S n1) n0) H1) in ((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow ((let rec next_plus (g: G) (n: nat) (i: nat) on i: nat \def (match i with [O \Rightarrow n | (S i0) \Rightarrow (next g (next_plus g n i0))]) in next_plus) g n0 (minus h n1))])) (ASort (minus n1 h) (next_plus g n0 (minus h n1))) (ASort (S n1) n0) H1) in (\lambda (H4: (eq nat (minus n1 h) (S n1))).(le_Sx_x n1 (eq_ind nat (minus n1 h) (\lambda (n2: nat).(le n2 n1)) (minus_le n1 h) (S n1) H4) P))) H2))))]) H)))))) (\lambda (a0: A).(\lambda (_: ((\forall (h: nat).((eq A (aplus g (asucc g a0) h) a0) \to (\forall (P: Prop).P))))).(\lambda (a1: A).(\lambda (H0: ((\forall (h: nat).((eq A (aplus g (asucc g a1) h) a1) \to (\forall (P: Prop).P))))).(\lambda (h: nat).(\lambda (H1: (eq A (aplus g (AHead a0 (asucc g a1)) h) (AHead a0 a1))).(\lambda (P: Prop).(let H2 \def (eq_ind A (aplus g (AHead a0 (asucc g a1)) h) (\lambda (a: A).(eq A a (AHead a0 a1))) H1 (AHead a0 (aplus g (asucc g a1) h)) (aplus_ahead_simpl g h a0 (asucc g a1))) in (let H3 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow ((let rec aplus (g: G) (a: A) (n: nat) on n: A \def (match n with [O \Rightarrow a | (S n0) \Rightarrow (asucc g (aplus g a n0))]) in aplus) g (asucc g a1) h) | (AHead _ a) \Rightarrow a])) (AHead a0 (aplus g (asucc g a1) h)) (AHead a0 a1) H2) in (H0 h H3 P)))))))))) a)). + \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(\forall (h: nat).((eq A (aplus g (asucc g a0) h) a0) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (h: nat).(\lambda (H: (eq A (aplus g (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) h) (ASort n n0))).(\lambda (P: Prop).((match n return (\lambda (n1: nat).((eq A (aplus g (match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) h) (ASort n1 n0)) \to P)) with [O \Rightarrow (\lambda (H0: (eq A (aplus g (ASort O (next g n0)) h) (ASort O n0))).(let H1 \def (eq_ind A (aplus g (ASort O (next g n0)) h) (\lambda (a: A).(eq A a (ASort O n0))) H0 (ASort (minus O h) (next_plus g (next g n0) (minus h O))) (aplus_asort_simpl g h O (next g n0))) in (let H2 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow ((let rec next_plus (g: G) (n: nat) (i: nat) on i: nat \def (match i with [O \Rightarrow n | (S i0) \Rightarrow (next g (next_plus g n i0))]) in next_plus) g (next g n0) (minus h O))])) (ASort (minus O h) (next_plus g (next g n0) (minus h O))) (ASort O n0) H1) in (let H3 \def (eq_ind_r nat (minus h O) (\lambda (n: nat).(eq nat (next_plus g (next g n0) n) n0)) H2 h (minus_n_O h)) in (le_lt_false (next_plus g (next g n0) h) n0 (eq_ind nat (next_plus g (next g n0) h) (\lambda (n1: nat).(le (next_plus g (next g n0) h) n1)) (le_n (next_plus g (next g n0) h)) n0 H3) (next_plus_lt g h n0) P))))) | (S n1) \Rightarrow (\lambda (H0: (eq A (aplus g (ASort n1 n0) h) (ASort (S n1) n0))).(let H1 \def (eq_ind A (aplus g (ASort n1 n0) h) (\lambda (a: A).(eq A a (ASort (S n1) n0))) H0 (ASort (minus n1 h) (next_plus g n0 (minus h n1))) (aplus_asort_simpl g h n1 n0)) in (let H2 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow ((let rec minus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow O | (S k) \Rightarrow (match m with [O \Rightarrow (S k) | (S l) \Rightarrow (minus k l)])])) in minus) n1 h)])) (ASort (minus n1 h) (next_plus g n0 (minus h n1))) (ASort (S n1) n0) H1) in ((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow ((let rec next_plus (g: G) (n: nat) (i: nat) on i: nat \def (match i with [O \Rightarrow n | (S i0) \Rightarrow (next g (next_plus g n i0))]) in next_plus) g n0 (minus h n1))])) (ASort (minus n1 h) (next_plus g n0 (minus h n1))) (ASort (S n1) n0) H1) in (\lambda (H4: (eq nat (minus n1 h) (S n1))).(le_Sx_x n1 (eq_ind nat (minus n1 h) (\lambda (n2: nat).(le n2 n1)) (minus_le n1 h) (S n1) H4) P))) H2))))]) H)))))) (\lambda (a0: A).(\lambda (_: ((\forall (h: nat).((eq A (aplus g (asucc g a0) h) a0) \to (\forall (P: Prop).P))))).(\lambda (a1: A).(\lambda (H0: ((\forall (h: nat).((eq A (aplus g (asucc g a1) h) a1) \to (\forall (P: Prop).P))))).(\lambda (h: nat).(\lambda (H1: (eq A (aplus g (AHead a0 (asucc g a1)) h) (AHead a0 a1))).(\lambda (P: Prop).(let H2 \def (eq_ind A (aplus g (AHead a0 (asucc g a1)) h) (\lambda (a: A).(eq A a (AHead a0 a1))) H1 (AHead a0 (aplus g (asucc g a1) h)) (aplus_ahead_simpl g h a0 (asucc g a1))) in (let H3 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow ((let rec aplus (g: G) (a: A) (n: nat) on n: A \def (match n with [O \Rightarrow a | (S n0) \Rightarrow (asucc g (aplus g a n0))]) in aplus) g (asucc g a1) h) | (AHead _ a) \Rightarrow a])) (AHead a0 (aplus g (asucc g a1) h)) (AHead a0 a1) H2) in (H0 h H3 P)))))))))) a)). theorem aplus_inj: \forall (g: G).(\forall (h1: nat).(\forall (h2: nat).(\forall (a: A).((eq A (aplus g a h1) (aplus g a h2)) \to (eq nat h1 h2))))) @@ -1530,7 +1530,7 @@ theorem aplus_inj: theorem ahead_inj_snd: \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (a3: A).(\forall (a4: A).((leq g (AHead a1 a2) (AHead a3 a4)) \to (leq g a2 a4)))))) \def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (a3: A).(\lambda (a4: A).(\lambda (H: (leq g (AHead a1 a2) (AHead a3 a4))).(let H0 \def (match H return (\lambda (_: ?).(\lambda (a: A).(\lambda (a0: A).((eq A a (AHead a1 a2)) \to ((eq A a0 (AHead a3 a4)) \to (leq g a2 a4)))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (AHead a1 a2))).(\lambda (H2: (eq A (ASort h2 n2) (AHead a3 a4))).((let H3 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a1 a2) H1) in (False_ind ((eq A (ASort h2 n2) (AHead a3 a4)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (leq g a2 a4))) H3)) H2 H0))) | (leq_head a0 a5 H0 a6 a7 H1) \Rightarrow (\lambda (H2: (eq A (AHead a0 a6) (AHead a1 a2))).(\lambda (H3: (eq A (AHead a5 a7) (AHead a3 a4))).((let H4 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a6 | (AHead _ a) \Rightarrow a])) (AHead a0 a6) (AHead a1 a2) H2) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a0 | (AHead a _) \Rightarrow a])) (AHead a0 a6) (AHead a1 a2) H2) in (eq_ind A a1 (\lambda (a: A).((eq A a6 a2) \to ((eq A (AHead a5 a7) (AHead a3 a4)) \to ((leq g a a5) \to ((leq g a6 a7) \to (leq g a2 a4)))))) (\lambda (H6: (eq A a6 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a5 a7) (AHead a3 a4)) \to ((leq g a1 a5) \to ((leq g a a7) \to (leq g a2 a4))))) (\lambda (H7: (eq A (AHead a5 a7) (AHead a3 a4))).(let H8 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a7 | (AHead _ a) \Rightarrow a])) (AHead a5 a7) (AHead a3 a4) H7) in ((let H9 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a5 | (AHead a _) \Rightarrow a])) (AHead a5 a7) (AHead a3 a4) H7) in (eq_ind A a3 (\lambda (a: A).((eq A a7 a4) \to ((leq g a1 a) \to ((leq g a2 a7) \to (leq g a2 a4))))) (\lambda (H10: (eq A a7 a4)).(eq_ind A a4 (\lambda (a: A).((leq g a1 a3) \to ((leq g a2 a) \to (leq g a2 a4)))) (\lambda (_: (leq g a1 a3)).(\lambda (H12: (leq g a2 a4)).H12)) a7 (sym_eq A a7 a4 H10))) a5 (sym_eq A a5 a3 H9))) H8))) a6 (sym_eq A a6 a2 H6))) a0 (sym_eq A a0 a1 H5))) H4)) H3 H0 H1)))]) in (H0 (refl_equal A (AHead a1 a2)) (refl_equal A (AHead a3 a4))))))))). + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (a3: A).(\lambda (a4: A).(\lambda (H: (leq g (AHead a1 a2) (AHead a3 a4))).(let H0 \def (match H return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (AHead a1 a2)) \to ((eq A a0 (AHead a3 a4)) \to (leq g a2 a4)))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (AHead a1 a2))).(\lambda (H2: (eq A (ASort h2 n2) (AHead a3 a4))).((let H3 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a1 a2) H1) in (False_ind ((eq A (ASort h2 n2) (AHead a3 a4)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (leq g a2 a4))) H3)) H2 H0))) | (leq_head a0 a5 H0 a6 a7 H1) \Rightarrow (\lambda (H2: (eq A (AHead a0 a6) (AHead a1 a2))).(\lambda (H3: (eq A (AHead a5 a7) (AHead a3 a4))).((let H4 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a6 | (AHead _ a) \Rightarrow a])) (AHead a0 a6) (AHead a1 a2) H2) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | (AHead a _) \Rightarrow a])) (AHead a0 a6) (AHead a1 a2) H2) in (eq_ind A a1 (\lambda (a: A).((eq A a6 a2) \to ((eq A (AHead a5 a7) (AHead a3 a4)) \to ((leq g a a5) \to ((leq g a6 a7) \to (leq g a2 a4)))))) (\lambda (H6: (eq A a6 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a5 a7) (AHead a3 a4)) \to ((leq g a1 a5) \to ((leq g a a7) \to (leq g a2 a4))))) (\lambda (H7: (eq A (AHead a5 a7) (AHead a3 a4))).(let H8 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a7 | (AHead _ a) \Rightarrow a])) (AHead a5 a7) (AHead a3 a4) H7) in ((let H9 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a5 | (AHead a _) \Rightarrow a])) (AHead a5 a7) (AHead a3 a4) H7) in (eq_ind A a3 (\lambda (a: A).((eq A a7 a4) \to ((leq g a1 a) \to ((leq g a2 a7) \to (leq g a2 a4))))) (\lambda (H10: (eq A a7 a4)).(eq_ind A a4 (\lambda (a: A).((leq g a1 a3) \to ((leq g a2 a) \to (leq g a2 a4)))) (\lambda (_: (leq g a1 a3)).(\lambda (H12: (leq g a2 a4)).H12)) a7 (sym_eq A a7 a4 H10))) a5 (sym_eq A a5 a3 H9))) H8))) a6 (sym_eq A a6 a2 H6))) a0 (sym_eq A a0 a1 H5))) H4)) H3 H0 H1)))]) in (H0 (refl_equal A (AHead a1 a2)) (refl_equal A (AHead a3 a4))))))))). theorem leq_refl: \forall (g: G).(\forall (a: A).(leq g a a)) @@ -1555,22 +1555,22 @@ theorem leq_sym: theorem leq_trans: \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (\forall (a3: A).((leq g a2 a3) \to (leq g a1 a3)))))) \def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(\forall (a3: A).((leq g a0 a3) \to (leq g a a3))))) (\lambda (h1: nat).(\lambda (h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda (H0: (eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k))).(\lambda (a3: A).(\lambda (H1: (leq g (ASort h2 n2) a3)).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (a: A).(\lambda (a0: A).((eq A a (ASort h2 n2)) \to ((eq A a0 a3) \to (leq g (ASort h1 n1) a3)))))) with [(leq_sort h0 h3 n0 n3 k0 H1) \Rightarrow (\lambda (H2: (eq A (ASort h0 n0) (ASort h2 n2))).(\lambda (H3: (eq A (ASort h3 n3) a3)).((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n0])) (ASort h0 n0) (ASort h2 n2) H2) in ((let H5 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h0])) (ASort h0 n0) (ASort h2 n2) H2) in (eq_ind nat h2 (\lambda (n: nat).((eq nat n0 n2) \to ((eq A (ASort h3 n3) a3) \to ((eq A (aplus g (ASort n n0) k0) (aplus g (ASort h3 n3) k0)) \to (leq g (ASort h1 n1) a3))))) (\lambda (H6: (eq nat n0 n2)).(eq_ind nat n2 (\lambda (n: nat).((eq A (ASort h3 n3) a3) \to ((eq A (aplus g (ASort h2 n) k0) (aplus g (ASort h3 n3) k0)) \to (leq g (ASort h1 n1) a3)))) (\lambda (H7: (eq A (ASort h3 n3) a3)).(eq_ind A (ASort h3 n3) (\lambda (a: A).((eq A (aplus g (ASort h2 n2) k0) (aplus g (ASort h3 n3) k0)) \to (leq g (ASort h1 n1) a))) (\lambda (H8: (eq A (aplus g (ASort h2 n2) k0) (aplus g (ASort h3 n3) k0))).(lt_le_e k k0 (leq g (ASort h1 n1) (ASort h3 n3)) (\lambda (H9: (lt k k0)).(let H_y \def (aplus_reg_r g (ASort h1 n1) (ASort h2 n2) k k H0 (minus k0 k)) in (let H10 \def (eq_ind_r nat (plus (minus k0 k) k) (\lambda (n: nat).(eq A (aplus g (ASort h1 n1) n) (aplus g (ASort h2 n2) n))) H_y k0 (le_plus_minus_sym k k0 (le_S_n k k0 (le_S (S k) k0 H9)))) in (leq_sort g h1 h3 n1 n3 k0 (trans_eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort h2 n2) k0) (aplus g (ASort h3 n3) k0) H10 H8))))) (\lambda (H9: (le k0 k)).(let H_y \def (aplus_reg_r g (ASort h2 n2) (ASort h3 n3) k0 k0 H8 (minus k k0)) in (let H10 \def (eq_ind_r nat (plus (minus k k0) k0) (\lambda (n: nat).(eq A (aplus g (ASort h2 n2) n) (aplus g (ASort h3 n3) n))) H_y k (le_plus_minus_sym k0 k H9)) in (leq_sort g h1 h3 n1 n3 k (trans_eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k) (aplus g (ASort h3 n3) k) H0 H10))))))) a3 H7)) n0 (sym_eq nat n0 n2 H6))) h0 (sym_eq nat h0 h2 H5))) H4)) H3 H1))) | (leq_head a1 a2 H1 a0 a4 H2) \Rightarrow (\lambda (H3: (eq A (AHead a1 a0) (ASort h2 n2))).(\lambda (H4: (eq A (AHead a2 a4) a3)).((let H5 \def (eq_ind A (AHead a1 a0) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort h2 n2) H3) in (False_ind ((eq A (AHead a2 a4) a3) \to ((leq g a1 a2) \to ((leq g a0 a4) \to (leq g (ASort h1 n1) a3)))) H5)) H4 H1 H2)))]) in (H2 (refl_equal A (ASort h2 n2)) (refl_equal A a3))))))))))) (\lambda (a3: A).(\lambda (a4: A).(\lambda (_: (leq g a3 a4)).(\lambda (H1: ((\forall (a5: A).((leq g a4 a5) \to (leq g a3 a5))))).(\lambda (a5: A).(\lambda (a6: A).(\lambda (_: (leq g a5 a6)).(\lambda (H3: ((\forall (a3: A).((leq g a6 a3) \to (leq g a5 a3))))).(\lambda (a0: A).(\lambda (H4: (leq g (AHead a4 a6) a0)).(let H5 \def (match H4 return (\lambda (_: ?).(\lambda (a: A).(\lambda (a1: A).((eq A a (AHead a4 a6)) \to ((eq A a1 a0) \to (leq g (AHead a3 a5) a0)))))) with [(leq_sort h1 h2 n1 n2 k H4) \Rightarrow (\lambda (H5: (eq A (ASort h1 n1) (AHead a4 a6))).(\lambda (H6: (eq A (ASort h2 n2) a0)).((let H7 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a4 a6) H5) in (False_ind ((eq A (ASort h2 n2) a0) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (AHead a3 a5) a0))) H7)) H6 H4))) | (leq_head a5 a6 H4 a7 a8 H5) \Rightarrow (\lambda (H6: (eq A (AHead a5 a7) (AHead a4 a6))).(\lambda (H7: (eq A (AHead a6 a8) a0)).((let H8 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a7 | (AHead _ a) \Rightarrow a])) (AHead a5 a7) (AHead a4 a6) H6) in ((let H9 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a5 | (AHead a _) \Rightarrow a])) (AHead a5 a7) (AHead a4 a6) H6) in (eq_ind A a4 (\lambda (a: A).((eq A a7 a6) \to ((eq A (AHead a6 a8) a0) \to ((leq g a a6) \to ((leq g a7 a8) \to (leq g (AHead a3 a5) a0)))))) (\lambda (H10: (eq A a7 a6)).(eq_ind A a6 (\lambda (a: A).((eq A (AHead a6 a8) a0) \to ((leq g a4 a6) \to ((leq g a a8) \to (leq g (AHead a3 a5) a0))))) (\lambda (H11: (eq A (AHead a6 a8) a0)).(eq_ind A (AHead a6 a8) (\lambda (a: A).((leq g a4 a6) \to ((leq g a6 a8) \to (leq g (AHead a3 a5) a)))) (\lambda (H12: (leq g a4 a6)).(\lambda (H13: (leq g a6 a8)).(leq_head g a3 a6 (H1 a6 H12) a5 a8 (H3 a8 H13)))) a0 H11)) a7 (sym_eq A a7 a6 H10))) a5 (sym_eq A a5 a4 H9))) H8)) H7 H4 H5)))]) in (H5 (refl_equal A (AHead a4 a6)) (refl_equal A a0))))))))))))) a1 a2 H)))). + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(\forall (a3: A).((leq g a0 a3) \to (leq g a a3))))) (\lambda (h1: nat).(\lambda (h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda (H0: (eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k))).(\lambda (a3: A).(\lambda (H1: (leq g (ASort h2 n2) a3)).(let H2 \def (match H1 return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (ASort h2 n2)) \to ((eq A a0 a3) \to (leq g (ASort h1 n1) a3)))))) with [(leq_sort h0 h3 n0 n3 k0 H1) \Rightarrow (\lambda (H2: (eq A (ASort h0 n0) (ASort h2 n2))).(\lambda (H3: (eq A (ASort h3 n3) a3)).((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n0])) (ASort h0 n0) (ASort h2 n2) H2) in ((let H5 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h0])) (ASort h0 n0) (ASort h2 n2) H2) in (eq_ind nat h2 (\lambda (n: nat).((eq nat n0 n2) \to ((eq A (ASort h3 n3) a3) \to ((eq A (aplus g (ASort n n0) k0) (aplus g (ASort h3 n3) k0)) \to (leq g (ASort h1 n1) a3))))) (\lambda (H6: (eq nat n0 n2)).(eq_ind nat n2 (\lambda (n: nat).((eq A (ASort h3 n3) a3) \to ((eq A (aplus g (ASort h2 n) k0) (aplus g (ASort h3 n3) k0)) \to (leq g (ASort h1 n1) a3)))) (\lambda (H7: (eq A (ASort h3 n3) a3)).(eq_ind A (ASort h3 n3) (\lambda (a: A).((eq A (aplus g (ASort h2 n2) k0) (aplus g (ASort h3 n3) k0)) \to (leq g (ASort h1 n1) a))) (\lambda (H8: (eq A (aplus g (ASort h2 n2) k0) (aplus g (ASort h3 n3) k0))).(lt_le_e k k0 (leq g (ASort h1 n1) (ASort h3 n3)) (\lambda (H9: (lt k k0)).(let H_y \def (aplus_reg_r g (ASort h1 n1) (ASort h2 n2) k k H0 (minus k0 k)) in (let H10 \def (eq_ind_r nat (plus (minus k0 k) k) (\lambda (n: nat).(eq A (aplus g (ASort h1 n1) n) (aplus g (ASort h2 n2) n))) H_y k0 (le_plus_minus_sym k k0 (le_S_n k k0 (le_S (S k) k0 H9)))) in (leq_sort g h1 h3 n1 n3 k0 (trans_eq A (aplus g (ASort h1 n1) k0) (aplus g (ASort h2 n2) k0) (aplus g (ASort h3 n3) k0) H10 H8))))) (\lambda (H9: (le k0 k)).(let H_y \def (aplus_reg_r g (ASort h2 n2) (ASort h3 n3) k0 k0 H8 (minus k k0)) in (let H10 \def (eq_ind_r nat (plus (minus k k0) k0) (\lambda (n: nat).(eq A (aplus g (ASort h2 n2) n) (aplus g (ASort h3 n3) n))) H_y k (le_plus_minus_sym k0 k H9)) in (leq_sort g h1 h3 n1 n3 k (trans_eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k) (aplus g (ASort h3 n3) k) H0 H10))))))) a3 H7)) n0 (sym_eq nat n0 n2 H6))) h0 (sym_eq nat h0 h2 H5))) H4)) H3 H1))) | (leq_head a1 a2 H1 a0 a4 H2) \Rightarrow (\lambda (H3: (eq A (AHead a1 a0) (ASort h2 n2))).(\lambda (H4: (eq A (AHead a2 a4) a3)).((let H5 \def (eq_ind A (AHead a1 a0) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort h2 n2) H3) in (False_ind ((eq A (AHead a2 a4) a3) \to ((leq g a1 a2) \to ((leq g a0 a4) \to (leq g (ASort h1 n1) a3)))) H5)) H4 H1 H2)))]) in (H2 (refl_equal A (ASort h2 n2)) (refl_equal A a3))))))))))) (\lambda (a3: A).(\lambda (a4: A).(\lambda (_: (leq g a3 a4)).(\lambda (H1: ((\forall (a5: A).((leq g a4 a5) \to (leq g a3 a5))))).(\lambda (a5: A).(\lambda (a6: A).(\lambda (_: (leq g a5 a6)).(\lambda (H3: ((\forall (a3: A).((leq g a6 a3) \to (leq g a5 a3))))).(\lambda (a0: A).(\lambda (H4: (leq g (AHead a4 a6) a0)).(let H5 \def (match H4 return (\lambda (a: A).(\lambda (a1: A).(\lambda (_: (leq ? a a1)).((eq A a (AHead a4 a6)) \to ((eq A a1 a0) \to (leq g (AHead a3 a5) a0)))))) with [(leq_sort h1 h2 n1 n2 k H4) \Rightarrow (\lambda (H5: (eq A (ASort h1 n1) (AHead a4 a6))).(\lambda (H6: (eq A (ASort h2 n2) a0)).((let H7 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a4 a6) H5) in (False_ind ((eq A (ASort h2 n2) a0) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to (leq g (AHead a3 a5) a0))) H7)) H6 H4))) | (leq_head a5 a6 H4 a7 a8 H5) \Rightarrow (\lambda (H6: (eq A (AHead a5 a7) (AHead a4 a6))).(\lambda (H7: (eq A (AHead a6 a8) a0)).((let H8 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a7 | (AHead _ a) \Rightarrow a])) (AHead a5 a7) (AHead a4 a6) H6) in ((let H9 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a5 | (AHead a _) \Rightarrow a])) (AHead a5 a7) (AHead a4 a6) H6) in (eq_ind A a4 (\lambda (a: A).((eq A a7 a6) \to ((eq A (AHead a6 a8) a0) \to ((leq g a a6) \to ((leq g a7 a8) \to (leq g (AHead a3 a5) a0)))))) (\lambda (H10: (eq A a7 a6)).(eq_ind A a6 (\lambda (a: A).((eq A (AHead a6 a8) a0) \to ((leq g a4 a6) \to ((leq g a a8) \to (leq g (AHead a3 a5) a0))))) (\lambda (H11: (eq A (AHead a6 a8) a0)).(eq_ind A (AHead a6 a8) (\lambda (a: A).((leq g a4 a6) \to ((leq g a6 a8) \to (leq g (AHead a3 a5) a)))) (\lambda (H12: (leq g a4 a6)).(\lambda (H13: (leq g a6 a8)).(leq_head g a3 a6 (H1 a6 H12) a5 a8 (H3 a8 H13)))) a0 H11)) a7 (sym_eq A a7 a6 H10))) a5 (sym_eq A a5 a4 H9))) H8)) H7 H4 H5)))]) in (H5 (refl_equal A (AHead a4 a6)) (refl_equal A a0))))))))))))) a1 a2 H)))). theorem leq_ahead_false: \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g (AHead a1 a2) a1) \to (\forall (P: Prop).P)))) \def - \lambda (g: G).(\lambda (a1: A).(A_ind (\lambda (a: A).(\forall (a2: A).((leq g (AHead a a2) a) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (a2: A).(\lambda (H: (leq g (AHead (ASort n n0) a2) (ASort n n0))).(\lambda (P: Prop).((match n return (\lambda (_: ?).(\lambda (n1: nat).((leq g (AHead (ASort n1 n0) a2) (ASort n1 n0)) \to P))) with [O \Rightarrow (\lambda (H0: (leq g (AHead (ASort O n0) a2) (ASort O n0))).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (a: A).(\lambda (a0: A).((eq A a (AHead (ASort O n0) a2)) \to ((eq A a0 (ASort O n0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (AHead (ASort O n0) a2))).(\lambda (H2: (eq A (ASort h2 n2) (ASort O n0))).((let H3 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead (ASort O n0) a2) H1) in (False_ind ((eq A (ASort h2 n2) (ASort O n0)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H3)) H2 H0))) | (leq_head a1 a0 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (AHead (ASort O n0) a2))).(\lambda (H3: (eq A (AHead a0 a4) (ASort O n0))).((let H4 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a1 a3) (AHead (ASort O n0) a2) H2) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a3) (AHead (ASort O n0) a2) H2) in (eq_ind A (ASort O n0) (\lambda (a: A).((eq A a3 a2) \to ((eq A (AHead a0 a4) (ASort O n0)) \to ((leq g a a0) \to ((leq g a3 a4) \to P))))) (\lambda (H6: (eq A a3 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a0 a4) (ASort O n0)) \to ((leq g (ASort O n0) a0) \to ((leq g a a4) \to P)))) (\lambda (H7: (eq A (AHead a0 a4) (ASort O n0))).(let H8 \def (eq_ind A (AHead a0 a4) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O n0) H7) in (False_ind ((leq g (ASort O n0) a0) \to ((leq g a2 a4) \to P)) H8))) a3 (sym_eq A a3 a2 H6))) a1 (sym_eq A a1 (ASort O n0) H5))) H4)) H3 H0 H1)))]) in (H1 (refl_equal A (AHead (ASort O n0) a2)) (refl_equal A (ASort O n0))))) | (S n1) \Rightarrow (\lambda (H0: (leq g (AHead (ASort (S n1) n0) a2) (ASort (S n1) n0))).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (a: A).(\lambda (a0: A).((eq A a (AHead (ASort (S n1) n0) a2)) \to ((eq A a0 (ASort (S n1) n0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (AHead (ASort (S n1) n0) a2))).(\lambda (H2: (eq A (ASort h2 n2) (ASort (S n1) n0))).((let H3 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead (ASort (S n1) n0) a2) H1) in (False_ind ((eq A (ASort h2 n2) (ASort (S n1) n0)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H3)) H2 H0))) | (leq_head a1 a0 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (AHead (ASort (S n1) n0) a2))).(\lambda (H3: (eq A (AHead a0 a4) (ASort (S n1) n0))).((let H4 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a1 a3) (AHead (ASort (S n1) n0) a2) H2) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a3) (AHead (ASort (S n1) n0) a2) H2) in (eq_ind A (ASort (S n1) n0) (\lambda (a: A).((eq A a3 a2) \to ((eq A (AHead a0 a4) (ASort (S n1) n0)) \to ((leq g a a0) \to ((leq g a3 a4) \to P))))) (\lambda (H6: (eq A a3 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a0 a4) (ASort (S n1) n0)) \to ((leq g (ASort (S n1) n0) a0) \to ((leq g a a4) \to P)))) (\lambda (H7: (eq A (AHead a0 a4) (ASort (S n1) n0))).(let H8 \def (eq_ind A (AHead a0 a4) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort (S n1) n0) H7) in (False_ind ((leq g (ASort (S n1) n0) a0) \to ((leq g a2 a4) \to P)) H8))) a3 (sym_eq A a3 a2 H6))) a1 (sym_eq A a1 (ASort (S n1) n0) H5))) H4)) H3 H0 H1)))]) in (H1 (refl_equal A (AHead (ASort (S n1) n0) a2)) (refl_equal A (ASort (S n1) n0)))))]) H)))))) (\lambda (a: A).(\lambda (H: ((\forall (a2: A).((leq g (AHead a a2) a) \to (\forall (P: Prop).P))))).(\lambda (a0: A).(\lambda (_: ((\forall (a2: A).((leq g (AHead a0 a2) a0) \to (\forall (P: Prop).P))))).(\lambda (a2: A).(\lambda (H1: (leq g (AHead (AHead a a0) a2) (AHead a a0))).(\lambda (P: Prop).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (a1: A).(\lambda (a3: A).((eq A a1 (AHead (AHead a a0) a2)) \to ((eq A a3 (AHead a a0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (AHead (AHead a a0) a2))).(\lambda (H4: (eq A (ASort h2 n2) (AHead a a0))).((let H5 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead (AHead a a0) a2) H3) in (False_ind ((eq A (ASort h2 n2) (AHead a a0)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H5)) H4 H2))) | (leq_head a1 a3 H2 a4 a5 H3) \Rightarrow (\lambda (H4: (eq A (AHead a1 a4) (AHead (AHead a a0) a2))).(\lambda (H5: (eq A (AHead a3 a5) (AHead a a0))).((let H6 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a1 a4) (AHead (AHead a a0) a2) H4) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a4) (AHead (AHead a a0) a2) H4) in (eq_ind A (AHead a a0) (\lambda (a6: A).((eq A a4 a2) \to ((eq A (AHead a3 a5) (AHead a a0)) \to ((leq g a6 a3) \to ((leq g a4 a5) \to P))))) (\lambda (H8: (eq A a4 a2)).(eq_ind A a2 (\lambda (a2: A).((eq A (AHead a3 a5) (AHead a a0)) \to ((leq g (AHead a a0) a3) \to ((leq g a2 a5) \to P)))) (\lambda (H9: (eq A (AHead a3 a5) (AHead a a0))).(let H10 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a5 | (AHead _ a) \Rightarrow a])) (AHead a3 a5) (AHead a a0) H9) in ((let H11 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a3 | (AHead a _) \Rightarrow a])) (AHead a3 a5) (AHead a a0) H9) in (eq_ind A a (\lambda (a6: A).((eq A a5 a0) \to ((leq g (AHead a a0) a6) \to ((leq g a2 a5) \to P)))) (\lambda (H12: (eq A a5 a0)).(eq_ind A a0 (\lambda (a6: A).((leq g (AHead a a0) a) \to ((leq g a2 a6) \to P))) (\lambda (H13: (leq g (AHead a a0) a)).(\lambda (_: (leq g a2 a0)).(H a0 H13 P))) a5 (sym_eq A a5 a0 H12))) a3 (sym_eq A a3 a H11))) H10))) a4 (sym_eq A a4 a2 H8))) a1 (sym_eq A a1 (AHead a a0) H7))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A (AHead (AHead a a0) a2)) (refl_equal A (AHead a a0))))))))))) a1)). + \lambda (g: G).(\lambda (a1: A).(A_ind (\lambda (a: A).(\forall (a2: A).((leq g (AHead a a2) a) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (a2: A).(\lambda (H: (leq g (AHead (ASort n n0) a2) (ASort n n0))).(\lambda (P: Prop).((match n return (\lambda (n1: nat).((leq g (AHead (ASort n1 n0) a2) (ASort n1 n0)) \to P)) with [O \Rightarrow (\lambda (H0: (leq g (AHead (ASort O n0) a2) (ASort O n0))).(let H1 \def (match H0 return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (AHead (ASort O n0) a2)) \to ((eq A a0 (ASort O n0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (AHead (ASort O n0) a2))).(\lambda (H2: (eq A (ASort h2 n2) (ASort O n0))).((let H3 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead (ASort O n0) a2) H1) in (False_ind ((eq A (ASort h2 n2) (ASort O n0)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H3)) H2 H0))) | (leq_head a1 a0 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (AHead (ASort O n0) a2))).(\lambda (H3: (eq A (AHead a0 a4) (ASort O n0))).((let H4 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a1 a3) (AHead (ASort O n0) a2) H2) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a3) (AHead (ASort O n0) a2) H2) in (eq_ind A (ASort O n0) (\lambda (a: A).((eq A a3 a2) \to ((eq A (AHead a0 a4) (ASort O n0)) \to ((leq g a a0) \to ((leq g a3 a4) \to P))))) (\lambda (H6: (eq A a3 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a0 a4) (ASort O n0)) \to ((leq g (ASort O n0) a0) \to ((leq g a a4) \to P)))) (\lambda (H7: (eq A (AHead a0 a4) (ASort O n0))).(let H8 \def (eq_ind A (AHead a0 a4) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O n0) H7) in (False_ind ((leq g (ASort O n0) a0) \to ((leq g a2 a4) \to P)) H8))) a3 (sym_eq A a3 a2 H6))) a1 (sym_eq A a1 (ASort O n0) H5))) H4)) H3 H0 H1)))]) in (H1 (refl_equal A (AHead (ASort O n0) a2)) (refl_equal A (ASort O n0))))) | (S n1) \Rightarrow (\lambda (H0: (leq g (AHead (ASort (S n1) n0) a2) (ASort (S n1) n0))).(let H1 \def (match H0 return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (AHead (ASort (S n1) n0) a2)) \to ((eq A a0 (ASort (S n1) n0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (AHead (ASort (S n1) n0) a2))).(\lambda (H2: (eq A (ASort h2 n2) (ASort (S n1) n0))).((let H3 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead (ASort (S n1) n0) a2) H1) in (False_ind ((eq A (ASort h2 n2) (ASort (S n1) n0)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H3)) H2 H0))) | (leq_head a1 a0 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (AHead (ASort (S n1) n0) a2))).(\lambda (H3: (eq A (AHead a0 a4) (ASort (S n1) n0))).((let H4 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a1 a3) (AHead (ASort (S n1) n0) a2) H2) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a3) (AHead (ASort (S n1) n0) a2) H2) in (eq_ind A (ASort (S n1) n0) (\lambda (a: A).((eq A a3 a2) \to ((eq A (AHead a0 a4) (ASort (S n1) n0)) \to ((leq g a a0) \to ((leq g a3 a4) \to P))))) (\lambda (H6: (eq A a3 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a0 a4) (ASort (S n1) n0)) \to ((leq g (ASort (S n1) n0) a0) \to ((leq g a a4) \to P)))) (\lambda (H7: (eq A (AHead a0 a4) (ASort (S n1) n0))).(let H8 \def (eq_ind A (AHead a0 a4) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort (S n1) n0) H7) in (False_ind ((leq g (ASort (S n1) n0) a0) \to ((leq g a2 a4) \to P)) H8))) a3 (sym_eq A a3 a2 H6))) a1 (sym_eq A a1 (ASort (S n1) n0) H5))) H4)) H3 H0 H1)))]) in (H1 (refl_equal A (AHead (ASort (S n1) n0) a2)) (refl_equal A (ASort (S n1) n0)))))]) H)))))) (\lambda (a: A).(\lambda (H: ((\forall (a2: A).((leq g (AHead a a2) a) \to (\forall (P: Prop).P))))).(\lambda (a0: A).(\lambda (_: ((\forall (a2: A).((leq g (AHead a0 a2) a0) \to (\forall (P: Prop).P))))).(\lambda (a2: A).(\lambda (H1: (leq g (AHead (AHead a a0) a2) (AHead a a0))).(\lambda (P: Prop).(let H2 \def (match H1 return (\lambda (a1: A).(\lambda (a3: A).(\lambda (_: (leq ? a1 a3)).((eq A a1 (AHead (AHead a a0) a2)) \to ((eq A a3 (AHead a a0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (AHead (AHead a a0) a2))).(\lambda (H4: (eq A (ASort h2 n2) (AHead a a0))).((let H5 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead (AHead a a0) a2) H3) in (False_ind ((eq A (ASort h2 n2) (AHead a a0)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H5)) H4 H2))) | (leq_head a1 a3 H2 a4 a5 H3) \Rightarrow (\lambda (H4: (eq A (AHead a1 a4) (AHead (AHead a a0) a2))).(\lambda (H5: (eq A (AHead a3 a5) (AHead a a0))).((let H6 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a1 a4) (AHead (AHead a a0) a2) H4) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a4) (AHead (AHead a a0) a2) H4) in (eq_ind A (AHead a a0) (\lambda (a6: A).((eq A a4 a2) \to ((eq A (AHead a3 a5) (AHead a a0)) \to ((leq g a6 a3) \to ((leq g a4 a5) \to P))))) (\lambda (H8: (eq A a4 a2)).(eq_ind A a2 (\lambda (a2: A).((eq A (AHead a3 a5) (AHead a a0)) \to ((leq g (AHead a a0) a3) \to ((leq g a2 a5) \to P)))) (\lambda (H9: (eq A (AHead a3 a5) (AHead a a0))).(let H10 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a5 | (AHead _ a) \Rightarrow a])) (AHead a3 a5) (AHead a a0) H9) in ((let H11 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead a _) \Rightarrow a])) (AHead a3 a5) (AHead a a0) H9) in (eq_ind A a (\lambda (a6: A).((eq A a5 a0) \to ((leq g (AHead a a0) a6) \to ((leq g a2 a5) \to P)))) (\lambda (H12: (eq A a5 a0)).(eq_ind A a0 (\lambda (a6: A).((leq g (AHead a a0) a) \to ((leq g a2 a6) \to P))) (\lambda (H13: (leq g (AHead a a0) a)).(\lambda (_: (leq g a2 a0)).(H a0 H13 P))) a5 (sym_eq A a5 a0 H12))) a3 (sym_eq A a3 a H11))) H10))) a4 (sym_eq A a4 a2 H8))) a1 (sym_eq A a1 (AHead a a0) H7))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A (AHead (AHead a a0) a2)) (refl_equal A (AHead a a0))))))))))) a1)). theorem leq_ahead_asucc_false: \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g (AHead a1 a2) (asucc g a1)) \to (\forall (P: Prop).P)))) \def - \lambda (g: G).(\lambda (a1: A).(A_ind (\lambda (a: A).(\forall (a2: A).((leq g (AHead a a2) (asucc g a)) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (a2: A).(\lambda (H: (leq g (AHead (ASort n n0) a2) (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]))).(\lambda (P: Prop).((match n return (\lambda (_: ?).(\lambda (n1: nat).((leq g (AHead (ASort n1 n0) a2) (match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)])) \to P))) with [O \Rightarrow (\lambda (H0: (leq g (AHead (ASort O n0) a2) (ASort O (next g n0)))).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (a: A).(\lambda (a0: A).((eq A a (AHead (ASort O n0) a2)) \to ((eq A a0 (ASort O (next g n0))) \to P))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (AHead (ASort O n0) a2))).(\lambda (H2: (eq A (ASort h2 n2) (ASort O (next g n0)))).((let H3 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead (ASort O n0) a2) H1) in (False_ind ((eq A (ASort h2 n2) (ASort O (next g n0))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H3)) H2 H0))) | (leq_head a1 a0 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (AHead (ASort O n0) a2))).(\lambda (H3: (eq A (AHead a0 a4) (ASort O (next g n0)))).((let H4 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a1 a3) (AHead (ASort O n0) a2) H2) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a3) (AHead (ASort O n0) a2) H2) in (eq_ind A (ASort O n0) (\lambda (a: A).((eq A a3 a2) \to ((eq A (AHead a0 a4) (ASort O (next g n0))) \to ((leq g a a0) \to ((leq g a3 a4) \to P))))) (\lambda (H6: (eq A a3 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a0 a4) (ASort O (next g n0))) \to ((leq g (ASort O n0) a0) \to ((leq g a a4) \to P)))) (\lambda (H7: (eq A (AHead a0 a4) (ASort O (next g n0)))).(let H8 \def (eq_ind A (AHead a0 a4) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H7) in (False_ind ((leq g (ASort O n0) a0) \to ((leq g a2 a4) \to P)) H8))) a3 (sym_eq A a3 a2 H6))) a1 (sym_eq A a1 (ASort O n0) H5))) H4)) H3 H0 H1)))]) in (H1 (refl_equal A (AHead (ASort O n0) a2)) (refl_equal A (ASort O (next g n0)))))) | (S n1) \Rightarrow (\lambda (H0: (leq g (AHead (ASort (S n1) n0) a2) (ASort n1 n0))).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (a: A).(\lambda (a0: A).((eq A a (AHead (ASort (S n1) n0) a2)) \to ((eq A a0 (ASort n1 n0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (AHead (ASort (S n1) n0) a2))).(\lambda (H2: (eq A (ASort h2 n2) (ASort n1 n0))).((let H3 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead (ASort (S n1) n0) a2) H1) in (False_ind ((eq A (ASort h2 n2) (ASort n1 n0)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H3)) H2 H0))) | (leq_head a1 a0 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (AHead (ASort (S n1) n0) a2))).(\lambda (H3: (eq A (AHead a0 a4) (ASort n1 n0))).((let H4 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a1 a3) (AHead (ASort (S n1) n0) a2) H2) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a3) (AHead (ASort (S n1) n0) a2) H2) in (eq_ind A (ASort (S n1) n0) (\lambda (a: A).((eq A a3 a2) \to ((eq A (AHead a0 a4) (ASort n1 n0)) \to ((leq g a a0) \to ((leq g a3 a4) \to P))))) (\lambda (H6: (eq A a3 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a0 a4) (ASort n1 n0)) \to ((leq g (ASort (S n1) n0) a0) \to ((leq g a a4) \to P)))) (\lambda (H7: (eq A (AHead a0 a4) (ASort n1 n0))).(let H8 \def (eq_ind A (AHead a0 a4) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 n0) H7) in (False_ind ((leq g (ASort (S n1) n0) a0) \to ((leq g a2 a4) \to P)) H8))) a3 (sym_eq A a3 a2 H6))) a1 (sym_eq A a1 (ASort (S n1) n0) H5))) H4)) H3 H0 H1)))]) in (H1 (refl_equal A (AHead (ASort (S n1) n0) a2)) (refl_equal A (ASort n1 n0)))))]) H)))))) (\lambda (a: A).(\lambda (_: ((\forall (a2: A).((leq g (AHead a a2) (asucc g a)) \to (\forall (P: Prop).P))))).(\lambda (a0: A).(\lambda (_: ((\forall (a2: A).((leq g (AHead a0 a2) (asucc g a0)) \to (\forall (P: Prop).P))))).(\lambda (a2: A).(\lambda (H1: (leq g (AHead (AHead a a0) a2) (AHead a (asucc g a0)))).(\lambda (P: Prop).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (a1: A).(\lambda (a3: A).((eq A a1 (AHead (AHead a a0) a2)) \to ((eq A a3 (AHead a (asucc g a0))) \to P))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (AHead (AHead a a0) a2))).(\lambda (H4: (eq A (ASort h2 n2) (AHead a (asucc g a0)))).((let H5 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead (AHead a a0) a2) H3) in (False_ind ((eq A (ASort h2 n2) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H5)) H4 H2))) | (leq_head a1 a3 H2 a4 a5 H3) \Rightarrow (\lambda (H4: (eq A (AHead a1 a4) (AHead (AHead a a0) a2))).(\lambda (H5: (eq A (AHead a3 a5) (AHead a (asucc g a0)))).((let H6 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a1 a4) (AHead (AHead a a0) a2) H4) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a4) (AHead (AHead a a0) a2) H4) in (eq_ind A (AHead a a0) (\lambda (a6: A).((eq A a4 a2) \to ((eq A (AHead a3 a5) (AHead a (asucc g a0))) \to ((leq g a6 a3) \to ((leq g a4 a5) \to P))))) (\lambda (H8: (eq A a4 a2)).(eq_ind A a2 (\lambda (a2: A).((eq A (AHead a3 a5) (AHead a (asucc g a0))) \to ((leq g (AHead a a0) a3) \to ((leq g a2 a5) \to P)))) (\lambda (H9: (eq A (AHead a3 a5) (AHead a (asucc g a0)))).(let H10 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a5 | (AHead _ a) \Rightarrow a])) (AHead a3 a5) (AHead a (asucc g a0)) H9) in ((let H11 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a3 | (AHead a _) \Rightarrow a])) (AHead a3 a5) (AHead a (asucc g a0)) H9) in (eq_ind A a (\lambda (a6: A).((eq A a5 (asucc g a0)) \to ((leq g (AHead a a0) a6) \to ((leq g a2 a5) \to P)))) (\lambda (H12: (eq A a5 (asucc g a0))).(eq_ind A (asucc g a0) (\lambda (a6: A).((leq g (AHead a a0) a) \to ((leq g a2 a6) \to P))) (\lambda (H13: (leq g (AHead a a0) a)).(\lambda (_: (leq g a2 (asucc g a0))).(leq_ahead_false g a a0 H13 P))) a5 (sym_eq A a5 (asucc g a0) H12))) a3 (sym_eq A a3 a H11))) H10))) a4 (sym_eq A a4 a2 H8))) a1 (sym_eq A a1 (AHead a a0) H7))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A (AHead (AHead a a0) a2)) (refl_equal A (AHead a (asucc g a0)))))))))))) a1)). + \lambda (g: G).(\lambda (a1: A).(A_ind (\lambda (a: A).(\forall (a2: A).((leq g (AHead a a2) (asucc g a)) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (a2: A).(\lambda (H: (leq g (AHead (ASort n n0) a2) (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]))).(\lambda (P: Prop).((match n return (\lambda (n1: nat).((leq g (AHead (ASort n1 n0) a2) (match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)])) \to P)) with [O \Rightarrow (\lambda (H0: (leq g (AHead (ASort O n0) a2) (ASort O (next g n0)))).(let H1 \def (match H0 return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (AHead (ASort O n0) a2)) \to ((eq A a0 (ASort O (next g n0))) \to P))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (AHead (ASort O n0) a2))).(\lambda (H2: (eq A (ASort h2 n2) (ASort O (next g n0)))).((let H3 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead (ASort O n0) a2) H1) in (False_ind ((eq A (ASort h2 n2) (ASort O (next g n0))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H3)) H2 H0))) | (leq_head a1 a0 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (AHead (ASort O n0) a2))).(\lambda (H3: (eq A (AHead a0 a4) (ASort O (next g n0)))).((let H4 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a1 a3) (AHead (ASort O n0) a2) H2) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a3) (AHead (ASort O n0) a2) H2) in (eq_ind A (ASort O n0) (\lambda (a: A).((eq A a3 a2) \to ((eq A (AHead a0 a4) (ASort O (next g n0))) \to ((leq g a a0) \to ((leq g a3 a4) \to P))))) (\lambda (H6: (eq A a3 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a0 a4) (ASort O (next g n0))) \to ((leq g (ASort O n0) a0) \to ((leq g a a4) \to P)))) (\lambda (H7: (eq A (AHead a0 a4) (ASort O (next g n0)))).(let H8 \def (eq_ind A (AHead a0 a4) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H7) in (False_ind ((leq g (ASort O n0) a0) \to ((leq g a2 a4) \to P)) H8))) a3 (sym_eq A a3 a2 H6))) a1 (sym_eq A a1 (ASort O n0) H5))) H4)) H3 H0 H1)))]) in (H1 (refl_equal A (AHead (ASort O n0) a2)) (refl_equal A (ASort O (next g n0)))))) | (S n1) \Rightarrow (\lambda (H0: (leq g (AHead (ASort (S n1) n0) a2) (ASort n1 n0))).(let H1 \def (match H0 return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (AHead (ASort (S n1) n0) a2)) \to ((eq A a0 (ASort n1 n0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (AHead (ASort (S n1) n0) a2))).(\lambda (H2: (eq A (ASort h2 n2) (ASort n1 n0))).((let H3 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead (ASort (S n1) n0) a2) H1) in (False_ind ((eq A (ASort h2 n2) (ASort n1 n0)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H3)) H2 H0))) | (leq_head a1 a0 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (AHead (ASort (S n1) n0) a2))).(\lambda (H3: (eq A (AHead a0 a4) (ASort n1 n0))).((let H4 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a1 a3) (AHead (ASort (S n1) n0) a2) H2) in ((let H5 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a3) (AHead (ASort (S n1) n0) a2) H2) in (eq_ind A (ASort (S n1) n0) (\lambda (a: A).((eq A a3 a2) \to ((eq A (AHead a0 a4) (ASort n1 n0)) \to ((leq g a a0) \to ((leq g a3 a4) \to P))))) (\lambda (H6: (eq A a3 a2)).(eq_ind A a2 (\lambda (a: A).((eq A (AHead a0 a4) (ASort n1 n0)) \to ((leq g (ASort (S n1) n0) a0) \to ((leq g a a4) \to P)))) (\lambda (H7: (eq A (AHead a0 a4) (ASort n1 n0))).(let H8 \def (eq_ind A (AHead a0 a4) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 n0) H7) in (False_ind ((leq g (ASort (S n1) n0) a0) \to ((leq g a2 a4) \to P)) H8))) a3 (sym_eq A a3 a2 H6))) a1 (sym_eq A a1 (ASort (S n1) n0) H5))) H4)) H3 H0 H1)))]) in (H1 (refl_equal A (AHead (ASort (S n1) n0) a2)) (refl_equal A (ASort n1 n0)))))]) H)))))) (\lambda (a: A).(\lambda (_: ((\forall (a2: A).((leq g (AHead a a2) (asucc g a)) \to (\forall (P: Prop).P))))).(\lambda (a0: A).(\lambda (_: ((\forall (a2: A).((leq g (AHead a0 a2) (asucc g a0)) \to (\forall (P: Prop).P))))).(\lambda (a2: A).(\lambda (H1: (leq g (AHead (AHead a a0) a2) (AHead a (asucc g a0)))).(\lambda (P: Prop).(let H2 \def (match H1 return (\lambda (a1: A).(\lambda (a3: A).(\lambda (_: (leq ? a1 a3)).((eq A a1 (AHead (AHead a a0) a2)) \to ((eq A a3 (AHead a (asucc g a0))) \to P))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (AHead (AHead a a0) a2))).(\lambda (H4: (eq A (ASort h2 n2) (AHead a (asucc g a0)))).((let H5 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead (AHead a a0) a2) H3) in (False_ind ((eq A (ASort h2 n2) (AHead a (asucc g a0))) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H5)) H4 H2))) | (leq_head a1 a3 H2 a4 a5 H3) \Rightarrow (\lambda (H4: (eq A (AHead a1 a4) (AHead (AHead a a0) a2))).(\lambda (H5: (eq A (AHead a3 a5) (AHead a (asucc g a0)))).((let H6 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a1 a4) (AHead (AHead a a0) a2) H4) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a4) (AHead (AHead a a0) a2) H4) in (eq_ind A (AHead a a0) (\lambda (a6: A).((eq A a4 a2) \to ((eq A (AHead a3 a5) (AHead a (asucc g a0))) \to ((leq g a6 a3) \to ((leq g a4 a5) \to P))))) (\lambda (H8: (eq A a4 a2)).(eq_ind A a2 (\lambda (a2: A).((eq A (AHead a3 a5) (AHead a (asucc g a0))) \to ((leq g (AHead a a0) a3) \to ((leq g a2 a5) \to P)))) (\lambda (H9: (eq A (AHead a3 a5) (AHead a (asucc g a0)))).(let H10 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a5 | (AHead _ a) \Rightarrow a])) (AHead a3 a5) (AHead a (asucc g a0)) H9) in ((let H11 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead a _) \Rightarrow a])) (AHead a3 a5) (AHead a (asucc g a0)) H9) in (eq_ind A a (\lambda (a6: A).((eq A a5 (asucc g a0)) \to ((leq g (AHead a a0) a6) \to ((leq g a2 a5) \to P)))) (\lambda (H12: (eq A a5 (asucc g a0))).(eq_ind A (asucc g a0) (\lambda (a6: A).((leq g (AHead a a0) a) \to ((leq g a2 a6) \to P))) (\lambda (H13: (leq g (AHead a a0) a)).(\lambda (_: (leq g a2 (asucc g a0))).(leq_ahead_false g a a0 H13 P))) a5 (sym_eq A a5 (asucc g a0) H12))) a3 (sym_eq A a3 a H11))) H10))) a4 (sym_eq A a4 a2 H8))) a1 (sym_eq A a1 (AHead a a0) H7))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A (AHead (AHead a a0) a2)) (refl_equal A (AHead a (asucc g a0)))))))))))) a1)). theorem leq_asucc_false: \forall (g: G).(\forall (a: A).((leq g (asucc g a) a) \to (\forall (P: Prop).P))) \def - \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).((leq g (asucc g a0) a0) \to (\forall (P: Prop).P))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (H: (leq g (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) (ASort n n0))).(\lambda (P: Prop).((match n return (\lambda (_: ?).(\lambda (n1: nat).((leq g (match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) (ASort n1 n0)) \to P))) with [O \Rightarrow (\lambda (H0: (leq g (ASort O (next g n0)) (ASort O n0))).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (a: A).(\lambda (a0: A).((eq A a (ASort O (next g n0))) \to ((eq A a0 (ASort O n0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (ASort O (next g n0)))).(\lambda (H2: (eq A (ASort h2 n2) (ASort O n0))).((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort O (next g n0)) H1) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) (ASort O (next g n0)) H1) in (eq_ind nat O (\lambda (n: nat).((eq nat n1 (next g n0)) \to ((eq A (ASort h2 n2) (ASort O n0)) \to ((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n2) k)) \to P)))) (\lambda (H5: (eq nat n1 (next g n0))).(eq_ind nat (next g n0) (\lambda (n: nat).((eq A (ASort h2 n2) (ASort O n0)) \to ((eq A (aplus g (ASort O n) k) (aplus g (ASort h2 n2) k)) \to P))) (\lambda (H6: (eq A (ASort h2 n2) (ASort O n0))).(let H7 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n2])) (ASort h2 n2) (ASort O n0) H6) in ((let H8 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h2])) (ASort h2 n2) (ASort O n0) H6) in (eq_ind nat O (\lambda (n: nat).((eq nat n2 n0) \to ((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n n2) k)) \to P))) (\lambda (H9: (eq nat n2 n0)).(eq_ind nat n0 (\lambda (n: nat).((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort O n) k)) \to P)) (\lambda (H10: (eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort O n0) k))).(let H \def (eq_ind_r A (aplus g (ASort O (next g n0)) k) (\lambda (a: A).(eq A a (aplus g (ASort O n0) k))) H10 (aplus g (ASort O n0) (S k)) (aplus_sort_O_S_simpl g n0 k)) in (let H_y \def (aplus_inj g (S k) k (ASort O n0) H) in (le_Sx_x k (eq_ind_r nat k (\lambda (n: nat).(le n k)) (le_n k) (S k) H_y) P)))) n2 (sym_eq nat n2 n0 H9))) h2 (sym_eq nat h2 O H8))) H7))) n1 (sym_eq nat n1 (next g n0) H5))) h1 (sym_eq nat h1 O H4))) H3)) H2 H0))) | (leq_head a1 a2 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort O (next g n0)))).(\lambda (H3: (eq A (AHead a2 a4) (ASort O n0))).((let H4 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H2) in (False_ind ((eq A (AHead a2 a4) (ASort O n0)) \to ((leq g a1 a2) \to ((leq g a3 a4) \to P))) H4)) H3 H0 H1)))]) in (H1 (refl_equal A (ASort O (next g n0))) (refl_equal A (ASort O n0))))) | (S n1) \Rightarrow (\lambda (H0: (leq g (ASort n1 n0) (ASort (S n1) n0))).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (a: A).(\lambda (a0: A).((eq A a (ASort n1 n0)) \to ((eq A a0 (ASort (S n1) n0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (ASort n1 n0))).(\lambda (H2: (eq A (ASort h2 n2) (ASort (S n1) n0))).((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort n1 n0) H1) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) (ASort n1 n0) H1) in (eq_ind nat n1 (\lambda (n: nat).((eq nat n1 n0) \to ((eq A (ASort h2 n2) (ASort (S n1) n0)) \to ((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n2) k)) \to P)))) (\lambda (H5: (eq nat n1 n0)).(eq_ind nat n0 (\lambda (n: nat).((eq A (ASort h2 n2) (ASort (S n1) n0)) \to ((eq A (aplus g (ASort n1 n) k) (aplus g (ASort h2 n2) k)) \to P))) (\lambda (H6: (eq A (ASort h2 n2) (ASort (S n1) n0))).(let H7 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n2])) (ASort h2 n2) (ASort (S n1) n0) H6) in ((let H8 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h2])) (ASort h2 n2) (ASort (S n1) n0) H6) in (eq_ind nat (S n1) (\lambda (n: nat).((eq nat n2 n0) \to ((eq A (aplus g (ASort n1 n0) k) (aplus g (ASort n n2) k)) \to P))) (\lambda (H9: (eq nat n2 n0)).(eq_ind nat n0 (\lambda (n: nat).((eq A (aplus g (ASort n1 n0) k) (aplus g (ASort (S n1) n) k)) \to P)) (\lambda (H10: (eq A (aplus g (ASort n1 n0) k) (aplus g (ASort (S n1) n0) k))).(let H \def (eq_ind_r A (aplus g (ASort n1 n0) k) (\lambda (a: A).(eq A a (aplus g (ASort (S n1) n0) k))) H10 (aplus g (ASort (S n1) n0) (S k)) (aplus_sort_S_S_simpl g n0 n1 k)) in (let H_y \def (aplus_inj g (S k) k (ASort (S n1) n0) H) in (le_Sx_x k (eq_ind_r nat k (\lambda (n: nat).(le n k)) (le_n k) (S k) H_y) P)))) n2 (sym_eq nat n2 n0 H9))) h2 (sym_eq nat h2 (S n1) H8))) H7))) n1 (sym_eq nat n1 n0 H5))) h1 (sym_eq nat h1 n1 H4))) H3)) H2 H0))) | (leq_head a1 a2 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort n1 n0))).(\lambda (H3: (eq A (AHead a2 a4) (ASort (S n1) n0))).((let H4 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 n0) H2) in (False_ind ((eq A (AHead a2 a4) (ASort (S n1) n0)) \to ((leq g a1 a2) \to ((leq g a3 a4) \to P))) H4)) H3 H0 H1)))]) in (H1 (refl_equal A (ASort n1 n0)) (refl_equal A (ASort (S n1) n0)))))]) H))))) (\lambda (a0: A).(\lambda (_: (((leq g (asucc g a0) a0) \to (\forall (P: Prop).P)))).(\lambda (a1: A).(\lambda (H0: (((leq g (asucc g a1) a1) \to (\forall (P: Prop).P)))).(\lambda (H1: (leq g (AHead a0 (asucc g a1)) (AHead a0 a1))).(\lambda (P: Prop).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (a: A).(\lambda (a2: A).((eq A a (AHead a0 (asucc g a1))) \to ((eq A a2 (AHead a0 a1)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (AHead a0 (asucc g a1)))).(\lambda (H4: (eq A (ASort h2 n2) (AHead a0 a1))).((let H5 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a0 (asucc g a1)) H3) in (False_ind ((eq A (ASort h2 n2) (AHead a0 a1)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H5)) H4 H2))) | (leq_head a1 a2 H2 a3 a4 H3) \Rightarrow (\lambda (H4: (eq A (AHead a1 a3) (AHead a0 (asucc g a1)))).(\lambda (H5: (eq A (AHead a2 a4) (AHead a0 a1))).((let H6 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a1 a3) (AHead a0 (asucc g a1)) H4) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a3) (AHead a0 (asucc g a1)) H4) in (eq_ind A a0 (\lambda (a: A).((eq A a3 (asucc g a1)) \to ((eq A (AHead a2 a4) (AHead a0 a1)) \to ((leq g a a2) \to ((leq g a3 a4) \to P))))) (\lambda (H8: (eq A a3 (asucc g a1))).(eq_ind A (asucc g a1) (\lambda (a: A).((eq A (AHead a2 a4) (AHead a0 a1)) \to ((leq g a0 a2) \to ((leq g a a4) \to P)))) (\lambda (H9: (eq A (AHead a2 a4) (AHead a0 a1))).(let H10 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a2 a4) (AHead a0 a1) H9) in ((let H11 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a2 | (AHead a _) \Rightarrow a])) (AHead a2 a4) (AHead a0 a1) H9) in (eq_ind A a0 (\lambda (a: A).((eq A a4 a1) \to ((leq g a0 a) \to ((leq g (asucc g a1) a4) \to P)))) (\lambda (H12: (eq A a4 a1)).(eq_ind A a1 (\lambda (a: A).((leq g a0 a0) \to ((leq g (asucc g a1) a) \to P))) (\lambda (_: (leq g a0 a0)).(\lambda (H14: (leq g (asucc g a1) a1)).(H0 H14 P))) a4 (sym_eq A a4 a1 H12))) a2 (sym_eq A a2 a0 H11))) H10))) a3 (sym_eq A a3 (asucc g a1) H8))) a1 (sym_eq A a1 a0 H7))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A (AHead a0 (asucc g a1))) (refl_equal A (AHead a0 a1)))))))))) a)). + \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).((leq g (asucc g a0) a0) \to (\forall (P: Prop).P))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (H: (leq g (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) (ASort n n0))).(\lambda (P: Prop).((match n return (\lambda (n1: nat).((leq g (match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) (ASort n1 n0)) \to P)) with [O \Rightarrow (\lambda (H0: (leq g (ASort O (next g n0)) (ASort O n0))).(let H1 \def (match H0 return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (ASort O (next g n0))) \to ((eq A a0 (ASort O n0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (ASort O (next g n0)))).(\lambda (H2: (eq A (ASort h2 n2) (ASort O n0))).((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort O (next g n0)) H1) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) (ASort O (next g n0)) H1) in (eq_ind nat O (\lambda (n: nat).((eq nat n1 (next g n0)) \to ((eq A (ASort h2 n2) (ASort O n0)) \to ((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n2) k)) \to P)))) (\lambda (H5: (eq nat n1 (next g n0))).(eq_ind nat (next g n0) (\lambda (n: nat).((eq A (ASort h2 n2) (ASort O n0)) \to ((eq A (aplus g (ASort O n) k) (aplus g (ASort h2 n2) k)) \to P))) (\lambda (H6: (eq A (ASort h2 n2) (ASort O n0))).(let H7 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n2])) (ASort h2 n2) (ASort O n0) H6) in ((let H8 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h2])) (ASort h2 n2) (ASort O n0) H6) in (eq_ind nat O (\lambda (n: nat).((eq nat n2 n0) \to ((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort n n2) k)) \to P))) (\lambda (H9: (eq nat n2 n0)).(eq_ind nat n0 (\lambda (n: nat).((eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort O n) k)) \to P)) (\lambda (H10: (eq A (aplus g (ASort O (next g n0)) k) (aplus g (ASort O n0) k))).(let H \def (eq_ind_r A (aplus g (ASort O (next g n0)) k) (\lambda (a: A).(eq A a (aplus g (ASort O n0) k))) H10 (aplus g (ASort O n0) (S k)) (aplus_sort_O_S_simpl g n0 k)) in (let H_y \def (aplus_inj g (S k) k (ASort O n0) H) in (le_Sx_x k (eq_ind_r nat k (\lambda (n: nat).(le n k)) (le_n k) (S k) H_y) P)))) n2 (sym_eq nat n2 n0 H9))) h2 (sym_eq nat h2 O H8))) H7))) n1 (sym_eq nat n1 (next g n0) H5))) h1 (sym_eq nat h1 O H4))) H3)) H2 H0))) | (leq_head a1 a2 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort O (next g n0)))).(\lambda (H3: (eq A (AHead a2 a4) (ASort O n0))).((let H4 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O (next g n0)) H2) in (False_ind ((eq A (AHead a2 a4) (ASort O n0)) \to ((leq g a1 a2) \to ((leq g a3 a4) \to P))) H4)) H3 H0 H1)))]) in (H1 (refl_equal A (ASort O (next g n0))) (refl_equal A (ASort O n0))))) | (S n1) \Rightarrow (\lambda (H0: (leq g (ASort n1 n0) (ASort (S n1) n0))).(let H1 \def (match H0 return (\lambda (a: A).(\lambda (a0: A).(\lambda (_: (leq ? a a0)).((eq A a (ASort n1 n0)) \to ((eq A a0 (ASort (S n1) n0)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H0) \Rightarrow (\lambda (H1: (eq A (ASort h1 n1) (ASort n1 n0))).(\lambda (H2: (eq A (ASort h2 n2) (ASort (S n1) n0))).((let H3 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort h1 n1) (ASort n1 n0) H1) in ((let H4 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h1])) (ASort h1 n1) (ASort n1 n0) H1) in (eq_ind nat n1 (\lambda (n: nat).((eq nat n1 n0) \to ((eq A (ASort h2 n2) (ASort (S n1) n0)) \to ((eq A (aplus g (ASort n n1) k) (aplus g (ASort h2 n2) k)) \to P)))) (\lambda (H5: (eq nat n1 n0)).(eq_ind nat n0 (\lambda (n: nat).((eq A (ASort h2 n2) (ASort (S n1) n0)) \to ((eq A (aplus g (ASort n1 n) k) (aplus g (ASort h2 n2) k)) \to P))) (\lambda (H6: (eq A (ASort h2 n2) (ASort (S n1) n0))).(let H7 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n2])) (ASort h2 n2) (ASort (S n1) n0) H6) in ((let H8 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow h2])) (ASort h2 n2) (ASort (S n1) n0) H6) in (eq_ind nat (S n1) (\lambda (n: nat).((eq nat n2 n0) \to ((eq A (aplus g (ASort n1 n0) k) (aplus g (ASort n n2) k)) \to P))) (\lambda (H9: (eq nat n2 n0)).(eq_ind nat n0 (\lambda (n: nat).((eq A (aplus g (ASort n1 n0) k) (aplus g (ASort (S n1) n) k)) \to P)) (\lambda (H10: (eq A (aplus g (ASort n1 n0) k) (aplus g (ASort (S n1) n0) k))).(let H \def (eq_ind_r A (aplus g (ASort n1 n0) k) (\lambda (a: A).(eq A a (aplus g (ASort (S n1) n0) k))) H10 (aplus g (ASort (S n1) n0) (S k)) (aplus_sort_S_S_simpl g n0 n1 k)) in (let H_y \def (aplus_inj g (S k) k (ASort (S n1) n0) H) in (le_Sx_x k (eq_ind_r nat k (\lambda (n: nat).(le n k)) (le_n k) (S k) H_y) P)))) n2 (sym_eq nat n2 n0 H9))) h2 (sym_eq nat h2 (S n1) H8))) H7))) n1 (sym_eq nat n1 n0 H5))) h1 (sym_eq nat h1 n1 H4))) H3)) H2 H0))) | (leq_head a1 a2 H0 a3 a4 H1) \Rightarrow (\lambda (H2: (eq A (AHead a1 a3) (ASort n1 n0))).(\lambda (H3: (eq A (AHead a2 a4) (ASort (S n1) n0))).((let H4 \def (eq_ind A (AHead a1 a3) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort n1 n0) H2) in (False_ind ((eq A (AHead a2 a4) (ASort (S n1) n0)) \to ((leq g a1 a2) \to ((leq g a3 a4) \to P))) H4)) H3 H0 H1)))]) in (H1 (refl_equal A (ASort n1 n0)) (refl_equal A (ASort (S n1) n0)))))]) H))))) (\lambda (a0: A).(\lambda (_: (((leq g (asucc g a0) a0) \to (\forall (P: Prop).P)))).(\lambda (a1: A).(\lambda (H0: (((leq g (asucc g a1) a1) \to (\forall (P: Prop).P)))).(\lambda (H1: (leq g (AHead a0 (asucc g a1)) (AHead a0 a1))).(\lambda (P: Prop).(let H2 \def (match H1 return (\lambda (a: A).(\lambda (a2: A).(\lambda (_: (leq ? a a2)).((eq A a (AHead a0 (asucc g a1))) \to ((eq A a2 (AHead a0 a1)) \to P))))) with [(leq_sort h1 h2 n1 n2 k H2) \Rightarrow (\lambda (H3: (eq A (ASort h1 n1) (AHead a0 (asucc g a1)))).(\lambda (H4: (eq A (ASort h2 n2) (AHead a0 a1))).((let H5 \def (eq_ind A (ASort h1 n1) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow True | (AHead _ _) \Rightarrow False])) I (AHead a0 (asucc g a1)) H3) in (False_ind ((eq A (ASort h2 n2) (AHead a0 a1)) \to ((eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k)) \to P)) H5)) H4 H2))) | (leq_head a1 a2 H2 a3 a4 H3) \Rightarrow (\lambda (H4: (eq A (AHead a1 a3) (AHead a0 (asucc g a1)))).(\lambda (H5: (eq A (AHead a2 a4) (AHead a0 a1))).((let H6 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a1 a3) (AHead a0 (asucc g a1)) H4) in ((let H7 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a3) (AHead a0 (asucc g a1)) H4) in (eq_ind A a0 (\lambda (a: A).((eq A a3 (asucc g a1)) \to ((eq A (AHead a2 a4) (AHead a0 a1)) \to ((leq g a a2) \to ((leq g a3 a4) \to P))))) (\lambda (H8: (eq A a3 (asucc g a1))).(eq_ind A (asucc g a1) (\lambda (a: A).((eq A (AHead a2 a4) (AHead a0 a1)) \to ((leq g a0 a2) \to ((leq g a a4) \to P)))) (\lambda (H9: (eq A (AHead a2 a4) (AHead a0 a1))).(let H10 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a4 | (AHead _ a) \Rightarrow a])) (AHead a2 a4) (AHead a0 a1) H9) in ((let H11 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a2 | (AHead a _) \Rightarrow a])) (AHead a2 a4) (AHead a0 a1) H9) in (eq_ind A a0 (\lambda (a: A).((eq A a4 a1) \to ((leq g a0 a) \to ((leq g (asucc g a1) a4) \to P)))) (\lambda (H12: (eq A a4 a1)).(eq_ind A a1 (\lambda (a: A).((leq g a0 a0) \to ((leq g (asucc g a1) a) \to P))) (\lambda (_: (leq g a0 a0)).(\lambda (H14: (leq g (asucc g a1) a1)).(H0 H14 P))) a4 (sym_eq A a4 a1 H12))) a2 (sym_eq A a2 a0 H11))) H10))) a3 (sym_eq A a3 (asucc g a1) H8))) a1 (sym_eq A a1 a0 H7))) H6)) H5 H2 H3)))]) in (H2 (refl_equal A (AHead a0 (asucc g a1))) (refl_equal A (AHead a0 a1)))))))))) a)). definition lweight: A \to nat @@ -1624,7 +1624,7 @@ inductive aprem: nat \to (A \to (A \to Prop)) \def theorem aprem_repl: \forall (g: G).(\forall (a1: A).(\forall (a2: A).((leq g a1 a2) \to (\forall (i: nat).(\forall (b2: A).((aprem i a2 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem i a1 b1))))))))) \def - \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(\forall (i: nat).(\forall (b2: A).((aprem i a0 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem i a b1)))))))) (\lambda (h1: nat).(\lambda (h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda (_: (eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k))).(\lambda (i: nat).(\lambda (b2: A).(\lambda (H1: (aprem i (ASort h2 n2) b2)).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (n: nat).(\lambda (a: A).(\lambda (a0: A).((eq nat n i) \to ((eq A a (ASort h2 n2)) \to ((eq A a0 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem i (ASort h1 n1) b1)))))))))) with [(aprem_zero a0 a3) \Rightarrow (\lambda (H1: (eq nat O i)).(\lambda (H2: (eq A (AHead a0 a3) (ASort h2 n2))).(\lambda (H3: (eq A a0 b2)).(eq_ind nat O (\lambda (n: nat).((eq A (AHead a0 a3) (ASort h2 n2)) \to ((eq A a0 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem n (ASort h1 n1) b1)))))) (\lambda (H4: (eq A (AHead a0 a3) (ASort h2 n2))).(let H5 \def (eq_ind A (AHead a0 a3) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort h2 n2) H4) in (False_ind ((eq A a0 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (ASort h1 n1) b1)))) H5))) i H1 H2 H3)))) | (aprem_succ a0 a i0 H1 a3) \Rightarrow (\lambda (H2: (eq nat (S i0) i)).(\lambda (H3: (eq A (AHead a3 a0) (ASort h2 n2))).(\lambda (H4: (eq A a b2)).(eq_ind nat (S i0) (\lambda (n: nat).((eq A (AHead a3 a0) (ASort h2 n2)) \to ((eq A a b2) \to ((aprem i0 a0 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem n (ASort h1 n1) b1))))))) (\lambda (H5: (eq A (AHead a3 a0) (ASort h2 n2))).(let H6 \def (eq_ind A (AHead a3 a0) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort h2 n2) H5) in (False_ind ((eq A a b2) \to ((aprem i0 a0 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) (ASort h1 n1) b1))))) H6))) i H2 H3 H4 H1))))]) in (H2 (refl_equal nat i) (refl_equal A (ASort h2 n2)) (refl_equal A b2)))))))))))) (\lambda (a0: A).(\lambda (a3: A).(\lambda (H0: (leq g a0 a3)).(\lambda (_: ((\forall (i: nat).(\forall (b2: A).((aprem i a3 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem i a0 b1)))))))).(\lambda (a4: A).(\lambda (a5: A).(\lambda (_: (leq g a4 a5)).(\lambda (H3: ((\forall (i: nat).(\forall (b2: A).((aprem i a5 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem i a4 b1)))))))).(\lambda (i: nat).(\lambda (b2: A).(\lambda (H4: (aprem i (AHead a3 a5) b2)).((match i return (\lambda (_: ?).(\lambda (n: nat).((aprem n (AHead a3 a5) b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem n (AHead a0 a4) b1)))))) with [O \Rightarrow (\lambda (H5: (aprem O (AHead a3 a5) b2)).(let H6 \def (match H5 return (\lambda (_: ?).(\lambda (n: nat).(\lambda (a: A).(\lambda (a1: A).((eq nat n O) \to ((eq A a (AHead a3 a5)) \to ((eq A a1 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))))))))) with [(aprem_zero a6 a7) \Rightarrow (\lambda (_: (eq nat O O)).(\lambda (H5: (eq A (AHead a6 a7) (AHead a3 a5))).(\lambda (H6: (eq A a6 b2)).((let H7 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a7 | (AHead _ a) \Rightarrow a])) (AHead a6 a7) (AHead a3 a5) H5) in ((let H8 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a6 | (AHead a _) \Rightarrow a])) (AHead a6 a7) (AHead a3 a5) H5) in (eq_ind A a3 (\lambda (a: A).((eq A a7 a5) \to ((eq A a b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))))) (\lambda (H9: (eq A a7 a5)).(eq_ind A a5 (\lambda (_: A).((eq A a3 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1))))) (\lambda (H10: (eq A a3 b2)).(eq_ind A b2 (\lambda (_: A).(ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))) (eq_ind A a3 (\lambda (a: A).(ex2 A (\lambda (b1: A).(leq g b1 a)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))) (ex_intro2 A (\lambda (b1: A).(leq g b1 a3)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)) a0 H0 (aprem_zero a0 a4)) b2 H10) a3 (sym_eq A a3 b2 H10))) a7 (sym_eq A a7 a5 H9))) a6 (sym_eq A a6 a3 H8))) H7)) H6)))) | (aprem_succ a6 a i H4 a7) \Rightarrow (\lambda (H5: (eq nat (S i) O)).(\lambda (H6: (eq A (AHead a7 a6) (AHead a3 a5))).(\lambda (H7: (eq A a b2)).((let H8 \def (eq_ind nat (S i) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H5) in (False_ind ((eq A (AHead a7 a6) (AHead a3 a5)) \to ((eq A a b2) \to ((aprem i a6 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))))) H8)) H6 H7 H4))))]) in (H6 (refl_equal nat O) (refl_equal A (AHead a3 a5)) (refl_equal A b2)))) | (S n) \Rightarrow (\lambda (H5: (aprem (S n) (AHead a3 a5) b2)).(let H6 \def (match H5 return (\lambda (_: ?).(\lambda (n0: nat).(\lambda (a: A).(\lambda (a1: A).((eq nat n0 (S n)) \to ((eq A a (AHead a3 a5)) \to ((eq A a1 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1)))))))))) with [(aprem_zero a6 a7) \Rightarrow (\lambda (H4: (eq nat O (S n))).(\lambda (H5: (eq A (AHead a6 a7) (AHead a3 a5))).(\lambda (H6: (eq A a6 b2)).((let H7 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n) H4) in (False_ind ((eq A (AHead a6 a7) (AHead a3 a5)) \to ((eq A a6 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1))))) H7)) H5 H6)))) | (aprem_succ a6 a i H4 a7) \Rightarrow (\lambda (H5: (eq nat (S i) (S n))).(\lambda (H6: (eq A (AHead a7 a6) (AHead a3 a5))).(\lambda (H7: (eq A a b2)).((let H8 \def (f_equal nat nat (\lambda (e: nat).(match e return (\lambda (_: ?).nat) with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S n) H5) in (eq_ind nat n (\lambda (n0: nat).((eq A (AHead a7 a6) (AHead a3 a5)) \to ((eq A a b2) \to ((aprem n0 a6 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1))))))) (\lambda (H9: (eq A (AHead a7 a6) (AHead a3 a5))).(let H10 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a6 | (AHead _ a) \Rightarrow a])) (AHead a7 a6) (AHead a3 a5) H9) in ((let H11 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a7 | (AHead a _) \Rightarrow a])) (AHead a7 a6) (AHead a3 a5) H9) in (eq_ind A a3 (\lambda (_: A).((eq A a6 a5) \to ((eq A a b2) \to ((aprem n a6 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1))))))) (\lambda (H12: (eq A a6 a5)).(eq_ind A a5 (\lambda (a1: A).((eq A a b2) \to ((aprem n a1 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1)))))) (\lambda (H13: (eq A a b2)).(eq_ind A b2 (\lambda (a1: A).((aprem n a5 a1) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1))))) (\lambda (H14: (aprem n a5 b2)).(let H_x \def (H3 n b2 H14) in (let H3 \def H_x in (ex2_ind A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem n a4 b1)) (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1))) (\lambda (x: A).(\lambda (H15: (leq g x b2)).(\lambda (H16: (aprem n a4 x)).(ex_intro2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1)) x H15 (aprem_succ a4 x n H16 a0))))) H3)))) a (sym_eq A a b2 H13))) a6 (sym_eq A a6 a5 H12))) a7 (sym_eq A a7 a3 H11))) H10))) i (sym_eq nat i n H8))) H6 H7 H4))))]) in (H6 (refl_equal nat (S n)) (refl_equal A (AHead a3 a5)) (refl_equal A b2))))]) H4)))))))))))) a1 a2 H)))). + \lambda (g: G).(\lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq g a1 a2)).(leq_ind g (\lambda (a: A).(\lambda (a0: A).(\forall (i: nat).(\forall (b2: A).((aprem i a0 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem i a b1)))))))) (\lambda (h1: nat).(\lambda (h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda (_: (eq A (aplus g (ASort h1 n1) k) (aplus g (ASort h2 n2) k))).(\lambda (i: nat).(\lambda (b2: A).(\lambda (H1: (aprem i (ASort h2 n2) b2)).(let H2 \def (match H1 return (\lambda (n: nat).(\lambda (a: A).(\lambda (a0: A).(\lambda (_: (aprem n a a0)).((eq nat n i) \to ((eq A a (ASort h2 n2)) \to ((eq A a0 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem i (ASort h1 n1) b1)))))))))) with [(aprem_zero a0 a3) \Rightarrow (\lambda (H1: (eq nat O i)).(\lambda (H2: (eq A (AHead a0 a3) (ASort h2 n2))).(\lambda (H3: (eq A a0 b2)).(eq_ind nat O (\lambda (n: nat).((eq A (AHead a0 a3) (ASort h2 n2)) \to ((eq A a0 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem n (ASort h1 n1) b1)))))) (\lambda (H4: (eq A (AHead a0 a3) (ASort h2 n2))).(let H5 \def (eq_ind A (AHead a0 a3) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort h2 n2) H4) in (False_ind ((eq A a0 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (ASort h1 n1) b1)))) H5))) i H1 H2 H3)))) | (aprem_succ a0 a i0 H1 a3) \Rightarrow (\lambda (H2: (eq nat (S i0) i)).(\lambda (H3: (eq A (AHead a3 a0) (ASort h2 n2))).(\lambda (H4: (eq A a b2)).(eq_ind nat (S i0) (\lambda (n: nat).((eq A (AHead a3 a0) (ASort h2 n2)) \to ((eq A a b2) \to ((aprem i0 a0 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem n (ASort h1 n1) b1))))))) (\lambda (H5: (eq A (AHead a3 a0) (ASort h2 n2))).(let H6 \def (eq_ind A (AHead a3 a0) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort h2 n2) H5) in (False_ind ((eq A a b2) \to ((aprem i0 a0 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S i0) (ASort h1 n1) b1))))) H6))) i H2 H3 H4 H1))))]) in (H2 (refl_equal nat i) (refl_equal A (ASort h2 n2)) (refl_equal A b2)))))))))))) (\lambda (a0: A).(\lambda (a3: A).(\lambda (H0: (leq g a0 a3)).(\lambda (_: ((\forall (i: nat).(\forall (b2: A).((aprem i a3 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem i a0 b1)))))))).(\lambda (a4: A).(\lambda (a5: A).(\lambda (_: (leq g a4 a5)).(\lambda (H3: ((\forall (i: nat).(\forall (b2: A).((aprem i a5 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem i a4 b1)))))))).(\lambda (i: nat).(\lambda (b2: A).(\lambda (H4: (aprem i (AHead a3 a5) b2)).((match i return (\lambda (n: nat).((aprem n (AHead a3 a5) b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem n (AHead a0 a4) b1))))) with [O \Rightarrow (\lambda (H5: (aprem O (AHead a3 a5) b2)).(let H6 \def (match H5 return (\lambda (n: nat).(\lambda (a: A).(\lambda (a1: A).(\lambda (_: (aprem n a a1)).((eq nat n O) \to ((eq A a (AHead a3 a5)) \to ((eq A a1 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))))))))) with [(aprem_zero a6 a7) \Rightarrow (\lambda (_: (eq nat O O)).(\lambda (H5: (eq A (AHead a6 a7) (AHead a3 a5))).(\lambda (H6: (eq A a6 b2)).((let H7 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a7 | (AHead _ a) \Rightarrow a])) (AHead a6 a7) (AHead a3 a5) H5) in ((let H8 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a6 | (AHead a _) \Rightarrow a])) (AHead a6 a7) (AHead a3 a5) H5) in (eq_ind A a3 (\lambda (a: A).((eq A a7 a5) \to ((eq A a b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))))) (\lambda (H9: (eq A a7 a5)).(eq_ind A a5 (\lambda (_: A).((eq A a3 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1))))) (\lambda (H10: (eq A a3 b2)).(eq_ind A b2 (\lambda (_: A).(ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))) (eq_ind A a3 (\lambda (a: A).(ex2 A (\lambda (b1: A).(leq g b1 a)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))) (ex_intro2 A (\lambda (b1: A).(leq g b1 a3)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)) a0 H0 (aprem_zero a0 a4)) b2 H10) a3 (sym_eq A a3 b2 H10))) a7 (sym_eq A a7 a5 H9))) a6 (sym_eq A a6 a3 H8))) H7)) H6)))) | (aprem_succ a6 a i H4 a7) \Rightarrow (\lambda (H5: (eq nat (S i) O)).(\lambda (H6: (eq A (AHead a7 a6) (AHead a3 a5))).(\lambda (H7: (eq A a b2)).((let H8 \def (eq_ind nat (S i) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H5) in (False_ind ((eq A (AHead a7 a6) (AHead a3 a5)) \to ((eq A a b2) \to ((aprem i a6 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem O (AHead a0 a4) b1)))))) H8)) H6 H7 H4))))]) in (H6 (refl_equal nat O) (refl_equal A (AHead a3 a5)) (refl_equal A b2)))) | (S n) \Rightarrow (\lambda (H5: (aprem (S n) (AHead a3 a5) b2)).(let H6 \def (match H5 return (\lambda (n0: nat).(\lambda (a: A).(\lambda (a1: A).(\lambda (_: (aprem n0 a a1)).((eq nat n0 (S n)) \to ((eq A a (AHead a3 a5)) \to ((eq A a1 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1)))))))))) with [(aprem_zero a6 a7) \Rightarrow (\lambda (H4: (eq nat O (S n))).(\lambda (H5: (eq A (AHead a6 a7) (AHead a3 a5))).(\lambda (H6: (eq A a6 b2)).((let H7 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n) H4) in (False_ind ((eq A (AHead a6 a7) (AHead a3 a5)) \to ((eq A a6 b2) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1))))) H7)) H5 H6)))) | (aprem_succ a6 a i H4 a7) \Rightarrow (\lambda (H5: (eq nat (S i) (S n))).(\lambda (H6: (eq A (AHead a7 a6) (AHead a3 a5))).(\lambda (H7: (eq A a b2)).((let H8 \def (f_equal nat nat (\lambda (e: nat).(match e return (\lambda (_: nat).nat) with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S n) H5) in (eq_ind nat n (\lambda (n0: nat).((eq A (AHead a7 a6) (AHead a3 a5)) \to ((eq A a b2) \to ((aprem n0 a6 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1))))))) (\lambda (H9: (eq A (AHead a7 a6) (AHead a3 a5))).(let H10 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a6 | (AHead _ a) \Rightarrow a])) (AHead a7 a6) (AHead a3 a5) H9) in ((let H11 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a7 | (AHead a _) \Rightarrow a])) (AHead a7 a6) (AHead a3 a5) H9) in (eq_ind A a3 (\lambda (_: A).((eq A a6 a5) \to ((eq A a b2) \to ((aprem n a6 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1))))))) (\lambda (H12: (eq A a6 a5)).(eq_ind A a5 (\lambda (a1: A).((eq A a b2) \to ((aprem n a1 a) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1)))))) (\lambda (H13: (eq A a b2)).(eq_ind A b2 (\lambda (a1: A).((aprem n a5 a1) \to (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1))))) (\lambda (H14: (aprem n a5 b2)).(let H_x \def (H3 n b2 H14) in (let H3 \def H_x in (ex2_ind A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem n a4 b1)) (ex2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1))) (\lambda (x: A).(\lambda (H15: (leq g x b2)).(\lambda (H16: (aprem n a4 x)).(ex_intro2 A (\lambda (b1: A).(leq g b1 b2)) (\lambda (b1: A).(aprem (S n) (AHead a0 a4) b1)) x H15 (aprem_succ a4 x n H16 a0))))) H3)))) a (sym_eq A a b2 H13))) a6 (sym_eq A a6 a5 H12))) a7 (sym_eq A a7 a3 H11))) H10))) i (sym_eq nat i n H8))) H6 H7 H4))))]) in (H6 (refl_equal nat (S n)) (refl_equal A (AHead a3 a5)) (refl_equal A b2))))]) H4)))))))))))) a1 a2 H)))). theorem aprem_asucc: \forall (g: G).(\forall (a1: A).(\forall (a2: A).(\forall (i: nat).((aprem i a1 a2) \to (aprem i (asucc g a1) a2))))) @@ -1643,12 +1643,12 @@ inductive leqz: A \to (A \to Prop) \def theorem aplus_gz_le: \forall (k: nat).(\forall (h: nat).(\forall (n: nat).((le h k) \to (eq A (aplus gz (ASort h n) k) (ASort O (plus (minus k h) n)))))) \def - \lambda (k: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).(\forall (n0: nat).((le h n) \to (eq A (aplus gz (ASort h n0) n) (ASort O (plus (minus n h) n0))))))) (\lambda (h: nat).(\lambda (n: nat).(\lambda (H: (le h O)).(let H_y \def (le_n_O_eq h H) in (eq_ind nat O (\lambda (n0: nat).(eq A (ASort n0 n) (ASort O n))) (refl_equal A (ASort O n)) h H_y))))) (\lambda (k0: nat).(\lambda (IH: ((\forall (h: nat).(\forall (n: nat).((le h k0) \to (eq A (aplus gz (ASort h n) k0) (ASort O (plus (minus k0 h) n)))))))).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).((le n (S k0)) \to (eq A (asucc gz (aplus gz (ASort n n0) k0)) (ASort O (plus (match n with [O \Rightarrow (S k0) | (S l) \Rightarrow (minus k0 l)]) n0)))))) (\lambda (n: nat).(\lambda (_: (le O (S k0))).(eq_ind A (aplus gz (asucc gz (ASort O n)) k0) (\lambda (a: A).(eq A a (ASort O (S (plus k0 n))))) (eq_ind_r A (ASort O (plus (minus k0 O) (S n))) (\lambda (a: A).(eq A a (ASort O (S (plus k0 n))))) (eq_ind nat k0 (\lambda (n0: nat).(eq A (ASort O (plus n0 (S n))) (ASort O (S (plus k0 n))))) (eq_ind nat (S (plus k0 n)) (\lambda (n0: nat).(eq A (ASort O n0) (ASort O (S (plus k0 n))))) (refl_equal A (ASort O (S (plus k0 n)))) (plus k0 (S n)) (plus_n_Sm k0 n)) (minus k0 O) (minus_n_O k0)) (aplus gz (ASort O (S n)) k0) (IH O (S n) (le_O_n k0))) (asucc gz (aplus gz (ASort O n) k0)) (aplus_asucc gz k0 (ASort O n))))) (\lambda (n: nat).(\lambda (_: ((\forall (n0: nat).((le n (S k0)) \to (eq A (asucc gz (aplus gz (ASort n n0) k0)) (ASort O (plus (match n with [O \Rightarrow (S k0) | (S l) \Rightarrow (minus k0 l)]) n0))))))).(\lambda (n0: nat).(\lambda (H0: (le (S n) (S k0))).(ex2_ind nat (\lambda (n1: nat).(eq nat (S k0) (S n1))) (\lambda (n1: nat).(le n n1)) (eq A (asucc gz (aplus gz (ASort (S n) n0) k0)) (ASort O (plus (minus k0 n) n0))) (\lambda (x: nat).(\lambda (H1: (eq nat (S k0) (S x))).(\lambda (H2: (le n x)).(let H3 \def (f_equal nat nat (\lambda (e: nat).(match e return (\lambda (_: ?).nat) with [O \Rightarrow k0 | (S n) \Rightarrow n])) (S k0) (S x) H1) in (let H4 \def (eq_ind_r nat x (\lambda (n0: nat).(le n n0)) H2 k0 H3) in (eq_ind A (aplus gz (ASort n n0) k0) (\lambda (a: A).(eq A (asucc gz (aplus gz (ASort (S n) n0) k0)) a)) (eq_ind A (aplus gz (asucc gz (ASort (S n) n0)) k0) (\lambda (a: A).(eq A a (aplus gz (ASort n n0) k0))) (refl_equal A (aplus gz (ASort n n0) k0)) (asucc gz (aplus gz (ASort (S n) n0) k0)) (aplus_asucc gz k0 (ASort (S n) n0))) (ASort O (plus (minus k0 n) n0)) (IH n n0 H4))))))) (le_gen_S n (S k0) H0)))))) h)))) k). + \lambda (k: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).(\forall (n0: nat).((le h n) \to (eq A (aplus gz (ASort h n0) n) (ASort O (plus (minus n h) n0))))))) (\lambda (h: nat).(\lambda (n: nat).(\lambda (H: (le h O)).(let H_y \def (le_n_O_eq h H) in (eq_ind nat O (\lambda (n0: nat).(eq A (ASort n0 n) (ASort O n))) (refl_equal A (ASort O n)) h H_y))))) (\lambda (k0: nat).(\lambda (IH: ((\forall (h: nat).(\forall (n: nat).((le h k0) \to (eq A (aplus gz (ASort h n) k0) (ASort O (plus (minus k0 h) n)))))))).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (n0: nat).((le n (S k0)) \to (eq A (asucc gz (aplus gz (ASort n n0) k0)) (ASort O (plus (match n with [O \Rightarrow (S k0) | (S l) \Rightarrow (minus k0 l)]) n0)))))) (\lambda (n: nat).(\lambda (_: (le O (S k0))).(eq_ind A (aplus gz (asucc gz (ASort O n)) k0) (\lambda (a: A).(eq A a (ASort O (S (plus k0 n))))) (eq_ind_r A (ASort O (plus (minus k0 O) (S n))) (\lambda (a: A).(eq A a (ASort O (S (plus k0 n))))) (eq_ind nat k0 (\lambda (n0: nat).(eq A (ASort O (plus n0 (S n))) (ASort O (S (plus k0 n))))) (eq_ind nat (S (plus k0 n)) (\lambda (n0: nat).(eq A (ASort O n0) (ASort O (S (plus k0 n))))) (refl_equal A (ASort O (S (plus k0 n)))) (plus k0 (S n)) (plus_n_Sm k0 n)) (minus k0 O) (minus_n_O k0)) (aplus gz (ASort O (S n)) k0) (IH O (S n) (le_O_n k0))) (asucc gz (aplus gz (ASort O n) k0)) (aplus_asucc gz k0 (ASort O n))))) (\lambda (n: nat).(\lambda (_: ((\forall (n0: nat).((le n (S k0)) \to (eq A (asucc gz (aplus gz (ASort n n0) k0)) (ASort O (plus (match n with [O \Rightarrow (S k0) | (S l) \Rightarrow (minus k0 l)]) n0))))))).(\lambda (n0: nat).(\lambda (H0: (le (S n) (S k0))).(ex2_ind nat (\lambda (n1: nat).(eq nat (S k0) (S n1))) (\lambda (n1: nat).(le n n1)) (eq A (asucc gz (aplus gz (ASort (S n) n0) k0)) (ASort O (plus (minus k0 n) n0))) (\lambda (x: nat).(\lambda (H1: (eq nat (S k0) (S x))).(\lambda (H2: (le n x)).(let H3 \def (f_equal nat nat (\lambda (e: nat).(match e return (\lambda (_: nat).nat) with [O \Rightarrow k0 | (S n) \Rightarrow n])) (S k0) (S x) H1) in (let H4 \def (eq_ind_r nat x (\lambda (n0: nat).(le n n0)) H2 k0 H3) in (eq_ind A (aplus gz (ASort n n0) k0) (\lambda (a: A).(eq A (asucc gz (aplus gz (ASort (S n) n0) k0)) a)) (eq_ind A (aplus gz (asucc gz (ASort (S n) n0)) k0) (\lambda (a: A).(eq A a (aplus gz (ASort n n0) k0))) (refl_equal A (aplus gz (ASort n n0) k0)) (asucc gz (aplus gz (ASort (S n) n0) k0)) (aplus_asucc gz k0 (ASort (S n) n0))) (ASort O (plus (minus k0 n) n0)) (IH n n0 H4))))))) (le_gen_S n (S k0) H0)))))) h)))) k). theorem aplus_gz_ge: \forall (n: nat).(\forall (k: nat).(\forall (h: nat).((le k h) \to (eq A (aplus gz (ASort h n) k) (ASort (minus h k) n))))) \def - \lambda (n: nat).(\lambda (k: nat).(nat_ind (\lambda (n0: nat).(\forall (h: nat).((le n0 h) \to (eq A (aplus gz (ASort h n) n0) (ASort (minus h n0) n))))) (\lambda (h: nat).(\lambda (_: (le O h)).(eq_ind nat h (\lambda (n0: nat).(eq A (ASort h n) (ASort n0 n))) (refl_equal A (ASort h n)) (minus h O) (minus_n_O h)))) (\lambda (k0: nat).(\lambda (IH: ((\forall (h: nat).((le k0 h) \to (eq A (aplus gz (ASort h n) k0) (ASort (minus h k0) n)))))).(\lambda (h: nat).(nat_ind (\lambda (n0: nat).((le (S k0) n0) \to (eq A (asucc gz (aplus gz (ASort n0 n) k0)) (ASort (minus n0 (S k0)) n)))) (\lambda (H: (le (S k0) O)).(ex2_ind nat (\lambda (n0: nat).(eq nat O (S n0))) (\lambda (n0: nat).(le k0 n0)) (eq A (asucc gz (aplus gz (ASort O n) k0)) (ASort O n)) (\lambda (x: nat).(\lambda (H0: (eq nat O (S x))).(\lambda (_: (le k0 x)).(let H2 \def (eq_ind nat O (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x) H0) in (False_ind (eq A (asucc gz (aplus gz (ASort O n) k0)) (ASort O n)) H2))))) (le_gen_S k0 O H))) (\lambda (n0: nat).(\lambda (_: (((le (S k0) n0) \to (eq A (asucc gz (aplus gz (ASort n0 n) k0)) (ASort (minus n0 (S k0)) n))))).(\lambda (H0: (le (S k0) (S n0))).(ex2_ind nat (\lambda (n1: nat).(eq nat (S n0) (S n1))) (\lambda (n1: nat).(le k0 n1)) (eq A (asucc gz (aplus gz (ASort (S n0) n) k0)) (ASort (minus n0 k0) n)) (\lambda (x: nat).(\lambda (H1: (eq nat (S n0) (S x))).(\lambda (H2: (le k0 x)).(let H3 \def (f_equal nat nat (\lambda (e: nat).(match e return (\lambda (_: ?).nat) with [O \Rightarrow n0 | (S n) \Rightarrow n])) (S n0) (S x) H1) in (let H4 \def (eq_ind_r nat x (\lambda (n: nat).(le k0 n)) H2 n0 H3) in (eq_ind A (aplus gz (ASort n0 n) k0) (\lambda (a: A).(eq A (asucc gz (aplus gz (ASort (S n0) n) k0)) a)) (eq_ind A (aplus gz (asucc gz (ASort (S n0) n)) k0) (\lambda (a: A).(eq A a (aplus gz (ASort n0 n) k0))) (refl_equal A (aplus gz (ASort n0 n) k0)) (asucc gz (aplus gz (ASort (S n0) n) k0)) (aplus_asucc gz k0 (ASort (S n0) n))) (ASort (minus n0 k0) n) (IH n0 H4))))))) (le_gen_S k0 (S n0) H0))))) h)))) k)). + \lambda (n: nat).(\lambda (k: nat).(nat_ind (\lambda (n0: nat).(\forall (h: nat).((le n0 h) \to (eq A (aplus gz (ASort h n) n0) (ASort (minus h n0) n))))) (\lambda (h: nat).(\lambda (_: (le O h)).(eq_ind nat h (\lambda (n0: nat).(eq A (ASort h n) (ASort n0 n))) (refl_equal A (ASort h n)) (minus h O) (minus_n_O h)))) (\lambda (k0: nat).(\lambda (IH: ((\forall (h: nat).((le k0 h) \to (eq A (aplus gz (ASort h n) k0) (ASort (minus h k0) n)))))).(\lambda (h: nat).(nat_ind (\lambda (n0: nat).((le (S k0) n0) \to (eq A (asucc gz (aplus gz (ASort n0 n) k0)) (ASort (minus n0 (S k0)) n)))) (\lambda (H: (le (S k0) O)).(ex2_ind nat (\lambda (n0: nat).(eq nat O (S n0))) (\lambda (n0: nat).(le k0 n0)) (eq A (asucc gz (aplus gz (ASort O n) k0)) (ASort O n)) (\lambda (x: nat).(\lambda (H0: (eq nat O (S x))).(\lambda (_: (le k0 x)).(let H2 \def (eq_ind nat O (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S x) H0) in (False_ind (eq A (asucc gz (aplus gz (ASort O n) k0)) (ASort O n)) H2))))) (le_gen_S k0 O H))) (\lambda (n0: nat).(\lambda (_: (((le (S k0) n0) \to (eq A (asucc gz (aplus gz (ASort n0 n) k0)) (ASort (minus n0 (S k0)) n))))).(\lambda (H0: (le (S k0) (S n0))).(ex2_ind nat (\lambda (n1: nat).(eq nat (S n0) (S n1))) (\lambda (n1: nat).(le k0 n1)) (eq A (asucc gz (aplus gz (ASort (S n0) n) k0)) (ASort (minus n0 k0) n)) (\lambda (x: nat).(\lambda (H1: (eq nat (S n0) (S x))).(\lambda (H2: (le k0 x)).(let H3 \def (f_equal nat nat (\lambda (e: nat).(match e return (\lambda (_: nat).nat) with [O \Rightarrow n0 | (S n) \Rightarrow n])) (S n0) (S x) H1) in (let H4 \def (eq_ind_r nat x (\lambda (n: nat).(le k0 n)) H2 n0 H3) in (eq_ind A (aplus gz (ASort n0 n) k0) (\lambda (a: A).(eq A (asucc gz (aplus gz (ASort (S n0) n) k0)) a)) (eq_ind A (aplus gz (asucc gz (ASort (S n0) n)) k0) (\lambda (a: A).(eq A a (aplus gz (ASort n0 n) k0))) (refl_equal A (aplus gz (ASort n0 n) k0)) (asucc gz (aplus gz (ASort (S n0) n) k0)) (aplus_asucc gz k0 (ASort (S n0) n))) (ASort (minus n0 k0) n) (IH n0 H4))))))) (le_gen_S k0 (S n0) H0))))) h)))) k)). theorem next_plus_gz: \forall (n: nat).(\forall (h: nat).(eq nat (next_plus gz n h) (plus h n))) @@ -1658,7 +1658,7 @@ theorem next_plus_gz: theorem leqz_leq: \forall (a1: A).(\forall (a2: A).((leq gz a1 a2) \to (leqz a1 a2))) \def - \lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq gz a1 a2)).(leq_ind gz (\lambda (a: A).(\lambda (a0: A).(leqz a a0))) (\lambda (h1: nat).(\lambda (h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda (H0: (eq A (aplus gz (ASort h1 n1) k) (aplus gz (ASort h2 n2) k))).(lt_le_e k h1 (leqz (ASort h1 n1) (ASort h2 n2)) (\lambda (H1: (lt k h1)).(lt_le_e k h2 (leqz (ASort h1 n1) (ASort h2 n2)) (\lambda (H2: (lt k h2)).(let H3 \def (eq_ind A (aplus gz (ASort h1 n1) k) (\lambda (a: A).(eq A a (aplus gz (ASort h2 n2) k))) H0 (ASort (minus h1 k) n1) (aplus_gz_ge n1 k h1 (le_S_n k h1 (le_S (S k) h1 H1)))) in (let H4 \def (eq_ind A (aplus gz (ASort h2 n2) k) (\lambda (a: A).(eq A (ASort (minus h1 k) n1) a)) H3 (ASort (minus h2 k) n2) (aplus_gz_ge n2 k h2 (le_S_n k h2 (le_S (S k) h2 H2)))) in (let H5 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow ((let rec minus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow O | (S k) \Rightarrow (match m with [O \Rightarrow (S k) | (S l) \Rightarrow (minus k l)])])) in minus) h1 k)])) (ASort (minus h1 k) n1) (ASort (minus h2 k) n2) H4) in ((let H6 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort (minus h1 k) n1) (ASort (minus h2 k) n2) H4) in (\lambda (H7: (eq nat (minus h1 k) (minus h2 k))).(eq_ind nat n1 (\lambda (n: nat).(leqz (ASort h1 n1) (ASort h2 n))) (eq_ind nat h1 (\lambda (n: nat).(leqz (ASort h1 n1) (ASort n n1))) (leqz_sort h1 h1 n1 n1 (refl_equal nat (plus h1 n1))) h2 (minus_minus k h1 h2 (le_S_n k h1 (le_S (S k) h1 H1)) (le_S_n k h2 (le_S (S k) h2 H2)) H7)) n2 H6))) H5))))) (\lambda (H2: (le h2 k)).(let H3 \def (eq_ind A (aplus gz (ASort h1 n1) k) (\lambda (a: A).(eq A a (aplus gz (ASort h2 n2) k))) H0 (ASort (minus h1 k) n1) (aplus_gz_ge n1 k h1 (le_S_n k h1 (le_S (S k) h1 H1)))) in (let H4 \def (eq_ind A (aplus gz (ASort h2 n2) k) (\lambda (a: A).(eq A (ASort (minus h1 k) n1) a)) H3 (ASort O (plus (minus k h2) n2)) (aplus_gz_le k h2 n2 H2)) in (let H5 \def (eq_ind nat (minus h1 k) (\lambda (n: nat).(eq A (ASort n n1) (ASort O (plus (minus k h2) n2)))) H4 (S (minus h1 (S k))) (minus_x_Sy h1 k H1)) in (let H6 \def (eq_ind A (ASort (S (minus h1 (S k))) n1) (\lambda (ee: A).(match ee return (\lambda (_: ?).Prop) with [(ASort n _) \Rightarrow (match n return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True]) | (AHead _ _) \Rightarrow False])) I (ASort O (plus (minus k h2) n2)) H5) in (False_ind (leqz (ASort h1 n1) (ASort h2 n2)) H6)))))))) (\lambda (H1: (le h1 k)).(lt_le_e k h2 (leqz (ASort h1 n1) (ASort h2 n2)) (\lambda (H2: (lt k h2)).(let H3 \def (eq_ind A (aplus gz (ASort h1 n1) k) (\lambda (a: A).(eq A a (aplus gz (ASort h2 n2) k))) H0 (ASort O (plus (minus k h1) n1)) (aplus_gz_le k h1 n1 H1)) in (let H4 \def (eq_ind A (aplus gz (ASort h2 n2) k) (\lambda (a: A).(eq A (ASort O (plus (minus k h1) n1)) a)) H3 (ASort (minus h2 k) n2) (aplus_gz_ge n2 k h2 (le_S_n k h2 (le_S (S k) h2 H2)))) in (let H5 \def (sym_equal A (ASort O (plus (minus k h1) n1)) (ASort (minus h2 k) n2) H4) in (let H6 \def (eq_ind nat (minus h2 k) (\lambda (n: nat).(eq A (ASort n n2) (ASort O (plus (minus k h1) n1)))) H5 (S (minus h2 (S k))) (minus_x_Sy h2 k H2)) in (let H7 \def (eq_ind A (ASort (S (minus h2 (S k))) n2) (\lambda (ee: A).(match ee return (\lambda (_: ?).Prop) with [(ASort n _) \Rightarrow (match n return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True]) | (AHead _ _) \Rightarrow False])) I (ASort O (plus (minus k h1) n1)) H6) in (False_ind (leqz (ASort h1 n1) (ASort h2 n2)) H7))))))) (\lambda (H2: (le h2 k)).(let H3 \def (eq_ind A (aplus gz (ASort h1 n1) k) (\lambda (a: A).(eq A a (aplus gz (ASort h2 n2) k))) H0 (ASort O (plus (minus k h1) n1)) (aplus_gz_le k h1 n1 H1)) in (let H4 \def (eq_ind A (aplus gz (ASort h2 n2) k) (\lambda (a: A).(eq A (ASort O (plus (minus k h1) n1)) a)) H3 (ASort O (plus (minus k h2) n2)) (aplus_gz_le k h2 n2 H2)) in (let H5 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: ?).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) (minus k h1) n1)])) (ASort O (plus (minus k h1) n1)) (ASort O (plus (minus k h2) n2)) H4) in (let H_y \def (plus_plus k h1 h2 n1 n2 H1 H2 H5) in (leqz_sort h1 h2 n1 n2 H_y))))))))))))))) (\lambda (a0: A).(\lambda (a3: A).(\lambda (_: (leq gz a0 a3)).(\lambda (H1: (leqz a0 a3)).(\lambda (a4: A).(\lambda (a5: A).(\lambda (_: (leq gz a4 a5)).(\lambda (H3: (leqz a4 a5)).(leqz_head a0 a3 H1 a4 a5 H3))))))))) a1 a2 H))). + \lambda (a1: A).(\lambda (a2: A).(\lambda (H: (leq gz a1 a2)).(leq_ind gz (\lambda (a: A).(\lambda (a0: A).(leqz a a0))) (\lambda (h1: nat).(\lambda (h2: nat).(\lambda (n1: nat).(\lambda (n2: nat).(\lambda (k: nat).(\lambda (H0: (eq A (aplus gz (ASort h1 n1) k) (aplus gz (ASort h2 n2) k))).(lt_le_e k h1 (leqz (ASort h1 n1) (ASort h2 n2)) (\lambda (H1: (lt k h1)).(lt_le_e k h2 (leqz (ASort h1 n1) (ASort h2 n2)) (\lambda (H2: (lt k h2)).(let H3 \def (eq_ind A (aplus gz (ASort h1 n1) k) (\lambda (a: A).(eq A a (aplus gz (ASort h2 n2) k))) H0 (ASort (minus h1 k) n1) (aplus_gz_ge n1 k h1 (le_S_n k h1 (le_S (S k) h1 H1)))) in (let H4 \def (eq_ind A (aplus gz (ASort h2 n2) k) (\lambda (a: A).(eq A (ASort (minus h1 k) n1) a)) H3 (ASort (minus h2 k) n2) (aplus_gz_ge n2 k h2 (le_S_n k h2 (le_S (S k) h2 H2)))) in (let H5 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort n _) \Rightarrow n | (AHead _ _) \Rightarrow ((let rec minus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow O | (S k) \Rightarrow (match m with [O \Rightarrow (S k) | (S l) \Rightarrow (minus k l)])])) in minus) h1 k)])) (ASort (minus h1 k) n1) (ASort (minus h2 k) n2) H4) in ((let H6 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow n1])) (ASort (minus h1 k) n1) (ASort (minus h2 k) n2) H4) in (\lambda (H7: (eq nat (minus h1 k) (minus h2 k))).(eq_ind nat n1 (\lambda (n: nat).(leqz (ASort h1 n1) (ASort h2 n))) (eq_ind nat h1 (\lambda (n: nat).(leqz (ASort h1 n1) (ASort n n1))) (leqz_sort h1 h1 n1 n1 (refl_equal nat (plus h1 n1))) h2 (minus_minus k h1 h2 (le_S_n k h1 (le_S (S k) h1 H1)) (le_S_n k h2 (le_S (S k) h2 H2)) H7)) n2 H6))) H5))))) (\lambda (H2: (le h2 k)).(let H3 \def (eq_ind A (aplus gz (ASort h1 n1) k) (\lambda (a: A).(eq A a (aplus gz (ASort h2 n2) k))) H0 (ASort (minus h1 k) n1) (aplus_gz_ge n1 k h1 (le_S_n k h1 (le_S (S k) h1 H1)))) in (let H4 \def (eq_ind A (aplus gz (ASort h2 n2) k) (\lambda (a: A).(eq A (ASort (minus h1 k) n1) a)) H3 (ASort O (plus (minus k h2) n2)) (aplus_gz_le k h2 n2 H2)) in (let H5 \def (eq_ind nat (minus h1 k) (\lambda (n: nat).(eq A (ASort n n1) (ASort O (plus (minus k h2) n2)))) H4 (S (minus h1 (S k))) (minus_x_Sy h1 k H1)) in (let H6 \def (eq_ind A (ASort (S (minus h1 (S k))) n1) (\lambda (ee: A).(match ee return (\lambda (_: A).Prop) with [(ASort n _) \Rightarrow (match n return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True]) | (AHead _ _) \Rightarrow False])) I (ASort O (plus (minus k h2) n2)) H5) in (False_ind (leqz (ASort h1 n1) (ASort h2 n2)) H6)))))))) (\lambda (H1: (le h1 k)).(lt_le_e k h2 (leqz (ASort h1 n1) (ASort h2 n2)) (\lambda (H2: (lt k h2)).(let H3 \def (eq_ind A (aplus gz (ASort h1 n1) k) (\lambda (a: A).(eq A a (aplus gz (ASort h2 n2) k))) H0 (ASort O (plus (minus k h1) n1)) (aplus_gz_le k h1 n1 H1)) in (let H4 \def (eq_ind A (aplus gz (ASort h2 n2) k) (\lambda (a: A).(eq A (ASort O (plus (minus k h1) n1)) a)) H3 (ASort (minus h2 k) n2) (aplus_gz_ge n2 k h2 (le_S_n k h2 (le_S (S k) h2 H2)))) in (let H5 \def (sym_equal A (ASort O (plus (minus k h1) n1)) (ASort (minus h2 k) n2) H4) in (let H6 \def (eq_ind nat (minus h2 k) (\lambda (n: nat).(eq A (ASort n n2) (ASort O (plus (minus k h1) n1)))) H5 (S (minus h2 (S k))) (minus_x_Sy h2 k H2)) in (let H7 \def (eq_ind A (ASort (S (minus h2 (S k))) n2) (\lambda (ee: A).(match ee return (\lambda (_: A).Prop) with [(ASort n _) \Rightarrow (match n return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True]) | (AHead _ _) \Rightarrow False])) I (ASort O (plus (minus k h1) n1)) H6) in (False_ind (leqz (ASort h1 n1) (ASort h2 n2)) H7))))))) (\lambda (H2: (le h2 k)).(let H3 \def (eq_ind A (aplus gz (ASort h1 n1) k) (\lambda (a: A).(eq A a (aplus gz (ASort h2 n2) k))) H0 (ASort O (plus (minus k h1) n1)) (aplus_gz_le k h1 n1 H1)) in (let H4 \def (eq_ind A (aplus gz (ASort h2 n2) k) (\lambda (a: A).(eq A (ASort O (plus (minus k h1) n1)) a)) H3 (ASort O (plus (minus k h2) n2)) (aplus_gz_le k h2 n2 H2)) in (let H5 \def (f_equal A nat (\lambda (e: A).(match e return (\lambda (_: A).nat) with [(ASort _ n) \Rightarrow n | (AHead _ _) \Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) (minus k h1) n1)])) (ASort O (plus (minus k h1) n1)) (ASort O (plus (minus k h2) n2)) H4) in (let H_y \def (plus_plus k h1 h2 n1 n2 H1 H2 H5) in (leqz_sort h1 h2 n1 n2 H_y))))))))))))))) (\lambda (a0: A).(\lambda (a3: A).(\lambda (_: (leq gz a0 a3)).(\lambda (H1: (leqz a0 a3)).(\lambda (a4: A).(\lambda (a5: A).(\lambda (_: (leq gz a4 a5)).(\lambda (H3: (leqz a4 a5)).(leqz_head a0 a3 H1 a4 a5 H3))))))))) a1 a2 H))). theorem leq_leqz: \forall (a1: A).(\forall (a2: A).((leqz a1 a2) \to (leq gz a1 a2))) @@ -1678,32 +1678,32 @@ inductive arity (g:G): C \to (T \to (A \to Prop)) \def theorem arity_gen_sort: \forall (g: G).(\forall (c: C).(\forall (n: nat).(\forall (a: A).((arity g c (TSort n) a) \to (leq g a (ASort O n)))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (n: nat).(\lambda (a: A).(\lambda (H: (arity g c (TSort n) a)).(insert_eq T (TSort n) (\lambda (t: T).(arity g c t a)) (leq g a (ASort O n)) (\lambda (y: T).(\lambda (H0: (arity g c y a)).(arity_ind g (\lambda (_: C).(\lambda (t: T).(\lambda (a0: A).((eq T t (TSort n)) \to (leq g a0 (ASort O n)))))) (\lambda (_: C).(\lambda (n0: nat).(\lambda (H1: (eq T (TSort n0) (TSort n))).(let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort n) \Rightarrow n | (TLRef _) \Rightarrow n0 | (THead _ _ _) \Rightarrow n0])) (TSort n0) (TSort n) H1) in (eq_ind_r nat n (\lambda (n1: nat).(leq g (ASort O n1) (ASort O n))) (leq_refl g (ASort O n)) n0 H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (_: (((eq T u (TSort n)) \to (leq g a0 (ASort O n))))).(\lambda (H4: (eq T (TLRef i) (TSort n))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H4) in (False_ind (leq g a0 (ASort O n)) H5))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (_: (((eq T u (TSort n)) \to (leq g (asucc g a0) (ASort O n))))).(\lambda (H4: (eq T (TLRef i) (TSort n))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H4) in (False_ind (leq g a0 (ASort O n)) H5))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: (((eq T u (TSort n)) \to (leq g a1 (ASort O n))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t a2)).(\lambda (_: (((eq T t (TSort n)) \to (leq g a2 (ASort O n))))).(\lambda (H6: (eq T (THead (Bind b) u t) (TSort n))).(let H7 \def (eq_ind T (THead (Bind b) u t) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H6) in (False_ind (leq g a2 (ASort O n)) H7)))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u (asucc g a1))).(\lambda (_: (((eq T u (TSort n)) \to (leq g (asucc g a1) (ASort O n))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t a2)).(\lambda (_: (((eq T t (TSort n)) \to (leq g a2 (ASort O n))))).(\lambda (H5: (eq T (THead (Bind Abst) u t) (TSort n))).(let H6 \def (eq_ind T (THead (Bind Abst) u t) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in (False_ind (leq g (AHead a1 a2) (ASort O n)) H6)))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: (((eq T u (TSort n)) \to (leq g a1 (ASort O n))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t (AHead a1 a2))).(\lambda (_: (((eq T t (TSort n)) \to (leq g (AHead a1 a2) (ASort O n))))).(\lambda (H5: (eq T (THead (Flat Appl) u t) (TSort n))).(let H6 \def (eq_ind T (THead (Flat Appl) u t) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in (False_ind (leq g a2 (ASort O n)) H6)))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda (_: (((eq T u (TSort n)) \to (leq g (asucc g a0) (ASort O n))))).(\lambda (t: T).(\lambda (_: (arity g c0 t a0)).(\lambda (_: (((eq T t (TSort n)) \to (leq g a0 (ASort O n))))).(\lambda (H5: (eq T (THead (Flat Cast) u t) (TSort n))).(let H6 \def (eq_ind T (THead (Flat Cast) u t) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in (False_ind (leq g a0 (ASort O n)) H6))))))))))) (\lambda (c0: C).(\lambda (t: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t a1)).(\lambda (H2: (((eq T t (TSort n)) \to (leq g a1 (ASort O n))))).(\lambda (a2: A).(\lambda (H3: (leq g a1 a2)).(\lambda (H4: (eq T t (TSort n))).(let H5 \def (f_equal T T (\lambda (e: T).e) t (TSort n) H4) in (let H6 \def (eq_ind T t (\lambda (t: T).((eq T t (TSort n)) \to (leq g a1 (ASort O n)))) H2 (TSort n) H5) in (let H7 \def (eq_ind T t (\lambda (t: T).(arity g c0 t a1)) H1 (TSort n) H5) in (leq_trans g a2 a1 (leq_sym g a1 a2 H3) (ASort O n) (H6 (refl_equal T (TSort n))))))))))))))) c y a H0))) H))))). + \lambda (g: G).(\lambda (c: C).(\lambda (n: nat).(\lambda (a: A).(\lambda (H: (arity g c (TSort n) a)).(insert_eq T (TSort n) (\lambda (t: T).(arity g c t a)) (leq g a (ASort O n)) (\lambda (y: T).(\lambda (H0: (arity g c y a)).(arity_ind g (\lambda (_: C).(\lambda (t: T).(\lambda (a0: A).((eq T t (TSort n)) \to (leq g a0 (ASort O n)))))) (\lambda (_: C).(\lambda (n0: nat).(\lambda (H1: (eq T (TSort n0) (TSort n))).(let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort n) \Rightarrow n | (TLRef _) \Rightarrow n0 | (THead _ _ _) \Rightarrow n0])) (TSort n0) (TSort n) H1) in (eq_ind_r nat n (\lambda (n1: nat).(leq g (ASort O n1) (ASort O n))) (leq_refl g (ASort O n)) n0 H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (_: (((eq T u (TSort n)) \to (leq g a0 (ASort O n))))).(\lambda (H4: (eq T (TLRef i) (TSort n))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H4) in (False_ind (leq g a0 (ASort O n)) H5))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (_: (((eq T u (TSort n)) \to (leq g (asucc g a0) (ASort O n))))).(\lambda (H4: (eq T (TLRef i) (TSort n))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H4) in (False_ind (leq g a0 (ASort O n)) H5))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: (((eq T u (TSort n)) \to (leq g a1 (ASort O n))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t a2)).(\lambda (_: (((eq T t (TSort n)) \to (leq g a2 (ASort O n))))).(\lambda (H6: (eq T (THead (Bind b) u t) (TSort n))).(let H7 \def (eq_ind T (THead (Bind b) u t) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H6) in (False_ind (leq g a2 (ASort O n)) H7)))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u (asucc g a1))).(\lambda (_: (((eq T u (TSort n)) \to (leq g (asucc g a1) (ASort O n))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t a2)).(\lambda (_: (((eq T t (TSort n)) \to (leq g a2 (ASort O n))))).(\lambda (H5: (eq T (THead (Bind Abst) u t) (TSort n))).(let H6 \def (eq_ind T (THead (Bind Abst) u t) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in (False_ind (leq g (AHead a1 a2) (ASort O n)) H6)))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: (((eq T u (TSort n)) \to (leq g a1 (ASort O n))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t (AHead a1 a2))).(\lambda (_: (((eq T t (TSort n)) \to (leq g (AHead a1 a2) (ASort O n))))).(\lambda (H5: (eq T (THead (Flat Appl) u t) (TSort n))).(let H6 \def (eq_ind T (THead (Flat Appl) u t) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in (False_ind (leq g a2 (ASort O n)) H6)))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda (_: (((eq T u (TSort n)) \to (leq g (asucc g a0) (ASort O n))))).(\lambda (t: T).(\lambda (_: (arity g c0 t a0)).(\lambda (_: (((eq T t (TSort n)) \to (leq g a0 (ASort O n))))).(\lambda (H5: (eq T (THead (Flat Cast) u t) (TSort n))).(let H6 \def (eq_ind T (THead (Flat Cast) u t) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in (False_ind (leq g a0 (ASort O n)) H6))))))))))) (\lambda (c0: C).(\lambda (t: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t a1)).(\lambda (H2: (((eq T t (TSort n)) \to (leq g a1 (ASort O n))))).(\lambda (a2: A).(\lambda (H3: (leq g a1 a2)).(\lambda (H4: (eq T t (TSort n))).(let H5 \def (f_equal T T (\lambda (e: T).e) t (TSort n) H4) in (let H6 \def (eq_ind T t (\lambda (t: T).((eq T t (TSort n)) \to (leq g a1 (ASort O n)))) H2 (TSort n) H5) in (let H7 \def (eq_ind T t (\lambda (t: T).(arity g c0 t a1)) H1 (TSort n) H5) in (leq_trans g a2 a1 (leq_sym g a1 a2 H3) (ASort O n) (H6 (refl_equal T (TSort n))))))))))))))) c y a H0))) H))))). theorem arity_gen_lref: \forall (g: G).(\forall (c: C).(\forall (i: nat).(\forall (a: A).((arity g c (TLRef i) a) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a)))))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (i: nat).(\lambda (a: A).(\lambda (H: (arity g c (TLRef i) a)).(insert_eq T (TLRef i) (\lambda (t: T).(arity g c t a)) (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a)))))) (\lambda (y: T).(\lambda (H0: (arity g c y a)).(arity_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (a0: A).((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a0)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a0)))))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) (TLRef i))).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef i) H1) in (False_ind (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (ASort O n))))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g (ASort O n))))))) H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H1: (getl i0 c0 (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (H2: (arity g d u a0)).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d0: C).(\lambda (u: T).(getl i d (CHead d0 (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a0)))) (ex2_2 C T (\lambda (d0: C).(\lambda (u: T).(getl i d (CHead d0 (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a0))))))))).(\lambda (H4: (eq T (TLRef i0) (TLRef i))).(let H5 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow i0 | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i0])) (TLRef i0) (TLRef i) H4) in (let H6 \def (eq_ind nat i0 (\lambda (n: nat).(getl n c0 (CHead d (Bind Abbr) u))) H1 i H5) in (or_introl (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a0)))) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a0))))) (ex2_2_intro C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a0))) d u H6 H2))))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H1: (getl i0 c0 (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (H2: (arity g d u (asucc g a0))).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d0: C).(\lambda (u: T).(getl i d (CHead d0 (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a0))))) (ex2_2 C T (\lambda (d0: C).(\lambda (u: T).(getl i d (CHead d0 (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g (asucc g a0)))))))))).(\lambda (H4: (eq T (TLRef i0) (TLRef i))).(let H5 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow i0 | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i0])) (TLRef i0) (TLRef i) H4) in (let H6 \def (eq_ind nat i0 (\lambda (n: nat).(getl n c0 (CHead d (Bind Abst) u))) H1 i H5) in (or_intror (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a0)))) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a0))))) (ex2_2_intro C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a0)))) d u H6 H2))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1))))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t a2)).(\lambda (_: (((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i (CHead c0 (Bind b) u) (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i (CHead c0 (Bind b) u) (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2))))))))).(\lambda (H6: (eq T (THead (Bind b) u t) (TLRef i))).(let H7 \def (eq_ind T (THead (Bind b) u t) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i) H6) in (False_ind (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (asucc g a2)))))) H7)))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u (asucc g a1))).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1))))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g (asucc g a1)))))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t a2)).(\lambda (_: (((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i (CHead c0 (Bind Abst) u) (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i (CHead c0 (Bind Abst) u) (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2))))))))).(\lambda (H5: (eq T (THead (Bind Abst) u t) (TLRef i))).(let H6 \def (eq_ind T (THead (Bind Abst) u t) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i) H5) in (False_ind (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (AHead a1 a2))))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (asucc g (AHead a1 a2))))))) H6)))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1))))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t (AHead a1 a2))).(\lambda (_: (((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (AHead a1 a2))))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g (AHead a1 a2)))))))))).(\lambda (H5: (eq T (THead (Flat Appl) u t) (TLRef i))).(let H6 \def (eq_ind T (THead (Flat Appl) u t) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i) H5) in (False_ind (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (asucc g a2)))))) H6)))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a0))))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g (asucc g a0)))))))))).(\lambda (t: T).(\lambda (_: (arity g c0 t a0)).(\lambda (_: (((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a0)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a0))))))))).(\lambda (H5: (eq T (THead (Flat Cast) u t) (TLRef i))).(let H6 \def (eq_ind T (THead (Flat Cast) u t) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i) H5) in (False_ind (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 a0)))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (asucc g a0)))))) H6))))))))))) (\lambda (c0: C).(\lambda (t: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t a1)).(\lambda (H2: (((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1))))))))).(\lambda (a2: A).(\lambda (H3: (leq g a1 a2)).(\lambda (H4: (eq T t (TLRef i))).(let H5 \def (f_equal T T (\lambda (e: T).e) t (TLRef i) H4) in (let H6 \def (eq_ind T t (\lambda (t: T).((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1)))))))) H2 (TLRef i) H5) in (let H7 \def (eq_ind T t (\lambda (t: T).(arity g c0 t a1)) H1 (TLRef i) H5) in (let H8 \def (H6 (refl_equal T (TLRef i))) in (or_ind (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1))))) (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2)))))) (\lambda (H9: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1))))).(ex2_2_ind C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1))) (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H10: (getl i c0 (CHead x0 (Bind Abbr) x1))).(\lambda (H11: (arity g x0 x1 a1)).(or_introl (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2))))) (ex2_2_intro C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2))) x0 x1 H10 (arity_repl g x0 x1 a1 H11 a2 H3))))))) H9)) (\lambda (H9: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1)))))).(ex2_2_ind C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1)))) (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H10: (getl i c0 (CHead x0 (Bind Abst) x1))).(\lambda (H11: (arity g x0 x1 (asucc g a1))).(or_intror (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2))))) (ex2_2_intro C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2)))) x0 x1 H10 (arity_repl g x0 x1 (asucc g a1) H11 (asucc g a2) (asucc_repl g a1 a2 H3)))))))) H9)) H8))))))))))))) c y a H0))) H))))). + \lambda (g: G).(\lambda (c: C).(\lambda (i: nat).(\lambda (a: A).(\lambda (H: (arity g c (TLRef i) a)).(insert_eq T (TLRef i) (\lambda (t: T).(arity g c t a)) (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a)))))) (\lambda (y: T).(\lambda (H0: (arity g c y a)).(arity_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (a0: A).((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a0)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a0)))))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) (TLRef i))).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef i) H1) in (False_ind (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (ASort O n))))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g (ASort O n))))))) H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H1: (getl i0 c0 (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (H2: (arity g d u a0)).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d0: C).(\lambda (u: T).(getl i d (CHead d0 (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a0)))) (ex2_2 C T (\lambda (d0: C).(\lambda (u: T).(getl i d (CHead d0 (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a0))))))))).(\lambda (H4: (eq T (TLRef i0) (TLRef i))).(let H5 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i0 | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i0])) (TLRef i0) (TLRef i) H4) in (let H6 \def (eq_ind nat i0 (\lambda (n: nat).(getl n c0 (CHead d (Bind Abbr) u))) H1 i H5) in (or_introl (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a0)))) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a0))))) (ex2_2_intro C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a0))) d u H6 H2))))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i0: nat).(\lambda (H1: (getl i0 c0 (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (H2: (arity g d u (asucc g a0))).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d0: C).(\lambda (u: T).(getl i d (CHead d0 (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a0))))) (ex2_2 C T (\lambda (d0: C).(\lambda (u: T).(getl i d (CHead d0 (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g (asucc g a0)))))))))).(\lambda (H4: (eq T (TLRef i0) (TLRef i))).(let H5 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i0 | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i0])) (TLRef i0) (TLRef i) H4) in (let H6 \def (eq_ind nat i0 (\lambda (n: nat).(getl n c0 (CHead d (Bind Abst) u))) H1 i H5) in (or_intror (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a0)))) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a0))))) (ex2_2_intro C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a0)))) d u H6 H2))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1))))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t a2)).(\lambda (_: (((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i (CHead c0 (Bind b) u) (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i (CHead c0 (Bind b) u) (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2))))))))).(\lambda (H6: (eq T (THead (Bind b) u t) (TLRef i))).(let H7 \def (eq_ind T (THead (Bind b) u t) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i) H6) in (False_ind (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (asucc g a2)))))) H7)))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u (asucc g a1))).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1))))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g (asucc g a1)))))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t a2)).(\lambda (_: (((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i (CHead c0 (Bind Abst) u) (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i (CHead c0 (Bind Abst) u) (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2))))))))).(\lambda (H5: (eq T (THead (Bind Abst) u t) (TLRef i))).(let H6 \def (eq_ind T (THead (Bind Abst) u t) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i) H5) in (False_ind (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (AHead a1 a2))))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (asucc g (AHead a1 a2))))))) H6)))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1))))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t (AHead a1 a2))).(\lambda (_: (((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (AHead a1 a2))))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g (AHead a1 a2)))))))))).(\lambda (H5: (eq T (THead (Flat Appl) u t) (TLRef i))).(let H6 \def (eq_ind T (THead (Flat Appl) u t) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i) H5) in (False_ind (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (asucc g a2)))))) H6)))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda (_: (((eq T u (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a0))))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g (asucc g a0)))))))))).(\lambda (t: T).(\lambda (_: (arity g c0 t a0)).(\lambda (_: (((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a0)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a0))))))))).(\lambda (H5: (eq T (THead (Flat Cast) u t) (TLRef i))).(let H6 \def (eq_ind T (THead (Flat Cast) u t) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef i) H5) in (False_ind (or (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abbr) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 a0)))) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c0 (CHead d (Bind Abst) u0)))) (\lambda (d: C).(\lambda (u0: T).(arity g d u0 (asucc g a0)))))) H6))))))))))) (\lambda (c0: C).(\lambda (t: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t a1)).(\lambda (H2: (((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1))))))))).(\lambda (a2: A).(\lambda (H3: (leq g a1 a2)).(\lambda (H4: (eq T t (TLRef i))).(let H5 \def (f_equal T T (\lambda (e: T).e) t (TLRef i) H4) in (let H6 \def (eq_ind T t (\lambda (t: T).((eq T t (TLRef i)) \to (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1)))))))) H2 (TLRef i) H5) in (let H7 \def (eq_ind T t (\lambda (t: T).(arity g c0 t a1)) H1 (TLRef i) H5) in (let H8 \def (H6 (refl_equal T (TLRef i))) in (or_ind (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1))))) (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2)))))) (\lambda (H9: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1))))).(ex2_2_ind C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a1))) (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H10: (getl i c0 (CHead x0 (Bind Abbr) x1))).(\lambda (H11: (arity g x0 x1 a1)).(or_introl (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2))))) (ex2_2_intro C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2))) x0 x1 H10 (arity_repl g x0 x1 a1 H11 a2 H3))))))) H9)) (\lambda (H9: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1)))))).(ex2_2_ind C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a1)))) (or (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H10: (getl i c0 (CHead x0 (Bind Abst) x1))).(\lambda (H11: (arity g x0 x1 (asucc g a1))).(or_intror (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2)))) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2))))) (ex2_2_intro C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2)))) x0 x1 H10 (arity_repl g x0 x1 (asucc g a1) H11 (asucc g a2) (asucc_repl g a1 a2 H3)))))))) H9)) H8))))))))))))) c y a H0))) H))))). theorem arity_gen_bind: \forall (b: B).((not (eq B b Abst)) \to (\forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (a2: A).((arity g c (THead (Bind b) u t) a2) \to (ex2 A (\lambda (a1: A).(arity g c u a1)) (\lambda (_: A).(arity g (CHead c (Bind b) u) t a2)))))))))) \def - \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a2: A).(\lambda (H0: (arity g c (THead (Bind b) u t) a2)).(insert_eq T (THead (Bind b) u t) (\lambda (t0: T).(arity g c t0 a2)) (ex2 A (\lambda (a1: A).(arity g c u a1)) (\lambda (_: A).(arity g (CHead c (Bind b) u) t a2))) (\lambda (y: T).(\lambda (H1: (arity g c y a2)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a: A).((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H2: (eq T (TSort n) (THead (Bind b) u t))).(let H3 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t) H2) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t (ASort O n)))) H3))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 a)).(\lambda (_: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g d u a1)) (\lambda (_: A).(arity g (CHead d (Bind b) u) t a)))))).(\lambda (H5: (eq T (TLRef i) (THead (Bind b) u t))).(let H6 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t) H5) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a))) H6))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 (asucc g a))).(\lambda (_: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g d u a1)) (\lambda (_: A).(arity g (CHead d (Bind b) u) t (asucc g a))))))).(\lambda (H5: (eq T (TLRef i) (THead (Bind b) u t))).(let H6 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t) H5) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a))) H6))))))))))) (\lambda (b0: B).(\lambda (H2: (not (eq B b0 Abst))).(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H3: (arity g c0 u0 a1)).(\lambda (H4: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1)))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (H5: (arity g (CHead c0 (Bind b0) u0) t0 a0)).(\lambda (H6: (((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b0) u0) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t a0)))))).(\lambda (H7: (eq T (THead (Bind b0) u0 t0) (THead (Bind b) u t))).(let H8 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u0 t0) (THead (Bind b) u t) H7) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b0) u0 t0) (THead (Bind b) u t) H7) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) u0 t0) (THead (Bind b) u t) H7) in (\lambda (H11: (eq T u0 u)).(\lambda (H12: (eq B b0 b)).(let H13 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b0) u0) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t a0))))) H6 t H10) in (let H14 \def (eq_ind T t0 (\lambda (t: T).(arity g (CHead c0 (Bind b0) u0) t a0)) H5 t H10) in (let H15 \def (eq_ind T u0 (\lambda (t0: T).((eq T t (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b0) t0) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind b0) t0) (Bind b) u) t a0))))) H13 u H11) in (let H16 \def (eq_ind T u0 (\lambda (t0: T).(arity g (CHead c0 (Bind b0) t0) t a0)) H14 u H11) in (let H17 \def (eq_ind T u0 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1))))) H4 u H11) in (let H18 \def (eq_ind T u0 (\lambda (t: T).(arity g c0 t a1)) H3 u H11) in (let H19 \def (eq_ind B b0 (\lambda (b0: B).((eq T t (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b0) u) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind b0) u) (Bind b) u) t a0))))) H15 b H12) in (let H20 \def (eq_ind B b0 (\lambda (b: B).(arity g (CHead c0 (Bind b) u) t a0)) H16 b H12) in (let H21 \def (eq_ind B b0 (\lambda (b: B).(not (eq B b Abst))) H2 b H12) in (ex_intro2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a0)) a1 H18 H20))))))))))))) H9)) H8)))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H2: (arity g c0 u0 (asucc g a1))).(\lambda (H3: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t (asucc g a1))))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (H4: (arity g (CHead c0 (Bind Abst) u0) t0 a0)).(\lambda (H5: (((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u0) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind Abst) u0) (Bind b) u) t a0)))))).(\lambda (H6: (eq T (THead (Bind Abst) u0 t0) (THead (Bind b) u t))).(let H7 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow Abst | (TLRef _) \Rightarrow Abst | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (THead (Bind Abst) u0 t0) (THead (Bind b) u t) H6) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind Abst) u0 t0) (THead (Bind b) u t) H6) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abst) u0 t0) (THead (Bind b) u t) H6) in (\lambda (H10: (eq T u0 u)).(\lambda (H11: (eq B Abst b)).(let H12 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u0) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind Abst) u0) (Bind b) u) t a0))))) H5 t H9) in (let H13 \def (eq_ind T t0 (\lambda (t: T).(arity g (CHead c0 (Bind Abst) u0) t a0)) H4 t H9) in (let H14 \def (eq_ind T u0 (\lambda (t0: T).((eq T t (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) t0) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind Abst) t0) (Bind b) u) t a0))))) H12 u H10) in (let H15 \def (eq_ind T u0 (\lambda (t0: T).(arity g (CHead c0 (Bind Abst) t0) t a0)) H13 u H10) in (let H16 \def (eq_ind T u0 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t (asucc g a1)))))) H3 u H10) in (let H17 \def (eq_ind T u0 (\lambda (t: T).(arity g c0 t (asucc g a1))) H2 u H10) in (let H18 \def (eq_ind_r B b (\lambda (b: B).((eq T t (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind Abst) u) (Bind b) u) t a0))))) H14 Abst H11) in (let H19 \def (eq_ind_r B b (\lambda (b: B).((eq T u (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t (asucc g a1)))))) H16 Abst H11) in (let H20 \def (eq_ind_r B b (\lambda (b: B).(not (eq B b Abst))) H Abst H11) in (eq_ind B Abst (\lambda (b0: B).(ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b0) u) t (AHead a1 a0))))) (let H21 \def (match (H20 (refl_equal B Abst)) return (\lambda (_: ?).(ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind Abst) u) t (AHead a1 a0))))) with []) in H21) b H11))))))))))))) H8)) H7)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1)))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (_: (arity g c0 t0 (AHead a1 a0))).(\lambda (_: (((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t (AHead a1 a0))))))).(\lambda (H6: (eq T (THead (Flat Appl) u0 t0) (THead (Bind b) u t))).(let H7 \def (eq_ind T (THead (Flat Appl) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t) H6) in (False_ind (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a0))) H7)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a: A).(\lambda (_: (arity g c0 u0 (asucc g a))).(\lambda (_: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t (asucc g a))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 a)).(\lambda (_: (((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a)))))).(\lambda (H6: (eq T (THead (Flat Cast) u0 t0) (THead (Bind b) u t))).(let H7 \def (eq_ind T (THead (Flat Cast) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t) H6) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a))) H7))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (H2: (arity g c0 t0 a1)).(\lambda (H3: (((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1)))))).(\lambda (a0: A).(\lambda (H4: (leq g a1 a0)).(\lambda (H5: (eq T t0 (THead (Bind b) u t))).(let H6 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Bind b) u t) H5) in (let H7 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1))))) H3 (THead (Bind b) u t) H6) in (let H8 \def (eq_ind T t0 (\lambda (t: T).(arity g c0 t a1)) H2 (THead (Bind b) u t) H6) in (let H9 \def (H7 (refl_equal T (THead (Bind b) u t))) in (ex2_ind A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1)) (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a0))) (\lambda (x: A).(\lambda (H10: (arity g c0 u x)).(\lambda (H11: (arity g (CHead c0 (Bind b) u) t a1)).(ex_intro2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a0)) x H10 (arity_repl g (CHead c0 (Bind b) u) t a1 H11 a0 H4))))) H9))))))))))))) c y a2 H1))) H0)))))))). + \lambda (b: B).(\lambda (H: (not (eq B b Abst))).(\lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a2: A).(\lambda (H0: (arity g c (THead (Bind b) u t) a2)).(insert_eq T (THead (Bind b) u t) (\lambda (t0: T).(arity g c t0 a2)) (ex2 A (\lambda (a1: A).(arity g c u a1)) (\lambda (_: A).(arity g (CHead c (Bind b) u) t a2))) (\lambda (y: T).(\lambda (H1: (arity g c y a2)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a: A).((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H2: (eq T (TSort n) (THead (Bind b) u t))).(let H3 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t) H2) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t (ASort O n)))) H3))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 a)).(\lambda (_: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g d u a1)) (\lambda (_: A).(arity g (CHead d (Bind b) u) t a)))))).(\lambda (H5: (eq T (TLRef i) (THead (Bind b) u t))).(let H6 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t) H5) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a))) H6))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 (asucc g a))).(\lambda (_: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g d u a1)) (\lambda (_: A).(arity g (CHead d (Bind b) u) t (asucc g a))))))).(\lambda (H5: (eq T (TLRef i) (THead (Bind b) u t))).(let H6 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t) H5) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a))) H6))))))))))) (\lambda (b0: B).(\lambda (H2: (not (eq B b0 Abst))).(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H3: (arity g c0 u0 a1)).(\lambda (H4: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1)))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (H5: (arity g (CHead c0 (Bind b0) u0) t0 a0)).(\lambda (H6: (((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b0) u0) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t a0)))))).(\lambda (H7: (eq T (THead (Bind b0) u0 t0) (THead (Bind b) u t))).(let H8 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u0 t0) (THead (Bind b) u t) H7) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b0) u0 t0) (THead (Bind b) u t) H7) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) u0 t0) (THead (Bind b) u t) H7) in (\lambda (H11: (eq T u0 u)).(\lambda (H12: (eq B b0 b)).(let H13 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b0) u0) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t a0))))) H6 t H10) in (let H14 \def (eq_ind T t0 (\lambda (t: T).(arity g (CHead c0 (Bind b0) u0) t a0)) H5 t H10) in (let H15 \def (eq_ind T u0 (\lambda (t0: T).((eq T t (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b0) t0) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind b0) t0) (Bind b) u) t a0))))) H13 u H11) in (let H16 \def (eq_ind T u0 (\lambda (t0: T).(arity g (CHead c0 (Bind b0) t0) t a0)) H14 u H11) in (let H17 \def (eq_ind T u0 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1))))) H4 u H11) in (let H18 \def (eq_ind T u0 (\lambda (t: T).(arity g c0 t a1)) H3 u H11) in (let H19 \def (eq_ind B b0 (\lambda (b0: B).((eq T t (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b0) u) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind b0) u) (Bind b) u) t a0))))) H15 b H12) in (let H20 \def (eq_ind B b0 (\lambda (b: B).(arity g (CHead c0 (Bind b) u) t a0)) H16 b H12) in (let H21 \def (eq_ind B b0 (\lambda (b: B).(not (eq B b Abst))) H2 b H12) in (ex_intro2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a0)) a1 H18 H20))))))))))))) H9)) H8)))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H2: (arity g c0 u0 (asucc g a1))).(\lambda (H3: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t (asucc g a1))))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (H4: (arity g (CHead c0 (Bind Abst) u0) t0 a0)).(\lambda (H5: (((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u0) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind Abst) u0) (Bind b) u) t a0)))))).(\lambda (H6: (eq T (THead (Bind Abst) u0 t0) (THead (Bind b) u t))).(let H7 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow Abst | (TLRef _) \Rightarrow Abst | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (THead (Bind Abst) u0 t0) (THead (Bind b) u t) H6) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind Abst) u0 t0) (THead (Bind b) u t) H6) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abst) u0 t0) (THead (Bind b) u t) H6) in (\lambda (H10: (eq T u0 u)).(\lambda (H11: (eq B Abst b)).(let H12 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u0) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind Abst) u0) (Bind b) u) t a0))))) H5 t H9) in (let H13 \def (eq_ind T t0 (\lambda (t: T).(arity g (CHead c0 (Bind Abst) u0) t a0)) H4 t H9) in (let H14 \def (eq_ind T u0 (\lambda (t0: T).((eq T t (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) t0) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind Abst) t0) (Bind b) u) t a0))))) H12 u H10) in (let H15 \def (eq_ind T u0 (\lambda (t0: T).(arity g (CHead c0 (Bind Abst) t0) t a0)) H13 u H10) in (let H16 \def (eq_ind T u0 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t (asucc g a1)))))) H3 u H10) in (let H17 \def (eq_ind T u0 (\lambda (t: T).(arity g c0 t (asucc g a1))) H2 u H10) in (let H18 \def (eq_ind_r B b (\lambda (b: B).((eq T t (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u) u a1)) (\lambda (_: A).(arity g (CHead (CHead c0 (Bind Abst) u) (Bind b) u) t a0))))) H14 Abst H11) in (let H19 \def (eq_ind_r B b (\lambda (b: B).((eq T u (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t (asucc g a1)))))) H16 Abst H11) in (let H20 \def (eq_ind_r B b (\lambda (b: B).(not (eq B b Abst))) H Abst H11) in (eq_ind B Abst (\lambda (b0: B).(ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b0) u) t (AHead a1 a0))))) (let H21 \def (match (H20 (refl_equal B Abst)) return (\lambda (_: False).(ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind Abst) u) t (AHead a1 a0))))) with []) in H21) b H11))))))))))))) H8)) H7)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1)))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (_: (arity g c0 t0 (AHead a1 a0))).(\lambda (_: (((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t (AHead a1 a0))))))).(\lambda (H6: (eq T (THead (Flat Appl) u0 t0) (THead (Bind b) u t))).(let H7 \def (eq_ind T (THead (Flat Appl) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t) H6) in (False_ind (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a0))) H7)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a: A).(\lambda (_: (arity g c0 u0 (asucc g a))).(\lambda (_: (((eq T u0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t (asucc g a))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 a)).(\lambda (_: (((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a)))))).(\lambda (H6: (eq T (THead (Flat Cast) u0 t0) (THead (Bind b) u t))).(let H7 \def (eq_ind T (THead (Flat Cast) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t) H6) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a))) H7))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (H2: (arity g c0 t0 a1)).(\lambda (H3: (((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1)))))).(\lambda (a0: A).(\lambda (H4: (leq g a1 a0)).(\lambda (H5: (eq T t0 (THead (Bind b) u t))).(let H6 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Bind b) u t) H5) in (let H7 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1))))) H3 (THead (Bind b) u t) H6) in (let H8 \def (eq_ind T t0 (\lambda (t: T).(arity g c0 t a1)) H2 (THead (Bind b) u t) H6) in (let H9 \def (H7 (refl_equal T (THead (Bind b) u t))) in (ex2_ind A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a1)) (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a0))) (\lambda (x: A).(\lambda (H10: (arity g c0 u x)).(\lambda (H11: (arity g (CHead c0 (Bind b) u) t a1)).(ex_intro2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t a0)) x H10 (arity_repl g (CHead c0 (Bind b) u) t a1 H11 a0 H4))))) H9))))))))))))) c y a2 H1))) H0)))))))). theorem arity_gen_abst: \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (a: A).((arity g c (THead (Bind Abst) u t) a) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c (Bind Abst) u) t a2))))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a: A).(\lambda (H: (arity g c (THead (Bind Abst) u t) a)).(insert_eq T (THead (Bind Abst) u t) (\lambda (t0: T).(arity g c t0 a)) (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c (Bind Abst) u) t a2)))) (\lambda (y: T).(\lambda (H0: (arity g c y a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a0: A).((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) (THead (Bind Abst) u t))).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) u t) H1) in (False_ind (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A (ASort O n) (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))) H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) u0))).(\lambda (a0: A).(\lambda (_: (arity g d u0 a0)).(\lambda (_: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g d u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead d (Bind Abst) u) t a2))))))).(\lambda (H4: (eq T (TLRef i) (THead (Bind Abst) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) u t) H4) in (False_ind (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))) H5))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u0))).(\lambda (a0: A).(\lambda (_: (arity g d u0 (asucc g a0))).(\lambda (_: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A (asucc g a0) (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g d u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead d (Bind Abst) u) t a2))))))).(\lambda (H4: (eq T (TLRef i) (THead (Bind Abst) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) u t) H4) in (False_ind (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))) H5))))))))))) (\lambda (b: B).(\lambda (H1: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H2: (arity g c0 u0 a1)).(\lambda (H3: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (H4: (arity g (CHead c0 (Bind b) u0) t0 a2)).(\lambda (H5: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g (CHead c0 (Bind b) u0) u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead (CHead c0 (Bind b) u0) (Bind Abst) u) t a2))))))).(\lambda (H6: (eq T (THead (Bind b) u0 t0) (THead (Bind Abst) u t))).(let H7 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u0 t0) (THead (Bind Abst) u t) H6) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b) u0 t0) (THead (Bind Abst) u t) H6) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u0 t0) (THead (Bind Abst) u t) H6) in (\lambda (H10: (eq T u0 u)).(\lambda (H11: (eq B b Abst)).(let H12 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g (CHead c0 (Bind b) u0) u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead (CHead c0 (Bind b) u0) (Bind Abst) u) t a2)))))) H5 t H9) in (let H13 \def (eq_ind T t0 (\lambda (t: T).(arity g (CHead c0 (Bind b) u0) t a2)) H4 t H9) in (let H14 \def (eq_ind T u0 (\lambda (t0: T).((eq T t (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g (CHead c0 (Bind b) t0) u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead (CHead c0 (Bind b) t0) (Bind Abst) u) t a2)))))) H12 u H10) in (let H15 \def (eq_ind T u0 (\lambda (t0: T).(arity g (CHead c0 (Bind b) t0) t a2)) H13 u H10) in (let H16 \def (eq_ind T u0 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))))) H3 u H10) in (let H17 \def (eq_ind T u0 (\lambda (t: T).(arity g c0 t a1)) H2 u H10) in (let H18 \def (eq_ind B b (\lambda (b: B).((eq T t (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g (CHead c0 (Bind b) u) u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead (CHead c0 (Bind b) u) (Bind Abst) u) t a2)))))) H14 Abst H11) in (let H19 \def (eq_ind B b (\lambda (b: B).(arity g (CHead c0 (Bind b) u) t a2)) H15 Abst H11) in (let H20 \def (eq_ind B b (\lambda (b: B).(not (eq B b Abst))) H1 Abst H11) in (let H21 \def (match (H20 (refl_equal B Abst)) return (\lambda (_: ?).(ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))) with []) in H21))))))))))))) H8)) H7)))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 u0 (asucc g a1))).(\lambda (H2: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A (asucc g a1) (AHead a2 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (H3: (arity g (CHead c0 (Bind Abst) u0) t0 a2)).(\lambda (H4: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g (CHead c0 (Bind Abst) u0) u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead (CHead c0 (Bind Abst) u0) (Bind Abst) u) t a2))))))).(\lambda (H5: (eq T (THead (Bind Abst) u0 t0) (THead (Bind Abst) u t))).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind Abst) u0 t0) (THead (Bind Abst) u t) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abst) u0 t0) (THead (Bind Abst) u t) H5) in (\lambda (H8: (eq T u0 u)).(let H9 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g (CHead c0 (Bind Abst) u0) u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead (CHead c0 (Bind Abst) u0) (Bind Abst) u) t a2)))))) H4 t H7) in (let H10 \def (eq_ind T t0 (\lambda (t: T).(arity g (CHead c0 (Bind Abst) u0) t a2)) H3 t H7) in (let H11 \def (eq_ind T u0 (\lambda (t0: T).((eq T t (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g (CHead c0 (Bind Abst) t0) u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead (CHead c0 (Bind Abst) t0) (Bind Abst) u) t a2)))))) H9 u H8) in (let H12 \def (eq_ind T u0 (\lambda (t0: T).(arity g (CHead c0 (Bind Abst) t0) t a2)) H10 u H8) in (let H13 \def (eq_ind T u0 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A (asucc g a1) (AHead a2 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))))) H2 u H8) in (let H14 \def (eq_ind T u0 (\lambda (t: T).(arity g c0 t (asucc g a1))) H1 u H8) in (ex3_2_intro A A (\lambda (a3: A).(\lambda (a4: A).(eq A (AHead a1 a2) (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4))) a1 a2 (refl_equal A (AHead a1 a2)) H14 H12))))))))) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead a1 a2))).(\lambda (_: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A (AHead a1 a2) (AHead a3 a4)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))))).(\lambda (H5: (eq T (THead (Flat Appl) u0 t0) (THead (Bind Abst) u t))).(let H6 \def (eq_ind T (THead (Flat Appl) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t) H5) in (False_ind (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4)))) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u0 (asucc g a0))).(\lambda (_: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A (asucc g a0) (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 a0)).(\lambda (_: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))))).(\lambda (H5: (eq T (THead (Flat Cast) u0 t0) (THead (Bind Abst) u t))).(let H6 \def (eq_ind T (THead (Flat Cast) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t) H5) in (False_ind (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))) H6))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t0 a1)).(\lambda (H2: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))))).(\lambda (a2: A).(\lambda (H3: (leq g a1 a2)).(\lambda (H4: (eq T t0 (THead (Bind Abst) u t))).(let H5 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Bind Abst) u t) H4) in (let H6 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))))) H2 (THead (Bind Abst) u t) H5) in (let H7 \def (eq_ind T t0 (\lambda (t: T).(arity g c0 t a1)) H1 (THead (Bind Abst) u t) H5) in (let H8 \def (H6 (refl_equal T (THead (Bind Abst) u t))) in (ex3_2_ind A A (\lambda (a3: A).(\lambda (a4: A).(eq A a1 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4))) (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4)))) (\lambda (x0: A).(\lambda (x1: A).(\lambda (H9: (eq A a1 (AHead x0 x1))).(\lambda (H10: (arity g c0 u (asucc g x0))).(\lambda (H11: (arity g (CHead c0 (Bind Abst) u) t x1)).(let H12 \def (eq_ind A a1 (\lambda (a: A).(leq g a a2)) H3 (AHead x0 x1) H9) in (let H13 \def (eq_ind A a1 (\lambda (a: A).(arity g c0 (THead (Bind Abst) u t) a)) H7 (AHead x0 x1) H9) in (let H_x \def (leq_gen_head g x0 x1 a2 H12) in (let H14 \def H_x in (ex3_2_ind A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(leq g x0 a3))) (\lambda (_: A).(\lambda (a4: A).(leq g x1 a4))) (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4)))) (\lambda (x2: A).(\lambda (x3: A).(\lambda (H15: (eq A a2 (AHead x2 x3))).(\lambda (H16: (leq g x0 x2)).(\lambda (H17: (leq g x1 x3)).(eq_ind_r A (AHead x2 x3) (\lambda (a0: A).(ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a0 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4))))) (ex3_2_intro A A (\lambda (a3: A).(\lambda (a4: A).(eq A (AHead x2 x3) (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4))) x2 x3 (refl_equal A (AHead x2 x3)) (arity_repl g c0 u (asucc g x0) H10 (asucc g x2) (asucc_repl g x0 x2 H16)) (arity_repl g (CHead c0 (Bind Abst) u) t x1 H11 x3 H17)) a2 H15)))))) H14)))))))))) H8))))))))))))) c y a H0))) H)))))). + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a: A).(\lambda (H: (arity g c (THead (Bind Abst) u t) a)).(insert_eq T (THead (Bind Abst) u t) (\lambda (t0: T).(arity g c t0 a)) (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c (Bind Abst) u) t a2)))) (\lambda (y: T).(\lambda (H0: (arity g c y a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a0: A).((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) (THead (Bind Abst) u t))).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) u t) H1) in (False_ind (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A (ASort O n) (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))) H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) u0))).(\lambda (a0: A).(\lambda (_: (arity g d u0 a0)).(\lambda (_: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g d u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead d (Bind Abst) u) t a2))))))).(\lambda (H4: (eq T (TLRef i) (THead (Bind Abst) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) u t) H4) in (False_ind (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))) H5))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u0))).(\lambda (a0: A).(\lambda (_: (arity g d u0 (asucc g a0))).(\lambda (_: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A (asucc g a0) (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g d u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead d (Bind Abst) u) t a2))))))).(\lambda (H4: (eq T (TLRef i) (THead (Bind Abst) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) u t) H4) in (False_ind (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))) H5))))))))))) (\lambda (b: B).(\lambda (H1: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H2: (arity g c0 u0 a1)).(\lambda (H3: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (H4: (arity g (CHead c0 (Bind b) u0) t0 a2)).(\lambda (H5: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g (CHead c0 (Bind b) u0) u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead (CHead c0 (Bind b) u0) (Bind Abst) u) t a2))))))).(\lambda (H6: (eq T (THead (Bind b) u0 t0) (THead (Bind Abst) u t))).(let H7 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u0 t0) (THead (Bind Abst) u t) H6) in ((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b) u0 t0) (THead (Bind Abst) u t) H6) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u0 t0) (THead (Bind Abst) u t) H6) in (\lambda (H10: (eq T u0 u)).(\lambda (H11: (eq B b Abst)).(let H12 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g (CHead c0 (Bind b) u0) u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead (CHead c0 (Bind b) u0) (Bind Abst) u) t a2)))))) H5 t H9) in (let H13 \def (eq_ind T t0 (\lambda (t: T).(arity g (CHead c0 (Bind b) u0) t a2)) H4 t H9) in (let H14 \def (eq_ind T u0 (\lambda (t0: T).((eq T t (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g (CHead c0 (Bind b) t0) u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead (CHead c0 (Bind b) t0) (Bind Abst) u) t a2)))))) H12 u H10) in (let H15 \def (eq_ind T u0 (\lambda (t0: T).(arity g (CHead c0 (Bind b) t0) t a2)) H13 u H10) in (let H16 \def (eq_ind T u0 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))))) H3 u H10) in (let H17 \def (eq_ind T u0 (\lambda (t: T).(arity g c0 t a1)) H2 u H10) in (let H18 \def (eq_ind B b (\lambda (b: B).((eq T t (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g (CHead c0 (Bind b) u) u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead (CHead c0 (Bind b) u) (Bind Abst) u) t a2)))))) H14 Abst H11) in (let H19 \def (eq_ind B b (\lambda (b: B).(arity g (CHead c0 (Bind b) u) t a2)) H15 Abst H11) in (let H20 \def (eq_ind B b (\lambda (b: B).(not (eq B b Abst))) H1 Abst H11) in (let H21 \def (match (H20 (refl_equal B Abst)) return (\lambda (_: False).(ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))) with []) in H21))))))))))))) H8)) H7)))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 u0 (asucc g a1))).(\lambda (H2: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A (asucc g a1) (AHead a2 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (H3: (arity g (CHead c0 (Bind Abst) u0) t0 a2)).(\lambda (H4: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g (CHead c0 (Bind Abst) u0) u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead (CHead c0 (Bind Abst) u0) (Bind Abst) u) t a2))))))).(\lambda (H5: (eq T (THead (Bind Abst) u0 t0) (THead (Bind Abst) u t))).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind Abst) u0 t0) (THead (Bind Abst) u t) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abst) u0 t0) (THead (Bind Abst) u t) H5) in (\lambda (H8: (eq T u0 u)).(let H9 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g (CHead c0 (Bind Abst) u0) u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead (CHead c0 (Bind Abst) u0) (Bind Abst) u) t a2)))))) H4 t H7) in (let H10 \def (eq_ind T t0 (\lambda (t: T).(arity g (CHead c0 (Bind Abst) u0) t a2)) H3 t H7) in (let H11 \def (eq_ind T u0 (\lambda (t0: T).((eq T t (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a3: A).(eq A a2 (AHead a1 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g (CHead c0 (Bind Abst) t0) u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead (CHead c0 (Bind Abst) t0) (Bind Abst) u) t a2)))))) H9 u H8) in (let H12 \def (eq_ind T u0 (\lambda (t0: T).(arity g (CHead c0 (Bind Abst) t0) t a2)) H10 u H8) in (let H13 \def (eq_ind T u0 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A (asucc g a1) (AHead a2 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))))) H2 u H8) in (let H14 \def (eq_ind T u0 (\lambda (t: T).(arity g c0 t (asucc g a1))) H1 u H8) in (ex3_2_intro A A (\lambda (a3: A).(\lambda (a4: A).(eq A (AHead a1 a2) (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4))) a1 a2 (refl_equal A (AHead a1 a2)) H14 H12))))))))) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead a1 a2))).(\lambda (_: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A (AHead a1 a2) (AHead a3 a4)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))))).(\lambda (H5: (eq T (THead (Flat Appl) u0 t0) (THead (Bind Abst) u t))).(let H6 \def (eq_ind T (THead (Flat Appl) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t) H5) in (False_ind (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4)))) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u0 (asucc g a0))).(\lambda (_: (((eq T u0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A (asucc g a0) (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 a0)).(\lambda (_: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))))).(\lambda (H5: (eq T (THead (Flat Cast) u0 t0) (THead (Bind Abst) u t))).(let H6 \def (eq_ind T (THead (Flat Cast) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t) H5) in (False_ind (ex3_2 A A (\lambda (a1: A).(\lambda (a2: A).(eq A a0 (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))) H6))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t0 a1)).(\lambda (H2: (((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))))))).(\lambda (a2: A).(\lambda (H3: (leq g a1 a2)).(\lambda (H4: (eq T t0 (THead (Bind Abst) u t))).(let H5 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Bind Abst) u t) H4) in (let H6 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (ex3_2 A A (\lambda (a2: A).(\lambda (a3: A).(eq A a1 (AHead a2 a3)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2)))))) H2 (THead (Bind Abst) u t) H5) in (let H7 \def (eq_ind T t0 (\lambda (t: T).(arity g c0 t a1)) H1 (THead (Bind Abst) u t) H5) in (let H8 \def (H6 (refl_equal T (THead (Bind Abst) u t))) in (ex3_2_ind A A (\lambda (a3: A).(\lambda (a4: A).(eq A a1 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4))) (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4)))) (\lambda (x0: A).(\lambda (x1: A).(\lambda (H9: (eq A a1 (AHead x0 x1))).(\lambda (H10: (arity g c0 u (asucc g x0))).(\lambda (H11: (arity g (CHead c0 (Bind Abst) u) t x1)).(let H12 \def (eq_ind A a1 (\lambda (a: A).(leq g a a2)) H3 (AHead x0 x1) H9) in (let H13 \def (eq_ind A a1 (\lambda (a: A).(arity g c0 (THead (Bind Abst) u t) a)) H7 (AHead x0 x1) H9) in (let H_x \def (leq_gen_head g x0 x1 a2 H12) in (let H14 \def H_x in (ex3_2_ind A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(leq g x0 a3))) (\lambda (_: A).(\lambda (a4: A).(leq g x1 a4))) (ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a2 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4)))) (\lambda (x2: A).(\lambda (x3: A).(\lambda (H15: (eq A a2 (AHead x2 x3))).(\lambda (H16: (leq g x0 x2)).(\lambda (H17: (leq g x1 x3)).(eq_ind_r A (AHead x2 x3) (\lambda (a0: A).(ex3_2 A A (\lambda (a3: A).(\lambda (a4: A).(eq A a0 (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4))))) (ex3_2_intro A A (\lambda (a3: A).(\lambda (a4: A).(eq A (AHead x2 x3) (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c0 u (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c0 (Bind Abst) u) t a4))) x2 x3 (refl_equal A (AHead x2 x3)) (arity_repl g c0 u (asucc g x0) H10 (asucc g x2) (asucc_repl g x0 x2 H16)) (arity_repl g (CHead c0 (Bind Abst) u) t x1 H11 x3 H17)) a2 H15)))))) H14)))))))))) H8))))))))))))) c y a H0))) H)))))). theorem arity_gen_appl: \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (a2: A).((arity g c (THead (Flat Appl) u t) a2) \to (ex2 A (\lambda (a1: A).(arity g c u a1)) (\lambda (a1: A).(arity g c t (AHead a1 a2))))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a2: A).(\lambda (H: (arity g c (THead (Flat Appl) u t) a2)).(insert_eq T (THead (Flat Appl) u t) (\lambda (t0: T).(arity g c t0 a2)) (ex2 A (\lambda (a1: A).(arity g c u a1)) (\lambda (a1: A).(arity g c t (AHead a1 a2)))) (\lambda (y: T).(\lambda (H0: (arity g c y a2)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a: A).((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 a)))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) (THead (Flat Appl) u t))).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u t) H1) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 (ASort O n))))) H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 a)).(\lambda (_: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (AHead a1 a))))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Appl) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u t) H4) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 a)))) H5))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 (asucc g a))).(\lambda (_: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (AHead a1 (asucc g a)))))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Appl) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u t) H4) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 a)))) H5))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 a1))))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (_: (arity g (CHead c0 (Bind b) u0) t0 a0)).(\lambda (_: (((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b) u0) u a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind b) u0) t (AHead a1 a0))))))).(\lambda (H6: (eq T (THead (Bind b) u0 t0) (THead (Flat Appl) u t))).(let H7 \def (eq_ind T (THead (Bind b) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u t) H6) in (False_ind (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a0)))) H7)))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 (asucc g a1))).(\lambda (_: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 (asucc g a1)))))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u0) t0 a0)).(\lambda (_: (((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u0) u a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u0) t (AHead a1 a0))))))).(\lambda (H5: (eq T (THead (Bind Abst) u0 t0) (THead (Flat Appl) u t))).(let H6 \def (eq_ind T (THead (Bind Abst) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u t) H5) in (False_ind (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 (AHead a1 a0))))) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 u0 a1)).(\lambda (H2: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 a1))))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (H3: (arity g c0 t0 (AHead a1 a0))).(\lambda (H4: (((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 (AHead a1 a0)))))))).(\lambda (H5: (eq T (THead (Flat Appl) u0 t0) (THead (Flat Appl) u t))).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) u0 t0) (THead (Flat Appl) u t) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) u0 t0) (THead (Flat Appl) u t) H5) in (\lambda (H8: (eq T u0 u)).(let H9 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 (AHead a1 a0))))))) H4 t H7) in (let H10 \def (eq_ind T t0 (\lambda (t: T).(arity g c0 t (AHead a1 a0))) H3 t H7) in (let H11 \def (eq_ind T u0 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 a1)))))) H2 u H8) in (let H12 \def (eq_ind T u0 (\lambda (t: T).(arity g c0 t a1)) H1 u H8) in (ex_intro2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a0))) a1 H12 H10))))))) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a: A).(\lambda (_: (arity g c0 u0 (asucc g a))).(\lambda (_: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 (asucc g a)))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 a)).(\lambda (_: (((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 a))))))).(\lambda (H5: (eq T (THead (Flat Cast) u0 t0) (THead (Flat Appl) u t))).(let H6 \def (eq_ind T (THead (Flat Cast) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) u t) H5) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 a)))) H6))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t0 a1)).(\lambda (H2: (((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 a1))))))).(\lambda (a0: A).(\lambda (H3: (leq g a1 a0)).(\lambda (H4: (eq T t0 (THead (Flat Appl) u t))).(let H5 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Flat Appl) u t) H4) in (let H6 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 a1)))))) H2 (THead (Flat Appl) u t) H5) in (let H7 \def (eq_ind T t0 (\lambda (t: T).(arity g c0 t a1)) H1 (THead (Flat Appl) u t) H5) in (let H8 \def (H6 (refl_equal T (THead (Flat Appl) u t))) in (ex2_ind A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a1))) (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a0)))) (\lambda (x: A).(\lambda (H9: (arity g c0 u x)).(\lambda (H10: (arity g c0 t (AHead x a1))).(ex_intro2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a0))) x H9 (arity_repl g c0 t (AHead x a1) H10 (AHead x a0) (leq_head g x x (leq_refl g x) a1 a0 H3)))))) H8))))))))))))) c y a2 H0))) H)))))). + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a2: A).(\lambda (H: (arity g c (THead (Flat Appl) u t) a2)).(insert_eq T (THead (Flat Appl) u t) (\lambda (t0: T).(arity g c t0 a2)) (ex2 A (\lambda (a1: A).(arity g c u a1)) (\lambda (a1: A).(arity g c t (AHead a1 a2)))) (\lambda (y: T).(\lambda (H0: (arity g c y a2)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a: A).((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 a)))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) (THead (Flat Appl) u t))).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u t) H1) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 (ASort O n))))) H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 a)).(\lambda (_: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (AHead a1 a))))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Appl) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u t) H4) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 a)))) H5))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u0))).(\lambda (a: A).(\lambda (_: (arity g d u0 (asucc g a))).(\lambda (_: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (AHead a1 (asucc g a)))))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Appl) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u t) H4) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 a)))) H5))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 a1))))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (_: (arity g (CHead c0 (Bind b) u0) t0 a0)).(\lambda (_: (((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b) u0) u a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind b) u0) t (AHead a1 a0))))))).(\lambda (H6: (eq T (THead (Bind b) u0 t0) (THead (Flat Appl) u t))).(let H7 \def (eq_ind T (THead (Bind b) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u t) H6) in (False_ind (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a0)))) H7)))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 (asucc g a1))).(\lambda (_: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 (asucc g a1)))))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u0) t0 a0)).(\lambda (_: (((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u0) u a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u0) t (AHead a1 a0))))))).(\lambda (H5: (eq T (THead (Bind Abst) u0 t0) (THead (Flat Appl) u t))).(let H6 \def (eq_ind T (THead (Bind Abst) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u t) H5) in (False_ind (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 (AHead a1 a0))))) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 u0 a1)).(\lambda (H2: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 a1))))))).(\lambda (t0: T).(\lambda (a0: A).(\lambda (H3: (arity g c0 t0 (AHead a1 a0))).(\lambda (H4: (((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 (AHead a1 a0)))))))).(\lambda (H5: (eq T (THead (Flat Appl) u0 t0) (THead (Flat Appl) u t))).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) u0 t0) (THead (Flat Appl) u t) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) u0 t0) (THead (Flat Appl) u t) H5) in (\lambda (H8: (eq T u0 u)).(let H9 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 (AHead a1 a0))))))) H4 t H7) in (let H10 \def (eq_ind T t0 (\lambda (t: T).(arity g c0 t (AHead a1 a0))) H3 t H7) in (let H11 \def (eq_ind T u0 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 a1)))))) H2 u H8) in (let H12 \def (eq_ind T u0 (\lambda (t: T).(arity g c0 t a1)) H1 u H8) in (ex_intro2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a0))) a1 H12 H10))))))) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a: A).(\lambda (_: (arity g c0 u0 (asucc g a))).(\lambda (_: (((eq T u0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 (asucc g a)))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 a)).(\lambda (_: (((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 a))))))).(\lambda (H5: (eq T (THead (Flat Cast) u0 t0) (THead (Flat Appl) u t))).(let H6 \def (eq_ind T (THead (Flat Cast) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) u t) H5) in (False_ind (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (AHead a1 a)))) H6))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t0 a1)).(\lambda (H2: (((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 a1))))))).(\lambda (a0: A).(\lambda (H3: (leq g a1 a0)).(\lambda (H4: (eq T t0 (THead (Flat Appl) u t))).(let H5 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Flat Appl) u t) H4) in (let H6 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a2: A).(arity g c0 t (AHead a2 a1)))))) H2 (THead (Flat Appl) u t) H5) in (let H7 \def (eq_ind T t0 (\lambda (t: T).(arity g c0 t a1)) H1 (THead (Flat Appl) u t) H5) in (let H8 \def (H6 (refl_equal T (THead (Flat Appl) u t))) in (ex2_ind A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a1))) (ex2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a0)))) (\lambda (x: A).(\lambda (H9: (arity g c0 u x)).(\lambda (H10: (arity g c0 t (AHead x a1))).(ex_intro2 A (\lambda (a3: A).(arity g c0 u a3)) (\lambda (a3: A).(arity g c0 t (AHead a3 a0))) x H9 (arity_repl g c0 t (AHead x a1) H10 (AHead x a0) (leq_head g x x (leq_refl g x) a1 a0 H3)))))) H8))))))))))))) c y a2 H0))) H)))))). theorem arity_gen_cast: \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (a: A).((arity g c (THead (Flat Cast) u t) a) \to (land (arity g c u (asucc g a)) (arity g c t a))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a: A).(\lambda (H: (arity g c (THead (Flat Cast) u t) a)).(insert_eq T (THead (Flat Cast) u t) (\lambda (t0: T).(arity g c t0 a)) (land (arity g c u (asucc g a)) (arity g c t a)) (\lambda (y: T).(\lambda (H0: (arity g c y a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a0: A).((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a0)) (arity g c0 t a0)))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) (THead (Flat Cast) u t))).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) u t) H1) in (False_ind (land (arity g c0 u (asucc g (ASort O n))) (arity g c0 t (ASort O n))) H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) u0))).(\lambda (a0: A).(\lambda (_: (arity g d u0 a0)).(\lambda (_: (((eq T u0 (THead (Flat Cast) u t)) \to (land (arity g d u (asucc g a0)) (arity g d t a0))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Cast) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) u t) H4) in (False_ind (land (arity g c0 u (asucc g a0)) (arity g c0 t a0)) H5))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u0))).(\lambda (a0: A).(\lambda (_: (arity g d u0 (asucc g a0))).(\lambda (_: (((eq T u0 (THead (Flat Cast) u t)) \to (land (arity g d u (asucc g (asucc g a0))) (arity g d t (asucc g a0)))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Cast) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) u t) H4) in (False_ind (land (arity g c0 u (asucc g a0)) (arity g c0 t a0)) H5))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a1)) (arity g c0 t a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind b) u0) t0 a2)).(\lambda (_: (((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g (CHead c0 (Bind b) u0) u (asucc g a2)) (arity g (CHead c0 (Bind b) u0) t a2))))).(\lambda (H6: (eq T (THead (Bind b) u0 t0) (THead (Flat Cast) u t))).(let H7 \def (eq_ind T (THead (Bind b) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u t) H6) in (False_ind (land (arity g c0 u (asucc g a2)) (arity g c0 t a2)) H7)))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 (asucc g a1))).(\lambda (_: (((eq T u0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g (asucc g a1))) (arity g c0 t (asucc g a1)))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u0) t0 a2)).(\lambda (_: (((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g (CHead c0 (Bind Abst) u0) u (asucc g a2)) (arity g (CHead c0 (Bind Abst) u0) t a2))))).(\lambda (H5: (eq T (THead (Bind Abst) u0 t0) (THead (Flat Cast) u t))).(let H6 \def (eq_ind T (THead (Bind Abst) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u t) H5) in (False_ind (land (arity g c0 u (asucc g (AHead a1 a2))) (arity g c0 t (AHead a1 a2))) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a1)) (arity g c0 t a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead a1 a2))).(\lambda (_: (((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g (AHead a1 a2))) (arity g c0 t (AHead a1 a2)))))).(\lambda (H5: (eq T (THead (Flat Appl) u0 t0) (THead (Flat Cast) u t))).(let H6 \def (eq_ind T (THead (Flat Appl) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u t) H5) in (False_ind (land (arity g c0 u (asucc g a2)) (arity g c0 t a2)) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a0: A).(\lambda (H1: (arity g c0 u0 (asucc g a0))).(\lambda (H2: (((eq T u0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g (asucc g a0))) (arity g c0 t (asucc g a0)))))).(\lambda (t0: T).(\lambda (H3: (arity g c0 t0 a0)).(\lambda (H4: (((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a0)) (arity g c0 t a0))))).(\lambda (H5: (eq T (THead (Flat Cast) u0 t0) (THead (Flat Cast) u t))).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) u0 t0) (THead (Flat Cast) u t) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) u0 t0) (THead (Flat Cast) u t) H5) in (\lambda (H8: (eq T u0 u)).(let H9 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a0)) (arity g c0 t a0)))) H4 t H7) in (let H10 \def (eq_ind T t0 (\lambda (t: T).(arity g c0 t a0)) H3 t H7) in (let H11 \def (eq_ind T u0 (\lambda (t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g (asucc g a0))) (arity g c0 t (asucc g a0))))) H2 u H8) in (let H12 \def (eq_ind T u0 (\lambda (t: T).(arity g c0 t (asucc g a0))) H1 u H8) in (conj (arity g c0 u (asucc g a0)) (arity g c0 t a0) H12 H10))))))) H6))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t0 a1)).(\lambda (H2: (((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a1)) (arity g c0 t a1))))).(\lambda (a2: A).(\lambda (H3: (leq g a1 a2)).(\lambda (H4: (eq T t0 (THead (Flat Cast) u t))).(let H5 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Flat Cast) u t) H4) in (let H6 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a1)) (arity g c0 t a1)))) H2 (THead (Flat Cast) u t) H5) in (let H7 \def (eq_ind T t0 (\lambda (t: T).(arity g c0 t a1)) H1 (THead (Flat Cast) u t) H5) in (let H8 \def (H6 (refl_equal T (THead (Flat Cast) u t))) in (and_ind (arity g c0 u (asucc g a1)) (arity g c0 t a1) (land (arity g c0 u (asucc g a2)) (arity g c0 t a2)) (\lambda (H9: (arity g c0 u (asucc g a1))).(\lambda (H10: (arity g c0 t a1)).(conj (arity g c0 u (asucc g a2)) (arity g c0 t a2) (arity_repl g c0 u (asucc g a1) H9 (asucc g a2) (asucc_repl g a1 a2 H3)) (arity_repl g c0 t a1 H10 a2 H3)))) H8))))))))))))) c y a H0))) H)))))). + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (a: A).(\lambda (H: (arity g c (THead (Flat Cast) u t) a)).(insert_eq T (THead (Flat Cast) u t) (\lambda (t0: T).(arity g c t0 a)) (land (arity g c u (asucc g a)) (arity g c t a)) (\lambda (y: T).(\lambda (H0: (arity g c y a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a0: A).((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a0)) (arity g c0 t a0)))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) (THead (Flat Cast) u t))).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) u t) H1) in (False_ind (land (arity g c0 u (asucc g (ASort O n))) (arity g c0 t (ASort O n))) H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) u0))).(\lambda (a0: A).(\lambda (_: (arity g d u0 a0)).(\lambda (_: (((eq T u0 (THead (Flat Cast) u t)) \to (land (arity g d u (asucc g a0)) (arity g d t a0))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Cast) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) u t) H4) in (False_ind (land (arity g c0 u (asucc g a0)) (arity g c0 t a0)) H5))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abst) u0))).(\lambda (a0: A).(\lambda (_: (arity g d u0 (asucc g a0))).(\lambda (_: (((eq T u0 (THead (Flat Cast) u t)) \to (land (arity g d u (asucc g (asucc g a0))) (arity g d t (asucc g a0)))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Cast) u t))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) u t) H4) in (False_ind (land (arity g c0 u (asucc g a0)) (arity g c0 t a0)) H5))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a1)) (arity g c0 t a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind b) u0) t0 a2)).(\lambda (_: (((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g (CHead c0 (Bind b) u0) u (asucc g a2)) (arity g (CHead c0 (Bind b) u0) t a2))))).(\lambda (H6: (eq T (THead (Bind b) u0 t0) (THead (Flat Cast) u t))).(let H7 \def (eq_ind T (THead (Bind b) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u t) H6) in (False_ind (land (arity g c0 u (asucc g a2)) (arity g c0 t a2)) H7)))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 (asucc g a1))).(\lambda (_: (((eq T u0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g (asucc g a1))) (arity g c0 t (asucc g a1)))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u0) t0 a2)).(\lambda (_: (((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g (CHead c0 (Bind Abst) u0) u (asucc g a2)) (arity g (CHead c0 (Bind Abst) u0) t a2))))).(\lambda (H5: (eq T (THead (Bind Abst) u0 t0) (THead (Flat Cast) u t))).(let H6 \def (eq_ind T (THead (Bind Abst) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u t) H5) in (False_ind (land (arity g c0 u (asucc g (AHead a1 a2))) (arity g c0 t (AHead a1 a2))) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u0 a1)).(\lambda (_: (((eq T u0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a1)) (arity g c0 t a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead a1 a2))).(\lambda (_: (((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g (AHead a1 a2))) (arity g c0 t (AHead a1 a2)))))).(\lambda (H5: (eq T (THead (Flat Appl) u0 t0) (THead (Flat Cast) u t))).(let H6 \def (eq_ind T (THead (Flat Appl) u0 t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u t) H5) in (False_ind (land (arity g c0 u (asucc g a2)) (arity g c0 t a2)) H6)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (a0: A).(\lambda (H1: (arity g c0 u0 (asucc g a0))).(\lambda (H2: (((eq T u0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g (asucc g a0))) (arity g c0 t (asucc g a0)))))).(\lambda (t0: T).(\lambda (H3: (arity g c0 t0 a0)).(\lambda (H4: (((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a0)) (arity g c0 t a0))))).(\lambda (H5: (eq T (THead (Flat Cast) u0 t0) (THead (Flat Cast) u t))).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) u0 t0) (THead (Flat Cast) u t) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) u0 t0) (THead (Flat Cast) u t) H5) in (\lambda (H8: (eq T u0 u)).(let H9 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a0)) (arity g c0 t a0)))) H4 t H7) in (let H10 \def (eq_ind T t0 (\lambda (t: T).(arity g c0 t a0)) H3 t H7) in (let H11 \def (eq_ind T u0 (\lambda (t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g (asucc g a0))) (arity g c0 t (asucc g a0))))) H2 u H8) in (let H12 \def (eq_ind T u0 (\lambda (t: T).(arity g c0 t (asucc g a0))) H1 u H8) in (conj (arity g c0 u (asucc g a0)) (arity g c0 t a0) H12 H10))))))) H6))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (H1: (arity g c0 t0 a1)).(\lambda (H2: (((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a1)) (arity g c0 t a1))))).(\lambda (a2: A).(\lambda (H3: (leq g a1 a2)).(\lambda (H4: (eq T t0 (THead (Flat Cast) u t))).(let H5 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Flat Cast) u t) H4) in (let H6 \def (eq_ind T t0 (\lambda (t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (land (arity g c0 u (asucc g a1)) (arity g c0 t a1)))) H2 (THead (Flat Cast) u t) H5) in (let H7 \def (eq_ind T t0 (\lambda (t: T).(arity g c0 t a1)) H1 (THead (Flat Cast) u t) H5) in (let H8 \def (H6 (refl_equal T (THead (Flat Cast) u t))) in (and_ind (arity g c0 u (asucc g a1)) (arity g c0 t a1) (land (arity g c0 u (asucc g a2)) (arity g c0 t a2)) (\lambda (H9: (arity g c0 u (asucc g a1))).(\lambda (H10: (arity g c0 t a1)).(conj (arity g c0 u (asucc g a2)) (arity g c0 t a2) (arity_repl g c0 u (asucc g a1) H9 (asucc g a2) (asucc_repl g a1 a2 H3)) (arity_repl g c0 t a1 H10 a2 H3)))) H8))))))))))))) c y a H0))) H)))))). theorem arity_gen_appls: \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (vs: TList).(\forall (a2: A).((arity g c (THeads (Flat Appl) vs t) a2) \to (ex A (\lambda (a: A).(arity g c t a)))))))) @@ -1718,7 +1718,7 @@ theorem node_inh: theorem arity_gen_cvoid_subst0: \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t a) \to (\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d (Bind Void) u)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t v) \to (\forall (P: Prop).P)))))))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: (arity g c t a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (_: A).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: Prop).P))))))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Void) u))).(\lambda (w: T).(\lambda (v: T).(\lambda (H1: (subst0 i w (TSort n) v)).(\lambda (P: Prop).(subst0_gen_sort w v i n H1 P))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (_: ((\forall (d0: C).(\forall (u0: T).(\forall (i: nat).((getl i d (CHead d0 (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (d0: C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H3: (getl i0 c0 (CHead d0 (Bind Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H4: (subst0 i0 w (TLRef i) v)).(\lambda (P: Prop).(and_ind (eq nat i i0) (eq T v (lift (S i) O w)) P (\lambda (H5: (eq nat i i0)).(\lambda (_: (eq T v (lift (S i) O w))).(let H7 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c0 (CHead d0 (Bind Void) u0))) H3 i H5) in (let H8 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c: C).(getl i c0 c)) H0 (CHead d0 (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead d0 (Bind Void) u0) H7)) in (let H9 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d0 (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead d0 (Bind Void) u0) H7)) in (False_ind P H9)))))) (subst0_gen_lref w v i0 i H4)))))))))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (_: ((\forall (d0: C).(\forall (u0: T).(\forall (i: nat).((getl i d (CHead d0 (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (d0: C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H3: (getl i0 c0 (CHead d0 (Bind Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H4: (subst0 i0 w (TLRef i) v)).(\lambda (P: Prop).(and_ind (eq nat i i0) (eq T v (lift (S i) O w)) P (\lambda (H5: (eq nat i i0)).(\lambda (_: (eq T v (lift (S i) O w))).(let H7 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c0 (CHead d0 (Bind Void) u0))) H3 i H5) in (let H8 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c: C).(getl i c0 c)) H0 (CHead d0 (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead d0 (Bind Void) u0) H7)) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d0 (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead d0 (Bind Void) u0) H7)) in (False_ind P H9)))))) (subst0_gen_lref w v i0 i H4)))))))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (H2: ((\forall (d: C).(\forall (u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t0 a2)).(\lambda (H4: ((\forall (d: C).(\forall (u0: T).(\forall (i: nat).((getl i (CHead c0 (Bind b) u) (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: Prop).P)))))))))).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H5: (getl i c0 (CHead d (Bind Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H6: (subst0 i w (THead (Bind b) u t0) v)).(\lambda (P: Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T v (THead (Bind b) u2 t0))) (\lambda (u2: T).(subst0 i w u u2))) (ex2 T (\lambda (t2: T).(eq T v (THead (Bind b) u t2))) (\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind b) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2)))) P (\lambda (H7: (ex2 T (\lambda (u2: T).(eq T v (THead (Bind b) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)))).(ex2_ind T (\lambda (u2: T).(eq T v (THead (Bind b) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Bind b) x t0))).(\lambda (H9: (subst0 i w u x)).(H2 d u0 i H5 w x H9 P)))) H7)) (\lambda (H7: (ex2 T (\lambda (t2: T).(eq T v (THead (Bind b) u t2))) (\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2)))).(ex2_ind T (\lambda (t2: T).(eq T v (THead (Bind b) u t2))) (\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Bind b) u x))).(\lambda (H9: (subst0 (s (Bind b) i) w t0 x)).(H4 d u0 (S i) (getl_clear_bind b (CHead c0 (Bind b) u) c0 u (clear_bind b c0 u) (CHead d (Bind Void) u0) i H5) w x H9 P)))) H7)) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind b) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind b) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T v (THead (Bind b) x0 x1))).(\lambda (H9: (subst0 i w u x0)).(\lambda (_: (subst0 (s (Bind b) i) w t0 x1)).(H2 d u0 i H5 w x0 H9 P)))))) H7)) (subst0_gen_head (Bind b) w u t0 v i H6))))))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u (asucc g a1))).(\lambda (H1: ((\forall (d: C).(\forall (u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t0 a2)).(\lambda (H3: ((\forall (d: C).(\forall (u0: T).(\forall (i: nat).((getl i (CHead c0 (Bind Abst) u) (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: Prop).P)))))))))).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c0 (CHead d (Bind Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H5: (subst0 i w (THead (Bind Abst) u t0) v)).(\lambda (P: Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T v (THead (Bind Abst) u2 t0))) (\lambda (u2: T).(subst0 i w u u2))) (ex2 T (\lambda (t2: T).(eq T v (THead (Bind Abst) u t2))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2)))) P (\lambda (H6: (ex2 T (\lambda (u2: T).(eq T v (THead (Bind Abst) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)))).(ex2_ind T (\lambda (u2: T).(eq T v (THead (Bind Abst) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Bind Abst) x t0))).(\lambda (H8: (subst0 i w u x)).(H1 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex2 T (\lambda (t2: T).(eq T v (THead (Bind Abst) u t2))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2)))).(ex2_ind T (\lambda (t2: T).(eq T v (THead (Bind Abst) u t2))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Bind Abst) u x))).(\lambda (H8: (subst0 (s (Bind Abst) i) w t0 x)).(H3 d u0 (S i) (getl_clear_bind Abst (CHead c0 (Bind Abst) u) c0 u (clear_bind Abst c0 u) (CHead d (Bind Void) u0) i H4) w x H8 P)))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T v (THead (Bind Abst) x0 x1))).(\lambda (H8: (subst0 i w u x0)).(\lambda (_: (subst0 (s (Bind Abst) i) w t0 x1)).(H1 d u0 i H4 w x0 H8 P)))))) H6)) (subst0_gen_head (Bind Abst) w u t0 v i H5))))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (H1: ((\forall (d: C).(\forall (u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead a1 a2))).(\lambda (H3: ((\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: Prop).P)))))))))).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c0 (CHead d (Bind Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H5: (subst0 i w (THead (Flat Appl) u t0) v)).(\lambda (P: Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T v (THead (Flat Appl) u2 t0))) (\lambda (u2: T).(subst0 i w u u2))) (ex2 T (\lambda (t2: T).(eq T v (THead (Flat Appl) u t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 t2)))) P (\lambda (H6: (ex2 T (\lambda (u2: T).(eq T v (THead (Flat Appl) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)))).(ex2_ind T (\lambda (u2: T).(eq T v (THead (Flat Appl) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Flat Appl) x t0))).(\lambda (H8: (subst0 i w u x)).(H1 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex2 T (\lambda (t2: T).(eq T v (THead (Flat Appl) u t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 t2)))).(ex2_ind T (\lambda (t2: T).(eq T v (THead (Flat Appl) u t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 t2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Flat Appl) u x))).(\lambda (H8: (subst0 (s (Flat Appl) i) w t0 x)).(H3 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 t2))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T v (THead (Flat Appl) x0 x1))).(\lambda (H8: (subst0 i w u x0)).(\lambda (_: (subst0 (s (Flat Appl) i) w t0 x1)).(H1 d u0 i H4 w x0 H8 P)))))) H6)) (subst0_gen_head (Flat Appl) w u t0 v i H5))))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda (H1: ((\forall (d: C).(\forall (u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 a0)).(\lambda (H3: ((\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: Prop).P)))))))))).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c0 (CHead d (Bind Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H5: (subst0 i w (THead (Flat Cast) u t0) v)).(\lambda (P: Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T v (THead (Flat Cast) u2 t0))) (\lambda (u2: T).(subst0 i w u u2))) (ex2 T (\lambda (t2: T).(eq T v (THead (Flat Cast) u t2))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2)))) P (\lambda (H6: (ex2 T (\lambda (u2: T).(eq T v (THead (Flat Cast) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)))).(ex2_ind T (\lambda (u2: T).(eq T v (THead (Flat Cast) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Flat Cast) x t0))).(\lambda (H8: (subst0 i w u x)).(H1 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex2 T (\lambda (t2: T).(eq T v (THead (Flat Cast) u t2))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2)))).(ex2_ind T (\lambda (t2: T).(eq T v (THead (Flat Cast) u t2))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Flat Cast) u x))).(\lambda (H8: (subst0 (s (Flat Cast) i) w t0 x)).(H3 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T v (THead (Flat Cast) x0 x1))).(\lambda (H8: (subst0 i w u x0)).(\lambda (_: (subst0 (s (Flat Cast) i) w t0 x1)).(H1 d u0 i H4 w x0 H8 P)))))) H6)) (subst0_gen_head (Flat Cast) w u t0 v i H5)))))))))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 t0 a1)).(\lambda (H1: ((\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: Prop).P)))))))))).(\lambda (a2: A).(\lambda (_: (leq g a1 a2)).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H3: (getl i c0 (CHead d (Bind Void) u))).(\lambda (w: T).(\lambda (v: T).(\lambda (H4: (subst0 i w t0 v)).(\lambda (P: Prop).(H1 d u i H3 w v H4 P)))))))))))))))) c t a H))))). + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: (arity g c t a)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (_: A).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: Prop).P))))))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Void) u))).(\lambda (w: T).(\lambda (v: T).(\lambda (H1: (subst0 i w (TSort n) v)).(\lambda (P: Prop).(subst0_gen_sort w v i n H1 P))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (_: ((\forall (d0: C).(\forall (u0: T).(\forall (i: nat).((getl i d (CHead d0 (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (d0: C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H3: (getl i0 c0 (CHead d0 (Bind Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H4: (subst0 i0 w (TLRef i) v)).(\lambda (P: Prop).(and_ind (eq nat i i0) (eq T v (lift (S i) O w)) P (\lambda (H5: (eq nat i i0)).(\lambda (_: (eq T v (lift (S i) O w))).(let H7 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c0 (CHead d0 (Bind Void) u0))) H3 i H5) in (let H8 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c: C).(getl i c0 c)) H0 (CHead d0 (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead d0 (Bind Void) u0) H7)) in (let H9 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d0 (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead d0 (Bind Void) u0) H7)) in (False_ind P H9)))))) (subst0_gen_lref w v i0 i H4)))))))))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (_: ((\forall (d0: C).(\forall (u0: T).(\forall (i: nat).((getl i d (CHead d0 (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (d0: C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H3: (getl i0 c0 (CHead d0 (Bind Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H4: (subst0 i0 w (TLRef i) v)).(\lambda (P: Prop).(and_ind (eq nat i i0) (eq T v (lift (S i) O w)) P (\lambda (H5: (eq nat i i0)).(\lambda (_: (eq T v (lift (S i) O w))).(let H7 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c0 (CHead d0 (Bind Void) u0))) H3 i H5) in (let H8 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c: C).(getl i c0 c)) H0 (CHead d0 (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead d0 (Bind Void) u0) H7)) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d0 (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead d0 (Bind Void) u0) H7)) in (False_ind P H9)))))) (subst0_gen_lref w v i0 i H4)))))))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (H2: ((\forall (d: C).(\forall (u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t0 a2)).(\lambda (H4: ((\forall (d: C).(\forall (u0: T).(\forall (i: nat).((getl i (CHead c0 (Bind b) u) (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: Prop).P)))))))))).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H5: (getl i c0 (CHead d (Bind Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H6: (subst0 i w (THead (Bind b) u t0) v)).(\lambda (P: Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T v (THead (Bind b) u2 t0))) (\lambda (u2: T).(subst0 i w u u2))) (ex2 T (\lambda (t2: T).(eq T v (THead (Bind b) u t2))) (\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind b) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2)))) P (\lambda (H7: (ex2 T (\lambda (u2: T).(eq T v (THead (Bind b) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)))).(ex2_ind T (\lambda (u2: T).(eq T v (THead (Bind b) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Bind b) x t0))).(\lambda (H9: (subst0 i w u x)).(H2 d u0 i H5 w x H9 P)))) H7)) (\lambda (H7: (ex2 T (\lambda (t2: T).(eq T v (THead (Bind b) u t2))) (\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2)))).(ex2_ind T (\lambda (t2: T).(eq T v (THead (Bind b) u t2))) (\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Bind b) u x))).(\lambda (H9: (subst0 (s (Bind b) i) w t0 x)).(H4 d u0 (S i) (getl_clear_bind b (CHead c0 (Bind b) u) c0 u (clear_bind b c0 u) (CHead d (Bind Void) u0) i H5) w x H9 P)))) H7)) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind b) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind b) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind b) i) w t0 t2))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T v (THead (Bind b) x0 x1))).(\lambda (H9: (subst0 i w u x0)).(\lambda (_: (subst0 (s (Bind b) i) w t0 x1)).(H2 d u0 i H5 w x0 H9 P)))))) H7)) (subst0_gen_head (Bind b) w u t0 v i H6))))))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u (asucc g a1))).(\lambda (H1: ((\forall (d: C).(\forall (u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t0 a2)).(\lambda (H3: ((\forall (d: C).(\forall (u0: T).(\forall (i: nat).((getl i (CHead c0 (Bind Abst) u) (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: Prop).P)))))))))).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c0 (CHead d (Bind Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H5: (subst0 i w (THead (Bind Abst) u t0) v)).(\lambda (P: Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T v (THead (Bind Abst) u2 t0))) (\lambda (u2: T).(subst0 i w u u2))) (ex2 T (\lambda (t2: T).(eq T v (THead (Bind Abst) u t2))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2)))) P (\lambda (H6: (ex2 T (\lambda (u2: T).(eq T v (THead (Bind Abst) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)))).(ex2_ind T (\lambda (u2: T).(eq T v (THead (Bind Abst) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Bind Abst) x t0))).(\lambda (H8: (subst0 i w u x)).(H1 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex2 T (\lambda (t2: T).(eq T v (THead (Bind Abst) u t2))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2)))).(ex2_ind T (\lambda (t2: T).(eq T v (THead (Bind Abst) u t2))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Bind Abst) u x))).(\lambda (H8: (subst0 (s (Bind Abst) i) w t0 x)).(H3 d u0 (S i) (getl_clear_bind Abst (CHead c0 (Bind Abst) u) c0 u (clear_bind Abst c0 u) (CHead d (Bind Void) u0) i H4) w x H8 P)))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) w t0 t2))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T v (THead (Bind Abst) x0 x1))).(\lambda (H8: (subst0 i w u x0)).(\lambda (_: (subst0 (s (Bind Abst) i) w t0 x1)).(H1 d u0 i H4 w x0 H8 P)))))) H6)) (subst0_gen_head (Bind Abst) w u t0 v i H5))))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (H1: ((\forall (d: C).(\forall (u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead a1 a2))).(\lambda (H3: ((\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: Prop).P)))))))))).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c0 (CHead d (Bind Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H5: (subst0 i w (THead (Flat Appl) u t0) v)).(\lambda (P: Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T v (THead (Flat Appl) u2 t0))) (\lambda (u2: T).(subst0 i w u u2))) (ex2 T (\lambda (t2: T).(eq T v (THead (Flat Appl) u t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 t2)))) P (\lambda (H6: (ex2 T (\lambda (u2: T).(eq T v (THead (Flat Appl) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)))).(ex2_ind T (\lambda (u2: T).(eq T v (THead (Flat Appl) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Flat Appl) x t0))).(\lambda (H8: (subst0 i w u x)).(H1 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex2 T (\lambda (t2: T).(eq T v (THead (Flat Appl) u t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 t2)))).(ex2_ind T (\lambda (t2: T).(eq T v (THead (Flat Appl) u t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 t2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Flat Appl) u x))).(\lambda (H8: (subst0 (s (Flat Appl) i) w t0 x)).(H3 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) w t0 t2))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T v (THead (Flat Appl) x0 x1))).(\lambda (H8: (subst0 i w u x0)).(\lambda (_: (subst0 (s (Flat Appl) i) w t0 x1)).(H1 d u0 i H4 w x0 H8 P)))))) H6)) (subst0_gen_head (Flat Appl) w u t0 v i H5))))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda (H1: ((\forall (d: C).(\forall (u0: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u0)) \to (\forall (w: T).(\forall (v: T).((subst0 i w u v) \to (\forall (P: Prop).P)))))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 a0)).(\lambda (H3: ((\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: Prop).P)))))))))).(\lambda (d: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c0 (CHead d (Bind Void) u0))).(\lambda (w: T).(\lambda (v: T).(\lambda (H5: (subst0 i w (THead (Flat Cast) u t0) v)).(\lambda (P: Prop).(or3_ind (ex2 T (\lambda (u2: T).(eq T v (THead (Flat Cast) u2 t0))) (\lambda (u2: T).(subst0 i w u u2))) (ex2 T (\lambda (t2: T).(eq T v (THead (Flat Cast) u t2))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2)))) P (\lambda (H6: (ex2 T (\lambda (u2: T).(eq T v (THead (Flat Cast) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)))).(ex2_ind T (\lambda (u2: T).(eq T v (THead (Flat Cast) u2 t0))) (\lambda (u2: T).(subst0 i w u u2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Flat Cast) x t0))).(\lambda (H8: (subst0 i w u x)).(H1 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex2 T (\lambda (t2: T).(eq T v (THead (Flat Cast) u t2))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2)))).(ex2_ind T (\lambda (t2: T).(eq T v (THead (Flat Cast) u t2))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2)) P (\lambda (x: T).(\lambda (_: (eq T v (THead (Flat Cast) u x))).(\lambda (H8: (subst0 (s (Flat Cast) i) w t0 x)).(H3 d u0 i H4 w x H8 P)))) H6)) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T v (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i w u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Cast) i) w t0 t2))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T v (THead (Flat Cast) x0 x1))).(\lambda (H8: (subst0 i w u x0)).(\lambda (_: (subst0 (s (Flat Cast) i) w t0 x1)).(H1 d u0 i H4 w x0 H8 P)))))) H6)) (subst0_gen_head (Flat Cast) w u t0 v i H5)))))))))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 t0 a1)).(\lambda (H1: ((\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c0 (CHead d (Bind Void) u)) \to (\forall (w: T).(\forall (v: T).((subst0 i w t0 v) \to (\forall (P: Prop).P)))))))))).(\lambda (a2: A).(\lambda (_: (leq g a1 a2)).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H3: (getl i c0 (CHead d (Bind Void) u))).(\lambda (w: T).(\lambda (v: T).(\lambda (H4: (subst0 i w t0 v)).(\lambda (P: Prop).(H1 d u i H3 w v H4 P)))))))))))))))) c t a H))))). theorem arity_gen_cvoid: \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t a) \to (\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d (Bind Void) u)) \to (ex T (\lambda (v: T).(eq T t (lift (S O) i v)))))))))))) @@ -1738,22 +1738,22 @@ theorem arity_lift: theorem arity_lift1: \forall (g: G).(\forall (a: A).(\forall (c2: C).(\forall (hds: PList).(\forall (c1: C).(\forall (t: T).((drop1 hds c1 c2) \to ((arity g c2 t a) \to (arity g c1 (lift1 hds t) a)))))))) \def - \lambda (g: G).(\lambda (a: A).(\lambda (c2: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c1: C).(\forall (t: T).((drop1 p c1 c2) \to ((arity g c2 t a) \to (arity g c1 (lift1 p t) a)))))) (\lambda (c1: C).(\lambda (t: T).(\lambda (H: (drop1 PNil c1 c2)).(\lambda (H0: (arity g c2 t a)).(let H1 \def (match H return (\lambda (_: ?).(\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p PNil) \to ((eq C c c1) \to ((eq C c0 c2) \to (arity g c1 t a)))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c c1)).(\lambda (H3: (eq C c c2)).(eq_ind C c1 (\lambda (c0: C).((eq C c0 c2) \to (arity g c1 t a))) (\lambda (H4: (eq C c1 c2)).(eq_ind C c2 (\lambda (c0: C).(arity g c0 t a)) H0 c1 (sym_eq C c1 c2 H4))) c (sym_eq C c c1 H2) H3)))) | (drop1_cons c0 c3 h d H1 c4 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: (eq C c0 c1)).(\lambda (H5: (eq C c4 c2)).((let H6 \def (eq_ind PList (PCons h d hds) (\lambda (e: PList).(match e return (\lambda (_: ?).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c0 c1) \to ((eq C c4 c2) \to ((drop h d c0 c3) \to ((drop1 hds c3 c4) \to (arity g c1 t a))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c1) (refl_equal C c2))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c1: C).(\forall (t: T).((drop1 p c1 c2) \to ((arity g c2 t a) \to (arity g c1 (lift1 p t) a))))))).(\lambda (c1: C).(\lambda (t: T).(\lambda (H0: (drop1 (PCons n n0 p) c1 c2)).(\lambda (H1: (arity g c2 t a)).(let H2 \def (match H0 return (\lambda (_: ?).(\lambda (p0: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p0 (PCons n n0 p)) \to ((eq C c c1) \to ((eq C c0 c2) \to (arity g c1 (lift n n0 (lift1 p t)) a)))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c c1)).(\lambda (H4: (eq C c c2)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e return (\lambda (_: ?).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c1) \to ((eq C c c2) \to (arity g c1 (lift n n0 (lift1 p t)) a))) H5)) H3 H4)))) | (drop1_cons c0 c3 h d H2 c4 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c0 c1)).(\lambda (H6: (eq C c4 c2)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e return (\lambda (_: ?).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: ?).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: ?).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c0 c1) \to ((eq C c4 c2) \to ((drop n1 d c0 c3) \to ((drop1 hds c3 c4) \to (arity g c1 (lift n n0 (lift1 p t)) a)))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c0 c1) \to ((eq C c4 c2) \to ((drop n n1 c0 c3) \to ((drop1 hds c3 c4) \to (arity g c1 (lift n n0 (lift1 p t)) a))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c0 c1) \to ((eq C c4 c2) \to ((drop n n0 c0 c3) \to ((drop1 p0 c3 c4) \to (arity g c1 (lift n n0 (lift1 p t)) a)))))) (\lambda (H12: (eq C c0 c1)).(eq_ind C c1 (\lambda (c: C).((eq C c4 c2) \to ((drop n n0 c c3) \to ((drop1 p c3 c4) \to (arity g c1 (lift n n0 (lift1 p t)) a))))) (\lambda (H13: (eq C c4 c2)).(eq_ind C c2 (\lambda (c: C).((drop n n0 c1 c3) \to ((drop1 p c3 c) \to (arity g c1 (lift n n0 (lift1 p t)) a)))) (\lambda (H14: (drop n n0 c1 c3)).(\lambda (H15: (drop1 p c3 c2)).(arity_lift g c3 (lift1 p t) a (H c3 t H15 H1) c1 n n0 H14))) c4 (sym_eq C c4 c2 H13))) c0 (sym_eq C c0 c1 H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c1) (refl_equal C c2))))))))))) hds)))). + \lambda (g: G).(\lambda (a: A).(\lambda (c2: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c1: C).(\forall (t: T).((drop1 p c1 c2) \to ((arity g c2 t a) \to (arity g c1 (lift1 p t) a)))))) (\lambda (c1: C).(\lambda (t: T).(\lambda (H: (drop1 PNil c1 c2)).(\lambda (H0: (arity g c2 t a)).(let H1 \def (match H return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p c c0)).((eq PList p PNil) \to ((eq C c c1) \to ((eq C c0 c2) \to (arity g c1 t a)))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c c1)).(\lambda (H3: (eq C c c2)).(eq_ind C c1 (\lambda (c0: C).((eq C c0 c2) \to (arity g c1 t a))) (\lambda (H4: (eq C c1 c2)).(eq_ind C c2 (\lambda (c0: C).(arity g c0 t a)) H0 c1 (sym_eq C c1 c2 H4))) c (sym_eq C c c1 H2) H3)))) | (drop1_cons c0 c3 h d H1 c4 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: (eq C c0 c1)).(\lambda (H5: (eq C c4 c2)).((let H6 \def (eq_ind PList (PCons h d hds) (\lambda (e: PList).(match e return (\lambda (_: PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c0 c1) \to ((eq C c4 c2) \to ((drop h d c0 c3) \to ((drop1 hds c3 c4) \to (arity g c1 t a))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c1) (refl_equal C c2))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c1: C).(\forall (t: T).((drop1 p c1 c2) \to ((arity g c2 t a) \to (arity g c1 (lift1 p t) a))))))).(\lambda (c1: C).(\lambda (t: T).(\lambda (H0: (drop1 (PCons n n0 p) c1 c2)).(\lambda (H1: (arity g c2 t a)).(let H2 \def (match H0 return (\lambda (p0: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p0 c c0)).((eq PList p0 (PCons n n0 p)) \to ((eq C c c1) \to ((eq C c0 c2) \to (arity g c1 (lift n n0 (lift1 p t)) a)))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c c1)).(\lambda (H4: (eq C c c2)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c1) \to ((eq C c c2) \to (arity g c1 (lift n n0 (lift1 p t)) a))) H5)) H3 H4)))) | (drop1_cons c0 c3 h d H2 c4 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c0 c1)).(\lambda (H6: (eq C c4 c2)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e return (\lambda (_: PList).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: PList).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: PList).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c0 c1) \to ((eq C c4 c2) \to ((drop n1 d c0 c3) \to ((drop1 hds c3 c4) \to (arity g c1 (lift n n0 (lift1 p t)) a)))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c0 c1) \to ((eq C c4 c2) \to ((drop n n1 c0 c3) \to ((drop1 hds c3 c4) \to (arity g c1 (lift n n0 (lift1 p t)) a))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c0 c1) \to ((eq C c4 c2) \to ((drop n n0 c0 c3) \to ((drop1 p0 c3 c4) \to (arity g c1 (lift n n0 (lift1 p t)) a)))))) (\lambda (H12: (eq C c0 c1)).(eq_ind C c1 (\lambda (c: C).((eq C c4 c2) \to ((drop n n0 c c3) \to ((drop1 p c3 c4) \to (arity g c1 (lift n n0 (lift1 p t)) a))))) (\lambda (H13: (eq C c4 c2)).(eq_ind C c2 (\lambda (c: C).((drop n n0 c1 c3) \to ((drop1 p c3 c) \to (arity g c1 (lift n n0 (lift1 p t)) a)))) (\lambda (H14: (drop n n0 c1 c3)).(\lambda (H15: (drop1 p c3 c2)).(arity_lift g c3 (lift1 p t) a (H c3 t H15 H1) c1 n n0 H14))) c4 (sym_eq C c4 c2 H13))) c0 (sym_eq C c0 c1 H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c1) (refl_equal C c2))))))))))) hds)))). theorem arity_mono: \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a1: A).((arity g c t a1) \to (\forall (a2: A).((arity g c t a2) \to (leq g a1 a2))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a1: A).(\lambda (H: (arity g c t a1)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a: A).(\forall (a2: A).((arity g c0 t0 a2) \to (leq g a a2)))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (a2: A).(\lambda (H0: (arity g c0 (TSort n) a2)).(leq_sym g a2 (ASort O n) (arity_gen_sort g c0 n a2 H0)))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (a: A).(\lambda (_: (arity g d u a)).(\lambda (H2: ((\forall (a2: A).((arity g d u a2) \to (leq g a a2))))).(\lambda (a2: A).(\lambda (H3: (arity g c0 (TLRef i) a2)).(let H4 \def (arity_gen_lref g c0 i a2 H3) in (or_ind (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a2)))) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a2))))) (leq g a a2) (\lambda (H5: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a2))) (leq g a a2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl i c0 (CHead x0 (Bind Abbr) x1))).(\lambda (H7: (arity g x0 x1 a2)).(let H8 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c: C).(getl i c0 c)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead x0 (Bind Abbr) x1) H6)) in ((let H10 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead x0 (Bind Abbr) x1) H6)) in (\lambda (H11: (eq C d x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t: T).(getl i c0 (CHead x0 (Bind Abbr) t))) H8 u H10) in (let H13 \def (eq_ind_r T x1 (\lambda (t: T).(arity g x0 t a2)) H7 u H10) in (let H14 \def (eq_ind_r C x0 (\lambda (c: C).(getl i c0 (CHead c (Bind Abbr) u))) H12 d H11) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(arity g c u a2)) H13 d H11) in (H2 a2 H15))))))) H9))))))) H5)) (\lambda (H5: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2)))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a2)))) (leq g a a2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl i c0 (CHead x0 (Bind Abst) x1))).(\lambda (_: (arity g x0 x1 (asucc g a2))).(let H8 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c: C).(getl i c0 c)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in (False_ind (leq g a a2) H9))))))) H5)) H4)))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abst) u))).(\lambda (a: A).(\lambda (_: (arity g d u (asucc g a))).(\lambda (H2: ((\forall (a2: A).((arity g d u a2) \to (leq g (asucc g a) a2))))).(\lambda (a2: A).(\lambda (H3: (arity g c0 (TLRef i) a2)).(let H4 \def (arity_gen_lref g c0 i a2 H3) in (or_ind (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a2)))) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a2))))) (leq g a a2) (\lambda (H5: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a2))) (leq g a a2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl i c0 (CHead x0 (Bind Abbr) x1))).(\lambda (_: (arity g x0 x1 a2)).(let H8 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c: C).(getl i c0 c)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead x0 (Bind Abbr) x1) H6)) in (False_ind (leq g a a2) H9))))))) H5)) (\lambda (H5: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2)))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a2)))) (leq g a a2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl i c0 (CHead x0 (Bind Abst) x1))).(\lambda (H7: (arity g x0 x1 (asucc g a2))).(let H8 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c: C).(getl i c0 c)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u) (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in ((let H10 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in (\lambda (H11: (eq C d x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t: T).(getl i c0 (CHead x0 (Bind Abst) t))) H8 u H10) in (let H13 \def (eq_ind_r T x1 (\lambda (t: T).(arity g x0 t (asucc g a2))) H7 u H10) in (let H14 \def (eq_ind_r C x0 (\lambda (c: C).(getl i c0 (CHead c (Bind Abst) u))) H12 d H11) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(arity g c u (asucc g a2))) H13 d H11) in (asucc_inj g a a2 (H2 (asucc g a2) H15)))))))) H9))))))) H5)) H4)))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a2: A).(\lambda (_: (arity g c0 u a2)).(\lambda (_: ((\forall (a3: A).((arity g c0 u a3) \to (leq g a2 a3))))).(\lambda (t0: T).(\lambda (a3: A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t0 a3)).(\lambda (H4: ((\forall (a2: A).((arity g (CHead c0 (Bind b) u) t0 a2) \to (leq g a3 a2))))).(\lambda (a0: A).(\lambda (H5: (arity g c0 (THead (Bind b) u t0) a0)).(let H6 \def (arity_gen_bind b H0 g c0 u t0 a0 H5) in (ex2_ind A (\lambda (a4: A).(arity g c0 u a4)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t0 a0)) (leq g a3 a0) (\lambda (x: A).(\lambda (_: (arity g c0 u x)).(\lambda (H8: (arity g (CHead c0 (Bind b) u) t0 a0)).(H4 a0 H8)))) H6))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a2: A).(\lambda (_: (arity g c0 u (asucc g a2))).(\lambda (H1: ((\forall (a3: A).((arity g c0 u a3) \to (leq g (asucc g a2) a3))))).(\lambda (t0: T).(\lambda (a3: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t0 a3)).(\lambda (H3: ((\forall (a2: A).((arity g (CHead c0 (Bind Abst) u) t0 a2) \to (leq g a3 a2))))).(\lambda (a0: A).(\lambda (H4: (arity g c0 (THead (Bind Abst) u t0) a0)).(let H5 \def (arity_gen_abst g c0 u t0 a0 H4) in (ex3_2_ind A A (\lambda (a4: A).(\lambda (a5: A).(eq A a0 (AHead a4 a5)))) (\lambda (a4: A).(\lambda (_: A).(arity g c0 u (asucc g a4)))) (\lambda (_: A).(\lambda (a5: A).(arity g (CHead c0 (Bind Abst) u) t0 a5))) (leq g (AHead a2 a3) a0) (\lambda (x0: A).(\lambda (x1: A).(\lambda (H6: (eq A a0 (AHead x0 x1))).(\lambda (H7: (arity g c0 u (asucc g x0))).(\lambda (H8: (arity g (CHead c0 (Bind Abst) u) t0 x1)).(eq_ind_r A (AHead x0 x1) (\lambda (a: A).(leq g (AHead a2 a3) a)) (leq_head g a2 x0 (asucc_inj g a2 x0 (H1 (asucc g x0) H7)) a3 x1 (H3 x1 H8)) a0 H6)))))) H5))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a2: A).(\lambda (_: (arity g c0 u a2)).(\lambda (_: ((\forall (a3: A).((arity g c0 u a3) \to (leq g a2 a3))))).(\lambda (t0: T).(\lambda (a3: A).(\lambda (_: (arity g c0 t0 (AHead a2 a3))).(\lambda (H3: ((\forall (a4: A).((arity g c0 t0 a4) \to (leq g (AHead a2 a3) a4))))).(\lambda (a0: A).(\lambda (H4: (arity g c0 (THead (Flat Appl) u t0) a0)).(let H5 \def (arity_gen_appl g c0 u t0 a0 H4) in (ex2_ind A (\lambda (a4: A).(arity g c0 u a4)) (\lambda (a4: A).(arity g c0 t0 (AHead a4 a0))) (leq g a3 a0) (\lambda (x: A).(\lambda (_: (arity g c0 u x)).(\lambda (H7: (arity g c0 t0 (AHead x a0))).(ahead_inj_snd g a2 a3 x a0 (H3 (AHead x a0) H7))))) H5))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a: A).(\lambda (_: (arity g c0 u (asucc g a))).(\lambda (_: ((\forall (a2: A).((arity g c0 u a2) \to (leq g (asucc g a) a2))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 a)).(\lambda (H3: ((\forall (a2: A).((arity g c0 t0 a2) \to (leq g a a2))))).(\lambda (a2: A).(\lambda (H4: (arity g c0 (THead (Flat Cast) u t0) a2)).(let H5 \def (arity_gen_cast g c0 u t0 a2 H4) in (and_ind (arity g c0 u (asucc g a2)) (arity g c0 t0 a2) (leq g a a2) (\lambda (_: (arity g c0 u (asucc g a2))).(\lambda (H7: (arity g c0 t0 a2)).(H3 a2 H7))) H5)))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 a2)).(\lambda (H1: ((\forall (a3: A).((arity g c0 t0 a3) \to (leq g a2 a3))))).(\lambda (a3: A).(\lambda (H2: (leq g a2 a3)).(\lambda (a0: A).(\lambda (H3: (arity g c0 t0 a0)).(leq_trans g a3 a2 (leq_sym g a2 a3 H2) a0 (H1 a0 H3))))))))))) c t a1 H))))). + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a1: A).(\lambda (H: (arity g c t a1)).(arity_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (a: A).(\forall (a2: A).((arity g c0 t0 a2) \to (leq g a a2)))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (a2: A).(\lambda (H0: (arity g c0 (TSort n) a2)).(leq_sym g a2 (ASort O n) (arity_gen_sort g c0 n a2 H0)))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (a: A).(\lambda (_: (arity g d u a)).(\lambda (H2: ((\forall (a2: A).((arity g d u a2) \to (leq g a a2))))).(\lambda (a2: A).(\lambda (H3: (arity g c0 (TLRef i) a2)).(let H4 \def (arity_gen_lref g c0 i a2 H3) in (or_ind (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a2)))) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a2))))) (leq g a a2) (\lambda (H5: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a2))) (leq g a a2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl i c0 (CHead x0 (Bind Abbr) x1))).(\lambda (H7: (arity g x0 x1 a2)).(let H8 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c: C).(getl i c0 c)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead x0 (Bind Abbr) x1) H6)) in ((let H10 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead x0 (Bind Abbr) x1) H6)) in (\lambda (H11: (eq C d x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t: T).(getl i c0 (CHead x0 (Bind Abbr) t))) H8 u H10) in (let H13 \def (eq_ind_r T x1 (\lambda (t: T).(arity g x0 t a2)) H7 u H10) in (let H14 \def (eq_ind_r C x0 (\lambda (c: C).(getl i c0 (CHead c (Bind Abbr) u))) H12 d H11) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(arity g c u a2)) H13 d H11) in (H2 a2 H15))))))) H9))))))) H5)) (\lambda (H5: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2)))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a2)))) (leq g a a2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl i c0 (CHead x0 (Bind Abst) x1))).(\lambda (_: (arity g x0 x1 (asucc g a2))).(let H8 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c: C).(getl i c0 c)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in (False_ind (leq g a a2) H9))))))) H5)) H4)))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abst) u))).(\lambda (a: A).(\lambda (_: (arity g d u (asucc g a))).(\lambda (H2: ((\forall (a2: A).((arity g d u a2) \to (leq g (asucc g a) a2))))).(\lambda (a2: A).(\lambda (H3: (arity g c0 (TLRef i) a2)).(let H4 \def (arity_gen_lref g c0 i a2 H3) in (or_ind (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a2)))) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a2))))) (leq g a a2) (\lambda (H5: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abbr) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u a2))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abbr) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 a2))) (leq g a a2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl i c0 (CHead x0 (Bind Abbr) x1))).(\lambda (_: (arity g x0 x1 a2)).(let H8 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c: C).(getl i c0 c)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead x0 (Bind Abbr) x1) H6)) in (False_ind (leq g a a2) H9))))))) H5)) (\lambda (H5: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c0 (CHead d (Bind Abst) u)))) (\lambda (d: C).(\lambda (u: T).(arity g d u (asucc g a2)))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u0: T).(getl i c0 (CHead d0 (Bind Abst) u0)))) (\lambda (d0: C).(\lambda (u0: T).(arity g d0 u0 (asucc g a2)))) (leq g a a2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl i c0 (CHead x0 (Bind Abst) x1))).(\lambda (H7: (arity g x0 x1 (asucc g a2))).(let H8 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c: C).(getl i c0 c)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u) (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in ((let H10 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u) i H0 (CHead x0 (Bind Abst) x1) H6)) in (\lambda (H11: (eq C d x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t: T).(getl i c0 (CHead x0 (Bind Abst) t))) H8 u H10) in (let H13 \def (eq_ind_r T x1 (\lambda (t: T).(arity g x0 t (asucc g a2))) H7 u H10) in (let H14 \def (eq_ind_r C x0 (\lambda (c: C).(getl i c0 (CHead c (Bind Abst) u))) H12 d H11) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(arity g c u (asucc g a2))) H13 d H11) in (asucc_inj g a a2 (H2 (asucc g a2) H15)))))))) H9))))))) H5)) H4)))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a2: A).(\lambda (_: (arity g c0 u a2)).(\lambda (_: ((\forall (a3: A).((arity g c0 u a3) \to (leq g a2 a3))))).(\lambda (t0: T).(\lambda (a3: A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t0 a3)).(\lambda (H4: ((\forall (a2: A).((arity g (CHead c0 (Bind b) u) t0 a2) \to (leq g a3 a2))))).(\lambda (a0: A).(\lambda (H5: (arity g c0 (THead (Bind b) u t0) a0)).(let H6 \def (arity_gen_bind b H0 g c0 u t0 a0 H5) in (ex2_ind A (\lambda (a4: A).(arity g c0 u a4)) (\lambda (_: A).(arity g (CHead c0 (Bind b) u) t0 a0)) (leq g a3 a0) (\lambda (x: A).(\lambda (_: (arity g c0 u x)).(\lambda (H8: (arity g (CHead c0 (Bind b) u) t0 a0)).(H4 a0 H8)))) H6))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a2: A).(\lambda (_: (arity g c0 u (asucc g a2))).(\lambda (H1: ((\forall (a3: A).((arity g c0 u a3) \to (leq g (asucc g a2) a3))))).(\lambda (t0: T).(\lambda (a3: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t0 a3)).(\lambda (H3: ((\forall (a2: A).((arity g (CHead c0 (Bind Abst) u) t0 a2) \to (leq g a3 a2))))).(\lambda (a0: A).(\lambda (H4: (arity g c0 (THead (Bind Abst) u t0) a0)).(let H5 \def (arity_gen_abst g c0 u t0 a0 H4) in (ex3_2_ind A A (\lambda (a4: A).(\lambda (a5: A).(eq A a0 (AHead a4 a5)))) (\lambda (a4: A).(\lambda (_: A).(arity g c0 u (asucc g a4)))) (\lambda (_: A).(\lambda (a5: A).(arity g (CHead c0 (Bind Abst) u) t0 a5))) (leq g (AHead a2 a3) a0) (\lambda (x0: A).(\lambda (x1: A).(\lambda (H6: (eq A a0 (AHead x0 x1))).(\lambda (H7: (arity g c0 u (asucc g x0))).(\lambda (H8: (arity g (CHead c0 (Bind Abst) u) t0 x1)).(eq_ind_r A (AHead x0 x1) (\lambda (a: A).(leq g (AHead a2 a3) a)) (leq_head g a2 x0 (asucc_inj g a2 x0 (H1 (asucc g x0) H7)) a3 x1 (H3 x1 H8)) a0 H6)))))) H5))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a2: A).(\lambda (_: (arity g c0 u a2)).(\lambda (_: ((\forall (a3: A).((arity g c0 u a3) \to (leq g a2 a3))))).(\lambda (t0: T).(\lambda (a3: A).(\lambda (_: (arity g c0 t0 (AHead a2 a3))).(\lambda (H3: ((\forall (a4: A).((arity g c0 t0 a4) \to (leq g (AHead a2 a3) a4))))).(\lambda (a0: A).(\lambda (H4: (arity g c0 (THead (Flat Appl) u t0) a0)).(let H5 \def (arity_gen_appl g c0 u t0 a0 H4) in (ex2_ind A (\lambda (a4: A).(arity g c0 u a4)) (\lambda (a4: A).(arity g c0 t0 (AHead a4 a0))) (leq g a3 a0) (\lambda (x: A).(\lambda (_: (arity g c0 u x)).(\lambda (H7: (arity g c0 t0 (AHead x a0))).(ahead_inj_snd g a2 a3 x a0 (H3 (AHead x a0) H7))))) H5))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a: A).(\lambda (_: (arity g c0 u (asucc g a))).(\lambda (_: ((\forall (a2: A).((arity g c0 u a2) \to (leq g (asucc g a) a2))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 a)).(\lambda (H3: ((\forall (a2: A).((arity g c0 t0 a2) \to (leq g a a2))))).(\lambda (a2: A).(\lambda (H4: (arity g c0 (THead (Flat Cast) u t0) a2)).(let H5 \def (arity_gen_cast g c0 u t0 a2 H4) in (and_ind (arity g c0 u (asucc g a2)) (arity g c0 t0 a2) (leq g a a2) (\lambda (_: (arity g c0 u (asucc g a2))).(\lambda (H7: (arity g c0 t0 a2)).(H3 a2 H7))) H5)))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 a2)).(\lambda (H1: ((\forall (a3: A).((arity g c0 t0 a3) \to (leq g a2 a3))))).(\lambda (a3: A).(\lambda (H2: (leq g a2 a3)).(\lambda (a0: A).(\lambda (H3: (arity g c0 t0 a0)).(leq_trans g a3 a2 (leq_sym g a2 a3 H2) a0 (H1 a0 H3))))))))))) c t a1 H))))). theorem arity_cimp_conf: \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 t a) \to (\forall (c2: C).((cimp c1 c2) \to (arity g c2 t a))))))) \def - \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: (arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: A).(\forall (c2: C).((cimp c c2) \to (arity g c2 t0 a0)))))) (\lambda (c: C).(\lambda (n: nat).(\lambda (c2: C).(\lambda (_: (cimp c c2)).(arity_sort g c2 n))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (H2: ((\forall (c2: C).((cimp d c2) \to (arity g c2 u a0))))).(\lambda (c2: C).(\lambda (H3: (cimp c c2)).(let H_x \def (H3 Abbr d u i H0) in (let H4 \def H_x in (ex_ind C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H5: (getl i c2 (CHead x (Bind Abbr) u))).(let H_x0 \def (cimp_getl_conf c c2 H3 Abbr d u i H0) in (let H6 \def H_x0 in (ex2_ind C (\lambda (d2: C).(cimp d d2)) (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (H7: (cimp d x0)).(\lambda (H8: (getl i c2 (CHead x0 (Bind Abbr) u))).(let H9 \def (eq_ind C (CHead x (Bind Abbr) u) (\lambda (c: C).(getl i c2 c)) H5 (CHead x0 (Bind Abbr) u) (getl_mono c2 (CHead x (Bind Abbr) u) i H5 (CHead x0 (Bind Abbr) u) H8)) in (let H10 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow x | (CHead c _ _) \Rightarrow c])) (CHead x (Bind Abbr) u) (CHead x0 (Bind Abbr) u) (getl_mono c2 (CHead x (Bind Abbr) u) i H5 (CHead x0 (Bind Abbr) u) H8)) in (let H11 \def (eq_ind_r C x0 (\lambda (c: C).(getl i c2 (CHead c (Bind Abbr) u))) H9 x H10) in (let H12 \def (eq_ind_r C x0 (\lambda (c: C).(cimp d c)) H7 x H10) in (arity_abbr g c2 x u i H11 a0 (H2 x H12))))))))) H6))))) H4))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (H2: ((\forall (c2: C).((cimp d c2) \to (arity g c2 u (asucc g a0)))))).(\lambda (c2: C).(\lambda (H3: (cimp c c2)).(let H_x \def (H3 Abst d u i H0) in (let H4 \def H_x in (ex_ind C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H5: (getl i c2 (CHead x (Bind Abst) u))).(let H_x0 \def (cimp_getl_conf c c2 H3 Abst d u i H0) in (let H6 \def H_x0 in (ex2_ind C (\lambda (d2: C).(cimp d d2)) (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (H7: (cimp d x0)).(\lambda (H8: (getl i c2 (CHead x0 (Bind Abst) u))).(let H9 \def (eq_ind C (CHead x (Bind Abst) u) (\lambda (c: C).(getl i c2 c)) H5 (CHead x0 (Bind Abst) u) (getl_mono c2 (CHead x (Bind Abst) u) i H5 (CHead x0 (Bind Abst) u) H8)) in (let H10 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow x | (CHead c _ _) \Rightarrow c])) (CHead x (Bind Abst) u) (CHead x0 (Bind Abst) u) (getl_mono c2 (CHead x (Bind Abst) u) i H5 (CHead x0 (Bind Abst) u) H8)) in (let H11 \def (eq_ind_r C x0 (\lambda (c: C).(getl i c2 (CHead c (Bind Abst) u))) H9 x H10) in (let H12 \def (eq_ind_r C x0 (\lambda (c: C).(cimp d c)) H7 x H10) in (arity_abst g c2 x u i H11 a0 (H2 x H12))))))))) H6))))) H4))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H2: ((\forall (c2: C).((cimp c c2) \to (arity g c2 u a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind b) u) t0 a2)).(\lambda (H4: ((\forall (c2: C).((cimp (CHead c (Bind b) u) c2) \to (arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H5: (cimp c c2)).(arity_bind g b H0 c2 u a1 (H2 c2 H5) t0 a2 (H4 (CHead c2 (Bind b) u) (cimp_bind c c2 H5 b u)))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (c2: C).((cimp c c2) \to (arity g c2 u (asucc g a1)))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind Abst) u) t0 a2)).(\lambda (H3: ((\forall (c2: C).((cimp (CHead c (Bind Abst) u) c2) \to (arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H4: (cimp c c2)).(arity_head g c2 u a1 (H1 c2 H4) t0 a2 (H3 (CHead c2 (Bind Abst) u) (cimp_bind c c2 H4 Abst u)))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H1: ((\forall (c2: C).((cimp c c2) \to (arity g c2 u a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c t0 (AHead a1 a2))).(\lambda (H3: ((\forall (c2: C).((cimp c c2) \to (arity g c2 t0 (AHead a1 a2)))))).(\lambda (c2: C).(\lambda (H4: (cimp c c2)).(arity_appl g c2 u a1 (H1 c2 H4) t0 a2 (H3 c2 H4))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g a0))).(\lambda (H1: ((\forall (c2: C).((cimp c c2) \to (arity g c2 u (asucc g a0)))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 a0)).(\lambda (H3: ((\forall (c2: C).((cimp c c2) \to (arity g c2 t0 a0))))).(\lambda (c2: C).(\lambda (H4: (cimp c c2)).(arity_cast g c2 u a0 (H1 c2 H4) t0 (H3 c2 H4)))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: (arity g c t0 a1)).(\lambda (H1: ((\forall (c2: C).((cimp c c2) \to (arity g c2 t0 a1))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (c2: C).(\lambda (H3: (cimp c c2)).(arity_repl g c2 t0 a1 (H1 c2 H3) a2 H2)))))))))) c1 t a H))))). + \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: (arity g c1 t a)).(arity_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (a0: A).(\forall (c2: C).((cimp c c2) \to (arity g c2 t0 a0)))))) (\lambda (c: C).(\lambda (n: nat).(\lambda (c2: C).(\lambda (_: (cimp c c2)).(arity_sort g c2 n))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (H2: ((\forall (c2: C).((cimp d c2) \to (arity g c2 u a0))))).(\lambda (c2: C).(\lambda (H3: (cimp c c2)).(let H_x \def (H3 Abbr d u i H0) in (let H4 \def H_x in (ex_ind C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H5: (getl i c2 (CHead x (Bind Abbr) u))).(let H_x0 \def (cimp_getl_conf c c2 H3 Abbr d u i H0) in (let H6 \def H_x0 in (ex2_ind C (\lambda (d2: C).(cimp d d2)) (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (H7: (cimp d x0)).(\lambda (H8: (getl i c2 (CHead x0 (Bind Abbr) u))).(let H9 \def (eq_ind C (CHead x (Bind Abbr) u) (\lambda (c: C).(getl i c2 c)) H5 (CHead x0 (Bind Abbr) u) (getl_mono c2 (CHead x (Bind Abbr) u) i H5 (CHead x0 (Bind Abbr) u) H8)) in (let H10 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow x | (CHead c _ _) \Rightarrow c])) (CHead x (Bind Abbr) u) (CHead x0 (Bind Abbr) u) (getl_mono c2 (CHead x (Bind Abbr) u) i H5 (CHead x0 (Bind Abbr) u) H8)) in (let H11 \def (eq_ind_r C x0 (\lambda (c: C).(getl i c2 (CHead c (Bind Abbr) u))) H9 x H10) in (let H12 \def (eq_ind_r C x0 (\lambda (c: C).(cimp d c)) H7 x H10) in (arity_abbr g c2 x u i H11 a0 (H2 x H12))))))))) H6))))) H4))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (H2: ((\forall (c2: C).((cimp d c2) \to (arity g c2 u (asucc g a0)))))).(\lambda (c2: C).(\lambda (H3: (cimp c c2)).(let H_x \def (H3 Abst d u i H0) in (let H4 \def H_x in (ex_ind C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (arity g c2 (TLRef i) a0) (\lambda (x: C).(\lambda (H5: (getl i c2 (CHead x (Bind Abst) u))).(let H_x0 \def (cimp_getl_conf c c2 H3 Abst d u i H0) in (let H6 \def H_x0 in (ex2_ind C (\lambda (d2: C).(cimp d d2)) (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (H7: (cimp d x0)).(\lambda (H8: (getl i c2 (CHead x0 (Bind Abst) u))).(let H9 \def (eq_ind C (CHead x (Bind Abst) u) (\lambda (c: C).(getl i c2 c)) H5 (CHead x0 (Bind Abst) u) (getl_mono c2 (CHead x (Bind Abst) u) i H5 (CHead x0 (Bind Abst) u) H8)) in (let H10 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow x | (CHead c _ _) \Rightarrow c])) (CHead x (Bind Abst) u) (CHead x0 (Bind Abst) u) (getl_mono c2 (CHead x (Bind Abst) u) i H5 (CHead x0 (Bind Abst) u) H8)) in (let H11 \def (eq_ind_r C x0 (\lambda (c: C).(getl i c2 (CHead c (Bind Abst) u))) H9 x H10) in (let H12 \def (eq_ind_r C x0 (\lambda (c: C).(cimp d c)) H7 x H10) in (arity_abst g c2 x u i H11 a0 (H2 x H12))))))))) H6))))) H4))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H2: ((\forall (c2: C).((cimp c c2) \to (arity g c2 u a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind b) u) t0 a2)).(\lambda (H4: ((\forall (c2: C).((cimp (CHead c (Bind b) u) c2) \to (arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H5: (cimp c c2)).(arity_bind g b H0 c2 u a1 (H2 c2 H5) t0 a2 (H4 (CHead c2 (Bind b) u) (cimp_bind c c2 H5 b u)))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (c2: C).((cimp c c2) \to (arity g c2 u (asucc g a1)))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind Abst) u) t0 a2)).(\lambda (H3: ((\forall (c2: C).((cimp (CHead c (Bind Abst) u) c2) \to (arity g c2 t0 a2))))).(\lambda (c2: C).(\lambda (H4: (cimp c c2)).(arity_head g c2 u a1 (H1 c2 H4) t0 a2 (H3 (CHead c2 (Bind Abst) u) (cimp_bind c c2 H4 Abst u)))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H1: ((\forall (c2: C).((cimp c c2) \to (arity g c2 u a1))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c t0 (AHead a1 a2))).(\lambda (H3: ((\forall (c2: C).((cimp c c2) \to (arity g c2 t0 (AHead a1 a2)))))).(\lambda (c2: C).(\lambda (H4: (cimp c c2)).(arity_appl g c2 u a1 (H1 c2 H4) t0 a2 (H3 c2 H4))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g a0))).(\lambda (H1: ((\forall (c2: C).((cimp c c2) \to (arity g c2 u (asucc g a0)))))).(\lambda (t0: T).(\lambda (_: (arity g c t0 a0)).(\lambda (H3: ((\forall (c2: C).((cimp c c2) \to (arity g c2 t0 a0))))).(\lambda (c2: C).(\lambda (H4: (cimp c c2)).(arity_cast g c2 u a0 (H1 c2 H4) t0 (H3 c2 H4)))))))))))) (\lambda (c: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: (arity g c t0 a1)).(\lambda (H1: ((\forall (c2: C).((cimp c c2) \to (arity g c2 t0 a1))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (c2: C).(\lambda (H3: (cimp c c2)).(arity_repl g c2 t0 a1 (H1 c2 H3) a2 H2)))))))))) c1 t a H))))). theorem arity_aprem: \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (a: A).((arity g c t a) \to (\forall (i: nat).(\forall (b: A).((aprem i a b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: (arity g c t a)).(arity_ind g (\lambda (c0: C).(\lambda (_: T).(\lambda (a0: A).(\forall (i: nat).(\forall (b: A).((aprem i a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (i: nat).(\lambda (b: A).(\lambda (H0: (aprem i (ASort O n) b)).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (n0: nat).(\lambda (a: A).(\lambda (a0: A).((eq nat n0 i) \to ((eq A a (ASort O n)) \to ((eq A a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))))) with [(aprem_zero a1 a2) \Rightarrow (\lambda (H0: (eq nat O i)).(\lambda (H1: (eq A (AHead a1 a2) (ASort O n))).(\lambda (H2: (eq A a1 b)).(eq_ind nat O (\lambda (n0: nat).((eq A (AHead a1 a2) (ASort O n)) \to ((eq A a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus n0 j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))) (\lambda (H3: (eq A (AHead a1 a2) (ASort O n))).(let H4 \def (eq_ind A (AHead a1 a2) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O n) H3) in (False_ind ((eq A a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))) H4))) i H0 H1 H2)))) | (aprem_succ a2 a i0 H0 a1) \Rightarrow (\lambda (H1: (eq nat (S i0) i)).(\lambda (H2: (eq A (AHead a1 a2) (ASort O n))).(\lambda (H3: (eq A a b)).(eq_ind nat (S i0) (\lambda (n0: nat).((eq A (AHead a1 a2) (ASort O n)) \to ((eq A a b) \to ((aprem i0 a2 a) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus n0 j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))))) (\lambda (H4: (eq A (AHead a1 a2) (ASort O n))).(let H5 \def (eq_ind A (AHead a1 a2) (\lambda (e: A).(match e return (\lambda (_: ?).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O n) H4) in (False_ind ((eq A a b) \to ((aprem i0 a2 a) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S i0) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))) H5))) i H1 H2 H3 H0))))]) in (H1 (refl_equal nat i) (refl_equal A (ASort O n)) (refl_equal A b)))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (H2: ((\forall (i: nat).(\forall (b: A).((aprem i a0 b) \to (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 d)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (i0: nat).(\lambda (b: A).(\lambda (H3: (aprem i0 a0 b)).(let H_x \def (H2 i0 b H3) in (let H4 \def H_x in (ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 d)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H5: (drop (plus i0 x2) O x0 d)).(\lambda (H6: (arity g x0 x1 (asucc g b))).(let H_x0 \def (getl_drop_conf_rev (plus i0 x2) x0 d H5 Abbr c0 u i H0) in (let H7 \def H_x0 in (ex2_ind C (\lambda (c1: C).(drop (plus i0 x2) O c1 c0)) (\lambda (c1: C).(drop (S i) (plus i0 x2) c1 x0)) (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) (\lambda (x: C).(\lambda (H8: (drop (plus i0 x2) O x c0)).(\lambda (H9: (drop (S i) (plus i0 x2) x x0)).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) x (lift (S i) (plus i0 x2) x1) x2 H8 (arity_lift g x0 x1 (asucc g b) H6 x (S i) (plus i0 x2) H9))))) H7)))))))) H4)))))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (H2: ((\forall (i: nat).(\forall (b: A).((aprem i (asucc g a0) b) \to (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 d)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (i0: nat).(\lambda (b: A).(\lambda (H3: (aprem i0 a0 b)).(let H4 \def (H2 i0 b (aprem_asucc g a0 b i0 H3)) in (ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 d)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H5: (drop (plus i0 x2) O x0 d)).(\lambda (H6: (arity g x0 x1 (asucc g b))).(let H_x \def (getl_drop_conf_rev (plus i0 x2) x0 d H5 Abst c0 u i H0) in (let H7 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (plus i0 x2) O c1 c0)) (\lambda (c1: C).(drop (S i) (plus i0 x2) c1 x0)) (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) (\lambda (x: C).(\lambda (H8: (drop (plus i0 x2) O x c0)).(\lambda (H9: (drop (S i) (plus i0 x2) x x0)).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) x (lift (S i) (plus i0 x2) x1) x2 H8 (arity_lift g x0 x1 (asucc g b) H6 x (S i) (plus i0 x2) H9))))) H7)))))))) H4))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: ((\forall (i: nat).(\forall (b: A).((aprem i a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t0 a2)).(\lambda (H4: ((\forall (i: nat).(\forall (b0: A).((aprem i a2 b0) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d (CHead c0 (Bind b) u))))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b0))))))))))).(\lambda (i: nat).(\lambda (b0: A).(\lambda (H5: (aprem i a2 b0)).(let H_x \def (H4 i b0 H5) in (let H6 \def H_x in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d (CHead c0 (Bind b) u))))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b0))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b0)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H7: (drop (plus i x2) O x0 (CHead c0 (Bind b) u))).(\lambda (H8: (arity g x0 x1 (asucc g b0))).(let H9 \def (eq_ind nat (S (plus i x2)) (\lambda (n: nat).(drop n O x0 c0)) (drop_S b x0 c0 u (plus i x2) H7) (plus i (S x2)) (plus_n_Sm i x2)) in (ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b0))))) x0 x1 (S x2) H9 H8))))))) H6))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H0: (arity g c0 u (asucc g a1))).(\lambda (_: ((\forall (i: nat).(\forall (b: A).((aprem i (asucc g a1) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t0 a2)).(\lambda (H3: ((\forall (i: nat).(\forall (b: A).((aprem i a2 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d (CHead c0 (Bind Abst) u))))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (i: nat).(\lambda (b: A).(\lambda (H4: (aprem i (AHead a1 a2) b)).((match i return (\lambda (_: ?).(\lambda (n: nat).((aprem n (AHead a1 a2) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus n j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))) with [O \Rightarrow (\lambda (H5: (aprem O (AHead a1 a2) b)).(let H6 \def (match H5 return (\lambda (_: ?).(\lambda (n: nat).(\lambda (a: A).(\lambda (a0: A).((eq nat n O) \to ((eq A a (AHead a1 a2)) \to ((eq A a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))))) with [(aprem_zero a0 a3) \Rightarrow (\lambda (_: (eq nat O O)).(\lambda (H5: (eq A (AHead a0 a3) (AHead a1 a2))).(\lambda (H6: (eq A a0 b)).((let H7 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a0 a3) (AHead a1 a2) H5) in ((let H8 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a0 | (AHead a _) \Rightarrow a])) (AHead a0 a3) (AHead a1 a2) H5) in (eq_ind A a1 (\lambda (a: A).((eq A a3 a2) \to ((eq A a b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))) (\lambda (H9: (eq A a3 a2)).(eq_ind A a2 (\lambda (_: A).((eq A a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))) (\lambda (H10: (eq A a1 b)).(eq_ind A b (\lambda (_: A).(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))) (eq_ind A a1 (\lambda (a: A).(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g a))))))) (ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g a1))))) c0 u O (drop_refl c0) H0) b H10) a1 (sym_eq A a1 b H10))) a3 (sym_eq A a3 a2 H9))) a0 (sym_eq A a0 a1 H8))) H7)) H6)))) | (aprem_succ a0 a i H4 a3) \Rightarrow (\lambda (H5: (eq nat (S i) O)).(\lambda (H6: (eq A (AHead a3 a0) (AHead a1 a2))).(\lambda (H7: (eq A a b)).((let H8 \def (eq_ind nat (S i) (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H5) in (False_ind ((eq A (AHead a3 a0) (AHead a1 a2)) \to ((eq A a b) \to ((aprem i a0 a) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))) H8)) H6 H7 H4))))]) in (H6 (refl_equal nat O) (refl_equal A (AHead a1 a2)) (refl_equal A b)))) | (S n) \Rightarrow (\lambda (H5: (aprem (S n) (AHead a1 a2) b)).(let H6 \def (match H5 return (\lambda (_: ?).(\lambda (n0: nat).(\lambda (a: A).(\lambda (a0: A).((eq nat n0 (S n)) \to ((eq A a (AHead a1 a2)) \to ((eq A a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))))) with [(aprem_zero a0 a3) \Rightarrow (\lambda (H4: (eq nat O (S n))).(\lambda (H5: (eq A (AHead a0 a3) (AHead a1 a2))).(\lambda (H6: (eq A a0 b)).((let H7 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n) H4) in (False_ind ((eq A (AHead a0 a3) (AHead a1 a2)) \to ((eq A a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))) H7)) H5 H6)))) | (aprem_succ a0 a i H4 a3) \Rightarrow (\lambda (H5: (eq nat (S i) (S n))).(\lambda (H6: (eq A (AHead a3 a0) (AHead a1 a2))).(\lambda (H7: (eq A a b)).((let H8 \def (f_equal nat nat (\lambda (e: nat).(match e return (\lambda (_: ?).nat) with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S n) H5) in (eq_ind nat n (\lambda (n0: nat).((eq A (AHead a3 a0) (AHead a1 a2)) \to ((eq A a b) \to ((aprem n0 a0 a) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))))) (\lambda (H9: (eq A (AHead a3 a0) (AHead a1 a2))).(let H10 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a0 | (AHead _ a) \Rightarrow a])) (AHead a3 a0) (AHead a1 a2) H9) in ((let H11 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a3 | (AHead a _) \Rightarrow a])) (AHead a3 a0) (AHead a1 a2) H9) in (eq_ind A a1 (\lambda (_: A).((eq A a0 a2) \to ((eq A a b) \to ((aprem n a0 a) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))))) (\lambda (H12: (eq A a0 a2)).(eq_ind A a2 (\lambda (a1: A).((eq A a b) \to ((aprem n a1 a) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))) (\lambda (H13: (eq A a b)).(eq_ind A b (\lambda (a1: A).((aprem n a2 a1) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))) (\lambda (H14: (aprem n a2 b)).(let H_x \def (H3 n b H14) in (let H3 \def H_x in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus n j) O d (CHead c0 (Bind Abst) u))))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H15: (drop (plus n x2) O x0 (CHead c0 (Bind Abst) u))).(\lambda (H16: (arity g x0 x1 (asucc g b))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))) x0 x1 x2 (drop_S Abst x0 c0 u (plus n x2) H15) H16)))))) H3)))) a (sym_eq A a b H13))) a0 (sym_eq A a0 a2 H12))) a3 (sym_eq A a3 a1 H11))) H10))) i (sym_eq nat i n H8))) H6 H7 H4))))]) in (H6 (refl_equal nat (S n)) (refl_equal A (AHead a1 a2)) (refl_equal A b))))]) H4))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: ((\forall (i: nat).(\forall (b: A).((aprem i a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead a1 a2))).(\lambda (H3: ((\forall (i: nat).(\forall (b: A).((aprem i (AHead a1 a2) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (i: nat).(\lambda (b: A).(\lambda (H4: (aprem i a2 b)).(let H5 \def (H3 (S i) b (aprem_succ a2 b i H4 a1)) in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (S (plus i j)) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H6: (drop (S (plus i x2)) O x0 c0)).(\lambda (H7: (arity g x0 x1 (asucc g b))).(C_ind (\lambda (c1: C).((drop (S (plus i x2)) O c1 c0) \to ((arity g c1 x1 (asucc g b)) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))) (\lambda (n: nat).(\lambda (H8: (drop (S (plus i x2)) O (CSort n) c0)).(\lambda (_: (arity g (CSort n) x1 (asucc g b))).(and3_ind (eq C c0 (CSort n)) (eq nat (S (plus i x2)) O) (eq nat O O) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) (\lambda (_: (eq C c0 (CSort n))).(\lambda (H11: (eq nat (S (plus i x2)) O)).(\lambda (_: (eq nat O O)).(let H13 \def (eq_ind nat (S (plus i x2)) (\lambda (ee: nat).(match ee return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H11) in (False_ind (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) H13))))) (drop_gen_sort n (S (plus i x2)) O c0 H8))))) (\lambda (d: C).(\lambda (IHd: (((drop (S (plus i x2)) O d c0) \to ((arity g d x1 (asucc g b)) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))))).(\lambda (k: K).(\lambda (t1: T).(\lambda (H8: (drop (S (plus i x2)) O (CHead d k t1) c0)).(\lambda (H9: (arity g (CHead d k t1) x1 (asucc g b))).((match k return (\lambda (_: ?).(\lambda (k0: K).((arity g (CHead d k0 t1) x1 (asucc g b)) \to ((drop (r k0 (plus i x2)) O d c0) \to (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))))))) with [(Bind b0) \Rightarrow (\lambda (H10: (arity g (CHead d (Bind b0) t1) x1 (asucc g b))).(\lambda (H11: (drop (r (Bind b0) (plus i x2)) O d c0)).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) (CHead d (Bind b0) t1) x1 (S x2) (eq_ind nat (S (plus i x2)) (\lambda (n: nat).(drop n O (CHead d (Bind b0) t1) c0)) (drop_drop (Bind b0) (plus i x2) d c0 H11 t1) (plus i (S x2)) (plus_n_Sm i x2)) H10))) | (Flat f) \Rightarrow (\lambda (H10: (arity g (CHead d (Flat f) t1) x1 (asucc g b))).(\lambda (H11: (drop (r (Flat f) (plus i x2)) O d c0)).(let H12 \def (IHd H11 (arity_cimp_conf g (CHead d (Flat f) t1) x1 (asucc g b) H10 d (cimp_flat_sx f d t1))) in (ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: nat).(\lambda (H13: (drop (plus i x5) O x3 c0)).(\lambda (H14: (arity g x3 x4 (asucc g b))).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) x3 x4 x5 H13 H14)))))) H12))))]) H9 (drop_gen_drop k d c0 t1 (plus i x2) H8)))))))) x0 H6 H7)))))) H5)))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda (_: ((\forall (i: nat).(\forall (b: A).((aprem i (asucc g a0) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 a0)).(\lambda (H3: ((\forall (i: nat).(\forall (b: A).((aprem i a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (i: nat).(\lambda (b: A).(\lambda (H4: (aprem i a0 b)).(let H_x \def (H3 i b H4) in (let H5 \def H_x in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H6: (drop (plus i x2) O x0 c0)).(\lambda (H7: (arity g x0 x1 (asucc g b))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) x0 x1 x2 H6 H7)))))) H5)))))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 t0 a1)).(\lambda (H1: ((\forall (i: nat).(\forall (b: A).((aprem i a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (i: nat).(\lambda (b: A).(\lambda (H3: (aprem i a2 b)).(let H_x \def (aprem_repl g a1 a2 H2 i b H3) in (let H4 \def H_x in (ex2_ind A (\lambda (b1: A).(leq g b1 b)) (\lambda (b1: A).(aprem i a1 b1)) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))) (\lambda (x: A).(\lambda (H5: (leq g x b)).(\lambda (H6: (aprem i a1 x)).(let H_x0 \def (H1 i x H6) in (let H7 \def H_x0 in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g x))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H8: (drop (plus i x2) O x0 c0)).(\lambda (H9: (arity g x0 x1 (asucc g x))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))) x0 x1 x2 H8 (arity_repl g x0 x1 (asucc g x) H9 (asucc g b) (asucc_repl g x b H5)))))))) H7)))))) H4))))))))))))) c t a H))))). + \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (a: A).(\lambda (H: (arity g c t a)).(arity_ind g (\lambda (c0: C).(\lambda (_: T).(\lambda (a0: A).(\forall (i: nat).(\forall (b: A).((aprem i a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (i: nat).(\lambda (b: A).(\lambda (H0: (aprem i (ASort O n) b)).(let H1 \def (match H0 return (\lambda (n0: nat).(\lambda (a: A).(\lambda (a0: A).(\lambda (_: (aprem n0 a a0)).((eq nat n0 i) \to ((eq A a (ASort O n)) \to ((eq A a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))))) with [(aprem_zero a1 a2) \Rightarrow (\lambda (H0: (eq nat O i)).(\lambda (H1: (eq A (AHead a1 a2) (ASort O n))).(\lambda (H2: (eq A a1 b)).(eq_ind nat O (\lambda (n0: nat).((eq A (AHead a1 a2) (ASort O n)) \to ((eq A a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus n0 j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))) (\lambda (H3: (eq A (AHead a1 a2) (ASort O n))).(let H4 \def (eq_ind A (AHead a1 a2) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O n) H3) in (False_ind ((eq A a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))) H4))) i H0 H1 H2)))) | (aprem_succ a2 a i0 H0 a1) \Rightarrow (\lambda (H1: (eq nat (S i0) i)).(\lambda (H2: (eq A (AHead a1 a2) (ASort O n))).(\lambda (H3: (eq A a b)).(eq_ind nat (S i0) (\lambda (n0: nat).((eq A (AHead a1 a2) (ASort O n)) \to ((eq A a b) \to ((aprem i0 a2 a) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus n0 j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))))) (\lambda (H4: (eq A (AHead a1 a2) (ASort O n))).(let H5 \def (eq_ind A (AHead a1 a2) (\lambda (e: A).(match e return (\lambda (_: A).Prop) with [(ASort _ _) \Rightarrow False | (AHead _ _) \Rightarrow True])) I (ASort O n) H4) in (False_ind ((eq A a b) \to ((aprem i0 a2 a) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S i0) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))) H5))) i H1 H2 H3 H0))))]) in (H1 (refl_equal nat i) (refl_equal A (ASort O n)) (refl_equal A b)))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (H2: ((\forall (i: nat).(\forall (b: A).((aprem i a0 b) \to (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 d)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (i0: nat).(\lambda (b: A).(\lambda (H3: (aprem i0 a0 b)).(let H_x \def (H2 i0 b H3) in (let H4 \def H_x in (ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 d)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H5: (drop (plus i0 x2) O x0 d)).(\lambda (H6: (arity g x0 x1 (asucc g b))).(let H_x0 \def (getl_drop_conf_rev (plus i0 x2) x0 d H5 Abbr c0 u i H0) in (let H7 \def H_x0 in (ex2_ind C (\lambda (c1: C).(drop (plus i0 x2) O c1 c0)) (\lambda (c1: C).(drop (S i) (plus i0 x2) c1 x0)) (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) (\lambda (x: C).(\lambda (H8: (drop (plus i0 x2) O x c0)).(\lambda (H9: (drop (S i) (plus i0 x2) x x0)).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) x (lift (S i) (plus i0 x2) x1) x2 H8 (arity_lift g x0 x1 (asucc g b) H6 x (S i) (plus i0 x2) H9))))) H7)))))))) H4)))))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (H2: ((\forall (i: nat).(\forall (b: A).((aprem i (asucc g a0) b) \to (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 d)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (i0: nat).(\lambda (b: A).(\lambda (H3: (aprem i0 a0 b)).(let H4 \def (H2 i0 b (aprem_asucc g a0 b i0 H3)) in (ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 d)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H5: (drop (plus i0 x2) O x0 d)).(\lambda (H6: (arity g x0 x1 (asucc g b))).(let H_x \def (getl_drop_conf_rev (plus i0 x2) x0 d H5 Abst c0 u i H0) in (let H7 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (plus i0 x2) O c1 c0)) (\lambda (c1: C).(drop (S i) (plus i0 x2) c1 x0)) (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) (\lambda (x: C).(\lambda (H8: (drop (plus i0 x2) O x c0)).(\lambda (H9: (drop (S i) (plus i0 x2) x x0)).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i0 j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) x (lift (S i) (plus i0 x2) x1) x2 H8 (arity_lift g x0 x1 (asucc g b) H6 x (S i) (plus i0 x2) H9))))) H7)))))))) H4))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: ((\forall (i: nat).(\forall (b: A).((aprem i a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind b) u) t0 a2)).(\lambda (H4: ((\forall (i: nat).(\forall (b0: A).((aprem i a2 b0) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d (CHead c0 (Bind b) u))))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b0))))))))))).(\lambda (i: nat).(\lambda (b0: A).(\lambda (H5: (aprem i a2 b0)).(let H_x \def (H4 i b0 H5) in (let H6 \def H_x in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d (CHead c0 (Bind b) u))))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b0))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b0)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H7: (drop (plus i x2) O x0 (CHead c0 (Bind b) u))).(\lambda (H8: (arity g x0 x1 (asucc g b0))).(let H9 \def (eq_ind nat (S (plus i x2)) (\lambda (n: nat).(drop n O x0 c0)) (drop_S b x0 c0 u (plus i x2) H7) (plus i (S x2)) (plus_n_Sm i x2)) in (ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b0))))) x0 x1 (S x2) H9 H8))))))) H6))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H0: (arity g c0 u (asucc g a1))).(\lambda (_: ((\forall (i: nat).(\forall (b: A).((aprem i (asucc g a1) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c0 (Bind Abst) u) t0 a2)).(\lambda (H3: ((\forall (i: nat).(\forall (b: A).((aprem i a2 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d (CHead c0 (Bind Abst) u))))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (i: nat).(\lambda (b: A).(\lambda (H4: (aprem i (AHead a1 a2) b)).((match i return (\lambda (n: nat).((aprem n (AHead a1 a2) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus n j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))))) with [O \Rightarrow (\lambda (H5: (aprem O (AHead a1 a2) b)).(let H6 \def (match H5 return (\lambda (n: nat).(\lambda (a: A).(\lambda (a0: A).(\lambda (_: (aprem n a a0)).((eq nat n O) \to ((eq A a (AHead a1 a2)) \to ((eq A a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))))) with [(aprem_zero a0 a3) \Rightarrow (\lambda (_: (eq nat O O)).(\lambda (H5: (eq A (AHead a0 a3) (AHead a1 a2))).(\lambda (H6: (eq A a0 b)).((let H7 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead _ a) \Rightarrow a])) (AHead a0 a3) (AHead a1 a2) H5) in ((let H8 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | (AHead a _) \Rightarrow a])) (AHead a0 a3) (AHead a1 a2) H5) in (eq_ind A a1 (\lambda (a: A).((eq A a3 a2) \to ((eq A a b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))) (\lambda (H9: (eq A a3 a2)).(eq_ind A a2 (\lambda (_: A).((eq A a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))) (\lambda (H10: (eq A a1 b)).(eq_ind A b (\lambda (_: A).(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))) (eq_ind A a1 (\lambda (a: A).(ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g a))))))) (ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g a1))))) c0 u O (drop_refl c0) H0) b H10) a1 (sym_eq A a1 b H10))) a3 (sym_eq A a3 a2 H9))) a0 (sym_eq A a0 a1 H8))) H7)) H6)))) | (aprem_succ a0 a i H4 a3) \Rightarrow (\lambda (H5: (eq nat (S i) O)).(\lambda (H6: (eq A (AHead a3 a0) (AHead a1 a2))).(\lambda (H7: (eq A a b)).((let H8 \def (eq_ind nat (S i) (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H5) in (False_ind ((eq A (AHead a3 a0) (AHead a1 a2)) \to ((eq A a b) \to ((aprem i a0 a) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus O j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))) H8)) H6 H7 H4))))]) in (H6 (refl_equal nat O) (refl_equal A (AHead a1 a2)) (refl_equal A b)))) | (S n) \Rightarrow (\lambda (H5: (aprem (S n) (AHead a1 a2) b)).(let H6 \def (match H5 return (\lambda (n0: nat).(\lambda (a: A).(\lambda (a0: A).(\lambda (_: (aprem n0 a a0)).((eq nat n0 (S n)) \to ((eq A a (AHead a1 a2)) \to ((eq A a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))))) with [(aprem_zero a0 a3) \Rightarrow (\lambda (H4: (eq nat O (S n))).(\lambda (H5: (eq A (AHead a0 a3) (AHead a1 a2))).(\lambda (H6: (eq A a0 b)).((let H7 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n) H4) in (False_ind ((eq A (AHead a0 a3) (AHead a1 a2)) \to ((eq A a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))) H7)) H5 H6)))) | (aprem_succ a0 a i H4 a3) \Rightarrow (\lambda (H5: (eq nat (S i) (S n))).(\lambda (H6: (eq A (AHead a3 a0) (AHead a1 a2))).(\lambda (H7: (eq A a b)).((let H8 \def (f_equal nat nat (\lambda (e: nat).(match e return (\lambda (_: nat).nat) with [O \Rightarrow i | (S n) \Rightarrow n])) (S i) (S n) H5) in (eq_ind nat n (\lambda (n0: nat).((eq A (AHead a3 a0) (AHead a1 a2)) \to ((eq A a b) \to ((aprem n0 a0 a) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))))) (\lambda (H9: (eq A (AHead a3 a0) (AHead a1 a2))).(let H10 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a0 | (AHead _ a) \Rightarrow a])) (AHead a3 a0) (AHead a1 a2) H9) in ((let H11 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a3 | (AHead a _) \Rightarrow a])) (AHead a3 a0) (AHead a1 a2) H9) in (eq_ind A a1 (\lambda (_: A).((eq A a0 a2) \to ((eq A a b) \to ((aprem n a0 a) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))))) (\lambda (H12: (eq A a0 a2)).(eq_ind A a2 (\lambda (a1: A).((eq A a b) \to ((aprem n a1 a) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))) (\lambda (H13: (eq A a b)).(eq_ind A b (\lambda (a1: A).((aprem n a2 a1) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))) (\lambda (H14: (aprem n a2 b)).(let H_x \def (H3 n b H14) in (let H3 \def H_x in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus n j) O d (CHead c0 (Bind Abst) u))))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H15: (drop (plus n x2) O x0 (CHead c0 (Bind Abst) u))).(\lambda (H16: (arity g x0 x1 (asucc g b))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus (S n) j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))) x0 x1 x2 (drop_S Abst x0 c0 u (plus n x2) H15) H16)))))) H3)))) a (sym_eq A a b H13))) a0 (sym_eq A a0 a2 H12))) a3 (sym_eq A a3 a1 H11))) H10))) i (sym_eq nat i n H8))) H6 H7 H4))))]) in (H6 (refl_equal nat (S n)) (refl_equal A (AHead a1 a2)) (refl_equal A b))))]) H4))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c0 u a1)).(\lambda (_: ((\forall (i: nat).(\forall (b: A).((aprem i a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (t0: T).(\lambda (a2: A).(\lambda (_: (arity g c0 t0 (AHead a1 a2))).(\lambda (H3: ((\forall (i: nat).(\forall (b: A).((aprem i (AHead a1 a2) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (i: nat).(\lambda (b: A).(\lambda (H4: (aprem i a2 b)).(let H5 \def (H3 (S i) b (aprem_succ a2 b i H4 a1)) in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (S (plus i j)) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H6: (drop (S (plus i x2)) O x0 c0)).(\lambda (H7: (arity g x0 x1 (asucc g b))).(C_ind (\lambda (c1: C).((drop (S (plus i x2)) O c1 c0) \to ((arity g c1 x1 (asucc g b)) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))))))) (\lambda (n: nat).(\lambda (H8: (drop (S (plus i x2)) O (CSort n) c0)).(\lambda (_: (arity g (CSort n) x1 (asucc g b))).(and3_ind (eq C c0 (CSort n)) (eq nat (S (plus i x2)) O) (eq nat O O) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) (\lambda (_: (eq C c0 (CSort n))).(\lambda (H11: (eq nat (S (plus i x2)) O)).(\lambda (_: (eq nat O O)).(let H13 \def (eq_ind nat (S (plus i x2)) (\lambda (ee: nat).(match ee return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H11) in (False_ind (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) H13))))) (drop_gen_sort n (S (plus i x2)) O c0 H8))))) (\lambda (d: C).(\lambda (IHd: (((drop (S (plus i x2)) O d c0) \to ((arity g d x1 (asucc g b)) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))))))).(\lambda (k: K).(\lambda (t1: T).(\lambda (H8: (drop (S (plus i x2)) O (CHead d k t1) c0)).(\lambda (H9: (arity g (CHead d k t1) x1 (asucc g b))).((match k return (\lambda (k0: K).((arity g (CHead d k0 t1) x1 (asucc g b)) \to ((drop (r k0 (plus i x2)) O d c0) \to (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))))))) with [(Bind b0) \Rightarrow (\lambda (H10: (arity g (CHead d (Bind b0) t1) x1 (asucc g b))).(\lambda (H11: (drop (r (Bind b0) (plus i x2)) O d c0)).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) (CHead d (Bind b0) t1) x1 (S x2) (eq_ind nat (S (plus i x2)) (\lambda (n: nat).(drop n O (CHead d (Bind b0) t1) c0)) (drop_drop (Bind b0) (plus i x2) d c0 H11 t1) (plus i (S x2)) (plus_n_Sm i x2)) H10))) | (Flat f) \Rightarrow (\lambda (H10: (arity g (CHead d (Flat f) t1) x1 (asucc g b))).(\lambda (H11: (drop (r (Flat f) (plus i x2)) O d c0)).(let H12 \def (IHd H11 (arity_cimp_conf g (CHead d (Flat f) t1) x1 (asucc g b) H10 d (cimp_flat_sx f d t1))) in (ex2_3_ind C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: nat).(\lambda (H13: (drop (plus i x5) O x3 c0)).(\lambda (H14: (arity g x3 x4 (asucc g b))).(ex2_3_intro C T nat (\lambda (d0: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d0 c0)))) (\lambda (d0: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d0 u0 (asucc g b))))) x3 x4 x5 H13 H14)))))) H12))))]) H9 (drop_gen_drop k d c0 t1 (plus i x2) H8)))))))) x0 H6 H7)))))) H5)))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c0 u (asucc g a0))).(\lambda (_: ((\forall (i: nat).(\forall (b: A).((aprem i (asucc g a0) b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (t0: T).(\lambda (_: (arity g c0 t0 a0)).(\lambda (H3: ((\forall (i: nat).(\forall (b: A).((aprem i a0 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (i: nat).(\lambda (b: A).(\lambda (H4: (aprem i a0 b)).(let H_x \def (H3 i b H4) in (let H5 \def H_x in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H6: (drop (plus i x2) O x0 c0)).(\lambda (H7: (arity g x0 x1 (asucc g b))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u0: T).(\lambda (_: nat).(arity g d u0 (asucc g b))))) x0 x1 x2 H6 H7)))))) H5)))))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (a1: A).(\lambda (_: (arity g c0 t0 a1)).(\lambda (H1: ((\forall (i: nat).(\forall (b: A).((aprem i a1 b) \to (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (i: nat).(\lambda (b: A).(\lambda (H3: (aprem i a2 b)).(let H_x \def (aprem_repl g a1 a2 H2 i b H3) in (let H4 \def H_x in (ex2_ind A (\lambda (b1: A).(leq g b1 b)) (\lambda (b1: A).(aprem i a1 b1)) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))) (\lambda (x: A).(\lambda (H5: (leq g x b)).(\lambda (H6: (aprem i a1 x)).(let H_x0 \def (H1 i x H6) in (let H7 \def H_x0 in (ex2_3_ind C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g x))))) (ex2_3 C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: nat).(\lambda (H8: (drop (plus i x2) O x0 c0)).(\lambda (H9: (arity g x0 x1 (asucc g x))).(ex2_3_intro C T nat (\lambda (d: C).(\lambda (_: T).(\lambda (j: nat).(drop (plus i j) O d c0)))) (\lambda (d: C).(\lambda (u: T).(\lambda (_: nat).(arity g d u (asucc g b))))) x0 x1 x2 H8 (arity_repl g x0 x1 (asucc g x) H9 (asucc g b) (asucc_repl g x b H5)))))))) H7)))))) H4))))))))))))) c t a H))))). theorem arity_appls_cast: \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t: T).(\forall (vs: TList).(\forall (a: A).((arity g c (THeads (Flat Appl) vs u) (asucc g a)) \to ((arity g c (THeads (Flat Appl) vs t) a) \to (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) a)))))))) @@ -1773,7 +1773,7 @@ theorem arity_appls_bind: theorem arity_fsubst0: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (a: A).((arity g c1 t1 a) \to (\forall (d1: C).(\forall (u: T).(\forall (i: nat).((getl i c1 (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c1 t1 c2 t2) \to (arity g c2 t2 a)))))))))))) \def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (a: A).(\lambda (H: (arity g c1 t1 a)).(arity_ind g (\lambda (c: C).(\lambda (t: T).(\lambda (a0: A).(\forall (d1: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 t2) \to (arity g c2 t2 a0))))))))))) (\lambda (c: C).(\lambda (n: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i c (CHead d1 (Bind Abbr) u))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H1: (fsubst0 i u c (TSort n) c2 t2)).(let H2 \def (fsubst0_gen_base c c2 (TSort n) t2 u i H1) in (or3_ind (land (eq C c c2) (subst0 i u (TSort n) t2)) (land (eq T (TSort n) t2) (csubst0 i u c c2)) (land (subst0 i u (TSort n) t2) (csubst0 i u c c2)) (arity g c2 t2 (ASort O n)) (\lambda (H3: (land (eq C c c2) (subst0 i u (TSort n) t2))).(and_ind (eq C c c2) (subst0 i u (TSort n) t2) (arity g c2 t2 (ASort O n)) (\lambda (H4: (eq C c c2)).(\lambda (H5: (subst0 i u (TSort n) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 (ASort O n))) (subst0_gen_sort u t2 i n H5 (arity g c t2 (ASort O n))) c2 H4))) H3)) (\lambda (H3: (land (eq T (TSort n) t2) (csubst0 i u c c2))).(and_ind (eq T (TSort n) t2) (csubst0 i u c c2) (arity g c2 t2 (ASort O n)) (\lambda (H4: (eq T (TSort n) t2)).(\lambda (_: (csubst0 i u c c2)).(eq_ind T (TSort n) (\lambda (t: T).(arity g c2 t (ASort O n))) (arity_sort g c2 n) t2 H4))) H3)) (\lambda (H3: (land (subst0 i u (TSort n) t2) (csubst0 i u c c2))).(and_ind (subst0 i u (TSort n) t2) (csubst0 i u c c2) (arity g c2 t2 (ASort O n)) (\lambda (H4: (subst0 i u (TSort n) t2)).(\lambda (_: (csubst0 i u c c2)).(subst0_gen_sort u t2 i n H4 (arity g c2 t2 (ASort O n))))) H3)) H2))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u a0)).(\lambda (H2: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i d (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 d u c2 t2) \to (arity g c2 t2 a0)))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H3: (getl i0 c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i0 u0 c (TLRef i) c2 t2)).(let H5 \def (fsubst0_gen_base c c2 (TLRef i) t2 u0 i0 H4) in (or3_ind (land (eq C c c2) (subst0 i0 u0 (TLRef i) t2)) (land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2)) (land (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2)) (arity g c2 t2 a0) (\lambda (H6: (land (eq C c c2) (subst0 i0 u0 (TLRef i) t2))).(and_ind (eq C c c2) (subst0 i0 u0 (TLRef i) t2) (arity g c2 t2 a0) (\lambda (H7: (eq C c c2)).(\lambda (H8: (subst0 i0 u0 (TLRef i) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a0)) (and_ind (eq nat i i0) (eq T t2 (lift (S i) O u0)) (arity g c t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda (H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: T).(arity g c t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H12 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in (let H13 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in ((let H14 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in (\lambda (H15: (eq C d d1)).(let H16 \def (eq_ind_r T u0 (\lambda (t: T).(getl i c (CHead d1 (Bind Abbr) t))) H12 u H14) in (eq_ind T u (\lambda (t: T).(arity g c (lift (S i) O t) a0)) (let H17 \def (eq_ind_r C d1 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) u))) H16 d H15) in (arity_lift g d u a0 H1 c (S i) O (getl_drop Abbr c d u i H17))) u0 H14)))) H13)))) t2 H10))) (subst0_gen_lref u0 t2 i0 i H8)) c2 H7))) H6)) (\lambda (H6: (land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2))).(and_ind (eq T (TLRef i) t2) (csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (eq T (TLRef i) t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(eq_ind T (TLRef i) (\lambda (t: T).(arity g c2 t a0)) (lt_le_e i i0 (arity g c2 (TLRef i) a0) (\lambda (H9: (lt i i0)).(let H10 \def (csubst0_getl_lt i0 i H9 c c2 u0 H8 (CHead d (Bind Abbr) u) H0) in (or4_ind (getl i c2 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (arity g c2 (TLRef i) a0) (\lambda (H11: (getl i c2 (CHead d (Bind Abbr) u))).(let H12 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (arity_abbr g c2 d u i H11 a0 H1))) (\lambda (H11: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u0)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H13: (getl i c2 (CHead x1 (Bind x0) x3))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H12) in ((let H17 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H12) in ((let H18 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H12) in (\lambda (H19: (eq B Abbr x0)).(\lambda (H20: (eq C d x1)).(let H21 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H14 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c: C).(getl i c2 (CHead c (Bind x0) x3))) H13 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead d (Bind b) x3))) H22 Abbr H19) in (arity_abbr g c2 d x3 i H23 a0 (H2 d1 u0 (r (Bind Abbr) (minus i0 (S i))) (getl_gen_S (Bind Abbr) d (CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) d x3 (fsubst0_snd (r (Bind Abbr) (minus i0 (S i))) u0 d u x3 H21))))))))) H17)) H16)))))))))) H11)) (\lambda (H11: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl i c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 (CHead x2 (Bind x0) x3))).(\lambda (H14: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in ((let H17 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in ((let H18 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in (\lambda (H19: (eq B Abbr x0)).(\lambda (H20: (eq C d x1)).(let H21 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c2 (CHead x2 (Bind x0) t))) H13 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H14 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead x2 (Bind b) u))) H21 Abbr H19) in (arity_abbr g c2 x2 u i H23 a0 (H2 d1 u0 (r (Bind Abbr) (minus i0 (S i))) (getl_gen_S (Bind Abbr) d (CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) x2 u (fsubst0_fst (r (Bind Abbr) (minus i0 (S i))) u0 d u x2 H22))))))))) H17)) H16)))))))))) H11)) (\lambda (H11: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 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 (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H12: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 (CHead x2 (Bind x0) x4))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H15: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H16 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H17 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in ((let H18 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in ((let H19 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in (\lambda (H20: (eq B Abbr x0)).(\lambda (H21: (eq C d x1)).(let H22 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x4)) H14 u H19) in (let H23 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H15 d H21) in (let H24 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead x2 (Bind b) x4))) H13 Abbr H20) in (arity_abbr g c2 x2 x4 i H24 a0 (H2 d1 u0 (r (Bind Abbr) (minus i0 (S i))) (getl_gen_S (Bind Abbr) d (CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H16) x2 x4 (fsubst0_both (r (Bind Abbr) (minus i0 (S i))) u0 d u x4 H22 x2 H23))))))))) H18)) H17)))))))))))) H11)) H10))) (\lambda (H9: (le i0 i)).(arity_abbr g c2 d u i (csubst0_getl_ge i0 i H9 c c2 u0 H8 (CHead d (Bind Abbr) u) H0) a0 H1))) t2 H7))) H6)) (\lambda (H6: (land (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2))).(and_ind (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (subst0 i0 u0 (TLRef i) t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(and_ind (eq nat i i0) (eq T t2 (lift (S i) O u0)) (arity g c2 t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda (H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: T).(arity g c2 t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(csubst0 n u0 c c2)) H8 i H9) in (let H12 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H13 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in (let H14 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in ((let H15 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in (\lambda (H16: (eq C d d1)).(let H17 \def (eq_ind_r T u0 (\lambda (t: T).(getl i c (CHead d1 (Bind Abbr) t))) H13 u H15) in (let H18 \def (eq_ind_r T u0 (\lambda (t: T).(csubst0 i t c c2)) H11 u H15) in (eq_ind T u (\lambda (t: T).(arity g c2 (lift (S i) O t) a0)) (let H19 \def (eq_ind_r C d1 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) u))) H17 d H16) in (arity_lift g d u a0 H1 c2 (S i) O (getl_drop Abbr c2 d u i (csubst0_getl_ge i i (le_n i) c c2 u H18 (CHead d (Bind Abbr) u) H19)))) u0 H15))))) H14))))) t2 H10))) (subst0_gen_lref u0 t2 i0 i H7)))) H6)) H5))))))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u (asucc g a0))).(\lambda (H2: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i d (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 d u c2 t2) \to (arity g c2 t2 (asucc g a0))))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H3: (getl i0 c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i0 u0 c (TLRef i) c2 t2)).(let H5 \def (fsubst0_gen_base c c2 (TLRef i) t2 u0 i0 H4) in (or3_ind (land (eq C c c2) (subst0 i0 u0 (TLRef i) t2)) (land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2)) (land (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2)) (arity g c2 t2 a0) (\lambda (H6: (land (eq C c c2) (subst0 i0 u0 (TLRef i) t2))).(and_ind (eq C c c2) (subst0 i0 u0 (TLRef i) t2) (arity g c2 t2 a0) (\lambda (H7: (eq C c c2)).(\lambda (H8: (subst0 i0 u0 (TLRef i) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a0)) (and_ind (eq nat i i0) (eq T t2 (lift (S i) O u0)) (arity g c t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda (H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: T).(arity g c t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H12 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in (let H13 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in (False_ind (arity g c (lift (S i) O u0) a0) H13)))) t2 H10))) (subst0_gen_lref u0 t2 i0 i H8)) c2 H7))) H6)) (\lambda (H6: (land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2))).(and_ind (eq T (TLRef i) t2) (csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (eq T (TLRef i) t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(eq_ind T (TLRef i) (\lambda (t: T).(arity g c2 t a0)) (lt_le_e i i0 (arity g c2 (TLRef i) a0) (\lambda (H9: (lt i i0)).(let H10 \def (csubst0_getl_lt i0 i H9 c c2 u0 H8 (CHead d (Bind Abst) u) H0) in (or4_ind (getl i c2 (CHead d (Bind Abst) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (arity g c2 (TLRef i) a0) (\lambda (H11: (getl i c2 (CHead d (Bind Abst) u))).(let H12 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (arity_abst g c2 d u i H11 a0 H1))) (\lambda (H11: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e0 (Bind b) u0)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2))).(\lambda (H13: (getl i c2 (CHead x1 (Bind x0) x3))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H12) in ((let H17 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H12) in ((let H18 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H12) in (\lambda (H19: (eq B Abst x0)).(\lambda (H20: (eq C d x1)).(let H21 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H14 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c: C).(getl i c2 (CHead c (Bind x0) x3))) H13 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead d (Bind b) x3))) H22 Abst H19) in (arity_abst g c2 d x3 i H23 a0 (H2 d1 u0 (r (Bind Abst) (minus i0 (S i))) (getl_gen_S (Bind Abst) d (CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) d x3 (fsubst0_snd (r (Bind Abst) (minus i0 (S i))) u0 d u x3 H21))))))))) H17)) H16)))))))))) H11)) (\lambda (H11: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u0)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl i c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 (CHead x2 (Bind x0) x3))).(\lambda (H14: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in ((let H17 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in ((let H18 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in (\lambda (H19: (eq B Abst x0)).(\lambda (H20: (eq C d x1)).(let H21 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c2 (CHead x2 (Bind x0) t))) H13 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H14 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead x2 (Bind b) u))) H21 Abst H19) in (arity_abst g c2 x2 u i H23 a0 (H2 d1 u0 (r (Bind Abst) (minus i0 (S i))) (getl_gen_S (Bind Abst) d (CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) x2 u (fsubst0_fst (r (Bind Abst) (minus i0 (S i))) u0 d u x2 H22))))))))) H17)) H16)))))))))) H11)) (\lambda (H11: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u0))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 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 (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H12: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 (CHead x2 (Bind x0) x4))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H15: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H16 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H17 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in ((let H18 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in ((let H19 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in (\lambda (H20: (eq B Abst x0)).(\lambda (H21: (eq C d x1)).(let H22 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x4)) H14 u H19) in (let H23 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H15 d H21) in (let H24 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead x2 (Bind b) x4))) H13 Abst H20) in (arity_abst g c2 x2 x4 i H24 a0 (H2 d1 u0 (r (Bind Abst) (minus i0 (S i))) (getl_gen_S (Bind Abst) d (CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H16) x2 x4 (fsubst0_both (r (Bind Abst) (minus i0 (S i))) u0 d u x4 H22 x2 H23))))))))) H18)) H17)))))))))))) H11)) H10))) (\lambda (H9: (le i0 i)).(arity_abst g c2 d u i (csubst0_getl_ge i0 i H9 c c2 u0 H8 (CHead d (Bind Abst) u) H0) a0 H1))) t2 H7))) H6)) (\lambda (H6: (land (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2))).(and_ind (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (subst0 i0 u0 (TLRef i) t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(and_ind (eq nat i i0) (eq T t2 (lift (S i) O u0)) (arity g c2 t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda (H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: T).(arity g c2 t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(csubst0 n u0 c c2)) H8 i H9) in (let H12 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H13 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in (let H14 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in (False_ind (arity g c2 (lift (S i) O u0) a0) H14))))) t2 H10))) (subst0_gen_lref u0 t2 i0 i H7)))) H6)) H5))))))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H1: (arity g c u a1)).(\lambda (H2: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 t2) \to (arity g c2 t2 a1)))))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind b) u) t a2)).(\lambda (H4: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i (CHead c (Bind b) u) (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 (CHead c (Bind b) u) t c2 t2) \to (arity g c2 t2 a2)))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H5: (getl i c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H6: (fsubst0 i u0 c (THead (Bind b) u t) c2 t2)).(let H7 \def (fsubst0_gen_base c c2 (THead (Bind b) u t) t2 u0 i H6) in (or3_ind (land (eq C c c2) (subst0 i u0 (THead (Bind b) u t) t2)) (land (eq T (THead (Bind b) u t) t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Bind b) u t) t2) (csubst0 i u0 c c2)) (arity g c2 t2 a2) (\lambda (H8: (land (eq C c c2) (subst0 i u0 (THead (Bind b) u t) t2))).(and_ind (eq C c c2) (subst0 i u0 (THead (Bind b) u t) t2) (arity g c2 t2 a2) (\lambda (H9: (eq C c c2)).(\lambda (H10: (subst0 i u0 (THead (Bind b) u t) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) (or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3)))) (arity g c t2 a2) (\lambda (H11: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c t2 a2) (\lambda (x: T).(\lambda (H12: (eq T t2 (THead (Bind b) x t))).(\lambda (H13: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind b) x t) (\lambda (t0: T).(arity g c t0 a2)) (arity_bind g b H0 c x a1 (H2 d1 u0 i H5 c x (fsubst0_snd i u0 c u x H13)) t a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c (Bind b) x) t (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t (CHead c (Bind b) x) (csubst0_snd_bind b i u0 u x H13 c)))) t2 H12)))) H11)) (\lambda (H11: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda (t2: T).(subst0 (s (Bind b) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3)) (arity g c t2 a2) (\lambda (x: T).(\lambda (H12: (eq T t2 (THead (Bind b) u x))).(\lambda (H13: (subst0 (s (Bind b) i) u0 t x)).(eq_ind_r T (THead (Bind b) u x) (\lambda (t0: T).(arity g c t0 a2)) (arity_bind g b H0 c u a1 H1 x a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c (Bind b) u) x (fsubst0_snd (S i) u0 (CHead c (Bind b) u) t x H13))) t2 H12)))) H11)) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind b) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3))) (arity g c t2 a2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H12: (eq T t2 (THead (Bind b) x0 x1))).(\lambda (H13: (subst0 i u0 u x0)).(\lambda (H14: (subst0 (s (Bind b) i) u0 t x1)).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t0: T).(arity g c t0 a2)) (arity_bind g b H0 c x0 a1 (H2 d1 u0 i H5 c x0 (fsubst0_snd i u0 c u x0 H13)) x1 a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t x1 H14 (CHead c (Bind b) x0) (csubst0_snd_bind b i u0 u x0 H13 c)))) t2 H12)))))) H11)) (subst0_gen_head (Bind b) u0 u t t2 i H10)) c2 H9))) H8)) (\lambda (H8: (land (eq T (THead (Bind b) u t) t2) (csubst0 i u0 c c2))).(and_ind (eq T (THead (Bind b) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 a2) (\lambda (H9: (eq T (THead (Bind b) u t) t2)).(\lambda (H10: (csubst0 i u0 c c2)).(eq_ind T (THead (Bind b) u t) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_bind g b H0 c2 u a1 (H2 d1 u0 i H5 c2 u (fsubst0_fst i u0 c u c2 H10)) t a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c2 (Bind b) u) t (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t (CHead c2 (Bind b) u) (csubst0_fst_bind b i c c2 u0 H10 u)))) t2 H9))) H8)) (\lambda (H8: (land (subst0 i u0 (THead (Bind b) u t) t2) (csubst0 i u0 c c2))).(and_ind (subst0 i u0 (THead (Bind b) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 a2) (\lambda (H9: (subst0 i u0 (THead (Bind b) u t) t2)).(\lambda (H10: (csubst0 i u0 c c2)).(or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3)))) (arity g c2 t2 a2) (\lambda (H11: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 a2) (\lambda (x: T).(\lambda (H12: (eq T t2 (THead (Bind b) x t))).(\lambda (H13: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind b) x t) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_bind g b H0 c2 x a1 (H2 d1 u0 i H5 c2 x (fsubst0_both i u0 c u x H13 c2 H10)) t a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c2 (Bind b) x) t (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t (CHead c2 (Bind b) x) (csubst0_both_bind b i u0 u x H13 c c2 H10)))) t2 H12)))) H11)) (\lambda (H11: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda (t2: T).(subst0 (s (Bind b) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3)) (arity g c2 t2 a2) (\lambda (x: T).(\lambda (H12: (eq T t2 (THead (Bind b) u x))).(\lambda (H13: (subst0 (s (Bind b) i) u0 t x)).(eq_ind_r T (THead (Bind b) u x) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_bind g b H0 c2 u a1 (H2 d1 u0 i H5 c2 u (fsubst0_fst i u0 c u c2 H10)) x a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c2 (Bind b) u) x (fsubst0_both (S i) u0 (CHead c (Bind b) u) t x H13 (CHead c2 (Bind b) u) (csubst0_fst_bind b i c c2 u0 H10 u)))) t2 H12)))) H11)) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind b) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3))) (arity g c2 t2 a2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H12: (eq T t2 (THead (Bind b) x0 x1))).(\lambda (H13: (subst0 i u0 u x0)).(\lambda (H14: (subst0 (s (Bind b) i) u0 t x1)).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_bind g b H0 c2 x0 a1 (H2 d1 u0 i H5 c2 x0 (fsubst0_both i u0 c u x0 H13 c2 H10)) x1 a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c2 (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t x1 H14 (CHead c2 (Bind b) x0) (csubst0_both_bind b i u0 u x0 H13 c c2 H10)))) t2 H12)))))) H11)) (subst0_gen_head (Bind b) u0 u t t2 i H9)))) H8)) H7)))))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H0: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 t2) \to (arity g c2 t2 (asucc g a1))))))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind Abst) u) t a2)).(\lambda (H3: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i (CHead c (Bind Abst) u) (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 (CHead c (Bind Abst) u) t c2 t2) \to (arity g c2 t2 a2)))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i u0 c (THead (Bind Abst) u t) c2 t2)).(let H6 \def (fsubst0_gen_base c c2 (THead (Bind Abst) u t) t2 u0 i H5) in (or3_ind (land (eq C c c2) (subst0 i u0 (THead (Bind Abst) u t) t2)) (land (eq T (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2)) (arity g c2 t2 (AHead a1 a2)) (\lambda (H7: (land (eq C c c2) (subst0 i u0 (THead (Bind Abst) u t) t2))).(and_ind (eq C c c2) (subst0 i u0 (THead (Bind Abst) u t) t2) (arity g c2 t2 (AHead a1 a2)) (\lambda (H8: (eq C c c2)).(\lambda (H9: (subst0 i u0 (THead (Bind Abst) u t) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 (AHead a1 a2))) (or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)))) (arity g c t2 (AHead a1 a2)) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c t2 (AHead a1 a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind Abst) x t) (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g c x a1 (H1 d1 u0 i H4 c x (fsubst0_snd i u0 c u x H12)) t a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind Abst) x) t (fsubst0_fst (S i) u0 (CHead c (Bind Abst) u) t (CHead c (Bind Abst) x) (csubst0_snd_bind Abst i u0 u x H12 c)))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)) (arity g c t2 (AHead a1 a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) u x))).(\lambda (H12: (subst0 (s (Bind Abst) i) u0 t x)).(eq_ind_r T (THead (Bind Abst) u x) (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g c u a1 H0 x a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind Abst) u) x (fsubst0_snd (S i) u0 (CHead c (Bind Abst) u) t x H12))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (arity g c t2 (AHead a1 a2)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Bind Abst) i) u0 t x1)).(eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g c x0 a1 (H1 d1 u0 i H4 c x0 (fsubst0_snd i u0 c u x0 H12)) x1 a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind Abst) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind Abst) u) t x1 H13 (CHead c (Bind Abst) x0) (csubst0_snd_bind Abst i u0 u x0 H12 c)))) t2 H11)))))) H10)) (subst0_gen_head (Bind Abst) u0 u t t2 i H9)) c2 H8))) H7)) (\lambda (H7: (land (eq T (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2))).(and_ind (eq T (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 (AHead a1 a2)) (\lambda (H8: (eq T (THead (Bind Abst) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(eq_ind T (THead (Bind Abst) u t) (\lambda (t0: T).(arity g c2 t0 (AHead a1 a2))) (arity_head g c2 u a1 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c u c2 H9)) t a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind Abst) u) t (fsubst0_fst (S i) u0 (CHead c (Bind Abst) u) t (CHead c2 (Bind Abst) u) (csubst0_fst_bind Abst i c c2 u0 H9 u)))) t2 H8))) H7)) (\lambda (H7: (land (subst0 i u0 (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2))).(and_ind (subst0 i u0 (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 (AHead a1 a2)) (\lambda (H8: (subst0 i u0 (THead (Bind Abst) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)))) (arity g c2 t2 (AHead a1 a2)) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 (AHead a1 a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind Abst) x t) (\lambda (t0: T).(arity g c2 t0 (AHead a1 a2))) (arity_head g c2 x a1 (H1 d1 u0 i H4 c2 x (fsubst0_both i u0 c u x H12 c2 H9)) t a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind Abst) x) t (fsubst0_fst (S i) u0 (CHead c (Bind Abst) u) t (CHead c2 (Bind Abst) x) (csubst0_both_bind Abst i u0 u x H12 c c2 H9)))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)) (arity g c2 t2 (AHead a1 a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) u x))).(\lambda (H12: (subst0 (s (Bind Abst) i) u0 t x)).(eq_ind_r T (THead (Bind Abst) u x) (\lambda (t0: T).(arity g c2 t0 (AHead a1 a2))) (arity_head g c2 u a1 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c u c2 H9)) x a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind Abst) u) x (fsubst0_both (S i) u0 (CHead c (Bind Abst) u) t x H12 (CHead c2 (Bind Abst) u) (csubst0_fst_bind Abst i c c2 u0 H9 u)))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (arity g c2 t2 (AHead a1 a2)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Bind Abst) i) u0 t x1)).(eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t0: T).(arity g c2 t0 (AHead a1 a2))) (arity_head g c2 x0 a1 (H1 d1 u0 i H4 c2 x0 (fsubst0_both i u0 c u x0 H12 c2 H9)) x1 a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind Abst) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind Abst) u) t x1 H13 (CHead c2 (Bind Abst) x0) (csubst0_both_bind Abst i u0 u x0 H12 c c2 H9)))) t2 H11)))))) H10)) (subst0_gen_head (Bind Abst) u0 u t t2 i H8)))) H7)) H6)))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H0: (arity g c u a1)).(\lambda (H1: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 t2) \to (arity g c2 t2 a1)))))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (H2: (arity g c t (AHead a1 a2))).(\lambda (H3: ((\forall (d1: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 t2) \to (arity g c2 t2 (AHead a1 a2))))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i u0 c (THead (Flat Appl) u t) c2 t2)).(let H6 \def (fsubst0_gen_base c c2 (THead (Flat Appl) u t) t2 u0 i H5) in (or3_ind (land (eq C c c2) (subst0 i u0 (THead (Flat Appl) u t) t2)) (land (eq T (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2)) (arity g c2 t2 a2) (\lambda (H7: (land (eq C c c2) (subst0 i u0 (THead (Flat Appl) u t) t2))).(and_ind (eq C c c2) (subst0 i u0 (THead (Flat Appl) u t) t2) (arity g c2 t2 a2) (\lambda (H8: (eq C c c2)).(\lambda (H9: (subst0 i u0 (THead (Flat Appl) u t) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) (or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3)))) (arity g c t2 a2) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat Appl) x t) (\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c x a1 (H1 d1 u0 i H4 c x (fsubst0_snd i u0 c u x H12)) t a2 H2) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3)) (arity g c t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) u x))).(\lambda (H12: (subst0 (s (Flat Appl) i) u0 t x)).(eq_ind_r T (THead (Flat Appl) u x) (\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c u a1 H0 x a2 (H3 d1 u0 i H4 c x (fsubst0_snd i u0 c t x H12))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3))) (arity g c t2 a2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Flat Appl) i) u0 t x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c x0 a1 (H1 d1 u0 i H4 c x0 (fsubst0_snd i u0 c u x0 H12)) x1 a2 (H3 d1 u0 i H4 c x1 (fsubst0_snd i u0 c t x1 H13))) t2 H11)))))) H10)) (subst0_gen_head (Flat Appl) u0 u t t2 i H9)) c2 H8))) H7)) (\lambda (H7: (land (eq T (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2))).(and_ind (eq T (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 a2) (\lambda (H8: (eq T (THead (Flat Appl) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(eq_ind T (THead (Flat Appl) u t) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_appl g c2 u a1 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c u c2 H9)) t a2 (H3 d1 u0 i H4 c2 t (fsubst0_fst i u0 c t c2 H9))) t2 H8))) H7)) (\lambda (H7: (land (subst0 i u0 (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2))).(and_ind (subst0 i u0 (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 a2) (\lambda (H8: (subst0 i u0 (THead (Flat Appl) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3)))) (arity g c2 t2 a2) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat Appl) x t) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_appl g c2 x a1 (H1 d1 u0 i H4 c2 x (fsubst0_both i u0 c u x H12 c2 H9)) t a2 (H3 d1 u0 i H4 c2 t (fsubst0_fst i u0 c t c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3)) (arity g c2 t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) u x))).(\lambda (H12: (subst0 (s (Flat Appl) i) u0 t x)).(eq_ind_r T (THead (Flat Appl) u x) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_appl g c2 u a1 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c u c2 H9)) x a2 (H3 d1 u0 i H4 c2 x (fsubst0_both i u0 c t x H12 c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3))) (arity g c2 t2 a2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Flat Appl) i) u0 t x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_appl g c2 x0 a1 (H1 d1 u0 i H4 c2 x0 (fsubst0_both i u0 c u x0 H12 c2 H9)) x1 a2 (H3 d1 u0 i H4 c2 x1 (fsubst0_both i u0 c t x1 H13 c2 H9))) t2 H11)))))) H10)) (subst0_gen_head (Flat Appl) u0 u t t2 i H8)))) H7)) H6)))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (H0: (arity g c u (asucc g a0))).(\lambda (H1: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 t2) \to (arity g c2 t2 (asucc g a0))))))))))).(\lambda (t: T).(\lambda (H2: (arity g c t a0)).(\lambda (H3: ((\forall (d1: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 t2) \to (arity g c2 t2 a0)))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i u0 c (THead (Flat Cast) u t) c2 t2)).(let H6 \def (fsubst0_gen_base c c2 (THead (Flat Cast) u t) t2 u0 i H5) in (or3_ind (land (eq C c c2) (subst0 i u0 (THead (Flat Cast) u t) t2)) (land (eq T (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2)) (arity g c2 t2 a0) (\lambda (H7: (land (eq C c c2) (subst0 i u0 (THead (Flat Cast) u t) t2))).(and_ind (eq C c c2) (subst0 i u0 (THead (Flat Cast) u t) t2) (arity g c2 t2 a0) (\lambda (H8: (eq C c c2)).(\lambda (H9: (subst0 i u0 (THead (Flat Cast) u t) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a0)) (or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3)))) (arity g c t2 a0) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat Cast) x t) (\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c x a0 (H1 d1 u0 i H4 c x (fsubst0_snd i u0 c u x H12)) t H2) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3)) (arity g c t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) u x))).(\lambda (H12: (subst0 (s (Flat Cast) i) u0 t x)).(eq_ind_r T (THead (Flat Cast) u x) (\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c u a0 H0 x (H3 d1 u0 i H4 c x (fsubst0_snd i u0 c t x H12))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Cast) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3))) (arity g c t2 a0) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Flat Cast) i) u0 t x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c x0 a0 (H1 d1 u0 i H4 c x0 (fsubst0_snd i u0 c u x0 H12)) x1 (H3 d1 u0 i H4 c x1 (fsubst0_snd i u0 c t x1 H13))) t2 H11)))))) H10)) (subst0_gen_head (Flat Cast) u0 u t t2 i H9)) c2 H8))) H7)) (\lambda (H7: (land (eq T (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2))).(and_ind (eq T (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 a0) (\lambda (H8: (eq T (THead (Flat Cast) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(eq_ind T (THead (Flat Cast) u t) (\lambda (t0: T).(arity g c2 t0 a0)) (arity_cast g c2 u a0 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c u c2 H9)) t (H3 d1 u0 i H4 c2 t (fsubst0_fst i u0 c t c2 H9))) t2 H8))) H7)) (\lambda (H7: (land (subst0 i u0 (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2))).(and_ind (subst0 i u0 (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 a0) (\lambda (H8: (subst0 i u0 (THead (Flat Cast) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3)))) (arity g c2 t2 a0) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat Cast) x t) (\lambda (t0: T).(arity g c2 t0 a0)) (arity_cast g c2 x a0 (H1 d1 u0 i H4 c2 x (fsubst0_both i u0 c u x H12 c2 H9)) t (H3 d1 u0 i H4 c2 t (fsubst0_fst i u0 c t c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3)) (arity g c2 t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) u x))).(\lambda (H12: (subst0 (s (Flat Cast) i) u0 t x)).(eq_ind_r T (THead (Flat Cast) u x) (\lambda (t0: T).(arity g c2 t0 a0)) (arity_cast g c2 u a0 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c u c2 H9)) x (H3 d1 u0 i H4 c2 x (fsubst0_both i u0 c t x H12 c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Cast) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3))) (arity g c2 t2 a0) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Flat Cast) i) u0 t x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t0: T).(arity g c2 t0 a0)) (arity_cast g c2 x0 a0 (H1 d1 u0 i H4 c2 x0 (fsubst0_both i u0 c u x0 H12 c2 H9)) x1 (H3 d1 u0 i H4 c2 x1 (fsubst0_both i u0 c t x1 H13 c2 H9))) t2 H11)))))) H10)) (subst0_gen_head (Flat Cast) u0 u t t2 i H8)))) H7)) H6))))))))))))))))) (\lambda (c: C).(\lambda (t: T).(\lambda (a1: A).(\lambda (_: (arity g c t a1)).(\lambda (H1: ((\forall (d1: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 t2) \to (arity g c2 t2 a1)))))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (d1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H3: (getl i c (CHead d1 (Bind Abbr) u))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i u c t c2 t2)).(let H5 \def (fsubst0_gen_base c c2 t t2 u i H4) in (or3_ind (land (eq C c c2) (subst0 i u t t2)) (land (eq T t t2) (csubst0 i u c c2)) (land (subst0 i u t t2) (csubst0 i u c c2)) (arity g c2 t2 a2) (\lambda (H6: (land (eq C c c2) (subst0 i u t t2))).(and_ind (eq C c c2) (subst0 i u t t2) (arity g c2 t2 a2) (\lambda (H7: (eq C c c2)).(\lambda (H8: (subst0 i u t t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) (arity_repl g c t2 a1 (H1 d1 u i H3 c t2 (fsubst0_snd i u c t t2 H8)) a2 H2) c2 H7))) H6)) (\lambda (H6: (land (eq T t t2) (csubst0 i u c c2))).(and_ind (eq T t t2) (csubst0 i u c c2) (arity g c2 t2 a2) (\lambda (H7: (eq T t t2)).(\lambda (H8: (csubst0 i u c c2)).(eq_ind T t (\lambda (t0: T).(arity g c2 t0 a2)) (arity_repl g c2 t a1 (H1 d1 u i H3 c2 t (fsubst0_fst i u c t c2 H8)) a2 H2) t2 H7))) H6)) (\lambda (H6: (land (subst0 i u t t2) (csubst0 i u c c2))).(and_ind (subst0 i u t t2) (csubst0 i u c c2) (arity g c2 t2 a2) (\lambda (H7: (subst0 i u t t2)).(\lambda (H8: (csubst0 i u c c2)).(arity_repl g c2 t2 a1 (H1 d1 u i H3 c2 t2 (fsubst0_both i u c t t2 H7 c2 H8)) a2 H2))) H6)) H5)))))))))))))))) c1 t1 a H))))). + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (a: A).(\lambda (H: (arity g c1 t1 a)).(arity_ind g (\lambda (c: C).(\lambda (t: T).(\lambda (a0: A).(\forall (d1: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 t2) \to (arity g c2 t2 a0))))))))))) (\lambda (c: C).(\lambda (n: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (_: (getl i c (CHead d1 (Bind Abbr) u))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H1: (fsubst0 i u c (TSort n) c2 t2)).(let H2 \def (fsubst0_gen_base c c2 (TSort n) t2 u i H1) in (or3_ind (land (eq C c c2) (subst0 i u (TSort n) t2)) (land (eq T (TSort n) t2) (csubst0 i u c c2)) (land (subst0 i u (TSort n) t2) (csubst0 i u c c2)) (arity g c2 t2 (ASort O n)) (\lambda (H3: (land (eq C c c2) (subst0 i u (TSort n) t2))).(and_ind (eq C c c2) (subst0 i u (TSort n) t2) (arity g c2 t2 (ASort O n)) (\lambda (H4: (eq C c c2)).(\lambda (H5: (subst0 i u (TSort n) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 (ASort O n))) (subst0_gen_sort u t2 i n H5 (arity g c t2 (ASort O n))) c2 H4))) H3)) (\lambda (H3: (land (eq T (TSort n) t2) (csubst0 i u c c2))).(and_ind (eq T (TSort n) t2) (csubst0 i u c c2) (arity g c2 t2 (ASort O n)) (\lambda (H4: (eq T (TSort n) t2)).(\lambda (_: (csubst0 i u c c2)).(eq_ind T (TSort n) (\lambda (t: T).(arity g c2 t (ASort O n))) (arity_sort g c2 n) t2 H4))) H3)) (\lambda (H3: (land (subst0 i u (TSort n) t2) (csubst0 i u c c2))).(and_ind (subst0 i u (TSort n) t2) (csubst0 i u c c2) (arity g c2 t2 (ASort O n)) (\lambda (H4: (subst0 i u (TSort n) t2)).(\lambda (_: (csubst0 i u c c2)).(subst0_gen_sort u t2 i n H4 (arity g c2 t2 (ASort O n))))) H3)) H2))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u a0)).(\lambda (H2: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i d (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 d u c2 t2) \to (arity g c2 t2 a0)))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H3: (getl i0 c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i0 u0 c (TLRef i) c2 t2)).(let H5 \def (fsubst0_gen_base c c2 (TLRef i) t2 u0 i0 H4) in (or3_ind (land (eq C c c2) (subst0 i0 u0 (TLRef i) t2)) (land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2)) (land (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2)) (arity g c2 t2 a0) (\lambda (H6: (land (eq C c c2) (subst0 i0 u0 (TLRef i) t2))).(and_ind (eq C c c2) (subst0 i0 u0 (TLRef i) t2) (arity g c2 t2 a0) (\lambda (H7: (eq C c c2)).(\lambda (H8: (subst0 i0 u0 (TLRef i) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a0)) (and_ind (eq nat i i0) (eq T t2 (lift (S i) O u0)) (arity g c t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda (H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: T).(arity g c t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H12 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in (let H13 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in ((let H14 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in (\lambda (H15: (eq C d d1)).(let H16 \def (eq_ind_r T u0 (\lambda (t: T).(getl i c (CHead d1 (Bind Abbr) t))) H12 u H14) in (eq_ind T u (\lambda (t: T).(arity g c (lift (S i) O t) a0)) (let H17 \def (eq_ind_r C d1 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) u))) H16 d H15) in (arity_lift g d u a0 H1 c (S i) O (getl_drop Abbr c d u i H17))) u0 H14)))) H13)))) t2 H10))) (subst0_gen_lref u0 t2 i0 i H8)) c2 H7))) H6)) (\lambda (H6: (land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2))).(and_ind (eq T (TLRef i) t2) (csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (eq T (TLRef i) t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(eq_ind T (TLRef i) (\lambda (t: T).(arity g c2 t a0)) (lt_le_e i i0 (arity g c2 (TLRef i) a0) (\lambda (H9: (lt i i0)).(let H10 \def (csubst0_getl_lt i0 i H9 c c2 u0 H8 (CHead d (Bind Abbr) u) H0) in (or4_ind (getl i c2 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (arity g c2 (TLRef i) a0) (\lambda (H11: (getl i c2 (CHead d (Bind Abbr) u))).(let H12 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (arity_abbr g c2 d u i H11 a0 H1))) (\lambda (H11: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u0)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H13: (getl i c2 (CHead x1 (Bind x0) x3))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H12) in ((let H17 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H12) in ((let H18 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H12) in (\lambda (H19: (eq B Abbr x0)).(\lambda (H20: (eq C d x1)).(let H21 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H14 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c: C).(getl i c2 (CHead c (Bind x0) x3))) H13 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead d (Bind b) x3))) H22 Abbr H19) in (arity_abbr g c2 d x3 i H23 a0 (H2 d1 u0 (r (Bind Abbr) (minus i0 (S i))) (getl_gen_S (Bind Abbr) d (CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) d x3 (fsubst0_snd (r (Bind Abbr) (minus i0 (S i))) u0 d u x3 H21))))))))) H17)) H16)))))))))) H11)) (\lambda (H11: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl i c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 (CHead x2 (Bind x0) x3))).(\lambda (H14: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in ((let H17 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in ((let H18 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in (\lambda (H19: (eq B Abbr x0)).(\lambda (H20: (eq C d x1)).(let H21 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c2 (CHead x2 (Bind x0) t))) H13 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H14 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead x2 (Bind b) u))) H21 Abbr H19) in (arity_abbr g c2 x2 u i H23 a0 (H2 d1 u0 (r (Bind Abbr) (minus i0 (S i))) (getl_gen_S (Bind Abbr) d (CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) x2 u (fsubst0_fst (r (Bind Abbr) (minus i0 (S i))) u0 d u x2 H22))))))))) H17)) H16)))))))))) H11)) (\lambda (H11: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 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 (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H12: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 (CHead x2 (Bind x0) x4))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H15: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H16 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abbr) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H17 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in ((let H18 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in ((let H19 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H12) in (\lambda (H20: (eq B Abbr x0)).(\lambda (H21: (eq C d x1)).(let H22 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x4)) H14 u H19) in (let H23 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H15 d H21) in (let H24 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead x2 (Bind b) x4))) H13 Abbr H20) in (arity_abbr g c2 x2 x4 i H24 a0 (H2 d1 u0 (r (Bind Abbr) (minus i0 (S i))) (getl_gen_S (Bind Abbr) d (CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H16) x2 x4 (fsubst0_both (r (Bind Abbr) (minus i0 (S i))) u0 d u x4 H22 x2 H23))))))))) H18)) H17)))))))))))) H11)) H10))) (\lambda (H9: (le i0 i)).(arity_abbr g c2 d u i (csubst0_getl_ge i0 i H9 c c2 u0 H8 (CHead d (Bind Abbr) u) H0) a0 H1))) t2 H7))) H6)) (\lambda (H6: (land (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2))).(and_ind (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (subst0 i0 u0 (TLRef i) t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(and_ind (eq nat i i0) (eq T t2 (lift (S i) O u0)) (arity g c2 t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda (H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: T).(arity g c2 t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(csubst0 n u0 c c2)) H8 i H9) in (let H12 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H13 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in (let H14 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in ((let H15 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in (\lambda (H16: (eq C d d1)).(let H17 \def (eq_ind_r T u0 (\lambda (t: T).(getl i c (CHead d1 (Bind Abbr) t))) H13 u H15) in (let H18 \def (eq_ind_r T u0 (\lambda (t: T).(csubst0 i t c c2)) H11 u H15) in (eq_ind T u (\lambda (t: T).(arity g c2 (lift (S i) O t) a0)) (let H19 \def (eq_ind_r C d1 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) u))) H17 d H16) in (arity_lift g d u a0 H1 c2 (S i) O (getl_drop Abbr c2 d u i (csubst0_getl_ge i i (le_n i) c c2 u H18 (CHead d (Bind Abbr) u) H19)))) u0 H15))))) H14))))) t2 H10))) (subst0_gen_lref u0 t2 i0 i H7)))) H6)) H5))))))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (H1: (arity g d u (asucc g a0))).(\lambda (H2: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i d (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 d u c2 t2) \to (arity g c2 t2 (asucc g a0))))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H3: (getl i0 c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i0 u0 c (TLRef i) c2 t2)).(let H5 \def (fsubst0_gen_base c c2 (TLRef i) t2 u0 i0 H4) in (or3_ind (land (eq C c c2) (subst0 i0 u0 (TLRef i) t2)) (land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2)) (land (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2)) (arity g c2 t2 a0) (\lambda (H6: (land (eq C c c2) (subst0 i0 u0 (TLRef i) t2))).(and_ind (eq C c c2) (subst0 i0 u0 (TLRef i) t2) (arity g c2 t2 a0) (\lambda (H7: (eq C c c2)).(\lambda (H8: (subst0 i0 u0 (TLRef i) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a0)) (and_ind (eq nat i i0) (eq T t2 (lift (S i) O u0)) (arity g c t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda (H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: T).(arity g c t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H12 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in (let H13 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H11)) in (False_ind (arity g c (lift (S i) O u0) a0) H13)))) t2 H10))) (subst0_gen_lref u0 t2 i0 i H8)) c2 H7))) H6)) (\lambda (H6: (land (eq T (TLRef i) t2) (csubst0 i0 u0 c c2))).(and_ind (eq T (TLRef i) t2) (csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (eq T (TLRef i) t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(eq_ind T (TLRef i) (\lambda (t: T).(arity g c2 t a0)) (lt_le_e i i0 (arity g c2 (TLRef i) a0) (\lambda (H9: (lt i i0)).(let H10 \def (csubst0_getl_lt i0 i H9 c c2 u0 H8 (CHead d (Bind Abst) u) H0) in (or4_ind (getl i c2 (CHead d (Bind Abst) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (arity g c2 (TLRef i) a0) (\lambda (H11: (getl i c2 (CHead d (Bind Abst) u))).(let H12 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (arity_abst g c2 d u i H11 a0 H1))) (\lambda (H11: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e0 (Bind b) u0)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2))).(\lambda (H13: (getl i c2 (CHead x1 (Bind x0) x3))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H12) in ((let H17 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H12) in ((let H18 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H12) in (\lambda (H19: (eq B Abst x0)).(\lambda (H20: (eq C d x1)).(let H21 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H14 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c: C).(getl i c2 (CHead c (Bind x0) x3))) H13 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead d (Bind b) x3))) H22 Abst H19) in (arity_abst g c2 d x3 i H23 a0 (H2 d1 u0 (r (Bind Abst) (minus i0 (S i))) (getl_gen_S (Bind Abst) d (CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) d x3 (fsubst0_snd (r (Bind Abst) (minus i0 (S i))) u0 d u x3 H21))))))))) H17)) H16)))))))))) H11)) (\lambda (H11: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u0)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl i c2 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c2 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 (CHead x2 (Bind x0) x3))).(\lambda (H14: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H15 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H16 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in ((let H17 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in ((let H18 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in (\lambda (H19: (eq B Abst x0)).(\lambda (H20: (eq C d x1)).(let H21 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c2 (CHead x2 (Bind x0) t))) H13 u H18) in (let H22 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H14 d H20) in (let H23 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead x2 (Bind b) u))) H21 Abst H19) in (arity_abst g c2 x2 u i H23 a0 (H2 d1 u0 (r (Bind Abst) (minus i0 (S i))) (getl_gen_S (Bind Abst) d (CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H15) x2 u (fsubst0_fst (r (Bind Abst) (minus i0 (S i))) u0 d u x2 H22))))))))) H17)) H16)))))))))) H11)) (\lambda (H11: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u0))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 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 (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c2 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (arity g c2 (TLRef i) a0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H12: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3))).(\lambda (H13: (getl i c2 (CHead x2 (Bind x0) x4))).(\lambda (H14: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H15: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H16 \def (eq_ind nat (minus i0 i) (\lambda (n: nat).(getl n (CHead d (Bind Abst) u) (CHead d1 (Bind Abbr) u0))) (getl_conf_le i0 (CHead d1 (Bind Abbr) u0) c H3 (CHead d (Bind Abst) u) i H0 (le_S_n i i0 (le_S (S i) i0 H9))) (S (minus i0 (S i))) (minus_x_Sy i0 i H9)) in (let H17 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in ((let H18 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in ((let H19 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H12) in (\lambda (H20: (eq B Abst x0)).(\lambda (H21: (eq C d x1)).(let H22 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x4)) H14 u H19) in (let H23 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H15 d H21) in (let H24 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c2 (CHead x2 (Bind b) x4))) H13 Abst H20) in (arity_abst g c2 x2 x4 i H24 a0 (H2 d1 u0 (r (Bind Abst) (minus i0 (S i))) (getl_gen_S (Bind Abst) d (CHead d1 (Bind Abbr) u0) u (minus i0 (S i)) H16) x2 x4 (fsubst0_both (r (Bind Abst) (minus i0 (S i))) u0 d u x4 H22 x2 H23))))))))) H18)) H17)))))))))))) H11)) H10))) (\lambda (H9: (le i0 i)).(arity_abst g c2 d u i (csubst0_getl_ge i0 i H9 c c2 u0 H8 (CHead d (Bind Abst) u) H0) a0 H1))) t2 H7))) H6)) (\lambda (H6: (land (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2))).(and_ind (subst0 i0 u0 (TLRef i) t2) (csubst0 i0 u0 c c2) (arity g c2 t2 a0) (\lambda (H7: (subst0 i0 u0 (TLRef i) t2)).(\lambda (H8: (csubst0 i0 u0 c c2)).(and_ind (eq nat i i0) (eq T t2 (lift (S i) O u0)) (arity g c2 t2 a0) (\lambda (H9: (eq nat i i0)).(\lambda (H10: (eq T t2 (lift (S i) O u0))).(eq_ind_r T (lift (S i) O u0) (\lambda (t: T).(arity g c2 t a0)) (let H11 \def (eq_ind_r nat i0 (\lambda (n: nat).(csubst0 n u0 c c2)) H8 i H9) in (let H12 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d1 (Bind Abbr) u0))) H3 i H9) in (let H13 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H0 (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in (let H14 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) i H0 (CHead d1 (Bind Abbr) u0) H12)) in (False_ind (arity g c2 (lift (S i) O u0) a0) H14))))) t2 H10))) (subst0_gen_lref u0 t2 i0 i H7)))) H6)) H5))))))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H1: (arity g c u a1)).(\lambda (H2: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 t2) \to (arity g c2 t2 a1)))))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind b) u) t a2)).(\lambda (H4: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i (CHead c (Bind b) u) (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 (CHead c (Bind b) u) t c2 t2) \to (arity g c2 t2 a2)))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H5: (getl i c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H6: (fsubst0 i u0 c (THead (Bind b) u t) c2 t2)).(let H7 \def (fsubst0_gen_base c c2 (THead (Bind b) u t) t2 u0 i H6) in (or3_ind (land (eq C c c2) (subst0 i u0 (THead (Bind b) u t) t2)) (land (eq T (THead (Bind b) u t) t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Bind b) u t) t2) (csubst0 i u0 c c2)) (arity g c2 t2 a2) (\lambda (H8: (land (eq C c c2) (subst0 i u0 (THead (Bind b) u t) t2))).(and_ind (eq C c c2) (subst0 i u0 (THead (Bind b) u t) t2) (arity g c2 t2 a2) (\lambda (H9: (eq C c c2)).(\lambda (H10: (subst0 i u0 (THead (Bind b) u t) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) (or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3)))) (arity g c t2 a2) (\lambda (H11: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c t2 a2) (\lambda (x: T).(\lambda (H12: (eq T t2 (THead (Bind b) x t))).(\lambda (H13: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind b) x t) (\lambda (t0: T).(arity g c t0 a2)) (arity_bind g b H0 c x a1 (H2 d1 u0 i H5 c x (fsubst0_snd i u0 c u x H13)) t a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c (Bind b) x) t (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t (CHead c (Bind b) x) (csubst0_snd_bind b i u0 u x H13 c)))) t2 H12)))) H11)) (\lambda (H11: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda (t2: T).(subst0 (s (Bind b) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3)) (arity g c t2 a2) (\lambda (x: T).(\lambda (H12: (eq T t2 (THead (Bind b) u x))).(\lambda (H13: (subst0 (s (Bind b) i) u0 t x)).(eq_ind_r T (THead (Bind b) u x) (\lambda (t0: T).(arity g c t0 a2)) (arity_bind g b H0 c u a1 H1 x a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c (Bind b) u) x (fsubst0_snd (S i) u0 (CHead c (Bind b) u) t x H13))) t2 H12)))) H11)) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind b) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3))) (arity g c t2 a2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H12: (eq T t2 (THead (Bind b) x0 x1))).(\lambda (H13: (subst0 i u0 u x0)).(\lambda (H14: (subst0 (s (Bind b) i) u0 t x1)).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t0: T).(arity g c t0 a2)) (arity_bind g b H0 c x0 a1 (H2 d1 u0 i H5 c x0 (fsubst0_snd i u0 c u x0 H13)) x1 a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t x1 H14 (CHead c (Bind b) x0) (csubst0_snd_bind b i u0 u x0 H13 c)))) t2 H12)))))) H11)) (subst0_gen_head (Bind b) u0 u t t2 i H10)) c2 H9))) H8)) (\lambda (H8: (land (eq T (THead (Bind b) u t) t2) (csubst0 i u0 c c2))).(and_ind (eq T (THead (Bind b) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 a2) (\lambda (H9: (eq T (THead (Bind b) u t) t2)).(\lambda (H10: (csubst0 i u0 c c2)).(eq_ind T (THead (Bind b) u t) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_bind g b H0 c2 u a1 (H2 d1 u0 i H5 c2 u (fsubst0_fst i u0 c u c2 H10)) t a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c2 (Bind b) u) t (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t (CHead c2 (Bind b) u) (csubst0_fst_bind b i c c2 u0 H10 u)))) t2 H9))) H8)) (\lambda (H8: (land (subst0 i u0 (THead (Bind b) u t) t2) (csubst0 i u0 c c2))).(and_ind (subst0 i u0 (THead (Bind b) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 a2) (\lambda (H9: (subst0 i u0 (THead (Bind b) u t) t2)).(\lambda (H10: (csubst0 i u0 c c2)).(or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3)))) (arity g c2 t2 a2) (\lambda (H11: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind b) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 a2) (\lambda (x: T).(\lambda (H12: (eq T t2 (THead (Bind b) x t))).(\lambda (H13: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind b) x t) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_bind g b H0 c2 x a1 (H2 d1 u0 i H5 c2 x (fsubst0_both i u0 c u x H13 c2 H10)) t a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c2 (Bind b) x) t (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t (CHead c2 (Bind b) x) (csubst0_both_bind b i u0 u x H13 c c2 H10)))) t2 H12)))) H11)) (\lambda (H11: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda (t2: T).(subst0 (s (Bind b) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3)) (arity g c2 t2 a2) (\lambda (x: T).(\lambda (H12: (eq T t2 (THead (Bind b) u x))).(\lambda (H13: (subst0 (s (Bind b) i) u0 t x)).(eq_ind_r T (THead (Bind b) u x) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_bind g b H0 c2 u a1 (H2 d1 u0 i H5 c2 u (fsubst0_fst i u0 c u c2 H10)) x a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c2 (Bind b) u) x (fsubst0_both (S i) u0 (CHead c (Bind b) u) t x H13 (CHead c2 (Bind b) u) (csubst0_fst_bind b i c c2 u0 H10 u)))) t2 H12)))) H11)) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind b) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t t3))) (arity g c2 t2 a2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H12: (eq T t2 (THead (Bind b) x0 x1))).(\lambda (H13: (subst0 i u0 u x0)).(\lambda (H14: (subst0 (s (Bind b) i) u0 t x1)).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_bind g b H0 c2 x0 a1 (H2 d1 u0 i H5 c2 x0 (fsubst0_both i u0 c u x0 H13 c2 H10)) x1 a2 (H4 d1 u0 (S i) (getl_clear_bind b (CHead c (Bind b) u) c u (clear_bind b c u) (CHead d1 (Bind Abbr) u0) i H5) (CHead c2 (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t x1 H14 (CHead c2 (Bind b) x0) (csubst0_both_bind b i u0 u x0 H13 c c2 H10)))) t2 H12)))))) H11)) (subst0_gen_head (Bind b) u0 u t t2 i H9)))) H8)) H7)))))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H0: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 t2) \to (arity g c2 t2 (asucc g a1))))))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (_: (arity g (CHead c (Bind Abst) u) t a2)).(\lambda (H3: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i (CHead c (Bind Abst) u) (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 (CHead c (Bind Abst) u) t c2 t2) \to (arity g c2 t2 a2)))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i u0 c (THead (Bind Abst) u t) c2 t2)).(let H6 \def (fsubst0_gen_base c c2 (THead (Bind Abst) u t) t2 u0 i H5) in (or3_ind (land (eq C c c2) (subst0 i u0 (THead (Bind Abst) u t) t2)) (land (eq T (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2)) (arity g c2 t2 (AHead a1 a2)) (\lambda (H7: (land (eq C c c2) (subst0 i u0 (THead (Bind Abst) u t) t2))).(and_ind (eq C c c2) (subst0 i u0 (THead (Bind Abst) u t) t2) (arity g c2 t2 (AHead a1 a2)) (\lambda (H8: (eq C c c2)).(\lambda (H9: (subst0 i u0 (THead (Bind Abst) u t) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 (AHead a1 a2))) (or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)))) (arity g c t2 (AHead a1 a2)) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c t2 (AHead a1 a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind Abst) x t) (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g c x a1 (H1 d1 u0 i H4 c x (fsubst0_snd i u0 c u x H12)) t a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind Abst) x) t (fsubst0_fst (S i) u0 (CHead c (Bind Abst) u) t (CHead c (Bind Abst) x) (csubst0_snd_bind Abst i u0 u x H12 c)))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)) (arity g c t2 (AHead a1 a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) u x))).(\lambda (H12: (subst0 (s (Bind Abst) i) u0 t x)).(eq_ind_r T (THead (Bind Abst) u x) (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g c u a1 H0 x a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind Abst) u) x (fsubst0_snd (S i) u0 (CHead c (Bind Abst) u) t x H12))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (arity g c t2 (AHead a1 a2)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Bind Abst) i) u0 t x1)).(eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t0: T).(arity g c t0 (AHead a1 a2))) (arity_head g c x0 a1 (H1 d1 u0 i H4 c x0 (fsubst0_snd i u0 c u x0 H12)) x1 a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c (Bind Abst) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind Abst) u) t x1 H13 (CHead c (Bind Abst) x0) (csubst0_snd_bind Abst i u0 u x0 H12 c)))) t2 H11)))))) H10)) (subst0_gen_head (Bind Abst) u0 u t t2 i H9)) c2 H8))) H7)) (\lambda (H7: (land (eq T (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2))).(and_ind (eq T (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 (AHead a1 a2)) (\lambda (H8: (eq T (THead (Bind Abst) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(eq_ind T (THead (Bind Abst) u t) (\lambda (t0: T).(arity g c2 t0 (AHead a1 a2))) (arity_head g c2 u a1 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c u c2 H9)) t a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind Abst) u) t (fsubst0_fst (S i) u0 (CHead c (Bind Abst) u) t (CHead c2 (Bind Abst) u) (csubst0_fst_bind Abst i c c2 u0 H9 u)))) t2 H8))) H7)) (\lambda (H7: (land (subst0 i u0 (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2))).(and_ind (subst0 i u0 (THead (Bind Abst) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 (AHead a1 a2)) (\lambda (H8: (subst0 i u0 (THead (Bind Abst) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)))) (arity g c2 t2 (AHead a1 a2)) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Bind Abst) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 (AHead a1 a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind Abst) x t) (\lambda (t0: T).(arity g c2 t0 (AHead a1 a2))) (arity_head g c2 x a1 (H1 d1 u0 i H4 c2 x (fsubst0_both i u0 c u x H12 c2 H9)) t a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind Abst) x) t (fsubst0_fst (S i) u0 (CHead c (Bind Abst) u) t (CHead c2 (Bind Abst) x) (csubst0_both_bind Abst i u0 u x H12 c c2 H9)))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Bind Abst) u t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3)) (arity g c2 t2 (AHead a1 a2)) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) u x))).(\lambda (H12: (subst0 (s (Bind Abst) i) u0 t x)).(eq_ind_r T (THead (Bind Abst) u x) (\lambda (t0: T).(arity g c2 t0 (AHead a1 a2))) (arity_head g c2 u a1 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c u c2 H9)) x a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind Abst) u) x (fsubst0_both (S i) u0 (CHead c (Bind Abst) u) t x H12 (CHead c2 (Bind Abst) u) (csubst0_fst_bind Abst i c c2 u0 H9 u)))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u0 t t3))) (arity g c2 t2 (AHead a1 a2)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Bind Abst) i) u0 t x1)).(eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t0: T).(arity g c2 t0 (AHead a1 a2))) (arity_head g c2 x0 a1 (H1 d1 u0 i H4 c2 x0 (fsubst0_both i u0 c u x0 H12 c2 H9)) x1 a2 (H3 d1 u0 (S i) (getl_clear_bind Abst (CHead c (Bind Abst) u) c u (clear_bind Abst c u) (CHead d1 (Bind Abbr) u0) i H4) (CHead c2 (Bind Abst) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind Abst) u) t x1 H13 (CHead c2 (Bind Abst) x0) (csubst0_both_bind Abst i u0 u x0 H12 c c2 H9)))) t2 H11)))))) H10)) (subst0_gen_head (Bind Abst) u0 u t t2 i H8)))) H7)) H6)))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (H0: (arity g c u a1)).(\lambda (H1: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 t2) \to (arity g c2 t2 a1)))))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (H2: (arity g c t (AHead a1 a2))).(\lambda (H3: ((\forall (d1: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 t2) \to (arity g c2 t2 (AHead a1 a2))))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i u0 c (THead (Flat Appl) u t) c2 t2)).(let H6 \def (fsubst0_gen_base c c2 (THead (Flat Appl) u t) t2 u0 i H5) in (or3_ind (land (eq C c c2) (subst0 i u0 (THead (Flat Appl) u t) t2)) (land (eq T (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2)) (arity g c2 t2 a2) (\lambda (H7: (land (eq C c c2) (subst0 i u0 (THead (Flat Appl) u t) t2))).(and_ind (eq C c c2) (subst0 i u0 (THead (Flat Appl) u t) t2) (arity g c2 t2 a2) (\lambda (H8: (eq C c c2)).(\lambda (H9: (subst0 i u0 (THead (Flat Appl) u t) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) (or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3)))) (arity g c t2 a2) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat Appl) x t) (\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c x a1 (H1 d1 u0 i H4 c x (fsubst0_snd i u0 c u x H12)) t a2 H2) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3)) (arity g c t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) u x))).(\lambda (H12: (subst0 (s (Flat Appl) i) u0 t x)).(eq_ind_r T (THead (Flat Appl) u x) (\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c u a1 H0 x a2 (H3 d1 u0 i H4 c x (fsubst0_snd i u0 c t x H12))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3))) (arity g c t2 a2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Flat Appl) i) u0 t x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t0: T).(arity g c t0 a2)) (arity_appl g c x0 a1 (H1 d1 u0 i H4 c x0 (fsubst0_snd i u0 c u x0 H12)) x1 a2 (H3 d1 u0 i H4 c x1 (fsubst0_snd i u0 c t x1 H13))) t2 H11)))))) H10)) (subst0_gen_head (Flat Appl) u0 u t t2 i H9)) c2 H8))) H7)) (\lambda (H7: (land (eq T (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2))).(and_ind (eq T (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 a2) (\lambda (H8: (eq T (THead (Flat Appl) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(eq_ind T (THead (Flat Appl) u t) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_appl g c2 u a1 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c u c2 H9)) t a2 (H3 d1 u0 i H4 c2 t (fsubst0_fst i u0 c t c2 H9))) t2 H8))) H7)) (\lambda (H7: (land (subst0 i u0 (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2))).(and_ind (subst0 i u0 (THead (Flat Appl) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 a2) (\lambda (H8: (subst0 i u0 (THead (Flat Appl) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3)))) (arity g c2 t2 a2) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Flat Appl) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat Appl) x t) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_appl g c2 x a1 (H1 d1 u0 i H4 c2 x (fsubst0_both i u0 c u x H12 c2 H9)) t a2 (H3 d1 u0 i H4 c2 t (fsubst0_fst i u0 c t c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3)) (arity g c2 t2 a2) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) u x))).(\lambda (H12: (subst0 (s (Flat Appl) i) u0 t x)).(eq_ind_r T (THead (Flat Appl) u x) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_appl g c2 u a1 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c u c2 H9)) x a2 (H3 d1 u0 i H4 c2 x (fsubst0_both i u0 c t x H12 c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u0 t t3))) (arity g c2 t2 a2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Flat Appl) i) u0 t x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t0: T).(arity g c2 t0 a2)) (arity_appl g c2 x0 a1 (H1 d1 u0 i H4 c2 x0 (fsubst0_both i u0 c u x0 H12 c2 H9)) x1 a2 (H3 d1 u0 i H4 c2 x1 (fsubst0_both i u0 c t x1 H13 c2 H9))) t2 H11)))))) H10)) (subst0_gen_head (Flat Appl) u0 u t t2 i H8)))) H7)) H6)))))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (H0: (arity g c u (asucc g a0))).(\lambda (H1: ((\forall (d1: C).(\forall (u0: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u0)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 t2) \to (arity g c2 t2 (asucc g a0))))))))))).(\lambda (t: T).(\lambda (H2: (arity g c t a0)).(\lambda (H3: ((\forall (d1: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 t2) \to (arity g c2 t2 a0)))))))))).(\lambda (d1: C).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H4: (getl i c (CHead d1 (Bind Abbr) u0))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H5: (fsubst0 i u0 c (THead (Flat Cast) u t) c2 t2)).(let H6 \def (fsubst0_gen_base c c2 (THead (Flat Cast) u t) t2 u0 i H5) in (or3_ind (land (eq C c c2) (subst0 i u0 (THead (Flat Cast) u t) t2)) (land (eq T (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2)) (land (subst0 i u0 (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2)) (arity g c2 t2 a0) (\lambda (H7: (land (eq C c c2) (subst0 i u0 (THead (Flat Cast) u t) t2))).(and_ind (eq C c c2) (subst0 i u0 (THead (Flat Cast) u t) t2) (arity g c2 t2 a0) (\lambda (H8: (eq C c c2)).(\lambda (H9: (subst0 i u0 (THead (Flat Cast) u t) t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a0)) (or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3)))) (arity g c t2 a0) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat Cast) x t) (\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c x a0 (H1 d1 u0 i H4 c x (fsubst0_snd i u0 c u x H12)) t H2) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3)) (arity g c t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) u x))).(\lambda (H12: (subst0 (s (Flat Cast) i) u0 t x)).(eq_ind_r T (THead (Flat Cast) u x) (\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c u a0 H0 x (H3 d1 u0 i H4 c x (fsubst0_snd i u0 c t x H12))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Cast) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3))) (arity g c t2 a0) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Flat Cast) i) u0 t x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t0: T).(arity g c t0 a0)) (arity_cast g c x0 a0 (H1 d1 u0 i H4 c x0 (fsubst0_snd i u0 c u x0 H12)) x1 (H3 d1 u0 i H4 c x1 (fsubst0_snd i u0 c t x1 H13))) t2 H11)))))) H10)) (subst0_gen_head (Flat Cast) u0 u t t2 i H9)) c2 H8))) H7)) (\lambda (H7: (land (eq T (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2))).(and_ind (eq T (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 a0) (\lambda (H8: (eq T (THead (Flat Cast) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(eq_ind T (THead (Flat Cast) u t) (\lambda (t0: T).(arity g c2 t0 a0)) (arity_cast g c2 u a0 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c u c2 H9)) t (H3 d1 u0 i H4 c2 t (fsubst0_fst i u0 c t c2 H9))) t2 H8))) H7)) (\lambda (H7: (land (subst0 i u0 (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2))).(and_ind (subst0 i u0 (THead (Flat Cast) u t) t2) (csubst0 i u0 c c2) (arity g c2 t2 a0) (\lambda (H8: (subst0 i u0 (THead (Flat Cast) u t) t2)).(\lambda (H9: (csubst0 i u0 c c2)).(or3_ind (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3)))) (arity g c2 t2 a0) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t2 (THead (Flat Cast) u2 t))) (\lambda (u2: T).(subst0 i u0 u u2)) (arity g c2 t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) x t))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Flat Cast) x t) (\lambda (t0: T).(arity g c2 t0 a0)) (arity_cast g c2 x a0 (H1 d1 u0 i H4 c2 x (fsubst0_both i u0 c u x H12 c2 H9)) t (H3 d1 u0 i H4 c2 t (fsubst0_fst i u0 c t c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) u0 t t2)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead (Flat Cast) u t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3)) (arity g c2 t2 a0) (\lambda (x: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) u x))).(\lambda (H12: (subst0 (s (Flat Cast) i) u0 t x)).(eq_ind_r T (THead (Flat Cast) u x) (\lambda (t0: T).(arity g c2 t0 a0)) (arity_cast g c2 u a0 (H1 d1 u0 i H4 c2 u (fsubst0_fst i u0 c u c2 H9)) x (H3 d1 u0 i H4 c2 x (fsubst0_both i u0 c t x H12 c2 H9))) t2 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Cast) i) u0 t t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u0 t t3))) (arity g c2 t2 a0) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Flat Cast) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Flat Cast) i) u0 t x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t0: T).(arity g c2 t0 a0)) (arity_cast g c2 x0 a0 (H1 d1 u0 i H4 c2 x0 (fsubst0_both i u0 c u x0 H12 c2 H9)) x1 (H3 d1 u0 i H4 c2 x1 (fsubst0_both i u0 c t x1 H13 c2 H9))) t2 H11)))))) H10)) (subst0_gen_head (Flat Cast) u0 u t t2 i H8)))) H7)) H6))))))))))))))))) (\lambda (c: C).(\lambda (t: T).(\lambda (a1: A).(\lambda (_: (arity g c t a1)).(\lambda (H1: ((\forall (d1: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t c2 t2) \to (arity g c2 t2 a1)))))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (d1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H3: (getl i c (CHead d1 (Bind Abbr) u))).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i u c t c2 t2)).(let H5 \def (fsubst0_gen_base c c2 t t2 u i H4) in (or3_ind (land (eq C c c2) (subst0 i u t t2)) (land (eq T t t2) (csubst0 i u c c2)) (land (subst0 i u t t2) (csubst0 i u c c2)) (arity g c2 t2 a2) (\lambda (H6: (land (eq C c c2) (subst0 i u t t2))).(and_ind (eq C c c2) (subst0 i u t t2) (arity g c2 t2 a2) (\lambda (H7: (eq C c c2)).(\lambda (H8: (subst0 i u t t2)).(eq_ind C c (\lambda (c0: C).(arity g c0 t2 a2)) (arity_repl g c t2 a1 (H1 d1 u i H3 c t2 (fsubst0_snd i u c t t2 H8)) a2 H2) c2 H7))) H6)) (\lambda (H6: (land (eq T t t2) (csubst0 i u c c2))).(and_ind (eq T t t2) (csubst0 i u c c2) (arity g c2 t2 a2) (\lambda (H7: (eq T t t2)).(\lambda (H8: (csubst0 i u c c2)).(eq_ind T t (\lambda (t0: T).(arity g c2 t0 a2)) (arity_repl g c2 t a1 (H1 d1 u i H3 c2 t (fsubst0_fst i u c t c2 H8)) a2 H2) t2 H7))) H6)) (\lambda (H6: (land (subst0 i u t t2) (csubst0 i u c c2))).(and_ind (subst0 i u t t2) (csubst0 i u c c2) (arity g c2 t2 a2) (\lambda (H7: (subst0 i u t t2)).(\lambda (H8: (csubst0 i u c c2)).(arity_repl g c2 t2 a1 (H1 d1 u i H3 c2 t2 (fsubst0_both i u c t t2 H7 c2 H8)) a2 H2))) H6)) H5)))))))))))))))) c1 t1 a H))))). theorem arity_subst0: \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (a: A).((arity g c t1 a) \to (\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d (Bind Abbr) u)) \to (\forall (t2: T).((subst0 i u t1 t2) \to (arity g c t2 a))))))))))) @@ -1792,27 +1792,27 @@ inductive pr0: T \to (T \to Prop) \def theorem pr0_gen_sort: \forall (x: T).(\forall (n: nat).((pr0 (TSort n) x) \to (eq T x (TSort n)))) \def - \lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr0 (TSort n) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (TSort n)) \to ((eq T t0 x) \to (eq T x (TSort n))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (TSort n))).(\lambda (H1: (eq T t x)).(eq_ind T (TSort n) (\lambda (t0: T).((eq T t0 x) \to (eq T x (TSort n)))) (\lambda (H2: (eq T (TSort n) x)).(eq_ind T (TSort n) (\lambda (t0: T).(eq T t0 (TSort n))) (refl_equal T (TSort n)) x H2)) t (sym_eq T t (TSort n) H0) H1))) | (pr0_comp u1 u2 H0 t1 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u1 t1) (TSort n))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (eq_ind T (THead k u1 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H2) in (False_ind ((eq T (THead k u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t1 t2) \to (eq T x (TSort n))))) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t1 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t1)) (TSort n))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t1)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) \to ((pr0 t1 t2) \to (eq T x (TSort n))))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u1 u2 H2 t1 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (TSort n))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t1 t2) \to (eq T x (TSort n))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u1 u2 H0 t1 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u1 t1) (TSort n))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u1 u2) \to ((pr0 t1 t2) \to ((subst0 O u2 t2 w) \to (eq T x (TSort n)))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t1 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t1)) (TSort n))).(\lambda (H3: (eq T t2 x)).((let H4 \def (eq_ind T (THead (Bind b) u (lift (S O) O t1)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H2) in (False_ind ((eq T t2 x) \to ((not (eq B b Abst)) \to ((pr0 t1 t2) \to (eq T x (TSort n))))) H4)) H3 H0 H1))) | (pr0_epsilon t1 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t1) (TSort n))).(\lambda (H2: (eq T t2 x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H1) in (False_ind ((eq T t2 x) \to ((pr0 t1 t2) \to (eq T x (TSort n)))) H3)) H2 H0)))]) in (H0 (refl_equal T (TSort n)) (refl_equal T x))))). + \lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr0 (TSort n) x)).(let H0 \def (match H return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (TSort n)) \to ((eq T t0 x) \to (eq T x (TSort n))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (TSort n))).(\lambda (H1: (eq T t x)).(eq_ind T (TSort n) (\lambda (t0: T).((eq T t0 x) \to (eq T x (TSort n)))) (\lambda (H2: (eq T (TSort n) x)).(eq_ind T (TSort n) (\lambda (t0: T).(eq T t0 (TSort n))) (refl_equal T (TSort n)) x H2)) t (sym_eq T t (TSort n) H0) H1))) | (pr0_comp u1 u2 H0 t1 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u1 t1) (TSort n))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (eq_ind T (THead k u1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H2) in (False_ind ((eq T (THead k u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t1 t2) \to (eq T x (TSort n))))) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t1 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t1)) (TSort n))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t1)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) \to ((pr0 t1 t2) \to (eq T x (TSort n))))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u1 u2 H2 t1 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (TSort n))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t1 t2) \to (eq T x (TSort n))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u1 u2 H0 t1 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u1 t1) (TSort n))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u1 u2) \to ((pr0 t1 t2) \to ((subst0 O u2 t2 w) \to (eq T x (TSort n)))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t1 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t1)) (TSort n))).(\lambda (H3: (eq T t2 x)).((let H4 \def (eq_ind T (THead (Bind b) u (lift (S O) O t1)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H2) in (False_ind ((eq T t2 x) \to ((not (eq B b Abst)) \to ((pr0 t1 t2) \to (eq T x (TSort n))))) H4)) H3 H0 H1))) | (pr0_epsilon t1 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t1) (TSort n))).(\lambda (H2: (eq T t2 x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H1) in (False_ind ((eq T t2 x) \to ((pr0 t1 t2) \to (eq T x (TSort n)))) H3)) H2 H0)))]) in (H0 (refl_equal T (TSort n)) (refl_equal T x))))). theorem pr0_gen_lref: \forall (x: T).(\forall (n: nat).((pr0 (TLRef n) x) \to (eq T x (TLRef n)))) \def - \lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr0 (TLRef n) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n)) \to ((eq T t0 x) \to (eq T x (TLRef n))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (TLRef n))).(\lambda (H1: (eq T t x)).(eq_ind T (TLRef n) (\lambda (t0: T).((eq T t0 x) \to (eq T x (TLRef n)))) (\lambda (H2: (eq T (TLRef n) x)).(eq_ind T (TLRef n) (\lambda (t0: T).(eq T t0 (TLRef n))) (refl_equal T (TLRef n)) x H2)) t (sym_eq T t (TLRef n) H0) H1))) | (pr0_comp u1 u2 H0 t1 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u1 t1) (TLRef n))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (eq_ind T (THead k u1 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H2) in (False_ind ((eq T (THead k u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t1 t2) \to (eq T x (TLRef n))))) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t1 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t1)) (TLRef n))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t1)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) \to ((pr0 t1 t2) \to (eq T x (TLRef n))))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u1 u2 H2 t1 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (TLRef n))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t1 t2) \to (eq T x (TLRef n))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u1 u2 H0 t1 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u1 t1) (TLRef n))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u1 u2) \to ((pr0 t1 t2) \to ((subst0 O u2 t2 w) \to (eq T x (TLRef n)))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t1 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t1)) (TLRef n))).(\lambda (H3: (eq T t2 x)).((let H4 \def (eq_ind T (THead (Bind b) u (lift (S O) O t1)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H2) in (False_ind ((eq T t2 x) \to ((not (eq B b Abst)) \to ((pr0 t1 t2) \to (eq T x (TLRef n))))) H4)) H3 H0 H1))) | (pr0_epsilon t1 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t1) (TLRef n))).(\lambda (H2: (eq T t2 x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind ((eq T t2 x) \to ((pr0 t1 t2) \to (eq T x (TLRef n)))) H3)) H2 H0)))]) in (H0 (refl_equal T (TLRef n)) (refl_equal T x))))). + \lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr0 (TLRef n) x)).(let H0 \def (match H return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (TLRef n)) \to ((eq T t0 x) \to (eq T x (TLRef n))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (TLRef n))).(\lambda (H1: (eq T t x)).(eq_ind T (TLRef n) (\lambda (t0: T).((eq T t0 x) \to (eq T x (TLRef n)))) (\lambda (H2: (eq T (TLRef n) x)).(eq_ind T (TLRef n) (\lambda (t0: T).(eq T t0 (TLRef n))) (refl_equal T (TLRef n)) x H2)) t (sym_eq T t (TLRef n) H0) H1))) | (pr0_comp u1 u2 H0 t1 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u1 t1) (TLRef n))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (eq_ind T (THead k u1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H2) in (False_ind ((eq T (THead k u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t1 t2) \to (eq T x (TLRef n))))) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t1 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t1)) (TLRef n))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t1)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) \to ((pr0 t1 t2) \to (eq T x (TLRef n))))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u1 u2 H2 t1 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (TLRef n))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t1 t2) \to (eq T x (TLRef n))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u1 u2 H0 t1 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u1 t1) (TLRef n))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u1 u2) \to ((pr0 t1 t2) \to ((subst0 O u2 t2 w) \to (eq T x (TLRef n)))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t1 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t1)) (TLRef n))).(\lambda (H3: (eq T t2 x)).((let H4 \def (eq_ind T (THead (Bind b) u (lift (S O) O t1)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H2) in (False_ind ((eq T t2 x) \to ((not (eq B b Abst)) \to ((pr0 t1 t2) \to (eq T x (TLRef n))))) H4)) H3 H0 H1))) | (pr0_epsilon t1 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t1) (TLRef n))).(\lambda (H2: (eq T t2 x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind ((eq T t2 x) \to ((pr0 t1 t2) \to (eq T x (TLRef n)))) H3)) H2 H0)))]) in (H0 (refl_equal T (TLRef n)) (refl_equal T x))))). theorem pr0_gen_abst: \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Bind Abst) u1 t1) x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))))) \def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead (Bind Abst) u1 t1) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Bind Abst) u1 t1)) \to ((eq T t0 x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Bind Abst) u1 t1))).(\lambda (H1: (eq T t x)).(eq_ind T (THead (Bind Abst) u1 t1) (\lambda (t0: T).((eq T t0 x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))))) (\lambda (H2: (eq T (THead (Bind Abst) u1 t1) x)).(eq_ind T (THead (Bind Abst) u1 t1) (\lambda (t0: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind Abst) u1 t1) (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 (refl_equal T (THead (Bind Abst) u1 t1)) (pr0_refl u1) (pr0_refl t1)) x H2)) t (sym_eq T t (THead (Bind Abst) u1 t1) H0) H1))) | (pr0_comp u0 u2 H0 t0 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u0 t0) (THead (Bind Abst) u1 t1))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Bind Abst) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) (THead (Bind Abst) u1 t1) H2) in ((let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u0 t0) (THead (Bind Abst) u1 t1) H2) in (eq_ind K (Bind Abst) (\lambda (k0: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k0 u2 t2) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))))))))) (\lambda (H7: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Bind Abst) u2 t2) x) \to ((pr0 t u2) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))))))) (\lambda (H8: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Bind Abst) u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))))))) (\lambda (H9: (eq T (THead (Bind Abst) u2 t2) x)).(eq_ind T (THead (Bind Abst) u2 t2) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t1 t2) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))))) (\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t1 t2)).(ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abst) u2 t2) (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T (THead (Bind Abst) u2 t2)) H10 H11))) x H9)) t0 (sym_eq T t0 t1 H8))) u0 (sym_eq T u0 u1 H7))) k (sym_eq K k (Bind Abst) H6))) H5)) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Bind Abst) u1 t1))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u1 t1) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u0 u2 H2 t0 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Bind Abst) u1 t1))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u1 t1) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u0 t0) (THead (Bind Abst) u1 t1))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u0 t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Abst) u1 t1) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t0 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abst) u1 t1))).(\lambda (H3: (eq T t2 x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abst) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abst) u1 t1) H2) in ((let H6 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abst) u1 t1) H2) in (eq_ind B Abst (\lambda (b0: B).((eq T u u1) \to ((eq T (lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not (eq B b0 Abst)) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))))))))) (\lambda (H7: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T (lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not (eq B Abst Abst)) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))))))) (\lambda (H8: (eq T (lift (S O) O t0) t1)).(eq_ind T (lift (S O) O t0) (\lambda (t: T).((eq T t2 x) \to ((not (eq B Abst Abst)) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))))))) (\lambda (H9: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((not (eq B Abst Abst)) \to ((pr0 t0 t) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (lift (S O) O t0) t3))))))) (\lambda (H10: (not (eq B Abst Abst))).(\lambda (_: (pr0 t0 x)).(False_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (lift (S O) O t0) t3)))) (H10 (refl_equal B Abst))))) t2 (sym_eq T t2 x H9))) t1 H8)) u (sym_eq T u u1 H7))) b (sym_eq B b Abst H6))) H5)) H4)) H3 H0 H1))) | (pr0_epsilon t0 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t0) (THead (Bind Abst) u1 t1))).(\lambda (H2: (eq T t2 x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u1 t1) H1) in (False_ind ((eq T t2 x) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))))) H3)) H2 H0)))]) in (H0 (refl_equal T (THead (Bind Abst) u1 t1)) (refl_equal T x)))))). + \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead (Bind Abst) u1 t1) x)).(let H0 \def (match H return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (THead (Bind Abst) u1 t1)) \to ((eq T t0 x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Bind Abst) u1 t1))).(\lambda (H1: (eq T t x)).(eq_ind T (THead (Bind Abst) u1 t1) (\lambda (t0: T).((eq T t0 x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))))) (\lambda (H2: (eq T (THead (Bind Abst) u1 t1) x)).(eq_ind T (THead (Bind Abst) u1 t1) (\lambda (t0: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind Abst) u1 t1) (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 (refl_equal T (THead (Bind Abst) u1 t1)) (pr0_refl u1) (pr0_refl t1)) x H2)) t (sym_eq T t (THead (Bind Abst) u1 t1) H0) H1))) | (pr0_comp u0 u2 H0 t0 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u0 t0) (THead (Bind Abst) u1 t1))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Bind Abst) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) (THead (Bind Abst) u1 t1) H2) in ((let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u0 t0) (THead (Bind Abst) u1 t1) H2) in (eq_ind K (Bind Abst) (\lambda (k0: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k0 u2 t2) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))))))))) (\lambda (H7: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Bind Abst) u2 t2) x) \to ((pr0 t u2) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))))))) (\lambda (H8: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Bind Abst) u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))))))) (\lambda (H9: (eq T (THead (Bind Abst) u2 t2) x)).(eq_ind T (THead (Bind Abst) u2 t2) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t1 t2) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))))) (\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t1 t2)).(ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abst) u2 t2) (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T (THead (Bind Abst) u2 t2)) H10 H11))) x H9)) t0 (sym_eq T t0 t1 H8))) u0 (sym_eq T u0 u1 H7))) k (sym_eq K k (Bind Abst) H6))) H5)) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Bind Abst) u1 t1))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u1 t1) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u0 u2 H2 t0 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Bind Abst) u1 t1))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u1 t1) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u0 t0) (THead (Bind Abst) u1 t1))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u0 t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Abst) u1 t1) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t0 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abst) u1 t1))).(\lambda (H3: (eq T t2 x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abst) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abst) u1 t1) H2) in ((let H6 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abst) u1 t1) H2) in (eq_ind B Abst (\lambda (b0: B).((eq T u u1) \to ((eq T (lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not (eq B b0 Abst)) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))))))))) (\lambda (H7: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T (lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not (eq B Abst Abst)) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))))))))) (\lambda (H8: (eq T (lift (S O) O t0) t1)).(eq_ind T (lift (S O) O t0) (\lambda (t: T).((eq T t2 x) \to ((not (eq B Abst Abst)) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))))))) (\lambda (H9: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((not (eq B Abst Abst)) \to ((pr0 t0 t) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (lift (S O) O t0) t3))))))) (\lambda (H10: (not (eq B Abst Abst))).(\lambda (_: (pr0 t0 x)).(False_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (lift (S O) O t0) t3)))) (H10 (refl_equal B Abst))))) t2 (sym_eq T t2 x H9))) t1 H8)) u (sym_eq T u u1 H7))) b (sym_eq B b Abst H6))) H5)) H4)) H3 H0 H1))) | (pr0_epsilon t0 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t0) (THead (Bind Abst) u1 t1))).(\lambda (H2: (eq T t2 x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u1 t1) H1) in (False_ind ((eq T t2 x) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))))) H3)) H2 H0)))]) in (H0 (refl_equal T (THead (Bind Abst) u1 t1)) (refl_equal T x)))))). theorem pr0_gen_appl: \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Flat Appl) u1 t1) x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))))))) \def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead (Flat Appl) u1 t1) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Appl) u1 t1)) \to ((eq T t0 x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Flat Appl) u1 t1))).(\lambda (H1: (eq T t x)).(eq_ind T (THead (Flat Appl) u1 t1) (\lambda (t0: T).((eq T t0 x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2))))))))))) (\lambda (H2: (eq T (THead (Flat Appl) u1 t1) x)).(eq_ind T (THead (Flat Appl) u1 t1) (\lambda (t0: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T t0 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Appl) u1 t1) (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Appl) u1 t1) (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T (THead (Flat Appl) u1 t1) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Appl) u1 t1) (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 (refl_equal T (THead (Flat Appl) u1 t1)) (pr0_refl u1) (pr0_refl t1))) x H2)) t (sym_eq T t (THead (Flat Appl) u1 t1) H0) H1))) | (pr0_comp u0 u2 H0 t0 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u0 t0) (THead (Flat Appl) u1 t1))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Flat Appl) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) (THead (Flat Appl) u1 t1) H2) in ((let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u0 t0) (THead (Flat Appl) u1 t1) H2) in (eq_ind K (Flat Appl) (\lambda (k0: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k0 u2 t2) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))))))))) (\lambda (H7: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Flat Appl) u2 t2) x) \to ((pr0 t u2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))))) (\lambda (H8: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Flat Appl) u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))))))) (\lambda (H9: (eq T (THead (Flat Appl) u2 t2) x)).(eq_ind T (THead (Flat Appl) u2 t2) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t1 t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))) (\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t1 t2)).(or3_intro0 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Flat Appl) u2 t2) (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Flat Appl) u2 t2) (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) u2 t2) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Flat Appl) u2 t2) (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T (THead (Flat Appl) u2 t2)) H10 H11)))) x H9)) t0 (sym_eq T t0 t1 H8))) u0 (sym_eq T u0 u1 H7))) k (sym_eq K k (Flat Appl) H6))) H5)) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) u1 t1))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow (THead (Bind Abst) u t0) | (TLRef _) \Rightarrow (THead (Bind Abst) u t0) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) u1 t1) H2) in (eq_ind T u1 (\lambda (t: T).((eq T (THead (Bind Abst) u t0) t1) \to ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 t v2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T x (THead (Bind b) v3 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))))) (\lambda (H6: (eq T (THead (Bind Abst) u t0) t1)).(eq_ind T (THead (Bind Abst) u t0) (\lambda (t: T).((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 u1 v2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T x (THead (Bind b) v3 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))))))) (\lambda (H7: (eq T (THead (Bind Abbr) v2 t2) x)).(eq_ind T (THead (Bind Abbr) v2 t2) (\lambda (t: T).((pr0 u1 v2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (THead (Bind Abst) u t0) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T t (THead (Bind b) v3 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))) (\lambda (H8: (pr0 u1 v2)).(\lambda (H9: (pr0 t0 t2)).(or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (THead (Bind Abst) u t0) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Bind b) v3 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))) u t0 v2 t2 (refl_equal T (THead (Bind Abst) u t0)) (refl_equal T (THead (Bind Abbr) v2 t2)) H8 H9)))) x H7)) t1 H6)) v1 (sym_eq T v1 u1 H5))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u0 u2 H2 t0 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Flat Appl) u1 t1))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow (THead (Bind b) u0 t0) | (TLRef _) \Rightarrow (THead (Bind b) u0 t0) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Flat Appl) u1 t1) H4) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Flat Appl) u1 t1) H4) in (eq_ind T u1 (\lambda (t: T).((eq T (THead (Bind b) u0 t0) t1) \to ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 t v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T x (THead (Bind b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))))))) (\lambda (H8: (eq T (THead (Bind b) u0 t0) t1)).(eq_ind T (THead (Bind b) u0 t0) (\lambda (t: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 u1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T x (THead (Bind b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))))))))) (\lambda (H9: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).(eq_ind T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 u1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 (THead (Bind b) u0 t0) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T t (THead (Bind b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))))) (\lambda (H10: (not (eq B b Abst))).(\lambda (H11: (pr0 u1 v2)).(\lambda (H12: (pr0 u0 u2)).(\lambda (H13: (pr0 t0 t2)).(or3_intro2 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 (THead (Bind b) u0 t0) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (ex6_6_intro B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))) b u0 t0 v2 u2 t2 H10 (refl_equal T (THead (Bind b) u0 t0)) (refl_equal T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2))) H11 H12 H13)))))) x H9)) t1 H8)) v1 (sym_eq T v1 u1 H7))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u0 t0) (THead (Flat Appl) u1 t1))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u0 t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u1 t1) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t0 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Flat Appl) u1 t1))).(\lambda (H3: (eq T t2 x)).((let H4 \def (eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u1 t1) H2) in (False_ind ((eq T t2 x) \to ((not (eq B b Abst)) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b0) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))) H4)) H3 H0 H1))) | (pr0_epsilon t0 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t0) (THead (Flat Appl) u1 t1))).(\lambda (H2: (eq T t2 x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) u1 t1) H1) in (False_ind ((eq T t2 x) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))))) H3)) H2 H0)))]) in (H0 (refl_equal T (THead (Flat Appl) u1 t1)) (refl_equal T x)))))). + \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead (Flat Appl) u1 t1) x)).(let H0 \def (match H return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (THead (Flat Appl) u1 t1)) \to ((eq T t0 x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Flat Appl) u1 t1))).(\lambda (H1: (eq T t x)).(eq_ind T (THead (Flat Appl) u1 t1) (\lambda (t0: T).((eq T t0 x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2))))))))))) (\lambda (H2: (eq T (THead (Flat Appl) u1 t1) x)).(eq_ind T (THead (Flat Appl) u1 t1) (\lambda (t0: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T t0 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Appl) u1 t1) (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Appl) u1 t1) (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T (THead (Flat Appl) u1 t1) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Appl) u1 t1) (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 (refl_equal T (THead (Flat Appl) u1 t1)) (pr0_refl u1) (pr0_refl t1))) x H2)) t (sym_eq T t (THead (Flat Appl) u1 t1) H0) H1))) | (pr0_comp u0 u2 H0 t0 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u0 t0) (THead (Flat Appl) u1 t1))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Flat Appl) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) (THead (Flat Appl) u1 t1) H2) in ((let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u0 t0) (THead (Flat Appl) u1 t1) H2) in (eq_ind K (Flat Appl) (\lambda (k0: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k0 u2 t2) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))))))))) (\lambda (H7: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Flat Appl) u2 t2) x) \to ((pr0 t u2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))))) (\lambda (H8: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Flat Appl) u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))))))) (\lambda (H9: (eq T (THead (Flat Appl) u2 t2) x)).(eq_ind T (THead (Flat Appl) u2 t2) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t1 t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))) (\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t1 t2)).(or3_intro0 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Flat Appl) u2 t2) (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Flat Appl) u2 t2) (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) u2 t2) (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Flat Appl) u2 t2) (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T (THead (Flat Appl) u2 t2)) H10 H11)))) x H9)) t0 (sym_eq T t0 t1 H8))) u0 (sym_eq T u0 u1 H7))) k (sym_eq K k (Flat Appl) H6))) H5)) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) u1 t1))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead (Bind Abst) u t0) | (TLRef _) \Rightarrow (THead (Bind Abst) u t0) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) u1 t1) H2) in (eq_ind T u1 (\lambda (t: T).((eq T (THead (Bind Abst) u t0) t1) \to ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 t v2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T x (THead (Bind b) v3 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))))) (\lambda (H6: (eq T (THead (Bind Abst) u t0) t1)).(eq_ind T (THead (Bind Abst) u t0) (\lambda (t: T).((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 u1 v2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T x (THead (Bind b) v3 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))))))) (\lambda (H7: (eq T (THead (Bind Abbr) v2 t2) x)).(eq_ind T (THead (Bind Abbr) v2 t2) (\lambda (t: T).((pr0 u1 v2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (THead (Bind Abst) u t0) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T t (THead (Bind b) v3 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))) (\lambda (H8: (pr0 u1 v2)).(\lambda (H9: (pr0 t0 t2)).(or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (THead (Bind Abst) u t0) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Bind b) v3 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) u t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) v2 t2) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))) u t0 v2 t2 (refl_equal T (THead (Bind Abst) u t0)) (refl_equal T (THead (Bind Abbr) v2 t2)) H8 H9)))) x H7)) t1 H6)) v1 (sym_eq T v1 u1 H5))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u0 u2 H2 t0 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Flat Appl) u1 t1))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead (Bind b) u0 t0) | (TLRef _) \Rightarrow (THead (Bind b) u0 t0) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Flat Appl) u1 t1) H4) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Flat Appl) u1 t1) H4) in (eq_ind T u1 (\lambda (t: T).((eq T (THead (Bind b) u0 t0) t1) \to ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 t v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T x (THead (Bind b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))))))) (\lambda (H8: (eq T (THead (Bind b) u0 t0) t1)).(eq_ind T (THead (Bind b) u0 t0) (\lambda (t: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 u1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T x (THead (Bind b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))))))))) (\lambda (H9: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).(eq_ind T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 u1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 (THead (Bind b) u0 t0) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T t (THead (Bind b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))))) (\lambda (H10: (not (eq B b Abst))).(\lambda (H11: (pr0 u1 v2)).(\lambda (H12: (pr0 u0 u2)).(\lambda (H13: (pr0 t0 t2)).(or3_intro2 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 (THead (Bind b) u0 t0) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (ex6_6_intro B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind b) u0 t0) (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) (THead (Bind b0) v3 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v3: T).(\lambda (_: T).(pr0 y1 v3))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))) b u0 t0 v2 u2 t2 H10 (refl_equal T (THead (Bind b) u0 t0)) (refl_equal T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2))) H11 H12 H13)))))) x H9)) t1 H8)) v1 (sym_eq T v1 u1 H7))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u0 t0) (THead (Flat Appl) u1 t1))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u0 t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u1 t1) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (or3 (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u3) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u3: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u3))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t0 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Flat Appl) u1 t1))).(\lambda (H3: (eq T t2 x)).((let H4 \def (eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u1 t1) H2) in (False_ind ((eq T t2 x) \to ((not (eq B b Abst)) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b0 Abst)))))))) (\lambda (b0: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b0) y1 z1)))))))) (\lambda (b0: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b0) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))))))) H4)) H3 H0 H1))) | (pr0_epsilon t0 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t0) (THead (Flat Appl) u1 t1))).(\lambda (H2: (eq T t2 x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) u1 t1) H1) in (False_ind ((eq T t2 x) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))))))) H3)) H2 H0)))]) in (H0 (refl_equal T (THead (Flat Appl) u1 t1)) (refl_equal T x)))))). theorem pr0_gen_cast: \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Flat Cast) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 x))))) \def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead (Flat Cast) u1 t1) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Cast) u1 t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 x))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Flat Cast) u1 t1))).(\lambda (H1: (eq T t x)).(eq_ind T (THead (Flat Cast) u1 t1) (\lambda (t0: T).((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 x)))) (\lambda (H2: (eq T (THead (Flat Cast) u1 t1) x)).(eq_ind T (THead (Flat Cast) u1 t1) (\lambda (t0: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 t0))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Cast) u1 t1) (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (THead (Flat Cast) u1 t1)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Cast) u1 t1) (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 (refl_equal T (THead (Flat Cast) u1 t1)) (pr0_refl u1) (pr0_refl t1))) x H2)) t (sym_eq T t (THead (Flat Cast) u1 t1) H0) H1))) | (pr0_comp u0 u2 H0 t0 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u0 t0) (THead (Flat Cast) u1 t1))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Flat Cast) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) (THead (Flat Cast) u1 t1) H2) in ((let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u0 t0) (THead (Flat Cast) u1 t1) H2) in (eq_ind K (Flat Cast) (\lambda (k0: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k0 u2 t2) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x)))))))) (\lambda (H7: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Flat Cast) u2 t2) x) \to ((pr0 t u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x))))))) (\lambda (H8: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Flat Cast) u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x)))))) (\lambda (H9: (eq T (THead (Flat Cast) u2 t2) x)).(eq_ind T (THead (Flat Cast) u2 t2) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t1 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 t))))) (\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t1 t2)).(or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Flat Cast) u2 t2) (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (THead (Flat Cast) u2 t2)) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Flat Cast) u2 t2) (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T (THead (Flat Cast) u2 t2)) H10 H11)))) x H9)) t0 (sym_eq T t0 t1 H8))) u0 (sym_eq T u0 u1 H7))) k (sym_eq K k (Flat Cast) H6))) H5)) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Cast) u1 t1))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u1 t1) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x))))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u0 u2 H2 t0 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Flat Cast) u1 t1))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u1 t1) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u0 t0) (THead (Flat Cast) u1 t1))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u0 t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u1 t1) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x)))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t0 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Flat Cast) u1 t1))).(\lambda (H3: (eq T t2 x)).((let H4 \def (eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u1 t1) H2) in (False_ind ((eq T t2 x) \to ((not (eq B b Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x))))) H4)) H3 H0 H1))) | (pr0_epsilon t0 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t0) (THead (Flat Cast) u1 t1))).(\lambda (H2: (eq T t2 x)).((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) u t0) (THead (Flat Cast) u1 t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) u t0) (THead (Flat Cast) u1 t1) H1) in (eq_ind T u1 (\lambda (_: T).((eq T t0 t1) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x)))))) (\lambda (H5: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x))))) (\lambda (H6: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 t1 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x)))) (\lambda (H7: (pr0 t1 x)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x) H7)) t2 (sym_eq T t2 x H6))) t0 (sym_eq T t0 t1 H5))) u (sym_eq T u u1 H4))) H3)) H2 H0)))]) in (H0 (refl_equal T (THead (Flat Cast) u1 t1)) (refl_equal T x)))))). + \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead (Flat Cast) u1 t1) x)).(let H0 \def (match H return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (THead (Flat Cast) u1 t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 x))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Flat Cast) u1 t1))).(\lambda (H1: (eq T t x)).(eq_ind T (THead (Flat Cast) u1 t1) (\lambda (t0: T).((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 x)))) (\lambda (H2: (eq T (THead (Flat Cast) u1 t1) x)).(eq_ind T (THead (Flat Cast) u1 t1) (\lambda (t0: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 t0))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Cast) u1 t1) (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (THead (Flat Cast) u1 t1)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Flat Cast) u1 t1) (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 (refl_equal T (THead (Flat Cast) u1 t1)) (pr0_refl u1) (pr0_refl t1))) x H2)) t (sym_eq T t (THead (Flat Cast) u1 t1) H0) H1))) | (pr0_comp u0 u2 H0 t0 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u0 t0) (THead (Flat Cast) u1 t1))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Flat Cast) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) (THead (Flat Cast) u1 t1) H2) in ((let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u0 t0) (THead (Flat Cast) u1 t1) H2) in (eq_ind K (Flat Cast) (\lambda (k0: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k0 u2 t2) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x)))))))) (\lambda (H7: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Flat Cast) u2 t2) x) \to ((pr0 t u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x))))))) (\lambda (H8: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Flat Cast) u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x)))))) (\lambda (H9: (eq T (THead (Flat Cast) u2 t2) x)).(eq_ind T (THead (Flat Cast) u2 t2) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t1 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 t))))) (\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t1 t2)).(or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Flat Cast) u2 t2) (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (THead (Flat Cast) u2 t2)) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Flat Cast) u2 t2) (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T (THead (Flat Cast) u2 t2)) H10 H11)))) x H9)) t0 (sym_eq T t0 t1 H8))) u0 (sym_eq T u0 u1 H7))) k (sym_eq K k (Flat Cast) H6))) H5)) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Cast) u1 t1))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u1 t1) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x))))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u0 u2 H2 t0 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Flat Cast) u1 t1))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u1 t1) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u0 t0) (THead (Flat Cast) u1 t1))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u0 t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u1 t1) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x)))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t0 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Flat Cast) u1 t1))).(\lambda (H3: (eq T t2 x)).((let H4 \def (eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u1 t1) H2) in (False_ind ((eq T t2 x) \to ((not (eq B b Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x))))) H4)) H3 H0 H1))) | (pr0_epsilon t0 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t0) (THead (Flat Cast) u1 t1))).(\lambda (H2: (eq T t2 x)).((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) u t0) (THead (Flat Cast) u1 t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) u t0) (THead (Flat Cast) u1 t1) H1) in (eq_ind T u1 (\lambda (_: T).((eq T t0 t1) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x)))))) (\lambda (H5: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x))))) (\lambda (H6: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 t1 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x)))) (\lambda (H7: (pr0 t1 x)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x) H7)) t2 (sym_eq T t2 x H6))) t0 (sym_eq T t0 t1 H5))) u (sym_eq T u u1 H4))) H3)) H2 H0)))]) in (H0 (refl_equal T (THead (Flat Cast) u1 t1)) (refl_equal T x)))))). theorem pr0_lift: \forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (h: nat).(\forall (d: nat).(pr0 (lift h d t1) (lift h d t2)))))) @@ -1822,12 +1822,12 @@ theorem pr0_lift: theorem pr0_gen_abbr: \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Bind Abbr) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S O) O x)))))) \def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead (Bind Abbr) u1 t1) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Bind Abbr) u1 t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S O) O x)))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Bind Abbr) u1 t1))).(\lambda (H1: (eq T t x)).(eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (t0: T).((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S O) O x))))) (\lambda (H2: (eq T (THead (Bind Abbr) u1 t1) x)).(eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (t0: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S O) O t0)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind Abbr) u1 t1) (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S O) O (THead (Bind Abbr) u1 t1))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind Abbr) u1 t1) (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2)))))) u1 t1 (refl_equal T (THead (Bind Abbr) u1 t1)) (pr0_refl u1) (or_introl (pr0 t1 t1) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u1 y t1))) (pr0_refl t1)))) x H2)) t (sym_eq T t (THead (Bind Abbr) u1 t1) H0) H1))) | (pr0_comp u0 u2 H0 t0 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u0 t0) (THead (Bind Abbr) u1 t1))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Bind Abbr) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) (THead (Bind Abbr) u1 t1) H2) in ((let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u0 t0) (THead (Bind Abbr) u1 t1) H2) in (eq_ind K (Bind Abbr) (\lambda (k0: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k0 u2 t2) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x))))))))) (\lambda (H7: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Bind Abbr) u2 t2) x) \to ((pr0 t u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x)))))))) (\lambda (H8: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Bind Abbr) u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x))))))) (\lambda (H9: (eq T (THead (Bind Abbr) u2 t2) x)).(eq_ind T (THead (Bind Abbr) u2 t2) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t1 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O t)))))) (\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t1 t2)).(or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 t2) (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O (THead (Bind Abbr) u2 t2))) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 t2) (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3)))))) u2 t2 (refl_equal T (THead (Bind Abbr) u2 t2)) H10 (or_introl (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))) H11))))) x H9)) t0 (sym_eq T t0 t1 H8))) u0 (sym_eq T u0 u1 H7))) k (sym_eq K k (Bind Abbr) H6))) H5)) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Bind Abbr) u1 t1))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 t1) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t1 (lift (S O) O x)))))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u0 u2 H2 t0 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Bind Abbr) u1 t1))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 t1) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x)))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u0 t0) (THead (Bind Abbr) u1 t1))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u0 t0) (THead (Bind Abbr) u1 t1) H3) in ((let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u0 t0) (THead (Bind Abbr) u1 t1) H3) in (eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 t u2) \to ((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x))))))))) (\lambda (H7: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to ((subst0 O u2 t2 w) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x)))))))) (\lambda (H8: (eq T (THead (Bind Abbr) u2 w) x)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t1 t2) \to ((subst0 O u2 t2 w) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O t))))))) (\lambda (H9: (pr0 u1 u2)).(\lambda (H10: (pr0 t1 t2)).(\lambda (H11: (subst0 O u2 t2 w)).(or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O (THead (Bind Abbr) u2 w))) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3)))))) u2 w (refl_equal T (THead (Bind Abbr) u2 w)) H9 (or_intror (pr0 t1 w) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y w))) (ex_intro2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y w)) t2 H10 H11))))))) x H8)) t0 (sym_eq T t0 t1 H7))) u0 (sym_eq T u0 u1 H6))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t0 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t1))).(\lambda (H3: (eq T t2 x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t1) H2) in ((let H6 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t1) H2) in (eq_ind B Abbr (\lambda (b0: B).((eq T u u1) \to ((eq T (lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not (eq B b0 Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t1 (lift (S O) O x))))))))) (\lambda (H7: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T (lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not (eq B Abbr Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t1 (lift (S O) O x)))))))) (\lambda (H8: (eq T (lift (S O) O t0) t1)).(eq_ind T (lift (S O) O t0) (\lambda (t: T).((eq T t2 x) \to ((not (eq B Abbr Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t t3) (ex2 T (\lambda (y: T).(pr0 t y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t (lift (S O) O x))))))) (\lambda (H9: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((not (eq B Abbr Abst)) \to ((pr0 t0 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 (lift (S O) O t0) t3) (ex2 T (\lambda (y: T).(pr0 (lift (S O) O t0) y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 (lift (S O) O t0) (lift (S O) O x)))))) (\lambda (_: (not (eq B Abbr Abst))).(\lambda (H11: (pr0 t0 x)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 (lift (S O) O t0) t3) (ex2 T (\lambda (y: T).(pr0 (lift (S O) O t0) y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 (lift (S O) O t0) (lift (S O) O x)) (pr0_lift t0 x H11 (S O) O)))) t2 (sym_eq T t2 x H9))) t1 H8)) u (sym_eq T u u1 H7))) b (sym_eq B b Abbr H6))) H5)) H4)) H3 H0 H1))) | (pr0_epsilon t0 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t0) (THead (Bind Abbr) u1 t1))).(\lambda (H2: (eq T t2 x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 t1) H1) in (False_ind ((eq T t2 x) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t1 (lift (S O) O x))))) H3)) H2 H0)))]) in (H0 (refl_equal T (THead (Bind Abbr) u1 t1)) (refl_equal T x)))))). + \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead (Bind Abbr) u1 t1) x)).(let H0 \def (match H return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (THead (Bind Abbr) u1 t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S O) O x)))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Bind Abbr) u1 t1))).(\lambda (H1: (eq T t x)).(eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (t0: T).((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S O) O x))))) (\lambda (H2: (eq T (THead (Bind Abbr) u1 t1) x)).(eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (t0: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S O) O t0)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind Abbr) u1 t1) (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))))))) (pr0 t1 (lift (S O) O (THead (Bind Abbr) u1 t1))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind Abbr) u1 t1) (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2)))))) u1 t1 (refl_equal T (THead (Bind Abbr) u1 t1)) (pr0_refl u1) (or_introl (pr0 t1 t1) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u1 y t1))) (pr0_refl t1)))) x H2)) t (sym_eq T t (THead (Bind Abbr) u1 t1) H0) H1))) | (pr0_comp u0 u2 H0 t0 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u0 t0) (THead (Bind Abbr) u1 t1))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Bind Abbr) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) (THead (Bind Abbr) u1 t1) H2) in ((let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u0 t0) (THead (Bind Abbr) u1 t1) H2) in (eq_ind K (Bind Abbr) (\lambda (k0: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k0 u2 t2) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x))))))))) (\lambda (H7: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Bind Abbr) u2 t2) x) \to ((pr0 t u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x)))))))) (\lambda (H8: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Bind Abbr) u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x))))))) (\lambda (H9: (eq T (THead (Bind Abbr) u2 t2) x)).(eq_ind T (THead (Bind Abbr) u2 t2) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t1 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O t)))))) (\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t1 t2)).(or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 t2) (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O (THead (Bind Abbr) u2 t2))) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 t2) (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3)))))) u2 t2 (refl_equal T (THead (Bind Abbr) u2 t2)) H10 (or_introl (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2))) H11))))) x H9)) t0 (sym_eq T t0 t1 H8))) u0 (sym_eq T u0 u1 H7))) k (sym_eq K k (Bind Abbr) H6))) H5)) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Bind Abbr) u1 t1))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 t1) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t1 (lift (S O) O x)))))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u0 u2 H2 t0 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Bind Abbr) u1 t1))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 t1) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x)))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u0 t0) (THead (Bind Abbr) u1 t1))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u0 t0) (THead (Bind Abbr) u1 t1) H3) in ((let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u0 t0) (THead (Bind Abbr) u1 t1) H3) in (eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 t u2) \to ((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x))))))))) (\lambda (H7: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to ((subst0 O u2 t2 w) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O x)))))))) (\lambda (H8: (eq T (THead (Bind Abbr) u2 w) x)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t1 t2) \to ((subst0 O u2 t2 w) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O t))))))) (\lambda (H9: (pr0 u1 u2)).(\lambda (H10: (pr0 t1 t2)).(\lambda (H11: (subst0 O u2 t2 w)).(or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3))))))) (pr0 t1 (lift (S O) O (THead (Bind Abbr) u2 w))) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (u3: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u3 y t3)))))) u2 w (refl_equal T (THead (Bind Abbr) u2 w)) H9 (or_intror (pr0 t1 w) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y w))) (ex_intro2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y w)) t2 H10 H11))))))) x H8)) t0 (sym_eq T t0 t1 H7))) u0 (sym_eq T u0 u1 H6))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t0 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t1))).(\lambda (H3: (eq T t2 x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t1) H2) in ((let H6 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t1) H2) in (eq_ind B Abbr (\lambda (b0: B).((eq T u u1) \to ((eq T (lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not (eq B b0 Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t1 (lift (S O) O x))))))))) (\lambda (H7: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T (lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not (eq B Abbr Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t1 (lift (S O) O x)))))))) (\lambda (H8: (eq T (lift (S O) O t0) t1)).(eq_ind T (lift (S O) O t0) (\lambda (t: T).((eq T t2 x) \to ((not (eq B Abbr Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t t3) (ex2 T (\lambda (y: T).(pr0 t y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t (lift (S O) O x))))))) (\lambda (H9: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((not (eq B Abbr Abst)) \to ((pr0 t0 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 (lift (S O) O t0) t3) (ex2 T (\lambda (y: T).(pr0 (lift (S O) O t0) y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 (lift (S O) O t0) (lift (S O) O x)))))) (\lambda (_: (not (eq B Abbr Abst))).(\lambda (H11: (pr0 t0 x)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 (lift (S O) O t0) t3) (ex2 T (\lambda (y: T).(pr0 (lift (S O) O t0) y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 (lift (S O) O t0) (lift (S O) O x)) (pr0_lift t0 x H11 (S O) O)))) t2 (sym_eq T t2 x H9))) t1 H8)) u (sym_eq T u u1 H7))) b (sym_eq B b Abbr H6))) H5)) H4)) H3 H0 H1))) | (pr0_epsilon t0 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t0) (THead (Bind Abbr) u1 t1))).(\lambda (H2: (eq T t2 x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 t1) H1) in (False_ind ((eq T t2 x) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t1 (lift (S O) O x))))) H3)) H2 H0)))]) in (H0 (refl_equal T (THead (Bind Abbr) u1 t1)) (refl_equal T x)))))). theorem pr0_gen_void: \forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr0 (THead (Bind Void) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O x)))))) \def - \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead (Bind Void) u1 t1) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Bind Void) u1 t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O x)))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Bind Void) u1 t1))).(\lambda (H1: (eq T t x)).(eq_ind T (THead (Bind Void) u1 t1) (\lambda (t0: T).((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O x))))) (\lambda (H2: (eq T (THead (Bind Void) u1 t1) x)).(eq_ind T (THead (Bind Void) u1 t1) (\lambda (t0: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O t0)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind Void) u1 t1) (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O (THead (Bind Void) u1 t1))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind Void) u1 t1) (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 (refl_equal T (THead (Bind Void) u1 t1)) (pr0_refl u1) (pr0_refl t1))) x H2)) t (sym_eq T t (THead (Bind Void) u1 t1) H0) H1))) | (pr0_comp u0 u2 H0 t0 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u0 t0) (THead (Bind Void) u1 t1))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Bind Void) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) (THead (Bind Void) u1 t1) H2) in ((let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u0 t0) (THead (Bind Void) u1 t1) H2) in (eq_ind K (Bind Void) (\lambda (k0: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k0 u2 t2) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x))))))))) (\lambda (H7: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Bind Void) u2 t2) x) \to ((pr0 t u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x)))))))) (\lambda (H8: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Bind Void) u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x))))))) (\lambda (H9: (eq T (THead (Bind Void) u2 t2) x)).(eq_ind T (THead (Bind Void) u2 t2) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t1 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O t)))))) (\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t1 t2)).(or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Void) u2 t2) (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O (THead (Bind Void) u2 t2))) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Void) u2 t2) (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T (THead (Bind Void) u2 t2)) H10 H11)))) x H9)) t0 (sym_eq T t0 t1 H8))) u0 (sym_eq T u0 u1 H7))) k (sym_eq K k (Bind Void) H6))) H5)) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Bind Void) u1 t1))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Void) u1 t1) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x)))))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u0 u2 H2 t0 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Bind Void) u1 t1))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Void) u1 t1) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x)))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u0 t0) (THead (Bind Void) u1 t1))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u0 t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Void) u1 t1) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x))))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t0 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Void) u1 t1))).(\lambda (H3: (eq T t2 x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Void) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Void) u1 t1) H2) in ((let H6 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Void) u1 t1) H2) in (eq_ind B Void (\lambda (b0: B).((eq T u u1) \to ((eq T (lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not (eq B b0 Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x))))))))) (\lambda (H7: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T (lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not (eq B Void Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x)))))))) (\lambda (H8: (eq T (lift (S O) O t0) t1)).(eq_ind T (lift (S O) O t0) (\lambda (t: T).((eq T t2 x) \to ((not (eq B Void Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))) (pr0 t (lift (S O) O x))))))) (\lambda (H9: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((not (eq B Void Abst)) \to ((pr0 t0 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (lift (S O) O t0) t3)))) (pr0 (lift (S O) O t0) (lift (S O) O x)))))) (\lambda (_: (not (eq B Void Abst))).(\lambda (H11: (pr0 t0 x)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (lift (S O) O t0) t3)))) (pr0 (lift (S O) O t0) (lift (S O) O x)) (pr0_lift t0 x H11 (S O) O)))) t2 (sym_eq T t2 x H9))) t1 H8)) u (sym_eq T u u1 H7))) b (sym_eq B b Void H6))) H5)) H4)) H3 H0 H1))) | (pr0_epsilon t0 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t0) (THead (Bind Void) u1 t1))).(\lambda (H2: (eq T t2 x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Void) u1 t1) H1) in (False_ind ((eq T t2 x) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x))))) H3)) H2 H0)))]) in (H0 (refl_equal T (THead (Bind Void) u1 t1)) (refl_equal T x)))))). + \lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr0 (THead (Bind Void) u1 t1) x)).(let H0 \def (match H return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (THead (Bind Void) u1 t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O x)))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Bind Void) u1 t1))).(\lambda (H1: (eq T t x)).(eq_ind T (THead (Bind Void) u1 t1) (\lambda (t0: T).((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O x))))) (\lambda (H2: (eq T (THead (Bind Void) u1 t1) x)).(eq_ind T (THead (Bind Void) u1 t1) (\lambda (t0: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t0 (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O t0)))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind Void) u1 t1) (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2)))) (pr0 t1 (lift (S O) O (THead (Bind Void) u1 t1))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead (Bind Void) u1 t1) (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))) u1 t1 (refl_equal T (THead (Bind Void) u1 t1)) (pr0_refl u1) (pr0_refl t1))) x H2)) t (sym_eq T t (THead (Bind Void) u1 t1) H0) H1))) | (pr0_comp u0 u2 H0 t0 t2 H1 k) \Rightarrow (\lambda (H2: (eq T (THead k u0 t0) (THead (Bind Void) u1 t1))).(\lambda (H3: (eq T (THead k u2 t2) x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u0 t0) (THead (Bind Void) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t0) (THead (Bind Void) u1 t1) H2) in ((let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u0 t0) (THead (Bind Void) u1 t1) H2) in (eq_ind K (Bind Void) (\lambda (k0: K).((eq T u0 u1) \to ((eq T t0 t1) \to ((eq T (THead k0 u2 t2) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x))))))))) (\lambda (H7: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t0 t1) \to ((eq T (THead (Bind Void) u2 t2) x) \to ((pr0 t u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x)))))))) (\lambda (H8: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T (THead (Bind Void) u2 t2) x) \to ((pr0 u1 u2) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x))))))) (\lambda (H9: (eq T (THead (Bind Void) u2 t2) x)).(eq_ind T (THead (Bind Void) u2 t2) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t1 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O t)))))) (\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t1 t2)).(or_introl (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Void) u2 t2) (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O (THead (Bind Void) u2 t2))) (ex3_2_intro T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead (Bind Void) u2 t2) (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) u2 t2 (refl_equal T (THead (Bind Void) u2 t2)) H10 H11)))) x H9)) t0 (sym_eq T t0 t1 H8))) u0 (sym_eq T u0 u1 H7))) k (sym_eq K k (Bind Void) H6))) H5)) H4)) H3 H0 H1))) | (pr0_beta u v1 v2 H0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Bind Void) u1 t1))).(\lambda (H3: (eq T (THead (Bind Abbr) v2 t2) x)).((let H4 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Void) u1 t1) H2) in (False_ind ((eq T (THead (Bind Abbr) v2 t2) x) \to ((pr0 v1 v2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x)))))) H4)) H3 H0 H1))) | (pr0_upsilon b H0 v1 v2 H1 u0 u2 H2 t0 t2 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (THead (Bind Void) u1 t1))).(\lambda (H5: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x)).((let H6 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Void) u1 t1) H4) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t2)) x) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x)))))))) H6)) H5 H0 H1 H2 H3))) | (pr0_delta u0 u2 H0 t0 t2 H1 w H2) \Rightarrow (\lambda (H3: (eq T (THead (Bind Abbr) u0 t0) (THead (Bind Void) u1 t1))).(\lambda (H4: (eq T (THead (Bind Abbr) u2 w) x)).((let H5 \def (eq_ind T (THead (Bind Abbr) u0 t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Void) u1 t1) H3) in (False_ind ((eq T (THead (Bind Abbr) u2 w) x) \to ((pr0 u0 u2) \to ((pr0 t0 t2) \to ((subst0 O u2 t2 w) \to (or (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x))))))) H5)) H4 H0 H1 H2))) | (pr0_zeta b H0 t0 t2 H1 u) \Rightarrow (\lambda (H2: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Void) u1 t1))).(\lambda (H3: (eq T t2 x)).((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Void) u1 t1) H2) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Void) u1 t1) H2) in ((let H6 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Void) u1 t1) H2) in (eq_ind B Void (\lambda (b0: B).((eq T u u1) \to ((eq T (lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not (eq B b0 Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x))))))))) (\lambda (H7: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T (lift (S O) O t0) t1) \to ((eq T t2 x) \to ((not (eq B Void Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x)))))))) (\lambda (H8: (eq T (lift (S O) O t0) t1)).(eq_ind T (lift (S O) O t0) (\lambda (t: T).((eq T t2 x) \to ((not (eq B Void Abst)) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t t3)))) (pr0 t (lift (S O) O x))))))) (\lambda (H9: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((not (eq B Void Abst)) \to ((pr0 t0 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (lift (S O) O t0) t3)))) (pr0 (lift (S O) O t0) (lift (S O) O x)))))) (\lambda (_: (not (eq B Void Abst))).(\lambda (H11: (pr0 t0 x)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 (lift (S O) O t0) t3)))) (pr0 (lift (S O) O t0) (lift (S O) O x)) (pr0_lift t0 x H11 (S O) O)))) t2 (sym_eq T t2 x H9))) t1 H8)) u (sym_eq T u u1 H7))) b (sym_eq B b Void H6))) H5)) H4)) H3 H0 H1))) | (pr0_epsilon t0 t2 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t0) (THead (Bind Void) u1 t1))).(\lambda (H2: (eq T t2 x)).((let H3 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Void) u1 t1) H1) in (False_ind ((eq T t2 x) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x))))) H3)) H2 H0)))]) in (H0 (refl_equal T (THead (Bind Void) u1 t1)) (refl_equal T x)))))). theorem pr0_gen_lift: \forall (t1: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).((pr0 (lift h d t1) x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr0 t1 t2))))))) @@ -1892,7 +1892,7 @@ theorem pr0_confluence__pr0_delta_epsilon: theorem pr0_confluence: \forall (t0: T).(\forall (t1: T).((pr0 t0 t1) \to (\forall (t2: T).((pr0 t0 t2) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t))))))) \def - \lambda (t0: T).(tlt_wf_ind (\lambda (t: T).(\forall (t1: T).((pr0 t t1) \to (\forall (t2: T).((pr0 t t2) \to (ex2 T (\lambda (t3: T).(pr0 t1 t3)) (\lambda (t3: T).(pr0 t2 t3)))))))) (\lambda (t: T).(\lambda (H: ((\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t))))))))))).(\lambda (t1: T).(\lambda (H0: (pr0 t t1)).(\lambda (t2: T).(\lambda (H1: (pr0 t t2)).(let H2 \def (match H0 return (\lambda (_: ?).(\lambda (t0: T).(\lambda (t3: T).((eq T t0 t) \to ((eq T t3 t1) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t0) \Rightarrow (\lambda (H2: (eq T t0 t)).(\lambda (H3: (eq T t0 t1)).(eq_ind T t (\lambda (t: T).((eq T t t1) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1))))) (\lambda (H4: (eq T t t1)).(eq_ind T t1 (\lambda (_: T).(ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1)))) (let H5 \def (match H1 return (\lambda (_: ?).(\lambda (t0: T).(\lambda (t3: T).((eq T t0 t) \to ((eq T t3 t2) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t3) \Rightarrow (\lambda (H5: (eq T t3 t)).(\lambda (H6: (eq T t3 t2)).(eq_ind T t (\lambda (t: T).((eq T t t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H0 \def (eq_ind T t (\lambda (t: T).(eq T t3 t)) H5 t2 H7) in (let H1 \def (eq_ind T t (\lambda (t: T).(eq T t t1)) H4 t2 H7) in (let H2 \def (eq_ind T t (\lambda (t: T).(eq T t0 t)) H2 t2 H7) in (let H3 \def (eq_ind T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H t2 H7) in (let H4 \def (eq_ind T t2 (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H3 t1 H1) in (eq_ind_r T t1 (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))) (let H8 \def (eq_ind T t2 (\lambda (t: T).(eq T t0 t)) H2 t1 H1) in (ex_intro2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t1 t)) t1 (pr0_refl t1) (pr0_refl t1))) t2 H1)))))) t (sym_eq T t t2 H7))) t3 (sym_eq T t3 t H5) H6))) | (pr0_comp u1 u2 H4 t3 t4 H5 k) \Rightarrow (\lambda (H6: (eq T (THead k u1 t3) t)).(\lambda (H7: (eq T (THead k u2 t4) t2)).(eq_ind T (THead k u1 t3) (\lambda (_: T).((eq T (THead k u2 t4) t2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H8: (eq T (THead k u2 t4) t2)).(eq_ind T (THead k u2 t4) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H9: (pr0 u1 u2)).(\lambda (H10: (pr0 t3 t4)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t1)) H4 (THead k u1 t3) H6) in (eq_ind T (THead k u1 t3) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t t0)) (\lambda (t0: T).(pr0 (THead k u2 t4) t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t0 t)) H2 (THead k u1 t3) H6) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead k u1 t3) H6) in (ex_intro2 T (\lambda (t: T).(pr0 (THead k u1 t3) t)) (\lambda (t: T).(pr0 (THead k u2 t4) t)) (THead k u2 t4) (pr0_comp u1 u2 H9 t3 t4 H10 k) (pr0_refl (THead k u2 t4))))) t1 H0)))) t2 H8)) t H6 H7 H4 H5))) | (pr0_beta u v1 v2 H4 t3 t4 H5) \Rightarrow (\lambda (H6: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) t)).(\lambda (H7: (eq T (THead (Bind Abbr) v2 t4) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (\lambda (_: T).((eq T (THead (Bind Abbr) v2 t4) t2) \to ((pr0 v1 v2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H8: (eq T (THead (Bind Abbr) v2 t4) t2)).(eq_ind T (THead (Bind Abbr) v2 t4) (\lambda (t: T).((pr0 v1 v2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H9: (pr0 v1 v2)).(\lambda (H10: (pr0 t3 t4)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t1)) H4 (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) H6) in (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t4) t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t0 t)) H2 (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) H6) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) H6) in (ex_intro2 T (\lambda (t: T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t4) t)) (THead (Bind Abbr) v2 t4) (pr0_beta u v1 v2 H9 t3 t4 H10) (pr0_refl (THead (Bind Abbr) v2 t4))))) t1 H0)))) t2 H8)) t H6 H7 H4 H5))) | (pr0_upsilon b H4 v1 v2 H5 u1 u2 H6 t3 t4 H7) \Rightarrow (\lambda (H8: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) t)).(\lambda (H9: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (\lambda (_: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t2) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))))) (\lambda (H10: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t2)).(eq_ind T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))))) (\lambda (H11: (not (eq B b Abst))).(\lambda (H12: (pr0 v1 v2)).(\lambda (H13: (pr0 u1 u2)).(\lambda (H14: (pr0 t3 t4)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t1)) H4 (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) H8) in (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t0 t)) H2 (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) H8) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) H8) in (pr0_confluence__pr0_cong_upsilon_refl b H11 u1 u2 H13 t3 t4 H14 v1 v2 v2 H12 (pr0_refl v2)))) t1 H0)))))) t2 H10)) t H8 H9 H4 H5 H6 H7))) | (pr0_delta u1 u2 H4 t3 t4 H5 w H6) \Rightarrow (\lambda (H7: (eq T (THead (Bind Abbr) u1 t3) t)).(\lambda (H8: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (_: T).((eq T (THead (Bind Abbr) u2 w) t2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to ((subst0 O u2 t4 w) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))) (\lambda (H9: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t3 t4) \to ((subst0 O u2 t4 w) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0))))))) (\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t3 t4)).(\lambda (H12: (subst0 O u2 t4 w)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t1)) H4 (THead (Bind Abbr) u1 t3) H7) in (eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t0 t)) H2 (THead (Bind Abbr) u1 t3) H7) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind Abbr) u1 t3) H7) in (ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u1 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (THead (Bind Abbr) u2 w) (pr0_delta u1 u2 H10 t3 t4 H11 w H12) (pr0_refl (THead (Bind Abbr) u2 w))))) t1 H0))))) t2 H9)) t H7 H8 H4 H5 H6))) | (pr0_zeta b H4 t3 t4 H5 u) \Rightarrow (\lambda (H6: (eq T (THead (Bind b) u (lift (S O) O t3)) t)).(\lambda (H7: (eq T t4 t2)).(eq_ind T (THead (Bind b) u (lift (S O) O t3)) (\lambda (_: T).((eq T t4 t2) \to ((not (eq B b Abst)) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H8: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t3 t) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H9: (not (eq B b Abst))).(\lambda (H10: (pr0 t3 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t1)) H4 (THead (Bind b) u (lift (S O) O t3)) H6) in (eq_ind T (THead (Bind b) u (lift (S O) O t3)) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t0 t)) H2 (THead (Bind b) u (lift (S O) O t3)) H6) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind b) u (lift (S O) O t3)) H6) in (ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind b) u (lift (S O) O t3)) t)) (\lambda (t: T).(pr0 t2 t)) t2 (pr0_zeta b H9 t3 t2 H10 u) (pr0_refl t2)))) t1 H0)))) t4 (sym_eq T t4 t2 H8))) t H6 H7 H4 H5))) | (pr0_epsilon t3 t4 H4 u) \Rightarrow (\lambda (H5: (eq T (THead (Flat Cast) u t3) t)).(\lambda (H6: (eq T t4 t2)).(eq_ind T (THead (Flat Cast) u t3) (\lambda (_: T).((eq T t4 t2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H7: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t3 t) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H8: (pr0 t3 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t1)) H4 (THead (Flat Cast) u t3) H5) in (eq_ind T (THead (Flat Cast) u t3) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t0 t)) H2 (THead (Flat Cast) u t3) H5) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Cast) u t3) H5) in (ex_intro2 T (\lambda (t: T).(pr0 (THead (Flat Cast) u t3) t)) (\lambda (t: T).(pr0 t2 t)) t2 (pr0_epsilon t3 t2 H8 u) (pr0_refl t2)))) t1 H0))) t4 (sym_eq T t4 t2 H7))) t H5 H6 H4)))]) in (H5 (refl_equal T t) (refl_equal T t2))) t (sym_eq T t t1 H4))) t0 (sym_eq T t0 t H2) H3))) | (pr0_comp u1 u2 H2 t0 t3 H3 k) \Rightarrow (\lambda (H4: (eq T (THead k u1 t0) t)).(\lambda (H5: (eq T (THead k u2 t3) t1)).(eq_ind T (THead k u1 t0) (\lambda (_: T).((eq T (THead k u2 t3) t1) \to ((pr0 u1 u2) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1))))))) (\lambda (H6: (eq T (THead k u2 t3) t1)).(eq_ind T (THead k u2 t3) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t1: T).(pr0 t t1)) (\lambda (t1: T).(pr0 t2 t1)))))) (\lambda (H7: (pr0 u1 u2)).(\lambda (H8: (pr0 t0 t3)).(let H9 \def (match H1 return (\lambda (_: ?).(\lambda (t0: T).(\lambda (t1: T).((eq T t0 t) \to ((eq T t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t4) \Rightarrow (\lambda (H6: (eq T t4 t)).(\lambda (H9: (eq T t4 t2)).(eq_ind T t (\lambda (t: T).((eq T t t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H10: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t2)) H10 (THead k u1 t0) H4) in (eq_ind T (THead k u1 t0) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t4 t)) H6 (THead k u1 t0) H4) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead k u1 t0) H4) in (ex_intro2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 (THead k u1 t0) t)) (THead k u2 t3) (pr0_refl (THead k u2 t3)) (pr0_comp u1 u2 H7 t0 t3 H8 k)))) t2 H0)) t (sym_eq T t t2 H10))) t4 (sym_eq T t4 t H6) H9))) | (pr0_comp u0 u3 H6 t4 t5 H7 k0) \Rightarrow (\lambda (H9: (eq T (THead k0 u0 t4) t)).(\lambda (H10: (eq T (THead k0 u3 t5) t2)).(eq_ind T (THead k0 u0 t4) (\lambda (_: T).((eq T (THead k0 u3 t5) t2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T (THead k0 u3 t5) t2)).(eq_ind T (THead k0 u3 t5) (\lambda (t: T).((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H12: (pr0 u0 u3)).(\lambda (H13: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead k u1 t0) t)) H4 (THead k0 u0 t4) H9) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead k0 u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 (THead k0 u3 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u1 t0) (THead k0 u0 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u1 t0) (THead k0 u0 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t0) (THead k0 u0 t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t0) (THead k0 u0 t4) H0) in (eq_ind K k0 (\lambda (k: K).((eq T u1 u0) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 (THead k0 u3 t5) t)))))) (\lambda (H10: (eq T u1 u0)).(eq_ind T u0 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead k0 u2 t3) t0)) (\lambda (t0: T).(pr0 (THead k0 u3 t5) t0))))) (\lambda (H11: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead k0 u2 t3) t0)) (\lambda (t0: T).(pr0 (THead k0 u3 t5) t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead k0 u0 t4) H9) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H8 t4 H11) in (let H6 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 u0 H10) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead k0 u2 t3) t)) (\lambda (t: T).(pr0 (THead k0 u3 t5) t))) (\lambda (x: T).(\lambda (H7: (pr0 u2 x)).(\lambda (H8: (pr0 u3 x)).(ex2_ind T (\lambda (t: T).(pr0 t3 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead k0 u2 t3) t)) (\lambda (t: T).(pr0 (THead k0 u3 t5) t))) (\lambda (x0: T).(\lambda (H9: (pr0 t3 x0)).(\lambda (H12: (pr0 t5 x0)).(ex_intro2 T (\lambda (t: T).(pr0 (THead k0 u2 t3) t)) (\lambda (t: T).(pr0 (THead k0 u3 t5) t)) (THead k0 x x0) (pr0_comp u2 x H7 t3 x0 H9 k0) (pr0_comp u3 x H8 t5 x0 H12 k0))))) (H4 t4 (tlt_head_dx k0 u0 t4) t3 H5 t5 H13))))) (H4 u0 (tlt_head_sx k0 u0 t4) u2 H6 u3 H12))))) t0 (sym_eq T t0 t4 H11))) u1 (sym_eq T u1 u0 H10))) k (sym_eq K k k0 H3))) H2)) H1)))]) in (H1 (refl_equal T (THead k0 u0 t4))))))) t2 H11)) t H9 H10 H6 H7))) | (pr0_beta u v1 v2 H6 t4 t5 H7) \Rightarrow (\lambda (H9: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) t)).(\lambda (H10: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) (\lambda (_: T).((eq T (THead (Bind Abbr) v2 t5) t2) \to ((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Bind Abbr) v2 t5) (\lambda (t: T).((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H12: (pr0 v1 v2)).(\lambda (H13: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead k u1 t0) t)) H4 (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H9) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Appl) v1 (THead (Bind Abst) u t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind Abst) u t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H0) in (eq_ind K (Flat Appl) (\lambda (k: K).((eq T u1 v1) \to ((eq T t0 (THead (Bind Abst) u t4)) \to (ex2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t)))))) (\lambda (H10: (eq T u1 v1)).(eq_ind T v1 (\lambda (_: T).((eq T t0 (THead (Bind Abst) u t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0))))) (\lambda (H11: (eq T t0 (THead (Bind Abst) u t4))).(eq_ind T (THead (Bind Abst) u t4) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H9) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H8 (THead (Bind Abst) u t4) H11) in (let H6 \def (match H5 return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Bind Abst) u t4)) \to ((eq T t0 t3) \to (ex2 T (\lambda (t1: T).(pr0 (THead (Flat Appl) u2 t3) t1)) (\lambda (t1: T).(pr0 (THead (Bind Abbr) v2 t5) t1)))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Bind Abst) u t4))).(\lambda (H5: (eq T t t3)).(eq_ind T (THead (Bind Abst) u t4) (\lambda (t0: T).((eq T t0 t3) \to (ex2 T (\lambda (t1: T).(pr0 (THead (Flat Appl) u2 t3) t1)) (\lambda (t1: T).(pr0 (THead (Bind Abbr) v2 t5) t1))))) (\lambda (H6: (eq T (THead (Bind Abst) u t4) t3)).(eq_ind T (THead (Bind Abst) u t4) (\lambda (t0: T).(ex2 T (\lambda (t1: T).(pr0 (THead (Flat Appl) u2 t0) t1)) (\lambda (t1: T).(pr0 (THead (Bind Abbr) v2 t5) t1)))) (let H1 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 v1 H10) in (ex2_ind T (\lambda (t0: T).(pr0 u2 t0)) (\lambda (t0: T).(pr0 v2 t0)) (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u t4)) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0))) (\lambda (x: T).(\lambda (H2: (pr0 u2 x)).(\lambda (H3: (pr0 v2 x)).(ex_intro2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u t4)) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)) (THead (Bind Abbr) x t5) (pr0_beta u u2 x H2 t4 t5 H13) (pr0_comp v2 x H3 t5 t5 (pr0_refl t5) (Bind Abbr)))))) (H4 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind Abst) u t4)) u2 H1 v2 H12))) t3 H6)) t (sym_eq T t (THead (Bind Abst) u t4) H0) H5))) | (pr0_comp u0 u3 H0 t1 t2 H4 k0) \Rightarrow (\lambda (H5: (eq T (THead k0 u0 t1) (THead (Bind Abst) u t4))).(\lambda (H8: (eq T (THead k0 u3 t2) t3)).((let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k0 u0 t1) (THead (Bind Abst) u t4) H5) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k0 u0 t1) (THead (Bind Abst) u t4) H5) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 u0 t1) (THead (Bind Abst) u t4) H5) in (eq_ind K (Bind Abst) (\lambda (k: K).((eq T u0 u) \to ((eq T t1 t4) \to ((eq T (THead k u3 t2) t3) \to ((pr0 u0 u3) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))))))))) (\lambda (H6: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq T t1 t4) \to ((eq T (THead (Bind Abst) u3 t2) t3) \to ((pr0 t u3) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))))) (\lambda (H9: (eq T t1 t4)).(eq_ind T t4 (\lambda (t: T).((eq T (THead (Bind Abst) u3 t2) t3) \to ((pr0 u u3) \to ((pr0 t t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0))))))) (\lambda (H11: (eq T (THead (Bind Abst) u3 t2) t3)).(eq_ind T (THead (Bind Abst) u3 t2) (\lambda (t: T).((pr0 u u3) \to ((pr0 t4 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))) (\lambda (_: (pr0 u u3)).(\lambda (H15: (pr0 t4 t2)).(let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 v1 H10) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 v2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t2)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))) (\lambda (x: T).(\lambda (H10: (pr0 u2 x)).(\lambda (H12: (pr0 v2 x)).(ex2_ind T (\lambda (t: T).(pr0 t2 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t2)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))) (\lambda (x0: T).(\lambda (H13: (pr0 t2 x0)).(\lambda (H16: (pr0 t5 x0)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t2)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t)) (THead (Bind Abbr) x x0) (pr0_beta u3 u2 x H10 t2 x0 H13) (pr0_comp v2 x H12 t5 x0 H16 (Bind Abbr)))))) (H4 t4 (tlt_trans (THead (Bind Abst) u t4) t4 (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) (tlt_head_dx (Bind Abst) u t4) (tlt_head_dx (Flat Appl) v1 (THead (Bind Abst) u t4))) t2 H15 t5 H13))))) (H4 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind Abst) u t4)) u2 H7 v2 H12))))) t3 H11)) t1 (sym_eq T t1 t4 H9))) u0 (sym_eq T u0 u H6))) k0 (sym_eq K k0 (Bind Abst) H3))) H2)) H1)) H8 H0 H4))) | (pr0_beta u0 v0 v3 H0 t1 t2 H4) \Rightarrow (\lambda (H5: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u0 t1)) (THead (Bind Abst) u t4))).(\lambda (H8: (eq T (THead (Bind Abbr) v3 t2) t3)).((let H1 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u0 t1)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t4) H5) in (False_ind ((eq T (THead (Bind Abbr) v3 t2) t3) \to ((pr0 v0 v3) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t)))))) H1)) H8 H0 H4))) | (pr0_upsilon b H0 v0 v3 H4 u0 u3 H5 t1 t2 H8) \Rightarrow (\lambda (H11: (eq T (THead (Flat Appl) v0 (THead (Bind b) u0 t1)) (THead (Bind Abst) u t4))).(\lambda (H12: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v3) t2)) t3)).((let H1 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind b) u0 t1)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t4) H11) in (False_ind ((eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v3) t2)) t3) \to ((not (eq B b Abst)) \to ((pr0 v0 v3) \to ((pr0 u0 u3) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t)))))))) H1)) H12 H0 H4 H5 H8))) | (pr0_delta u0 u3 H0 t1 t2 H4 w H5) \Rightarrow (\lambda (H8: (eq T (THead (Bind Abbr) u0 t1) (THead (Bind Abst) u t4))).(\lambda (H11: (eq T (THead (Bind Abbr) u3 w) t3)).((let H1 \def (eq_ind T (THead (Bind Abbr) u0 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Abst) u t4) H8) in (False_ind ((eq T (THead (Bind Abbr) u3 w) t3) \to ((pr0 u0 u3) \to ((pr0 t1 t2) \to ((subst0 O u3 t2 w) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))))))) H1)) H11 H0 H4 H5))) | (pr0_zeta b H0 t1 t2 H4 u0) \Rightarrow (\lambda (H5: (eq T (THead (Bind b) u0 (lift (S O) O t1)) (THead (Bind Abst) u t4))).(\lambda (H8: (eq T t2 t3)).((let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t1) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t1) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u0 (lift (S O) O t1)) (THead (Bind Abst) u t4) H5) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b) u0 (lift (S O) O t1)) (THead (Bind Abst) u t4) H5) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u0 (lift (S O) O t1)) (THead (Bind Abst) u t4) H5) in (eq_ind B Abst (\lambda (b0: B).((eq T u0 u) \to ((eq T (lift (S O) O t1) t4) \to ((eq T t2 t3) \to ((not (eq B b0 Abst)) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))))))))) (\lambda (H6: (eq T u0 u)).(eq_ind T u (\lambda (_: T).((eq T (lift (S O) O t1) t4) \to ((eq T t2 t3) \to ((not (eq B Abst Abst)) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))))) (\lambda (H9: (eq T (lift (S O) O t1) t4)).(eq_ind T (lift (S O) O t1) (\lambda (_: T).((eq T t2 t3) \to ((not (eq B Abst Abst)) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0))))))) (\lambda (H7: (eq T t2 t3)).(eq_ind T t3 (\lambda (t: T).((not (eq B Abst Abst)) \to ((pr0 t1 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))) (\lambda (H11: (not (eq B Abst Abst))).(\lambda (_: (pr0 t1 t3)).(let H10 \def (match (H11 (refl_equal B Abst)) return (\lambda (_: ?).(ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t)))) with []) in H10))) t2 (sym_eq T t2 t3 H7))) t4 H9)) u0 (sym_eq T u0 u H6))) b (sym_eq B b Abst H3))) H2)) H1)) H8 H0 H4))) | (pr0_epsilon t1 t2 H0 u0) \Rightarrow (\lambda (H4: (eq T (THead (Flat Cast) u0 t1) (THead (Bind Abst) u t4))).(\lambda (H5: (eq T t2 t3)).((let H1 \def (eq_ind T (THead (Flat Cast) u0 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t4) H4) in (False_ind ((eq T t2 t3) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))))) H1)) H5 H0)))]) in (H6 (refl_equal T (THead (Bind Abst) u t4)) (refl_equal T t3))))) t0 (sym_eq T t0 (THead (Bind Abst) u t4) H11))) u1 (sym_eq T u1 v1 H10))) k (sym_eq K k (Flat Appl) H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)))))))) t2 H11)) t H9 H10 H6 H7))) | (pr0_upsilon b H6 v1 v2 H7 u0 u3 H8 t4 t5 H9) \Rightarrow (\lambda (H10: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) t)).(\lambda (H11: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) (\lambda (_: T).((eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t2) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))))) (\lambda (H12: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))))))) (\lambda (H13: (not (eq B b Abst))).(\lambda (H14: (pr0 v1 v2)).(\lambda (H15: (pr0 u0 u3)).(\lambda (H16: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead k u1 t0) t)) H4 (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) H10) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Appl) v1 (THead (Bind b) u0 t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind b) u0 t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) H0) in (eq_ind K (Flat Appl) (\lambda (k: K).((eq T u1 v1) \to ((eq T t0 (THead (Bind b) u0 t4)) \to (ex2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t)))))) (\lambda (H11: (eq T u1 v1)).(eq_ind T v1 (\lambda (_: T).((eq T t0 (THead (Bind b) u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0))))) (\lambda (H12: (eq T t0 (THead (Bind b) u0 t4))).(eq_ind T (THead (Bind b) u0 t4) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) H10) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H8 (THead (Bind b) u0 t4) H12) in (let H6 \def (match H5 return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Bind b) u0 t4)) \to ((eq T t0 t3) \to (ex2 T (\lambda (t1: T).(pr0 (THead (Flat Appl) u2 t3) t1)) (\lambda (t1: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t1)))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Bind b) u0 t4))).(\lambda (H5: (eq T t t3)).(eq_ind T (THead (Bind b) u0 t4) (\lambda (t0: T).((eq T t0 t3) \to (ex2 T (\lambda (t1: T).(pr0 (THead (Flat Appl) u2 t3) t1)) (\lambda (t1: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t1))))) (\lambda (H6: (eq T (THead (Bind b) u0 t4) t3)).(eq_ind T (THead (Bind b) u0 t4) (\lambda (t0: T).(ex2 T (\lambda (t1: T).(pr0 (THead (Flat Appl) u2 t0) t1)) (\lambda (t1: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t1)))) (let H1 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 v1 H11) in (ex2_ind T (\lambda (t0: T).(pr0 u2 t0)) (\lambda (t0: T).(pr0 v2 t0)) (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u0 t4)) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0))) (\lambda (x: T).(\lambda (H2: (pr0 u2 x)).(\lambda (H3: (pr0 v2 x)).(pr0_confluence__pr0_cong_upsilon_refl b H13 u0 u3 H15 t4 t5 H16 u2 v2 x H2 H3)))) (H4 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind b) u0 t4)) u2 H1 v2 H14))) t3 H6)) t (sym_eq T t (THead (Bind b) u0 t4) H0) H5))) | (pr0_comp u4 u5 H0 t1 t2 H4 k0) \Rightarrow (\lambda (H5: (eq T (THead k0 u4 t1) (THead (Bind b) u0 t4))).(\lambda (H10: (eq T (THead k0 u5 t2) t3)).((let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k0 u4 t1) (THead (Bind b) u0 t4) H5) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u4 | (TLRef _) \Rightarrow u4 | (THead _ t _) \Rightarrow t])) (THead k0 u4 t1) (THead (Bind b) u0 t4) H5) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 u4 t1) (THead (Bind b) u0 t4) H5) in (eq_ind K (Bind b) (\lambda (k: K).((eq T u4 u0) \to ((eq T t1 t4) \to ((eq T (THead k u5 t2) t3) \to ((pr0 u4 u5) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))))))))) (\lambda (H6: (eq T u4 u0)).(eq_ind T u0 (\lambda (t: T).((eq T t1 t4) \to ((eq T (THead (Bind b) u5 t2) t3) \to ((pr0 t u5) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))))) (\lambda (H12: (eq T t1 t4)).(eq_ind T t4 (\lambda (t: T).((eq T (THead (Bind b) u5 t2) t3) \to ((pr0 u0 u5) \to ((pr0 t t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0))))))) (\lambda (H8: (eq T (THead (Bind b) u5 t2) t3)).(eq_ind T (THead (Bind b) u5 t2) (\lambda (t: T).((pr0 u0 u5) \to ((pr0 t4 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))) (\lambda (H17: (pr0 u0 u5)).(\lambda (H18: (pr0 t4 t2)).(let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 v1 H11) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 v2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u5 t2)) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x: T).(\lambda (H9: (pr0 u2 x)).(\lambda (H11: (pr0 v2 x)).(ex2_ind T (\lambda (t: T).(pr0 t2 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u5 t2)) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x0: T).(\lambda (H14: (pr0 t2 x0)).(\lambda (H16: (pr0 t5 x0)).(ex2_ind T (\lambda (t: T).(pr0 u5 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u5 t2)) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x1: T).(\lambda (H15: (pr0 u5 x1)).(\lambda (H19: (pr0 u3 x1)).(pr0_confluence__pr0_cong_upsilon_cong b H13 u2 v2 x H9 H11 t2 t5 x0 H14 H16 u5 u3 x1 H15 H19)))) (H4 u0 (tlt_trans (THead (Bind b) u0 t4) u0 (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) (tlt_head_sx (Bind b) u0 t4) (tlt_head_dx (Flat Appl) v1 (THead (Bind b) u0 t4))) u5 H17 u3 H15))))) (H4 t4 (tlt_trans (THead (Bind b) u0 t4) t4 (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) (tlt_head_dx (Bind b) u0 t4) (tlt_head_dx (Flat Appl) v1 (THead (Bind b) u0 t4))) t2 H18 t5 H16))))) (H4 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind b) u0 t4)) u2 H7 v2 H14))))) t3 H8)) t1 (sym_eq T t1 t4 H12))) u4 (sym_eq T u4 u0 H6))) k0 (sym_eq K k0 (Bind b) H3))) H2)) H1)) H10 H0 H4))) | (pr0_beta u v0 v3 H0 t1 t2 H4) \Rightarrow (\lambda (H5: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u t1)) (THead (Bind b) u0 t4))).(\lambda (H10: (eq T (THead (Bind Abbr) v3 t2) t3)).((let H1 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u t1)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 t4) H5) in (False_ind ((eq T (THead (Bind Abbr) v3 t2) t3) \to ((pr0 v0 v3) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t)))))) H1)) H10 H0 H4))) | (pr0_upsilon b0 H0 v0 v3 H4 u4 u5 H5 t1 t2 H10) \Rightarrow (\lambda (H13: (eq T (THead (Flat Appl) v0 (THead (Bind b0) u4 t1)) (THead (Bind b) u0 t4))).(\lambda (H14: (eq T (THead (Bind b0) u5 (THead (Flat Appl) (lift (S O) O v3) t2)) t3)).((let H1 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind b0) u4 t1)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 t4) H13) in (False_ind ((eq T (THead (Bind b0) u5 (THead (Flat Appl) (lift (S O) O v3) t2)) t3) \to ((not (eq B b0 Abst)) \to ((pr0 v0 v3) \to ((pr0 u4 u5) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t)))))))) H1)) H14 H0 H4 H5 H10))) | (pr0_delta u4 u5 H0 t1 t2 H4 w H5) \Rightarrow (\lambda (H10: (eq T (THead (Bind Abbr) u4 t1) (THead (Bind b) u0 t4))).(\lambda (H17: (eq T (THead (Bind Abbr) u5 w) t3)).((let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u4 t1) (THead (Bind b) u0 t4) H10) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u4 | (TLRef _) \Rightarrow u4 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u4 t1) (THead (Bind b) u0 t4) H10) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (THead (Bind Abbr) u4 t1) (THead (Bind b) u0 t4) H10) in (eq_ind B Abbr (\lambda (b: B).((eq T u4 u0) \to ((eq T t1 t4) \to ((eq T (THead (Bind Abbr) u5 w) t3) \to ((pr0 u4 u5) \to ((pr0 t1 t2) \to ((subst0 O u5 t2 w) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t)))))))))) (\lambda (H6: (eq T u4 u0)).(eq_ind T u0 (\lambda (t: T).((eq T t1 t4) \to ((eq T (THead (Bind Abbr) u5 w) t3) \to ((pr0 t u5) \to ((pr0 t1 t2) \to ((subst0 O u5 t2 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0))))))))) (\lambda (H8: (eq T t1 t4)).(eq_ind T t4 (\lambda (t: T).((eq T (THead (Bind Abbr) u5 w) t3) \to ((pr0 u0 u5) \to ((pr0 t t2) \to ((subst0 O u5 t2 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))))) (\lambda (H18: (eq T (THead (Bind Abbr) u5 w) t3)).(eq_ind T (THead (Bind Abbr) u5 w) (\lambda (t: T).((pr0 u0 u5) \to ((pr0 t4 t2) \to ((subst0 O u5 t2 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0))))))) (\lambda (H19: (pr0 u0 u5)).(\lambda (H20: (pr0 t4 t2)).(\lambda (H21: (subst0 O u5 t2 w)).(let H9 \def (eq_ind_r B b (\lambda (b: B).(\forall (v: T).((tlt v (THead (Flat Appl) v1 (THead (Bind b) u0 t4))) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)))))))))) H4 Abbr H3) in (let H12 \def (eq_ind_r B b (\lambda (b: B).(eq T t0 (THead (Bind b) u0 t4))) H12 Abbr H3) in (let H13 \def (eq_ind_r B b (\lambda (b: B).(not (eq B b Abst))) H13 Abbr H3) in (let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 v1 H11) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 v2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x: T).(\lambda (H11: (pr0 u2 x)).(\lambda (H14: (pr0 v2 x)).(ex2_ind T (\lambda (t: T).(pr0 t2 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x0: T).(\lambda (H16: (pr0 t2 x0)).(\lambda (H22: (pr0 t5 x0)).(ex2_ind T (\lambda (t: T).(pr0 u5 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x1: T).(\lambda (H15: (pr0 u5 x1)).(\lambda (H23: (pr0 u3 x1)).(pr0_confluence__pr0_cong_upsilon_delta H13 u5 t2 w H21 u2 v2 x H11 H14 t5 x0 H16 H22 u3 x1 H15 H23)))) (H9 u0 (tlt_trans (THead (Bind Abbr) u0 t4) u0 (THead (Flat Appl) v1 (THead (Bind Abbr) u0 t4)) (tlt_head_sx (Bind Abbr) u0 t4) (tlt_head_dx (Flat Appl) v1 (THead (Bind Abbr) u0 t4))) u5 H19 u3 H15))))) (H9 t4 (tlt_trans (THead (Bind Abbr) u0 t4) t4 (THead (Flat Appl) v1 (THead (Bind Abbr) u0 t4)) (tlt_head_dx (Bind Abbr) u0 t4) (tlt_head_dx (Flat Appl) v1 (THead (Bind Abbr) u0 t4))) t2 H20 t5 H16))))) (H9 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind Abbr) u0 t4)) u2 H7 v2 H14))))))))) t3 H18)) t1 (sym_eq T t1 t4 H8))) u4 (sym_eq T u4 u0 H6))) b H3)) H2)) H1)) H17 H0 H4 H5))) | (pr0_zeta b0 H0 t1 t2 H4 u) \Rightarrow (\lambda (H5: (eq T (THead (Bind b0) u (lift (S O) O t1)) (THead (Bind b) u0 t4))).(\lambda (H10: (eq T t2 t3)).((let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t1) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t1) | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) u (lift (S O) O t1)) (THead (Bind b) u0 t4) H5) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b0) u (lift (S O) O t1)) (THead (Bind b) u0 t4) H5) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u (lift (S O) O t1)) (THead (Bind b) u0 t4) H5) in (eq_ind B b (\lambda (b1: B).((eq T u u0) \to ((eq T (lift (S O) O t1) t4) \to ((eq T t2 t3) \to ((not (eq B b1 Abst)) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))))))))) (\lambda (H6: (eq T u u0)).(eq_ind T u0 (\lambda (_: T).((eq T (lift (S O) O t1) t4) \to ((eq T t2 t3) \to ((not (eq B b Abst)) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))))) (\lambda (H13: (eq T (lift (S O) O t1) t4)).(eq_ind T (lift (S O) O t1) (\lambda (_: T).((eq T t2 t3) \to ((not (eq B b Abst)) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0))))))) (\lambda (H8: (eq T t2 t3)).(eq_ind T t3 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t1 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))) (\lambda (H17: (not (eq B b Abst))).(\lambda (H18: (pr0 t1 t3)).(let H9 \def (eq_ind_r T t4 (\lambda (t: T).(\forall (v: T).((tlt v (THead (Flat Appl) v1 (THead (Bind b) u0 t))) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H4 (lift (S O) O t1) H13) in (let H12 \def (eq_ind_r T t4 (\lambda (t: T).(eq T t0 (THead (Bind b) u0 t))) H12 (lift (S O) O t1) H13) in (let H16 \def (eq_ind_r T t4 (\lambda (t: T).(pr0 t t5)) H16 (lift (S O) O t1) H13) in (ex2_ind T (\lambda (t3: T).(eq T t5 (lift (S O) O t3))) (\lambda (t3: T).(pr0 t1 t3)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x: T).(\lambda (H19: (eq T t5 (lift (S O) O x))).(\lambda (H20: (pr0 t1 x)).(eq_ind_r T (lift (S O) O x) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t)) t0)))) (let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 v1 H11) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 v2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x))) t))) (\lambda (x0: T).(\lambda (H11: (pr0 u2 x0)).(\lambda (H14: (pr0 v2 x0)).(ex2_ind T (\lambda (t: T).(pr0 x t)) (\lambda (t: T).(pr0 t3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x))) t))) (\lambda (x1: T).(\lambda (H21: (pr0 x x1)).(\lambda (H22: (pr0 t3 x1)).(pr0_confluence__pr0_cong_upsilon_zeta b H17 u0 u3 H15 u2 v2 x0 H11 H14 x t3 x1 H21 H22)))) (H9 t1 (tlt_trans (THead (Bind b) u0 (lift (S O) O t1)) t1 (THead (Flat Appl) v1 (THead (Bind b) u0 (lift (S O) O t1))) (lift_tlt_dx (Bind b) u0 t1 (S O) O) (tlt_head_dx (Flat Appl) v1 (THead (Bind b) u0 (lift (S O) O t1)))) x H20 t3 H18))))) (H9 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind b) u0 (lift (S O) O t1))) u2 H7 v2 H14))) t5 H19)))) (pr0_gen_lift t1 t5 (S O) O H16))))))) t2 (sym_eq T t2 t3 H8))) t4 H13)) u (sym_eq T u u0 H6))) b0 (sym_eq B b0 b H3))) H2)) H1)) H10 H0 H4))) | (pr0_epsilon t1 t2 H0 u) \Rightarrow (\lambda (H4: (eq T (THead (Flat Cast) u t1) (THead (Bind b) u0 t4))).(\lambda (H5: (eq T t2 t3)).((let H1 \def (eq_ind T (THead (Flat Cast) u t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 t4) H4) in (False_ind ((eq T t2 t3) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))))) H1)) H5 H0)))]) in (H6 (refl_equal T (THead (Bind b) u0 t4)) (refl_equal T t3))))) t0 (sym_eq T t0 (THead (Bind b) u0 t4) H12))) u1 (sym_eq T u1 v1 H11))) k (sym_eq K k (Flat Appl) H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind b) u0 t4)))))))))) t2 H12)) t H10 H11 H6 H7 H8 H9))) | (pr0_delta u0 u3 H6 t4 t5 H7 w H8) \Rightarrow (\lambda (H9: (eq T (THead (Bind Abbr) u0 t4) t)).(\lambda (H10: (eq T (THead (Bind Abbr) u3 w) t2)).(eq_ind T (THead (Bind Abbr) u0 t4) (\lambda (_: T).((eq T (THead (Bind Abbr) u3 w) t2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to ((subst0 O u3 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))))) (\lambda (H11: (eq T (THead (Bind Abbr) u3 w) t2)).(eq_ind T (THead (Bind Abbr) u3 w) (\lambda (t: T).((pr0 u0 u3) \to ((pr0 t4 t5) \to ((subst0 O u3 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t t0))))))) (\lambda (H12: (pr0 u0 u3)).(\lambda (H13: (pr0 t4 t5)).(\lambda (H14: (subst0 O u3 t5 w)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead k u1 t0) t)) H4 (THead (Bind Abbr) u0 t4) H9) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Bind Abbr) u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 w) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u1 t0) (THead (Bind Abbr) u0 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u1 t0) (THead (Bind Abbr) u0 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t0) (THead (Bind Abbr) u0 t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t0) (THead (Bind Abbr) u0 t4) H0) in (eq_ind K (Bind Abbr) (\lambda (k: K).((eq T u1 u0) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w) t)))))) (\lambda (H10: (eq T u1 u0)).(eq_ind T u0 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 w) t0))))) (\lambda (H11: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 w) t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind Abbr) u0 t4) H9) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H8 t4 H11) in (let H6 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 u0 H10) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w) t))) (\lambda (x: T).(\lambda (H7: (pr0 u2 x)).(\lambda (H8: (pr0 u3 x)).(ex2_ind T (\lambda (t: T).(pr0 t3 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w) t))) (\lambda (x0: T).(\lambda (H9: (pr0 t3 x0)).(\lambda (H12: (pr0 t5 x0)).(pr0_confluence__pr0_cong_delta u3 t5 w H14 u2 x H7 H8 t3 x0 H9 H12)))) (H4 t4 (tlt_head_dx (Bind Abbr) u0 t4) t3 H5 t5 H13))))) (H4 u0 (tlt_head_sx (Bind Abbr) u0 t4) u2 H6 u3 H12))))) t0 (sym_eq T t0 t4 H11))) u1 (sym_eq T u1 u0 H10))) k (sym_eq K k (Bind Abbr) H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Bind Abbr) u0 t4)))))))) t2 H11)) t H9 H10 H6 H7 H8))) | (pr0_zeta b H6 t4 t5 H7 u) \Rightarrow (\lambda (H9: (eq T (THead (Bind b) u (lift (S O) O t4)) t)).(\lambda (H10: (eq T t5 t2)).(eq_ind T (THead (Bind b) u (lift (S O) O t4)) (\lambda (_: T).((eq T t5 t2) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H12: (not (eq B b Abst))).(\lambda (H13: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead k u1 t0) t)) H4 (THead (Bind b) u (lift (S O) O t4)) H9) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Bind b) u (lift (S O) O t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u1 t0) (THead (Bind b) u (lift (S O) O t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u1 t0) (THead (Bind b) u (lift (S O) O t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t0) (THead (Bind b) u (lift (S O) O t4)) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t0) (THead (Bind b) u (lift (S O) O t4)) H0) in (eq_ind K (Bind b) (\lambda (k: K).((eq T u1 u) \to ((eq T t0 (lift (S O) O t4)) \to (ex2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 t2 t)))))) (\lambda (H10: (eq T u1 u)).(eq_ind T u (\lambda (_: T).((eq T t0 (lift (S O) O t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H11: (eq T t0 (lift (S O) O t4))).(eq_ind T (lift (S O) O t4) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind b) u (lift (S O) O t4)) H9) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H8 (lift (S O) O t4) H11) in (ex2_ind T (\lambda (t2: T).(eq T t3 (lift (S O) O t2))) (\lambda (t2: T).(pr0 t4 t2)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 t3) t)) (\lambda (t: T).(pr0 t2 t))) (\lambda (x: T).(\lambda (H6: (eq T t3 (lift (S O) O x))).(\lambda (H8: (pr0 t4 x)).(eq_ind_r T (lift (S O) O x) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 t) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 u H10) in (ex2_ind T (\lambda (t: T).(pr0 x t)) (\lambda (t: T).(pr0 t2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (lift (S O) O x)) t)) (\lambda (t: T).(pr0 t2 t))) (\lambda (x0: T).(\lambda (H9: (pr0 x x0)).(\lambda (H13: (pr0 t2 x0)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (lift (S O) O x)) t)) (\lambda (t: T).(pr0 t2 t)) x0 (pr0_zeta b H12 x x0 H9 u2) H13)))) (H4 t4 (lift_tlt_dx (Bind b) u t4 (S O) O) x H8 t2 H13))) t3 H6)))) (pr0_gen_lift t4 t3 (S O) O H5)))) t0 (sym_eq T t0 (lift (S O) O t4) H11))) u1 (sym_eq T u1 u H10))) k (sym_eq K k (Bind b) H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Bind b) u (lift (S O) O t4)))))))) t5 (sym_eq T t5 t2 H11))) t H9 H10 H6 H7))) | (pr0_epsilon t4 t5 H6 u) \Rightarrow (\lambda (H9: (eq T (THead (Flat Cast) u t4) t)).(\lambda (H10: (eq T t5 t2)).(eq_ind T (THead (Flat Cast) u t4) (\lambda (_: T).((eq T t5 t2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H11: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H12: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead k u1 t0) t)) H4 (THead (Flat Cast) u t4) H9) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Cast) u t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u1 t0) (THead (Flat Cast) u t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u1 t0) (THead (Flat Cast) u t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t0) (THead (Flat Cast) u t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t0) (THead (Flat Cast) u t4) H0) in (eq_ind K (Flat Cast) (\lambda (k: K).((eq T u1 u) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 t2 t)))))) (\lambda (H10: (eq T u1 u)).(eq_ind T u (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Cast) u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H11: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Flat Cast) u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Cast) u t4) H9) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H8 t4 H11) in (let H6 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 u H10) in (ex2_ind T (\lambda (t: T).(pr0 t3 t)) (\lambda (t: T).(pr0 t2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Cast) u2 t3) t)) (\lambda (t: T).(pr0 t2 t))) (\lambda (x: T).(\lambda (H7: (pr0 t3 x)).(\lambda (H8: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Flat Cast) u2 t3) t)) (\lambda (t: T).(pr0 t2 t)) x (pr0_epsilon t3 x H7 u2) H8)))) (H4 t4 (tlt_head_dx (Flat Cast) u t4) t3 H5 t2 H12))))) t0 (sym_eq T t0 t4 H11))) u1 (sym_eq T u1 u H10))) k (sym_eq K k (Flat Cast) H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Flat Cast) u t4)))))) t5 (sym_eq T t5 t2 H11))) t H9 H10 H6)))]) in (H9 (refl_equal T t) (refl_equal T t2))))) t1 H6)) t H4 H5 H2 H3))) | (pr0_beta u v1 v2 H2 t0 t3 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)).(\lambda (H5: (eq T (THead (Bind Abbr) v2 t3) t1)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (_: T).((eq T (THead (Bind Abbr) v2 t3) t1) \to ((pr0 v1 v2) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1))))))) (\lambda (H6: (eq T (THead (Bind Abbr) v2 t3) t1)).(eq_ind T (THead (Bind Abbr) v2 t3) (\lambda (t: T).((pr0 v1 v2) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t1: T).(pr0 t t1)) (\lambda (t1: T).(pr0 t2 t1)))))) (\lambda (H7: (pr0 v1 v2)).(\lambda (H8: (pr0 t0 t3)).(let H9 \def (match H1 return (\lambda (_: ?).(\lambda (t0: T).(\lambda (t1: T).((eq T t0 t) \to ((eq T t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t4) \Rightarrow (\lambda (H6: (eq T t4 t)).(\lambda (H9: (eq T t4 t2)).(eq_ind T t (\lambda (t: T).((eq T t t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H10: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t2)) H10 (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) H4) in (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t4 t)) H6 (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) H4) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) H4) in (ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)) (THead (Bind Abbr) v2 t3) (pr0_refl (THead (Bind Abbr) v2 t3)) (pr0_beta u v1 v2 H7 t0 t3 H8)))) t2 H0)) t (sym_eq T t t2 H10))) t4 (sym_eq T t4 t H6) H9))) | (pr0_comp u1 u2 H6 t4 t5 H7 k) \Rightarrow (\lambda (H9: (eq T (THead k u1 t4) t)).(\lambda (H10: (eq T (THead k u2 t5) t2)).(eq_ind T (THead k u1 t4) (\lambda (_: T).((eq T (THead k u2 t5) t2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T (THead k u2 t5) t2)).(eq_ind T (THead k u2 t5) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H12: (pr0 u1 u2)).(\lambda (H13: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)) H4 (THead k u1 t4) H9) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead k u1 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead k u2 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead k u1 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow (THead (Bind Abst) u t0) | (TLRef _) \Rightarrow (THead (Bind Abst) u t0) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead k u1 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead k u1 t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow (Flat Appl) | (TLRef _) \Rightarrow (Flat Appl) | (THead k _ _) \Rightarrow k])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead k u1 t4) H0) in (eq_ind K (Flat Appl) (\lambda (k: K).((eq T v1 u1) \to ((eq T (THead (Bind Abst) u t0) t4) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead k u2 t5) t)))))) (\lambda (H10: (eq T v1 u1)).(eq_ind T u1 (\lambda (_: T).((eq T (THead (Bind Abst) u t0) t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0))))) (\lambda (H11: (eq T (THead (Bind Abst) u t0) t4)).(eq_ind T (THead (Bind Abst) u t0) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0)))) (let H4 \def (eq_ind_r K k (\lambda (k: K).(eq T (THead k u1 t4) t)) H9 (Flat Appl) H3) in (let H5 \def (eq_ind_r T t4 (\lambda (t: T).(pr0 t t5)) H13 (THead (Bind Abst) u t0) H11) in (let H6 \def (match H5 return (\lambda (_: ?).(\lambda (t: T).(\lambda (t1: T).((eq T t (THead (Bind Abst) u t0)) \to ((eq T t1 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0)))))))) with [(pr0_refl t2) \Rightarrow (\lambda (H0: (eq T t2 (THead (Bind Abst) u t0))).(\lambda (H1: (eq T t2 t5)).(eq_ind T (THead (Bind Abst) u t0) (\lambda (t: T).((eq T t t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0))))) (\lambda (H2: (eq T (THead (Bind Abst) u t0) t5)).(eq_ind T (THead (Bind Abst) u t0) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t) t0)))) (let H3 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Flat Appl) u1 t0) t)) H4 (THead (Bind Abst) u t0) H11) in (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) u1 (THead (Bind Abst) u t0)) H3) in (let H5 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H7 u1 H10) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 u2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u t0)) t))) (\lambda (x: T).(\lambda (H6: (pr0 v2 x)).(\lambda (H7: (pr0 u2 x)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u t0)) t)) (THead (Bind Abbr) x t3) (pr0_comp v2 x H6 t3 t3 (pr0_refl t3) (Bind Abbr)) (pr0_beta u u2 x H7 t0 t3 H8))))) (H4 u1 (tlt_head_sx (Flat Appl) u1 (THead (Bind Abst) u t0)) v2 H5 u2 H12))))) t5 H2)) t2 (sym_eq T t2 (THead (Bind Abst) u t0) H0) H1))) | (pr0_comp u0 u3 H0 t2 t6 H1 k) \Rightarrow (\lambda (H5: (eq T (THead k u0 t2) (THead (Bind Abst) u t0))).(\lambda (H13: (eq T (THead k u3 t6) t5)).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t2 | (TLRef _) \Rightarrow t2 | (THead _ _ t) \Rightarrow t])) (THead k u0 t2) (THead (Bind Abst) u t0) H5) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t2) (THead (Bind Abst) u t0) H5) in ((let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u0 t2) (THead (Bind Abst) u t0) H5) in (eq_ind K (Bind Abst) (\lambda (k0: K).((eq T u0 u) \to ((eq T t2 t0) \to ((eq T (THead k0 u3 t6) t5) \to ((pr0 u0 u3) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t5) t))))))))) (\lambda (H9: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq T t2 t0) \to ((eq T (THead (Bind Abst) u3 t6) t5) \to ((pr0 t u3) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0)))))))) (\lambda (H14: (eq T t2 t0)).(eq_ind T t0 (\lambda (t: T).((eq T (THead (Bind Abst) u3 t6) t5) \to ((pr0 u u3) \to ((pr0 t t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0))))))) (\lambda (H15: (eq T (THead (Bind Abst) u3 t6) t5)).(eq_ind T (THead (Bind Abst) u3 t6) (\lambda (t: T).((pr0 u u3) \to ((pr0 t0 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t) t0)))))) (\lambda (_: (pr0 u u3)).(\lambda (H17: (pr0 t0 t6)).(let H4 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Flat Appl) u1 t0) t)) H4 (THead (Bind Abst) u t0) H11) in (let H11 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) u1 (THead (Bind Abst) u t0)) H4) in (let H7 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H7 u1 H10) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 u2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t6)) t))) (\lambda (x: T).(\lambda (H10: (pr0 v2 x)).(\lambda (H12: (pr0 u2 x)).(ex2_ind T (\lambda (t: T).(pr0 t6 t)) (\lambda (t: T).(pr0 t3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t6)) t))) (\lambda (x0: T).(\lambda (H8: (pr0 t6 x0)).(\lambda (H18: (pr0 t3 x0)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t6)) t)) (THead (Bind Abbr) x x0) (pr0_comp v2 x H10 t3 x0 H18 (Bind Abbr)) (pr0_beta u3 u2 x H12 t6 x0 H8))))) (H11 t0 (tlt_trans (THead (Bind Abst) u t0) t0 (THead (Flat Appl) u1 (THead (Bind Abst) u t0)) (tlt_head_dx (Bind Abst) u t0) (tlt_head_dx (Flat Appl) u1 (THead (Bind Abst) u t0))) t6 H17 t3 H8))))) (H11 u1 (tlt_head_sx (Flat Appl) u1 (THead (Bind Abst) u t0)) v2 H7 u2 H12))))))) t5 H15)) t2 (sym_eq T t2 t0 H14))) u0 (sym_eq T u0 u H9))) k (sym_eq K k (Bind Abst) H6))) H3)) H2)) H13 H0 H1))) | (pr0_beta u0 v0 v3 H0 t2 t6 H1) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u0 t2)) (THead (Bind Abst) u t0))).(\lambda (H11: (eq T (THead (Bind Abbr) v3 t6) t5)).((let H2 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u0 t2)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t0) H4) in (False_ind ((eq T (THead (Bind Abbr) v3 t6) t5) \to ((pr0 v0 v3) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t5) t)))))) H2)) H11 H0 H1))) | (pr0_upsilon b H0 v0 v3 H1 u0 u3 H4 t2 t6 H11) \Rightarrow (\lambda (H12: (eq T (THead (Flat Appl) v0 (THead (Bind b) u0 t2)) (THead (Bind Abst) u t0))).(\lambda (H13: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v3) t6)) t5)).((let H2 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind b) u0 t2)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t0) H12) in (False_ind ((eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v3) t6)) t5) \to ((not (eq B b Abst)) \to ((pr0 v0 v3) \to ((pr0 u0 u3) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t5) t)))))))) H2)) H13 H0 H1 H4 H11))) | (pr0_delta u0 u3 H0 t2 t6 H1 w H4) \Rightarrow (\lambda (H11: (eq T (THead (Bind Abbr) u0 t2) (THead (Bind Abst) u t0))).(\lambda (H12: (eq T (THead (Bind Abbr) u3 w) t5)).((let H2 \def (eq_ind T (THead (Bind Abbr) u0 t2) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Abst) u t0) H11) in (False_ind ((eq T (THead (Bind Abbr) u3 w) t5) \to ((pr0 u0 u3) \to ((pr0 t2 t6) \to ((subst0 O u3 t6 w) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t5) t))))))) H2)) H12 H0 H1 H4))) | (pr0_zeta b H0 t2 t6 H1 u0) \Rightarrow (\lambda (H4: (eq T (THead (Bind b) u0 (lift (S O) O t2)) (THead (Bind Abst) u t0))).(\lambda (H11: (eq T t6 t5)).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t2) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t2) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u0 (lift (S O) O t2)) (THead (Bind Abst) u t0) H4) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b) u0 (lift (S O) O t2)) (THead (Bind Abst) u t0) H4) in ((let H5 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u0 (lift (S O) O t2)) (THead (Bind Abst) u t0) H4) in (eq_ind B Abst (\lambda (b0: B).((eq T u0 u) \to ((eq T (lift (S O) O t2) t0) \to ((eq T t6 t5) \to ((not (eq B b0 Abst)) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t5) t))))))))) (\lambda (H6: (eq T u0 u)).(eq_ind T u (\lambda (_: T).((eq T (lift (S O) O t2) t0) \to ((eq T t6 t5) \to ((not (eq B Abst Abst)) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0)))))))) (\lambda (H12: (eq T (lift (S O) O t2) t0)).(eq_ind T (lift (S O) O t2) (\lambda (_: T).((eq T t6 t5) \to ((not (eq B Abst Abst)) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0))))))) (\lambda (H7: (eq T t6 t5)).(eq_ind T t5 (\lambda (t: T).((not (eq B Abst Abst)) \to ((pr0 t2 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0)))))) (\lambda (H13: (not (eq B Abst Abst))).(\lambda (_: (pr0 t2 t5)).(let H8 \def (match (H13 (refl_equal B Abst)) return (\lambda (_: ?).(ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t5) t)))) with []) in H8))) t6 (sym_eq T t6 t5 H7))) t0 H12)) u0 (sym_eq T u0 u H6))) b (sym_eq B b Abst H5))) H3)) H2)) H11 H0 H1))) | (pr0_epsilon t2 t6 H0 u0) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u0 t2) (THead (Bind Abst) u t0))).(\lambda (H4: (eq T t6 t5)).((let H2 \def (eq_ind T (THead (Flat Cast) u0 t2) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t0) H1) in (False_ind ((eq T t6 t5) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t5) t))))) H2)) H4 H0)))]) in (H6 (refl_equal T (THead (Bind Abst) u t0)) (refl_equal T t5))))) t4 H11)) v1 (sym_eq T v1 u1 H10))) k H3)) H2)) H1)))]) in (H1 (refl_equal T (THead k u1 t4))))))) t2 H11)) t H9 H10 H6 H7))) | (pr0_beta u0 v0 v3 H6 t4 t5 H7) \Rightarrow (\lambda (H9: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) t)).(\lambda (H10: (eq T (THead (Bind Abbr) v3 t5) t2)).(eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) (\lambda (_: T).((eq T (THead (Bind Abbr) v3 t5) t2) \to ((pr0 v0 v3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T (THead (Bind Abbr) v3 t5) t2)).(eq_ind T (THead (Bind Abbr) v3 t5) (\lambda (t: T).((pr0 v0 v3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H12: (pr0 v0 v3)).(\lambda (H13: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)) H4 (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) H9) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow (match t return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t0) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ _ t) \Rightarrow (match t return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t0 _) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) H0) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) H0) in (eq_ind T v0 (\lambda (_: T).((eq T u u0) \to ((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0)))))) (\lambda (H10: (eq T u u0)).(eq_ind T u0 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0))))) (\lambda (H11: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) H9) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H8 t4 H11) in (let H6 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H7 v0 H3) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 v3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v3 t5) t))) (\lambda (x: T).(\lambda (H7: (pr0 v2 x)).(\lambda (H8: (pr0 v3 x)).(ex2_ind T (\lambda (t: T).(pr0 t3 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v3 t5) t))) (\lambda (x0: T).(\lambda (H9: (pr0 t3 x0)).(\lambda (H12: (pr0 t5 x0)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v3 t5) t)) (THead (Bind Abbr) x x0) (pr0_comp v2 x H7 t3 x0 H9 (Bind Abbr)) (pr0_comp v3 x H8 t5 x0 H12 (Bind Abbr)))))) (H4 t4 (tlt_trans (THead (Bind Abst) u0 t4) t4 (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) (tlt_head_dx (Bind Abst) u0 t4) (tlt_head_dx (Flat Appl) v0 (THead (Bind Abst) u0 t4))) t3 H5 t5 H13))))) (H4 v0 (tlt_head_sx (Flat Appl) v0 (THead (Bind Abst) u0 t4)) v2 H6 v3 H12))))) t0 (sym_eq T t0 t4 H11))) u (sym_eq T u u0 H10))) v1 (sym_eq T v1 v0 H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)))))))) t2 H11)) t H9 H10 H6 H7))) | (pr0_upsilon b H6 v0 v3 H7 u1 u2 H8 t4 t5 H9) \Rightarrow (\lambda (H10: (eq T (THead (Flat Appl) v0 (THead (Bind b) u1 t4)) t)).(\lambda (H11: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t2)).(eq_ind T (THead (Flat Appl) v0 (THead (Bind b) u1 t4)) (\lambda (_: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t2) \to ((not (eq B b Abst)) \to ((pr0 v0 v3) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))))) (\lambda (H12: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t2)).(eq_ind T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 v0 v3) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))))))) (\lambda (H13: (not (eq B b Abst))).(\lambda (_: (pr0 v0 v3)).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)) H4 (THead (Flat Appl) v0 (THead (Bind b) u1 t4)) H10) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Appl) v0 (THead (Bind b) u1 t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind b) u1 t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow (match t return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t0) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind b) u1 t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ _ t) \Rightarrow (match t return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t0 _) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind b) u1 t4)) H0) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow Abst | (TLRef _) \Rightarrow Abst | (THead _ _ t) \Rightarrow (match t return (\lambda (_: ?).B) with [(TSort _) \Rightarrow Abst | (TLRef _) \Rightarrow Abst | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind b) u1 t4)) H0) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind b) u1 t4)) H0) in (eq_ind T v0 (\lambda (_: T).((eq B Abst b) \to ((eq T u u1) \to ((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t0))))))) (\lambda (H11: (eq B Abst b)).(eq_ind B Abst (\lambda (b: B).((eq T u u1) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t)))))) (\lambda (H12: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abst) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t0))))) (\lambda (H14: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abst) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t0)))) (let H5 \def (eq_ind_r B b (\lambda (b: B).(not (eq B b Abst))) H13 Abst H11) in (let H6 \def (match (H5 (refl_equal B Abst)) return (\lambda (_: ?).(ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abst) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t)))) with []) in H6)) t0 (sym_eq T t0 t4 H14))) u (sym_eq T u u1 H12))) b H11)) v1 (sym_eq T v1 v0 H4))) H3)) H2)) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v0 (THead (Bind b) u1 t4)))))))))) t2 H12)) t H10 H11 H6 H7 H8 H9))) | (pr0_delta u1 u2 H6 t4 t5 H7 w H8) \Rightarrow (\lambda (H9: (eq T (THead (Bind Abbr) u1 t4) t)).(\lambda (H10: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u1 t4) (\lambda (_: T).((eq T (THead (Bind Abbr) u2 w) t2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))))) (\lambda (H11: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t t0))))))) (\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 t4 t5)).(\lambda (_: (subst0 O u2 t5 w)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)) H4 (THead (Bind Abbr) u1 t4) H9) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Bind Abbr) u1 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Bind Abbr) u1 t4))).(let H1 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 t4) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t))) H1)))]) in (H1 (refl_equal T (THead (Bind Abbr) u1 t4)))))))) t2 H11)) t H9 H10 H6 H7 H8))) | (pr0_zeta b H6 t4 t5 H7 u0) \Rightarrow (\lambda (H8: (eq T (THead (Bind b) u0 (lift (S O) O t4)) t)).(\lambda (H9: (eq T t5 t2)).(eq_ind T (THead (Bind b) u0 (lift (S O) O t4)) (\lambda (_: T).((eq T t5 t2) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H10: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (_: (not (eq B b Abst))).(\lambda (_: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)) H4 (THead (Bind b) u0 (lift (S O) O t4)) H8) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Bind b) u0 (lift (S O) O t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Bind b) u0 (lift (S O) O t4)))).(let H1 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 (lift (S O) O t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 t2 t))) H1)))]) in (H1 (refl_equal T (THead (Bind b) u0 (lift (S O) O t4)))))))) t5 (sym_eq T t5 t2 H10))) t H8 H9 H6 H7))) | (pr0_epsilon t4 t5 H6 u0) \Rightarrow (\lambda (H7: (eq T (THead (Flat Cast) u0 t4) t)).(\lambda (H8: (eq T t5 t2)).(eq_ind T (THead (Flat Cast) u0 t4) (\lambda (_: T).((eq T t5 t2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H9: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (_: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)) H4 (THead (Flat Cast) u0 t4) H7) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Cast) u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Cast) u0 t4))).(let H1 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u0 t4) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 t2 t))) H1)))]) in (H1 (refl_equal T (THead (Flat Cast) u0 t4)))))) t5 (sym_eq T t5 t2 H9))) t H7 H8 H6)))]) in (H9 (refl_equal T t) (refl_equal T t2))))) t1 H6)) t H4 H5 H2 H3))) | (pr0_upsilon b H2 v1 v2 H3 u1 u2 H4 t0 t3 H5) \Rightarrow (\lambda (H6: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) t)).(\lambda (H7: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t1)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (\lambda (_: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t1) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1))))))))) (\lambda (H8: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t1)).(eq_ind T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t1: T).(pr0 t t1)) (\lambda (t1: T).(pr0 t2 t1)))))))) (\lambda (H9: (not (eq B b Abst))).(\lambda (H10: (pr0 v1 v2)).(\lambda (H11: (pr0 u1 u2)).(\lambda (H12: (pr0 t0 t3)).(let H13 \def (match H1 return (\lambda (_: ?).(\lambda (t0: T).(\lambda (t1: T).((eq T t0 t) \to ((eq T t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t4) \Rightarrow (\lambda (H8: (eq T t4 t)).(\lambda (H13: (eq T t4 t2)).(eq_ind T t (\lambda (t: T).((eq T t t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H14: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t2)) H14 (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) H6) in (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t4 t)) H8 (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) H6) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) H6) in (ex2_sym T (pr0 (THead (Flat Appl) v1 (THead (Bind b) u1 t0))) (pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3))) (pr0_confluence__pr0_cong_upsilon_refl b H9 u1 u2 H11 t0 t3 H12 v1 v2 v2 H10 (pr0_refl v2))))) t2 H0)) t (sym_eq T t t2 H14))) t4 (sym_eq T t4 t H8) H13))) | (pr0_comp u0 u3 H8 t4 t5 H9 k) \Rightarrow (\lambda (H13: (eq T (THead k u0 t4) t)).(\lambda (H14: (eq T (THead k u3 t5) t2)).(eq_ind T (THead k u0 t4) (\lambda (_: T).((eq T (THead k u3 t5) t2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H15: (eq T (THead k u3 t5) t2)).(eq_ind T (THead k u3 t5) (\lambda (t: T).((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H16: (pr0 u0 u3)).(\lambda (H17: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) t)) H6 (THead k u0 t4) H13) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead k u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead k u3 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead k u0 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow (THead (Bind b) u1 t0) | (TLRef _) \Rightarrow (THead (Bind b) u1 t0) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead k u0 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead k u0 t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow (Flat Appl) | (TLRef _) \Rightarrow (Flat Appl) | (THead k _ _) \Rightarrow k])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead k u0 t4) H0) in (eq_ind K (Flat Appl) (\lambda (k: K).((eq T v1 u0) \to ((eq T (THead (Bind b) u1 t0) t4) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead k u3 t5) t)))))) (\lambda (H14: (eq T v1 u0)).(eq_ind T u0 (\lambda (_: T).((eq T (THead (Bind b) u1 t0) t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0))))) (\lambda (H15: (eq T (THead (Bind b) u1 t0) t4)).(eq_ind T (THead (Bind b) u1 t0) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0)))) (let H4 \def (eq_ind_r K k (\lambda (k: K).(eq T (THead k u0 t4) t)) H13 (Flat Appl) H3) in (let H5 \def (eq_ind_r T t4 (\lambda (t: T).(pr0 t t5)) H17 (THead (Bind b) u1 t0) H15) in (let H6 \def (match H5 return (\lambda (_: ?).(\lambda (t: T).(\lambda (t1: T).((eq T t (THead (Bind b) u1 t0)) \to ((eq T t1 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0)))))))) with [(pr0_refl t2) \Rightarrow (\lambda (H0: (eq T t2 (THead (Bind b) u1 t0))).(\lambda (H1: (eq T t2 t5)).(eq_ind T (THead (Bind b) u1 t0) (\lambda (t: T).((eq T t t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0))))) (\lambda (H2: (eq T (THead (Bind b) u1 t0) t5)).(eq_ind T (THead (Bind b) u1 t0) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t) t0)))) (let H3 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Flat Appl) u0 t0) t)) H4 (THead (Bind b) u1 t0) H15) in (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) u0 (THead (Bind b) u1 t0)) H3) in (let H5 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H10 u0 H14) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 (THead (Bind b) u1 t0)) t))) (\lambda (x: T).(\lambda (H6: (pr0 v2 x)).(\lambda (H7: (pr0 u3 x)).(ex2_sym T (pr0 (THead (Flat Appl) u3 (THead (Bind b) u1 t0))) (pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3))) (pr0_confluence__pr0_cong_upsilon_refl b H9 u1 u2 H11 t0 t3 H12 u3 v2 x H7 H6))))) (H4 u0 (tlt_head_sx (Flat Appl) u0 (THead (Bind b) u1 t0)) v2 H5 u3 H16))))) t5 H2)) t2 (sym_eq T t2 (THead (Bind b) u1 t0) H0) H1))) | (pr0_comp u4 u5 H0 t2 t6 H1 k) \Rightarrow (\lambda (H6: (eq T (THead k u4 t2) (THead (Bind b) u1 t0))).(\lambda (H13: (eq T (THead k u5 t6) t5)).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t2 | (TLRef _) \Rightarrow t2 | (THead _ _ t) \Rightarrow t])) (THead k u4 t2) (THead (Bind b) u1 t0) H6) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u4 | (TLRef _) \Rightarrow u4 | (THead _ t _) \Rightarrow t])) (THead k u4 t2) (THead (Bind b) u1 t0) H6) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u4 t2) (THead (Bind b) u1 t0) H6) in (eq_ind K (Bind b) (\lambda (k0: K).((eq T u4 u1) \to ((eq T t2 t0) \to ((eq T (THead k0 u5 t6) t5) \to ((pr0 u4 u5) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t))))))))) (\lambda (H7: (eq T u4 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t2 t0) \to ((eq T (THead (Bind b) u5 t6) t5) \to ((pr0 t u5) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0)))))))) (\lambda (H17: (eq T t2 t0)).(eq_ind T t0 (\lambda (t: T).((eq T (THead (Bind b) u5 t6) t5) \to ((pr0 u1 u5) \to ((pr0 t t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0))))))) (\lambda (H8: (eq T (THead (Bind b) u5 t6) t5)).(eq_ind T (THead (Bind b) u5 t6) (\lambda (t: T).((pr0 u1 u5) \to ((pr0 t0 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t) t0)))))) (\lambda (H18: (pr0 u1 u5)).(\lambda (H19: (pr0 t0 t6)).(let H15 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Flat Appl) u0 t0) t)) H4 (THead (Bind b) u1 t0) H15) in (let H20 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) u0 (THead (Bind b) u1 t0)) H15) in (let H4 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H10 u0 H14) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 (THead (Bind b) u5 t6)) t))) (\lambda (x: T).(\lambda (H10: (pr0 v2 x)).(\lambda (H14: (pr0 u3 x)).(ex2_ind T (\lambda (t: T).(pr0 t6 t)) (\lambda (t: T).(pr0 t3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 (THead (Bind b) u5 t6)) t))) (\lambda (x0: T).(\lambda (H12: (pr0 t6 x0)).(\lambda (H16: (pr0 t3 x0)).(ex2_ind T (\lambda (t: T).(pr0 u5 t)) (\lambda (t: T).(pr0 u2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 (THead (Bind b) u5 t6)) t))) (\lambda (x1: T).(\lambda (H11: (pr0 u5 x1)).(\lambda (H21: (pr0 u2 x1)).(ex2_sym T (pr0 (THead (Flat Appl) u3 (THead (Bind b) u5 t6))) (pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3))) (pr0_confluence__pr0_cong_upsilon_cong b H9 u3 v2 x H14 H10 t6 t3 x0 H12 H16 u5 u2 x1 H11 H21))))) (H20 u1 (tlt_trans (THead (Bind b) u1 t0) u1 (THead (Flat Appl) u0 (THead (Bind b) u1 t0)) (tlt_head_sx (Bind b) u1 t0) (tlt_head_dx (Flat Appl) u0 (THead (Bind b) u1 t0))) u5 H18 u2 H11))))) (H20 t0 (tlt_trans (THead (Bind b) u1 t0) t0 (THead (Flat Appl) u0 (THead (Bind b) u1 t0)) (tlt_head_dx (Bind b) u1 t0) (tlt_head_dx (Flat Appl) u0 (THead (Bind b) u1 t0))) t6 H19 t3 H12))))) (H20 u0 (tlt_head_sx (Flat Appl) u0 (THead (Bind b) u1 t0)) v2 H4 u3 H16))))))) t5 H8)) t2 (sym_eq T t2 t0 H17))) u4 (sym_eq T u4 u1 H7))) k (sym_eq K k (Bind b) H5))) H3)) H2)) H13 H0 H1))) | (pr0_beta u v0 v3 H0 t2 t6 H1) \Rightarrow (\lambda (H6: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u t2)) (THead (Bind b) u1 t0))).(\lambda (H13: (eq T (THead (Bind Abbr) v3 t6) t5)).((let H2 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u t2)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u1 t0) H6) in (False_ind ((eq T (THead (Bind Abbr) v3 t6) t5) \to ((pr0 v0 v3) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t)))))) H2)) H13 H0 H1))) | (pr0_upsilon b0 H0 v0 v3 H1 u4 u5 H6 t2 t6 H13) \Rightarrow (\lambda (H14: (eq T (THead (Flat Appl) v0 (THead (Bind b0) u4 t2)) (THead (Bind b) u1 t0))).(\lambda (H15: (eq T (THead (Bind b0) u5 (THead (Flat Appl) (lift (S O) O v3) t6)) t5)).((let H2 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind b0) u4 t2)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u1 t0) H14) in (False_ind ((eq T (THead (Bind b0) u5 (THead (Flat Appl) (lift (S O) O v3) t6)) t5) \to ((not (eq B b0 Abst)) \to ((pr0 v0 v3) \to ((pr0 u4 u5) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t)))))))) H2)) H15 H0 H1 H6 H13))) | (pr0_delta u4 u5 H0 t2 t6 H1 w H6) \Rightarrow (\lambda (H13: (eq T (THead (Bind Abbr) u4 t2) (THead (Bind b) u1 t0))).(\lambda (H17: (eq T (THead (Bind Abbr) u5 w) t5)).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t2 | (TLRef _) \Rightarrow t2 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u4 t2) (THead (Bind b) u1 t0) H13) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u4 | (TLRef _) \Rightarrow u4 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u4 t2) (THead (Bind b) u1 t0) H13) in ((let H5 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (THead (Bind Abbr) u4 t2) (THead (Bind b) u1 t0) H13) in (eq_ind B Abbr (\lambda (b: B).((eq T u4 u1) \to ((eq T t2 t0) \to ((eq T (THead (Bind Abbr) u5 w) t5) \to ((pr0 u4 u5) \to ((pr0 t2 t6) \to ((subst0 O u5 t6 w) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t)))))))))) (\lambda (H7: (eq T u4 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t2 t0) \to ((eq T (THead (Bind Abbr) u5 w) t5) \to ((pr0 t u5) \to ((pr0 t2 t6) \to ((subst0 O u5 t6 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0))))))))) (\lambda (H18: (eq T t2 t0)).(eq_ind T t0 (\lambda (t: T).((eq T (THead (Bind Abbr) u5 w) t5) \to ((pr0 u1 u5) \to ((pr0 t t6) \to ((subst0 O u5 t6 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0)))))))) (\lambda (H19: (eq T (THead (Bind Abbr) u5 w) t5)).(eq_ind T (THead (Bind Abbr) u5 w) (\lambda (t: T).((pr0 u1 u5) \to ((pr0 t0 t6) \to ((subst0 O u5 t6 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t) t0))))))) (\lambda (H20: (pr0 u1 u5)).(\lambda (H21: (pr0 t0 t6)).(\lambda (H22: (subst0 O u5 t6 w)).(let H15 \def (eq_ind_r B b (\lambda (b: B).(eq T (THead (Bind b) u1 t0) t4)) H15 Abbr H5) in (let H9 \def (eq_ind_r B b (\lambda (b: B).(not (eq B b Abst))) H9 Abbr H5) in (let H23 \def (eq_ind_r B b (\lambda (b: B).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t1)) H8 Abbr H5) in (let H4 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Flat Appl) u0 t0) t)) H4 (THead (Bind Abbr) u1 t0) H15) in (let H8 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) u0 (THead (Bind Abbr) u1 t0)) H4) in (let H10 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H10 u0 H14) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 (THead (Bind Abbr) u5 w)) t))) (\lambda (x: T).(\lambda (H14: (pr0 v2 x)).(\lambda (H16: (pr0 u3 x)).(ex2_ind T (\lambda (t: T).(pr0 t6 t)) (\lambda (t: T).(pr0 t3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 (THead (Bind Abbr) u5 w)) t))) (\lambda (x0: T).(\lambda (H12: (pr0 t6 x0)).(\lambda (H24: (pr0 t3 x0)).(ex2_ind T (\lambda (t: T).(pr0 u5 t)) (\lambda (t: T).(pr0 u2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 (THead (Bind Abbr) u5 w)) t))) (\lambda (x1: T).(\lambda (H11: (pr0 u5 x1)).(\lambda (H25: (pr0 u2 x1)).(ex2_sym T (pr0 (THead (Flat Appl) u3 (THead (Bind Abbr) u5 w))) (pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t3))) (pr0_confluence__pr0_cong_upsilon_delta H9 u5 t6 w H22 u3 v2 x H16 H14 t3 x0 H12 H24 u2 x1 H11 H25))))) (H8 u1 (tlt_trans (THead (Bind Abbr) u1 t0) u1 (THead (Flat Appl) u0 (THead (Bind Abbr) u1 t0)) (tlt_head_sx (Bind Abbr) u1 t0) (tlt_head_dx (Flat Appl) u0 (THead (Bind Abbr) u1 t0))) u5 H20 u2 H11))))) (H8 t0 (tlt_trans (THead (Bind Abbr) u1 t0) t0 (THead (Flat Appl) u0 (THead (Bind Abbr) u1 t0)) (tlt_head_dx (Bind Abbr) u1 t0) (tlt_head_dx (Flat Appl) u0 (THead (Bind Abbr) u1 t0))) t6 H21 t3 H12))))) (H8 u0 (tlt_head_sx (Flat Appl) u0 (THead (Bind Abbr) u1 t0)) v2 H10 u3 H16))))))))))) t5 H19)) t2 (sym_eq T t2 t0 H18))) u4 (sym_eq T u4 u1 H7))) b H5)) H3)) H2)) H17 H0 H1 H6))) | (pr0_zeta b0 H0 t2 t6 H1 u) \Rightarrow (\lambda (H6: (eq T (THead (Bind b0) u (lift (S O) O t2)) (THead (Bind b) u1 t0))).(\lambda (H13: (eq T t6 t5)).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t2) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t2) | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) u (lift (S O) O t2)) (THead (Bind b) u1 t0) H6) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b0) u (lift (S O) O t2)) (THead (Bind b) u1 t0) H6) in ((let H5 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u (lift (S O) O t2)) (THead (Bind b) u1 t0) H6) in (eq_ind B b (\lambda (b1: B).((eq T u u1) \to ((eq T (lift (S O) O t2) t0) \to ((eq T t6 t5) \to ((not (eq B b1 Abst)) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t))))))))) (\lambda (H7: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T (lift (S O) O t2) t0) \to ((eq T t6 t5) \to ((not (eq B b Abst)) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0)))))))) (\lambda (H17: (eq T (lift (S O) O t2) t0)).(eq_ind T (lift (S O) O t2) (\lambda (_: T).((eq T t6 t5) \to ((not (eq B b Abst)) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0))))))) (\lambda (H8: (eq T t6 t5)).(eq_ind T t5 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t2 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0)))))) (\lambda (H18: (not (eq B b Abst))).(\lambda (H19: (pr0 t2 t5)).(let H9 \def (eq_ind_r T t0 (\lambda (t: T).(eq T (THead (Bind b) u1 t) t4)) H15 (lift (S O) O t2) H17) in (let H15 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Flat Appl) u0 t0) t)) H4 (THead (Bind b) u1 (lift (S O) O t2)) H9) in (let H20 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) u0 (THead (Bind b) u1 (lift (S O) O t2))) H15) in (let H12 \def (eq_ind_r T t0 (\lambda (t: T).(pr0 t t3)) H12 (lift (S O) O t2) H17) in (ex2_ind T (\lambda (t4: T).(eq T t3 (lift (S O) O t4))) (\lambda (t3: T).(pr0 t2 t3)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t))) (\lambda (x: T).(\lambda (H21: (eq T t3 (lift (S O) O x))).(\lambda (H22: (pr0 t2 x)).(eq_ind_r T (lift (S O) O x) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0)))) (let H4 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H10 u0 H14) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x))) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t))) (\lambda (x0: T).(\lambda (H10: (pr0 v2 x0)).(\lambda (H14: (pr0 u3 x0)).(ex2_ind T (\lambda (t: T).(pr0 x t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x))) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t))) (\lambda (x1: T).(\lambda (H16: (pr0 x x1)).(\lambda (H23: (pr0 t5 x1)).(ex2_sym T (pr0 (THead (Flat Appl) u3 t5)) (pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x)))) (pr0_confluence__pr0_cong_upsilon_zeta b H18 u1 u2 H11 u3 v2 x0 H14 H10 x t5 x1 H16 H23))))) (H20 t2 (tlt_trans (THead (Bind b) u1 (lift (S O) O t2)) t2 (THead (Flat Appl) u0 (THead (Bind b) u1 (lift (S O) O t2))) (lift_tlt_dx (Bind b) u1 t2 (S O) O) (tlt_head_dx (Flat Appl) u0 (THead (Bind b) u1 (lift (S O) O t2)))) x H22 t5 H19))))) (H20 u0 (tlt_head_sx (Flat Appl) u0 (THead (Bind b) u1 (lift (S O) O t2))) v2 H4 u3 H16))) t3 H21)))) (pr0_gen_lift t2 t3 (S O) O H12)))))))) t6 (sym_eq T t6 t5 H8))) t0 H17)) u (sym_eq T u u1 H7))) b0 (sym_eq B b0 b H5))) H3)) H2)) H13 H0 H1))) | (pr0_epsilon t2 t6 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t2) (THead (Bind b) u1 t0))).(\lambda (H6: (eq T t6 t5)).((let H2 \def (eq_ind T (THead (Flat Cast) u t2) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u1 t0) H1) in (False_ind ((eq T t6 t5) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t))))) H2)) H6 H0)))]) in (H6 (refl_equal T (THead (Bind b) u1 t0)) (refl_equal T t5))))) t4 H15)) v1 (sym_eq T v1 u0 H14))) k H3)) H2)) H1)))]) in (H1 (refl_equal T (THead k u0 t4))))))) t2 H15)) t H13 H14 H8 H9))) | (pr0_beta u v0 v3 H8 t4 t5 H9) \Rightarrow (\lambda (H10: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) t)).(\lambda (H13: (eq T (THead (Bind Abbr) v3 t5) t2)).(eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) (\lambda (_: T).((eq T (THead (Bind Abbr) v3 t5) t2) \to ((pr0 v0 v3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H14: (eq T (THead (Bind Abbr) v3 t5) t2)).(eq_ind T (THead (Bind Abbr) v3 t5) (\lambda (t: T).((pr0 v0 v3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (_: (pr0 v0 v3)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) t)) H6 (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) H10) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Appl) v0 (THead (Bind Abst) u t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow (match t return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t0) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ _ t) \Rightarrow (match t return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t0 _) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) H0) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead _ _ t) \Rightarrow (match t return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) H0) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) H0) in (eq_ind T v0 (\lambda (_: T).((eq B b Abst) \to ((eq T u1 u) \to ((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0))))))) (\lambda (H13: (eq B b Abst)).(eq_ind B Abst (\lambda (b: B).((eq T u1 u) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v3 t5) t)))))) (\lambda (H14: (eq T u1 u)).(eq_ind T u (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abst) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0))))) (\lambda (H15: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abst) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0)))) (let H5 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) H10) in (let H6 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H12 t4 H15) in (let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H11 u H14) in (let H8 \def (eq_ind B b (\lambda (b: B).(not (eq B b Abst))) H9 Abst H13) in (let H9 \def (match (H8 (refl_equal B Abst)) return (\lambda (_: ?).(ex2 T (\lambda (t: T).(pr0 (THead (Bind Abst) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v3 t5) t)))) with []) in H9))))) t0 (sym_eq T t0 t4 H15))) u1 (sym_eq T u1 u H14))) b (sym_eq B b Abst H13))) v1 (sym_eq T v1 v0 H4))) H3)) H2)) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v0 (THead (Bind Abst) u t4)))))))) t2 H14)) t H10 H13 H8 H9))) | (pr0_upsilon b0 H8 v0 v3 H9 u0 u3 H10 t4 t5 H11) \Rightarrow (\lambda (H13: (eq T (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) t)).(\lambda (H14: (eq T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t2)).(eq_ind T (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) (\lambda (_: T).((eq T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t2) \to ((not (eq B b0 Abst)) \to ((pr0 v0 v3) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0))))))))) (\lambda (H15: (eq T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t2)).(eq_ind T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) (\lambda (t: T).((not (eq B b0 Abst)) \to ((pr0 v0 v3) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t t0)))))))) (\lambda (_: (not (eq B b0 Abst))).(\lambda (H17: (pr0 v0 v3)).(\lambda (H18: (pr0 u0 u3)).(\lambda (H19: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) t)) H6 (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) H13) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Appl) v0 (THead (Bind b0) u0 t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow (match t return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t0) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ _ t) \Rightarrow (match t return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t0 _) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) H0) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead _ _ t) \Rightarrow (match t return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) H0) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) H0) in (eq_ind T v0 (\lambda (_: T).((eq B b b0) \to ((eq T u1 u0) \to ((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t0))))))) (\lambda (H14: (eq B b b0)).(eq_ind B b0 (\lambda (b: B).((eq T u1 u0) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t)))))) (\lambda (H15: (eq T u1 u0)).(eq_ind T u0 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t0))))) (\lambda (H16: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t0)))) (let H5 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) H13) in (let H6 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H12 t4 H16) in (let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H11 u0 H15) in (let H8 \def (eq_ind B b (\lambda (b: B).(not (eq B b Abst))) H9 b0 H14) in (let H9 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H10 v0 H4) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 v3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t))) (\lambda (x: T).(\lambda (H10: (pr0 v2 x)).(\lambda (H11: (pr0 v3 x)).(ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t))) (\lambda (x0: T).(\lambda (H12: (pr0 u2 x0)).(\lambda (H13: (pr0 u3 x0)).(ex2_ind T (\lambda (t: T).(pr0 t3 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t))) (\lambda (x1: T).(\lambda (H17: (pr0 t3 x1)).(\lambda (H18: (pr0 t5 x1)).(pr0_confluence__pr0_upsilon_upsilon b0 H8 v2 v3 x H10 H11 u2 u3 x0 H12 H13 t3 t5 x1 H17 H18)))) (H5 t4 (tlt_trans (THead (Bind b0) u0 t4) t4 (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) (tlt_head_dx (Bind b0) u0 t4) (tlt_head_dx (Flat Appl) v0 (THead (Bind b0) u0 t4))) t3 H6 t5 H19))))) (H5 u0 (tlt_trans (THead (Bind b0) u0 t4) u0 (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) (tlt_head_sx (Bind b0) u0 t4) (tlt_head_dx (Flat Appl) v0 (THead (Bind b0) u0 t4))) u2 H7 u3 H18))))) (H5 v0 (tlt_head_sx (Flat Appl) v0 (THead (Bind b0) u0 t4)) v2 H9 v3 H17))))))) t0 (sym_eq T t0 t4 H16))) u1 (sym_eq T u1 u0 H15))) b (sym_eq B b b0 H14))) v1 (sym_eq T v1 v0 H4))) H3)) H2)) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)))))))))) t2 H15)) t H13 H14 H8 H9 H10 H11))) | (pr0_delta u0 u3 H8 t4 t5 H9 w H10) \Rightarrow (\lambda (H11: (eq T (THead (Bind Abbr) u0 t4) t)).(\lambda (H12: (eq T (THead (Bind Abbr) u3 w) t2)).(eq_ind T (THead (Bind Abbr) u0 t4) (\lambda (_: T).((eq T (THead (Bind Abbr) u3 w) t2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to ((subst0 O u3 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0)))))))) (\lambda (H13: (eq T (THead (Bind Abbr) u3 w) t2)).(eq_ind T (THead (Bind Abbr) u3 w) (\lambda (t: T).((pr0 u0 u3) \to ((pr0 t4 t5) \to ((subst0 O u3 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t t0))))))) (\lambda (_: (pr0 u0 u3)).(\lambda (_: (pr0 t4 t5)).(\lambda (_: (subst0 O u3 t5 w)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) t)) H6 (THead (Bind Abbr) u0 t4) H11) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Bind Abbr) u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 w) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Bind Abbr) u0 t4))).(let H1 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u0 t4) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w) t))) H1)))]) in (H1 (refl_equal T (THead (Bind Abbr) u0 t4)))))))) t2 H13)) t H11 H12 H8 H9 H10))) | (pr0_zeta b0 H8 t4 t5 H9 u) \Rightarrow (\lambda (H10: (eq T (THead (Bind b0) u (lift (S O) O t4)) t)).(\lambda (H11: (eq T t5 t2)).(eq_ind T (THead (Bind b0) u (lift (S O) O t4)) (\lambda (_: T).((eq T t5 t2) \to ((not (eq B b0 Abst)) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H12: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((not (eq B b0 Abst)) \to ((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (_: (not (eq B b0 Abst))).(\lambda (_: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) t)) H6 (THead (Bind b0) u (lift (S O) O t4)) H10) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Bind b0) u (lift (S O) O t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Bind b0) u (lift (S O) O t4)))).(let H1 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b0) u (lift (S O) O t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 t2 t))) H1)))]) in (H1 (refl_equal T (THead (Bind b0) u (lift (S O) O t4)))))))) t5 (sym_eq T t5 t2 H12))) t H10 H11 H8 H9))) | (pr0_epsilon t4 t5 H8 u) \Rightarrow (\lambda (H9: (eq T (THead (Flat Cast) u t4) t)).(\lambda (H10: (eq T t5 t2)).(eq_ind T (THead (Flat Cast) u t4) (\lambda (_: T).((eq T t5 t2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H11: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (_: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) t)) H6 (THead (Flat Cast) u t4) H9) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Cast) u t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Cast) u t4))).(let H1 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u t4) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 t2 t))) H1)))]) in (H1 (refl_equal T (THead (Flat Cast) u t4)))))) t5 (sym_eq T t5 t2 H11))) t H9 H10 H8)))]) in (H13 (refl_equal T t) (refl_equal T t2))))))) t1 H8)) t H6 H7 H2 H3 H4 H5))) | (pr0_delta u1 u2 H2 t0 t3 H3 w H4) \Rightarrow (\lambda (H5: (eq T (THead (Bind Abbr) u1 t0) t)).(\lambda (H6: (eq T (THead (Bind Abbr) u2 w) t1)).(eq_ind T (THead (Bind Abbr) u1 t0) (\lambda (_: T).((eq T (THead (Bind Abbr) u2 w) t1) \to ((pr0 u1 u2) \to ((pr0 t0 t3) \to ((subst0 O u2 t3 w) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1)))))))) (\lambda (H7: (eq T (THead (Bind Abbr) u2 w) t1)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t0 t3) \to ((subst0 O u2 t3 w) \to (ex2 T (\lambda (t1: T).(pr0 t t1)) (\lambda (t1: T).(pr0 t2 t1))))))) (\lambda (H8: (pr0 u1 u2)).(\lambda (H9: (pr0 t0 t3)).(\lambda (H10: (subst0 O u2 t3 w)).(let H11 \def (match H1 return (\lambda (_: ?).(\lambda (t0: T).(\lambda (t1: T).((eq T t0 t) \to ((eq T t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t4) \Rightarrow (\lambda (H7: (eq T t4 t)).(\lambda (H11: (eq T t4 t2)).(eq_ind T t (\lambda (t: T).((eq T t t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H12: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t2)) H12 (THead (Bind Abbr) u1 t0) H5) in (eq_ind T (THead (Bind Abbr) u1 t0) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t4 t)) H7 (THead (Bind Abbr) u1 t0) H5) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind Abbr) u1 t0) H5) in (ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u1 t0) t)) (THead (Bind Abbr) u2 w) (pr0_refl (THead (Bind Abbr) u2 w)) (pr0_delta u1 u2 H8 t0 t3 H9 w H10)))) t2 H0)) t (sym_eq T t t2 H12))) t4 (sym_eq T t4 t H7) H11))) | (pr0_comp u0 u3 H7 t4 t5 H8 k) \Rightarrow (\lambda (H11: (eq T (THead k u0 t4) t)).(\lambda (H12: (eq T (THead k u3 t5) t2)).(eq_ind T (THead k u0 t4) (\lambda (_: T).((eq T (THead k u3 t5) t2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H13: (eq T (THead k u3 t5) t2)).(eq_ind T (THead k u3 t5) (\lambda (t: T).((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H14: (pr0 u0 u3)).(\lambda (H15: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind Abbr) u1 t0) t)) H5 (THead k u0 t4) H11) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead k u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead k u3 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind Abbr) u1 t0) (THead k u0 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u1 t0) (THead k u0 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u1 t0) (THead k u0 t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow (Bind Abbr) | (TLRef _) \Rightarrow (Bind Abbr) | (THead k _ _) \Rightarrow k])) (THead (Bind Abbr) u1 t0) (THead k u0 t4) H0) in (eq_ind K (Bind Abbr) (\lambda (k: K).((eq T u1 u0) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead k u3 t5) t)))))) (\lambda (H12: (eq T u1 u0)).(eq_ind T u0 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 t5) t0))))) (\lambda (H13: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 t5) t0)))) (let H4 \def (eq_ind_r K k (\lambda (k: K).(eq T (THead k u0 t4) t)) H11 (Bind Abbr) H3) in (let H5 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind Abbr) u0 t4) H4) in (let H6 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H9 t4 H13) in (let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H8 u0 H12) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 t5) t))) (\lambda (x: T).(\lambda (H8: (pr0 u2 x)).(\lambda (H9: (pr0 u3 x)).(ex2_ind T (\lambda (t: T).(pr0 t3 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 t5) t))) (\lambda (x0: T).(\lambda (H11: (pr0 t3 x0)).(\lambda (H14: (pr0 t5 x0)).(ex2_sym T (pr0 (THead (Bind Abbr) u3 t5)) (pr0 (THead (Bind Abbr) u2 w)) (pr0_confluence__pr0_cong_delta u2 t3 w H10 u3 x H9 H8 t5 x0 H14 H11))))) (H5 t4 (tlt_head_dx (Bind Abbr) u0 t4) t3 H6 t5 H15))))) (H5 u0 (tlt_head_sx (Bind Abbr) u0 t4) u2 H7 u3 H14)))))) t0 (sym_eq T t0 t4 H13))) u1 (sym_eq T u1 u0 H12))) k H3)) H2)) H1)))]) in (H1 (refl_equal T (THead k u0 t4))))))) t2 H13)) t H11 H12 H7 H8))) | (pr0_beta u v1 v2 H7 t4 t5 H8) \Rightarrow (\lambda (H9: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) t)).(\lambda (H10: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) (\lambda (_: T).((eq T (THead (Bind Abbr) v2 t5) t2) \to ((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Bind Abbr) v2 t5) (\lambda (t: T).((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind Abbr) u1 t0) t)) H5 (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H9) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Appl) v1 (THead (Bind Abst) u t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind Abbr) u1 t0) (THead (Flat Appl) v1 (THead (Bind Abst) u t4)))).(let H1 \def (eq_ind T (THead (Bind Abbr) u1 t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)))))))) t2 H11)) t H9 H10 H7 H8))) | (pr0_upsilon b H7 v1 v2 H8 u0 u3 H9 t4 t5 H10) \Rightarrow (\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) t)).(\lambda (H12: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) (\lambda (_: T).((eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t2) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0))))))))) (\lambda (H13: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t t0)))))))) (\lambda (_: (not (eq B b Abst))).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 u0 u3)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind Abbr) u1 t0) t)) H5 (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) H11) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Appl) v1 (THead (Bind b) u0 t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind Abbr) u1 t0) (THead (Flat Appl) v1 (THead (Bind b) u0 t4)))).(let H1 \def (eq_ind T (THead (Bind Abbr) u1 t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind b) u0 t4)))))))))) t2 H13)) t H11 H12 H7 H8 H9 H10))) | (pr0_delta u0 u3 H7 t4 t5 H8 w0 H9) \Rightarrow (\lambda (H11: (eq T (THead (Bind Abbr) u0 t4) t)).(\lambda (H12: (eq T (THead (Bind Abbr) u3 w0) t2)).(eq_ind T (THead (Bind Abbr) u0 t4) (\lambda (_: T).((eq T (THead (Bind Abbr) u3 w0) t2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to ((subst0 O u3 t5 w0) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0)))))))) (\lambda (H13: (eq T (THead (Bind Abbr) u3 w0) t2)).(eq_ind T (THead (Bind Abbr) u3 w0) (\lambda (t: T).((pr0 u0 u3) \to ((pr0 t4 t5) \to ((subst0 O u3 t5 w0) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t t0))))))) (\lambda (H14: (pr0 u0 u3)).(\lambda (H15: (pr0 t4 t5)).(\lambda (H16: (subst0 O u3 t5 w0)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind Abbr) u1 t0) t)) H5 (THead (Bind Abbr) u0 t4) H11) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Bind Abbr) u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 w0) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind Abbr) u1 t0) (THead (Bind Abbr) u0 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u1 t0) (THead (Bind Abbr) u0 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u1 t0) (THead (Bind Abbr) u0 t4) H0) in (eq_ind T u0 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 w0) t0))))) (\lambda (H12: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 w0) t0)))) (let H3 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind Abbr) u0 t4) H11) in (let H4 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H9 t4 H12) in (let H5 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H8 u0 H2) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (x: T).(\lambda (H6: (pr0 u2 x)).(\lambda (H7: (pr0 u3 x)).(ex2_ind T (\lambda (t: T).(pr0 t3 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (x0: T).(\lambda (H8: (pr0 t3 x0)).(\lambda (H9: (pr0 t5 x0)).(pr0_confluence__pr0_delta_delta u2 t3 w H10 u3 t5 w0 H16 x H6 H7 x0 H8 H9)))) (H3 t4 (tlt_head_dx (Bind Abbr) u0 t4) t3 H4 t5 H15))))) (H3 u0 (tlt_head_sx (Bind Abbr) u0 t4) u2 H5 u3 H14))))) t0 (sym_eq T t0 t4 H12))) u1 (sym_eq T u1 u0 H2))) H1)))]) in (H1 (refl_equal T (THead (Bind Abbr) u0 t4)))))))) t2 H13)) t H11 H12 H7 H8 H9))) | (pr0_zeta b H7 t4 t5 H8 u) \Rightarrow (\lambda (H11: (eq T (THead (Bind b) u (lift (S O) O t4)) t)).(\lambda (H12: (eq T t5 t2)).(eq_ind T (THead (Bind b) u (lift (S O) O t4)) (\lambda (_: T).((eq T t5 t2) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H13: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H14: (not (eq B b Abst))).(\lambda (H15: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind Abbr) u1 t0) t)) H5 (THead (Bind b) u (lift (S O) O t4)) H11) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Bind b) u (lift (S O) O t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind Abbr) u1 t0) (THead (Bind b) u (lift (S O) O t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u1 t0) (THead (Bind b) u (lift (S O) O t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u1 t0) (THead (Bind b) u (lift (S O) O t4)) H0) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (THead (Bind Abbr) u1 t0) (THead (Bind b) u (lift (S O) O t4)) H0) in (eq_ind B Abbr (\lambda (_: B).((eq T u1 u) \to ((eq T t0 (lift (S O) O t4)) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 t2 t)))))) (\lambda (H12: (eq T u1 u)).(eq_ind T u (\lambda (_: T).((eq T t0 (lift (S O) O t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H13: (eq T t0 (lift (S O) O t4))).(eq_ind T (lift (S O) O t4) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H4 \def (eq_ind_r B b (\lambda (b: B).(not (eq B b Abst))) H14 Abbr H3) in (let H5 \def (eq_ind_r B b (\lambda (b: B).(eq T (THead (Bind b) u (lift (S O) O t4)) t)) H11 Abbr H3) in (let H6 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind Abbr) u (lift (S O) O t4)) H5) in (let H7 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H9 (lift (S O) O t4) H13) in (ex2_ind T (\lambda (t2: T).(eq T t3 (lift (S O) O t2))) (\lambda (t2: T).(pr0 t4 t2)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 t2 t))) (\lambda (x: T).(\lambda (H9: (eq T t3 (lift (S O) O x))).(\lambda (H11: (pr0 t4 x)).(let H10 \def (eq_ind T t3 (\lambda (t: T).(subst0 O u2 t w)) H10 (lift (S O) O x) H9) in (let H8 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H8 u H12) in (ex2_ind T (\lambda (t: T).(pr0 x t)) (\lambda (t: T).(pr0 t2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 t2 t))) (\lambda (x0: T).(\lambda (_: (pr0 x x0)).(\lambda (_: (pr0 t2 x0)).(pr0_confluence__pr0_delta_epsilon u2 (lift (S O) O x) w H10 x (pr0_refl (lift (S O) O x)) t2)))) (H6 t4 (lift_tlt_dx (Bind Abbr) u t4 (S O) O) x H11 t2 H15))))))) (pr0_gen_lift t4 t3 (S O) O H7)))))) t0 (sym_eq T t0 (lift (S O) O t4) H13))) u1 (sym_eq T u1 u H12))) b H3)) H2)) H1)))]) in (H1 (refl_equal T (THead (Bind b) u (lift (S O) O t4)))))))) t5 (sym_eq T t5 t2 H13))) t H11 H12 H7 H8))) | (pr0_epsilon t4 t5 H7 u) \Rightarrow (\lambda (H8: (eq T (THead (Flat Cast) u t4) t)).(\lambda (H9: (eq T t5 t2)).(eq_ind T (THead (Flat Cast) u t4) (\lambda (_: T).((eq T t5 t2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H10: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (_: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind Abbr) u1 t0) t)) H5 (THead (Flat Cast) u t4) H8) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Cast) u t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind Abbr) u1 t0) (THead (Flat Cast) u t4))).(let H1 \def (eq_ind T (THead (Bind Abbr) u1 t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u t4) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 t2 t))) H1)))]) in (H1 (refl_equal T (THead (Flat Cast) u t4)))))) t5 (sym_eq T t5 t2 H10))) t H8 H9 H7)))]) in (H11 (refl_equal T t) (refl_equal T t2)))))) t1 H7)) t H5 H6 H2 H3 H4))) | (pr0_zeta b H2 t0 t3 H3 u) \Rightarrow (\lambda (H4: (eq T (THead (Bind b) u (lift (S O) O t0)) t)).(\lambda (H5: (eq T t3 t1)).(eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (_: T).((eq T t3 t1) \to ((not (eq B b Abst)) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1))))))) (\lambda (H6: (eq T t3 t1)).(eq_ind T t1 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t0 t) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1)))))) (\lambda (H7: (not (eq B b Abst))).(\lambda (H8: (pr0 t0 t1)).(let H9 \def (match H1 return (\lambda (_: ?).(\lambda (t0: T).(\lambda (t3: T).((eq T t0 t) \to ((eq T t3 t2) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t4) \Rightarrow (\lambda (H6: (eq T t4 t)).(\lambda (H9: (eq T t4 t2)).(eq_ind T t (\lambda (t: T).((eq T t t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H10: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t2)) H10 (THead (Bind b) u (lift (S O) O t0)) H4) in (eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t4 t)) H6 (THead (Bind b) u (lift (S O) O t0)) H4) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind b) u (lift (S O) O t0)) H4) in (ex_intro2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind b) u (lift (S O) O t0)) t)) t1 (pr0_refl t1) (pr0_zeta b H7 t0 t1 H8 u)))) t2 H0)) t (sym_eq T t t2 H10))) t4 (sym_eq T t4 t H6) H9))) | (pr0_comp u1 u2 H6 t4 t5 H7 k) \Rightarrow (\lambda (H9: (eq T (THead k u1 t4) t)).(\lambda (H10: (eq T (THead k u2 t5) t2)).(eq_ind T (THead k u1 t4) (\lambda (_: T).((eq T (THead k u2 t5) t2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T (THead k u2 t5) t2)).(eq_ind T (THead k u2 t5) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (_: (pr0 u1 u2)).(\lambda (H13: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind b) u (lift (S O) O t0)) t)) H4 (THead k u1 t4) H9) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead k u1 t4)) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead k u2 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead k u1 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead k u1 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead k u1 t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow (Bind b) | (TLRef _) \Rightarrow (Bind b) | (THead k _ _) \Rightarrow k])) (THead (Bind b) u (lift (S O) O t0)) (THead k u1 t4) H0) in (eq_ind K (Bind b) (\lambda (k: K).((eq T u u1) \to ((eq T (lift (S O) O t0) t4) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead k u2 t5) t)))))) (\lambda (H10: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T (lift (S O) O t0) t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u2 t5) t0))))) (\lambda (H11: (eq T (lift (S O) O t0) t4)).(eq_ind T (lift (S O) O t0) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u2 t5) t0)))) (let H4 \def (eq_ind_r K k (\lambda (k: K).(eq T (THead k u1 t4) t)) H9 (Bind b) H3) in (let H5 \def (eq_ind_r T t4 (\lambda (t: T).(pr0 t t5)) H13 (lift (S O) O t0) H11) in (ex2_ind T (\lambda (t2: T).(eq T t5 (lift (S O) O t2))) (\lambda (t2: T).(pr0 t0 t2)) (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind b) u2 t5) t))) (\lambda (x: T).(\lambda (H6: (eq T t5 (lift (S O) O x))).(\lambda (H9: (pr0 t0 x)).(let H12 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Bind b) u1 t0) t)) H4 (lift (S O) O t0) H11) in (let H13 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind b) u1 (lift (S O) O t0)) H12) in (eq_ind_r T (lift (S O) O x) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u2 t) t0)))) (ex2_ind T (\lambda (t: T).(pr0 x t)) (\lambda (t: T).(pr0 t1 t)) (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind b) u2 (lift (S O) O x)) t))) (\lambda (x0: T).(\lambda (H8: (pr0 x x0)).(\lambda (H14: (pr0 t1 x0)).(ex_intro2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind b) u2 (lift (S O) O x)) t)) x0 H14 (pr0_zeta b H7 x x0 H8 u2))))) (H13 t0 (lift_tlt_dx (Bind b) u1 t0 (S O) O) x H9 t1 H8)) t5 H6)))))) (pr0_gen_lift t0 t5 (S O) O H5)))) t4 H11)) u (sym_eq T u u1 H10))) k H3)) H2)) H1)))]) in (H1 (refl_equal T (THead k u1 t4))))))) t2 H11)) t H9 H10 H6 H7))) | (pr0_beta u0 v1 v2 H6 t4 t5 H7) \Rightarrow (\lambda (H8: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) t)).(\lambda (H9: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) (\lambda (_: T).((eq T (THead (Bind Abbr) v2 t5) t2) \to ((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H10: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Bind Abbr) v2 t5) (\lambda (t: T).((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind b) u (lift (S O) O t0)) t)) H4 (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) H8) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4))) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)))).(let H1 \def (eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)))))))) t2 H10)) t H8 H9 H6 H7))) | (pr0_upsilon b0 H6 v1 v2 H7 u1 u2 H8 t4 t5 H9) \Rightarrow (\lambda (H10: (eq T (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)) t)).(\lambda (H11: (eq T (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)) (\lambda (_: T).((eq T (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2) \to ((not (eq B b0 Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))))) (\lambda (H12: (eq T (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) (\lambda (t: T).((not (eq B b0 Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))))) (\lambda (_: (not (eq B b0 Abst))).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind b) u (lift (S O) O t0)) t)) H4 (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)) H10) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Appl) v1 (THead (Bind b0) u1 t4))) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)))).(let H1 \def (eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)))))))))) t2 H12)) t H10 H11 H6 H7 H8 H9))) | (pr0_delta u1 u2 H6 t4 t5 H7 w H8) \Rightarrow (\lambda (H9: (eq T (THead (Bind Abbr) u1 t4) t)).(\lambda (H10: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u1 t4) (\lambda (_: T).((eq T (THead (Bind Abbr) u2 w) t2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))) (\lambda (H11: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0))))))) (\lambda (_: (pr0 u1 u2)).(\lambda (H13: (pr0 t4 t5)).(\lambda (H14: (subst0 O u2 t5 w)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind b) u (lift (S O) O t0)) t)) H4 (THead (Bind Abbr) u1 t4) H9) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Bind Abbr) u1 t4)) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t4) H0) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t4) H0) in (eq_ind B Abbr (\lambda (_: B).((eq T u u1) \to ((eq T (lift (S O) O t0) t4) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)))))) (\lambda (H10: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T (lift (S O) O t0) t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0))))) (\lambda (H11: (eq T (lift (S O) O t0) t4)).(eq_ind T (lift (S O) O t0) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)))) (let H4 \def (eq_ind_r T t4 (\lambda (t: T).(pr0 t t5)) H13 (lift (S O) O t0) H11) in (ex2_ind T (\lambda (t2: T).(eq T t5 (lift (S O) O t2))) (\lambda (t2: T).(pr0 t0 t2)) (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t))) (\lambda (x: T).(\lambda (H5: (eq T t5 (lift (S O) O x))).(\lambda (H6: (pr0 t0 x)).(let H9 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Bind Abbr) u1 t0) t)) H9 (lift (S O) O t0) H11) in (let H12 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind Abbr) u1 (lift (S O) O t0)) H9) in (let H13 \def (eq_ind T t5 (\lambda (t: T).(subst0 O u2 t w)) H14 (lift (S O) O x) H5) in (let H7 \def (eq_ind B b (\lambda (b: B).(not (eq B b Abst))) H7 Abbr H3) in (ex2_ind T (\lambda (t: T).(pr0 x t)) (\lambda (t: T).(pr0 t1 t)) (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t))) (\lambda (x0: T).(\lambda (_: (pr0 x x0)).(\lambda (_: (pr0 t1 x0)).(ex2_sym T (pr0 (THead (Bind Abbr) u2 w)) (pr0 t1) (pr0_confluence__pr0_delta_epsilon u2 (lift (S O) O x) w H13 x (pr0_refl (lift (S O) O x)) t1))))) (H12 t0 (lift_tlt_dx (Bind Abbr) u1 t0 (S O) O) x H6 t1 H8))))))))) (pr0_gen_lift t0 t5 (S O) O H4))) t4 H11)) u (sym_eq T u u1 H10))) b (sym_eq B b Abbr H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Bind Abbr) u1 t4)))))))) t2 H11)) t H9 H10 H6 H7 H8))) | (pr0_zeta b0 H6 t4 t5 H7 u0) \Rightarrow (\lambda (H9: (eq T (THead (Bind b0) u0 (lift (S O) O t4)) t)).(\lambda (H10: (eq T t5 t2)).(eq_ind T (THead (Bind b0) u0 (lift (S O) O t4)) (\lambda (_: T).((eq T t5 t2) \to ((not (eq B b0 Abst)) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((not (eq B b0 Abst)) \to ((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (_: (not (eq B b0 Abst))).(\lambda (H13: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind b) u (lift (S O) O t0)) t)) H4 (THead (Bind b0) u0 (lift (S O) O t4)) H9) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Bind b0) u0 (lift (S O) O t4))) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Bind b0) u0 (lift (S O) O t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind b0) u0 (lift (S O) O t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind b0) u0 (lift (S O) O t4)) H0) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind b0) u0 (lift (S O) O t4)) H0) in (eq_ind B b0 (\lambda (_: B).((eq T u u0) \to ((eq T (lift (S O) O t0) (lift (S O) O t4)) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)))))) (\lambda (H10: (eq T u u0)).(eq_ind T u0 (\lambda (_: T).((eq T (lift (S O) O t0) (lift (S O) O t4)) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H11: (eq T (lift (S O) O t0) (lift (S O) O t4))).(eq_ind T (lift (S O) O t0) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind b0) u0 (lift (S O) O t4)) H9) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t1)) H8 t4 (lift_inj t0 t4 (S O) O H11)) in (let H6 \def (eq_ind B b (\lambda (b: B).(not (eq B b Abst))) H7 b0 H3) in (ex2_ind T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)) (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t))) (\lambda (x: T).(\lambda (H7: (pr0 t1 x)).(\lambda (H8: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)) x H7 H8)))) (H4 t4 (lift_tlt_dx (Bind b0) u0 t4 (S O) O) t1 H5 t2 H13))))) (lift (S O) O t4) H11)) u (sym_eq T u u0 H10))) b (sym_eq B b b0 H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Bind b0) u0 (lift (S O) O t4)))))))) t5 (sym_eq T t5 t2 H11))) t H9 H10 H6 H7))) | (pr0_epsilon t4 t5 H6 u0) \Rightarrow (\lambda (H7: (eq T (THead (Flat Cast) u0 t4) t)).(\lambda (H8: (eq T t5 t2)).(eq_ind T (THead (Flat Cast) u0 t4) (\lambda (_: T).((eq T t5 t2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H9: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (_: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind b) u (lift (S O) O t0)) t)) H4 (THead (Flat Cast) u0 t4) H7) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Cast) u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Flat Cast) u0 t4))).(let H1 \def (eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u0 t4) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t))) H1)))]) in (H1 (refl_equal T (THead (Flat Cast) u0 t4)))))) t5 (sym_eq T t5 t2 H9))) t H7 H8 H6)))]) in (H9 (refl_equal T t) (refl_equal T t2))))) t3 (sym_eq T t3 t1 H6))) t H4 H5 H2 H3))) | (pr0_epsilon t0 t3 H2 u) \Rightarrow (\lambda (H3: (eq T (THead (Flat Cast) u t0) t)).(\lambda (H4: (eq T t3 t1)).(eq_ind T (THead (Flat Cast) u t0) (\lambda (_: T).((eq T t3 t1) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1)))))) (\lambda (H5: (eq T t3 t1)).(eq_ind T t1 (\lambda (t: T).((pr0 t0 t) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1))))) (\lambda (H6: (pr0 t0 t1)).(let H7 \def (match H1 return (\lambda (_: ?).(\lambda (t0: T).(\lambda (t3: T).((eq T t0 t) \to ((eq T t3 t2) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t4) \Rightarrow (\lambda (H5: (eq T t4 t)).(\lambda (H7: (eq T t4 t2)).(eq_ind T t (\lambda (t: T).((eq T t t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H8: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t2)) H8 (THead (Flat Cast) u t0) H3) in (eq_ind T (THead (Flat Cast) u t0) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t4 t)) H5 (THead (Flat Cast) u t0) H3) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Cast) u t0) H3) in (ex_intro2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Flat Cast) u t0) t)) t1 (pr0_refl t1) (pr0_epsilon t0 t1 H6 u)))) t2 H0)) t (sym_eq T t t2 H8))) t4 (sym_eq T t4 t H5) H7))) | (pr0_comp u1 u2 H5 t4 t5 H6 k) \Rightarrow (\lambda (H7: (eq T (THead k u1 t4) t)).(\lambda (H8: (eq T (THead k u2 t5) t2)).(eq_ind T (THead k u1 t4) (\lambda (_: T).((eq T (THead k u2 t5) t2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H9: (eq T (THead k u2 t5) t2)).(eq_ind T (THead k u2 t5) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (_: (pr0 u1 u2)).(\lambda (H11: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Cast) u t0) t)) H3 (THead k u1 t4) H7) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead k u1 t4)) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead k u2 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Cast) u t0) (THead k u1 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) u t0) (THead k u1 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) u t0) (THead k u1 t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow (Flat Cast) | (TLRef _) \Rightarrow (Flat Cast) | (THead k _ _) \Rightarrow k])) (THead (Flat Cast) u t0) (THead k u1 t4) H0) in (eq_ind K (Flat Cast) (\lambda (k: K).((eq T u u1) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead k u2 t5) t)))))) (\lambda (H8: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Flat Cast) u2 t5) t0))))) (\lambda (H9: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Flat Cast) u2 t5) t0)))) (let H4 \def (eq_ind_r K k (\lambda (k: K).(eq T (THead k u1 t4) t)) H7 (Flat Cast) H3) in (let H5 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Cast) u1 t4) H4) in (let H6 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t1)) H6 t4 H9) in (ex2_ind T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Flat Cast) u2 t5) t))) (\lambda (x: T).(\lambda (H7: (pr0 t1 x)).(\lambda (H10: (pr0 t5 x)).(ex_intro2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Flat Cast) u2 t5) t)) x H7 (pr0_epsilon t5 x H10 u2))))) (H5 t4 (tlt_head_dx (Flat Cast) u1 t4) t1 H6 t5 H11))))) t0 (sym_eq T t0 t4 H9))) u (sym_eq T u u1 H8))) k H3)) H2)) H1)))]) in (H1 (refl_equal T (THead k u1 t4))))))) t2 H9)) t H7 H8 H5 H6))) | (pr0_beta u0 v1 v2 H5 t4 t5 H6) \Rightarrow (\lambda (H7: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) t)).(\lambda (H8: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) (\lambda (_: T).((eq T (THead (Bind Abbr) v2 t5) t2) \to ((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H9: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Bind Abbr) v2 t5) (\lambda (t: T).((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Cast) u t0) t)) H3 (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) H7) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4))) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Cast) u t0) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)))).(let H1 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)))))))) t2 H9)) t H7 H8 H5 H6))) | (pr0_upsilon b H5 v1 v2 H6 u1 u2 H7 t4 t5 H8) \Rightarrow (\lambda (H9: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) t)).(\lambda (H10: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) (\lambda (_: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))))) (\lambda (H11: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))))) (\lambda (_: (not (eq B b Abst))).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Cast) u t0) t)) H3 (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) H9) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Appl) v1 (THead (Bind b) u1 t4))) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Cast) u t0) (THead (Flat Appl) v1 (THead (Bind b) u1 t4)))).(let H1 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind b) u1 t4)))))))))) t2 H11)) t H9 H10 H5 H6 H7 H8))) | (pr0_delta u1 u2 H5 t4 t5 H6 w H7) \Rightarrow (\lambda (H8: (eq T (THead (Bind Abbr) u1 t4) t)).(\lambda (H9: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u1 t4) (\lambda (_: T).((eq T (THead (Bind Abbr) u2 w) t2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))) (\lambda (H10: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0))))))) (\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 t4 t5)).(\lambda (_: (subst0 O u2 t5 w)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Cast) u t0) t)) H3 (THead (Bind Abbr) u1 t4) H8) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Bind Abbr) u1 t4)) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Cast) u t0) (THead (Bind Abbr) u1 t4))).(let H1 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 t4) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t))) H1)))]) in (H1 (refl_equal T (THead (Bind Abbr) u1 t4)))))))) t2 H10)) t H8 H9 H5 H6 H7))) | (pr0_zeta b H5 t4 t5 H6 u0) \Rightarrow (\lambda (H7: (eq T (THead (Bind b) u0 (lift (S O) O t4)) t)).(\lambda (H8: (eq T t5 t2)).(eq_ind T (THead (Bind b) u0 (lift (S O) O t4)) (\lambda (_: T).((eq T t5 t2) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H9: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (_: (not (eq B b Abst))).(\lambda (_: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Cast) u t0) t)) H3 (THead (Bind b) u0 (lift (S O) O t4)) H7) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Bind b) u0 (lift (S O) O t4))) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Cast) u t0) (THead (Bind b) u0 (lift (S O) O t4)))).(let H1 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 (lift (S O) O t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t))) H1)))]) in (H1 (refl_equal T (THead (Bind b) u0 (lift (S O) O t4)))))))) t5 (sym_eq T t5 t2 H9))) t H7 H8 H5 H6))) | (pr0_epsilon t4 t5 H5 u0) \Rightarrow (\lambda (H7: (eq T (THead (Flat Cast) u0 t4) t)).(\lambda (H8: (eq T t5 t2)).(eq_ind T (THead (Flat Cast) u0 t4) (\lambda (_: T).((eq T t5 t2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H9: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H10: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Cast) u t0) t)) H3 (THead (Flat Cast) u0 t4) H7) in (let H1 \def (match H0 return (\lambda (_: ?).(\lambda (t: T).((eq T t (THead (Flat Cast) u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Cast) u t0) (THead (Flat Cast) u0 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) u t0) (THead (Flat Cast) u0 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) u t0) (THead (Flat Cast) u0 t4) H0) in (eq_ind T u0 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H8: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H3 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Cast) u0 t4) H7) in (let H4 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t1)) H6 t4 H8) in (ex2_ind T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)) (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t))) (\lambda (x: T).(\lambda (H5: (pr0 t1 x)).(\lambda (H6: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)) x H5 H6)))) (H3 t4 (tlt_head_dx (Flat Cast) u0 t4) t1 H4 t2 H10)))) t0 (sym_eq T t0 t4 H8))) u (sym_eq T u u0 H2))) H1)))]) in (H1 (refl_equal T (THead (Flat Cast) u0 t4)))))) t5 (sym_eq T t5 t2 H9))) t H7 H8 H5)))]) in (H7 (refl_equal T t) (refl_equal T t2)))) t3 (sym_eq T t3 t1 H5))) t H3 H4 H2)))]) in (H2 (refl_equal T t) (refl_equal T t1))))))))) t0). + \lambda (t0: T).(tlt_wf_ind (\lambda (t: T).(\forall (t1: T).((pr0 t t1) \to (\forall (t2: T).((pr0 t t2) \to (ex2 T (\lambda (t3: T).(pr0 t1 t3)) (\lambda (t3: T).(pr0 t2 t3)))))))) (\lambda (t: T).(\lambda (H: ((\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t))))))))))).(\lambda (t1: T).(\lambda (H0: (pr0 t t1)).(\lambda (t2: T).(\lambda (H1: (pr0 t t2)).(let H2 \def (match H0 return (\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (pr0 t0 t3)).((eq T t0 t) \to ((eq T t3 t1) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t0) \Rightarrow (\lambda (H2: (eq T t0 t)).(\lambda (H3: (eq T t0 t1)).(eq_ind T t (\lambda (t: T).((eq T t t1) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1))))) (\lambda (H4: (eq T t t1)).(eq_ind T t1 (\lambda (_: T).(ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1)))) (let H5 \def (match H1 return (\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (pr0 t0 t3)).((eq T t0 t) \to ((eq T t3 t2) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t3) \Rightarrow (\lambda (H5: (eq T t3 t)).(\lambda (H6: (eq T t3 t2)).(eq_ind T t (\lambda (t: T).((eq T t t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H0 \def (eq_ind T t (\lambda (t: T).(eq T t3 t)) H5 t2 H7) in (let H1 \def (eq_ind T t (\lambda (t: T).(eq T t t1)) H4 t2 H7) in (let H2 \def (eq_ind T t (\lambda (t: T).(eq T t0 t)) H2 t2 H7) in (let H3 \def (eq_ind T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H t2 H7) in (let H4 \def (eq_ind T t2 (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H3 t1 H1) in (eq_ind_r T t1 (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))) (let H8 \def (eq_ind T t2 (\lambda (t: T).(eq T t0 t)) H2 t1 H1) in (ex_intro2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t1 t)) t1 (pr0_refl t1) (pr0_refl t1))) t2 H1)))))) t (sym_eq T t t2 H7))) t3 (sym_eq T t3 t H5) H6))) | (pr0_comp u1 u2 H4 t3 t4 H5 k) \Rightarrow (\lambda (H6: (eq T (THead k u1 t3) t)).(\lambda (H7: (eq T (THead k u2 t4) t2)).(eq_ind T (THead k u1 t3) (\lambda (_: T).((eq T (THead k u2 t4) t2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H8: (eq T (THead k u2 t4) t2)).(eq_ind T (THead k u2 t4) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H9: (pr0 u1 u2)).(\lambda (H10: (pr0 t3 t4)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t1)) H4 (THead k u1 t3) H6) in (eq_ind T (THead k u1 t3) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t t0)) (\lambda (t0: T).(pr0 (THead k u2 t4) t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t0 t)) H2 (THead k u1 t3) H6) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead k u1 t3) H6) in (ex_intro2 T (\lambda (t: T).(pr0 (THead k u1 t3) t)) (\lambda (t: T).(pr0 (THead k u2 t4) t)) (THead k u2 t4) (pr0_comp u1 u2 H9 t3 t4 H10 k) (pr0_refl (THead k u2 t4))))) t1 H0)))) t2 H8)) t H6 H7 H4 H5))) | (pr0_beta u v1 v2 H4 t3 t4 H5) \Rightarrow (\lambda (H6: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) t)).(\lambda (H7: (eq T (THead (Bind Abbr) v2 t4) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (\lambda (_: T).((eq T (THead (Bind Abbr) v2 t4) t2) \to ((pr0 v1 v2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H8: (eq T (THead (Bind Abbr) v2 t4) t2)).(eq_ind T (THead (Bind Abbr) v2 t4) (\lambda (t: T).((pr0 v1 v2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H9: (pr0 v1 v2)).(\lambda (H10: (pr0 t3 t4)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t1)) H4 (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) H6) in (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t4) t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t0 t)) H2 (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) H6) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) H6) in (ex_intro2 T (\lambda (t: T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) u t3)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t4) t)) (THead (Bind Abbr) v2 t4) (pr0_beta u v1 v2 H9 t3 t4 H10) (pr0_refl (THead (Bind Abbr) v2 t4))))) t1 H0)))) t2 H8)) t H6 H7 H4 H5))) | (pr0_upsilon b H4 v1 v2 H5 u1 u2 H6 t3 t4 H7) \Rightarrow (\lambda (H8: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) t)).(\lambda (H9: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (\lambda (_: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t2) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))))) (\lambda (H10: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t2)).(eq_ind T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))))) (\lambda (H11: (not (eq B b Abst))).(\lambda (H12: (pr0 v1 v2)).(\lambda (H13: (pr0 u1 u2)).(\lambda (H14: (pr0 t3 t4)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t1)) H4 (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) H8) in (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t0 t)) H2 (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) H8) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) H8) in (pr0_confluence__pr0_cong_upsilon_refl b H11 u1 u2 H13 t3 t4 H14 v1 v2 v2 H12 (pr0_refl v2)))) t1 H0)))))) t2 H10)) t H8 H9 H4 H5 H6 H7))) | (pr0_delta u1 u2 H4 t3 t4 H5 w H6) \Rightarrow (\lambda (H7: (eq T (THead (Bind Abbr) u1 t3) t)).(\lambda (H8: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (_: T).((eq T (THead (Bind Abbr) u2 w) t2) \to ((pr0 u1 u2) \to ((pr0 t3 t4) \to ((subst0 O u2 t4 w) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))) (\lambda (H9: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t3 t4) \to ((subst0 O u2 t4 w) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0))))))) (\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (pr0 t3 t4)).(\lambda (H12: (subst0 O u2 t4 w)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t1)) H4 (THead (Bind Abbr) u1 t3) H7) in (eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t0 t)) H2 (THead (Bind Abbr) u1 t3) H7) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind Abbr) u1 t3) H7) in (ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u1 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (THead (Bind Abbr) u2 w) (pr0_delta u1 u2 H10 t3 t4 H11 w H12) (pr0_refl (THead (Bind Abbr) u2 w))))) t1 H0))))) t2 H9)) t H7 H8 H4 H5 H6))) | (pr0_zeta b H4 t3 t4 H5 u) \Rightarrow (\lambda (H6: (eq T (THead (Bind b) u (lift (S O) O t3)) t)).(\lambda (H7: (eq T t4 t2)).(eq_ind T (THead (Bind b) u (lift (S O) O t3)) (\lambda (_: T).((eq T t4 t2) \to ((not (eq B b Abst)) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H8: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t3 t) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H9: (not (eq B b Abst))).(\lambda (H10: (pr0 t3 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t1)) H4 (THead (Bind b) u (lift (S O) O t3)) H6) in (eq_ind T (THead (Bind b) u (lift (S O) O t3)) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t0 t)) H2 (THead (Bind b) u (lift (S O) O t3)) H6) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind b) u (lift (S O) O t3)) H6) in (ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind b) u (lift (S O) O t3)) t)) (\lambda (t: T).(pr0 t2 t)) t2 (pr0_zeta b H9 t3 t2 H10 u) (pr0_refl t2)))) t1 H0)))) t4 (sym_eq T t4 t2 H8))) t H6 H7 H4 H5))) | (pr0_epsilon t3 t4 H4 u) \Rightarrow (\lambda (H5: (eq T (THead (Flat Cast) u t3) t)).(\lambda (H6: (eq T t4 t2)).(eq_ind T (THead (Flat Cast) u t3) (\lambda (_: T).((eq T t4 t2) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H7: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t3 t) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H8: (pr0 t3 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t1)) H4 (THead (Flat Cast) u t3) H5) in (eq_ind T (THead (Flat Cast) u t3) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t0 t)) H2 (THead (Flat Cast) u t3) H5) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Cast) u t3) H5) in (ex_intro2 T (\lambda (t: T).(pr0 (THead (Flat Cast) u t3) t)) (\lambda (t: T).(pr0 t2 t)) t2 (pr0_epsilon t3 t2 H8 u) (pr0_refl t2)))) t1 H0))) t4 (sym_eq T t4 t2 H7))) t H5 H6 H4)))]) in (H5 (refl_equal T t) (refl_equal T t2))) t (sym_eq T t t1 H4))) t0 (sym_eq T t0 t H2) H3))) | (pr0_comp u1 u2 H2 t0 t3 H3 k) \Rightarrow (\lambda (H4: (eq T (THead k u1 t0) t)).(\lambda (H5: (eq T (THead k u2 t3) t1)).(eq_ind T (THead k u1 t0) (\lambda (_: T).((eq T (THead k u2 t3) t1) \to ((pr0 u1 u2) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1))))))) (\lambda (H6: (eq T (THead k u2 t3) t1)).(eq_ind T (THead k u2 t3) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t1: T).(pr0 t t1)) (\lambda (t1: T).(pr0 t2 t1)))))) (\lambda (H7: (pr0 u1 u2)).(\lambda (H8: (pr0 t0 t3)).(let H9 \def (match H1 return (\lambda (t0: T).(\lambda (t1: T).(\lambda (_: (pr0 t0 t1)).((eq T t0 t) \to ((eq T t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t4) \Rightarrow (\lambda (H6: (eq T t4 t)).(\lambda (H9: (eq T t4 t2)).(eq_ind T t (\lambda (t: T).((eq T t t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H10: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t2)) H10 (THead k u1 t0) H4) in (eq_ind T (THead k u1 t0) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t4 t)) H6 (THead k u1 t0) H4) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead k u1 t0) H4) in (ex_intro2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 (THead k u1 t0) t)) (THead k u2 t3) (pr0_refl (THead k u2 t3)) (pr0_comp u1 u2 H7 t0 t3 H8 k)))) t2 H0)) t (sym_eq T t t2 H10))) t4 (sym_eq T t4 t H6) H9))) | (pr0_comp u0 u3 H6 t4 t5 H7 k0) \Rightarrow (\lambda (H9: (eq T (THead k0 u0 t4) t)).(\lambda (H10: (eq T (THead k0 u3 t5) t2)).(eq_ind T (THead k0 u0 t4) (\lambda (_: T).((eq T (THead k0 u3 t5) t2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T (THead k0 u3 t5) t2)).(eq_ind T (THead k0 u3 t5) (\lambda (t: T).((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H12: (pr0 u0 u3)).(\lambda (H13: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead k u1 t0) t)) H4 (THead k0 u0 t4) H9) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k0 u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 (THead k0 u3 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u1 t0) (THead k0 u0 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u1 t0) (THead k0 u0 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t0) (THead k0 u0 t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t0) (THead k0 u0 t4) H0) in (eq_ind K k0 (\lambda (k: K).((eq T u1 u0) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 (THead k0 u3 t5) t)))))) (\lambda (H10: (eq T u1 u0)).(eq_ind T u0 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead k0 u2 t3) t0)) (\lambda (t0: T).(pr0 (THead k0 u3 t5) t0))))) (\lambda (H11: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead k0 u2 t3) t0)) (\lambda (t0: T).(pr0 (THead k0 u3 t5) t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead k0 u0 t4) H9) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H8 t4 H11) in (let H6 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 u0 H10) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead k0 u2 t3) t)) (\lambda (t: T).(pr0 (THead k0 u3 t5) t))) (\lambda (x: T).(\lambda (H7: (pr0 u2 x)).(\lambda (H8: (pr0 u3 x)).(ex2_ind T (\lambda (t: T).(pr0 t3 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead k0 u2 t3) t)) (\lambda (t: T).(pr0 (THead k0 u3 t5) t))) (\lambda (x0: T).(\lambda (H9: (pr0 t3 x0)).(\lambda (H12: (pr0 t5 x0)).(ex_intro2 T (\lambda (t: T).(pr0 (THead k0 u2 t3) t)) (\lambda (t: T).(pr0 (THead k0 u3 t5) t)) (THead k0 x x0) (pr0_comp u2 x H7 t3 x0 H9 k0) (pr0_comp u3 x H8 t5 x0 H12 k0))))) (H4 t4 (tlt_head_dx k0 u0 t4) t3 H5 t5 H13))))) (H4 u0 (tlt_head_sx k0 u0 t4) u2 H6 u3 H12))))) t0 (sym_eq T t0 t4 H11))) u1 (sym_eq T u1 u0 H10))) k (sym_eq K k k0 H3))) H2)) H1)))]) in (H1 (refl_equal T (THead k0 u0 t4))))))) t2 H11)) t H9 H10 H6 H7))) | (pr0_beta u v1 v2 H6 t4 t5 H7) \Rightarrow (\lambda (H9: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) t)).(\lambda (H10: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) (\lambda (_: T).((eq T (THead (Bind Abbr) v2 t5) t2) \to ((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Bind Abbr) v2 t5) (\lambda (t: T).((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H12: (pr0 v1 v2)).(\lambda (H13: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead k u1 t0) t)) H4 (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H9) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Appl) v1 (THead (Bind Abst) u t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind Abst) u t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H0) in (eq_ind K (Flat Appl) (\lambda (k: K).((eq T u1 v1) \to ((eq T t0 (THead (Bind Abst) u t4)) \to (ex2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t)))))) (\lambda (H10: (eq T u1 v1)).(eq_ind T v1 (\lambda (_: T).((eq T t0 (THead (Bind Abst) u t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0))))) (\lambda (H11: (eq T t0 (THead (Bind Abst) u t4))).(eq_ind T (THead (Bind Abst) u t4) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H9) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H8 (THead (Bind Abst) u t4) H11) in (let H6 \def (match H5 return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (THead (Bind Abst) u t4)) \to ((eq T t0 t3) \to (ex2 T (\lambda (t1: T).(pr0 (THead (Flat Appl) u2 t3) t1)) (\lambda (t1: T).(pr0 (THead (Bind Abbr) v2 t5) t1)))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Bind Abst) u t4))).(\lambda (H5: (eq T t t3)).(eq_ind T (THead (Bind Abst) u t4) (\lambda (t0: T).((eq T t0 t3) \to (ex2 T (\lambda (t1: T).(pr0 (THead (Flat Appl) u2 t3) t1)) (\lambda (t1: T).(pr0 (THead (Bind Abbr) v2 t5) t1))))) (\lambda (H6: (eq T (THead (Bind Abst) u t4) t3)).(eq_ind T (THead (Bind Abst) u t4) (\lambda (t0: T).(ex2 T (\lambda (t1: T).(pr0 (THead (Flat Appl) u2 t0) t1)) (\lambda (t1: T).(pr0 (THead (Bind Abbr) v2 t5) t1)))) (let H1 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 v1 H10) in (ex2_ind T (\lambda (t0: T).(pr0 u2 t0)) (\lambda (t0: T).(pr0 v2 t0)) (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u t4)) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0))) (\lambda (x: T).(\lambda (H2: (pr0 u2 x)).(\lambda (H3: (pr0 v2 x)).(ex_intro2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u t4)) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)) (THead (Bind Abbr) x t5) (pr0_beta u u2 x H2 t4 t5 H13) (pr0_comp v2 x H3 t5 t5 (pr0_refl t5) (Bind Abbr)))))) (H4 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind Abst) u t4)) u2 H1 v2 H12))) t3 H6)) t (sym_eq T t (THead (Bind Abst) u t4) H0) H5))) | (pr0_comp u0 u3 H0 t1 t2 H4 k0) \Rightarrow (\lambda (H5: (eq T (THead k0 u0 t1) (THead (Bind Abst) u t4))).(\lambda (H8: (eq T (THead k0 u3 t2) t3)).((let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k0 u0 t1) (THead (Bind Abst) u t4) H5) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k0 u0 t1) (THead (Bind Abst) u t4) H5) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 u0 t1) (THead (Bind Abst) u t4) H5) in (eq_ind K (Bind Abst) (\lambda (k: K).((eq T u0 u) \to ((eq T t1 t4) \to ((eq T (THead k u3 t2) t3) \to ((pr0 u0 u3) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))))))))) (\lambda (H6: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq T t1 t4) \to ((eq T (THead (Bind Abst) u3 t2) t3) \to ((pr0 t u3) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))))) (\lambda (H9: (eq T t1 t4)).(eq_ind T t4 (\lambda (t: T).((eq T (THead (Bind Abst) u3 t2) t3) \to ((pr0 u u3) \to ((pr0 t t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0))))))) (\lambda (H11: (eq T (THead (Bind Abst) u3 t2) t3)).(eq_ind T (THead (Bind Abst) u3 t2) (\lambda (t: T).((pr0 u u3) \to ((pr0 t4 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))) (\lambda (_: (pr0 u u3)).(\lambda (H15: (pr0 t4 t2)).(let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 v1 H10) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 v2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t2)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))) (\lambda (x: T).(\lambda (H10: (pr0 u2 x)).(\lambda (H12: (pr0 v2 x)).(ex2_ind T (\lambda (t: T).(pr0 t2 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t2)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))) (\lambda (x0: T).(\lambda (H13: (pr0 t2 x0)).(\lambda (H16: (pr0 t5 x0)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t2)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t)) (THead (Bind Abbr) x x0) (pr0_beta u3 u2 x H10 t2 x0 H13) (pr0_comp v2 x H12 t5 x0 H16 (Bind Abbr)))))) (H4 t4 (tlt_trans (THead (Bind Abst) u t4) t4 (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) (tlt_head_dx (Bind Abst) u t4) (tlt_head_dx (Flat Appl) v1 (THead (Bind Abst) u t4))) t2 H15 t5 H13))))) (H4 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind Abst) u t4)) u2 H7 v2 H12))))) t3 H11)) t1 (sym_eq T t1 t4 H9))) u0 (sym_eq T u0 u H6))) k0 (sym_eq K k0 (Bind Abst) H3))) H2)) H1)) H8 H0 H4))) | (pr0_beta u0 v0 v3 H0 t1 t2 H4) \Rightarrow (\lambda (H5: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u0 t1)) (THead (Bind Abst) u t4))).(\lambda (H8: (eq T (THead (Bind Abbr) v3 t2) t3)).((let H1 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u0 t1)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t4) H5) in (False_ind ((eq T (THead (Bind Abbr) v3 t2) t3) \to ((pr0 v0 v3) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t)))))) H1)) H8 H0 H4))) | (pr0_upsilon b H0 v0 v3 H4 u0 u3 H5 t1 t2 H8) \Rightarrow (\lambda (H11: (eq T (THead (Flat Appl) v0 (THead (Bind b) u0 t1)) (THead (Bind Abst) u t4))).(\lambda (H12: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v3) t2)) t3)).((let H1 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind b) u0 t1)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t4) H11) in (False_ind ((eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v3) t2)) t3) \to ((not (eq B b Abst)) \to ((pr0 v0 v3) \to ((pr0 u0 u3) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t)))))))) H1)) H12 H0 H4 H5 H8))) | (pr0_delta u0 u3 H0 t1 t2 H4 w H5) \Rightarrow (\lambda (H8: (eq T (THead (Bind Abbr) u0 t1) (THead (Bind Abst) u t4))).(\lambda (H11: (eq T (THead (Bind Abbr) u3 w) t3)).((let H1 \def (eq_ind T (THead (Bind Abbr) u0 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Abst) u t4) H8) in (False_ind ((eq T (THead (Bind Abbr) u3 w) t3) \to ((pr0 u0 u3) \to ((pr0 t1 t2) \to ((subst0 O u3 t2 w) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))))))) H1)) H11 H0 H4 H5))) | (pr0_zeta b H0 t1 t2 H4 u0) \Rightarrow (\lambda (H5: (eq T (THead (Bind b) u0 (lift (S O) O t1)) (THead (Bind Abst) u t4))).(\lambda (H8: (eq T t2 t3)).((let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t1) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t1) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u0 (lift (S O) O t1)) (THead (Bind Abst) u t4) H5) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b) u0 (lift (S O) O t1)) (THead (Bind Abst) u t4) H5) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u0 (lift (S O) O t1)) (THead (Bind Abst) u t4) H5) in (eq_ind B Abst (\lambda (b0: B).((eq T u0 u) \to ((eq T (lift (S O) O t1) t4) \to ((eq T t2 t3) \to ((not (eq B b0 Abst)) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))))))))) (\lambda (H6: (eq T u0 u)).(eq_ind T u (\lambda (_: T).((eq T (lift (S O) O t1) t4) \to ((eq T t2 t3) \to ((not (eq B Abst Abst)) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))))) (\lambda (H9: (eq T (lift (S O) O t1) t4)).(eq_ind T (lift (S O) O t1) (\lambda (_: T).((eq T t2 t3) \to ((not (eq B Abst Abst)) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0))))))) (\lambda (H7: (eq T t2 t3)).(eq_ind T t3 (\lambda (t: T).((not (eq B Abst Abst)) \to ((pr0 t1 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))) (\lambda (H11: (not (eq B Abst Abst))).(\lambda (_: (pr0 t1 t3)).(let H10 \def (match (H11 (refl_equal B Abst)) return (\lambda (_: False).(ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t)))) with []) in H10))) t2 (sym_eq T t2 t3 H7))) t4 H9)) u0 (sym_eq T u0 u H6))) b (sym_eq B b Abst H3))) H2)) H1)) H8 H0 H4))) | (pr0_epsilon t1 t2 H0 u0) \Rightarrow (\lambda (H4: (eq T (THead (Flat Cast) u0 t1) (THead (Bind Abst) u t4))).(\lambda (H5: (eq T t2 t3)).((let H1 \def (eq_ind T (THead (Flat Cast) u0 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t4) H4) in (False_ind ((eq T t2 t3) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))))) H1)) H5 H0)))]) in (H6 (refl_equal T (THead (Bind Abst) u t4)) (refl_equal T t3))))) t0 (sym_eq T t0 (THead (Bind Abst) u t4) H11))) u1 (sym_eq T u1 v1 H10))) k (sym_eq K k (Flat Appl) H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)))))))) t2 H11)) t H9 H10 H6 H7))) | (pr0_upsilon b H6 v1 v2 H7 u0 u3 H8 t4 t5 H9) \Rightarrow (\lambda (H10: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) t)).(\lambda (H11: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) (\lambda (_: T).((eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t2) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))))) (\lambda (H12: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))))))) (\lambda (H13: (not (eq B b Abst))).(\lambda (H14: (pr0 v1 v2)).(\lambda (H15: (pr0 u0 u3)).(\lambda (H16: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead k u1 t0) t)) H4 (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) H10) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Appl) v1 (THead (Bind b) u0 t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind b) u0 t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t0) (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) H0) in (eq_ind K (Flat Appl) (\lambda (k: K).((eq T u1 v1) \to ((eq T t0 (THead (Bind b) u0 t4)) \to (ex2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t)))))) (\lambda (H11: (eq T u1 v1)).(eq_ind T v1 (\lambda (_: T).((eq T t0 (THead (Bind b) u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0))))) (\lambda (H12: (eq T t0 (THead (Bind b) u0 t4))).(eq_ind T (THead (Bind b) u0 t4) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) H10) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H8 (THead (Bind b) u0 t4) H12) in (let H6 \def (match H5 return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (THead (Bind b) u0 t4)) \to ((eq T t0 t3) \to (ex2 T (\lambda (t1: T).(pr0 (THead (Flat Appl) u2 t3) t1)) (\lambda (t1: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t1)))))))) with [(pr0_refl t) \Rightarrow (\lambda (H0: (eq T t (THead (Bind b) u0 t4))).(\lambda (H5: (eq T t t3)).(eq_ind T (THead (Bind b) u0 t4) (\lambda (t0: T).((eq T t0 t3) \to (ex2 T (\lambda (t1: T).(pr0 (THead (Flat Appl) u2 t3) t1)) (\lambda (t1: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t1))))) (\lambda (H6: (eq T (THead (Bind b) u0 t4) t3)).(eq_ind T (THead (Bind b) u0 t4) (\lambda (t0: T).(ex2 T (\lambda (t1: T).(pr0 (THead (Flat Appl) u2 t0) t1)) (\lambda (t1: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t1)))) (let H1 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 v1 H11) in (ex2_ind T (\lambda (t0: T).(pr0 u2 t0)) (\lambda (t0: T).(pr0 v2 t0)) (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u0 t4)) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0))) (\lambda (x: T).(\lambda (H2: (pr0 u2 x)).(\lambda (H3: (pr0 v2 x)).(pr0_confluence__pr0_cong_upsilon_refl b H13 u0 u3 H15 t4 t5 H16 u2 v2 x H2 H3)))) (H4 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind b) u0 t4)) u2 H1 v2 H14))) t3 H6)) t (sym_eq T t (THead (Bind b) u0 t4) H0) H5))) | (pr0_comp u4 u5 H0 t1 t2 H4 k0) \Rightarrow (\lambda (H5: (eq T (THead k0 u4 t1) (THead (Bind b) u0 t4))).(\lambda (H10: (eq T (THead k0 u5 t2) t3)).((let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k0 u4 t1) (THead (Bind b) u0 t4) H5) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u4 | (TLRef _) \Rightarrow u4 | (THead _ t _) \Rightarrow t])) (THead k0 u4 t1) (THead (Bind b) u0 t4) H5) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k _ _) \Rightarrow k])) (THead k0 u4 t1) (THead (Bind b) u0 t4) H5) in (eq_ind K (Bind b) (\lambda (k: K).((eq T u4 u0) \to ((eq T t1 t4) \to ((eq T (THead k u5 t2) t3) \to ((pr0 u4 u5) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))))))))) (\lambda (H6: (eq T u4 u0)).(eq_ind T u0 (\lambda (t: T).((eq T t1 t4) \to ((eq T (THead (Bind b) u5 t2) t3) \to ((pr0 t u5) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))))) (\lambda (H12: (eq T t1 t4)).(eq_ind T t4 (\lambda (t: T).((eq T (THead (Bind b) u5 t2) t3) \to ((pr0 u0 u5) \to ((pr0 t t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0))))))) (\lambda (H8: (eq T (THead (Bind b) u5 t2) t3)).(eq_ind T (THead (Bind b) u5 t2) (\lambda (t: T).((pr0 u0 u5) \to ((pr0 t4 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))) (\lambda (H17: (pr0 u0 u5)).(\lambda (H18: (pr0 t4 t2)).(let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 v1 H11) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 v2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u5 t2)) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x: T).(\lambda (H9: (pr0 u2 x)).(\lambda (H11: (pr0 v2 x)).(ex2_ind T (\lambda (t: T).(pr0 t2 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u5 t2)) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x0: T).(\lambda (H14: (pr0 t2 x0)).(\lambda (H16: (pr0 t5 x0)).(ex2_ind T (\lambda (t: T).(pr0 u5 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind b) u5 t2)) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x1: T).(\lambda (H15: (pr0 u5 x1)).(\lambda (H19: (pr0 u3 x1)).(pr0_confluence__pr0_cong_upsilon_cong b H13 u2 v2 x H9 H11 t2 t5 x0 H14 H16 u5 u3 x1 H15 H19)))) (H4 u0 (tlt_trans (THead (Bind b) u0 t4) u0 (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) (tlt_head_sx (Bind b) u0 t4) (tlt_head_dx (Flat Appl) v1 (THead (Bind b) u0 t4))) u5 H17 u3 H15))))) (H4 t4 (tlt_trans (THead (Bind b) u0 t4) t4 (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) (tlt_head_dx (Bind b) u0 t4) (tlt_head_dx (Flat Appl) v1 (THead (Bind b) u0 t4))) t2 H18 t5 H16))))) (H4 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind b) u0 t4)) u2 H7 v2 H14))))) t3 H8)) t1 (sym_eq T t1 t4 H12))) u4 (sym_eq T u4 u0 H6))) k0 (sym_eq K k0 (Bind b) H3))) H2)) H1)) H10 H0 H4))) | (pr0_beta u v0 v3 H0 t1 t2 H4) \Rightarrow (\lambda (H5: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u t1)) (THead (Bind b) u0 t4))).(\lambda (H10: (eq T (THead (Bind Abbr) v3 t2) t3)).((let H1 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u t1)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 t4) H5) in (False_ind ((eq T (THead (Bind Abbr) v3 t2) t3) \to ((pr0 v0 v3) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t)))))) H1)) H10 H0 H4))) | (pr0_upsilon b0 H0 v0 v3 H4 u4 u5 H5 t1 t2 H10) \Rightarrow (\lambda (H13: (eq T (THead (Flat Appl) v0 (THead (Bind b0) u4 t1)) (THead (Bind b) u0 t4))).(\lambda (H14: (eq T (THead (Bind b0) u5 (THead (Flat Appl) (lift (S O) O v3) t2)) t3)).((let H1 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind b0) u4 t1)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 t4) H13) in (False_ind ((eq T (THead (Bind b0) u5 (THead (Flat Appl) (lift (S O) O v3) t2)) t3) \to ((not (eq B b0 Abst)) \to ((pr0 v0 v3) \to ((pr0 u4 u5) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t)))))))) H1)) H14 H0 H4 H5 H10))) | (pr0_delta u4 u5 H0 t1 t2 H4 w H5) \Rightarrow (\lambda (H10: (eq T (THead (Bind Abbr) u4 t1) (THead (Bind b) u0 t4))).(\lambda (H17: (eq T (THead (Bind Abbr) u5 w) t3)).((let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u4 t1) (THead (Bind b) u0 t4) H10) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u4 | (TLRef _) \Rightarrow u4 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u4 t1) (THead (Bind b) u0 t4) H10) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (THead (Bind Abbr) u4 t1) (THead (Bind b) u0 t4) H10) in (eq_ind B Abbr (\lambda (b: B).((eq T u4 u0) \to ((eq T t1 t4) \to ((eq T (THead (Bind Abbr) u5 w) t3) \to ((pr0 u4 u5) \to ((pr0 t1 t2) \to ((subst0 O u5 t2 w) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t)))))))))) (\lambda (H6: (eq T u4 u0)).(eq_ind T u0 (\lambda (t: T).((eq T t1 t4) \to ((eq T (THead (Bind Abbr) u5 w) t3) \to ((pr0 t u5) \to ((pr0 t1 t2) \to ((subst0 O u5 t2 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0))))))))) (\lambda (H8: (eq T t1 t4)).(eq_ind T t4 (\lambda (t: T).((eq T (THead (Bind Abbr) u5 w) t3) \to ((pr0 u0 u5) \to ((pr0 t t2) \to ((subst0 O u5 t2 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))))) (\lambda (H18: (eq T (THead (Bind Abbr) u5 w) t3)).(eq_ind T (THead (Bind Abbr) u5 w) (\lambda (t: T).((pr0 u0 u5) \to ((pr0 t4 t2) \to ((subst0 O u5 t2 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0))))))) (\lambda (H19: (pr0 u0 u5)).(\lambda (H20: (pr0 t4 t2)).(\lambda (H21: (subst0 O u5 t2 w)).(let H9 \def (eq_ind_r B b (\lambda (b: B).(\forall (v: T).((tlt v (THead (Flat Appl) v1 (THead (Bind b) u0 t4))) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)))))))))) H4 Abbr H3) in (let H12 \def (eq_ind_r B b (\lambda (b: B).(eq T t0 (THead (Bind b) u0 t4))) H12 Abbr H3) in (let H13 \def (eq_ind_r B b (\lambda (b: B).(not (eq B b Abst))) H13 Abbr H3) in (let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 v1 H11) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 v2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x: T).(\lambda (H11: (pr0 u2 x)).(\lambda (H14: (pr0 v2 x)).(ex2_ind T (\lambda (t: T).(pr0 t2 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x0: T).(\lambda (H16: (pr0 t2 x0)).(\lambda (H22: (pr0 t5 x0)).(ex2_ind T (\lambda (t: T).(pr0 u5 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abbr) u5 w)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x1: T).(\lambda (H15: (pr0 u5 x1)).(\lambda (H23: (pr0 u3 x1)).(pr0_confluence__pr0_cong_upsilon_delta H13 u5 t2 w H21 u2 v2 x H11 H14 t5 x0 H16 H22 u3 x1 H15 H23)))) (H9 u0 (tlt_trans (THead (Bind Abbr) u0 t4) u0 (THead (Flat Appl) v1 (THead (Bind Abbr) u0 t4)) (tlt_head_sx (Bind Abbr) u0 t4) (tlt_head_dx (Flat Appl) v1 (THead (Bind Abbr) u0 t4))) u5 H19 u3 H15))))) (H9 t4 (tlt_trans (THead (Bind Abbr) u0 t4) t4 (THead (Flat Appl) v1 (THead (Bind Abbr) u0 t4)) (tlt_head_dx (Bind Abbr) u0 t4) (tlt_head_dx (Flat Appl) v1 (THead (Bind Abbr) u0 t4))) t2 H20 t5 H16))))) (H9 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind Abbr) u0 t4)) u2 H7 v2 H14))))))))) t3 H18)) t1 (sym_eq T t1 t4 H8))) u4 (sym_eq T u4 u0 H6))) b H3)) H2)) H1)) H17 H0 H4 H5))) | (pr0_zeta b0 H0 t1 t2 H4 u) \Rightarrow (\lambda (H5: (eq T (THead (Bind b0) u (lift (S O) O t1)) (THead (Bind b) u0 t4))).(\lambda (H10: (eq T t2 t3)).((let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t1) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t1) | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) u (lift (S O) O t1)) (THead (Bind b) u0 t4) H5) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b0) u (lift (S O) O t1)) (THead (Bind b) u0 t4) H5) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u (lift (S O) O t1)) (THead (Bind b) u0 t4) H5) in (eq_ind B b (\lambda (b1: B).((eq T u u0) \to ((eq T (lift (S O) O t1) t4) \to ((eq T t2 t3) \to ((not (eq B b1 Abst)) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))))))))) (\lambda (H6: (eq T u u0)).(eq_ind T u0 (\lambda (_: T).((eq T (lift (S O) O t1) t4) \to ((eq T t2 t3) \to ((not (eq B b Abst)) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))))) (\lambda (H13: (eq T (lift (S O) O t1) t4)).(eq_ind T (lift (S O) O t1) (\lambda (_: T).((eq T t2 t3) \to ((not (eq B b Abst)) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0))))))) (\lambda (H8: (eq T t2 t3)).(eq_ind T t3 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t1 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))) (\lambda (H17: (not (eq B b Abst))).(\lambda (H18: (pr0 t1 t3)).(let H9 \def (eq_ind_r T t4 (\lambda (t: T).(\forall (v: T).((tlt v (THead (Flat Appl) v1 (THead (Bind b) u0 t))) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H4 (lift (S O) O t1) H13) in (let H12 \def (eq_ind_r T t4 (\lambda (t: T).(eq T t0 (THead (Bind b) u0 t))) H12 (lift (S O) O t1) H13) in (let H16 \def (eq_ind_r T t4 (\lambda (t: T).(pr0 t t5)) H16 (lift (S O) O t1) H13) in (ex2_ind T (\lambda (t3: T).(eq T t5 (lift (S O) O t3))) (\lambda (t3: T).(pr0 t1 t3)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) (\lambda (x: T).(\lambda (H19: (eq T t5 (lift (S O) O x))).(\lambda (H20: (pr0 t1 x)).(eq_ind_r T (lift (S O) O x) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t)) t0)))) (let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 v1 H11) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 v2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x))) t))) (\lambda (x0: T).(\lambda (H11: (pr0 u2 x0)).(\lambda (H14: (pr0 v2 x0)).(ex2_ind T (\lambda (t: T).(pr0 x t)) (\lambda (t: T).(pr0 t3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x))) t))) (\lambda (x1: T).(\lambda (H21: (pr0 x x1)).(\lambda (H22: (pr0 t3 x1)).(pr0_confluence__pr0_cong_upsilon_zeta b H17 u0 u3 H15 u2 v2 x0 H11 H14 x t3 x1 H21 H22)))) (H9 t1 (tlt_trans (THead (Bind b) u0 (lift (S O) O t1)) t1 (THead (Flat Appl) v1 (THead (Bind b) u0 (lift (S O) O t1))) (lift_tlt_dx (Bind b) u0 t1 (S O) O) (tlt_head_dx (Flat Appl) v1 (THead (Bind b) u0 (lift (S O) O t1)))) x H20 t3 H18))))) (H9 v1 (tlt_head_sx (Flat Appl) v1 (THead (Bind b) u0 (lift (S O) O t1))) u2 H7 v2 H14))) t5 H19)))) (pr0_gen_lift t1 t5 (S O) O H16))))))) t2 (sym_eq T t2 t3 H8))) t4 H13)) u (sym_eq T u u0 H6))) b0 (sym_eq B b0 b H3))) H2)) H1)) H10 H0 H4))) | (pr0_epsilon t1 t2 H0 u) \Rightarrow (\lambda (H4: (eq T (THead (Flat Cast) u t1) (THead (Bind b) u0 t4))).(\lambda (H5: (eq T t2 t3)).((let H1 \def (eq_ind T (THead (Flat Cast) u t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 t4) H4) in (False_ind ((eq T t2 t3) \to ((pr0 t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))))) H1)) H5 H0)))]) in (H6 (refl_equal T (THead (Bind b) u0 t4)) (refl_equal T t3))))) t0 (sym_eq T t0 (THead (Bind b) u0 t4) H12))) u1 (sym_eq T u1 v1 H11))) k (sym_eq K k (Flat Appl) H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind b) u0 t4)))))))))) t2 H12)) t H10 H11 H6 H7 H8 H9))) | (pr0_delta u0 u3 H6 t4 t5 H7 w H8) \Rightarrow (\lambda (H9: (eq T (THead (Bind Abbr) u0 t4) t)).(\lambda (H10: (eq T (THead (Bind Abbr) u3 w) t2)).(eq_ind T (THead (Bind Abbr) u0 t4) (\lambda (_: T).((eq T (THead (Bind Abbr) u3 w) t2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to ((subst0 O u3 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))))) (\lambda (H11: (eq T (THead (Bind Abbr) u3 w) t2)).(eq_ind T (THead (Bind Abbr) u3 w) (\lambda (t: T).((pr0 u0 u3) \to ((pr0 t4 t5) \to ((subst0 O u3 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t t0))))))) (\lambda (H12: (pr0 u0 u3)).(\lambda (H13: (pr0 t4 t5)).(\lambda (H14: (subst0 O u3 t5 w)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead k u1 t0) t)) H4 (THead (Bind Abbr) u0 t4) H9) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Bind Abbr) u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 w) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u1 t0) (THead (Bind Abbr) u0 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u1 t0) (THead (Bind Abbr) u0 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t0) (THead (Bind Abbr) u0 t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t0) (THead (Bind Abbr) u0 t4) H0) in (eq_ind K (Bind Abbr) (\lambda (k: K).((eq T u1 u0) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w) t)))))) (\lambda (H10: (eq T u1 u0)).(eq_ind T u0 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 w) t0))))) (\lambda (H11: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 w) t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind Abbr) u0 t4) H9) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H8 t4 H11) in (let H6 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 u0 H10) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w) t))) (\lambda (x: T).(\lambda (H7: (pr0 u2 x)).(\lambda (H8: (pr0 u3 x)).(ex2_ind T (\lambda (t: T).(pr0 t3 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w) t))) (\lambda (x0: T).(\lambda (H9: (pr0 t3 x0)).(\lambda (H12: (pr0 t5 x0)).(pr0_confluence__pr0_cong_delta u3 t5 w H14 u2 x H7 H8 t3 x0 H9 H12)))) (H4 t4 (tlt_head_dx (Bind Abbr) u0 t4) t3 H5 t5 H13))))) (H4 u0 (tlt_head_sx (Bind Abbr) u0 t4) u2 H6 u3 H12))))) t0 (sym_eq T t0 t4 H11))) u1 (sym_eq T u1 u0 H10))) k (sym_eq K k (Bind Abbr) H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Bind Abbr) u0 t4)))))))) t2 H11)) t H9 H10 H6 H7 H8))) | (pr0_zeta b H6 t4 t5 H7 u) \Rightarrow (\lambda (H9: (eq T (THead (Bind b) u (lift (S O) O t4)) t)).(\lambda (H10: (eq T t5 t2)).(eq_ind T (THead (Bind b) u (lift (S O) O t4)) (\lambda (_: T).((eq T t5 t2) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H12: (not (eq B b Abst))).(\lambda (H13: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead k u1 t0) t)) H4 (THead (Bind b) u (lift (S O) O t4)) H9) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Bind b) u (lift (S O) O t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u1 t0) (THead (Bind b) u (lift (S O) O t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u1 t0) (THead (Bind b) u (lift (S O) O t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t0) (THead (Bind b) u (lift (S O) O t4)) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t0) (THead (Bind b) u (lift (S O) O t4)) H0) in (eq_ind K (Bind b) (\lambda (k: K).((eq T u1 u) \to ((eq T t0 (lift (S O) O t4)) \to (ex2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 t2 t)))))) (\lambda (H10: (eq T u1 u)).(eq_ind T u (\lambda (_: T).((eq T t0 (lift (S O) O t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H11: (eq T t0 (lift (S O) O t4))).(eq_ind T (lift (S O) O t4) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind b) u (lift (S O) O t4)) H9) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H8 (lift (S O) O t4) H11) in (ex2_ind T (\lambda (t2: T).(eq T t3 (lift (S O) O t2))) (\lambda (t2: T).(pr0 t4 t2)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 t3) t)) (\lambda (t: T).(pr0 t2 t))) (\lambda (x: T).(\lambda (H6: (eq T t3 (lift (S O) O x))).(\lambda (H8: (pr0 t4 x)).(eq_ind_r T (lift (S O) O x) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 t) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 u H10) in (ex2_ind T (\lambda (t: T).(pr0 x t)) (\lambda (t: T).(pr0 t2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (lift (S O) O x)) t)) (\lambda (t: T).(pr0 t2 t))) (\lambda (x0: T).(\lambda (H9: (pr0 x x0)).(\lambda (H13: (pr0 t2 x0)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (lift (S O) O x)) t)) (\lambda (t: T).(pr0 t2 t)) x0 (pr0_zeta b H12 x x0 H9 u2) H13)))) (H4 t4 (lift_tlt_dx (Bind b) u t4 (S O) O) x H8 t2 H13))) t3 H6)))) (pr0_gen_lift t4 t3 (S O) O H5)))) t0 (sym_eq T t0 (lift (S O) O t4) H11))) u1 (sym_eq T u1 u H10))) k (sym_eq K k (Bind b) H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Bind b) u (lift (S O) O t4)))))))) t5 (sym_eq T t5 t2 H11))) t H9 H10 H6 H7))) | (pr0_epsilon t4 t5 H6 u) \Rightarrow (\lambda (H9: (eq T (THead (Flat Cast) u t4) t)).(\lambda (H10: (eq T t5 t2)).(eq_ind T (THead (Flat Cast) u t4) (\lambda (_: T).((eq T t5 t2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H11: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H12: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead k u1 t0) t)) H4 (THead (Flat Cast) u t4) H9) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Cast) u t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead k u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead k u1 t0) (THead (Flat Cast) u t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k u1 t0) (THead (Flat Cast) u t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t0) (THead (Flat Cast) u t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t0) (THead (Flat Cast) u t4) H0) in (eq_ind K (Flat Cast) (\lambda (k: K).((eq T u1 u) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 (THead k u2 t3) t)) (\lambda (t: T).(pr0 t2 t)))))) (\lambda (H10: (eq T u1 u)).(eq_ind T u (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Flat Cast) u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H11: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Flat Cast) u2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Cast) u t4) H9) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H8 t4 H11) in (let H6 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 u H10) in (ex2_ind T (\lambda (t: T).(pr0 t3 t)) (\lambda (t: T).(pr0 t2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Flat Cast) u2 t3) t)) (\lambda (t: T).(pr0 t2 t))) (\lambda (x: T).(\lambda (H7: (pr0 t3 x)).(\lambda (H8: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Flat Cast) u2 t3) t)) (\lambda (t: T).(pr0 t2 t)) x (pr0_epsilon t3 x H7 u2) H8)))) (H4 t4 (tlt_head_dx (Flat Cast) u t4) t3 H5 t2 H12))))) t0 (sym_eq T t0 t4 H11))) u1 (sym_eq T u1 u H10))) k (sym_eq K k (Flat Cast) H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Flat Cast) u t4)))))) t5 (sym_eq T t5 t2 H11))) t H9 H10 H6)))]) in (H9 (refl_equal T t) (refl_equal T t2))))) t1 H6)) t H4 H5 H2 H3))) | (pr0_beta u v1 v2 H2 t0 t3 H3) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)).(\lambda (H5: (eq T (THead (Bind Abbr) v2 t3) t1)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (_: T).((eq T (THead (Bind Abbr) v2 t3) t1) \to ((pr0 v1 v2) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1))))))) (\lambda (H6: (eq T (THead (Bind Abbr) v2 t3) t1)).(eq_ind T (THead (Bind Abbr) v2 t3) (\lambda (t: T).((pr0 v1 v2) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t1: T).(pr0 t t1)) (\lambda (t1: T).(pr0 t2 t1)))))) (\lambda (H7: (pr0 v1 v2)).(\lambda (H8: (pr0 t0 t3)).(let H9 \def (match H1 return (\lambda (t0: T).(\lambda (t1: T).(\lambda (_: (pr0 t0 t1)).((eq T t0 t) \to ((eq T t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t4) \Rightarrow (\lambda (H6: (eq T t4 t)).(\lambda (H9: (eq T t4 t2)).(eq_ind T t (\lambda (t: T).((eq T t t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H10: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t2)) H10 (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) H4) in (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t4 t)) H6 (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) H4) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) H4) in (ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)) (THead (Bind Abbr) v2 t3) (pr0_refl (THead (Bind Abbr) v2 t3)) (pr0_beta u v1 v2 H7 t0 t3 H8)))) t2 H0)) t (sym_eq T t t2 H10))) t4 (sym_eq T t4 t H6) H9))) | (pr0_comp u1 u2 H6 t4 t5 H7 k) \Rightarrow (\lambda (H9: (eq T (THead k u1 t4) t)).(\lambda (H10: (eq T (THead k u2 t5) t2)).(eq_ind T (THead k u1 t4) (\lambda (_: T).((eq T (THead k u2 t5) t2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T (THead k u2 t5) t2)).(eq_ind T (THead k u2 t5) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H12: (pr0 u1 u2)).(\lambda (H13: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)) H4 (THead k u1 t4) H9) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k u1 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead k u2 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead k u1 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead (Bind Abst) u t0) | (TLRef _) \Rightarrow (THead (Bind Abst) u t0) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead k u1 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead k u1 t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow (Flat Appl) | (TLRef _) \Rightarrow (Flat Appl) | (THead k _ _) \Rightarrow k])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead k u1 t4) H0) in (eq_ind K (Flat Appl) (\lambda (k: K).((eq T v1 u1) \to ((eq T (THead (Bind Abst) u t0) t4) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead k u2 t5) t)))))) (\lambda (H10: (eq T v1 u1)).(eq_ind T u1 (\lambda (_: T).((eq T (THead (Bind Abst) u t0) t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0))))) (\lambda (H11: (eq T (THead (Bind Abst) u t0) t4)).(eq_ind T (THead (Bind Abst) u t0) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0)))) (let H4 \def (eq_ind_r K k (\lambda (k: K).(eq T (THead k u1 t4) t)) H9 (Flat Appl) H3) in (let H5 \def (eq_ind_r T t4 (\lambda (t: T).(pr0 t t5)) H13 (THead (Bind Abst) u t0) H11) in (let H6 \def (match H5 return (\lambda (t: T).(\lambda (t1: T).(\lambda (_: (pr0 t t1)).((eq T t (THead (Bind Abst) u t0)) \to ((eq T t1 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0)))))))) with [(pr0_refl t2) \Rightarrow (\lambda (H0: (eq T t2 (THead (Bind Abst) u t0))).(\lambda (H1: (eq T t2 t5)).(eq_ind T (THead (Bind Abst) u t0) (\lambda (t: T).((eq T t t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0))))) (\lambda (H2: (eq T (THead (Bind Abst) u t0) t5)).(eq_ind T (THead (Bind Abst) u t0) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t) t0)))) (let H3 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Flat Appl) u1 t0) t)) H4 (THead (Bind Abst) u t0) H11) in (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) u1 (THead (Bind Abst) u t0)) H3) in (let H5 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H7 u1 H10) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 u2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u t0)) t))) (\lambda (x: T).(\lambda (H6: (pr0 v2 x)).(\lambda (H7: (pr0 u2 x)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u t0)) t)) (THead (Bind Abbr) x t3) (pr0_comp v2 x H6 t3 t3 (pr0_refl t3) (Bind Abbr)) (pr0_beta u u2 x H7 t0 t3 H8))))) (H4 u1 (tlt_head_sx (Flat Appl) u1 (THead (Bind Abst) u t0)) v2 H5 u2 H12))))) t5 H2)) t2 (sym_eq T t2 (THead (Bind Abst) u t0) H0) H1))) | (pr0_comp u0 u3 H0 t2 t6 H1 k) \Rightarrow (\lambda (H5: (eq T (THead k u0 t2) (THead (Bind Abst) u t0))).(\lambda (H13: (eq T (THead k u3 t6) t5)).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t2 | (TLRef _) \Rightarrow t2 | (THead _ _ t) \Rightarrow t])) (THead k u0 t2) (THead (Bind Abst) u t0) H5) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k u0 t2) (THead (Bind Abst) u t0) H5) in ((let H6 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u0 t2) (THead (Bind Abst) u t0) H5) in (eq_ind K (Bind Abst) (\lambda (k0: K).((eq T u0 u) \to ((eq T t2 t0) \to ((eq T (THead k0 u3 t6) t5) \to ((pr0 u0 u3) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t5) t))))))))) (\lambda (H9: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq T t2 t0) \to ((eq T (THead (Bind Abst) u3 t6) t5) \to ((pr0 t u3) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0)))))))) (\lambda (H14: (eq T t2 t0)).(eq_ind T t0 (\lambda (t: T).((eq T (THead (Bind Abst) u3 t6) t5) \to ((pr0 u u3) \to ((pr0 t t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0))))))) (\lambda (H15: (eq T (THead (Bind Abst) u3 t6) t5)).(eq_ind T (THead (Bind Abst) u3 t6) (\lambda (t: T).((pr0 u u3) \to ((pr0 t0 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t) t0)))))) (\lambda (_: (pr0 u u3)).(\lambda (H17: (pr0 t0 t6)).(let H4 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Flat Appl) u1 t0) t)) H4 (THead (Bind Abst) u t0) H11) in (let H11 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) u1 (THead (Bind Abst) u t0)) H4) in (let H7 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H7 u1 H10) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 u2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t6)) t))) (\lambda (x: T).(\lambda (H10: (pr0 v2 x)).(\lambda (H12: (pr0 u2 x)).(ex2_ind T (\lambda (t: T).(pr0 t6 t)) (\lambda (t: T).(pr0 t3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t6)) t))) (\lambda (x0: T).(\lambda (H8: (pr0 t6 x0)).(\lambda (H18: (pr0 t3 x0)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 (THead (Bind Abst) u3 t6)) t)) (THead (Bind Abbr) x x0) (pr0_comp v2 x H10 t3 x0 H18 (Bind Abbr)) (pr0_beta u3 u2 x H12 t6 x0 H8))))) (H11 t0 (tlt_trans (THead (Bind Abst) u t0) t0 (THead (Flat Appl) u1 (THead (Bind Abst) u t0)) (tlt_head_dx (Bind Abst) u t0) (tlt_head_dx (Flat Appl) u1 (THead (Bind Abst) u t0))) t6 H17 t3 H8))))) (H11 u1 (tlt_head_sx (Flat Appl) u1 (THead (Bind Abst) u t0)) v2 H7 u2 H12))))))) t5 H15)) t2 (sym_eq T t2 t0 H14))) u0 (sym_eq T u0 u H9))) k (sym_eq K k (Bind Abst) H6))) H3)) H2)) H13 H0 H1))) | (pr0_beta u0 v0 v3 H0 t2 t6 H1) \Rightarrow (\lambda (H4: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u0 t2)) (THead (Bind Abst) u t0))).(\lambda (H11: (eq T (THead (Bind Abbr) v3 t6) t5)).((let H2 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u0 t2)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t0) H4) in (False_ind ((eq T (THead (Bind Abbr) v3 t6) t5) \to ((pr0 v0 v3) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t5) t)))))) H2)) H11 H0 H1))) | (pr0_upsilon b H0 v0 v3 H1 u0 u3 H4 t2 t6 H11) \Rightarrow (\lambda (H12: (eq T (THead (Flat Appl) v0 (THead (Bind b) u0 t2)) (THead (Bind Abst) u t0))).(\lambda (H13: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v3) t6)) t5)).((let H2 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind b) u0 t2)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t0) H12) in (False_ind ((eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v3) t6)) t5) \to ((not (eq B b Abst)) \to ((pr0 v0 v3) \to ((pr0 u0 u3) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t5) t)))))))) H2)) H13 H0 H1 H4 H11))) | (pr0_delta u0 u3 H0 t2 t6 H1 w H4) \Rightarrow (\lambda (H11: (eq T (THead (Bind Abbr) u0 t2) (THead (Bind Abst) u t0))).(\lambda (H12: (eq T (THead (Bind Abbr) u3 w) t5)).((let H2 \def (eq_ind T (THead (Bind Abbr) u0 t2) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Abst) u t0) H11) in (False_ind ((eq T (THead (Bind Abbr) u3 w) t5) \to ((pr0 u0 u3) \to ((pr0 t2 t6) \to ((subst0 O u3 t6 w) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t5) t))))))) H2)) H12 H0 H1 H4))) | (pr0_zeta b H0 t2 t6 H1 u0) \Rightarrow (\lambda (H4: (eq T (THead (Bind b) u0 (lift (S O) O t2)) (THead (Bind Abst) u t0))).(\lambda (H11: (eq T t6 t5)).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t2) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t2) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u0 (lift (S O) O t2)) (THead (Bind Abst) u t0) H4) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b) u0 (lift (S O) O t2)) (THead (Bind Abst) u t0) H4) in ((let H5 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u0 (lift (S O) O t2)) (THead (Bind Abst) u t0) H4) in (eq_ind B Abst (\lambda (b0: B).((eq T u0 u) \to ((eq T (lift (S O) O t2) t0) \to ((eq T t6 t5) \to ((not (eq B b0 Abst)) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t5) t))))))))) (\lambda (H6: (eq T u0 u)).(eq_ind T u (\lambda (_: T).((eq T (lift (S O) O t2) t0) \to ((eq T t6 t5) \to ((not (eq B Abst Abst)) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0)))))))) (\lambda (H12: (eq T (lift (S O) O t2) t0)).(eq_ind T (lift (S O) O t2) (\lambda (_: T).((eq T t6 t5) \to ((not (eq B Abst Abst)) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0))))))) (\lambda (H7: (eq T t6 t5)).(eq_ind T t5 (\lambda (t: T).((not (eq B Abst Abst)) \to ((pr0 t2 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u2 t5) t0)))))) (\lambda (H13: (not (eq B Abst Abst))).(\lambda (_: (pr0 t2 t5)).(let H8 \def (match (H13 (refl_equal B Abst)) return (\lambda (_: False).(ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t5) t)))) with []) in H8))) t6 (sym_eq T t6 t5 H7))) t0 H12)) u0 (sym_eq T u0 u H6))) b (sym_eq B b Abst H5))) H3)) H2)) H11 H0 H1))) | (pr0_epsilon t2 t6 H0 u0) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u0 t2) (THead (Bind Abst) u t0))).(\lambda (H4: (eq T t6 t5)).((let H2 \def (eq_ind T (THead (Flat Cast) u0 t2) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t0) H1) in (False_ind ((eq T t6 t5) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u2 t5) t))))) H2)) H4 H0)))]) in (H6 (refl_equal T (THead (Bind Abst) u t0)) (refl_equal T t5))))) t4 H11)) v1 (sym_eq T v1 u1 H10))) k H3)) H2)) H1)))]) in (H1 (refl_equal T (THead k u1 t4))))))) t2 H11)) t H9 H10 H6 H7))) | (pr0_beta u0 v0 v3 H6 t4 t5 H7) \Rightarrow (\lambda (H9: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) t)).(\lambda (H10: (eq T (THead (Bind Abbr) v3 t5) t2)).(eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) (\lambda (_: T).((eq T (THead (Bind Abbr) v3 t5) t2) \to ((pr0 v0 v3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T (THead (Bind Abbr) v3 t5) t2)).(eq_ind T (THead (Bind Abbr) v3 t5) (\lambda (t: T).((pr0 v0 v3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H12: (pr0 v0 v3)).(\lambda (H13: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)) H4 (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) H9) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow (match t return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t0) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ _ t) \Rightarrow (match t return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t0 _) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) H0) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) H0) in (eq_ind T v0 (\lambda (_: T).((eq T u u0) \to ((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0)))))) (\lambda (H10: (eq T u u0)).(eq_ind T u0 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0))))) (\lambda (H11: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) H9) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H8 t4 H11) in (let H6 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H7 v0 H3) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 v3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v3 t5) t))) (\lambda (x: T).(\lambda (H7: (pr0 v2 x)).(\lambda (H8: (pr0 v3 x)).(ex2_ind T (\lambda (t: T).(pr0 t3 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v3 t5) t))) (\lambda (x0: T).(\lambda (H9: (pr0 t3 x0)).(\lambda (H12: (pr0 t5 x0)).(ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v3 t5) t)) (THead (Bind Abbr) x x0) (pr0_comp v2 x H7 t3 x0 H9 (Bind Abbr)) (pr0_comp v3 x H8 t5 x0 H12 (Bind Abbr)))))) (H4 t4 (tlt_trans (THead (Bind Abst) u0 t4) t4 (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)) (tlt_head_dx (Bind Abst) u0 t4) (tlt_head_dx (Flat Appl) v0 (THead (Bind Abst) u0 t4))) t3 H5 t5 H13))))) (H4 v0 (tlt_head_sx (Flat Appl) v0 (THead (Bind Abst) u0 t4)) v2 H6 v3 H12))))) t0 (sym_eq T t0 t4 H11))) u (sym_eq T u u0 H10))) v1 (sym_eq T v1 v0 H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v0 (THead (Bind Abst) u0 t4)))))))) t2 H11)) t H9 H10 H6 H7))) | (pr0_upsilon b H6 v0 v3 H7 u1 u2 H8 t4 t5 H9) \Rightarrow (\lambda (H10: (eq T (THead (Flat Appl) v0 (THead (Bind b) u1 t4)) t)).(\lambda (H11: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t2)).(eq_ind T (THead (Flat Appl) v0 (THead (Bind b) u1 t4)) (\lambda (_: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t2) \to ((not (eq B b Abst)) \to ((pr0 v0 v3) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))))) (\lambda (H12: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t2)).(eq_ind T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 v0 v3) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t t0)))))))) (\lambda (H13: (not (eq B b Abst))).(\lambda (_: (pr0 v0 v3)).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)) H4 (THead (Flat Appl) v0 (THead (Bind b) u1 t4)) H10) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Appl) v0 (THead (Bind b) u1 t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind b) u1 t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow (match t return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t0) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind b) u1 t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ _ t) \Rightarrow (match t return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t0 _) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind b) u1 t4)) H0) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow Abst | (TLRef _) \Rightarrow Abst | (THead _ _ t) \Rightarrow (match t return (\lambda (_: T).B) with [(TSort _) \Rightarrow Abst | (TLRef _) \Rightarrow Abst | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind b) u1 t4)) H0) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Appl) v0 (THead (Bind b) u1 t4)) H0) in (eq_ind T v0 (\lambda (_: T).((eq B Abst b) \to ((eq T u u1) \to ((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t0))))))) (\lambda (H11: (eq B Abst b)).(eq_ind B Abst (\lambda (b: B).((eq T u u1) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t)))))) (\lambda (H12: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abst) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t0))))) (\lambda (H14: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abst) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t0)))) (let H5 \def (eq_ind_r B b (\lambda (b: B).(not (eq B b Abst))) H13 Abst H11) in (let H6 \def (match (H5 (refl_equal B Abst)) return (\lambda (_: False).(ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abst) u2 (THead (Flat Appl) (lift (S O) O v3) t5)) t)))) with []) in H6)) t0 (sym_eq T t0 t4 H14))) u (sym_eq T u u1 H12))) b H11)) v1 (sym_eq T v1 v0 H4))) H3)) H2)) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v0 (THead (Bind b) u1 t4)))))))))) t2 H12)) t H10 H11 H6 H7 H8 H9))) | (pr0_delta u1 u2 H6 t4 t5 H7 w H8) \Rightarrow (\lambda (H9: (eq T (THead (Bind Abbr) u1 t4) t)).(\lambda (H10: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u1 t4) (\lambda (_: T).((eq T (THead (Bind Abbr) u2 w) t2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))))) (\lambda (H11: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t t0))))))) (\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 t4 t5)).(\lambda (_: (subst0 O u2 t5 w)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)) H4 (THead (Bind Abbr) u1 t4) H9) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Bind Abbr) u1 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Bind Abbr) u1 t4))).(let H1 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 t4) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t))) H1)))]) in (H1 (refl_equal T (THead (Bind Abbr) u1 t4)))))))) t2 H11)) t H9 H10 H6 H7 H8))) | (pr0_zeta b H6 t4 t5 H7 u0) \Rightarrow (\lambda (H8: (eq T (THead (Bind b) u0 (lift (S O) O t4)) t)).(\lambda (H9: (eq T t5 t2)).(eq_ind T (THead (Bind b) u0 (lift (S O) O t4)) (\lambda (_: T).((eq T t5 t2) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H10: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (_: (not (eq B b Abst))).(\lambda (_: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)) H4 (THead (Bind b) u0 (lift (S O) O t4)) H8) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Bind b) u0 (lift (S O) O t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Bind b) u0 (lift (S O) O t4)))).(let H1 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 (lift (S O) O t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 t2 t))) H1)))]) in (H1 (refl_equal T (THead (Bind b) u0 (lift (S O) O t4)))))))) t5 (sym_eq T t5 t2 H10))) t H8 H9 H6 H7))) | (pr0_epsilon t4 t5 H6 u0) \Rightarrow (\lambda (H7: (eq T (THead (Flat Cast) u0 t4) t)).(\lambda (H8: (eq T t5 t2)).(eq_ind T (THead (Flat Cast) u0 t4) (\lambda (_: T).((eq T t5 t2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H9: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (_: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) t)) H4 (THead (Flat Cast) u0 t4) H7) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Cast) u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t3) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (THead (Flat Cast) u0 t4))).(let H1 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u0 t4) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t3) t)) (\lambda (t: T).(pr0 t2 t))) H1)))]) in (H1 (refl_equal T (THead (Flat Cast) u0 t4)))))) t5 (sym_eq T t5 t2 H9))) t H7 H8 H6)))]) in (H9 (refl_equal T t) (refl_equal T t2))))) t1 H6)) t H4 H5 H2 H3))) | (pr0_upsilon b H2 v1 v2 H3 u1 u2 H4 t0 t3 H5) \Rightarrow (\lambda (H6: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) t)).(\lambda (H7: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t1)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (\lambda (_: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t1) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1))))))))) (\lambda (H8: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t1)).(eq_ind T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t1: T).(pr0 t t1)) (\lambda (t1: T).(pr0 t2 t1)))))))) (\lambda (H9: (not (eq B b Abst))).(\lambda (H10: (pr0 v1 v2)).(\lambda (H11: (pr0 u1 u2)).(\lambda (H12: (pr0 t0 t3)).(let H13 \def (match H1 return (\lambda (t0: T).(\lambda (t1: T).(\lambda (_: (pr0 t0 t1)).((eq T t0 t) \to ((eq T t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t4) \Rightarrow (\lambda (H8: (eq T t4 t)).(\lambda (H13: (eq T t4 t2)).(eq_ind T t (\lambda (t: T).((eq T t t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H14: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t2)) H14 (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) H6) in (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t4 t)) H8 (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) H6) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) H6) in (ex2_sym T (pr0 (THead (Flat Appl) v1 (THead (Bind b) u1 t0))) (pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3))) (pr0_confluence__pr0_cong_upsilon_refl b H9 u1 u2 H11 t0 t3 H12 v1 v2 v2 H10 (pr0_refl v2))))) t2 H0)) t (sym_eq T t t2 H14))) t4 (sym_eq T t4 t H8) H13))) | (pr0_comp u0 u3 H8 t4 t5 H9 k) \Rightarrow (\lambda (H13: (eq T (THead k u0 t4) t)).(\lambda (H14: (eq T (THead k u3 t5) t2)).(eq_ind T (THead k u0 t4) (\lambda (_: T).((eq T (THead k u3 t5) t2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H15: (eq T (THead k u3 t5) t2)).(eq_ind T (THead k u3 t5) (\lambda (t: T).((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H16: (pr0 u0 u3)).(\lambda (H17: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) t)) H6 (THead k u0 t4) H13) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead k u3 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead k u0 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead (Bind b) u1 t0) | (TLRef _) \Rightarrow (THead (Bind b) u1 t0) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead k u0 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead k u0 t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow (Flat Appl) | (TLRef _) \Rightarrow (Flat Appl) | (THead k _ _) \Rightarrow k])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead k u0 t4) H0) in (eq_ind K (Flat Appl) (\lambda (k: K).((eq T v1 u0) \to ((eq T (THead (Bind b) u1 t0) t4) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead k u3 t5) t)))))) (\lambda (H14: (eq T v1 u0)).(eq_ind T u0 (\lambda (_: T).((eq T (THead (Bind b) u1 t0) t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0))))) (\lambda (H15: (eq T (THead (Bind b) u1 t0) t4)).(eq_ind T (THead (Bind b) u1 t0) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0)))) (let H4 \def (eq_ind_r K k (\lambda (k: K).(eq T (THead k u0 t4) t)) H13 (Flat Appl) H3) in (let H5 \def (eq_ind_r T t4 (\lambda (t: T).(pr0 t t5)) H17 (THead (Bind b) u1 t0) H15) in (let H6 \def (match H5 return (\lambda (t: T).(\lambda (t1: T).(\lambda (_: (pr0 t t1)).((eq T t (THead (Bind b) u1 t0)) \to ((eq T t1 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0)))))))) with [(pr0_refl t2) \Rightarrow (\lambda (H0: (eq T t2 (THead (Bind b) u1 t0))).(\lambda (H1: (eq T t2 t5)).(eq_ind T (THead (Bind b) u1 t0) (\lambda (t: T).((eq T t t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0))))) (\lambda (H2: (eq T (THead (Bind b) u1 t0) t5)).(eq_ind T (THead (Bind b) u1 t0) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t) t0)))) (let H3 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Flat Appl) u0 t0) t)) H4 (THead (Bind b) u1 t0) H15) in (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) u0 (THead (Bind b) u1 t0)) H3) in (let H5 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H10 u0 H14) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 (THead (Bind b) u1 t0)) t))) (\lambda (x: T).(\lambda (H6: (pr0 v2 x)).(\lambda (H7: (pr0 u3 x)).(ex2_sym T (pr0 (THead (Flat Appl) u3 (THead (Bind b) u1 t0))) (pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3))) (pr0_confluence__pr0_cong_upsilon_refl b H9 u1 u2 H11 t0 t3 H12 u3 v2 x H7 H6))))) (H4 u0 (tlt_head_sx (Flat Appl) u0 (THead (Bind b) u1 t0)) v2 H5 u3 H16))))) t5 H2)) t2 (sym_eq T t2 (THead (Bind b) u1 t0) H0) H1))) | (pr0_comp u4 u5 H0 t2 t6 H1 k) \Rightarrow (\lambda (H6: (eq T (THead k u4 t2) (THead (Bind b) u1 t0))).(\lambda (H13: (eq T (THead k u5 t6) t5)).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t2 | (TLRef _) \Rightarrow t2 | (THead _ _ t) \Rightarrow t])) (THead k u4 t2) (THead (Bind b) u1 t0) H6) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u4 | (TLRef _) \Rightarrow u4 | (THead _ t _) \Rightarrow t])) (THead k u4 t2) (THead (Bind b) u1 t0) H6) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u4 t2) (THead (Bind b) u1 t0) H6) in (eq_ind K (Bind b) (\lambda (k0: K).((eq T u4 u1) \to ((eq T t2 t0) \to ((eq T (THead k0 u5 t6) t5) \to ((pr0 u4 u5) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t))))))))) (\lambda (H7: (eq T u4 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t2 t0) \to ((eq T (THead (Bind b) u5 t6) t5) \to ((pr0 t u5) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0)))))))) (\lambda (H17: (eq T t2 t0)).(eq_ind T t0 (\lambda (t: T).((eq T (THead (Bind b) u5 t6) t5) \to ((pr0 u1 u5) \to ((pr0 t t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0))))))) (\lambda (H8: (eq T (THead (Bind b) u5 t6) t5)).(eq_ind T (THead (Bind b) u5 t6) (\lambda (t: T).((pr0 u1 u5) \to ((pr0 t0 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t) t0)))))) (\lambda (H18: (pr0 u1 u5)).(\lambda (H19: (pr0 t0 t6)).(let H15 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Flat Appl) u0 t0) t)) H4 (THead (Bind b) u1 t0) H15) in (let H20 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) u0 (THead (Bind b) u1 t0)) H15) in (let H4 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H10 u0 H14) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 (THead (Bind b) u5 t6)) t))) (\lambda (x: T).(\lambda (H10: (pr0 v2 x)).(\lambda (H14: (pr0 u3 x)).(ex2_ind T (\lambda (t: T).(pr0 t6 t)) (\lambda (t: T).(pr0 t3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 (THead (Bind b) u5 t6)) t))) (\lambda (x0: T).(\lambda (H12: (pr0 t6 x0)).(\lambda (H16: (pr0 t3 x0)).(ex2_ind T (\lambda (t: T).(pr0 u5 t)) (\lambda (t: T).(pr0 u2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 (THead (Bind b) u5 t6)) t))) (\lambda (x1: T).(\lambda (H11: (pr0 u5 x1)).(\lambda (H21: (pr0 u2 x1)).(ex2_sym T (pr0 (THead (Flat Appl) u3 (THead (Bind b) u5 t6))) (pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3))) (pr0_confluence__pr0_cong_upsilon_cong b H9 u3 v2 x H14 H10 t6 t3 x0 H12 H16 u5 u2 x1 H11 H21))))) (H20 u1 (tlt_trans (THead (Bind b) u1 t0) u1 (THead (Flat Appl) u0 (THead (Bind b) u1 t0)) (tlt_head_sx (Bind b) u1 t0) (tlt_head_dx (Flat Appl) u0 (THead (Bind b) u1 t0))) u5 H18 u2 H11))))) (H20 t0 (tlt_trans (THead (Bind b) u1 t0) t0 (THead (Flat Appl) u0 (THead (Bind b) u1 t0)) (tlt_head_dx (Bind b) u1 t0) (tlt_head_dx (Flat Appl) u0 (THead (Bind b) u1 t0))) t6 H19 t3 H12))))) (H20 u0 (tlt_head_sx (Flat Appl) u0 (THead (Bind b) u1 t0)) v2 H4 u3 H16))))))) t5 H8)) t2 (sym_eq T t2 t0 H17))) u4 (sym_eq T u4 u1 H7))) k (sym_eq K k (Bind b) H5))) H3)) H2)) H13 H0 H1))) | (pr0_beta u v0 v3 H0 t2 t6 H1) \Rightarrow (\lambda (H6: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u t2)) (THead (Bind b) u1 t0))).(\lambda (H13: (eq T (THead (Bind Abbr) v3 t6) t5)).((let H2 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u t2)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u1 t0) H6) in (False_ind ((eq T (THead (Bind Abbr) v3 t6) t5) \to ((pr0 v0 v3) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t)))))) H2)) H13 H0 H1))) | (pr0_upsilon b0 H0 v0 v3 H1 u4 u5 H6 t2 t6 H13) \Rightarrow (\lambda (H14: (eq T (THead (Flat Appl) v0 (THead (Bind b0) u4 t2)) (THead (Bind b) u1 t0))).(\lambda (H15: (eq T (THead (Bind b0) u5 (THead (Flat Appl) (lift (S O) O v3) t6)) t5)).((let H2 \def (eq_ind T (THead (Flat Appl) v0 (THead (Bind b0) u4 t2)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u1 t0) H14) in (False_ind ((eq T (THead (Bind b0) u5 (THead (Flat Appl) (lift (S O) O v3) t6)) t5) \to ((not (eq B b0 Abst)) \to ((pr0 v0 v3) \to ((pr0 u4 u5) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t)))))))) H2)) H15 H0 H1 H6 H13))) | (pr0_delta u4 u5 H0 t2 t6 H1 w H6) \Rightarrow (\lambda (H13: (eq T (THead (Bind Abbr) u4 t2) (THead (Bind b) u1 t0))).(\lambda (H17: (eq T (THead (Bind Abbr) u5 w) t5)).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t2 | (TLRef _) \Rightarrow t2 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u4 t2) (THead (Bind b) u1 t0) H13) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u4 | (TLRef _) \Rightarrow u4 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u4 t2) (THead (Bind b) u1 t0) H13) in ((let H5 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (THead (Bind Abbr) u4 t2) (THead (Bind b) u1 t0) H13) in (eq_ind B Abbr (\lambda (b: B).((eq T u4 u1) \to ((eq T t2 t0) \to ((eq T (THead (Bind Abbr) u5 w) t5) \to ((pr0 u4 u5) \to ((pr0 t2 t6) \to ((subst0 O u5 t6 w) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t)))))))))) (\lambda (H7: (eq T u4 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t2 t0) \to ((eq T (THead (Bind Abbr) u5 w) t5) \to ((pr0 t u5) \to ((pr0 t2 t6) \to ((subst0 O u5 t6 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0))))))))) (\lambda (H18: (eq T t2 t0)).(eq_ind T t0 (\lambda (t: T).((eq T (THead (Bind Abbr) u5 w) t5) \to ((pr0 u1 u5) \to ((pr0 t t6) \to ((subst0 O u5 t6 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0)))))))) (\lambda (H19: (eq T (THead (Bind Abbr) u5 w) t5)).(eq_ind T (THead (Bind Abbr) u5 w) (\lambda (t: T).((pr0 u1 u5) \to ((pr0 t0 t6) \to ((subst0 O u5 t6 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t) t0))))))) (\lambda (H20: (pr0 u1 u5)).(\lambda (H21: (pr0 t0 t6)).(\lambda (H22: (subst0 O u5 t6 w)).(let H15 \def (eq_ind_r B b (\lambda (b: B).(eq T (THead (Bind b) u1 t0) t4)) H15 Abbr H5) in (let H9 \def (eq_ind_r B b (\lambda (b: B).(not (eq B b Abst))) H9 Abbr H5) in (let H23 \def (eq_ind_r B b (\lambda (b: B).(eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t1)) H8 Abbr H5) in (let H4 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Flat Appl) u0 t0) t)) H4 (THead (Bind Abbr) u1 t0) H15) in (let H8 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) u0 (THead (Bind Abbr) u1 t0)) H4) in (let H10 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H10 u0 H14) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 (THead (Bind Abbr) u5 w)) t))) (\lambda (x: T).(\lambda (H14: (pr0 v2 x)).(\lambda (H16: (pr0 u3 x)).(ex2_ind T (\lambda (t: T).(pr0 t6 t)) (\lambda (t: T).(pr0 t3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 (THead (Bind Abbr) u5 w)) t))) (\lambda (x0: T).(\lambda (H12: (pr0 t6 x0)).(\lambda (H24: (pr0 t3 x0)).(ex2_ind T (\lambda (t: T).(pr0 u5 t)) (\lambda (t: T).(pr0 u2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 (THead (Bind Abbr) u5 w)) t))) (\lambda (x1: T).(\lambda (H11: (pr0 u5 x1)).(\lambda (H25: (pr0 u2 x1)).(ex2_sym T (pr0 (THead (Flat Appl) u3 (THead (Bind Abbr) u5 w))) (pr0 (THead (Bind Abbr) u2 (THead (Flat Appl) (lift (S O) O v2) t3))) (pr0_confluence__pr0_cong_upsilon_delta H9 u5 t6 w H22 u3 v2 x H16 H14 t3 x0 H12 H24 u2 x1 H11 H25))))) (H8 u1 (tlt_trans (THead (Bind Abbr) u1 t0) u1 (THead (Flat Appl) u0 (THead (Bind Abbr) u1 t0)) (tlt_head_sx (Bind Abbr) u1 t0) (tlt_head_dx (Flat Appl) u0 (THead (Bind Abbr) u1 t0))) u5 H20 u2 H11))))) (H8 t0 (tlt_trans (THead (Bind Abbr) u1 t0) t0 (THead (Flat Appl) u0 (THead (Bind Abbr) u1 t0)) (tlt_head_dx (Bind Abbr) u1 t0) (tlt_head_dx (Flat Appl) u0 (THead (Bind Abbr) u1 t0))) t6 H21 t3 H12))))) (H8 u0 (tlt_head_sx (Flat Appl) u0 (THead (Bind Abbr) u1 t0)) v2 H10 u3 H16))))))))))) t5 H19)) t2 (sym_eq T t2 t0 H18))) u4 (sym_eq T u4 u1 H7))) b H5)) H3)) H2)) H17 H0 H1 H6))) | (pr0_zeta b0 H0 t2 t6 H1 u) \Rightarrow (\lambda (H6: (eq T (THead (Bind b0) u (lift (S O) O t2)) (THead (Bind b) u1 t0))).(\lambda (H13: (eq T t6 t5)).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t2) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t2) | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) u (lift (S O) O t2)) (THead (Bind b) u1 t0) H6) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b0) u (lift (S O) O t2)) (THead (Bind b) u1 t0) H6) in ((let H5 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u (lift (S O) O t2)) (THead (Bind b) u1 t0) H6) in (eq_ind B b (\lambda (b1: B).((eq T u u1) \to ((eq T (lift (S O) O t2) t0) \to ((eq T t6 t5) \to ((not (eq B b1 Abst)) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t))))))))) (\lambda (H7: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T (lift (S O) O t2) t0) \to ((eq T t6 t5) \to ((not (eq B b Abst)) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0)))))))) (\lambda (H17: (eq T (lift (S O) O t2) t0)).(eq_ind T (lift (S O) O t2) (\lambda (_: T).((eq T t6 t5) \to ((not (eq B b Abst)) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0))))))) (\lambda (H8: (eq T t6 t5)).(eq_ind T t5 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t2 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0)))))) (\lambda (H18: (not (eq B b Abst))).(\lambda (H19: (pr0 t2 t5)).(let H9 \def (eq_ind_r T t0 (\lambda (t: T).(eq T (THead (Bind b) u1 t) t4)) H15 (lift (S O) O t2) H17) in (let H15 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Flat Appl) u0 t0) t)) H4 (THead (Bind b) u1 (lift (S O) O t2)) H9) in (let H20 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) u0 (THead (Bind b) u1 (lift (S O) O t2))) H15) in (let H12 \def (eq_ind_r T t0 (\lambda (t: T).(pr0 t t3)) H12 (lift (S O) O t2) H17) in (ex2_ind T (\lambda (t4: T).(eq T t3 (lift (S O) O t4))) (\lambda (t3: T).(pr0 t2 t3)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t))) (\lambda (x: T).(\lambda (H21: (eq T t3 (lift (S O) O x))).(\lambda (H22: (pr0 t2 x)).(eq_ind_r T (lift (S O) O x) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t)) t0)) (\lambda (t0: T).(pr0 (THead (Flat Appl) u3 t5) t0)))) (let H4 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H10 u0 H14) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x))) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t))) (\lambda (x0: T).(\lambda (H10: (pr0 v2 x0)).(\lambda (H14: (pr0 u3 x0)).(ex2_ind T (\lambda (t: T).(pr0 x t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x))) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t))) (\lambda (x1: T).(\lambda (H16: (pr0 x x1)).(\lambda (H23: (pr0 t5 x1)).(ex2_sym T (pr0 (THead (Flat Appl) u3 t5)) (pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O x)))) (pr0_confluence__pr0_cong_upsilon_zeta b H18 u1 u2 H11 u3 v2 x0 H14 H10 x t5 x1 H16 H23))))) (H20 t2 (tlt_trans (THead (Bind b) u1 (lift (S O) O t2)) t2 (THead (Flat Appl) u0 (THead (Bind b) u1 (lift (S O) O t2))) (lift_tlt_dx (Bind b) u1 t2 (S O) O) (tlt_head_dx (Flat Appl) u0 (THead (Bind b) u1 (lift (S O) O t2)))) x H22 t5 H19))))) (H20 u0 (tlt_head_sx (Flat Appl) u0 (THead (Bind b) u1 (lift (S O) O t2))) v2 H4 u3 H16))) t3 H21)))) (pr0_gen_lift t2 t3 (S O) O H12)))))))) t6 (sym_eq T t6 t5 H8))) t0 H17)) u (sym_eq T u u1 H7))) b0 (sym_eq B b0 b H5))) H3)) H2)) H13 H0 H1))) | (pr0_epsilon t2 t6 H0 u) \Rightarrow (\lambda (H1: (eq T (THead (Flat Cast) u t2) (THead (Bind b) u1 t0))).(\lambda (H6: (eq T t6 t5)).((let H2 \def (eq_ind T (THead (Flat Cast) u t2) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u1 t0) H1) in (False_ind ((eq T t6 t5) \to ((pr0 t2 t6) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Flat Appl) u3 t5) t))))) H2)) H6 H0)))]) in (H6 (refl_equal T (THead (Bind b) u1 t0)) (refl_equal T t5))))) t4 H15)) v1 (sym_eq T v1 u0 H14))) k H3)) H2)) H1)))]) in (H1 (refl_equal T (THead k u0 t4))))))) t2 H15)) t H13 H14 H8 H9))) | (pr0_beta u v0 v3 H8 t4 t5 H9) \Rightarrow (\lambda (H10: (eq T (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) t)).(\lambda (H13: (eq T (THead (Bind Abbr) v3 t5) t2)).(eq_ind T (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) (\lambda (_: T).((eq T (THead (Bind Abbr) v3 t5) t2) \to ((pr0 v0 v3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H14: (eq T (THead (Bind Abbr) v3 t5) t2)).(eq_ind T (THead (Bind Abbr) v3 t5) (\lambda (t: T).((pr0 v0 v3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (_: (pr0 v0 v3)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) t)) H6 (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) H10) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Appl) v0 (THead (Bind Abst) u t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow (match t return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t0) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ _ t) \Rightarrow (match t return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t0 _) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) H0) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead _ _ t) \Rightarrow (match t return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) H0) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) H0) in (eq_ind T v0 (\lambda (_: T).((eq B b Abst) \to ((eq T u1 u) \to ((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0))))))) (\lambda (H13: (eq B b Abst)).(eq_ind B Abst (\lambda (b: B).((eq T u1 u) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v3 t5) t)))))) (\lambda (H14: (eq T u1 u)).(eq_ind T u (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abst) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0))))) (\lambda (H15: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abst) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v3 t5) t0)))) (let H5 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v0 (THead (Bind Abst) u t4)) H10) in (let H6 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H12 t4 H15) in (let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H11 u H14) in (let H8 \def (eq_ind B b (\lambda (b: B).(not (eq B b Abst))) H9 Abst H13) in (let H9 \def (match (H8 (refl_equal B Abst)) return (\lambda (_: False).(ex2 T (\lambda (t: T).(pr0 (THead (Bind Abst) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v3 t5) t)))) with []) in H9))))) t0 (sym_eq T t0 t4 H15))) u1 (sym_eq T u1 u H14))) b (sym_eq B b Abst H13))) v1 (sym_eq T v1 v0 H4))) H3)) H2)) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v0 (THead (Bind Abst) u t4)))))))) t2 H14)) t H10 H13 H8 H9))) | (pr0_upsilon b0 H8 v0 v3 H9 u0 u3 H10 t4 t5 H11) \Rightarrow (\lambda (H13: (eq T (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) t)).(\lambda (H14: (eq T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t2)).(eq_ind T (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) (\lambda (_: T).((eq T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t2) \to ((not (eq B b0 Abst)) \to ((pr0 v0 v3) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0))))))))) (\lambda (H15: (eq T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t2)).(eq_ind T (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) (\lambda (t: T).((not (eq B b0 Abst)) \to ((pr0 v0 v3) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t t0)))))))) (\lambda (_: (not (eq B b0 Abst))).(\lambda (H17: (pr0 v0 v3)).(\lambda (H18: (pr0 u0 u3)).(\lambda (H19: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) t)) H6 (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) H13) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Appl) v0 (THead (Bind b0) u0 t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow (match t return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t0) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ _ t) \Rightarrow (match t return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t0 _) \Rightarrow t0])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) H0) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead _ _ t) \Rightarrow (match t return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) H0) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) H0) in (eq_ind T v0 (\lambda (_: T).((eq B b b0) \to ((eq T u1 u0) \to ((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t0))))))) (\lambda (H14: (eq B b b0)).(eq_ind B b0 (\lambda (b: B).((eq T u1 u0) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t)))))) (\lambda (H15: (eq T u1 u0)).(eq_ind T u0 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t0))))) (\lambda (H16: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t0)))) (let H5 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) H13) in (let H6 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H12 t4 H16) in (let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H11 u0 H15) in (let H8 \def (eq_ind B b (\lambda (b: B).(not (eq B b Abst))) H9 b0 H14) in (let H9 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H10 v0 H4) in (ex2_ind T (\lambda (t: T).(pr0 v2 t)) (\lambda (t: T).(pr0 v3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t))) (\lambda (x: T).(\lambda (H10: (pr0 v2 x)).(\lambda (H11: (pr0 v3 x)).(ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t))) (\lambda (x0: T).(\lambda (H12: (pr0 u2 x0)).(\lambda (H13: (pr0 u3 x0)).(ex2_ind T (\lambda (t: T).(pr0 t3 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Bind b0) u3 (THead (Flat Appl) (lift (S O) O v3) t5)) t))) (\lambda (x1: T).(\lambda (H17: (pr0 t3 x1)).(\lambda (H18: (pr0 t5 x1)).(pr0_confluence__pr0_upsilon_upsilon b0 H8 v2 v3 x H10 H11 u2 u3 x0 H12 H13 t3 t5 x1 H17 H18)))) (H5 t4 (tlt_trans (THead (Bind b0) u0 t4) t4 (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) (tlt_head_dx (Bind b0) u0 t4) (tlt_head_dx (Flat Appl) v0 (THead (Bind b0) u0 t4))) t3 H6 t5 H19))))) (H5 u0 (tlt_trans (THead (Bind b0) u0 t4) u0 (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)) (tlt_head_sx (Bind b0) u0 t4) (tlt_head_dx (Flat Appl) v0 (THead (Bind b0) u0 t4))) u2 H7 u3 H18))))) (H5 v0 (tlt_head_sx (Flat Appl) v0 (THead (Bind b0) u0 t4)) v2 H9 v3 H17))))))) t0 (sym_eq T t0 t4 H16))) u1 (sym_eq T u1 u0 H15))) b (sym_eq B b b0 H14))) v1 (sym_eq T v1 v0 H4))) H3)) H2)) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v0 (THead (Bind b0) u0 t4)))))))))) t2 H15)) t H13 H14 H8 H9 H10 H11))) | (pr0_delta u0 u3 H8 t4 t5 H9 w H10) \Rightarrow (\lambda (H11: (eq T (THead (Bind Abbr) u0 t4) t)).(\lambda (H12: (eq T (THead (Bind Abbr) u3 w) t2)).(eq_ind T (THead (Bind Abbr) u0 t4) (\lambda (_: T).((eq T (THead (Bind Abbr) u3 w) t2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to ((subst0 O u3 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0)))))))) (\lambda (H13: (eq T (THead (Bind Abbr) u3 w) t2)).(eq_ind T (THead (Bind Abbr) u3 w) (\lambda (t: T).((pr0 u0 u3) \to ((pr0 t4 t5) \to ((subst0 O u3 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t t0))))))) (\lambda (_: (pr0 u0 u3)).(\lambda (_: (pr0 t4 t5)).(\lambda (_: (subst0 O u3 t5 w)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) t)) H6 (THead (Bind Abbr) u0 t4) H11) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Bind Abbr) u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 w) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Bind Abbr) u0 t4))).(let H1 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u0 t4) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w) t))) H1)))]) in (H1 (refl_equal T (THead (Bind Abbr) u0 t4)))))))) t2 H13)) t H11 H12 H8 H9 H10))) | (pr0_zeta b0 H8 t4 t5 H9 u) \Rightarrow (\lambda (H10: (eq T (THead (Bind b0) u (lift (S O) O t4)) t)).(\lambda (H11: (eq T t5 t2)).(eq_ind T (THead (Bind b0) u (lift (S O) O t4)) (\lambda (_: T).((eq T t5 t2) \to ((not (eq B b0 Abst)) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H12: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((not (eq B b0 Abst)) \to ((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (_: (not (eq B b0 Abst))).(\lambda (_: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) t)) H6 (THead (Bind b0) u (lift (S O) O t4)) H10) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Bind b0) u (lift (S O) O t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Bind b0) u (lift (S O) O t4)))).(let H1 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b0) u (lift (S O) O t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 t2 t))) H1)))]) in (H1 (refl_equal T (THead (Bind b0) u (lift (S O) O t4)))))))) t5 (sym_eq T t5 t2 H12))) t H10 H11 H8 H9))) | (pr0_epsilon t4 t5 H8 u) \Rightarrow (\lambda (H9: (eq T (THead (Flat Cast) u t4) t)).(\lambda (H10: (eq T t5 t2)).(eq_ind T (THead (Flat Cast) u t4) (\lambda (_: T).((eq T t5 t2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H11: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (_: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) t)) H6 (THead (Flat Cast) u t4) H9) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Cast) u t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (THead (Flat Cast) u t4))).(let H1 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u t4) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t3)) t)) (\lambda (t: T).(pr0 t2 t))) H1)))]) in (H1 (refl_equal T (THead (Flat Cast) u t4)))))) t5 (sym_eq T t5 t2 H11))) t H9 H10 H8)))]) in (H13 (refl_equal T t) (refl_equal T t2))))))) t1 H8)) t H6 H7 H2 H3 H4 H5))) | (pr0_delta u1 u2 H2 t0 t3 H3 w H4) \Rightarrow (\lambda (H5: (eq T (THead (Bind Abbr) u1 t0) t)).(\lambda (H6: (eq T (THead (Bind Abbr) u2 w) t1)).(eq_ind T (THead (Bind Abbr) u1 t0) (\lambda (_: T).((eq T (THead (Bind Abbr) u2 w) t1) \to ((pr0 u1 u2) \to ((pr0 t0 t3) \to ((subst0 O u2 t3 w) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1)))))))) (\lambda (H7: (eq T (THead (Bind Abbr) u2 w) t1)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t0 t3) \to ((subst0 O u2 t3 w) \to (ex2 T (\lambda (t1: T).(pr0 t t1)) (\lambda (t1: T).(pr0 t2 t1))))))) (\lambda (H8: (pr0 u1 u2)).(\lambda (H9: (pr0 t0 t3)).(\lambda (H10: (subst0 O u2 t3 w)).(let H11 \def (match H1 return (\lambda (t0: T).(\lambda (t1: T).(\lambda (_: (pr0 t0 t1)).((eq T t0 t) \to ((eq T t1 t2) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t4) \Rightarrow (\lambda (H7: (eq T t4 t)).(\lambda (H11: (eq T t4 t2)).(eq_ind T t (\lambda (t: T).((eq T t t2) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H12: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t2)) H12 (THead (Bind Abbr) u1 t0) H5) in (eq_ind T (THead (Bind Abbr) u1 t0) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t4 t)) H7 (THead (Bind Abbr) u1 t0) H5) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind Abbr) u1 t0) H5) in (ex_intro2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u1 t0) t)) (THead (Bind Abbr) u2 w) (pr0_refl (THead (Bind Abbr) u2 w)) (pr0_delta u1 u2 H8 t0 t3 H9 w H10)))) t2 H0)) t (sym_eq T t t2 H12))) t4 (sym_eq T t4 t H7) H11))) | (pr0_comp u0 u3 H7 t4 t5 H8 k) \Rightarrow (\lambda (H11: (eq T (THead k u0 t4) t)).(\lambda (H12: (eq T (THead k u3 t5) t2)).(eq_ind T (THead k u0 t4) (\lambda (_: T).((eq T (THead k u3 t5) t2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H13: (eq T (THead k u3 t5) t2)).(eq_ind T (THead k u3 t5) (\lambda (t: T).((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (H14: (pr0 u0 u3)).(\lambda (H15: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind Abbr) u1 t0) t)) H5 (THead k u0 t4) H11) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead k u3 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind Abbr) u1 t0) (THead k u0 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u1 t0) (THead k u0 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u1 t0) (THead k u0 t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow (Bind Abbr) | (TLRef _) \Rightarrow (Bind Abbr) | (THead k _ _) \Rightarrow k])) (THead (Bind Abbr) u1 t0) (THead k u0 t4) H0) in (eq_ind K (Bind Abbr) (\lambda (k: K).((eq T u1 u0) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead k u3 t5) t)))))) (\lambda (H12: (eq T u1 u0)).(eq_ind T u0 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 t5) t0))))) (\lambda (H13: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 t5) t0)))) (let H4 \def (eq_ind_r K k (\lambda (k: K).(eq T (THead k u0 t4) t)) H11 (Bind Abbr) H3) in (let H5 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind Abbr) u0 t4) H4) in (let H6 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H9 t4 H13) in (let H7 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H8 u0 H12) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 t5) t))) (\lambda (x: T).(\lambda (H8: (pr0 u2 x)).(\lambda (H9: (pr0 u3 x)).(ex2_ind T (\lambda (t: T).(pr0 t3 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 t5) t))) (\lambda (x0: T).(\lambda (H11: (pr0 t3 x0)).(\lambda (H14: (pr0 t5 x0)).(ex2_sym T (pr0 (THead (Bind Abbr) u3 t5)) (pr0 (THead (Bind Abbr) u2 w)) (pr0_confluence__pr0_cong_delta u2 t3 w H10 u3 x H9 H8 t5 x0 H14 H11))))) (H5 t4 (tlt_head_dx (Bind Abbr) u0 t4) t3 H6 t5 H15))))) (H5 u0 (tlt_head_sx (Bind Abbr) u0 t4) u2 H7 u3 H14)))))) t0 (sym_eq T t0 t4 H13))) u1 (sym_eq T u1 u0 H12))) k H3)) H2)) H1)))]) in (H1 (refl_equal T (THead k u0 t4))))))) t2 H13)) t H11 H12 H7 H8))) | (pr0_beta u v1 v2 H7 t4 t5 H8) \Rightarrow (\lambda (H9: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) t)).(\lambda (H10: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) (\lambda (_: T).((eq T (THead (Bind Abbr) v2 t5) t2) \to ((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Bind Abbr) v2 t5) (\lambda (t: T).((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind Abbr) u1 t0) t)) H5 (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H9) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Appl) v1 (THead (Bind Abst) u t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind Abbr) u1 t0) (THead (Flat Appl) v1 (THead (Bind Abst) u t4)))).(let H1 \def (eq_ind T (THead (Bind Abbr) u1 t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)))))))) t2 H11)) t H9 H10 H7 H8))) | (pr0_upsilon b H7 v1 v2 H8 u0 u3 H9 t4 t5 H10) \Rightarrow (\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) t)).(\lambda (H12: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) (\lambda (_: T).((eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t2) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0))))))))) (\lambda (H13: (eq T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t t0)))))))) (\lambda (_: (not (eq B b Abst))).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 u0 u3)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind Abbr) u1 t0) t)) H5 (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) H11) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Appl) v1 (THead (Bind b) u0 t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind Abbr) u1 t0) (THead (Flat Appl) v1 (THead (Bind b) u0 t4)))).(let H1 \def (eq_ind T (THead (Bind Abbr) u1 t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) v1 (THead (Bind b) u0 t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind b) u3 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind b) u0 t4)))))))))) t2 H13)) t H11 H12 H7 H8 H9 H10))) | (pr0_delta u0 u3 H7 t4 t5 H8 w0 H9) \Rightarrow (\lambda (H11: (eq T (THead (Bind Abbr) u0 t4) t)).(\lambda (H12: (eq T (THead (Bind Abbr) u3 w0) t2)).(eq_ind T (THead (Bind Abbr) u0 t4) (\lambda (_: T).((eq T (THead (Bind Abbr) u3 w0) t2) \to ((pr0 u0 u3) \to ((pr0 t4 t5) \to ((subst0 O u3 t5 w0) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0)))))))) (\lambda (H13: (eq T (THead (Bind Abbr) u3 w0) t2)).(eq_ind T (THead (Bind Abbr) u3 w0) (\lambda (t: T).((pr0 u0 u3) \to ((pr0 t4 t5) \to ((subst0 O u3 t5 w0) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t t0))))))) (\lambda (H14: (pr0 u0 u3)).(\lambda (H15: (pr0 t4 t5)).(\lambda (H16: (subst0 O u3 t5 w0)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind Abbr) u1 t0) t)) H5 (THead (Bind Abbr) u0 t4) H11) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Bind Abbr) u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 w0) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind Abbr) u1 t0) (THead (Bind Abbr) u0 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u1 t0) (THead (Bind Abbr) u0 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u1 t0) (THead (Bind Abbr) u0 t4) H0) in (eq_ind T u0 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 w0) t0))))) (\lambda (H12: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u3 w0) t0)))) (let H3 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind Abbr) u0 t4) H11) in (let H4 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H9 t4 H12) in (let H5 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H8 u0 H2) in (ex2_ind T (\lambda (t: T).(pr0 u2 t)) (\lambda (t: T).(pr0 u3 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (x: T).(\lambda (H6: (pr0 u2 x)).(\lambda (H7: (pr0 u3 x)).(ex2_ind T (\lambda (t: T).(pr0 t3 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u3 w0) t))) (\lambda (x0: T).(\lambda (H8: (pr0 t3 x0)).(\lambda (H9: (pr0 t5 x0)).(pr0_confluence__pr0_delta_delta u2 t3 w H10 u3 t5 w0 H16 x H6 H7 x0 H8 H9)))) (H3 t4 (tlt_head_dx (Bind Abbr) u0 t4) t3 H4 t5 H15))))) (H3 u0 (tlt_head_sx (Bind Abbr) u0 t4) u2 H5 u3 H14))))) t0 (sym_eq T t0 t4 H12))) u1 (sym_eq T u1 u0 H2))) H1)))]) in (H1 (refl_equal T (THead (Bind Abbr) u0 t4)))))))) t2 H13)) t H11 H12 H7 H8 H9))) | (pr0_zeta b H7 t4 t5 H8 u) \Rightarrow (\lambda (H11: (eq T (THead (Bind b) u (lift (S O) O t4)) t)).(\lambda (H12: (eq T t5 t2)).(eq_ind T (THead (Bind b) u (lift (S O) O t4)) (\lambda (_: T).((eq T t5 t2) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H13: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H14: (not (eq B b Abst))).(\lambda (H15: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind Abbr) u1 t0) t)) H5 (THead (Bind b) u (lift (S O) O t4)) H11) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Bind b) u (lift (S O) O t4))) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind Abbr) u1 t0) (THead (Bind b) u (lift (S O) O t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u1 t0) (THead (Bind b) u (lift (S O) O t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u1 t0) (THead (Bind b) u (lift (S O) O t4)) H0) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (THead (Bind Abbr) u1 t0) (THead (Bind b) u (lift (S O) O t4)) H0) in (eq_ind B Abbr (\lambda (_: B).((eq T u1 u) \to ((eq T t0 (lift (S O) O t4)) \to (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 t2 t)))))) (\lambda (H12: (eq T u1 u)).(eq_ind T u (\lambda (_: T).((eq T t0 (lift (S O) O t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H13: (eq T t0 (lift (S O) O t4))).(eq_ind T (lift (S O) O t4) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H4 \def (eq_ind_r B b (\lambda (b: B).(not (eq B b Abst))) H14 Abbr H3) in (let H5 \def (eq_ind_r B b (\lambda (b: B).(eq T (THead (Bind b) u (lift (S O) O t4)) t)) H11 Abbr H3) in (let H6 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind Abbr) u (lift (S O) O t4)) H5) in (let H7 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t3)) H9 (lift (S O) O t4) H13) in (ex2_ind T (\lambda (t2: T).(eq T t3 (lift (S O) O t2))) (\lambda (t2: T).(pr0 t4 t2)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 t2 t))) (\lambda (x: T).(\lambda (H9: (eq T t3 (lift (S O) O x))).(\lambda (H11: (pr0 t4 x)).(let H10 \def (eq_ind T t3 (\lambda (t: T).(subst0 O u2 t w)) H10 (lift (S O) O x) H9) in (let H8 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H8 u H12) in (ex2_ind T (\lambda (t: T).(pr0 x t)) (\lambda (t: T).(pr0 t2 t)) (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 t2 t))) (\lambda (x0: T).(\lambda (_: (pr0 x x0)).(\lambda (_: (pr0 t2 x0)).(pr0_confluence__pr0_delta_epsilon u2 (lift (S O) O x) w H10 x (pr0_refl (lift (S O) O x)) t2)))) (H6 t4 (lift_tlt_dx (Bind Abbr) u t4 (S O) O) x H11 t2 H15))))))) (pr0_gen_lift t4 t3 (S O) O H7)))))) t0 (sym_eq T t0 (lift (S O) O t4) H13))) u1 (sym_eq T u1 u H12))) b H3)) H2)) H1)))]) in (H1 (refl_equal T (THead (Bind b) u (lift (S O) O t4)))))))) t5 (sym_eq T t5 t2 H13))) t H11 H12 H7 H8))) | (pr0_epsilon t4 t5 H7 u) \Rightarrow (\lambda (H8: (eq T (THead (Flat Cast) u t4) t)).(\lambda (H9: (eq T t5 t2)).(eq_ind T (THead (Flat Cast) u t4) (\lambda (_: T).((eq T t5 t2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H10: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (_: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind Abbr) u1 t0) t)) H5 (THead (Flat Cast) u t4) H8) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Cast) u t4)) \to (ex2 T (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind Abbr) u1 t0) (THead (Flat Cast) u t4))).(let H1 \def (eq_ind T (THead (Bind Abbr) u1 t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u t4) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)) (\lambda (t: T).(pr0 t2 t))) H1)))]) in (H1 (refl_equal T (THead (Flat Cast) u t4)))))) t5 (sym_eq T t5 t2 H10))) t H8 H9 H7)))]) in (H11 (refl_equal T t) (refl_equal T t2)))))) t1 H7)) t H5 H6 H2 H3 H4))) | (pr0_zeta b H2 t0 t3 H3 u) \Rightarrow (\lambda (H4: (eq T (THead (Bind b) u (lift (S O) O t0)) t)).(\lambda (H5: (eq T t3 t1)).(eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (_: T).((eq T t3 t1) \to ((not (eq B b Abst)) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1))))))) (\lambda (H6: (eq T t3 t1)).(eq_ind T t1 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t0 t) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1)))))) (\lambda (H7: (not (eq B b Abst))).(\lambda (H8: (pr0 t0 t1)).(let H9 \def (match H1 return (\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (pr0 t0 t3)).((eq T t0 t) \to ((eq T t3 t2) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t4) \Rightarrow (\lambda (H6: (eq T t4 t)).(\lambda (H9: (eq T t4 t2)).(eq_ind T t (\lambda (t: T).((eq T t t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H10: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t2)) H10 (THead (Bind b) u (lift (S O) O t0)) H4) in (eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t4 t)) H6 (THead (Bind b) u (lift (S O) O t0)) H4) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind b) u (lift (S O) O t0)) H4) in (ex_intro2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind b) u (lift (S O) O t0)) t)) t1 (pr0_refl t1) (pr0_zeta b H7 t0 t1 H8 u)))) t2 H0)) t (sym_eq T t t2 H10))) t4 (sym_eq T t4 t H6) H9))) | (pr0_comp u1 u2 H6 t4 t5 H7 k) \Rightarrow (\lambda (H9: (eq T (THead k u1 t4) t)).(\lambda (H10: (eq T (THead k u2 t5) t2)).(eq_ind T (THead k u1 t4) (\lambda (_: T).((eq T (THead k u2 t5) t2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T (THead k u2 t5) t2)).(eq_ind T (THead k u2 t5) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (_: (pr0 u1 u2)).(\lambda (H13: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind b) u (lift (S O) O t0)) t)) H4 (THead k u1 t4) H9) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k u1 t4)) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead k u2 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead k u1 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead k u1 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead k u1 t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow (Bind b) | (TLRef _) \Rightarrow (Bind b) | (THead k _ _) \Rightarrow k])) (THead (Bind b) u (lift (S O) O t0)) (THead k u1 t4) H0) in (eq_ind K (Bind b) (\lambda (k: K).((eq T u u1) \to ((eq T (lift (S O) O t0) t4) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead k u2 t5) t)))))) (\lambda (H10: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T (lift (S O) O t0) t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u2 t5) t0))))) (\lambda (H11: (eq T (lift (S O) O t0) t4)).(eq_ind T (lift (S O) O t0) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u2 t5) t0)))) (let H4 \def (eq_ind_r K k (\lambda (k: K).(eq T (THead k u1 t4) t)) H9 (Bind b) H3) in (let H5 \def (eq_ind_r T t4 (\lambda (t: T).(pr0 t t5)) H13 (lift (S O) O t0) H11) in (ex2_ind T (\lambda (t2: T).(eq T t5 (lift (S O) O t2))) (\lambda (t2: T).(pr0 t0 t2)) (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind b) u2 t5) t))) (\lambda (x: T).(\lambda (H6: (eq T t5 (lift (S O) O x))).(\lambda (H9: (pr0 t0 x)).(let H12 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Bind b) u1 t0) t)) H4 (lift (S O) O t0) H11) in (let H13 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind b) u1 (lift (S O) O t0)) H12) in (eq_ind_r T (lift (S O) O x) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u2 t) t0)))) (ex2_ind T (\lambda (t: T).(pr0 x t)) (\lambda (t: T).(pr0 t1 t)) (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind b) u2 (lift (S O) O x)) t))) (\lambda (x0: T).(\lambda (H8: (pr0 x x0)).(\lambda (H14: (pr0 t1 x0)).(ex_intro2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind b) u2 (lift (S O) O x)) t)) x0 H14 (pr0_zeta b H7 x x0 H8 u2))))) (H13 t0 (lift_tlt_dx (Bind b) u1 t0 (S O) O) x H9 t1 H8)) t5 H6)))))) (pr0_gen_lift t0 t5 (S O) O H5)))) t4 H11)) u (sym_eq T u u1 H10))) k H3)) H2)) H1)))]) in (H1 (refl_equal T (THead k u1 t4))))))) t2 H11)) t H9 H10 H6 H7))) | (pr0_beta u0 v1 v2 H6 t4 t5 H7) \Rightarrow (\lambda (H8: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) t)).(\lambda (H9: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) (\lambda (_: T).((eq T (THead (Bind Abbr) v2 t5) t2) \to ((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H10: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Bind Abbr) v2 t5) (\lambda (t: T).((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind b) u (lift (S O) O t0)) t)) H4 (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) H8) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4))) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)))).(let H1 \def (eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)))))))) t2 H10)) t H8 H9 H6 H7))) | (pr0_upsilon b0 H6 v1 v2 H7 u1 u2 H8 t4 t5 H9) \Rightarrow (\lambda (H10: (eq T (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)) t)).(\lambda (H11: (eq T (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)) (\lambda (_: T).((eq T (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2) \to ((not (eq B b0 Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))))) (\lambda (H12: (eq T (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) (\lambda (t: T).((not (eq B b0 Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))))) (\lambda (_: (not (eq B b0 Abst))).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind b) u (lift (S O) O t0)) t)) H4 (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)) H10) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Appl) v1 (THead (Bind b0) u1 t4))) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)))).(let H1 \def (eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)))))))))) t2 H12)) t H10 H11 H6 H7 H8 H9))) | (pr0_delta u1 u2 H6 t4 t5 H7 w H8) \Rightarrow (\lambda (H9: (eq T (THead (Bind Abbr) u1 t4) t)).(\lambda (H10: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u1 t4) (\lambda (_: T).((eq T (THead (Bind Abbr) u2 w) t2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))) (\lambda (H11: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0))))))) (\lambda (_: (pr0 u1 u2)).(\lambda (H13: (pr0 t4 t5)).(\lambda (H14: (subst0 O u2 t5 w)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind b) u (lift (S O) O t0)) t)) H4 (THead (Bind Abbr) u1 t4) H9) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Bind Abbr) u1 t4)) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t4) H0) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind Abbr) u1 t4) H0) in (eq_ind B Abbr (\lambda (_: B).((eq T u u1) \to ((eq T (lift (S O) O t0) t4) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t)))))) (\lambda (H10: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T (lift (S O) O t0) t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0))))) (\lambda (H11: (eq T (lift (S O) O t0) t4)).(eq_ind T (lift (S O) O t0) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)))) (let H4 \def (eq_ind_r T t4 (\lambda (t: T).(pr0 t t5)) H13 (lift (S O) O t0) H11) in (ex2_ind T (\lambda (t2: T).(eq T t5 (lift (S O) O t2))) (\lambda (t2: T).(pr0 t0 t2)) (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t))) (\lambda (x: T).(\lambda (H5: (eq T t5 (lift (S O) O x))).(\lambda (H6: (pr0 t0 x)).(let H9 \def (eq_ind_r T t4 (\lambda (t0: T).(eq T (THead (Bind Abbr) u1 t0) t)) H9 (lift (S O) O t0) H11) in (let H12 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind Abbr) u1 (lift (S O) O t0)) H9) in (let H13 \def (eq_ind T t5 (\lambda (t: T).(subst0 O u2 t w)) H14 (lift (S O) O x) H5) in (let H7 \def (eq_ind B b (\lambda (b: B).(not (eq B b Abst))) H7 Abbr H3) in (ex2_ind T (\lambda (t: T).(pr0 x t)) (\lambda (t: T).(pr0 t1 t)) (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t))) (\lambda (x0: T).(\lambda (_: (pr0 x x0)).(\lambda (_: (pr0 t1 x0)).(ex2_sym T (pr0 (THead (Bind Abbr) u2 w)) (pr0 t1) (pr0_confluence__pr0_delta_epsilon u2 (lift (S O) O x) w H13 x (pr0_refl (lift (S O) O x)) t1))))) (H12 t0 (lift_tlt_dx (Bind Abbr) u1 t0 (S O) O) x H6 t1 H8))))))))) (pr0_gen_lift t0 t5 (S O) O H4))) t4 H11)) u (sym_eq T u u1 H10))) b (sym_eq B b Abbr H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Bind Abbr) u1 t4)))))))) t2 H11)) t H9 H10 H6 H7 H8))) | (pr0_zeta b0 H6 t4 t5 H7 u0) \Rightarrow (\lambda (H9: (eq T (THead (Bind b0) u0 (lift (S O) O t4)) t)).(\lambda (H10: (eq T t5 t2)).(eq_ind T (THead (Bind b0) u0 (lift (S O) O t4)) (\lambda (_: T).((eq T t5 t2) \to ((not (eq B b0 Abst)) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H11: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((not (eq B b0 Abst)) \to ((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (_: (not (eq B b0 Abst))).(\lambda (H13: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind b) u (lift (S O) O t0)) t)) H4 (THead (Bind b0) u0 (lift (S O) O t4)) H9) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Bind b0) u0 (lift (S O) O t4))) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Bind b0) u0 (lift (S O) O t4)))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t0) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind b0) u0 (lift (S O) O t4)) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind b0) u0 (lift (S O) O t4)) H0) in ((let H3 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u (lift (S O) O t0)) (THead (Bind b0) u0 (lift (S O) O t4)) H0) in (eq_ind B b0 (\lambda (_: B).((eq T u u0) \to ((eq T (lift (S O) O t0) (lift (S O) O t4)) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)))))) (\lambda (H10: (eq T u u0)).(eq_ind T u0 (\lambda (_: T).((eq T (lift (S O) O t0) (lift (S O) O t4)) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H11: (eq T (lift (S O) O t0) (lift (S O) O t4))).(eq_ind T (lift (S O) O t0) (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H4 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Bind b0) u0 (lift (S O) O t4)) H9) in (let H5 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t1)) H8 t4 (lift_inj t0 t4 (S O) O H11)) in (let H6 \def (eq_ind B b (\lambda (b: B).(not (eq B b Abst))) H7 b0 H3) in (ex2_ind T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)) (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t))) (\lambda (x: T).(\lambda (H7: (pr0 t1 x)).(\lambda (H8: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)) x H7 H8)))) (H4 t4 (lift_tlt_dx (Bind b0) u0 t4 (S O) O) t1 H5 t2 H13))))) (lift (S O) O t4) H11)) u (sym_eq T u u0 H10))) b (sym_eq B b b0 H3))) H2)) H1)))]) in (H1 (refl_equal T (THead (Bind b0) u0 (lift (S O) O t4)))))))) t5 (sym_eq T t5 t2 H11))) t H9 H10 H6 H7))) | (pr0_epsilon t4 t5 H6 u0) \Rightarrow (\lambda (H7: (eq T (THead (Flat Cast) u0 t4) t)).(\lambda (H8: (eq T t5 t2)).(eq_ind T (THead (Flat Cast) u0 t4) (\lambda (_: T).((eq T t5 t2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H9: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (_: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Bind b) u (lift (S O) O t0)) t)) H4 (THead (Flat Cast) u0 t4) H7) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Cast) u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u (lift (S O) O t0)) (THead (Flat Cast) u0 t4))).(let H1 \def (eq_ind T (THead (Bind b) u (lift (S O) O t0)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u0 t4) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t))) H1)))]) in (H1 (refl_equal T (THead (Flat Cast) u0 t4)))))) t5 (sym_eq T t5 t2 H9))) t H7 H8 H6)))]) in (H9 (refl_equal T t) (refl_equal T t2))))) t3 (sym_eq T t3 t1 H6))) t H4 H5 H2 H3))) | (pr0_epsilon t0 t3 H2 u) \Rightarrow (\lambda (H3: (eq T (THead (Flat Cast) u t0) t)).(\lambda (H4: (eq T t3 t1)).(eq_ind T (THead (Flat Cast) u t0) (\lambda (_: T).((eq T t3 t1) \to ((pr0 t0 t3) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1)))))) (\lambda (H5: (eq T t3 t1)).(eq_ind T t1 (\lambda (t: T).((pr0 t0 t) \to (ex2 T (\lambda (t2: T).(pr0 t1 t2)) (\lambda (t1: T).(pr0 t2 t1))))) (\lambda (H6: (pr0 t0 t1)).(let H7 \def (match H1 return (\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (pr0 t0 t3)).((eq T t0 t) \to ((eq T t3 t2) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)))))))) with [(pr0_refl t4) \Rightarrow (\lambda (H5: (eq T t4 t)).(\lambda (H7: (eq T t4 t2)).(eq_ind T t (\lambda (t: T).((eq T t t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H8: (eq T t t2)).(eq_ind T t2 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T t t2)) H8 (THead (Flat Cast) u t0) H3) in (eq_ind T (THead (Flat Cast) u t0) (\lambda (t: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))) (let H1 \def (eq_ind_r T t (\lambda (t: T).(eq T t4 t)) H5 (THead (Flat Cast) u t0) H3) in (let H2 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Cast) u t0) H3) in (ex_intro2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Flat Cast) u t0) t)) t1 (pr0_refl t1) (pr0_epsilon t0 t1 H6 u)))) t2 H0)) t (sym_eq T t t2 H8))) t4 (sym_eq T t4 t H5) H7))) | (pr0_comp u1 u2 H5 t4 t5 H6 k) \Rightarrow (\lambda (H7: (eq T (THead k u1 t4) t)).(\lambda (H8: (eq T (THead k u2 t5) t2)).(eq_ind T (THead k u1 t4) (\lambda (_: T).((eq T (THead k u2 t5) t2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H9: (eq T (THead k u2 t5) t2)).(eq_ind T (THead k u2 t5) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (_: (pr0 u1 u2)).(\lambda (H11: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Cast) u t0) t)) H3 (THead k u1 t4) H7) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k u1 t4)) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead k u2 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Cast) u t0) (THead k u1 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) u t0) (THead k u1 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) u t0) (THead k u1 t4) H0) in ((let H3 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow (Flat Cast) | (TLRef _) \Rightarrow (Flat Cast) | (THead k _ _) \Rightarrow k])) (THead (Flat Cast) u t0) (THead k u1 t4) H0) in (eq_ind K (Flat Cast) (\lambda (k: K).((eq T u u1) \to ((eq T t0 t4) \to (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead k u2 t5) t)))))) (\lambda (H8: (eq T u u1)).(eq_ind T u1 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Flat Cast) u2 t5) t0))))) (\lambda (H9: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Flat Cast) u2 t5) t0)))) (let H4 \def (eq_ind_r K k (\lambda (k: K).(eq T (THead k u1 t4) t)) H7 (Flat Cast) H3) in (let H5 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Cast) u1 t4) H4) in (let H6 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t1)) H6 t4 H9) in (ex2_ind T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t5 t)) (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Flat Cast) u2 t5) t))) (\lambda (x: T).(\lambda (H7: (pr0 t1 x)).(\lambda (H10: (pr0 t5 x)).(ex_intro2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Flat Cast) u2 t5) t)) x H7 (pr0_epsilon t5 x H10 u2))))) (H5 t4 (tlt_head_dx (Flat Cast) u1 t4) t1 H6 t5 H11))))) t0 (sym_eq T t0 t4 H9))) u (sym_eq T u u1 H8))) k H3)) H2)) H1)))]) in (H1 (refl_equal T (THead k u1 t4))))))) t2 H9)) t H7 H8 H5 H6))) | (pr0_beta u0 v1 v2 H5 t4 t5 H6) \Rightarrow (\lambda (H7: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) t)).(\lambda (H8: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) (\lambda (_: T).((eq T (THead (Bind Abbr) v2 t5) t2) \to ((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H9: (eq T (THead (Bind Abbr) v2 t5) t2)).(eq_ind T (THead (Bind Abbr) v2 t5) (\lambda (t: T).((pr0 v1 v2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))) (\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Cast) u t0) t)) H3 (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) H7) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4))) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) v2 t5) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Cast) u t0) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)))).(let H1 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) v2 t5) t))) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)))))))) t2 H9)) t H7 H8 H5 H6))) | (pr0_upsilon b H5 v1 v2 H6 u1 u2 H7 t4 t5 H8) \Rightarrow (\lambda (H9: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) t)).(\lambda (H10: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) (\lambda (_: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))))) (\lambda (H11: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t2)).(eq_ind T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0)))))))) (\lambda (_: (not (eq B b Abst))).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 t4 t5)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Cast) u t0) t)) H3 (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) H9) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Appl) v1 (THead (Bind b) u1 t4))) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Cast) u t0) (THead (Flat Appl) v1 (THead (Bind b) u1 t4)))).(let H1 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t))) H1)))]) in (H1 (refl_equal T (THead (Flat Appl) v1 (THead (Bind b) u1 t4)))))))))) t2 H11)) t H9 H10 H5 H6 H7 H8))) | (pr0_delta u1 u2 H5 t4 t5 H6 w H7) \Rightarrow (\lambda (H8: (eq T (THead (Bind Abbr) u1 t4) t)).(\lambda (H9: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u1 t4) (\lambda (_: T).((eq T (THead (Bind Abbr) u2 w) t2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))) (\lambda (H10: (eq T (THead (Bind Abbr) u2 w) t2)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t: T).((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t t0))))))) (\lambda (_: (pr0 u1 u2)).(\lambda (_: (pr0 t4 t5)).(\lambda (_: (subst0 O u2 t5 w)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Cast) u t0) t)) H3 (THead (Bind Abbr) u1 t4) H8) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Bind Abbr) u1 t4)) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 (THead (Bind Abbr) u2 w) t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Cast) u t0) (THead (Bind Abbr) u1 t4))).(let H1 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) u1 t4) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 (THead (Bind Abbr) u2 w) t))) H1)))]) in (H1 (refl_equal T (THead (Bind Abbr) u1 t4)))))))) t2 H10)) t H8 H9 H5 H6 H7))) | (pr0_zeta b H5 t4 t5 H6 u0) \Rightarrow (\lambda (H7: (eq T (THead (Bind b) u0 (lift (S O) O t4)) t)).(\lambda (H8: (eq T t5 t2)).(eq_ind T (THead (Bind b) u0 (lift (S O) O t4)) (\lambda (_: T).((eq T t5 t2) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))))) (\lambda (H9: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (_: (not (eq B b Abst))).(\lambda (_: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Cast) u t0) t)) H3 (THead (Bind b) u0 (lift (S O) O t4)) H7) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Bind b) u0 (lift (S O) O t4))) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Cast) u t0) (THead (Bind b) u0 (lift (S O) O t4)))).(let H1 \def (eq_ind T (THead (Flat Cast) u t0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 (lift (S O) O t4)) H0) in (False_ind (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t))) H1)))]) in (H1 (refl_equal T (THead (Bind b) u0 (lift (S O) O t4)))))))) t5 (sym_eq T t5 t2 H9))) t H7 H8 H5 H6))) | (pr0_epsilon t4 t5 H5 u0) \Rightarrow (\lambda (H7: (eq T (THead (Flat Cast) u0 t4) t)).(\lambda (H8: (eq T t5 t2)).(eq_ind T (THead (Flat Cast) u0 t4) (\lambda (_: T).((eq T t5 t2) \to ((pr0 t4 t5) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) (\lambda (H9: (eq T t5 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t4 t) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H10: (pr0 t4 t2)).(let H0 \def (eq_ind_r T t (\lambda (t: T).(eq T (THead (Flat Cast) u t0) t)) H3 (THead (Flat Cast) u0 t4) H7) in (let H1 \def (match H0 return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead (Flat Cast) u0 t4)) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))) with [refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Flat Cast) u t0) (THead (Flat Cast) u0 t4))).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) u t0) (THead (Flat Cast) u0 t4) H0) in ((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) u t0) (THead (Flat Cast) u0 t4) H0) in (eq_ind T u0 (\lambda (_: T).((eq T t0 t4) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0))))) (\lambda (H8: (eq T t0 t4)).(eq_ind T t4 (\lambda (_: T).(ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))) (let H3 \def (eq_ind_r T t (\lambda (t: T).(\forall (v: T).((tlt v t) \to (\forall (t1: T).((pr0 v t1) \to (\forall (t2: T).((pr0 v t2) \to (ex2 T (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(pr0 t2 t0)))))))))) H (THead (Flat Cast) u0 t4) H7) in (let H4 \def (eq_ind T t0 (\lambda (t: T).(pr0 t t1)) H6 t4 H8) in (ex2_ind T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)) (ex2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t))) (\lambda (x: T).(\lambda (H5: (pr0 t1 x)).(\lambda (H6: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(pr0 t2 t)) x H5 H6)))) (H3 t4 (tlt_head_dx (Flat Cast) u0 t4) t1 H4 t2 H10)))) t0 (sym_eq T t0 t4 H8))) u (sym_eq T u u0 H2))) H1)))]) in (H1 (refl_equal T (THead (Flat Cast) u0 t4)))))) t5 (sym_eq T t5 t2 H9))) t H7 H8 H5)))]) in (H7 (refl_equal T t) (refl_equal T t2)))) t3 (sym_eq T t3 t1 H5))) t H3 H4 H2)))]) in (H2 (refl_equal T t) (refl_equal T t1))))))))) t0). theorem pr0_delta1: \forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (w: T).((subst1 O u2 t2 w) \to (pr0 (THead (Bind Abbr) u1 t1) (THead (Bind Abbr) u2 w))))))))) @@ -1917,7 +1917,7 @@ theorem pr0_subst1: theorem nf0_dec: \forall (t1: T).(or (\forall (t2: T).((pr0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t1 t2)))) \def - \lambda (t1: T).(T_ind (\lambda (t: T).(or (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))))) (\lambda (n: nat).(or_introl (\forall (t2: T).((pr0 (TSort n) t2) \to (eq T (TSort n) t2))) (ex2 T (\lambda (t2: T).((eq T (TSort n) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (TSort n) t2))) (\lambda (t2: T).(\lambda (H: (pr0 (TSort n) t2)).(eq_ind_r T (TSort n) (\lambda (t: T).(eq T (TSort n) t)) (refl_equal T (TSort n)) t2 (pr0_gen_sort t2 n H)))))) (\lambda (n: nat).(or_introl (\forall (t2: T).((pr0 (TLRef n) t2) \to (eq T (TLRef n) t2))) (ex2 T (\lambda (t2: T).((eq T (TLRef n) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (TLRef n) t2))) (\lambda (t2: T).(\lambda (H: (pr0 (TLRef n) t2)).(eq_ind_r T (TLRef n) (\lambda (t: T).(eq T (TLRef n) t)) (refl_equal T (TLRef n)) t2 (pr0_gen_lref t2 n H)))))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: (or (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))))).(\lambda (t0: T).(\lambda (H0: (or (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))))).(match k return (\lambda (_: ?).(\lambda (k0: K).(or (\forall (t2: T).((pr0 (THead k0 t t0) t2) \to (eq T (THead k0 t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead k0 t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead k0 t t0) t2)))))) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).(\lambda (b0: B).(or (\forall (t2: T).((pr0 (THead (Bind b0) t t0) t2) \to (eq T (THead (Bind b0) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind b0) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind b0) t t0) t2)))))) with [Abbr \Rightarrow (or_intror (\forall (t2: T).((pr0 (THead (Bind Abbr) t t0) t2) \to (eq T (THead (Bind Abbr) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t t0) t2))) (let H_x \def (dnf_dec t t0 O) in (let H1 \def H_x in (ex_ind T (\lambda (v: T).(or (subst0 O t t0 (lift (S O) O v)) (eq T t0 (lift (S O) O v)))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t t0) t2))) (\lambda (x: T).(\lambda (H2: (or (subst0 O t t0 (lift (S O) O x)) (eq T t0 (lift (S O) O x)))).(or_ind (subst0 O t t0 (lift (S O) O x)) (eq T t0 (lift (S O) O x)) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t t0) t2))) (\lambda (H3: (subst0 O t t0 (lift (S O) O x))).(ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t t0) t2)) (THead (Bind Abbr) t (lift (S O) O x)) (\lambda (H4: (eq T (THead (Bind Abbr) t t0) (THead (Bind Abbr) t (lift (S O) O x)))).(\lambda (P: Prop).(let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) t t0) (THead (Bind Abbr) t (lift (S O) O x)) H4) in (let H6 \def (eq_ind T t0 (\lambda (t0: T).(subst0 O t t0 (lift (S O) O x))) H3 (lift (S O) O x) H5) in (subst0_refl t (lift (S O) O x) O H6 P))))) (pr0_delta t t (pr0_refl t) t0 t0 (pr0_refl t0) (lift (S O) O x) H3))) (\lambda (H3: (eq T t0 (lift (S O) O x))).(eq_ind_r T (lift (S O) O x) (\lambda (t2: T).(ex2 T (\lambda (t3: T).((eq T (THead (Bind Abbr) t t2) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(pr0 (THead (Bind Abbr) t t2) t3)))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t (lift (S O) O x)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t (lift (S O) O x)) t2)) x (\lambda (H4: (eq T (THead (Bind Abbr) t (lift (S O) O x)) x)).(\lambda (P: Prop).(thead_x_lift_y_y (Bind Abbr) x t (S O) O H4 P))) (pr0_zeta Abbr not_abbr_abst x x (pr0_refl x) t)) t0 H3)) H2))) H1)))) | Abst \Rightarrow (let H1 \def H in (or_ind (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))) (or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda (H2: ((\forall (t2: T).((pr0 t t2) \to (eq T t t2))))).(let H3 \def H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda (H4: ((\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))))).(or_introl (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2))) (\lambda (t2: T).(\lambda (H5: (pr0 (THead (Bind Abst) t t0) t2)).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3))) (eq T (THead (Bind Abst) t t0) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H7: (pr0 t x0)).(\lambda (H8: (pr0 t0 x1)).(let H_y \def (H4 x1 H8) in (let H_y0 \def (H2 x0 H7) in (let H9 \def (eq_ind_r T x1 (\lambda (t: T).(pr0 t0 t)) H8 t0 H_y) in (let H10 \def (eq_ind_r T x1 (\lambda (t: T).(eq T t2 (THead (Bind Abst) x0 t))) H6 t0 H_y) in (let H11 \def (eq_ind_r T x0 (\lambda (t0: T).(pr0 t t0)) H7 t H_y0) in (let H12 \def (eq_ind_r T x0 (\lambda (t: T).(eq T t2 (THead (Bind Abst) t t0))) H10 t H_y0) in (eq_ind_r T (THead (Bind Abst) t t0) (\lambda (t3: T).(eq T (THead (Bind Abst) t t0) t3)) (refl_equal T (THead (Bind Abst) t t0)) t2 H12)))))))))))) (pr0_gen_abst t t0 t2 H5)))))) (\lambda (H4: (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)))).(ex2_ind T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)) (or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda (x: T).(\lambda (H5: (((eq T t0 x) \to (\forall (P: Prop).P)))).(\lambda (H6: (pr0 t0 x)).(or_intror (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)) (THead (Bind Abst) t x) (\lambda (H7: (eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t x))).(\lambda (P: Prop).(let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abst) t t0) (THead (Bind Abst) t x) H7) in (let H9 \def (eq_ind_r T x (\lambda (t: T).(pr0 t0 t)) H6 t0 H8) in (let H10 \def (eq_ind_r T x (\lambda (t: T).((eq T t0 t) \to (\forall (P: Prop).P))) H5 t0 H8) in (H10 (refl_equal T t0) P)))))) (pr0_comp t t (pr0_refl t) t0 x H6 (Bind Abst))))))) H4)) H3))) (\lambda (H2: (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)))).(ex2_ind T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)) (or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda (x: T).(\lambda (H3: (((eq T t x) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr0 t x)).(or_intror (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)) (THead (Bind Abst) x t0) (\lambda (H5: (eq T (THead (Bind Abst) t t0) (THead (Bind Abst) x t0))).(\lambda (P: Prop).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead (Bind Abst) t t0) (THead (Bind Abst) x t0) H5) in (let H7 \def (eq_ind_r T x (\lambda (t0: T).(pr0 t t0)) H4 t H6) in (let H8 \def (eq_ind_r T x (\lambda (t0: T).((eq T t t0) \to (\forall (P: Prop).P))) H3 t H6) in (H8 (refl_equal T t) P)))))) (pr0_comp t x H4 t0 t0 (pr0_refl t0) (Bind Abst))))))) H2)) H1)) | Void \Rightarrow (let H_x \def (dnf_dec t t0 O) in (let H1 \def H_x in (ex_ind T (\lambda (v: T).(or (subst0 O t t0 (lift (S O) O v)) (eq T t0 (lift (S O) O v)))) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda (x: T).(\lambda (H2: (or (subst0 O t t0 (lift (S O) O x)) (eq T t0 (lift (S O) O x)))).(or_ind (subst0 O t t0 (lift (S O) O x)) (eq T t0 (lift (S O) O x)) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda (H3: (subst0 O t t0 (lift (S O) O x))).(let H4 \def H in (or_ind (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda (H5: ((\forall (t2: T).((pr0 t t2) \to (eq T t t2))))).(let H6 \def H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda (H7: ((\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))))).(or_introl (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2))) (\lambda (t2: T).(\lambda (H8: (pr0 (THead (Bind Void) t t0) t2)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3)))) (pr0 t0 (lift (S O) O t2)) (eq T (THead (Bind Void) t t0) t2) (\lambda (H9: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3))) (eq T (THead (Bind Void) t t0) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H10: (eq T t2 (THead (Bind Void) x0 x1))).(\lambda (H11: (pr0 t x0)).(\lambda (H12: (pr0 t0 x1)).(let H_y \def (H7 x1 H12) in (let H_y0 \def (H5 x0 H11) in (let H13 \def (eq_ind_r T x1 (\lambda (t: T).(pr0 t0 t)) H12 t0 H_y) in (let H14 \def (eq_ind_r T x1 (\lambda (t: T).(eq T t2 (THead (Bind Void) x0 t))) H10 t0 H_y) in (let H15 \def (eq_ind_r T x0 (\lambda (t0: T).(pr0 t t0)) H11 t H_y0) in (let H16 \def (eq_ind_r T x0 (\lambda (t: T).(eq T t2 (THead (Bind Void) t t0))) H14 t H_y0) in (eq_ind_r T (THead (Bind Void) t t0) (\lambda (t3: T).(eq T (THead (Bind Void) t t0) t3)) (refl_equal T (THead (Bind Void) t t0)) t2 H16)))))))))))) H9)) (\lambda (H9: (pr0 t0 (lift (S O) O t2))).(let H_y \def (H7 (lift (S O) O t2) H9) in (let H10 \def (eq_ind T t0 (\lambda (t0: T).(subst0 O t t0 (lift (S O) O x))) H3 (lift (S O) O t2) H_y) in (eq_ind_r T (lift (S O) O t2) (\lambda (t3: T).(eq T (THead (Bind Void) t t3) t2)) (subst0_gen_lift_false t2 t (lift (S O) O x) (S O) O O (le_n O) (eq_ind_r nat (plus (S O) O) (\lambda (n: nat).(lt O n)) (le_n (plus (S O) O)) (plus O (S O)) (plus_comm O (S O))) H10 (eq T (THead (Bind Void) t (lift (S O) O t2)) t2)) t0 H_y)))) (pr0_gen_void t t0 t2 H8)))))) (\lambda (H7: (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)))).(ex2_ind T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda (x0: T).(\lambda (H8: (((eq T t0 x0) \to (\forall (P: Prop).P)))).(\lambda (H9: (pr0 t0 x0)).(or_intror (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)) (THead (Bind Void) t x0) (\lambda (H10: (eq T (THead (Bind Void) t t0) (THead (Bind Void) t x0))).(\lambda (P: Prop).(let H11 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Void) t t0) (THead (Bind Void) t x0) H10) in (let H12 \def (eq_ind_r T x0 (\lambda (t: T).(pr0 t0 t)) H9 t0 H11) in (let H13 \def (eq_ind_r T x0 (\lambda (t: T).((eq T t0 t) \to (\forall (P: Prop).P))) H8 t0 H11) in (H13 (refl_equal T t0) P)))))) (pr0_comp t t (pr0_refl t) t0 x0 H9 (Bind Void))))))) H7)) H6))) (\lambda (H5: (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)))).(ex2_ind T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda (x0: T).(\lambda (H6: (((eq T t x0) \to (\forall (P: Prop).P)))).(\lambda (H7: (pr0 t x0)).(or_intror (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)) (THead (Bind Void) x0 t0) (\lambda (H8: (eq T (THead (Bind Void) t t0) (THead (Bind Void) x0 t0))).(\lambda (P: Prop).(let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead (Bind Void) t t0) (THead (Bind Void) x0 t0) H8) in (let H10 \def (eq_ind_r T x0 (\lambda (t0: T).(pr0 t t0)) H7 t H9) in (let H11 \def (eq_ind_r T x0 (\lambda (t0: T).((eq T t t0) \to (\forall (P: Prop).P))) H6 t H9) in (H11 (refl_equal T t) P)))))) (pr0_comp t x0 H7 t0 t0 (pr0_refl t0) (Bind Void))))))) H5)) H4))) (\lambda (H3: (eq T t0 (lift (S O) O x))).(let H4 \def (eq_ind T t0 (\lambda (t: T).(or (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))))) H0 (lift (S O) O x) H3) in (eq_ind_r T (lift (S O) O x) (\lambda (t2: T).(or (\forall (t3: T).((pr0 (THead (Bind Void) t t2) t3) \to (eq T (THead (Bind Void) t t2) t3))) (ex2 T (\lambda (t3: T).((eq T (THead (Bind Void) t t2) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(pr0 (THead (Bind Void) t t2) t3))))) (or_intror (\forall (t2: T).((pr0 (THead (Bind Void) t (lift (S O) O x)) t2) \to (eq T (THead (Bind Void) t (lift (S O) O x)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t (lift (S O) O x)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t (lift (S O) O x)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Void) t (lift (S O) O x)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t (lift (S O) O x)) t2)) x (\lambda (H5: (eq T (THead (Bind Void) t (lift (S O) O x)) x)).(\lambda (P: Prop).(thead_x_lift_y_y (Bind Void) x t (S O) O H5 P))) (pr0_zeta Void not_void_abst x x (pr0_refl x) t))) t0 H3))) H2))) H1)))]) | (Flat f) \Rightarrow (match f return (\lambda (_: ?).(\lambda (f0: F).(or (\forall (t2: T).((pr0 (THead (Flat f0) t t0) t2) \to (eq T (THead (Flat f0) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat f0) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat f0) t t0) t2)))))) with [Appl \Rightarrow (let H_x \def (binder_dec t0) in (let H1 \def H_x in (or_ind (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (H2: (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u))))))).(ex_3_ind B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u))))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H3: (eq T t0 (THead (Bind x0) x1 x2))).(let H4 \def (eq_ind T t0 (\lambda (t: T).(or (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))))) H0 (THead (Bind x0) x1 x2) H3) in (eq_ind_r T (THead (Bind x0) x1 x2) (\lambda (t2: T).(or (\forall (t3: T).((pr0 (THead (Flat Appl) t t2) t3) \to (eq T (THead (Flat Appl) t t2) t3))) (ex2 T (\lambda (t3: T).((eq T (THead (Flat Appl) t t2) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(pr0 (THead (Flat Appl) t t2) t3))))) ((match x0 return (\lambda (_: ?).(\lambda (b: B).((or (\forall (t2: T).((pr0 (THead (Bind b) x1 x2) t2) \to (eq T (THead (Bind b) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind b) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind b) x1 x2) t2)))) \to (or (\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind b) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind b) x1 x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind b) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind b) x1 x2)) t2))))))) with [Abbr \Rightarrow (\lambda (_: (or (\forall (t2: T).((pr0 (THead (Bind Abbr) x1 x2) t2) \to (eq T (THead (Bind Abbr) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) x1 x2) t2))))).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2)) (THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) (THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O t) x2)))).(\lambda (P: Prop).(let H7 \def (eq_ind T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ t) \Rightarrow (match t return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])])) I (THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O t) x2)) H6) in (False_ind P H7)))) (pr0_upsilon Abbr not_abbr_abst t t (pr0_refl t) x1 x1 (pr0_refl x1) x2 x2 (pr0_refl x2))))) | Abst \Rightarrow (\lambda (_: (or (\forall (t2: T).((pr0 (THead (Bind Abst) x1 x2) t2) \to (eq T (THead (Bind Abst) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) x1 x2) t2))))).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2)) (THead (Bind Abbr) t x2) (\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) (THead (Bind Abbr) t x2))).(\lambda (P: Prop).(let H7 \def (eq_ind T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) t x2) H6) in (False_ind P H7)))) (pr0_beta x1 t t (pr0_refl t) x2 x2 (pr0_refl x2))))) | Void \Rightarrow (\lambda (_: (or (\forall (t2: T).((pr0 (THead (Bind Void) x1 x2) t2) \to (eq T (THead (Bind Void) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) x1 x2) t2))))).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2)) (THead (Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) (THead (Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)))).(\lambda (P: Prop).(let H7 \def (eq_ind T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ t) \Rightarrow (match t return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])])) I (THead (Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)) H6) in (False_ind P H7)))) (pr0_upsilon Void not_void_abst t t (pr0_refl t) x1 x1 (pr0_refl x1) x2 x2 (pr0_refl x2)))))]) H4) t0 H3)))))) H2)) (\lambda (H2: ((\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(let H3 \def H in (or_ind (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (H4: ((\forall (t2: T).((pr0 t t2) \to (eq T t t2))))).(let H5 \def H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (H6: ((\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))))).(or_introl (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2))) (\lambda (t2: T).(\lambda (H7: (pr0 (THead (Flat Appl) t t0) t2)).(or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 t u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 t u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (eq T (THead (Flat Appl) t t0) t2) (\lambda (H8: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3))) (eq T (THead (Flat Appl) t t0) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H9: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H10: (pr0 t x0)).(\lambda (H11: (pr0 t0 x1)).(let H_y \def (H6 x1 H11) in (let H_y0 \def (H4 x0 H10) in (let H12 \def (eq_ind_r T x1 (\lambda (t: T).(pr0 t0 t)) H11 t0 H_y) in (let H13 \def (eq_ind_r T x1 (\lambda (t: T).(eq T t2 (THead (Flat Appl) x0 t))) H9 t0 H_y) in (let H14 \def (eq_ind_r T x0 (\lambda (t0: T).(pr0 t t0)) H10 t H_y0) in (let H15 \def (eq_ind_r T x0 (\lambda (t: T).(eq T t2 (THead (Flat Appl) t t0))) H13 t H_y0) in (eq_ind_r T (THead (Flat Appl) t t0) (\lambda (t3: T).(eq T (THead (Flat Appl) t t0) t3)) (refl_equal T (THead (Flat Appl) t t0)) t2 H15)))))))))))) H8)) (\lambda (H8: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 t u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 t u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))) (eq T (THead (Flat Appl) t t0) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H9: (eq T t0 (THead (Bind Abst) x0 x1))).(\lambda (H10: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (_: (pr0 t x2)).(\lambda (_: (pr0 x1 x3)).(eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t3: T).(eq T (THead (Flat Appl) t t0) t3)) (let H13 \def (eq_ind T t0 (\lambda (t: T).(\forall (t2: T).((pr0 t t2) \to (eq T t t2)))) H6 (THead (Bind Abst) x0 x1) H9) in (let H14 \def (eq_ind T t0 (\lambda (t: T).(\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) H2 (THead (Bind Abst) x0 x1) H9) in (eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t3: T).(eq T (THead (Flat Appl) t t3) (THead (Bind Abbr) x2 x3))) (H14 Abst x0 x1 (H13 (THead (Bind Abst) x0 x1) (pr0_refl (THead (Bind Abst) x0 x1))) (eq T (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) x2 x3))) t0 H9))) t2 H10))))))))) H8)) (\lambda (H8: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 t u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 t u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))) (eq T (THead (Flat Appl) t t0) t2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 Abst))).(\lambda (H10: (eq T t0 (THead (Bind x0) x1 x2))).(\lambda (H11: (eq T t2 (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)))).(\lambda (_: (pr0 t x3)).(\lambda (_: (pr0 x1 x4)).(\lambda (_: (pr0 x2 x5)).(eq_ind_r T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (\lambda (t3: T).(eq T (THead (Flat Appl) t t0) t3)) (let H15 \def (eq_ind T t0 (\lambda (t: T).(\forall (t2: T).((pr0 t t2) \to (eq T t t2)))) H6 (THead (Bind x0) x1 x2) H10) in (let H16 \def (eq_ind T t0 (\lambda (t: T).(\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) H2 (THead (Bind x0) x1 x2) H10) in (eq_ind_r T (THead (Bind x0) x1 x2) (\lambda (t3: T).(eq T (THead (Flat Appl) t t3) (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)))) (H16 x0 x1 x2 (H15 (THead (Bind x0) x1 x2) (pr0_refl (THead (Bind x0) x1 x2))) (eq T (THead (Flat Appl) t (THead (Bind x0) x1 x2)) (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)))) t0 H10))) t2 H11))))))))))))) H8)) (pr0_gen_appl t t0 t2 H7)))))) (\lambda (H6: (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)))).(ex2_ind T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (x: T).(\lambda (H7: (((eq T t0 x) \to (\forall (P: Prop).P)))).(\lambda (H8: (pr0 t0 x)).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)) (THead (Flat Appl) t x) (\lambda (H9: (eq T (THead (Flat Appl) t t0) (THead (Flat Appl) t x))).(\lambda (P: Prop).(let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) t t0) (THead (Flat Appl) t x) H9) in (let H11 \def (eq_ind_r T x (\lambda (t: T).(pr0 t0 t)) H8 t0 H10) in (let H12 \def (eq_ind_r T x (\lambda (t: T).((eq T t0 t) \to (\forall (P: Prop).P))) H7 t0 H10) in (H12 (refl_equal T t0) P)))))) (pr0_comp t t (pr0_refl t) t0 x H8 (Flat Appl))))))) H6)) H5))) (\lambda (H4: (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)))).(ex2_ind T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (x: T).(\lambda (H5: (((eq T t x) \to (\forall (P: Prop).P)))).(\lambda (H6: (pr0 t x)).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)) (THead (Flat Appl) x t0) (\lambda (H7: (eq T (THead (Flat Appl) t t0) (THead (Flat Appl) x t0))).(\lambda (P: Prop).(let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) t t0) (THead (Flat Appl) x t0) H7) in (let H9 \def (eq_ind_r T x (\lambda (t0: T).(pr0 t t0)) H6 t H8) in (let H10 \def (eq_ind_r T x (\lambda (t0: T).((eq T t t0) \to (\forall (P: Prop).P))) H5 t H8) in (H10 (refl_equal T t) P)))))) (pr0_comp t x H6 t0 t0 (pr0_refl t0) (Flat Appl))))))) H4)) H3))) H1))) | Cast \Rightarrow (or_intror (\forall (t2: T).((pr0 (THead (Flat Cast) t t0) t2) \to (eq T (THead (Flat Cast) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Cast) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Cast) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat Cast) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Cast) t t0) t2)) t0 (\lambda (H1: (eq T (THead (Flat Cast) t t0) t0)).(\lambda (P: Prop).(thead_x_y_y (Flat Cast) t t0 H1 P))) (pr0_epsilon t0 t0 (pr0_refl t0) t)))])])))))) t1). + \lambda (t1: T).(T_ind (\lambda (t: T).(or (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))))) (\lambda (n: nat).(or_introl (\forall (t2: T).((pr0 (TSort n) t2) \to (eq T (TSort n) t2))) (ex2 T (\lambda (t2: T).((eq T (TSort n) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (TSort n) t2))) (\lambda (t2: T).(\lambda (H: (pr0 (TSort n) t2)).(eq_ind_r T (TSort n) (\lambda (t: T).(eq T (TSort n) t)) (refl_equal T (TSort n)) t2 (pr0_gen_sort t2 n H)))))) (\lambda (n: nat).(or_introl (\forall (t2: T).((pr0 (TLRef n) t2) \to (eq T (TLRef n) t2))) (ex2 T (\lambda (t2: T).((eq T (TLRef n) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (TLRef n) t2))) (\lambda (t2: T).(\lambda (H: (pr0 (TLRef n) t2)).(eq_ind_r T (TLRef n) (\lambda (t: T).(eq T (TLRef n) t)) (refl_equal T (TLRef n)) t2 (pr0_gen_lref t2 n H)))))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: (or (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))))).(\lambda (t0: T).(\lambda (H0: (or (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))))).(match k return (\lambda (k0: K).(or (\forall (t2: T).((pr0 (THead k0 t t0) t2) \to (eq T (THead k0 t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead k0 t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead k0 t t0) t2))))) with [(Bind b) \Rightarrow (match b return (\lambda (b0: B).(or (\forall (t2: T).((pr0 (THead (Bind b0) t t0) t2) \to (eq T (THead (Bind b0) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind b0) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind b0) t t0) t2))))) with [Abbr \Rightarrow (or_intror (\forall (t2: T).((pr0 (THead (Bind Abbr) t t0) t2) \to (eq T (THead (Bind Abbr) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t t0) t2))) (let H_x \def (dnf_dec t t0 O) in (let H1 \def H_x in (ex_ind T (\lambda (v: T).(or (subst0 O t t0 (lift (S O) O v)) (eq T t0 (lift (S O) O v)))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t t0) t2))) (\lambda (x: T).(\lambda (H2: (or (subst0 O t t0 (lift (S O) O x)) (eq T t0 (lift (S O) O x)))).(or_ind (subst0 O t t0 (lift (S O) O x)) (eq T t0 (lift (S O) O x)) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t t0) t2))) (\lambda (H3: (subst0 O t t0 (lift (S O) O x))).(ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t t0) t2)) (THead (Bind Abbr) t (lift (S O) O x)) (\lambda (H4: (eq T (THead (Bind Abbr) t t0) (THead (Bind Abbr) t (lift (S O) O x)))).(\lambda (P: Prop).(let H5 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) t t0) (THead (Bind Abbr) t (lift (S O) O x)) H4) in (let H6 \def (eq_ind T t0 (\lambda (t0: T).(subst0 O t t0 (lift (S O) O x))) H3 (lift (S O) O x) H5) in (subst0_refl t (lift (S O) O x) O H6 P))))) (pr0_delta t t (pr0_refl t) t0 t0 (pr0_refl t0) (lift (S O) O x) H3))) (\lambda (H3: (eq T t0 (lift (S O) O x))).(eq_ind_r T (lift (S O) O x) (\lambda (t2: T).(ex2 T (\lambda (t3: T).((eq T (THead (Bind Abbr) t t2) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(pr0 (THead (Bind Abbr) t t2) t3)))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) t (lift (S O) O x)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) t (lift (S O) O x)) t2)) x (\lambda (H4: (eq T (THead (Bind Abbr) t (lift (S O) O x)) x)).(\lambda (P: Prop).(thead_x_lift_y_y (Bind Abbr) x t (S O) O H4 P))) (pr0_zeta Abbr not_abbr_abst x x (pr0_refl x) t)) t0 H3)) H2))) H1)))) | Abst \Rightarrow (let H1 \def H in (or_ind (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))) (or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda (H2: ((\forall (t2: T).((pr0 t t2) \to (eq T t t2))))).(let H3 \def H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda (H4: ((\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))))).(or_introl (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2))) (\lambda (t2: T).(\lambda (H5: (pr0 (THead (Bind Abst) t t0) t2)).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3))) (eq T (THead (Bind Abst) t t0) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H7: (pr0 t x0)).(\lambda (H8: (pr0 t0 x1)).(let H_y \def (H4 x1 H8) in (let H_y0 \def (H2 x0 H7) in (let H9 \def (eq_ind_r T x1 (\lambda (t: T).(pr0 t0 t)) H8 t0 H_y) in (let H10 \def (eq_ind_r T x1 (\lambda (t: T).(eq T t2 (THead (Bind Abst) x0 t))) H6 t0 H_y) in (let H11 \def (eq_ind_r T x0 (\lambda (t0: T).(pr0 t t0)) H7 t H_y0) in (let H12 \def (eq_ind_r T x0 (\lambda (t: T).(eq T t2 (THead (Bind Abst) t t0))) H10 t H_y0) in (eq_ind_r T (THead (Bind Abst) t t0) (\lambda (t3: T).(eq T (THead (Bind Abst) t t0) t3)) (refl_equal T (THead (Bind Abst) t t0)) t2 H12)))))))))))) (pr0_gen_abst t t0 t2 H5)))))) (\lambda (H4: (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)))).(ex2_ind T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)) (or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda (x: T).(\lambda (H5: (((eq T t0 x) \to (\forall (P: Prop).P)))).(\lambda (H6: (pr0 t0 x)).(or_intror (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)) (THead (Bind Abst) t x) (\lambda (H7: (eq T (THead (Bind Abst) t t0) (THead (Bind Abst) t x))).(\lambda (P: Prop).(let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abst) t t0) (THead (Bind Abst) t x) H7) in (let H9 \def (eq_ind_r T x (\lambda (t: T).(pr0 t0 t)) H6 t0 H8) in (let H10 \def (eq_ind_r T x (\lambda (t: T).((eq T t0 t) \to (\forall (P: Prop).P))) H5 t0 H8) in (H10 (refl_equal T t0) P)))))) (pr0_comp t t (pr0_refl t) t0 x H6 (Bind Abst))))))) H4)) H3))) (\lambda (H2: (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)))).(ex2_ind T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)) (or (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)))) (\lambda (x: T).(\lambda (H3: (((eq T t x) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr0 t x)).(or_intror (\forall (t2: T).((pr0 (THead (Bind Abst) t t0) t2) \to (eq T (THead (Bind Abst) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Abst) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) t t0) t2)) (THead (Bind Abst) x t0) (\lambda (H5: (eq T (THead (Bind Abst) t t0) (THead (Bind Abst) x t0))).(\lambda (P: Prop).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead (Bind Abst) t t0) (THead (Bind Abst) x t0) H5) in (let H7 \def (eq_ind_r T x (\lambda (t0: T).(pr0 t t0)) H4 t H6) in (let H8 \def (eq_ind_r T x (\lambda (t0: T).((eq T t t0) \to (\forall (P: Prop).P))) H3 t H6) in (H8 (refl_equal T t) P)))))) (pr0_comp t x H4 t0 t0 (pr0_refl t0) (Bind Abst))))))) H2)) H1)) | Void \Rightarrow (let H_x \def (dnf_dec t t0 O) in (let H1 \def H_x in (ex_ind T (\lambda (v: T).(or (subst0 O t t0 (lift (S O) O v)) (eq T t0 (lift (S O) O v)))) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda (x: T).(\lambda (H2: (or (subst0 O t t0 (lift (S O) O x)) (eq T t0 (lift (S O) O x)))).(or_ind (subst0 O t t0 (lift (S O) O x)) (eq T t0 (lift (S O) O x)) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda (H3: (subst0 O t t0 (lift (S O) O x))).(let H4 \def H in (or_ind (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda (H5: ((\forall (t2: T).((pr0 t t2) \to (eq T t t2))))).(let H6 \def H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda (H7: ((\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))))).(or_introl (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2))) (\lambda (t2: T).(\lambda (H8: (pr0 (THead (Bind Void) t t0) t2)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3)))) (pr0 t0 (lift (S O) O t2)) (eq T (THead (Bind Void) t t0) t2) (\lambda (H9: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3))) (eq T (THead (Bind Void) t t0) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H10: (eq T t2 (THead (Bind Void) x0 x1))).(\lambda (H11: (pr0 t x0)).(\lambda (H12: (pr0 t0 x1)).(let H_y \def (H7 x1 H12) in (let H_y0 \def (H5 x0 H11) in (let H13 \def (eq_ind_r T x1 (\lambda (t: T).(pr0 t0 t)) H12 t0 H_y) in (let H14 \def (eq_ind_r T x1 (\lambda (t: T).(eq T t2 (THead (Bind Void) x0 t))) H10 t0 H_y) in (let H15 \def (eq_ind_r T x0 (\lambda (t0: T).(pr0 t t0)) H11 t H_y0) in (let H16 \def (eq_ind_r T x0 (\lambda (t: T).(eq T t2 (THead (Bind Void) t t0))) H14 t H_y0) in (eq_ind_r T (THead (Bind Void) t t0) (\lambda (t3: T).(eq T (THead (Bind Void) t t0) t3)) (refl_equal T (THead (Bind Void) t t0)) t2 H16)))))))))))) H9)) (\lambda (H9: (pr0 t0 (lift (S O) O t2))).(let H_y \def (H7 (lift (S O) O t2) H9) in (let H10 \def (eq_ind T t0 (\lambda (t0: T).(subst0 O t t0 (lift (S O) O x))) H3 (lift (S O) O t2) H_y) in (eq_ind_r T (lift (S O) O t2) (\lambda (t3: T).(eq T (THead (Bind Void) t t3) t2)) (subst0_gen_lift_false t2 t (lift (S O) O x) (S O) O O (le_n O) (eq_ind_r nat (plus (S O) O) (\lambda (n: nat).(lt O n)) (le_n (plus (S O) O)) (plus O (S O)) (plus_comm O (S O))) H10 (eq T (THead (Bind Void) t (lift (S O) O t2)) t2)) t0 H_y)))) (pr0_gen_void t t0 t2 H8)))))) (\lambda (H7: (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)))).(ex2_ind T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda (x0: T).(\lambda (H8: (((eq T t0 x0) \to (\forall (P: Prop).P)))).(\lambda (H9: (pr0 t0 x0)).(or_intror (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)) (THead (Bind Void) t x0) (\lambda (H10: (eq T (THead (Bind Void) t t0) (THead (Bind Void) t x0))).(\lambda (P: Prop).(let H11 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind Void) t t0) (THead (Bind Void) t x0) H10) in (let H12 \def (eq_ind_r T x0 (\lambda (t: T).(pr0 t0 t)) H9 t0 H11) in (let H13 \def (eq_ind_r T x0 (\lambda (t: T).((eq T t0 t) \to (\forall (P: Prop).P))) H8 t0 H11) in (H13 (refl_equal T t0) P)))))) (pr0_comp t t (pr0_refl t) t0 x0 H9 (Bind Void))))))) H7)) H6))) (\lambda (H5: (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)))).(ex2_ind T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)) (or (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)))) (\lambda (x0: T).(\lambda (H6: (((eq T t x0) \to (\forall (P: Prop).P)))).(\lambda (H7: (pr0 t x0)).(or_intror (\forall (t2: T).((pr0 (THead (Bind Void) t t0) t2) \to (eq T (THead (Bind Void) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Void) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t t0) t2)) (THead (Bind Void) x0 t0) (\lambda (H8: (eq T (THead (Bind Void) t t0) (THead (Bind Void) x0 t0))).(\lambda (P: Prop).(let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead (Bind Void) t t0) (THead (Bind Void) x0 t0) H8) in (let H10 \def (eq_ind_r T x0 (\lambda (t0: T).(pr0 t t0)) H7 t H9) in (let H11 \def (eq_ind_r T x0 (\lambda (t0: T).((eq T t t0) \to (\forall (P: Prop).P))) H6 t H9) in (H11 (refl_equal T t) P)))))) (pr0_comp t x0 H7 t0 t0 (pr0_refl t0) (Bind Void))))))) H5)) H4))) (\lambda (H3: (eq T t0 (lift (S O) O x))).(let H4 \def (eq_ind T t0 (\lambda (t: T).(or (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))))) H0 (lift (S O) O x) H3) in (eq_ind_r T (lift (S O) O x) (\lambda (t2: T).(or (\forall (t3: T).((pr0 (THead (Bind Void) t t2) t3) \to (eq T (THead (Bind Void) t t2) t3))) (ex2 T (\lambda (t3: T).((eq T (THead (Bind Void) t t2) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(pr0 (THead (Bind Void) t t2) t3))))) (or_intror (\forall (t2: T).((pr0 (THead (Bind Void) t (lift (S O) O x)) t2) \to (eq T (THead (Bind Void) t (lift (S O) O x)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) t (lift (S O) O x)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t (lift (S O) O x)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Bind Void) t (lift (S O) O x)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) t (lift (S O) O x)) t2)) x (\lambda (H5: (eq T (THead (Bind Void) t (lift (S O) O x)) x)).(\lambda (P: Prop).(thead_x_lift_y_y (Bind Void) x t (S O) O H5 P))) (pr0_zeta Void not_void_abst x x (pr0_refl x) t))) t0 H3))) H2))) H1)))]) | (Flat f) \Rightarrow (match f return (\lambda (f0: F).(or (\forall (t2: T).((pr0 (THead (Flat f0) t t0) t2) \to (eq T (THead (Flat f0) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat f0) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat f0) t t0) t2))))) with [Appl \Rightarrow (let H_x \def (binder_dec t0) in (let H1 \def H_x in (or_ind (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u)))))) (\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (H2: (ex_3 B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u))))))).(ex_3_ind B T T (\lambda (b: B).(\lambda (w: T).(\lambda (u: T).(eq T t0 (THead (Bind b) w u))))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H3: (eq T t0 (THead (Bind x0) x1 x2))).(let H4 \def (eq_ind T t0 (\lambda (t: T).(or (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))))) H0 (THead (Bind x0) x1 x2) H3) in (eq_ind_r T (THead (Bind x0) x1 x2) (\lambda (t2: T).(or (\forall (t3: T).((pr0 (THead (Flat Appl) t t2) t3) \to (eq T (THead (Flat Appl) t t2) t3))) (ex2 T (\lambda (t3: T).((eq T (THead (Flat Appl) t t2) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(pr0 (THead (Flat Appl) t t2) t3))))) ((match x0 return (\lambda (b: B).((or (\forall (t2: T).((pr0 (THead (Bind b) x1 x2) t2) \to (eq T (THead (Bind b) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind b) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind b) x1 x2) t2)))) \to (or (\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind b) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind b) x1 x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind b) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind b) x1 x2)) t2)))))) with [Abbr \Rightarrow (\lambda (_: (or (\forall (t2: T).((pr0 (THead (Bind Abbr) x1 x2) t2) \to (eq T (THead (Bind Abbr) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abbr) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abbr) x1 x2) t2))))).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) t2)) (THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) (THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O t) x2)))).(\lambda (P: Prop).(let H7 \def (eq_ind T (THead (Flat Appl) t (THead (Bind Abbr) x1 x2)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ t) \Rightarrow (match t return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])])) I (THead (Bind Abbr) x1 (THead (Flat Appl) (lift (S O) O t) x2)) H6) in (False_ind P H7)))) (pr0_upsilon Abbr not_abbr_abst t t (pr0_refl t) x1 x1 (pr0_refl x1) x2 x2 (pr0_refl x2))))) | Abst \Rightarrow (\lambda (_: (or (\forall (t2: T).((pr0 (THead (Bind Abst) x1 x2) t2) \to (eq T (THead (Bind Abst) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Abst) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Abst) x1 x2) t2))))).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) t2)) (THead (Bind Abbr) t x2) (\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) (THead (Bind Abbr) t x2))).(\lambda (P: Prop).(let H7 \def (eq_ind T (THead (Flat Appl) t (THead (Bind Abst) x1 x2)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) t x2) H6) in (False_ind P H7)))) (pr0_beta x1 t t (pr0_refl t) x2 x2 (pr0_refl x2))))) | Void \Rightarrow (\lambda (_: (or (\forall (t2: T).((pr0 (THead (Bind Void) x1 x2) t2) \to (eq T (THead (Bind Void) x1 x2) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Bind Void) x1 x2) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Bind Void) x1 x2) t2))))).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2) \to (eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t (THead (Bind Void) x1 x2)) t2)) (THead (Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)) (\lambda (H6: (eq T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) (THead (Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)))).(\lambda (P: Prop).(let H7 \def (eq_ind T (THead (Flat Appl) t (THead (Bind Void) x1 x2)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ t) \Rightarrow (match t return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])])) I (THead (Bind Void) x1 (THead (Flat Appl) (lift (S O) O t) x2)) H6) in (False_ind P H7)))) (pr0_upsilon Void not_void_abst t t (pr0_refl t) x1 x1 (pr0_refl x1) x2 x2 (pr0_refl x2)))))]) H4) t0 H3)))))) H2)) (\lambda (H2: ((\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t0 (THead (Bind b) w u)) \to (\forall (P: Prop).P))))))).(let H3 \def H in (or_ind (\forall (t2: T).((pr0 t t2) \to (eq T t t2))) (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (H4: ((\forall (t2: T).((pr0 t t2) \to (eq T t t2))))).(let H5 \def H0 in (or_ind (\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2))) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (H6: ((\forall (t2: T).((pr0 t0 t2) \to (eq T t0 t2))))).(or_introl (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2))) (\lambda (t2: T).(\lambda (H7: (pr0 (THead (Flat Appl) t t0) t2)).(or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 t u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 t u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (eq T (THead (Flat Appl) t t0) t2) (\lambda (H8: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 t u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t0 t3))) (eq T (THead (Flat Appl) t t0) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H9: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H10: (pr0 t x0)).(\lambda (H11: (pr0 t0 x1)).(let H_y \def (H6 x1 H11) in (let H_y0 \def (H4 x0 H10) in (let H12 \def (eq_ind_r T x1 (\lambda (t: T).(pr0 t0 t)) H11 t0 H_y) in (let H13 \def (eq_ind_r T x1 (\lambda (t: T).(eq T t2 (THead (Flat Appl) x0 t))) H9 t0 H_y) in (let H14 \def (eq_ind_r T x0 (\lambda (t0: T).(pr0 t t0)) H10 t H_y0) in (let H15 \def (eq_ind_r T x0 (\lambda (t: T).(eq T t2 (THead (Flat Appl) t t0))) H13 t H_y0) in (eq_ind_r T (THead (Flat Appl) t t0) (\lambda (t3: T).(eq T (THead (Flat Appl) t t0) t3)) (refl_equal T (THead (Flat Appl) t t0)) t2 H15)))))))))))) H8)) (\lambda (H8: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 t u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 t u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))) (eq T (THead (Flat Appl) t t0) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H9: (eq T t0 (THead (Bind Abst) x0 x1))).(\lambda (H10: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (_: (pr0 t x2)).(\lambda (_: (pr0 x1 x3)).(eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t3: T).(eq T (THead (Flat Appl) t t0) t3)) (let H13 \def (eq_ind T t0 (\lambda (t: T).(\forall (t2: T).((pr0 t t2) \to (eq T t t2)))) H6 (THead (Bind Abst) x0 x1) H9) in (let H14 \def (eq_ind T t0 (\lambda (t: T).(\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) H2 (THead (Bind Abst) x0 x1) H9) in (eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t3: T).(eq T (THead (Flat Appl) t t3) (THead (Bind Abbr) x2 x3))) (H14 Abst x0 x1 (H13 (THead (Bind Abst) x0 x1) (pr0_refl (THead (Bind Abst) x0 x1))) (eq T (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) (THead (Bind Abbr) x2 x3))) t0 H9))) t2 H10))))))))) H8)) (\lambda (H8: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 t u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 t u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))) (eq T (THead (Flat Appl) t t0) t2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 Abst))).(\lambda (H10: (eq T t0 (THead (Bind x0) x1 x2))).(\lambda (H11: (eq T t2 (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)))).(\lambda (_: (pr0 t x3)).(\lambda (_: (pr0 x1 x4)).(\lambda (_: (pr0 x2 x5)).(eq_ind_r T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (\lambda (t3: T).(eq T (THead (Flat Appl) t t0) t3)) (let H15 \def (eq_ind T t0 (\lambda (t: T).(\forall (t2: T).((pr0 t t2) \to (eq T t t2)))) H6 (THead (Bind x0) x1 x2) H10) in (let H16 \def (eq_ind T t0 (\lambda (t: T).(\forall (b: B).(\forall (w: T).(\forall (u: T).((eq T t (THead (Bind b) w u)) \to (\forall (P: Prop).P)))))) H2 (THead (Bind x0) x1 x2) H10) in (eq_ind_r T (THead (Bind x0) x1 x2) (\lambda (t3: T).(eq T (THead (Flat Appl) t t3) (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)))) (H16 x0 x1 x2 (H15 (THead (Bind x0) x1 x2) (pr0_refl (THead (Bind x0) x1 x2))) (eq T (THead (Flat Appl) t (THead (Bind x0) x1 x2)) (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)))) t0 H10))) t2 H11))))))))))))) H8)) (pr0_gen_appl t t0 t2 H7)))))) (\lambda (H6: (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)))).(ex2_ind T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t0 t2)) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (x: T).(\lambda (H7: (((eq T t0 x) \to (\forall (P: Prop).P)))).(\lambda (H8: (pr0 t0 x)).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)) (THead (Flat Appl) t x) (\lambda (H9: (eq T (THead (Flat Appl) t t0) (THead (Flat Appl) t x))).(\lambda (P: Prop).(let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) t t0) (THead (Flat Appl) t x) H9) in (let H11 \def (eq_ind_r T x (\lambda (t: T).(pr0 t0 t)) H8 t0 H10) in (let H12 \def (eq_ind_r T x (\lambda (t: T).((eq T t0 t) \to (\forall (P: Prop).P))) H7 t0 H10) in (H12 (refl_equal T t0) P)))))) (pr0_comp t t (pr0_refl t) t0 x H8 (Flat Appl))))))) H6)) H5))) (\lambda (H4: (ex2 T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)))).(ex2_ind T (\lambda (t2: T).((eq T t t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t t2)) (or (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)))) (\lambda (x: T).(\lambda (H5: (((eq T t x) \to (\forall (P: Prop).P)))).(\lambda (H6: (pr0 t x)).(or_intror (\forall (t2: T).((pr0 (THead (Flat Appl) t t0) t2) \to (eq T (THead (Flat Appl) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat Appl) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Appl) t t0) t2)) (THead (Flat Appl) x t0) (\lambda (H7: (eq T (THead (Flat Appl) t t0) (THead (Flat Appl) x t0))).(\lambda (P: Prop).(let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) t t0) (THead (Flat Appl) x t0) H7) in (let H9 \def (eq_ind_r T x (\lambda (t0: T).(pr0 t t0)) H6 t H8) in (let H10 \def (eq_ind_r T x (\lambda (t0: T).((eq T t t0) \to (\forall (P: Prop).P))) H5 t H8) in (H10 (refl_equal T t) P)))))) (pr0_comp t x H6 t0 t0 (pr0_refl t0) (Flat Appl))))))) H4)) H3))) H1))) | Cast \Rightarrow (or_intror (\forall (t2: T).((pr0 (THead (Flat Cast) t t0) t2) \to (eq T (THead (Flat Cast) t t0) t2))) (ex2 T (\lambda (t2: T).((eq T (THead (Flat Cast) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Cast) t t0) t2))) (ex_intro2 T (\lambda (t2: T).((eq T (THead (Flat Cast) t t0) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 (THead (Flat Cast) t t0) t2)) t0 (\lambda (H1: (eq T (THead (Flat Cast) t t0) t0)).(\lambda (P: Prop).(thead_x_y_y (Flat Cast) t t0 H1 P))) (pr0_epsilon t0 t0 (pr0_refl t0) t)))])])))))) t1). inductive pr1: T \to (T \to Prop) \def | pr1_r: \forall (t: T).(pr1 t t) @@ -1960,32 +1960,32 @@ inductive wcpr0: C \to (C \to Prop) \def theorem wcpr0_gen_sort: \forall (x: C).(\forall (n: nat).((wcpr0 (CSort n) x) \to (eq C x (CSort n)))) \def - \lambda (x: C).(\lambda (n: nat).(\lambda (H: (wcpr0 (CSort n) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c: C).(\lambda (c0: C).((eq C c (CSort n)) \to ((eq C c0 x) \to (eq C x (CSort n))))))) with [(wcpr0_refl c) \Rightarrow (\lambda (H0: (eq C c (CSort n))).(\lambda (H1: (eq C c x)).(eq_ind C (CSort n) (\lambda (c0: C).((eq C c0 x) \to (eq C x (CSort n)))) (\lambda (H2: (eq C (CSort n) x)).(eq_ind C (CSort n) (\lambda (c0: C).(eq C c0 (CSort n))) (refl_equal C (CSort n)) x H2)) c (sym_eq C c (CSort n) H0) H1))) | (wcpr0_comp c1 c2 H0 u1 u2 H1 k) \Rightarrow (\lambda (H2: (eq C (CHead c1 k u1) (CSort n))).(\lambda (H3: (eq C (CHead c2 k u2) x)).((let H4 \def (eq_ind C (CHead c1 k u1) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H2) in (False_ind ((eq C (CHead c2 k u2) x) \to ((wcpr0 c1 c2) \to ((pr0 u1 u2) \to (eq C x (CSort n))))) H4)) H3 H0 H1)))]) in (H0 (refl_equal C (CSort n)) (refl_equal C x))))). + \lambda (x: C).(\lambda (n: nat).(\lambda (H: (wcpr0 (CSort n) x)).(let H0 \def (match H return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (wcpr0 c c0)).((eq C c (CSort n)) \to ((eq C c0 x) \to (eq C x (CSort n))))))) with [(wcpr0_refl c) \Rightarrow (\lambda (H0: (eq C c (CSort n))).(\lambda (H1: (eq C c x)).(eq_ind C (CSort n) (\lambda (c0: C).((eq C c0 x) \to (eq C x (CSort n)))) (\lambda (H2: (eq C (CSort n) x)).(eq_ind C (CSort n) (\lambda (c0: C).(eq C c0 (CSort n))) (refl_equal C (CSort n)) x H2)) c (sym_eq C c (CSort n) H0) H1))) | (wcpr0_comp c1 c2 H0 u1 u2 H1 k) \Rightarrow (\lambda (H2: (eq C (CHead c1 k u1) (CSort n))).(\lambda (H3: (eq C (CHead c2 k u2) x)).((let H4 \def (eq_ind C (CHead c1 k u1) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n) H2) in (False_ind ((eq C (CHead c2 k u2) x) \to ((wcpr0 c1 c2) \to ((pr0 u1 u2) \to (eq C x (CSort n))))) H4)) H3 H0 H1)))]) in (H0 (refl_equal C (CSort n)) (refl_equal C x))))). theorem wcpr0_gen_head: \forall (k: K).(\forall (c1: C).(\forall (x: C).(\forall (u1: T).((wcpr0 (CHead c1 k u1) x) \to (or (eq C x (CHead c1 k u1)) (ex3_2 C T (\lambda (c2: C).(\lambda (u2: T).(eq C x (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))))) \def - \lambda (k: K).(\lambda (c1: C).(\lambda (x: C).(\lambda (u1: T).(\lambda (H: (wcpr0 (CHead c1 k u1) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead c1 k u1)) \to ((eq C c0 x) \to (or (eq C x (CHead c1 k u1)) (ex3_2 C T (\lambda (c2: C).(\lambda (u2: T).(eq C x (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2)))))))))) with [(wcpr0_refl c) \Rightarrow (\lambda (H0: (eq C c (CHead c1 k u1))).(\lambda (H1: (eq C c x)).(eq_ind C (CHead c1 k u1) (\lambda (c0: C).((eq C c0 x) \to (or (eq C x (CHead c1 k u1)) (ex3_2 C T (\lambda (c2: C).(\lambda (u2: T).(eq C x (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))) (\lambda (H2: (eq C (CHead c1 k u1) x)).(eq_ind C (CHead c1 k u1) (\lambda (c0: C).(or (eq C c0 (CHead c1 k u1)) (ex3_2 C T (\lambda (c2: C).(\lambda (u2: T).(eq C c0 (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2)))))) (or_introl (eq C (CHead c1 k u1) (CHead c1 k u1)) (ex3_2 C T (\lambda (c2: C).(\lambda (u2: T).(eq C (CHead c1 k u1) (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2)))) (refl_equal C (CHead c1 k u1))) x H2)) c (sym_eq C c (CHead c1 k u1) H0) H1))) | (wcpr0_comp c0 c2 H0 u0 u2 H1 k0) \Rightarrow (\lambda (H2: (eq C (CHead c0 k0 u0) (CHead c1 k u1))).(\lambda (H3: (eq C (CHead c2 k0 u2) x)).((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u0) (CHead c1 k u1) H2) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c0 k0 u0) (CHead c1 k u1) H2) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 u0) (CHead c1 k u1) H2) 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 ((wcpr0 c c2) \to ((pr0 u0 u2) \to (or (eq C x (CHead c1 k u1)) (ex3_2 C T (\lambda (c3: C).(\lambda (u3: T).(eq C x (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))))))))))) (\lambda (H7: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T u0 u1) \to ((eq C (CHead c2 k1 u2) x) \to ((wcpr0 c1 c2) \to ((pr0 u0 u2) \to (or (eq C x (CHead c1 k u1)) (ex3_2 C T (\lambda (c3: C).(\lambda (u3: T).(eq C x (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3)))))))))) (\lambda (H8: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq C (CHead c2 k u2) x) \to ((wcpr0 c1 c2) \to ((pr0 t u2) \to (or (eq C x (CHead c1 k u1)) (ex3_2 C T (\lambda (c3: C).(\lambda (u3: T).(eq C x (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))))))))) (\lambda (H9: (eq C (CHead c2 k u2) x)).(eq_ind C (CHead c2 k u2) (\lambda (c: C).((wcpr0 c1 c2) \to ((pr0 u1 u2) \to (or (eq C c (CHead c1 k u1)) (ex3_2 C T (\lambda (c3: C).(\lambda (u3: T).(eq C c (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3)))))))) (\lambda (H10: (wcpr0 c1 c2)).(\lambda (H11: (pr0 u1 u2)).(or_intror (eq C (CHead c2 k u2) (CHead c1 k u1)) (ex3_2 C T (\lambda (c3: C).(\lambda (u3: T).(eq C (CHead c2 k u2) (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3)))) (ex3_2_intro C T (\lambda (c3: C).(\lambda (u3: T).(eq C (CHead c2 k u2) (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))) c2 u2 (refl_equal C (CHead c2 k u2)) H10 H11)))) x H9)) u0 (sym_eq T u0 u1 H8))) k0 (sym_eq K k0 k H7))) c0 (sym_eq C c0 c1 H6))) H5)) H4)) H3 H0 H1)))]) in (H0 (refl_equal C (CHead c1 k u1)) (refl_equal C x))))))). + \lambda (k: K).(\lambda (c1: C).(\lambda (x: C).(\lambda (u1: T).(\lambda (H: (wcpr0 (CHead c1 k u1) x)).(let H0 \def (match H return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (wcpr0 c c0)).((eq C c (CHead c1 k u1)) \to ((eq C c0 x) \to (or (eq C x (CHead c1 k u1)) (ex3_2 C T (\lambda (c2: C).(\lambda (u2: T).(eq C x (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2)))))))))) with [(wcpr0_refl c) \Rightarrow (\lambda (H0: (eq C c (CHead c1 k u1))).(\lambda (H1: (eq C c x)).(eq_ind C (CHead c1 k u1) (\lambda (c0: C).((eq C c0 x) \to (or (eq C x (CHead c1 k u1)) (ex3_2 C T (\lambda (c2: C).(\lambda (u2: T).(eq C x (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))) (\lambda (H2: (eq C (CHead c1 k u1) x)).(eq_ind C (CHead c1 k u1) (\lambda (c0: C).(or (eq C c0 (CHead c1 k u1)) (ex3_2 C T (\lambda (c2: C).(\lambda (u2: T).(eq C c0 (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2)))))) (or_introl (eq C (CHead c1 k u1) (CHead c1 k u1)) (ex3_2 C T (\lambda (c2: C).(\lambda (u2: T).(eq C (CHead c1 k u1) (CHead c2 k u2)))) (\lambda (c2: C).(\lambda (_: T).(wcpr0 c1 c2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2)))) (refl_equal C (CHead c1 k u1))) x H2)) c (sym_eq C c (CHead c1 k u1) H0) H1))) | (wcpr0_comp c0 c2 H0 u0 u2 H1 k0) \Rightarrow (\lambda (H2: (eq C (CHead c0 k0 u0) (CHead c1 k u1))).(\lambda (H3: (eq C (CHead c2 k0 u2) x)).((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 u0) (CHead c1 k u1) H2) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c0 k0 u0) (CHead c1 k u1) H2) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k0 u0) (CHead c1 k u1) H2) 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 ((wcpr0 c c2) \to ((pr0 u0 u2) \to (or (eq C x (CHead c1 k u1)) (ex3_2 C T (\lambda (c3: C).(\lambda (u3: T).(eq C x (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))))))))))) (\lambda (H7: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T u0 u1) \to ((eq C (CHead c2 k1 u2) x) \to ((wcpr0 c1 c2) \to ((pr0 u0 u2) \to (or (eq C x (CHead c1 k u1)) (ex3_2 C T (\lambda (c3: C).(\lambda (u3: T).(eq C x (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3)))))))))) (\lambda (H8: (eq T u0 u1)).(eq_ind T u1 (\lambda (t: T).((eq C (CHead c2 k u2) x) \to ((wcpr0 c1 c2) \to ((pr0 t u2) \to (or (eq C x (CHead c1 k u1)) (ex3_2 C T (\lambda (c3: C).(\lambda (u3: T).(eq C x (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))))))))) (\lambda (H9: (eq C (CHead c2 k u2) x)).(eq_ind C (CHead c2 k u2) (\lambda (c: C).((wcpr0 c1 c2) \to ((pr0 u1 u2) \to (or (eq C c (CHead c1 k u1)) (ex3_2 C T (\lambda (c3: C).(\lambda (u3: T).(eq C c (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3)))))))) (\lambda (H10: (wcpr0 c1 c2)).(\lambda (H11: (pr0 u1 u2)).(or_intror (eq C (CHead c2 k u2) (CHead c1 k u1)) (ex3_2 C T (\lambda (c3: C).(\lambda (u3: T).(eq C (CHead c2 k u2) (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3)))) (ex3_2_intro C T (\lambda (c3: C).(\lambda (u3: T).(eq C (CHead c2 k u2) (CHead c3 k u3)))) (\lambda (c3: C).(\lambda (_: T).(wcpr0 c1 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))) c2 u2 (refl_equal C (CHead c2 k u2)) H10 H11)))) x H9)) u0 (sym_eq T u0 u1 H8))) k0 (sym_eq K k0 k H7))) c0 (sym_eq C c0 c1 H6))) H5)) H4)) H3 H0 H1)))]) in (H0 (refl_equal C (CHead c1 k u1)) (refl_equal C x))))))). theorem wcpr0_drop: \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((drop h O c1 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c2 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))))))) \def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(wcpr0_ind (\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((drop h O c (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c0 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda (u1: T).(\lambda (k: K).(\lambda (H0: (drop h O c (CHead e1 k u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl u1)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H0: (wcpr0 c0 c3)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((drop h O c0 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c3 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c0 k u1) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop n O (CHead c3 k u2) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))) (\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (drop O O (CHead c0 k u1) (CHead e1 k0 u0))).(let H4 \def (match (drop_gen_refl (CHead c0 k u1) (CHead e1 k0 u0) H3) return (\lambda (_: ?).(\lambda (c: C).((eq C c (CHead e1 k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop O O (CHead c3 k u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u0 u2))))))) with [refl_equal \Rightarrow (\lambda (H3: (eq C (CHead c0 k u1) (CHead e1 k0 u0))).(let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ t) \Rightarrow t])) (CHead c0 k u1) (CHead e1 k0 u0) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c0 k u1) (CHead e1 k0 u0) H3) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k u1) (CHead e1 k0 u0) H3) in (eq_ind C e1 (\lambda (_: C).((eq K k k0) \to ((eq T u1 u0) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop O O (CHead c3 k u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u0 u2))))))) (\lambda (H7: (eq K k k0)).(eq_ind K k0 (\lambda (k: K).((eq T u1 u0) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop O O (CHead c3 k u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u0 u2)))))) (\lambda (H8: (eq T u1 u0)).(eq_ind T u0 (\lambda (_: T).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop O O (CHead c3 k0 u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u0 u2))))) (let H9 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H2 u0 H8) in (let H10 \def (eq_ind C c0 (\lambda (c: C).(wcpr0 c c3)) H0 e1 H6) in (ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop O O (CHead c3 k0 u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u0 u2))) c3 u2 (drop_refl (CHead c3 k0 u2)) H10 H9))) u1 (sym_eq T u1 u0 H8))) k (sym_eq K k k0 H7))) c0 (sym_eq C c0 e1 H6))) H5)) H4)))]) in (H4 (refl_equal C (CHead e1 k0 u0)))))))) (K_ind (\lambda (k0: K).(\forall (n: nat).(((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((drop n O (CHead c0 k0 u1) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop n O (CHead c3 k0 u2) (CHead e2 k u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u3 u2))))))))) \to (\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((drop (S n) O (CHead c0 k0 u1) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop (S n) O (CHead c3 k0 u2) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))))) (\lambda (b: B).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((drop n O (CHead c0 (Bind b) u1) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop n O (CHead c3 (Bind b) u2) (CHead e2 k u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u3 u2)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (drop (S n) O (CHead c0 (Bind b) u1) (CHead e1 k0 u0))).(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(drop n O c3 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c3 (Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (drop n O c3 (CHead x0 k0 x1))).(\lambda (H6: (wcpr0 e1 x0)).(\lambda (H7: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c3 (Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (drop_drop (Bind b) n c3 (CHead x0 k0 x1) H5 u2) H6 H7)))))) (H1 n e1 u0 k0 (drop_gen_drop (Bind b) c0 (CHead e1 k0 u0) u1 n H4)))))))))) (\lambda (f: F).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((drop n O (CHead c0 (Flat f) u1) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop n O (CHead c3 (Flat f) u2) (CHead e2 k u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u3 u2)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (drop (S n) O (CHead c0 (Flat f) u1) (CHead e1 k0 u0))).(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O c3 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (drop (S n) O c3 (CHead x0 k0 x1))).(\lambda (H6: (wcpr0 e1 x0)).(\lambda (H7: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (drop_drop (Flat f) n c3 (CHead x0 k0 x1) H5 u2) H6 H7)))))) (H1 (S n) e1 u0 k0 (drop_gen_drop (Flat f) c0 (CHead e1 k0 u0) u1 n H4)))))))))) k) h)))))))))) c1 c2 H))). + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(wcpr0_ind (\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((drop h O c (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c0 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda (u1: T).(\lambda (k: K).(\lambda (H0: (drop h O c (CHead e1 k u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl u1)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H0: (wcpr0 c0 c3)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((drop h O c0 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c3 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c0 k u1) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop n O (CHead c3 k u2) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))) (\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (drop O O (CHead c0 k u1) (CHead e1 k0 u0))).(let H4 \def (match (drop_gen_refl (CHead c0 k u1) (CHead e1 k0 u0) H3) return (\lambda (c: C).(\lambda (_: (eq ? ? c)).((eq C c (CHead e1 k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop O O (CHead c3 k u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u0 u2))))))) with [refl_equal \Rightarrow (\lambda (H3: (eq C (CHead c0 k u1) (CHead e1 k0 u0))).(let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ t) \Rightarrow t])) (CHead c0 k u1) (CHead e1 k0 u0) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c0 k u1) (CHead e1 k0 u0) H3) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k u1) (CHead e1 k0 u0) H3) in (eq_ind C e1 (\lambda (_: C).((eq K k k0) \to ((eq T u1 u0) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop O O (CHead c3 k u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u0 u2))))))) (\lambda (H7: (eq K k k0)).(eq_ind K k0 (\lambda (k: K).((eq T u1 u0) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop O O (CHead c3 k u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u0 u2)))))) (\lambda (H8: (eq T u1 u0)).(eq_ind T u0 (\lambda (_: T).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop O O (CHead c3 k0 u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u0 u2))))) (let H9 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H2 u0 H8) in (let H10 \def (eq_ind C c0 (\lambda (c: C).(wcpr0 c c3)) H0 e1 H6) in (ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop O O (CHead c3 k0 u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u0 u2))) c3 u2 (drop_refl (CHead c3 k0 u2)) H10 H9))) u1 (sym_eq T u1 u0 H8))) k (sym_eq K k k0 H7))) c0 (sym_eq C c0 e1 H6))) H5)) H4)))]) in (H4 (refl_equal C (CHead e1 k0 u0)))))))) (K_ind (\lambda (k0: K).(\forall (n: nat).(((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((drop n O (CHead c0 k0 u1) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop n O (CHead c3 k0 u2) (CHead e2 k u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u3 u2))))))))) \to (\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((drop (S n) O (CHead c0 k0 u1) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop (S n) O (CHead c3 k0 u2) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))))) (\lambda (b: B).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((drop n O (CHead c0 (Bind b) u1) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop n O (CHead c3 (Bind b) u2) (CHead e2 k u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u3 u2)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (drop (S n) O (CHead c0 (Bind b) u1) (CHead e1 k0 u0))).(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(drop n O c3 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c3 (Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (drop n O c3 (CHead x0 k0 x1))).(\lambda (H6: (wcpr0 e1 x0)).(\lambda (H7: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c3 (Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (drop_drop (Bind b) n c3 (CHead x0 k0 x1) H5 u2) H6 H7)))))) (H1 n e1 u0 k0 (drop_gen_drop (Bind b) c0 (CHead e1 k0 u0) u1 n H4)))))))))) (\lambda (f: F).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((drop n O (CHead c0 (Flat f) u1) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop n O (CHead c3 (Flat f) u2) (CHead e2 k u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u3 u2)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (drop (S n) O (CHead c0 (Flat f) u1) (CHead e1 k0 u0))).(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O c3 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (drop (S n) O c3 (CHead x0 k0 x1))).(\lambda (H6: (wcpr0 e1 x0)).(\lambda (H7: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (drop_drop (Flat f) n c3 (CHead x0 k0 x1) H5 u2) H6 H7)))))) (H1 (S n) e1 u0 k0 (drop_gen_drop (Flat f) c0 (CHead e1 k0 u0) u1 n H4)))))))))) k) h)))))))))) c1 c2 H))). theorem wcpr0_drop_back: \forall (c1: C).(\forall (c2: C).((wcpr0 c2 c1) \to (\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((drop h O c1 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c2 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u1))))))))))) \def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c2 c1)).(wcpr0_ind (\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((drop h O c0 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u1))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda (u1: T).(\lambda (k: K).(\lambda (H0: (drop h O c (CHead e1 k u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u1))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl u1)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H0: (wcpr0 c0 c3)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((drop h O c3 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c0 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u1))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c3 k u2) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop n O (CHead c0 k u1) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))) (\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (drop O O (CHead c3 k u2) (CHead e1 k0 u0))).(let H4 \def (match (drop_gen_refl (CHead c3 k u2) (CHead e1 k0 u0) H3) return (\lambda (_: ?).(\lambda (c: C).((eq C c (CHead e1 k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop O O (CHead c0 k u1) (CHead e2 k0 u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u0))))))) with [refl_equal \Rightarrow (\lambda (H3: (eq C (CHead c3 k u2) (CHead e1 k0 u0))).(let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c3 k u2) (CHead e1 k0 u0) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c3 k u2) (CHead e1 k0 u0) H3) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c3 | (CHead c _ _) \Rightarrow c])) (CHead c3 k u2) (CHead e1 k0 u0) H3) in (eq_ind C e1 (\lambda (_: C).((eq K k k0) \to ((eq T u2 u0) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop O O (CHead c0 k u1) (CHead e2 k0 u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u0))))))) (\lambda (H7: (eq K k k0)).(eq_ind K k0 (\lambda (k: K).((eq T u2 u0) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop O O (CHead c0 k u1) (CHead e2 k0 u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u0)))))) (\lambda (H8: (eq T u2 u0)).(eq_ind T u0 (\lambda (_: T).(ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop O O (CHead c0 k0 u1) (CHead e2 k0 u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u0))))) (let H9 \def (eq_ind T u2 (\lambda (t: T).(pr0 u1 t)) H2 u0 H8) in (let H10 \def (eq_ind C c3 (\lambda (c: C).(wcpr0 c0 c)) H0 e1 H6) in (ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(drop O O (CHead c0 k0 u1) (CHead e2 k0 u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u0))) c0 u1 (drop_refl (CHead c0 k0 u1)) H10 H9))) u2 (sym_eq T u2 u0 H8))) k (sym_eq K k k0 H7))) c3 (sym_eq C c3 e1 H6))) H5)) H4)))]) in (H4 (refl_equal C (CHead e1 k0 u0)))))))) (K_ind (\lambda (k0: K).(\forall (n: nat).(((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((drop n O (CHead c3 k0 u2) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop n O (CHead c0 k0 u1) (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u3))))))))) \to (\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((drop (S n) O (CHead c3 k0 u2) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop (S n) O (CHead c0 k0 u1) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))))) (\lambda (b: B).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((drop n O (CHead c3 (Bind b) u2) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop n O (CHead c0 (Bind b) u1) (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (drop (S n) O (CHead c3 (Bind b) u2) (CHead e1 k0 u0))).(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(drop n O c0 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c0 (Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (drop n O c0 (CHead x0 k0 x1))).(\lambda (H6: (wcpr0 x0 e1)).(\lambda (H7: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c0 (Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (drop_drop (Bind b) n c0 (CHead x0 k0 x1) H5 u1) H6 H7)))))) (H1 n e1 u0 k0 (drop_gen_drop (Bind b) c3 (CHead e1 k0 u0) u2 n H4)))))))))) (\lambda (f: F).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((drop n O (CHead c3 (Flat f) u2) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop n O (CHead c0 (Flat f) u1) (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (drop (S n) O (CHead c3 (Flat f) u2) (CHead e1 k0 u0))).(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O c0 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (drop (S n) O c0 (CHead x0 k0 x1))).(\lambda (H6: (wcpr0 x0 e1)).(\lambda (H7: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (drop_drop (Flat f) n c0 (CHead x0 k0 x1) H5 u1) H6 H7)))))) (H1 (S n) e1 u0 k0 (drop_gen_drop (Flat f) c3 (CHead e1 k0 u0) u2 n H4)))))))))) k) h)))))))))) c2 c1 H))). + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c2 c1)).(wcpr0_ind (\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((drop h O c0 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u1))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda (u1: T).(\lambda (k: K).(\lambda (H0: (drop h O c (CHead e1 k u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u1))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl u1)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H0: (wcpr0 c0 c3)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((drop h O c3 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop h O c0 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u1))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((drop n O (CHead c3 k u2) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop n O (CHead c0 k u1) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))) (\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (drop O O (CHead c3 k u2) (CHead e1 k0 u0))).(let H4 \def (match (drop_gen_refl (CHead c3 k u2) (CHead e1 k0 u0) H3) return (\lambda (c: C).(\lambda (_: (eq ? ? c)).((eq C c (CHead e1 k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop O O (CHead c0 k u1) (CHead e2 k0 u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u0))))))) with [refl_equal \Rightarrow (\lambda (H3: (eq C (CHead c3 k u2) (CHead e1 k0 u0))).(let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u2 | (CHead _ _ t) \Rightarrow t])) (CHead c3 k u2) (CHead e1 k0 u0) H3) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c3 k u2) (CHead e1 k0 u0) H3) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c3 | (CHead c _ _) \Rightarrow c])) (CHead c3 k u2) (CHead e1 k0 u0) H3) in (eq_ind C e1 (\lambda (_: C).((eq K k k0) \to ((eq T u2 u0) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop O O (CHead c0 k u1) (CHead e2 k0 u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u0))))))) (\lambda (H7: (eq K k k0)).(eq_ind K k0 (\lambda (k: K).((eq T u2 u0) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop O O (CHead c0 k u1) (CHead e2 k0 u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u0)))))) (\lambda (H8: (eq T u2 u0)).(eq_ind T u0 (\lambda (_: T).(ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop O O (CHead c0 k0 u1) (CHead e2 k0 u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u0))))) (let H9 \def (eq_ind T u2 (\lambda (t: T).(pr0 u1 t)) H2 u0 H8) in (let H10 \def (eq_ind C c3 (\lambda (c: C).(wcpr0 c0 c)) H0 e1 H6) in (ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(drop O O (CHead c0 k0 u1) (CHead e2 k0 u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u0))) c0 u1 (drop_refl (CHead c0 k0 u1)) H10 H9))) u2 (sym_eq T u2 u0 H8))) k (sym_eq K k k0 H7))) c3 (sym_eq C c3 e1 H6))) H5)) H4)))]) in (H4 (refl_equal C (CHead e1 k0 u0)))))))) (K_ind (\lambda (k0: K).(\forall (n: nat).(((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((drop n O (CHead c3 k0 u2) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop n O (CHead c0 k0 u1) (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u3))))))))) \to (\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((drop (S n) O (CHead c3 k0 u2) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(drop (S n) O (CHead c0 k0 u1) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))))) (\lambda (b: B).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((drop n O (CHead c3 (Bind b) u2) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop n O (CHead c0 (Bind b) u1) (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (drop (S n) O (CHead c3 (Bind b) u2) (CHead e1 k0 u0))).(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(drop n O c0 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c0 (Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (drop n O c0 (CHead x0 k0 x1))).(\lambda (H6: (wcpr0 x0 e1)).(\lambda (H7: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c0 (Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (drop_drop (Bind b) n c0 (CHead x0 k0 x1) H5 u1) H6 H7)))))) (H1 n e1 u0 k0 (drop_gen_drop (Bind b) c3 (CHead e1 k0 u0) u2 n H4)))))))))) (\lambda (f: F).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((drop n O (CHead c3 (Flat f) u2) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(drop n O (CHead c0 (Flat f) u1) (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (drop (S n) O (CHead c3 (Flat f) u2) (CHead e1 k0 u0))).(ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O c0 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (drop (S n) O c0 (CHead x0 k0 x1))).(\lambda (H6: (wcpr0 x0 e1)).(\lambda (H7: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(drop (S n) O (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (drop_drop (Flat f) n c0 (CHead x0 k0 x1) H5 u1) H6 H7)))))) (H1 (S n) e1 u0 k0 (drop_gen_drop (Flat f) c3 (CHead e1 k0 u0) u2 n H4)))))))))) k) h)))))))))) c2 c1 H))). theorem wcpr0_getl: \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((getl h c1 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl h c2 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))))))) \def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(wcpr0_ind (\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((getl h c (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl h c0 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda (u1: T).(\lambda (k: K).(\lambda (H0: (getl h c (CHead e1 k u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(getl h c (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl u1)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H0: (wcpr0 c0 c3)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((getl h c0 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl h c3 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((getl n (CHead c0 k u1) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 k u2) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))) (\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (getl O (CHead c0 k u1) (CHead e1 k0 u0))).((match k return (\lambda (_: ?).(\lambda (k1: K).((clear (CHead c0 k1 u1) (CHead e1 k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 k1 u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))))))) with [(Bind b) \Rightarrow (\lambda (H4: (clear (CHead c0 (Bind b) u1) (CHead e1 k0 u0))).(let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow e1 | (CHead c _ _) \Rightarrow c])) (CHead e1 k0 u0) (CHead c0 (Bind b) u1) (clear_gen_bind b c0 (CHead e1 k0 u0) u1 H4)) in ((let H6 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead e1 k0 u0) (CHead c0 (Bind b) u1) (clear_gen_bind b c0 (CHead e1 k0 u0) u1 H4)) in ((let H7 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e1 k0 u0) (CHead c0 (Bind b) u1) (clear_gen_bind b c0 (CHead e1 k0 u0) u1 H4)) in (\lambda (H8: (eq K k0 (Bind b))).(\lambda (H9: (eq C e1 c0)).(eq_ind_r K (Bind b) (\lambda (k1: K).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) u2) (CHead e2 k1 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))))) (eq_ind_r T u1 (\lambda (t: T).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) u2) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 t u3))))) (eq_ind_r C c0 (\lambda (c: C).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) u2) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 c e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))))) (ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) u2) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 c0 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))) c3 u2 (getl_refl b c3 u2) H0 H2) e1 H9) u0 H7) k0 H8)))) H6)) H5))) | (Flat f) \Rightarrow (\lambda (H4: (clear (CHead c0 (Flat f) u1) (CHead e1 k0 u0))).(let H5 \def (H1 O e1 u0 k0 (getl_intro O c0 (CHead e1 k0 u0) c0 (drop_refl c0) (clear_gen_flat f c0 (CHead e1 k0 u0) u1 H4))) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl O c3 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl O c3 (CHead x0 k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_flat c3 (CHead x0 k0 x1) O H6 f u2) H7 H8)))))) H5)))]) (getl_gen_O (CHead c0 k u1) (CHead e1 k0 u0) H3)))))) (K_ind (\lambda (k0: K).(\forall (n: nat).(((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((getl n (CHead c0 k0 u1) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 k0 u2) (CHead e2 k u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u3 u2))))))))) \to (\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((getl (S n) (CHead c0 k0 u1) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl (S n) (CHead c3 k0 u2) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))))) (\lambda (b: B).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((getl n (CHead c0 (Bind b) u1) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 (Bind b) u2) (CHead e2 k u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u3 u2)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (getl (S n) (CHead c0 (Bind b) u1) (CHead e1 k0 u0))).(let H5 \def (H1 n e1 u0 k0 (getl_gen_S (Bind b) c0 (CHead e1 k0 u0) u1 n H4)) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl n c3 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 (Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl n c3 (CHead x0 k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 (Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_head (Bind b) n c3 (CHead x0 k0 x1) H6 u2) H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((getl n (CHead c0 (Flat f) u1) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 (Flat f) u2) (CHead e2 k u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u3 u2)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (getl (S n) (CHead c0 (Flat f) u1) (CHead e1 k0 u0))).(let H5 \def (H1 (S n) e1 u0 k0 (getl_gen_S (Flat f) c0 (CHead e1 k0 u0) u1 n H4)) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) c3 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl (S n) c3 (CHead x0 k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_head (Flat f) n c3 (CHead x0 k0 x1) H6 u2) H7 H8)))))) H5))))))))) k) h)))))))))) c1 c2 H))). + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(wcpr0_ind (\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((getl h c (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl h c0 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda (u1: T).(\lambda (k: K).(\lambda (H0: (getl h c (CHead e1 k u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(getl h c (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl u1)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H0: (wcpr0 c0 c3)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((getl h c0 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl h c3 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u1 u2))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((getl n (CHead c0 k u1) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 k u2) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))) (\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (getl O (CHead c0 k u1) (CHead e1 k0 u0))).((match k return (\lambda (k1: K).((clear (CHead c0 k1 u1) (CHead e1 k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 k1 u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))))) with [(Bind b) \Rightarrow (\lambda (H4: (clear (CHead c0 (Bind b) u1) (CHead e1 k0 u0))).(let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow e1 | (CHead c _ _) \Rightarrow c])) (CHead e1 k0 u0) (CHead c0 (Bind b) u1) (clear_gen_bind b c0 (CHead e1 k0 u0) u1 H4)) in ((let H6 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead e1 k0 u0) (CHead c0 (Bind b) u1) (clear_gen_bind b c0 (CHead e1 k0 u0) u1 H4)) in ((let H7 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e1 k0 u0) (CHead c0 (Bind b) u1) (clear_gen_bind b c0 (CHead e1 k0 u0) u1 H4)) in (\lambda (H8: (eq K k0 (Bind b))).(\lambda (H9: (eq C e1 c0)).(eq_ind_r K (Bind b) (\lambda (k1: K).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) u2) (CHead e2 k1 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))))) (eq_ind_r T u1 (\lambda (t: T).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) u2) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 t u3))))) (eq_ind_r C c0 (\lambda (c: C).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) u2) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 c e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))))) (ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Bind b) u2) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 c0 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u1 u3))) c3 u2 (getl_refl b c3 u2) H0 H2) e1 H9) u0 H7) k0 H8)))) H6)) H5))) | (Flat f) \Rightarrow (\lambda (H4: (clear (CHead c0 (Flat f) u1) (CHead e1 k0 u0))).(let H5 \def (H1 O e1 u0 k0 (getl_intro O c0 (CHead e1 k0 u0) c0 (drop_refl c0) (clear_gen_flat f c0 (CHead e1 k0 u0) u1 H4))) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl O c3 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl O c3 (CHead x0 k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_flat c3 (CHead x0 k0 x1) O H6 f u2) H7 H8)))))) H5)))]) (getl_gen_O (CHead c0 k u1) (CHead e1 k0 u0) H3)))))) (K_ind (\lambda (k0: K).(\forall (n: nat).(((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((getl n (CHead c0 k0 u1) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 k0 u2) (CHead e2 k u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u3 u2))))))))) \to (\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((getl (S n) (CHead c0 k0 u1) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl (S n) (CHead c3 k0 u2) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u4: T).(pr0 u3 u4))))))))))) (\lambda (b: B).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((getl n (CHead c0 (Bind b) u1) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 (Bind b) u2) (CHead e2 k u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u3 u2)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (getl (S n) (CHead c0 (Bind b) u1) (CHead e1 k0 u0))).(let H5 \def (H1 n e1 u0 k0 (getl_gen_S (Bind b) c0 (CHead e1 k0 u0) u1 n H4)) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl n c3 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 (Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl n c3 (CHead x0 k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 (Bind b) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_head (Bind b) n c3 (CHead x0 k0 x1) H6 u2) H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((getl n (CHead c0 (Flat f) u1) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c3 (Flat f) u2) (CHead e2 k u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u3 u2)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (getl (S n) (CHead c0 (Flat f) u1) (CHead e1 k0 u0))).(let H5 \def (H1 (S n) e1 u0 k0 (getl_gen_S (Flat f) c0 (CHead e1 k0 u0) u1 n H4)) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) c3 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl (S n) c3 (CHead x0 k0 x1))).(\lambda (H7: (wcpr0 e1 x0)).(\lambda (H8: (pr0 u0 x1)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c3 (Flat f) u2) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e1 e2))) (\lambda (_: C).(\lambda (u3: T).(pr0 u0 u3))) x0 x1 (getl_head (Flat f) n c3 (CHead x0 k0 x1) H6 u2) H7 H8)))))) H5))))))))) k) h)))))))))) c1 c2 H))). theorem wcpr0_getl_back: \forall (c1: C).(\forall (c2: C).((wcpr0 c2 c1) \to (\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((getl h c1 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl h c2 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u1))))))))))) \def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c2 c1)).(wcpr0_ind (\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((getl h c0 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl h c (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u1))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda (u1: T).(\lambda (k: K).(\lambda (H0: (getl h c (CHead e1 k u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(getl h c (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u1))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl u1)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H0: (wcpr0 c0 c3)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((getl h c3 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl h c0 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u1))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((getl n (CHead c3 k u2) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c0 k u1) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))) (\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (getl O (CHead c3 k u2) (CHead e1 k0 u0))).((match k return (\lambda (_: ?).(\lambda (k1: K).((clear (CHead c3 k1 u2) (CHead e1 k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 k1 u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))))))) with [(Bind b) \Rightarrow (\lambda (H4: (clear (CHead c3 (Bind b) u2) (CHead e1 k0 u0))).(let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow e1 | (CHead c _ _) \Rightarrow c])) (CHead e1 k0 u0) (CHead c3 (Bind b) u2) (clear_gen_bind b c3 (CHead e1 k0 u0) u2 H4)) in ((let H6 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead e1 k0 u0) (CHead c3 (Bind b) u2) (clear_gen_bind b c3 (CHead e1 k0 u0) u2 H4)) in ((let H7 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e1 k0 u0) (CHead c3 (Bind b) u2) (clear_gen_bind b c3 (CHead e1 k0 u0) u2 H4)) in (\lambda (H8: (eq K k0 (Bind b))).(\lambda (H9: (eq C e1 c3)).(eq_ind_r K (Bind b) (\lambda (k1: K).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Bind b) u1) (CHead e2 k1 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))))) (eq_ind_r T u2 (\lambda (t: T).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Bind b) u1) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 t))))) (eq_ind_r C c3 (\lambda (c: C).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Bind b) u1) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 c))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u2))))) (ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Bind b) u1) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u2))) c0 u1 (getl_refl b c0 u1) H0 H2) e1 H9) u0 H7) k0 H8)))) H6)) H5))) | (Flat f) \Rightarrow (\lambda (H4: (clear (CHead c3 (Flat f) u2) (CHead e1 k0 u0))).(let H5 \def (H1 O e1 u0 k0 (getl_intro O c3 (CHead e1 k0 u0) c3 (drop_refl c3) (clear_gen_flat f c3 (CHead e1 k0 u0) u2 H4))) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl O c0 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl O c0 (CHead x0 k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_flat c0 (CHead x0 k0 x1) O H6 f u1) H7 H8)))))) H5)))]) (getl_gen_O (CHead c3 k u2) (CHead e1 k0 u0) H3)))))) (K_ind (\lambda (k0: K).(\forall (n: nat).(((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((getl n (CHead c3 k0 u2) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl n (CHead c0 k0 u1) (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u3))))))))) \to (\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((getl (S n) (CHead c3 k0 u2) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl (S n) (CHead c0 k0 u1) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))))) (\lambda (b: B).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((getl n (CHead c3 (Bind b) u2) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl n (CHead c0 (Bind b) u1) (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (getl (S n) (CHead c3 (Bind b) u2) (CHead e1 k0 u0))).(let H5 \def (H1 n e1 u0 k0 (getl_gen_S (Bind b) c3 (CHead e1 k0 u0) u2 n H4)) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl n c0 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c0 (Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl n c0 (CHead x0 k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c0 (Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_head (Bind b) n c0 (CHead x0 k0 x1) H6 u1) H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((getl n (CHead c3 (Flat f) u2) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl n (CHead c0 (Flat f) u1) (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (getl (S n) (CHead c3 (Flat f) u2) (CHead e1 k0 u0))).(let H5 \def (H1 (S n) e1 u0 k0 (getl_gen_S (Flat f) c3 (CHead e1 k0 u0) u2 n H4)) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) c0 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl (S n) c0 (CHead x0 k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_head (Flat f) n c0 (CHead x0 k0 x1) H6 u1) H7 H8)))))) H5))))))))) k) h)))))))))) c2 c1 H))). + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c2 c1)).(wcpr0_ind (\lambda (c: C).(\lambda (c0: C).(\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((getl h c0 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl h c (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u1))))))))))) (\lambda (c: C).(\lambda (h: nat).(\lambda (e1: C).(\lambda (u1: T).(\lambda (k: K).(\lambda (H0: (getl h c (CHead e1 k u1))).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u2: T).(getl h c (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u1))) e1 u1 H0 (wcpr0_refl e1) (pr0_refl u1)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H0: (wcpr0 c0 c3)).(\lambda (H1: ((\forall (h: nat).(\forall (e1: C).(\forall (u1: T).(\forall (k: K).((getl h c3 (CHead e1 k u1)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl h c0 (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u1))))))))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 u2)).(\lambda (k: K).(\lambda (h: nat).(nat_ind (\lambda (n: nat).(\forall (e1: C).(\forall (u3: T).(\forall (k0: K).((getl n (CHead c3 k u2) (CHead e1 k0 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl n (CHead c0 k u1) (CHead e2 k0 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))) (\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H3: (getl O (CHead c3 k u2) (CHead e1 k0 u0))).((match k return (\lambda (k1: K).((clear (CHead c3 k1 u2) (CHead e1 k0 u0)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 k1 u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))))) with [(Bind b) \Rightarrow (\lambda (H4: (clear (CHead c3 (Bind b) u2) (CHead e1 k0 u0))).(let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow e1 | (CHead c _ _) \Rightarrow c])) (CHead e1 k0 u0) (CHead c3 (Bind b) u2) (clear_gen_bind b c3 (CHead e1 k0 u0) u2 H4)) in ((let H6 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead e1 k0 u0) (CHead c3 (Bind b) u2) (clear_gen_bind b c3 (CHead e1 k0 u0) u2 H4)) in ((let H7 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead e1 k0 u0) (CHead c3 (Bind b) u2) (clear_gen_bind b c3 (CHead e1 k0 u0) u2 H4)) in (\lambda (H8: (eq K k0 (Bind b))).(\lambda (H9: (eq C e1 c3)).(eq_ind_r K (Bind b) (\lambda (k1: K).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Bind b) u1) (CHead e2 k1 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))))) (eq_ind_r T u2 (\lambda (t: T).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Bind b) u1) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 t))))) (eq_ind_r C c3 (\lambda (c: C).(ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Bind b) u1) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 c))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u2))))) (ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Bind b) u1) (CHead e2 (Bind b) u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 c3))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u2))) c0 u1 (getl_refl b c0 u1) H0 H2) e1 H9) u0 H7) k0 H8)))) H6)) H5))) | (Flat f) \Rightarrow (\lambda (H4: (clear (CHead c3 (Flat f) u2) (CHead e1 k0 u0))).(let H5 \def (H1 O e1 u0 k0 (getl_intro O c3 (CHead e1 k0 u0) c3 (drop_refl c3) (clear_gen_flat f c3 (CHead e1 k0 u0) u2 H4))) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl O c0 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl O c0 (CHead x0 k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl O (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_flat c0 (CHead x0 k0 x1) O H6 f u1) H7 H8)))))) H5)))]) (getl_gen_O (CHead c3 k u2) (CHead e1 k0 u0) H3)))))) (K_ind (\lambda (k0: K).(\forall (n: nat).(((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((getl n (CHead c3 k0 u2) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl n (CHead c0 k0 u1) (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u3))))))))) \to (\forall (e1: C).(\forall (u3: T).(\forall (k1: K).((getl (S n) (CHead c3 k0 u2) (CHead e1 k1 u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u4: T).(getl (S n) (CHead c0 k0 u1) (CHead e2 k1 u4)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u4: T).(pr0 u4 u3))))))))))) (\lambda (b: B).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((getl n (CHead c3 (Bind b) u2) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl n (CHead c0 (Bind b) u1) (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (getl (S n) (CHead c3 (Bind b) u2) (CHead e1 k0 u0))).(let H5 \def (H1 n e1 u0 k0 (getl_gen_S (Bind b) c3 (CHead e1 k0 u0) u2 n H4)) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl n c0 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c0 (Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl n c0 (CHead x0 k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c0 (Bind b) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_head (Bind b) n c0 (CHead x0 k0 x1) H6 u1) H7 H8)))))) H5))))))))) (\lambda (f: F).(\lambda (n: nat).(\lambda (_: ((\forall (e1: C).(\forall (u3: T).(\forall (k: K).((getl n (CHead c3 (Flat f) u2) (CHead e1 k u3)) \to (ex3_2 C T (\lambda (e2: C).(\lambda (u2: T).(getl n (CHead c0 (Flat f) u1) (CHead e2 k u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u3)))))))))).(\lambda (e1: C).(\lambda (u0: T).(\lambda (k0: K).(\lambda (H4: (getl (S n) (CHead c3 (Flat f) u2) (CHead e1 k0 u0))).(let H5 \def (H1 (S n) e1 u0 k0 (getl_gen_S (Flat f) c3 (CHead e1 k0 u0) u2 n H4)) in (ex3_2_ind C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) c0 (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) (ex3_2 C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (getl (S n) c0 (CHead x0 k0 x1))).(\lambda (H7: (wcpr0 x0 e1)).(\lambda (H8: (pr0 x1 u0)).(ex3_2_intro C T (\lambda (e2: C).(\lambda (u3: T).(getl (S n) (CHead c0 (Flat f) u1) (CHead e2 k0 u3)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 e1))) (\lambda (_: C).(\lambda (u3: T).(pr0 u3 u0))) x0 x1 (getl_head (Flat f) n c0 (CHead x0 k0 x1) H6 u1) H7 H8)))))) H5))))))))) k) h)))))))))) c2 c1 H))). inductive pr2: C \to (T \to (T \to Prop)) \def | pr2_free: \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (pr2 c t1 t2)))) @@ -1994,27 +1994,27 @@ inductive pr2: C \to (T \to (T \to Prop)) \def theorem pr2_gen_sort: \forall (c: C).(\forall (x: T).(\forall (n: nat).((pr2 c (TSort n) x) \to (eq T x (TSort n))))) \def - \lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr2 c (TSort n) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 c) \to ((eq T t (TSort n)) \to ((eq T t0 x) \to (eq T x (TSort n))))))))) with [(pr2_free c0 t1 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t1 (TSort n))).(\lambda (H3: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t1 (TSort n)) \to ((eq T t2 x) \to ((pr0 t1 t2) \to (eq T x (TSort n)))))) (\lambda (H4: (eq T t1 (TSort n))).(eq_ind T (TSort n) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (eq T x (TSort n))))) (\lambda (H5: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (TSort n) t) \to (eq T x (TSort n)))) (\lambda (H6: (pr0 (TSort n) x)).(let H7 \def (eq_ind T x (\lambda (t: T).(pr2 c (TSort n) t)) H (TSort n) (pr0_gen_sort x n H6)) in (eq_ind_r T (TSort n) (\lambda (t: T).(eq T t (TSort n))) (refl_equal T (TSort n)) x (pr0_gen_sort x n H6)))) t2 (sym_eq T t2 x H5))) t1 (sym_eq T t1 (TSort n) H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t1 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t1 (TSort n))).(\lambda (H5: (eq T t x)).(eq_ind C c (\lambda (c: C).((eq T t1 (TSort n)) \to ((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t1 t2) \to ((subst0 i u t2 t) \to (eq T x (TSort n)))))))) (\lambda (H6: (eq T t1 (TSort n))).(eq_ind T (TSort n) (\lambda (t0: T).((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (eq T x (TSort n))))))) (\lambda (H7: (eq T t x)).(eq_ind T x (\lambda (t0: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 (TSort n) t2) \to ((subst0 i u t2 t0) \to (eq T x (TSort n)))))) (\lambda (_: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 (TSort n) t2)).(\lambda (H10: (subst0 i u t2 x)).(let H11 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (TSort n) (pr0_gen_sort t2 n H9)) in (subst0_gen_sort u x i n H11 (eq T x (TSort n))))))) t (sym_eq T t x H7))) t1 (sym_eq T t1 (TSort n) H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T (TSort n)) (refl_equal T x)))))). + \lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr2 c (TSort n) x)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 c) \to ((eq T t (TSort n)) \to ((eq T t0 x) \to (eq T x (TSort n))))))))) with [(pr2_free c0 t1 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t1 (TSort n))).(\lambda (H3: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t1 (TSort n)) \to ((eq T t2 x) \to ((pr0 t1 t2) \to (eq T x (TSort n)))))) (\lambda (H4: (eq T t1 (TSort n))).(eq_ind T (TSort n) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (eq T x (TSort n))))) (\lambda (H5: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (TSort n) t) \to (eq T x (TSort n)))) (\lambda (H6: (pr0 (TSort n) x)).(let H7 \def (eq_ind T x (\lambda (t: T).(pr2 c (TSort n) t)) H (TSort n) (pr0_gen_sort x n H6)) in (eq_ind_r T (TSort n) (\lambda (t: T).(eq T t (TSort n))) (refl_equal T (TSort n)) x (pr0_gen_sort x n H6)))) t2 (sym_eq T t2 x H5))) t1 (sym_eq T t1 (TSort n) H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t1 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t1 (TSort n))).(\lambda (H5: (eq T t x)).(eq_ind C c (\lambda (c: C).((eq T t1 (TSort n)) \to ((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t1 t2) \to ((subst0 i u t2 t) \to (eq T x (TSort n)))))))) (\lambda (H6: (eq T t1 (TSort n))).(eq_ind T (TSort n) (\lambda (t0: T).((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (eq T x (TSort n))))))) (\lambda (H7: (eq T t x)).(eq_ind T x (\lambda (t0: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 (TSort n) t2) \to ((subst0 i u t2 t0) \to (eq T x (TSort n)))))) (\lambda (_: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 (TSort n) t2)).(\lambda (H10: (subst0 i u t2 x)).(let H11 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (TSort n) (pr0_gen_sort t2 n H9)) in (subst0_gen_sort u x i n H11 (eq T x (TSort n))))))) t (sym_eq T t x H7))) t1 (sym_eq T t1 (TSort n) H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T (TSort n)) (refl_equal T x)))))). theorem pr2_gen_lref: \forall (c: C).(\forall (x: T).(\forall (n: nat).((pr2 c (TLRef n) x) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x (lift (S n) O u))))))))) \def - \lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr2 c (TLRef n) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 c) \to ((eq T t (TLRef n)) \to ((eq T t0 x) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x (lift (S n) O u))))))))))))) with [(pr2_free c0 t1 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t1 (TLRef n))).(\lambda (H3: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t1 (TLRef n)) \to ((eq T t2 x) \to ((pr0 t1 t2) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x (lift (S n) O u)))))))))) (\lambda (H4: (eq T t1 (TLRef n))).(eq_ind T (TLRef n) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x (lift (S n) O u))))))))) (\lambda (H5: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (TLRef n) t) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x (lift (S n) O u)))))))) (\lambda (H6: (pr0 (TLRef n) x)).(let H7 \def (eq_ind T x (\lambda (t: T).(pr2 c (TLRef n) t)) H (TLRef n) (pr0_gen_lref x n H6)) in (eq_ind_r T (TLRef n) (\lambda (t: T).(or (eq T t (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t (lift (S n) O u))))))) (or_introl (eq T (TLRef n) (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T (TLRef n) (lift (S n) O u))))) (refl_equal T (TLRef n))) x (pr0_gen_lref x n H6)))) t2 (sym_eq T t2 x H5))) t1 (sym_eq T t1 (TLRef n) H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t1 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t1 (TLRef n))).(\lambda (H5: (eq T t x)).(eq_ind C c (\lambda (c1: C).((eq T t1 (TLRef n)) \to ((eq T t x) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t1 t2) \to ((subst0 i u t2 t) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c (CHead d0 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T x (lift (S n) O u0)))))))))))) (\lambda (H6: (eq T t1 (TLRef n))).(eq_ind T (TLRef n) (\lambda (t0: T).((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c (CHead d0 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T x (lift (S n) O u0))))))))))) (\lambda (H7: (eq T t x)).(eq_ind T x (\lambda (t0: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 (TLRef n) t2) \to ((subst0 i u t2 t0) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c (CHead d0 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T x (lift (S n) O u0)))))))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 (TLRef n) t2)).(\lambda (H10: (subst0 i u t2 x)).(let H11 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (TLRef n) (pr0_gen_lref t2 n H9)) in (and_ind (eq nat n i) (eq T x (lift (S n) O u)) (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c (CHead d0 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T x (lift (S n) O u0)))))) (\lambda (H12: (eq nat n i)).(\lambda (H13: (eq T x (lift (S n) O u))).(let H14 \def (eq_ind_r nat i (\lambda (n: nat).(getl n c (CHead d (Bind Abbr) u))) H8 n H12) in (let H15 \def (eq_ind T x (\lambda (t: T).(pr2 c (TLRef n) t)) H (lift (S n) O u) H13) in (eq_ind_r T (lift (S n) O u) (\lambda (t0: T).(or (eq T t0 (TLRef n)) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c (CHead d0 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t0 (lift (S n) O u0))))))) (or_intror (eq T (lift (S n) O u) (TLRef n)) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c (CHead d0 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T (lift (S n) O u) (lift (S n) O u0))))) (ex2_2_intro C T (\lambda (d0: C).(\lambda (u0: T).(getl n c (CHead d0 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T (lift (S n) O u) (lift (S n) O u0)))) d u H14 (refl_equal T (lift (S n) O u)))) x H13))))) (subst0_gen_lref u x i n H11)))))) t (sym_eq T t x H7))) t1 (sym_eq T t1 (TLRef n) H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T (TLRef n)) (refl_equal T x)))))). + \lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (pr2 c (TLRef n) x)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 c) \to ((eq T t (TLRef n)) \to ((eq T t0 x) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x (lift (S n) O u))))))))))))) with [(pr2_free c0 t1 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t1 (TLRef n))).(\lambda (H3: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t1 (TLRef n)) \to ((eq T t2 x) \to ((pr0 t1 t2) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x (lift (S n) O u)))))))))) (\lambda (H4: (eq T t1 (TLRef n))).(eq_ind T (TLRef n) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x (lift (S n) O u))))))))) (\lambda (H5: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (TLRef n) t) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T x (lift (S n) O u)))))))) (\lambda (H6: (pr0 (TLRef n) x)).(let H7 \def (eq_ind T x (\lambda (t: T).(pr2 c (TLRef n) t)) H (TLRef n) (pr0_gen_lref x n H6)) in (eq_ind_r T (TLRef n) (\lambda (t: T).(or (eq T t (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t (lift (S n) O u))))))) (or_introl (eq T (TLRef n) (TLRef n)) (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl n c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T (TLRef n) (lift (S n) O u))))) (refl_equal T (TLRef n))) x (pr0_gen_lref x n H6)))) t2 (sym_eq T t2 x H5))) t1 (sym_eq T t1 (TLRef n) H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t1 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t1 (TLRef n))).(\lambda (H5: (eq T t x)).(eq_ind C c (\lambda (c1: C).((eq T t1 (TLRef n)) \to ((eq T t x) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t1 t2) \to ((subst0 i u t2 t) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c (CHead d0 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T x (lift (S n) O u0)))))))))))) (\lambda (H6: (eq T t1 (TLRef n))).(eq_ind T (TLRef n) (\lambda (t0: T).((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c (CHead d0 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T x (lift (S n) O u0))))))))))) (\lambda (H7: (eq T t x)).(eq_ind T x (\lambda (t0: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 (TLRef n) t2) \to ((subst0 i u t2 t0) \to (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c (CHead d0 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T x (lift (S n) O u0)))))))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 (TLRef n) t2)).(\lambda (H10: (subst0 i u t2 x)).(let H11 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (TLRef n) (pr0_gen_lref t2 n H9)) in (and_ind (eq nat n i) (eq T x (lift (S n) O u)) (or (eq T x (TLRef n)) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c (CHead d0 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T x (lift (S n) O u0)))))) (\lambda (H12: (eq nat n i)).(\lambda (H13: (eq T x (lift (S n) O u))).(let H14 \def (eq_ind_r nat i (\lambda (n: nat).(getl n c (CHead d (Bind Abbr) u))) H8 n H12) in (let H15 \def (eq_ind T x (\lambda (t: T).(pr2 c (TLRef n) t)) H (lift (S n) O u) H13) in (eq_ind_r T (lift (S n) O u) (\lambda (t0: T).(or (eq T t0 (TLRef n)) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c (CHead d0 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t0 (lift (S n) O u0))))))) (or_intror (eq T (lift (S n) O u) (TLRef n)) (ex2_2 C T (\lambda (d0: C).(\lambda (u0: T).(getl n c (CHead d0 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T (lift (S n) O u) (lift (S n) O u0))))) (ex2_2_intro C T (\lambda (d0: C).(\lambda (u0: T).(getl n c (CHead d0 (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T (lift (S n) O u) (lift (S n) O u0)))) d u H14 (refl_equal T (lift (S n) O u)))) x H13))))) (subst0_gen_lref u x i n H11)))))) t (sym_eq T t x H7))) t1 (sym_eq T t1 (TLRef n) H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T (TLRef n)) (refl_equal T x)))))). theorem pr2_gen_abst: \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c (THead (Bind Abst) u1 t1) x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2)))))))))) \def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr2 c (THead (Bind Abst) u1 t1) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 c) \to ((eq T t (THead (Bind Abst) u1 t1)) \to ((eq T t0 x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2))))))))))))) with [(pr2_free c0 t0 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t0 (THead (Bind Abst) u1 t1))).(\lambda (H3: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t0 (THead (Bind Abst) u1 t1)) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))))))) (\lambda (H4: (eq T t0 (THead (Bind Abst) u1 t1))).(eq_ind T (THead (Bind Abst) u1 t1) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))))))))) (\lambda (H5: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (THead (Bind Abst) u1 t1) t) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))))) (\lambda (H6: (pr0 (THead (Bind Abst) u1 t1) x)).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T x (THead (Bind Abst) x0 x1))).(\lambda (H8: (pr0 u1 x0)).(\lambda (H9: (pr0 t1 x1)).(let H10 \def (eq_ind T x (\lambda (t: T).(pr2 c (THead (Bind Abst) u1 t1) t)) H (THead (Bind Abst) x0 x1) H7) in (eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))))) x0 x1 (refl_equal T (THead (Bind Abst) x0 x1)) (pr2_free c u1 x0 H8) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c (Bind b) u) t1 x1 H9)))) x H7))))))) (pr0_gen_abst u1 t1 x H6))) t2 (sym_eq T t2 x H5))) t0 (sym_eq T t0 (THead (Bind Abst) u1 t1) H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t0 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t0 (THead (Bind Abst) u1 t1))).(\lambda (H5: (eq T t x)).(eq_ind C c (\lambda (c1: C).((eq T t0 (THead (Bind Abst) u1 t1)) \to ((eq T t x) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))))))))) (\lambda (H6: (eq T t0 (THead (Bind Abst) u1 t1))).(eq_ind T (THead (Bind Abst) u1 t1) (\lambda (t3: T).((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t3 t2) \to ((subst0 i u t2 t) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4))))))))))) (\lambda (H7: (eq T t x)).(eq_ind T x (\lambda (t3: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 (THead (Bind Abst) u1 t1) t2) \to ((subst0 i u t2 t3) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4)))))))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 (THead (Bind Abst) u1 t1) t2)).(\lambda (H10: (subst0 i u t2 x)).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H12: (pr0 u1 x0)).(\lambda (H13: (pr0 t1 x1)).(let H14 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Bind Abst) x0 x1) H11) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abst) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Bind Abst) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u x1 t3)))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\lambda (H15: (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abst) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Bind Abst) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Bind Abst) x2 x1))).(\lambda (H17: (subst0 i u x0 x2)).(let H18 \def (eq_ind T x (\lambda (t: T).(pr2 c (THead (Bind Abst) u1 t1) t)) H (THead (Bind Abst) x2 x1) H16) in (eq_ind_r T (THead (Bind Abst) x2 x1) (\lambda (t3: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abst) x2 x1) (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))))) x2 x1 (refl_equal T (THead (Bind Abst) x2 x1)) (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (\lambda (b: B).(\lambda (u0: T).(pr2_free (CHead c (Bind b) u0) t1 x1 H13)))) x H16))))) H15)) (\lambda (H15: (ex2 T (\lambda (t2: T).(eq T x (THead (Bind Abst) x0 t2))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) u x1 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Bind Abst) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u x1 t3)) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Bind Abst) x0 x2))).(\lambda (H17: (subst0 (s (Bind Abst) i) u x1 x2)).(let H18 \def (eq_ind T x (\lambda (t: T).(pr2 c (THead (Bind Abst) u1 t1) t)) H (THead (Bind Abst) x0 x2) H16) in (eq_ind_r T (THead (Bind Abst) x0 x2) (\lambda (t3: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abst) x0 x2) (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))))) x0 x2 (refl_equal T (THead (Bind Abst) x0 x2)) (pr2_free c u1 x0 H12) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 x1 H13 x2 H17)))) x H16))))) H15)) (\lambda (H15: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) u x1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H16: (eq T x (THead (Bind Abst) x2 x3))).(\lambda (H17: (subst0 i u x0 x2)).(\lambda (H18: (subst0 (s (Bind Abst) i) u x1 x3)).(let H19 \def (eq_ind T x (\lambda (t: T).(pr2 c (THead (Bind Abst) u1 t1) t)) H (THead (Bind Abst) x2 x3) H16) in (eq_ind_r T (THead (Bind Abst) x2 x3) (\lambda (t3: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abst) x2 x3) (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))))) x2 x3 (refl_equal T (THead (Bind Abst) x2 x3)) (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 x1 H13 x3 H18)))) x H16))))))) H15)) (subst0_gen_head (Bind Abst) u x0 x1 x i H14)))))))) (pr0_gen_abst u1 t1 t2 H9))))) t (sym_eq T t x H7))) t0 (sym_eq T t0 (THead (Bind Abst) u1 t1) H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T (THead (Bind Abst) u1 t1)) (refl_equal T x))))))). + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr2 c (THead (Bind Abst) u1 t1) x)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 c) \to ((eq T t (THead (Bind Abst) u1 t1)) \to ((eq T t0 x) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2))))))))))))) with [(pr2_free c0 t0 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t0 (THead (Bind Abst) u1 t1))).(\lambda (H3: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t0 (THead (Bind Abst) u1 t1)) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))))))) (\lambda (H4: (eq T t0 (THead (Bind Abst) u1 t1))).(eq_ind T (THead (Bind Abst) u1 t1) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))))))))) (\lambda (H5: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (THead (Bind Abst) u1 t1) t) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))))) (\lambda (H6: (pr0 (THead (Bind Abst) u1 t1) x)).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T x (THead (Bind Abst) x0 x1))).(\lambda (H8: (pr0 u1 x0)).(\lambda (H9: (pr0 t1 x1)).(let H10 \def (eq_ind T x (\lambda (t: T).(pr2 c (THead (Bind Abst) u1 t1) t)) H (THead (Bind Abst) x0 x1) H7) in (eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))))) x0 x1 (refl_equal T (THead (Bind Abst) x0 x1)) (pr2_free c u1 x0 H8) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c (Bind b) u) t1 x1 H9)))) x H7))))))) (pr0_gen_abst u1 t1 x H6))) t2 (sym_eq T t2 x H5))) t0 (sym_eq T t0 (THead (Bind Abst) u1 t1) H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t0 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t0 (THead (Bind Abst) u1 t1))).(\lambda (H5: (eq T t x)).(eq_ind C c (\lambda (c1: C).((eq T t0 (THead (Bind Abst) u1 t1)) \to ((eq T t x) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))))))))) (\lambda (H6: (eq T t0 (THead (Bind Abst) u1 t1))).(eq_ind T (THead (Bind Abst) u1 t1) (\lambda (t3: T).((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t3 t2) \to ((subst0 i u t2 t) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4))))))))))) (\lambda (H7: (eq T t x)).(eq_ind T x (\lambda (t3: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 (THead (Bind Abst) u1 t1) t2) \to ((subst0 i u t2 t3) \to (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4)))))))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 (THead (Bind Abst) u1 t1) t2)).(\lambda (H10: (subst0 i u t2 x)).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t2 (THead (Bind Abst) x0 x1))).(\lambda (H12: (pr0 u1 x0)).(\lambda (H13: (pr0 t1 x1)).(let H14 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Bind Abst) x0 x1) H11) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abst) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Bind Abst) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u x1 t3)))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\lambda (H15: (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abst) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Bind Abst) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Bind Abst) x2 x1))).(\lambda (H17: (subst0 i u x0 x2)).(let H18 \def (eq_ind T x (\lambda (t: T).(pr2 c (THead (Bind Abst) u1 t1) t)) H (THead (Bind Abst) x2 x1) H16) in (eq_ind_r T (THead (Bind Abst) x2 x1) (\lambda (t3: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abst) x2 x1) (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))))) x2 x1 (refl_equal T (THead (Bind Abst) x2 x1)) (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (\lambda (b: B).(\lambda (u0: T).(pr2_free (CHead c (Bind b) u0) t1 x1 H13)))) x H16))))) H15)) (\lambda (H15: (ex2 T (\lambda (t2: T).(eq T x (THead (Bind Abst) x0 t2))) (\lambda (t2: T).(subst0 (s (Bind Abst) i) u x1 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Bind Abst) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abst) i) u x1 t3)) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Bind Abst) x0 x2))).(\lambda (H17: (subst0 (s (Bind Abst) i) u x1 x2)).(let H18 \def (eq_ind T x (\lambda (t: T).(pr2 c (THead (Bind Abst) u1 t1) t)) H (THead (Bind Abst) x0 x2) H16) in (eq_ind_r T (THead (Bind Abst) x0 x2) (\lambda (t3: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abst) x0 x2) (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))))) x0 x2 (refl_equal T (THead (Bind Abst) x0 x2)) (pr2_free c u1 x0 H12) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 x1 H13 x2 H17)))) x H16))))) H15)) (\lambda (H15: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abst) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abst) i) u x1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abst) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H16: (eq T x (THead (Bind Abst) x2 x3))).(\lambda (H17: (subst0 i u x0 x2)).(\lambda (H18: (subst0 (s (Bind Abst) i) u x1 x3)).(let H19 \def (eq_ind T x (\lambda (t: T).(pr2 c (THead (Bind Abst) u1 t1) t)) H (THead (Bind Abst) x2 x3) H16) in (eq_ind_r T (THead (Bind Abst) x2 x3) (\lambda (t3: T).(ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abst) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abst) x2 x3) (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))))) x2 x3 (refl_equal T (THead (Bind Abst) x2 x3)) (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 x1 H13 x3 H18)))) x H16))))))) H15)) (subst0_gen_head (Bind Abst) u x0 x1 x i H14)))))))) (pr0_gen_abst u1 t1 t2 H9))))) t (sym_eq T t x H7))) t0 (sym_eq T t0 (THead (Bind Abst) u1 t1) H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T (THead (Bind Abst) u1 t1)) (refl_equal T x))))))). theorem pr2_gen_cast: \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c (THead (Flat Cast) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c t1 t2)))) (pr2 c t1 x)))))) \def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr2 c (THead (Flat Cast) u1 t1) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 c) \to ((eq T t (THead (Flat Cast) u1 t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c t1 t2)))) (pr2 c t1 x))))))))) with [(pr2_free c0 t0 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t0 (THead (Flat Cast) u1 t1))).(\lambda (H3: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t0 (THead (Flat Cast) u1 t1)) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)))))) (\lambda (H4: (eq T t0 (THead (Flat Cast) u1 t1))).(eq_ind T (THead (Flat Cast) u1 t1) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x))))) (\lambda (H5: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (THead (Flat Cast) u1 t1) t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)))) (\lambda (H6: (pr0 (THead (Flat Cast) u1 t1) x)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq T x (THead (Flat Cast) x0 x1))).(\lambda (H9: (pr0 u1 x0)).(\lambda (H10: (pr0 t1 x1)).(let H11 \def (eq_ind T x (\lambda (t: T).(pr2 c (THead (Flat Cast) u1 t1) t)) H (THead (Flat Cast) x0 x1) H8) in (eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 t))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Cast) x0 x1) (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 (THead (Flat Cast) x0 x1)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Cast) x0 x1) (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x0 x1 (refl_equal T (THead (Flat Cast) x0 x1)) (pr2_free c u1 x0 H9) (pr2_free c t1 x1 H10))) x H8))))))) H7)) (\lambda (H7: (pr0 t1 x)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x) (pr2_free c t1 x H7))) (pr0_gen_cast u1 t1 x H6))) t2 (sym_eq T t2 x H5))) t0 (sym_eq T t0 (THead (Flat Cast) u1 t1) H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t0 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t0 (THead (Flat Cast) u1 t1))).(\lambda (H5: (eq T t x)).(eq_ind C c (\lambda (c1: C).((eq T t0 (THead (Flat Cast) u1 t1)) \to ((eq T t x) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)))))))) (\lambda (H6: (eq T t0 (THead (Flat Cast) u1 t1))).(eq_ind T (THead (Flat Cast) u1 t1) (\lambda (t3: T).((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t3 t2) \to ((subst0 i u t2 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c t1 t4)))) (pr2 c t1 x))))))) (\lambda (H7: (eq T t x)).(eq_ind T x (\lambda (t3: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 (THead (Flat Cast) u1 t1) t2) \to ((subst0 i u t2 t3) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c t1 t4)))) (pr2 c t1 x)))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 (THead (Flat Cast) u1 t1) t2)).(\lambda (H10: (subst0 i u t2 x)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 t2) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H12: (eq T t2 (THead (Flat Cast) x0 x1))).(\lambda (H13: (pr0 u1 x0)).(\lambda (H14: (pr0 t1 x1)).(let H15 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Flat Cast) x0 x1) H12) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Flat Cast) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Flat Cast) x0 t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3)))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (H16: (ex2 T (\lambda (u2: T).(eq T x (THead (Flat Cast) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Flat Cast) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (x2: T).(\lambda (H17: (eq T x (THead (Flat Cast) x2 x1))).(\lambda (H18: (subst0 i u x0 x2)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x2 x1 H17 (pr2_delta c d u i H8 u1 x0 H13 x2 H18) (pr2_free c t1 x1 H14)))))) H16)) (\lambda (H16: (ex2 T (\lambda (t2: T).(eq T x (THead (Flat Cast) x0 t2))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) u x1 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Flat Cast) x0 t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (x2: T).(\lambda (H17: (eq T x (THead (Flat Cast) x0 x2))).(\lambda (H18: (subst0 (s (Flat Cast) i) u x1 x2)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x0 x2 H17 (pr2_free c u1 x0 H13) (pr2_delta c d u i H8 t1 x1 H14 x2 H18)))))) H16)) (\lambda (H16: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Cast) i) u x1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H17: (eq T x (THead (Flat Cast) x2 x3))).(\lambda (H18: (subst0 i u x0 x2)).(\lambda (H19: (subst0 (s (Flat Cast) i) u x1 x3)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x2 x3 H17 (pr2_delta c d u i H8 u1 x0 H13 x2 H18) (pr2_delta c d u i H8 t1 x1 H14 x3 H19)))))))) H16)) (subst0_gen_head (Flat Cast) u x0 x1 x i H15)))))))) H11)) (\lambda (H11: (pr0 t1 t2)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x) (pr2_delta c d u i H8 t1 t2 H11 x H10))) (pr0_gen_cast u1 t1 t2 H9))))) t (sym_eq T t x H7))) t0 (sym_eq T t0 (THead (Flat Cast) u1 t1) H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T (THead (Flat Cast) u1 t1)) (refl_equal T x))))))). + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr2 c (THead (Flat Cast) u1 t1) x)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 c) \to ((eq T t (THead (Flat Cast) u1 t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c t1 t2)))) (pr2 c t1 x))))))))) with [(pr2_free c0 t0 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t0 (THead (Flat Cast) u1 t1))).(\lambda (H3: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t0 (THead (Flat Cast) u1 t1)) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)))))) (\lambda (H4: (eq T t0 (THead (Flat Cast) u1 t1))).(eq_ind T (THead (Flat Cast) u1 t1) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x))))) (\lambda (H5: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (THead (Flat Cast) u1 t1) t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)))) (\lambda (H6: (pr0 (THead (Flat Cast) u1 t1) x)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 x) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq T x (THead (Flat Cast) x0 x1))).(\lambda (H9: (pr0 u1 x0)).(\lambda (H10: (pr0 t1 x1)).(let H11 \def (eq_ind T x (\lambda (t: T).(pr2 c (THead (Flat Cast) u1 t1) t)) H (THead (Flat Cast) x0 x1) H8) in (eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 t))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Cast) x0 x1) (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 (THead (Flat Cast) x0 x1)) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Cast) x0 x1) (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x0 x1 (refl_equal T (THead (Flat Cast) x0 x1)) (pr2_free c u1 x0 H9) (pr2_free c t1 x1 H10))) x H8))))))) H7)) (\lambda (H7: (pr0 t1 x)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x) (pr2_free c t1 x H7))) (pr0_gen_cast u1 t1 x H6))) t2 (sym_eq T t2 x H5))) t0 (sym_eq T t0 (THead (Flat Cast) u1 t1) H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t0 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t0 (THead (Flat Cast) u1 t1))).(\lambda (H5: (eq T t x)).(eq_ind C c (\lambda (c1: C).((eq T t0 (THead (Flat Cast) u1 t1)) \to ((eq T t x) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)))))))) (\lambda (H6: (eq T t0 (THead (Flat Cast) u1 t1))).(eq_ind T (THead (Flat Cast) u1 t1) (\lambda (t3: T).((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t3 t2) \to ((subst0 i u t2 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c t1 t4)))) (pr2 c t1 x))))))) (\lambda (H7: (eq T t x)).(eq_ind T x (\lambda (t3: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 (THead (Flat Cast) u1 t1) t2) \to ((subst0 i u t2 t3) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c t1 t4)))) (pr2 c t1 x)))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 (THead (Flat Cast) u1 t1) t2)).(\lambda (H10: (subst0 i u t2 x)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 t2) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H12: (eq T t2 (THead (Flat Cast) x0 x1))).(\lambda (H13: (pr0 u1 x0)).(\lambda (H14: (pr0 t1 x1)).(let H15 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Flat Cast) x0 x1) H12) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Flat Cast) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Flat Cast) x0 t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3)))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (H16: (ex2 T (\lambda (u2: T).(eq T x (THead (Flat Cast) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Flat Cast) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (x2: T).(\lambda (H17: (eq T x (THead (Flat Cast) x2 x1))).(\lambda (H18: (subst0 i u x0 x2)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x2 x1 H17 (pr2_delta c d u i H8 u1 x0 H13 x2 H18) (pr2_free c t1 x1 H14)))))) H16)) (\lambda (H16: (ex2 T (\lambda (t2: T).(eq T x (THead (Flat Cast) x0 t2))) (\lambda (t2: T).(subst0 (s (Flat Cast) i) u x1 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Flat Cast) x0 t3))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (x2: T).(\lambda (H17: (eq T x (THead (Flat Cast) x0 x2))).(\lambda (H18: (subst0 (s (Flat Cast) i) u x1 x2)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x0 x2 H17 (pr2_free c u1 x0 H13) (pr2_delta c d u i H8 t1 x1 H14 x2 H18)))))) H16)) (\lambda (H16: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Cast) i) u x1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u x1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x)) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H17: (eq T x (THead (Flat Cast) x2 x3))).(\lambda (H18: (subst0 i u x0 x2)).(\lambda (H19: (subst0 (s (Flat Cast) i) u x1 x3)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x2 x3 H17 (pr2_delta c d u i H8 u1 x0 H13 x2 H18) (pr2_delta c d u i H8 t1 x1 H14 x3 H19)))))))) H16)) (subst0_gen_head (Flat Cast) u x0 x1 x i H15)))))))) H11)) (\lambda (H11: (pr0 t1 t2)).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (pr2 c t1 x) (pr2_delta c d u i H8 t1 t2 H11 x H10))) (pr0_gen_cast u1 t1 t2 H9))))) t (sym_eq T t x H7))) t0 (sym_eq T t0 (THead (Flat Cast) u1 t1) H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T (THead (Flat Cast) u1 t1)) (refl_equal T x))))))). theorem pr2_gen_csort: \forall (t1: T).(\forall (t2: T).(\forall (n: nat).((pr2 (CSort n) t1 t2) \to (pr0 t1 t2)))) \def - \lambda (t1: T).(\lambda (t2: T).(\lambda (n: nat).(\lambda (H: (pr2 (CSort n) t1 t2)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).((eq C c (CSort n)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr0 t1 t2)))))))) with [(pr2_free c t0 t3 H0) \Rightarrow (\lambda (H1: (eq C c (CSort n))).(\lambda (H2: (eq T t0 t1)).(\lambda (H3: (eq T t3 t2)).(eq_ind C (CSort n) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr0 t1 t2))))) (\lambda (H4: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr0 t1 t2)))) (\lambda (H5: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr0 t1 t2))) (\lambda (H6: (pr0 t1 t2)).H6) t3 (sym_eq T t3 t2 H5))) t0 (sym_eq T t0 t1 H4))) c (sym_eq C c (CSort n) H1) H2 H3 H0)))) | (pr2_delta c d u i H0 t0 t3 H1 t H2) \Rightarrow (\lambda (H3: (eq C c (CSort n))).(\lambda (H4: (eq T t0 t1)).(\lambda (H5: (eq T t t2)).(eq_ind C (CSort n) (\lambda (c0: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c0 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t) \to (pr0 t1 t2))))))) (\lambda (H6: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CSort n) (CHead d (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i u t3 t) \to (pr0 t1 t2)))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CSort n) (CHead d (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i u t3 t4) \to (pr0 t1 t2))))) (\lambda (H8: (getl i (CSort n) (CHead d (Bind Abbr) u))).(\lambda (_: (pr0 t1 t3)).(\lambda (_: (subst0 i u t3 t2)).(getl_gen_sort n i (CHead d (Bind Abbr) u) H8 (pr0 t1 t2))))) t (sym_eq T t t2 H7))) t0 (sym_eq T t0 t1 H6))) c (sym_eq C c (CSort n) H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C (CSort n)) (refl_equal T t1) (refl_equal T t2)))))). + \lambda (t1: T).(\lambda (t2: T).(\lambda (n: nat).(\lambda (H: (pr2 (CSort n) t1 t2)).(let H0 \def (match H return (\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c t t0)).((eq C c (CSort n)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr0 t1 t2)))))))) with [(pr2_free c t0 t3 H0) \Rightarrow (\lambda (H1: (eq C c (CSort n))).(\lambda (H2: (eq T t0 t1)).(\lambda (H3: (eq T t3 t2)).(eq_ind C (CSort n) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr0 t1 t2))))) (\lambda (H4: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr0 t1 t2)))) (\lambda (H5: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr0 t1 t2))) (\lambda (H6: (pr0 t1 t2)).H6) t3 (sym_eq T t3 t2 H5))) t0 (sym_eq T t0 t1 H4))) c (sym_eq C c (CSort n) H1) H2 H3 H0)))) | (pr2_delta c d u i H0 t0 t3 H1 t H2) \Rightarrow (\lambda (H3: (eq C c (CSort n))).(\lambda (H4: (eq T t0 t1)).(\lambda (H5: (eq T t t2)).(eq_ind C (CSort n) (\lambda (c0: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c0 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t) \to (pr0 t1 t2))))))) (\lambda (H6: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CSort n) (CHead d (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i u t3 t) \to (pr0 t1 t2)))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CSort n) (CHead d (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i u t3 t4) \to (pr0 t1 t2))))) (\lambda (H8: (getl i (CSort n) (CHead d (Bind Abbr) u))).(\lambda (_: (pr0 t1 t3)).(\lambda (_: (subst0 i u t3 t2)).(getl_gen_sort n i (CHead d (Bind Abbr) u) H8 (pr0 t1 t2))))) t (sym_eq T t t2 H7))) t0 (sym_eq T t0 t1 H6))) c (sym_eq C c (CSort n) H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C (CSort n)) (refl_equal T t1) (refl_equal T t2)))))). theorem pr2_gen_ctail: \forall (k: K).(\forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall (t2: T).((pr2 (CTail k u c) t1 t2) \to (or (pr2 c t1 t2) (ex3 T (\lambda (_: T).(eq K k (Bind Abbr))) (\lambda (t: T).(pr0 t1 t)) (\lambda (t: T).(subst0 (clen c) u t t2))))))))) @@ -2034,12 +2034,12 @@ theorem pr2_head_1: theorem pr2_head_2: \forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u) t1 t2) \to (pr2 c (THead k u t1) (THead k u t2))))))) \def - \lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: K).(K_ind (\lambda (k0: K).((pr2 (CHead c k0 u) t1 t2) \to (pr2 c (THead k0 u t1) (THead k0 u t2)))) (\lambda (b: B).(\lambda (H: (pr2 (CHead c (Bind b) u) t1 t2)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 (CHead c (Bind b) u)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2))))))))) with [(pr2_free c0 t0 t3 H0) \Rightarrow (\lambda (H1: (eq C c0 (CHead c (Bind b) u))).(\lambda (H2: (eq T t0 t1)).(\lambda (H3: (eq T t3 t2)).(eq_ind C (CHead c (Bind b) u) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2)))))) (\lambda (H4: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2))))) (\lambda (H5: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2)))) (\lambda (H6: (pr0 t1 t2)).(pr2_free c (THead (Bind b) u t1) (THead (Bind b) u t2) (pr0_comp u u (pr0_refl u) t1 t2 H6 (Bind b)))) t3 (sym_eq T t3 t2 H5))) t0 (sym_eq T t0 t1 H4))) c0 (sym_eq C c0 (CHead c (Bind b) u) H1) H2 H3 H0)))) | (pr2_delta c0 d u0 i H0 t0 t3 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 (CHead c (Bind b) u))).(\lambda (H4: (eq T t0 t1)).(\lambda (H5: (eq T t t2)).(eq_ind C (CHead c (Bind b) u) (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d (Bind Abbr) u0)) \to ((pr0 t0 t3) \to ((subst0 i u0 t3 t) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2)))))))) (\lambda (H6: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CHead c (Bind b) u) (CHead d (Bind Abbr) u0)) \to ((pr0 t4 t3) \to ((subst0 i u0 t3 t) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2))))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CHead c (Bind b) u) (CHead d (Bind Abbr) u0)) \to ((pr0 t1 t3) \to ((subst0 i u0 t3 t4) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2)))))) (\lambda (H8: (getl i (CHead c (Bind b) u) (CHead d (Bind Abbr) u0))).(\lambda (H9: (pr0 t1 t3)).(\lambda (H10: (subst0 i u0 t3 t2)).((match i return (\lambda (_: ?).(\lambda (n: nat).((getl n (CHead c (Bind b) u) (CHead d (Bind Abbr) u0)) \to ((subst0 n u0 t3 t2) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2)))))) with [O \Rightarrow (\lambda (H11: (getl O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0))).(\lambda (H12: (subst0 O u0 t3 t2)).(let H \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u0) (CHead c (Bind b) u) (clear_gen_bind b c (CHead d (Bind Abbr) u0) u (getl_gen_O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0) H11))) in ((let H13 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u0) (CHead c (Bind b) u) (clear_gen_bind b c (CHead d (Bind Abbr) u0) u (getl_gen_O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0) H11))) in ((let H14 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u0) (CHead c (Bind b) u) (clear_gen_bind b c (CHead d (Bind Abbr) u0) u (getl_gen_O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0) H11))) in (\lambda (H15: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H17 \def (eq_ind T u0 (\lambda (t: T).(subst0 O t t3 t2)) H12 u H14) in (eq_ind B Abbr (\lambda (b: B).(pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2))) (pr2_free c (THead (Bind Abbr) u t1) (THead (Bind Abbr) u t2) (pr0_delta u u (pr0_refl u) t1 t3 H9 t2 H17)) b H15))))) H13)) H)))) | (S n) \Rightarrow (\lambda (H11: (getl (S n) (CHead c (Bind b) u) (CHead d (Bind Abbr) u0))).(\lambda (H12: (subst0 (S n) u0 t3 t2)).(pr2_delta c d u0 (r (Bind b) n) (getl_gen_S (Bind b) c (CHead d (Bind Abbr) u0) u n H11) (THead (Bind b) u t1) (THead (Bind b) u t3) (pr0_comp u u (pr0_refl u) t1 t3 H9 (Bind b)) (THead (Bind b) u t2) (subst0_snd (Bind b) u0 t2 t3 (r (Bind b) n) H12 u))))]) H8 H10)))) t (sym_eq T t t2 H7))) t0 (sym_eq T t0 t1 H6))) c0 (sym_eq C c0 (CHead c (Bind b) u) H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C (CHead c (Bind b) u)) (refl_equal T t1) (refl_equal T t2))))) (\lambda (f: F).(\lambda (H: (pr2 (CHead c (Flat f) u) t1 t2)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 (CHead c (Flat f) u)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2))))))))) with [(pr2_free c0 t0 t3 H0) \Rightarrow (\lambda (H1: (eq C c0 (CHead c (Flat f) u))).(\lambda (H2: (eq T t0 t1)).(\lambda (H3: (eq T t3 t2)).(eq_ind C (CHead c (Flat f) u) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2)))))) (\lambda (H4: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2))))) (\lambda (H5: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2)))) (\lambda (H6: (pr0 t1 t2)).(pr2_free c (THead (Flat f) u t1) (THead (Flat f) u t2) (pr0_comp u u (pr0_refl u) t1 t2 H6 (Flat f)))) t3 (sym_eq T t3 t2 H5))) t0 (sym_eq T t0 t1 H4))) c0 (sym_eq C c0 (CHead c (Flat f) u) H1) H2 H3 H0)))) | (pr2_delta c0 d u0 i H0 t0 t3 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 (CHead c (Flat f) u))).(\lambda (H4: (eq T t0 t1)).(\lambda (H5: (eq T t t2)).(eq_ind C (CHead c (Flat f) u) (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d (Bind Abbr) u0)) \to ((pr0 t0 t3) \to ((subst0 i u0 t3 t) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2)))))))) (\lambda (H6: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CHead c (Flat f) u) (CHead d (Bind Abbr) u0)) \to ((pr0 t4 t3) \to ((subst0 i u0 t3 t) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2))))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CHead c (Flat f) u) (CHead d (Bind Abbr) u0)) \to ((pr0 t1 t3) \to ((subst0 i u0 t3 t4) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2)))))) (\lambda (H8: (getl i (CHead c (Flat f) u) (CHead d (Bind Abbr) u0))).(\lambda (H9: (pr0 t1 t3)).(\lambda (H10: (subst0 i u0 t3 t2)).((match i return (\lambda (_: ?).(\lambda (n: nat).((getl n (CHead c (Flat f) u) (CHead d (Bind Abbr) u0)) \to ((subst0 n u0 t3 t2) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2)))))) with [O \Rightarrow (\lambda (H11: (getl O (CHead c (Flat f) u) (CHead d (Bind Abbr) u0))).(\lambda (H12: (subst0 O u0 t3 t2)).(pr2_delta c d u0 O (getl_intro O c (CHead d (Bind Abbr) u0) c (drop_refl c) (clear_gen_flat f c (CHead d (Bind Abbr) u0) u (getl_gen_O (CHead c (Flat f) u) (CHead d (Bind Abbr) u0) H11))) (THead (Flat f) u t1) (THead (Flat f) u t3) (pr0_comp u u (pr0_refl u) t1 t3 H9 (Flat f)) (THead (Flat f) u t2) (subst0_snd (Flat f) u0 t2 t3 O H12 u)))) | (S n) \Rightarrow (\lambda (H11: (getl (S n) (CHead c (Flat f) u) (CHead d (Bind Abbr) u0))).(\lambda (H12: (subst0 (S n) u0 t3 t2)).(pr2_delta c d u0 (r (Flat f) n) (getl_gen_S (Flat f) c (CHead d (Bind Abbr) u0) u n H11) (THead (Flat f) u t1) (THead (Flat f) u t3) (pr0_comp u u (pr0_refl u) t1 t3 H9 (Flat f)) (THead (Flat f) u t2) (subst0_snd (Flat f) u0 t2 t3 (r (Flat f) n) H12 u))))]) H8 H10)))) t (sym_eq T t t2 H7))) t0 (sym_eq T t0 t1 H6))) c0 (sym_eq C c0 (CHead c (Flat f) u) H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C (CHead c (Flat f) u)) (refl_equal T t1) (refl_equal T t2))))) k))))). + \lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: K).(K_ind (\lambda (k0: K).((pr2 (CHead c k0 u) t1 t2) \to (pr2 c (THead k0 u t1) (THead k0 u t2)))) (\lambda (b: B).(\lambda (H: (pr2 (CHead c (Bind b) u) t1 t2)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 (CHead c (Bind b) u)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2))))))))) with [(pr2_free c0 t0 t3 H0) \Rightarrow (\lambda (H1: (eq C c0 (CHead c (Bind b) u))).(\lambda (H2: (eq T t0 t1)).(\lambda (H3: (eq T t3 t2)).(eq_ind C (CHead c (Bind b) u) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2)))))) (\lambda (H4: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2))))) (\lambda (H5: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2)))) (\lambda (H6: (pr0 t1 t2)).(pr2_free c (THead (Bind b) u t1) (THead (Bind b) u t2) (pr0_comp u u (pr0_refl u) t1 t2 H6 (Bind b)))) t3 (sym_eq T t3 t2 H5))) t0 (sym_eq T t0 t1 H4))) c0 (sym_eq C c0 (CHead c (Bind b) u) H1) H2 H3 H0)))) | (pr2_delta c0 d u0 i H0 t0 t3 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 (CHead c (Bind b) u))).(\lambda (H4: (eq T t0 t1)).(\lambda (H5: (eq T t t2)).(eq_ind C (CHead c (Bind b) u) (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d (Bind Abbr) u0)) \to ((pr0 t0 t3) \to ((subst0 i u0 t3 t) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2)))))))) (\lambda (H6: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CHead c (Bind b) u) (CHead d (Bind Abbr) u0)) \to ((pr0 t4 t3) \to ((subst0 i u0 t3 t) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2))))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CHead c (Bind b) u) (CHead d (Bind Abbr) u0)) \to ((pr0 t1 t3) \to ((subst0 i u0 t3 t4) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2)))))) (\lambda (H8: (getl i (CHead c (Bind b) u) (CHead d (Bind Abbr) u0))).(\lambda (H9: (pr0 t1 t3)).(\lambda (H10: (subst0 i u0 t3 t2)).((match i return (\lambda (n: nat).((getl n (CHead c (Bind b) u) (CHead d (Bind Abbr) u0)) \to ((subst0 n u0 t3 t2) \to (pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2))))) with [O \Rightarrow (\lambda (H11: (getl O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0))).(\lambda (H12: (subst0 O u0 t3 t2)).(let H \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u0) (CHead c (Bind b) u) (clear_gen_bind b c (CHead d (Bind Abbr) u0) u (getl_gen_O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0) H11))) in ((let H13 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u0) (CHead c (Bind b) u) (clear_gen_bind b c (CHead d (Bind Abbr) u0) u (getl_gen_O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0) H11))) in ((let H14 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u0) (CHead c (Bind b) u) (clear_gen_bind b c (CHead d (Bind Abbr) u0) u (getl_gen_O (CHead c (Bind b) u) (CHead d (Bind Abbr) u0) H11))) in (\lambda (H15: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H17 \def (eq_ind T u0 (\lambda (t: T).(subst0 O t t3 t2)) H12 u H14) in (eq_ind B Abbr (\lambda (b: B).(pr2 c (THead (Bind b) u t1) (THead (Bind b) u t2))) (pr2_free c (THead (Bind Abbr) u t1) (THead (Bind Abbr) u t2) (pr0_delta u u (pr0_refl u) t1 t3 H9 t2 H17)) b H15))))) H13)) H)))) | (S n) \Rightarrow (\lambda (H11: (getl (S n) (CHead c (Bind b) u) (CHead d (Bind Abbr) u0))).(\lambda (H12: (subst0 (S n) u0 t3 t2)).(pr2_delta c d u0 (r (Bind b) n) (getl_gen_S (Bind b) c (CHead d (Bind Abbr) u0) u n H11) (THead (Bind b) u t1) (THead (Bind b) u t3) (pr0_comp u u (pr0_refl u) t1 t3 H9 (Bind b)) (THead (Bind b) u t2) (subst0_snd (Bind b) u0 t2 t3 (r (Bind b) n) H12 u))))]) H8 H10)))) t (sym_eq T t t2 H7))) t0 (sym_eq T t0 t1 H6))) c0 (sym_eq C c0 (CHead c (Bind b) u) H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C (CHead c (Bind b) u)) (refl_equal T t1) (refl_equal T t2))))) (\lambda (f: F).(\lambda (H: (pr2 (CHead c (Flat f) u) t1 t2)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 (CHead c (Flat f) u)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2))))))))) with [(pr2_free c0 t0 t3 H0) \Rightarrow (\lambda (H1: (eq C c0 (CHead c (Flat f) u))).(\lambda (H2: (eq T t0 t1)).(\lambda (H3: (eq T t3 t2)).(eq_ind C (CHead c (Flat f) u) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2)))))) (\lambda (H4: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2))))) (\lambda (H5: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2)))) (\lambda (H6: (pr0 t1 t2)).(pr2_free c (THead (Flat f) u t1) (THead (Flat f) u t2) (pr0_comp u u (pr0_refl u) t1 t2 H6 (Flat f)))) t3 (sym_eq T t3 t2 H5))) t0 (sym_eq T t0 t1 H4))) c0 (sym_eq C c0 (CHead c (Flat f) u) H1) H2 H3 H0)))) | (pr2_delta c0 d u0 i H0 t0 t3 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 (CHead c (Flat f) u))).(\lambda (H4: (eq T t0 t1)).(\lambda (H5: (eq T t t2)).(eq_ind C (CHead c (Flat f) u) (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d (Bind Abbr) u0)) \to ((pr0 t0 t3) \to ((subst0 i u0 t3 t) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2)))))))) (\lambda (H6: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CHead c (Flat f) u) (CHead d (Bind Abbr) u0)) \to ((pr0 t4 t3) \to ((subst0 i u0 t3 t) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2))))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CHead c (Flat f) u) (CHead d (Bind Abbr) u0)) \to ((pr0 t1 t3) \to ((subst0 i u0 t3 t4) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2)))))) (\lambda (H8: (getl i (CHead c (Flat f) u) (CHead d (Bind Abbr) u0))).(\lambda (H9: (pr0 t1 t3)).(\lambda (H10: (subst0 i u0 t3 t2)).((match i return (\lambda (n: nat).((getl n (CHead c (Flat f) u) (CHead d (Bind Abbr) u0)) \to ((subst0 n u0 t3 t2) \to (pr2 c (THead (Flat f) u t1) (THead (Flat f) u t2))))) with [O \Rightarrow (\lambda (H11: (getl O (CHead c (Flat f) u) (CHead d (Bind Abbr) u0))).(\lambda (H12: (subst0 O u0 t3 t2)).(pr2_delta c d u0 O (getl_intro O c (CHead d (Bind Abbr) u0) c (drop_refl c) (clear_gen_flat f c (CHead d (Bind Abbr) u0) u (getl_gen_O (CHead c (Flat f) u) (CHead d (Bind Abbr) u0) H11))) (THead (Flat f) u t1) (THead (Flat f) u t3) (pr0_comp u u (pr0_refl u) t1 t3 H9 (Flat f)) (THead (Flat f) u t2) (subst0_snd (Flat f) u0 t2 t3 O H12 u)))) | (S n) \Rightarrow (\lambda (H11: (getl (S n) (CHead c (Flat f) u) (CHead d (Bind Abbr) u0))).(\lambda (H12: (subst0 (S n) u0 t3 t2)).(pr2_delta c d u0 (r (Flat f) n) (getl_gen_S (Flat f) c (CHead d (Bind Abbr) u0) u n H11) (THead (Flat f) u t1) (THead (Flat f) u t3) (pr0_comp u u (pr0_refl u) t1 t3 H9 (Flat f)) (THead (Flat f) u t2) (subst0_snd (Flat f) u0 t2 t3 (r (Flat f) n) H12 u))))]) H8 H10)))) t (sym_eq T t t2 H7))) t0 (sym_eq T t0 t1 H6))) c0 (sym_eq C c0 (CHead c (Flat f) u) H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C (CHead c (Flat f) u)) (refl_equal T t1) (refl_equal T t2))))) k))))). theorem clear_pr2_trans: \forall (c2: C).(\forall (t1: T).(\forall (t2: T).((pr2 c2 t1 t2) \to (\forall (c1: C).((clear c1 c2) \to (pr2 c1 t1 t2)))))) \def - \lambda (c2: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c2 t1 t2)).(\lambda (c1: C).(\lambda (H0: (clear c1 c2)).(let H1 \def (match H return (\lambda (_: ?).(\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).((eq C c c2) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr2 c1 t1 t2)))))))) with [(pr2_free c t0 t3 H1) \Rightarrow (\lambda (H2: (eq C c c2)).(\lambda (H3: (eq T t0 t1)).(\lambda (H4: (eq T t3 t2)).(eq_ind C c2 (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr2 c1 t1 t2))))) (\lambda (H5: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr2 c1 t1 t2)))) (\lambda (H6: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr2 c1 t1 t2))) (\lambda (H7: (pr0 t1 t2)).(pr2_free c1 t1 t2 H7)) t3 (sym_eq T t3 t2 H6))) t0 (sym_eq T t0 t1 H5))) c (sym_eq C c c2 H2) H3 H4 H1)))) | (pr2_delta c d u i H1 t0 t3 H2 t H3) \Rightarrow (\lambda (H4: (eq C c c2)).(\lambda (H5: (eq T t0 t1)).(\lambda (H6: (eq T t t2)).(eq_ind C c2 (\lambda (c0: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c0 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t) \to (pr2 c1 t1 t2))))))) (\lambda (H7: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i c2 (CHead d (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i u t3 t) \to (pr2 c1 t1 t2)))))) (\lambda (H8: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i c2 (CHead d (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i u t3 t4) \to (pr2 c1 t1 t2))))) (\lambda (H9: (getl i c2 (CHead d (Bind Abbr) u))).(\lambda (H10: (pr0 t1 t3)).(\lambda (H11: (subst0 i u t3 t2)).(pr2_delta c1 d u i (clear_getl_trans i c2 (CHead d (Bind Abbr) u) H9 c1 H0) t1 t3 H10 t2 H11)))) t (sym_eq T t t2 H8))) t0 (sym_eq T t0 t1 H7))) c (sym_eq C c c2 H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C c2) (refl_equal T t1) (refl_equal T t2)))))))). + \lambda (c2: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c2 t1 t2)).(\lambda (c1: C).(\lambda (H0: (clear c1 c2)).(let H1 \def (match H return (\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c t t0)).((eq C c c2) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr2 c1 t1 t2)))))))) with [(pr2_free c t0 t3 H1) \Rightarrow (\lambda (H2: (eq C c c2)).(\lambda (H3: (eq T t0 t1)).(\lambda (H4: (eq T t3 t2)).(eq_ind C c2 (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr2 c1 t1 t2))))) (\lambda (H5: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr2 c1 t1 t2)))) (\lambda (H6: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr2 c1 t1 t2))) (\lambda (H7: (pr0 t1 t2)).(pr2_free c1 t1 t2 H7)) t3 (sym_eq T t3 t2 H6))) t0 (sym_eq T t0 t1 H5))) c (sym_eq C c c2 H2) H3 H4 H1)))) | (pr2_delta c d u i H1 t0 t3 H2 t H3) \Rightarrow (\lambda (H4: (eq C c c2)).(\lambda (H5: (eq T t0 t1)).(\lambda (H6: (eq T t t2)).(eq_ind C c2 (\lambda (c0: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c0 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t) \to (pr2 c1 t1 t2))))))) (\lambda (H7: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i c2 (CHead d (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i u t3 t) \to (pr2 c1 t1 t2)))))) (\lambda (H8: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i c2 (CHead d (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i u t3 t4) \to (pr2 c1 t1 t2))))) (\lambda (H9: (getl i c2 (CHead d (Bind Abbr) u))).(\lambda (H10: (pr0 t1 t3)).(\lambda (H11: (subst0 i u t3 t2)).(pr2_delta c1 d u i (clear_getl_trans i c2 (CHead d (Bind Abbr) u) H9 c1 H0) t1 t3 H10 t2 H11)))) t (sym_eq T t t2 H8))) t0 (sym_eq T t0 t1 H7))) c (sym_eq C c c2 H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C c2) (refl_equal T t1) (refl_equal T t2)))))))). theorem pr2_cflat: \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall (f: F).(\forall (v: T).(pr2 (CHead c (Flat f) v) t1 t2)))))) @@ -2054,37 +2054,37 @@ theorem pr2_ctail: theorem pr2_gen_cbind: \forall (b: B).(\forall (c: C).(\forall (v: T).(\forall (t1: T).(\forall (t2: T).((pr2 (CHead c (Bind b) v) t1 t2) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2))))))) \def - \lambda (b: B).(\lambda (c: C).(\lambda (v: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 (CHead c (Bind b) v) t1 t2)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 (CHead c (Bind b) v)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2))))))))) with [(pr2_free c0 t0 t3 H0) \Rightarrow (\lambda (H1: (eq C c0 (CHead c (Bind b) v))).(\lambda (H2: (eq T t0 t1)).(\lambda (H3: (eq T t3 t2)).(eq_ind C (CHead c (Bind b) v) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2)))))) (\lambda (H4: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2))))) (\lambda (H5: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2)))) (\lambda (H6: (pr0 t1 t2)).(pr2_free c (THead (Bind b) v t1) (THead (Bind b) v t2) (pr0_comp v v (pr0_refl v) t1 t2 H6 (Bind b)))) t3 (sym_eq T t3 t2 H5))) t0 (sym_eq T t0 t1 H4))) c0 (sym_eq C c0 (CHead c (Bind b) v) H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t0 t3 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 (CHead c (Bind b) v))).(\lambda (H4: (eq T t0 t1)).(\lambda (H5: (eq T t t2)).(eq_ind C (CHead c (Bind b) v) (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2)))))))) (\lambda (H6: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CHead c (Bind b) v) (CHead d (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i u t3 t) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2))))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CHead c (Bind b) v) (CHead d (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i u t3 t4) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2)))))) (\lambda (H8: (getl i (CHead c (Bind b) v) (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 t1 t3)).(\lambda (H10: (subst0 i u t3 t2)).(let H_x \def (getl_gen_bind b c (CHead d (Bind Abbr) u) v i H8) in (let H \def H_x in (or_ind (land (eq nat i O) (eq C (CHead d (Bind Abbr) u) (CHead c (Bind b) v))) (ex2 nat (\lambda (j: nat).(eq nat i (S j))) (\lambda (j: nat).(getl j c (CHead d (Bind Abbr) u)))) (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2)) (\lambda (H11: (land (eq nat i O) (eq C (CHead d (Bind Abbr) u) (CHead c (Bind b) v)))).(and_ind (eq nat i O) (eq C (CHead d (Bind Abbr) u) (CHead c (Bind b) v)) (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2)) (\lambda (H12: (eq nat i O)).(\lambda (H13: (eq C (CHead d (Bind Abbr) u) (CHead c (Bind b) v))).(let H14 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead c (Bind b) v) H13) in ((let H15 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead c (Bind b) v) H13) in ((let H16 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead c (Bind b) v) H13) in (\lambda (H17: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H19 \def (eq_ind nat i (\lambda (n: nat).(subst0 n u t3 t2)) H10 O H12) in (let H20 \def (eq_ind T u (\lambda (t: T).(subst0 O t t3 t2)) H19 v H16) in (eq_ind B Abbr (\lambda (b: B).(pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2))) (pr2_free c (THead (Bind Abbr) v t1) (THead (Bind Abbr) v t2) (pr0_delta v v (pr0_refl v) t1 t3 H9 t2 H20)) b H17)))))) H15)) H14)))) H11)) (\lambda (H11: (ex2 nat (\lambda (j: nat).(eq nat i (S j))) (\lambda (j: nat).(getl j c (CHead d (Bind Abbr) u))))).(ex2_ind nat (\lambda (j: nat).(eq nat i (S j))) (\lambda (j: nat).(getl j c (CHead d (Bind Abbr) u))) (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2)) (\lambda (x: nat).(\lambda (H12: (eq nat i (S x))).(\lambda (H13: (getl x c (CHead d (Bind Abbr) u))).(let H14 \def (f_equal nat nat (\lambda (e: nat).e) i (S x) H12) in (let H15 \def (eq_ind nat i (\lambda (n: nat).(subst0 n u t3 t2)) H10 (S x) H14) in (pr2_head_2 c v t1 t2 (Bind b) (pr2_delta (CHead c (Bind b) v) d u (S x) (getl_clear_bind b (CHead c (Bind b) v) c v (clear_bind b c v) (CHead d (Bind Abbr) u) x H13) t1 t3 H9 t2 H15))))))) H11)) H)))))) t (sym_eq T t t2 H7))) t0 (sym_eq T t0 t1 H6))) c0 (sym_eq C c0 (CHead c (Bind b) v) H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C (CHead c (Bind b) v)) (refl_equal T t1) (refl_equal T t2)))))))). + \lambda (b: B).(\lambda (c: C).(\lambda (v: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 (CHead c (Bind b) v) t1 t2)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 (CHead c (Bind b) v)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2))))))))) with [(pr2_free c0 t0 t3 H0) \Rightarrow (\lambda (H1: (eq C c0 (CHead c (Bind b) v))).(\lambda (H2: (eq T t0 t1)).(\lambda (H3: (eq T t3 t2)).(eq_ind C (CHead c (Bind b) v) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2)))))) (\lambda (H4: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2))))) (\lambda (H5: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2)))) (\lambda (H6: (pr0 t1 t2)).(pr2_free c (THead (Bind b) v t1) (THead (Bind b) v t2) (pr0_comp v v (pr0_refl v) t1 t2 H6 (Bind b)))) t3 (sym_eq T t3 t2 H5))) t0 (sym_eq T t0 t1 H4))) c0 (sym_eq C c0 (CHead c (Bind b) v) H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t0 t3 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 (CHead c (Bind b) v))).(\lambda (H4: (eq T t0 t1)).(\lambda (H5: (eq T t t2)).(eq_ind C (CHead c (Bind b) v) (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2)))))))) (\lambda (H6: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CHead c (Bind b) v) (CHead d (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i u t3 t) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2))))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CHead c (Bind b) v) (CHead d (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i u t3 t4) \to (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2)))))) (\lambda (H8: (getl i (CHead c (Bind b) v) (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 t1 t3)).(\lambda (H10: (subst0 i u t3 t2)).(let H_x \def (getl_gen_bind b c (CHead d (Bind Abbr) u) v i H8) in (let H \def H_x in (or_ind (land (eq nat i O) (eq C (CHead d (Bind Abbr) u) (CHead c (Bind b) v))) (ex2 nat (\lambda (j: nat).(eq nat i (S j))) (\lambda (j: nat).(getl j c (CHead d (Bind Abbr) u)))) (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2)) (\lambda (H11: (land (eq nat i O) (eq C (CHead d (Bind Abbr) u) (CHead c (Bind b) v)))).(and_ind (eq nat i O) (eq C (CHead d (Bind Abbr) u) (CHead c (Bind b) v)) (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2)) (\lambda (H12: (eq nat i O)).(\lambda (H13: (eq C (CHead d (Bind Abbr) u) (CHead c (Bind b) v))).(let H14 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead c (Bind b) v) H13) in ((let H15 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead c (Bind b) v) H13) in ((let H16 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead c (Bind b) v) H13) in (\lambda (H17: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H19 \def (eq_ind nat i (\lambda (n: nat).(subst0 n u t3 t2)) H10 O H12) in (let H20 \def (eq_ind T u (\lambda (t: T).(subst0 O t t3 t2)) H19 v H16) in (eq_ind B Abbr (\lambda (b: B).(pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2))) (pr2_free c (THead (Bind Abbr) v t1) (THead (Bind Abbr) v t2) (pr0_delta v v (pr0_refl v) t1 t3 H9 t2 H20)) b H17)))))) H15)) H14)))) H11)) (\lambda (H11: (ex2 nat (\lambda (j: nat).(eq nat i (S j))) (\lambda (j: nat).(getl j c (CHead d (Bind Abbr) u))))).(ex2_ind nat (\lambda (j: nat).(eq nat i (S j))) (\lambda (j: nat).(getl j c (CHead d (Bind Abbr) u))) (pr2 c (THead (Bind b) v t1) (THead (Bind b) v t2)) (\lambda (x: nat).(\lambda (H12: (eq nat i (S x))).(\lambda (H13: (getl x c (CHead d (Bind Abbr) u))).(let H14 \def (f_equal nat nat (\lambda (e: nat).e) i (S x) H12) in (let H15 \def (eq_ind nat i (\lambda (n: nat).(subst0 n u t3 t2)) H10 (S x) H14) in (pr2_head_2 c v t1 t2 (Bind b) (pr2_delta (CHead c (Bind b) v) d u (S x) (getl_clear_bind b (CHead c (Bind b) v) c v (clear_bind b c v) (CHead d (Bind Abbr) u) x H13) t1 t3 H9 t2 H15))))))) H11)) H)))))) t (sym_eq T t t2 H7))) t0 (sym_eq T t0 t1 H6))) c0 (sym_eq C c0 (CHead c (Bind b) v) H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C (CHead c (Bind b) v)) (refl_equal T t1) (refl_equal T t2)))))))). theorem pr2_gen_cflat: \forall (f: F).(\forall (c: C).(\forall (v: T).(\forall (t1: T).(\forall (t2: T).((pr2 (CHead c (Flat f) v) t1 t2) \to (pr2 c t1 t2)))))) \def - \lambda (f: F).(\lambda (c: C).(\lambda (v: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 (CHead c (Flat f) v) t1 t2)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 (CHead c (Flat f) v)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr2 c t1 t2)))))))) with [(pr2_free c0 t0 t3 H0) \Rightarrow (\lambda (H1: (eq C c0 (CHead c (Flat f) v))).(\lambda (H2: (eq T t0 t1)).(\lambda (H3: (eq T t3 t2)).(eq_ind C (CHead c (Flat f) v) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr2 c t1 t2))))) (\lambda (H4: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr2 c t1 t2)))) (\lambda (H5: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr2 c t1 t2))) (\lambda (H6: (pr0 t1 t2)).(pr2_free c t1 t2 H6)) t3 (sym_eq T t3 t2 H5))) t0 (sym_eq T t0 t1 H4))) c0 (sym_eq C c0 (CHead c (Flat f) v) H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t0 t3 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 (CHead c (Flat f) v))).(\lambda (H4: (eq T t0 t1)).(\lambda (H5: (eq T t t2)).(eq_ind C (CHead c (Flat f) v) (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t) \to (pr2 c t1 t2))))))) (\lambda (H6: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CHead c (Flat f) v) (CHead d (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i u t3 t) \to (pr2 c t1 t2)))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CHead c (Flat f) v) (CHead d (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i u t3 t4) \to (pr2 c t1 t2))))) (\lambda (H8: (getl i (CHead c (Flat f) v) (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 t1 t3)).(\lambda (H10: (subst0 i u t3 t2)).(let H_y \def (getl_gen_flat f c (CHead d (Bind Abbr) u) v i H8) in (pr2_delta c d u i H_y t1 t3 H9 t2 H10))))) t (sym_eq T t t2 H7))) t0 (sym_eq T t0 t1 H6))) c0 (sym_eq C c0 (CHead c (Flat f) v) H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C (CHead c (Flat f) v)) (refl_equal T t1) (refl_equal T t2)))))))). + \lambda (f: F).(\lambda (c: C).(\lambda (v: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 (CHead c (Flat f) v) t1 t2)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 (CHead c (Flat f) v)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr2 c t1 t2)))))))) with [(pr2_free c0 t0 t3 H0) \Rightarrow (\lambda (H1: (eq C c0 (CHead c (Flat f) v))).(\lambda (H2: (eq T t0 t1)).(\lambda (H3: (eq T t3 t2)).(eq_ind C (CHead c (Flat f) v) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr2 c t1 t2))))) (\lambda (H4: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr2 c t1 t2)))) (\lambda (H5: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr2 c t1 t2))) (\lambda (H6: (pr0 t1 t2)).(pr2_free c t1 t2 H6)) t3 (sym_eq T t3 t2 H5))) t0 (sym_eq T t0 t1 H4))) c0 (sym_eq C c0 (CHead c (Flat f) v) H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t0 t3 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 (CHead c (Flat f) v))).(\lambda (H4: (eq T t0 t1)).(\lambda (H5: (eq T t t2)).(eq_ind C (CHead c (Flat f) v) (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t) \to (pr2 c t1 t2))))))) (\lambda (H6: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CHead c (Flat f) v) (CHead d (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i u t3 t) \to (pr2 c t1 t2)))))) (\lambda (H7: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CHead c (Flat f) v) (CHead d (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i u t3 t4) \to (pr2 c t1 t2))))) (\lambda (H8: (getl i (CHead c (Flat f) v) (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 t1 t3)).(\lambda (H10: (subst0 i u t3 t2)).(let H_y \def (getl_gen_flat f c (CHead d (Bind Abbr) u) v i H8) in (pr2_delta c d u i H_y t1 t3 H9 t2 H10))))) t (sym_eq T t t2 H7))) t0 (sym_eq T t0 t1 H6))) c0 (sym_eq C c0 (CHead c (Flat f) v) H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C (CHead c (Flat f) v)) (refl_equal T t1) (refl_equal T t2)))))))). theorem pr2_lift: \forall (c: C).(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to (\forall (t1: T).(\forall (t2: T).((pr2 e t1 t2) \to (pr2 c (lift h d t1) (lift h d t2))))))))) \def - \lambda (c: C).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (drop h d c e)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr2 e t1 t2)).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 e) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr2 c (lift h d t1) (lift h d t2))))))))) with [(pr2_free c0 t0 t3 H1) \Rightarrow (\lambda (H2: (eq C c0 e)).(\lambda (H3: (eq T t0 t1)).(\lambda (H4: (eq T t3 t2)).(eq_ind C e (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr2 c (lift h d t1) (lift h d t2)))))) (\lambda (H5: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr2 c (lift h d t1) (lift h d t2))))) (\lambda (H6: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr2 c (lift h d t1) (lift h d t2)))) (\lambda (H7: (pr0 t1 t2)).(pr2_free c (lift h d t1) (lift h d t2) (pr0_lift t1 t2 H7 h d))) t3 (sym_eq T t3 t2 H6))) t0 (sym_eq T t0 t1 H5))) c0 (sym_eq C c0 e H2) H3 H4 H1)))) | (pr2_delta c0 d0 u i H1 t0 t3 H2 t H3) \Rightarrow (\lambda (H4: (eq C c0 e)).(\lambda (H5: (eq T t0 t1)).(\lambda (H6: (eq T t t2)).(eq_ind C e (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d0 (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t) \to (pr2 c (lift h d t1) (lift h d t2)))))))) (\lambda (H7: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i e (CHead d0 (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i u t3 t) \to (pr2 c (lift h d t1) (lift h d t2))))))) (\lambda (H8: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i e (CHead d0 (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i u t3 t4) \to (pr2 c (lift h d t1) (lift h d t2)))))) (\lambda (H9: (getl i e (CHead d0 (Bind Abbr) u))).(\lambda (H10: (pr0 t1 t3)).(\lambda (H11: (subst0 i u t3 t2)).(lt_le_e i d (pr2 c (lift h d t1) (lift h d t2)) (\lambda (H0: (lt i d)).(let H \def (drop_getl_trans_le i d (le_S_n i d (le_S (S i) d H0)) c e h H (CHead d0 (Bind Abbr) u) H9) in (ex3_2_ind C C (\lambda (e0: C).(\lambda (_: C).(drop i O c e0))) (\lambda (e0: C).(\lambda (e1: C).(drop h (minus d i) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 (CHead d0 (Bind Abbr) u)))) (pr2 c (lift h d t1) (lift h d t2)) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H12: (drop i O c x0)).(\lambda (H13: (drop h (minus d i) x0 x1)).(\lambda (H14: (clear x1 (CHead d0 (Bind Abbr) u))).(let H15 \def (eq_ind nat (minus d i) (\lambda (n: nat).(drop h n x0 x1)) H13 (S (minus d (S i))) (minus_x_Sy d i H0)) in (let H16 \def (drop_clear_S x1 x0 h (minus d (S i)) H15 Abbr d0 u H14) in (ex2_ind C (\lambda (c1: C).(clear x0 (CHead c1 (Bind Abbr) (lift h (minus d (S i)) u)))) (\lambda (c1: C).(drop h (minus d (S i)) c1 d0)) (pr2 c (lift h d t1) (lift h d t2)) (\lambda (x: C).(\lambda (H17: (clear x0 (CHead x (Bind Abbr) (lift h (minus d (S i)) u)))).(\lambda (_: (drop h (minus d (S i)) x d0)).(pr2_delta c x (lift h (minus d (S i)) u) i (getl_intro i c (CHead x (Bind Abbr) (lift h (minus d (S i)) u)) x0 H12 H17) (lift h d t1) (lift h d t3) (pr0_lift t1 t3 H10 h d) (lift h d t2) (subst0_lift_lt t3 t2 u i H11 d H0 h))))) H16)))))))) H))) (\lambda (H0: (le d i)).(pr2_delta c d0 u (plus i h) (drop_getl_trans_ge i c e d h H (CHead d0 (Bind Abbr) u) H9 H0) (lift h d t1) (lift h d t3) (pr0_lift t1 t3 H10 h d) (lift h d t2) (subst0_lift_ge t3 t2 u i h H11 d H0))))))) t (sym_eq T t t2 H8))) t0 (sym_eq T t0 t1 H7))) c0 (sym_eq C c0 e H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C e) (refl_equal T t1) (refl_equal T t2)))))))))). + \lambda (c: C).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (drop h d c e)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr2 e t1 t2)).(let H1 \def (match H0 return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 e) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr2 c (lift h d t1) (lift h d t2))))))))) with [(pr2_free c0 t0 t3 H1) \Rightarrow (\lambda (H2: (eq C c0 e)).(\lambda (H3: (eq T t0 t1)).(\lambda (H4: (eq T t3 t2)).(eq_ind C e (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr2 c (lift h d t1) (lift h d t2)))))) (\lambda (H5: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr2 c (lift h d t1) (lift h d t2))))) (\lambda (H6: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr2 c (lift h d t1) (lift h d t2)))) (\lambda (H7: (pr0 t1 t2)).(pr2_free c (lift h d t1) (lift h d t2) (pr0_lift t1 t2 H7 h d))) t3 (sym_eq T t3 t2 H6))) t0 (sym_eq T t0 t1 H5))) c0 (sym_eq C c0 e H2) H3 H4 H1)))) | (pr2_delta c0 d0 u i H1 t0 t3 H2 t H3) \Rightarrow (\lambda (H4: (eq C c0 e)).(\lambda (H5: (eq T t0 t1)).(\lambda (H6: (eq T t t2)).(eq_ind C e (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d0 (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t) \to (pr2 c (lift h d t1) (lift h d t2)))))))) (\lambda (H7: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i e (CHead d0 (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i u t3 t) \to (pr2 c (lift h d t1) (lift h d t2))))))) (\lambda (H8: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i e (CHead d0 (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i u t3 t4) \to (pr2 c (lift h d t1) (lift h d t2)))))) (\lambda (H9: (getl i e (CHead d0 (Bind Abbr) u))).(\lambda (H10: (pr0 t1 t3)).(\lambda (H11: (subst0 i u t3 t2)).(lt_le_e i d (pr2 c (lift h d t1) (lift h d t2)) (\lambda (H0: (lt i d)).(let H \def (drop_getl_trans_le i d (le_S_n i d (le_S (S i) d H0)) c e h H (CHead d0 (Bind Abbr) u) H9) in (ex3_2_ind C C (\lambda (e0: C).(\lambda (_: C).(drop i O c e0))) (\lambda (e0: C).(\lambda (e1: C).(drop h (minus d i) e0 e1))) (\lambda (_: C).(\lambda (e1: C).(clear e1 (CHead d0 (Bind Abbr) u)))) (pr2 c (lift h d t1) (lift h d t2)) (\lambda (x0: C).(\lambda (x1: C).(\lambda (H12: (drop i O c x0)).(\lambda (H13: (drop h (minus d i) x0 x1)).(\lambda (H14: (clear x1 (CHead d0 (Bind Abbr) u))).(let H15 \def (eq_ind nat (minus d i) (\lambda (n: nat).(drop h n x0 x1)) H13 (S (minus d (S i))) (minus_x_Sy d i H0)) in (let H16 \def (drop_clear_S x1 x0 h (minus d (S i)) H15 Abbr d0 u H14) in (ex2_ind C (\lambda (c1: C).(clear x0 (CHead c1 (Bind Abbr) (lift h (minus d (S i)) u)))) (\lambda (c1: C).(drop h (minus d (S i)) c1 d0)) (pr2 c (lift h d t1) (lift h d t2)) (\lambda (x: C).(\lambda (H17: (clear x0 (CHead x (Bind Abbr) (lift h (minus d (S i)) u)))).(\lambda (_: (drop h (minus d (S i)) x d0)).(pr2_delta c x (lift h (minus d (S i)) u) i (getl_intro i c (CHead x (Bind Abbr) (lift h (minus d (S i)) u)) x0 H12 H17) (lift h d t1) (lift h d t3) (pr0_lift t1 t3 H10 h d) (lift h d t2) (subst0_lift_lt t3 t2 u i H11 d H0 h))))) H16)))))))) H))) (\lambda (H0: (le d i)).(pr2_delta c d0 u (plus i h) (drop_getl_trans_ge i c e d h H (CHead d0 (Bind Abbr) u) H9 H0) (lift h d t1) (lift h d t3) (pr0_lift t1 t3 H10 h d) (lift h d t2) (subst0_lift_ge t3 t2 u i h H11 d H0))))))) t (sym_eq T t t2 H8))) t0 (sym_eq T t0 t1 H7))) c0 (sym_eq C c0 e H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C e) (refl_equal T t1) (refl_equal T t2)))))))))). theorem pr2_gen_appl: \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c (THead (Flat Appl) u1 t1) x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))))))) \def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr2 c (THead (Flat Appl) u1 t1) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 c) \to ((eq T t (THead (Flat Appl) u1 t1)) \to ((eq T t0 x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))))))))) with [(pr2_free c0 t0 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t0 (THead (Flat Appl) u1 t1))).(\lambda (H3: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t0 (THead (Flat Appl) u1 t1)) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))))))) (\lambda (H4: (eq T t0 (THead (Flat Appl) u1 t1))).(eq_ind T (THead (Flat Appl) u1 t1) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))))) (\lambda (H5: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (THead (Flat Appl) u1 t1) t) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))))) (\lambda (H6: (pr0 (THead (Flat Appl) u1 t1) x)).(or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H: (eq T x (THead (Flat Appl) x0 x1))).(\lambda (H8: (pr0 u1 x0)).(\lambda (H9: (pr0 t1 x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Flat Appl) x0 x1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x0 x1 (refl_equal T (THead (Flat Appl) x0 x1)) (pr2_free c u1 x0 H8) (pr2_free c t1 x1 H9))) x H)))))) H7)) (\lambda (H7: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H: (eq T t1 (THead (Bind Abst) x0 x1))).(\lambda (H8: (eq T x (THead (Bind Abbr) x2 x3))).(\lambda (H9: (pr0 u1 x2)).(\lambda (H10: (pr0 x1 x3)).(eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3))))))) x0 x1 x2 x3 (refl_equal T (THead (Bind Abst) x0 x1)) (refl_equal T (THead (Bind Abbr) x2 x3)) (pr2_free c u1 x2 H9) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c (Bind b) u) x1 x3 H10))))) t1 H) x H8))))))))) H7)) (\lambda (H7: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H: (not (eq B x0 Abst))).(\lambda (H8: (eq T t1 (THead (Bind x0) x1 x2))).(\lambda (H9: (eq T x (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)))).(\lambda (H10: (pr0 u1 x3)).(\lambda (H11: (pr0 x1 x4)).(\lambda (H12: (pr0 x2 x5)).(eq_ind_r T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (eq_ind_r T (THead (Bind x0) x1 x2) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x5 x3 x4 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5))) (pr2_free c u1 x3 H10) (pr2_free c x1 x4 H11) (pr2_free (CHead c (Bind x0) x4) x2 x5 H12))) t1 H8) x H9))))))))))))) H7)) (pr0_gen_appl u1 t1 x H6))) t2 (sym_eq T t2 x H5))) t0 (sym_eq T t0 (THead (Flat Appl) u1 t1) H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t0 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t0 (THead (Flat Appl) u1 t1))).(\lambda (H5: (eq T t x)).(eq_ind C c (\lambda (c1: C).((eq T t0 (THead (Flat Appl) u1 t1)) \to ((eq T t x) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))))))))) (\lambda (H6: (eq T t0 (THead (Flat Appl) u1 t1))).(eq_ind T (THead (Flat Appl) u1 t1) (\lambda (t3: T).((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t3 t2) \to ((subst0 i u t2 t) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c t1 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))))))) (\lambda (H7: (eq T t x)).(eq_ind T x (\lambda (t3: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 (THead (Flat Appl) u1 t1) t2) \to ((subst0 i u t2 t3) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c t1 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 (THead (Flat Appl) u1 t1) t2)).(\lambda (H10: (subst0 i u t2 x)).(or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H12: (pr0 u1 x0)).(\lambda (H13: (pr0 t1 x1)).(let H14 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Flat Appl) x0 x1) H) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Flat Appl) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Flat Appl) x0 t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 t3)))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (H15: (ex2 T (\lambda (u2: T).(eq T x (THead (Flat Appl) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Flat Appl) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Flat Appl) x2 x1))).(\lambda (H17: (subst0 i u x0 x2)).(eq_ind_r T (THead (Flat Appl) x2 x1) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c t1 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Flat Appl) x2 x1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x2 x1 (refl_equal T (THead (Flat Appl) x2 x1)) (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (pr2_free c t1 x1 H13))) x H16)))) H15)) (\lambda (H15: (ex2 T (\lambda (t2: T).(eq T x (THead (Flat Appl) x0 t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) u x1 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Flat Appl) x0 t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Flat Appl) x0 x2))).(\lambda (H17: (subst0 (s (Flat Appl) i) u x1 x2)).(eq_ind_r T (THead (Flat Appl) x0 x2) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c t1 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x2) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x2) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Flat Appl) x0 x2) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x2) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x0 x2 (refl_equal T (THead (Flat Appl) x0 x2)) (pr2_free c u1 x0 H12) (pr2_delta c d u i H8 t1 x1 H13 x2 H17))) x H16)))) H15)) (\lambda (H15: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) u x1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H16: (eq T x (THead (Flat Appl) x2 x3))).(\lambda (H17: (subst0 i u x0 x2)).(\lambda (H18: (subst0 (s (Flat Appl) i) u x1 x3)).(eq_ind_r T (THead (Flat Appl) x2 x3) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c t1 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x3) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Flat Appl) x2 x3) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x2 x3 (refl_equal T (THead (Flat Appl) x2 x3)) (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (pr2_delta c d u i H8 t1 x1 H13 x3 H18))) x H16)))))) H15)) (subst0_gen_head (Flat Appl) u x0 x1 x i H14)))))))) H11)) (\lambda (H11: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H: (eq T t1 (THead (Bind Abst) x0 x1))).(\lambda (H12: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (H13: (pr0 u1 x2)).(\lambda (H14: (pr0 x1 x3)).(let H15 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Bind Abbr) x2 x3) H12) in (eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x3))) (\lambda (u2: T).(subst0 i u x2 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Bind Abbr) x2 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x2 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 t3)))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (H16: (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x3))) (\lambda (u2: T).(subst0 i u x2 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x3))) (\lambda (u2: T).(subst0 i u x2 u2)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x4: T).(\lambda (H17: (eq T x (THead (Bind Abbr) x4 x3))).(\lambda (H18: (subst0 i u x2 x4)).(eq_ind_r T (THead (Bind Abbr) x4 x3) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t1 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x3) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind Abbr) x4 x3) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x3) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3))))))) x0 x1 x4 x3 (refl_equal T (THead (Bind Abst) x0 x1)) (refl_equal T (THead (Bind Abbr) x4 x3)) (pr2_delta c d u i H8 u1 x2 H13 x4 H18) (\lambda (b: B).(\lambda (u0: T).(pr2_free (CHead c (Bind b) u0) x1 x3 H14))))) x H17)))) H16)) (\lambda (H16: (ex2 T (\lambda (t2: T).(eq T x (THead (Bind Abbr) x2 t2))) (\lambda (t2: T).(subst0 (s (Bind Abbr) i) u x3 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Bind Abbr) x2 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x4: T).(\lambda (H17: (eq T x (THead (Bind Abbr) x2 x4))).(\lambda (H18: (subst0 (s (Bind Abbr) i) u x3 x4)).(eq_ind_r T (THead (Bind Abbr) x2 x4) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t1 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x4) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x4) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind Abbr) x2 x4) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x4) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3))))))) x0 x1 x2 x4 (refl_equal T (THead (Bind Abst) x0 x1)) (refl_equal T (THead (Bind Abbr) x2 x4)) (pr2_free c u1 x2 H13) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_clear_bind b (CHead c (Bind b) u0) c u0 (clear_bind b c u0) (CHead d (Bind Abbr) u) i H8) x1 x3 H14 x4 H18))))) x H17)))) H16)) (\lambda (H16: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x2 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abbr) i) u x3 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x2 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H17: (eq T x (THead (Bind Abbr) x4 x5))).(\lambda (H18: (subst0 i u x2 x4)).(\lambda (H19: (subst0 (s (Bind Abbr) i) u x3 x5)).(eq_ind_r T (THead (Bind Abbr) x4 x5) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t1 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x5) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x5) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind Abbr) x4 x5) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x5) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3))))))) x0 x1 x4 x5 (refl_equal T (THead (Bind Abst) x0 x1)) (refl_equal T (THead (Bind Abbr) x4 x5)) (pr2_delta c d u i H8 u1 x2 H13 x4 H18) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_clear_bind b (CHead c (Bind b) u0) c u0 (clear_bind b c u0) (CHead d (Bind Abbr) u) i H8) x1 x3 H14 x5 H19))))) x H17)))))) H16)) (subst0_gen_head (Bind Abbr) u x2 x3 x i H15)) t1 H)))))))))) H11)) (\lambda (H11: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H: (not (eq B x0 Abst))).(\lambda (H12: (eq T t1 (THead (Bind x0) x1 x2))).(\lambda (H13: (eq T t2 (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)))).(\lambda (H14: (pr0 u1 x3)).(\lambda (H15: (pr0 x1 x4)).(\lambda (H16: (pr0 x2 x5)).(let H17 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) H13) in (eq_ind_r T (THead (Bind x0) x1 x2) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Bind x0) u2 (THead (Flat Appl) (lift (S O) O x3) x5)))) (\lambda (u2: T).(subst0 i u x4 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Bind x0) x4 t3))) (\lambda (t3: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind x0) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x4 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) t3)))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (H18: (ex2 T (\lambda (u2: T).(eq T x (THead (Bind x0) u2 (THead (Flat Appl) (lift (S O) O x3) x5)))) (\lambda (u2: T).(subst0 i u x4 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Bind x0) u2 (THead (Flat Appl) (lift (S O) O x3) x5)))) (\lambda (u2: T).(subst0 i u x4 u2)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x6: T).(\lambda (H19: (eq T x (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5)))).(\lambda (H20: (subst0 i u x4 x6)).(eq_ind_r T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5)) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t1 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x5 x3 x6 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5))) (pr2_free c u1 x3 H14) (pr2_delta c d u i H8 x1 x4 H15 x6 H20) (pr2_free (CHead c (Bind x0) x6) x2 x5 H16))) x H19)))) H18)) (\lambda (H18: (ex2 T (\lambda (t2: T).(eq T x (THead (Bind x0) x4 t2))) (\lambda (t2: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Bind x0) x4 t3))) (\lambda (t3: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x6: T).(\lambda (H19: (eq T x (THead (Bind x0) x4 x6))).(\lambda (H20: (subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) x6)).(eq_ind_r T (THead (Bind x0) x4 x6) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t1 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda (u2: T).(eq T x6 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (ex2 T (\lambda (t3: T).(eq T x6 (THead (Flat Appl) (lift (S O) O x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x6 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3)))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (H21: (ex2 T (\lambda (u2: T).(eq T x6 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2)))).(ex2_ind T (\lambda (u2: T).(eq T x6 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x: T).(\lambda (H22: (eq T x6 (THead (Flat Appl) x x5))).(\lambda (H23: (subst0 (s (Bind x0) i) u (lift (S O) O x3) x)).(eq_ind_r T (THead (Flat Appl) x x5) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 t1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 t1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 t1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (ex2_ind T (\lambda (t3: T).(eq T x (lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus (s (Bind x0) i) (S O)) u x3 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x7: T).(\lambda (H24: (eq T x (lift (S O) O x7))).(\lambda (H25: (subst0 (minus (s (Bind x0) i) (S O)) u x3 x7)).(let H26 \def (eq_ind nat (minus (s (Bind x0) i) (S O)) (\lambda (n: nat).(subst0 n u x3 x7)) H25 i (s_arith1 x0 i)) in (eq_ind_r T (lift (S O) O x7) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t1 x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t1 x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t1 x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x7) x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x7) x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x7) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x7) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x5 x7 x4 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x7) x5))) (pr2_delta c d u i H8 u1 x3 H14 x7 H26) (pr2_free c x1 x4 H15) (pr2_free (CHead c (Bind x0) x4) x2 x5 H16))) x H24))))) (subst0_gen_lift_ge u x3 x (s (Bind x0) i) (S O) O H23 (le_S_n (S O) (S i) (lt_le_S (S O) (S (S i)) (lt_n_S O (S i) (le_lt_n_Sm O i (le_O_n i))))))) x6 H22)))) H21)) (\lambda (H21: (ex2 T (\lambda (t2: T).(eq T x6 (THead (Flat Appl) (lift (S O) O x3) t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x6 (THead (Flat Appl) (lift (S O) O x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x: T).(\lambda (H22: (eq T x6 (THead (Flat Appl) (lift (S O) O x3) x))).(\lambda (H23: (subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 x)).(eq_ind_r T (THead (Flat Appl) (lift (S O) O x3) x) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 t1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 t1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 t1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x x3 x4 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x))) (pr2_free c u1 x3 H14) (pr2_free c x1 x4 H15) (pr2_delta (CHead c (Bind x0) x4) d u (S i) (getl_clear_bind x0 (CHead c (Bind x0) x4) c x4 (clear_bind x0 c x4) (CHead d (Bind Abbr) u) i H8) x2 x5 H16 x H23))) x6 H22)))) H21)) (\lambda (H21: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x6 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x6 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x7: T).(\lambda (x8: T).(\lambda (H22: (eq T x6 (THead (Flat Appl) x7 x8))).(\lambda (H23: (subst0 (s (Bind x0) i) u (lift (S O) O x3) x7)).(\lambda (H24: (subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 x8)).(eq_ind_r T (THead (Flat Appl) x7 x8) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 t1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 t1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 t1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (ex2_ind T (\lambda (t3: T).(eq T x7 (lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus (s (Bind x0) i) (S O)) u x3 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x: T).(\lambda (H25: (eq T x7 (lift (S O) O x))).(\lambda (H26: (subst0 (minus (s (Bind x0) i) (S O)) u x3 x)).(let H27 \def (eq_ind nat (minus (s (Bind x0) i) (S O)) (\lambda (n: nat).(subst0 n u x3 x)) H26 i (s_arith1 x0 i)) in (eq_ind_r T (lift (S O) O x) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t1 x8)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t1 x8)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t1 x8)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x) x8)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x) x8)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x) x8)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x) x8)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x8 x x4 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x) x8))) (pr2_delta c d u i H8 u1 x3 H14 x H27) (pr2_free c x1 x4 H15) (pr2_delta (CHead c (Bind x0) x4) d u (S i) (getl_clear_bind x0 (CHead c (Bind x0) x4) c x4 (clear_bind x0 c x4) (CHead d (Bind Abbr) u) i H8) x2 x5 H16 x8 H24))) x7 H25))))) (subst0_gen_lift_ge u x3 x7 (s (Bind x0) i) (S O) O H23 (le_S_n (S O) (S i) (lt_le_S (S O) (S (S i)) (lt_n_S O (S i) (le_lt_n_Sm O i (le_O_n i))))))) x6 H22)))))) H21)) (subst0_gen_head (Flat Appl) u (lift (S O) O x3) x5 x6 (s (Bind x0) i) H20)) x H19)))) H18)) (\lambda (H18: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind x0) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x4 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind x0) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x4 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x6: T).(\lambda (x7: T).(\lambda (H19: (eq T x (THead (Bind x0) x6 x7))).(\lambda (H20: (subst0 i u x4 x6)).(\lambda (H21: (subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) x7)).(eq_ind_r T (THead (Bind x0) x6 x7) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t1 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda (u2: T).(eq T x7 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (ex2 T (\lambda (t3: T).(eq T x7 (THead (Flat Appl) (lift (S O) O x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x7 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3)))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (H22: (ex2 T (\lambda (u2: T).(eq T x7 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2)))).(ex2_ind T (\lambda (u2: T).(eq T x7 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x: T).(\lambda (H23: (eq T x7 (THead (Flat Appl) x x5))).(\lambda (H24: (subst0 (s (Bind x0) i) u (lift (S O) O x3) x)).(eq_ind_r T (THead (Flat Appl) x x5) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 t1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 t1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 t1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (ex2_ind T (\lambda (t3: T).(eq T x (lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus (s (Bind x0) i) (S O)) u x3 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x8: T).(\lambda (H25: (eq T x (lift (S O) O x8))).(\lambda (H26: (subst0 (minus (s (Bind x0) i) (S O)) u x3 x8)).(let H27 \def (eq_ind nat (minus (s (Bind x0) i) (S O)) (\lambda (n: nat).(subst0 n u x3 x8)) H26 i (s_arith1 x0 i)) in (eq_ind_r T (lift (S O) O x8) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t1 x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t1 x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t1 x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x8) x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x8) x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x8) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x8) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x5 x8 x6 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x8) x5))) (pr2_delta c d u i H8 u1 x3 H14 x8 H27) (pr2_delta c d u i H8 x1 x4 H15 x6 H20) (pr2_free (CHead c (Bind x0) x6) x2 x5 H16))) x H25))))) (subst0_gen_lift_ge u x3 x (s (Bind x0) i) (S O) O H24 (le_S_n (S O) (S i) (lt_le_S (S O) (S (S i)) (lt_n_S O (S i) (le_lt_n_Sm O i (le_O_n i))))))) x7 H23)))) H22)) (\lambda (H22: (ex2 T (\lambda (t2: T).(eq T x7 (THead (Flat Appl) (lift (S O) O x3) t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x7 (THead (Flat Appl) (lift (S O) O x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x: T).(\lambda (H23: (eq T x7 (THead (Flat Appl) (lift (S O) O x3) x))).(\lambda (H24: (subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 x)).(eq_ind_r T (THead (Flat Appl) (lift (S O) O x3) x) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 t1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 t1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 t1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x x3 x6 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x))) (pr2_free c u1 x3 H14) (pr2_delta c d u i H8 x1 x4 H15 x6 H20) (pr2_delta (CHead c (Bind x0) x6) d u (S i) (getl_clear_bind x0 (CHead c (Bind x0) x6) c x6 (clear_bind x0 c x6) (CHead d (Bind Abbr) u) i H8) x2 x5 H16 x H24))) x7 H23)))) H22)) (\lambda (H22: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x7 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x7 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x8: T).(\lambda (x9: T).(\lambda (H23: (eq T x7 (THead (Flat Appl) x8 x9))).(\lambda (H24: (subst0 (s (Bind x0) i) u (lift (S O) O x3) x8)).(\lambda (H25: (subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 x9)).(eq_ind_r T (THead (Flat Appl) x8 x9) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 t1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 t1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 t1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (ex2_ind T (\lambda (t3: T).(eq T x8 (lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus (s (Bind x0) i) (S O)) u x3 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x: T).(\lambda (H26: (eq T x8 (lift (S O) O x))).(\lambda (H27: (subst0 (minus (s (Bind x0) i) (S O)) u x3 x)).(let H28 \def (eq_ind nat (minus (s (Bind x0) i) (S O)) (\lambda (n: nat).(subst0 n u x3 x)) H27 i (s_arith1 x0 i)) in (eq_ind_r T (lift (S O) O x) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t1 x9)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t1 x9)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t1 x9)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x) x9)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x) x9)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x) x9)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x) x9)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x9 x x6 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x) x9))) (pr2_delta c d u i H8 u1 x3 H14 x H28) (pr2_delta c d u i H8 x1 x4 H15 x6 H20) (pr2_delta (CHead c (Bind x0) x6) d u (S i) (getl_clear_bind x0 (CHead c (Bind x0) x6) c x6 (clear_bind x0 c x6) (CHead d (Bind Abbr) u) i H8) x2 x5 H16 x9 H25))) x8 H26))))) (subst0_gen_lift_ge u x3 x8 (s (Bind x0) i) (S O) O H24 (le_S_n (S O) (S i) (lt_le_S (S O) (S (S i)) (lt_n_S O (S i) (le_lt_n_Sm O i (le_O_n i))))))) x7 H23)))))) H22)) (subst0_gen_head (Flat Appl) u (lift (S O) O x3) x5 x7 (s (Bind x0) i) H21)) x H19)))))) H18)) (subst0_gen_head (Bind x0) u x4 (THead (Flat Appl) (lift (S O) O x3) x5) x i H17)) t1 H12)))))))))))))) H11)) (pr0_gen_appl u1 t1 t2 H9))))) t (sym_eq T t x H7))) t0 (sym_eq T t0 (THead (Flat Appl) u1 t1) H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T (THead (Flat Appl) u1 t1)) (refl_equal T x))))))). + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr2 c (THead (Flat Appl) u1 t1) x)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 c) \to ((eq T t (THead (Flat Appl) u1 t1)) \to ((eq T t0 x) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c t1 t2)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))))))))) with [(pr2_free c0 t0 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t0 (THead (Flat Appl) u1 t1))).(\lambda (H3: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t0 (THead (Flat Appl) u1 t1)) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))))))) (\lambda (H4: (eq T t0 (THead (Flat Appl) u1 t1))).(eq_ind T (THead (Flat Appl) u1 t1) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))))) (\lambda (H5: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (THead (Flat Appl) u1 t1) t) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))))) (\lambda (H6: (pr0 (THead (Flat Appl) u1 t1) x)).(or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H: (eq T x (THead (Flat Appl) x0 x1))).(\lambda (H8: (pr0 u1 x0)).(\lambda (H9: (pr0 t1 x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Flat Appl) x0 x1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x0 x1 (refl_equal T (THead (Flat Appl) x0 x1)) (pr2_free c u1 x0 H8) (pr2_free c t1 x1 H9))) x H)))))) H7)) (\lambda (H7: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H: (eq T t1 (THead (Bind Abst) x0 x1))).(\lambda (H8: (eq T x (THead (Bind Abbr) x2 x3))).(\lambda (H9: (pr0 u1 x2)).(\lambda (H10: (pr0 x1 x3)).(eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x3) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3))))))) x0 x1 x2 x3 (refl_equal T (THead (Bind Abst) x0 x1)) (refl_equal T (THead (Bind Abbr) x2 x3)) (pr2_free c u1 x2 H9) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c (Bind b) u) x1 x3 H10))))) t1 H) x H8))))))))) H7)) (\lambda (H7: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t2: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T x (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H: (not (eq B x0 Abst))).(\lambda (H8: (eq T t1 (THead (Bind x0) x1 x2))).(\lambda (H9: (eq T x (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)))).(\lambda (H10: (pr0 u1 x3)).(\lambda (H11: (pr0 x1 x4)).(\lambda (H12: (pr0 x2 x5)).(eq_ind_r T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (eq_ind_r T (THead (Bind x0) x1 x2) (\lambda (t: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x5 x3 x4 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5))) (pr2_free c u1 x3 H10) (pr2_free c x1 x4 H11) (pr2_free (CHead c (Bind x0) x4) x2 x5 H12))) t1 H8) x H9))))))))))))) H7)) (pr0_gen_appl u1 t1 x H6))) t2 (sym_eq T t2 x H5))) t0 (sym_eq T t0 (THead (Flat Appl) u1 t1) H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t0 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t0 (THead (Flat Appl) u1 t1))).(\lambda (H5: (eq T t x)).(eq_ind C c (\lambda (c1: C).((eq T t0 (THead (Flat Appl) u1 t1)) \to ((eq T t x) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))))))))) (\lambda (H6: (eq T t0 (THead (Flat Appl) u1 t1))).(eq_ind T (THead (Flat Appl) u1 t1) (\lambda (t3: T).((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t3 t2) \to ((subst0 i u t2 t) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c t1 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))))))) (\lambda (H7: (eq T t x)).(eq_ind T x (\lambda (t3: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 (THead (Flat Appl) u1 t1) t2) \to ((subst0 i u t2 t3) \to (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c t1 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 (THead (Flat Appl) u1 t1) t2)).(\lambda (H10: (subst0 i u t2 x)).(or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3)))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H12: (pr0 u1 x0)).(\lambda (H13: (pr0 t1 x1)).(let H14 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Flat Appl) x0 x1) H) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Flat Appl) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Flat Appl) x0 t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 t3)))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (H15: (ex2 T (\lambda (u2: T).(eq T x (THead (Flat Appl) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Flat Appl) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Flat Appl) x2 x1))).(\lambda (H17: (subst0 i u x0 x2)).(eq_ind_r T (THead (Flat Appl) x2 x1) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c t1 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Flat Appl) x2 x1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x2 x1 (refl_equal T (THead (Flat Appl) x2 x1)) (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (pr2_free c t1 x1 H13))) x H16)))) H15)) (\lambda (H15: (ex2 T (\lambda (t2: T).(eq T x (THead (Flat Appl) x0 t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) u x1 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Flat Appl) x0 t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Flat Appl) x0 x2))).(\lambda (H17: (subst0 (s (Flat Appl) i) u x1 x2)).(eq_ind_r T (THead (Flat Appl) x0 x2) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c t1 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x2) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x2) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Flat Appl) x0 x2) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x0 x2) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x0 x2 (refl_equal T (THead (Flat Appl) x0 x2)) (pr2_free c u1 x0 H12) (pr2_delta c d u i H8 t1 x1 H13 x2 H17))) x H16)))) H15)) (\lambda (H15: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) u x1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) i) u x1 t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H16: (eq T x (THead (Flat Appl) x2 x3))).(\lambda (H17: (subst0 i u x0 x2)).(\lambda (H18: (subst0 (s (Flat Appl) i) u x1 x3)).(eq_ind_r T (THead (Flat Appl) x2 x3) (\lambda (t3: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c t1 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro0 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x3) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Flat Appl) x2 x3) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Flat Appl) x2 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3))) x2 x3 (refl_equal T (THead (Flat Appl) x2 x3)) (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (pr2_delta c d u i H8 t1 x1 H13 x3 H18))) x H16)))))) H15)) (subst0_gen_head (Flat Appl) u x0 x1 x i H14)))))))) H11)) (\lambda (H11: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H: (eq T t1 (THead (Bind Abst) x0 x1))).(\lambda (H12: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (H13: (pr0 u1 x2)).(\lambda (H14: (pr0 x1 x3)).(let H15 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Bind Abbr) x2 x3) H12) in (eq_ind_r T (THead (Bind Abst) x0 x1) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x3))) (\lambda (u2: T).(subst0 i u x2 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Bind Abbr) x2 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x2 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 t3)))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (H16: (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x3))) (\lambda (u2: T).(subst0 i u x2 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x3))) (\lambda (u2: T).(subst0 i u x2 u2)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x4: T).(\lambda (H17: (eq T x (THead (Bind Abbr) x4 x3))).(\lambda (H18: (subst0 i u x2 x4)).(eq_ind_r T (THead (Bind Abbr) x4 x3) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t1 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x3) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x3) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind Abbr) x4 x3) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x3) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3))))))) x0 x1 x4 x3 (refl_equal T (THead (Bind Abst) x0 x1)) (refl_equal T (THead (Bind Abbr) x4 x3)) (pr2_delta c d u i H8 u1 x2 H13 x4 H18) (\lambda (b: B).(\lambda (u0: T).(pr2_free (CHead c (Bind b) u0) x1 x3 H14))))) x H17)))) H16)) (\lambda (H16: (ex2 T (\lambda (t2: T).(eq T x (THead (Bind Abbr) x2 t2))) (\lambda (t2: T).(subst0 (s (Bind Abbr) i) u x3 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Bind Abbr) x2 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x4: T).(\lambda (H17: (eq T x (THead (Bind Abbr) x2 x4))).(\lambda (H18: (subst0 (s (Bind Abbr) i) u x3 x4)).(eq_ind_r T (THead (Bind Abbr) x2 x4) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t1 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x4) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x4) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind Abbr) x2 x4) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x2 x4) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3))))))) x0 x1 x2 x4 (refl_equal T (THead (Bind Abst) x0 x1)) (refl_equal T (THead (Bind Abbr) x2 x4)) (pr2_free c u1 x2 H13) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_clear_bind b (CHead c (Bind b) u0) c u0 (clear_bind b c u0) (CHead d (Bind Abbr) u) i H8) x1 x3 H14 x4 H18))))) x H17)))) H16)) (\lambda (H16: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x2 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abbr) i) u x3 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x2 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x3 t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H17: (eq T x (THead (Bind Abbr) x4 x5))).(\lambda (H18: (subst0 i u x2 x4)).(\lambda (H19: (subst0 (s (Bind Abbr) i) u x3 x5)).(eq_ind_r T (THead (Bind Abbr) x4 x5) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t1 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro1 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x5) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind Abst) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x5) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind Abbr) x4 x5) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex4_4_intro T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind Abst) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x4 x5) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3))))))) x0 x1 x4 x5 (refl_equal T (THead (Bind Abst) x0 x1)) (refl_equal T (THead (Bind Abbr) x4 x5)) (pr2_delta c d u i H8 u1 x2 H13 x4 H18) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_clear_bind b (CHead c (Bind b) u0) c u0 (clear_bind b c u0) (CHead d (Bind Abbr) u) i H8) x1 x3 H14 x5 H19))))) x H17)))))) H16)) (subst0_gen_head (Bind Abbr) u x2 x3 x i H15)) t1 H)))))))))) H11)) (\lambda (H11: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t2: T).(pr0 z1 t2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Bind b) v2 (THead (Flat Appl) (lift (S O) O u2) t3))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(\lambda (_: T).(pr0 u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (v2: T).(\lambda (_: T).(pr0 y1 v2))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (t3: T).(pr0 z1 t3))))))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H: (not (eq B x0 Abst))).(\lambda (H12: (eq T t1 (THead (Bind x0) x1 x2))).(\lambda (H13: (eq T t2 (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)))).(\lambda (H14: (pr0 u1 x3)).(\lambda (H15: (pr0 x1 x4)).(\lambda (H16: (pr0 x2 x5)).(let H17 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x5)) H13) in (eq_ind_r T (THead (Bind x0) x1 x2) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c t1 t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T t1 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Bind x0) u2 (THead (Flat Appl) (lift (S O) O x3) x5)))) (\lambda (u2: T).(subst0 i u x4 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Bind x0) x4 t3))) (\lambda (t3: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind x0) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x4 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) t3)))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (H18: (ex2 T (\lambda (u2: T).(eq T x (THead (Bind x0) u2 (THead (Flat Appl) (lift (S O) O x3) x5)))) (\lambda (u2: T).(subst0 i u x4 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Bind x0) u2 (THead (Flat Appl) (lift (S O) O x3) x5)))) (\lambda (u2: T).(subst0 i u x4 u2)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x6: T).(\lambda (H19: (eq T x (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5)))).(\lambda (H20: (subst0 i u x4 x6)).(eq_ind_r T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5)) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t1 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x5 x3 x6 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x5))) (pr2_free c u1 x3 H14) (pr2_delta c d u i H8 x1 x4 H15 x6 H20) (pr2_free (CHead c (Bind x0) x6) x2 x5 H16))) x H19)))) H18)) (\lambda (H18: (ex2 T (\lambda (t2: T).(eq T x (THead (Bind x0) x4 t2))) (\lambda (t2: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Bind x0) x4 t3))) (\lambda (t3: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x6: T).(\lambda (H19: (eq T x (THead (Bind x0) x4 x6))).(\lambda (H20: (subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) x6)).(eq_ind_r T (THead (Bind x0) x4 x6) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t1 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda (u2: T).(eq T x6 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (ex2 T (\lambda (t3: T).(eq T x6 (THead (Flat Appl) (lift (S O) O x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x6 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3)))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (H21: (ex2 T (\lambda (u2: T).(eq T x6 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2)))).(ex2_ind T (\lambda (u2: T).(eq T x6 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x: T).(\lambda (H22: (eq T x6 (THead (Flat Appl) x x5))).(\lambda (H23: (subst0 (s (Bind x0) i) u (lift (S O) O x3) x)).(eq_ind_r T (THead (Flat Appl) x x5) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 t1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 t1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 t1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (ex2_ind T (\lambda (t3: T).(eq T x (lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus (s (Bind x0) i) (S O)) u x3 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x7: T).(\lambda (H24: (eq T x (lift (S O) O x7))).(\lambda (H25: (subst0 (minus (s (Bind x0) i) (S O)) u x3 x7)).(let H26 \def (eq_ind nat (minus (s (Bind x0) i) (S O)) (\lambda (n: nat).(subst0 n u x3 x7)) H25 i (s_arith1 x0 i)) in (eq_ind_r T (lift (S O) O x7) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t1 x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t1 x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t1 x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x7) x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x7) x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x7) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x7) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x5 x7 x4 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x7) x5))) (pr2_delta c d u i H8 u1 x3 H14 x7 H26) (pr2_free c x1 x4 H15) (pr2_free (CHead c (Bind x0) x4) x2 x5 H16))) x H24))))) (subst0_gen_lift_ge u x3 x (s (Bind x0) i) (S O) O H23 (le_S_n (S O) (S i) (lt_le_S (S O) (S (S i)) (lt_n_S O (S i) (le_lt_n_Sm O i (le_O_n i))))))) x6 H22)))) H21)) (\lambda (H21: (ex2 T (\lambda (t2: T).(eq T x6 (THead (Flat Appl) (lift (S O) O x3) t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x6 (THead (Flat Appl) (lift (S O) O x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x: T).(\lambda (H22: (eq T x6 (THead (Flat Appl) (lift (S O) O x3) x))).(\lambda (H23: (subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 x)).(eq_ind_r T (THead (Flat Appl) (lift (S O) O x3) x) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 t1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 t1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 t1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x x3 x4 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x3) x))) (pr2_free c u1 x3 H14) (pr2_free c x1 x4 H15) (pr2_delta (CHead c (Bind x0) x4) d u (S i) (getl_clear_bind x0 (CHead c (Bind x0) x4) c x4 (clear_bind x0 c x4) (CHead d (Bind Abbr) u) i H8) x2 x5 H16 x H23))) x6 H22)))) H21)) (\lambda (H21: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x6 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x6 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 x6) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x7: T).(\lambda (x8: T).(\lambda (H22: (eq T x6 (THead (Flat Appl) x7 x8))).(\lambda (H23: (subst0 (s (Bind x0) i) u (lift (S O) O x3) x7)).(\lambda (H24: (subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 x8)).(eq_ind_r T (THead (Flat Appl) x7 x8) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 t1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 t1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 t1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (ex2_ind T (\lambda (t3: T).(eq T x7 (lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus (s (Bind x0) i) (S O)) u x3 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) x7 x8)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x: T).(\lambda (H25: (eq T x7 (lift (S O) O x))).(\lambda (H26: (subst0 (minus (s (Bind x0) i) (S O)) u x3 x)).(let H27 \def (eq_ind nat (minus (s (Bind x0) i) (S O)) (\lambda (n: nat).(subst0 n u x3 x)) H26 i (s_arith1 x0 i)) in (eq_ind_r T (lift (S O) O x) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t1 x8)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t1 x8)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) t1 x8)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x) x8)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x) x8)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x) x8)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x) x8)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x8 x x4 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x4 (THead (Flat Appl) (lift (S O) O x) x8))) (pr2_delta c d u i H8 u1 x3 H14 x H27) (pr2_free c x1 x4 H15) (pr2_delta (CHead c (Bind x0) x4) d u (S i) (getl_clear_bind x0 (CHead c (Bind x0) x4) c x4 (clear_bind x0 c x4) (CHead d (Bind Abbr) u) i H8) x2 x5 H16 x8 H24))) x7 H25))))) (subst0_gen_lift_ge u x3 x7 (s (Bind x0) i) (S O) O H23 (le_S_n (S O) (S i) (lt_le_S (S O) (S (S i)) (lt_n_S O (S i) (le_lt_n_Sm O i (le_O_n i))))))) x6 H22)))))) H21)) (subst0_gen_head (Flat Appl) u (lift (S O) O x3) x5 x6 (s (Bind x0) i) H20)) x H19)))) H18)) (\lambda (H18: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind x0) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x4 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind x0) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x4 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x6: T).(\lambda (x7: T).(\lambda (H19: (eq T x (THead (Bind x0) x6 x7))).(\lambda (H20: (subst0 i u x4 x6)).(\lambda (H21: (subst0 (s (Bind x0) i) u (THead (Flat Appl) (lift (S O) O x3) x5) x7)).(eq_ind_r T (THead (Bind x0) x6 x7) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t1 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t1 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_ind (ex2 T (\lambda (u2: T).(eq T x7 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (ex2 T (\lambda (t3: T).(eq T x7 (THead (Flat Appl) (lift (S O) O x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x7 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3)))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (H22: (ex2 T (\lambda (u2: T).(eq T x7 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2)))).(ex2_ind T (\lambda (u2: T).(eq T x7 (THead (Flat Appl) u2 x5))) (\lambda (u2: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x: T).(\lambda (H23: (eq T x7 (THead (Flat Appl) x x5))).(\lambda (H24: (subst0 (s (Bind x0) i) u (lift (S O) O x3) x)).(eq_ind_r T (THead (Flat Appl) x x5) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 t1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 t1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 t1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (ex2_ind T (\lambda (t3: T).(eq T x (lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus (s (Bind x0) i) (S O)) u x3 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x8: T).(\lambda (H25: (eq T x (lift (S O) O x8))).(\lambda (H26: (subst0 (minus (s (Bind x0) i) (S O)) u x3 x8)).(let H27 \def (eq_ind nat (minus (s (Bind x0) i) (S O)) (\lambda (n: nat).(subst0 n u x3 x8)) H26 i (s_arith1 x0 i)) in (eq_ind_r T (lift (S O) O x8) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t1 x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t1 x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t1 x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x8) x5)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x8) x5)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x8) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x8) x5)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x5 x8 x6 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x8) x5))) (pr2_delta c d u i H8 u1 x3 H14 x8 H27) (pr2_delta c d u i H8 x1 x4 H15 x6 H20) (pr2_free (CHead c (Bind x0) x6) x2 x5 H16))) x H25))))) (subst0_gen_lift_ge u x3 x (s (Bind x0) i) (S O) O H24 (le_S_n (S O) (S i) (lt_le_S (S O) (S (S i)) (lt_n_S O (S i) (le_lt_n_Sm O i (le_O_n i))))))) x7 H23)))) H22)) (\lambda (H22: (ex2 T (\lambda (t2: T).(eq T x7 (THead (Flat Appl) (lift (S O) O x3) t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x7 (THead (Flat Appl) (lift (S O) O x3) t3))) (\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x: T).(\lambda (H23: (eq T x7 (THead (Flat Appl) (lift (S O) O x3) x))).(\lambda (H24: (subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 x)).(eq_ind_r T (THead (Flat Appl) (lift (S O) O x3) x) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 t1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 t1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 t1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x x3 x6 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x3) x))) (pr2_free c u1 x3 H14) (pr2_delta c d u i H8 x1 x4 H15 x6 H20) (pr2_delta (CHead c (Bind x0) x6) d u (S i) (getl_clear_bind x0 (CHead c (Bind x0) x6) c x6 (clear_bind x0 c x6) (CHead d (Bind Abbr) u) i H8) x2 x5 H16 x H24))) x7 H23)))) H22)) (\lambda (H22: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x7 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x7 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s (Bind x0) i) u (lift (S O) O x3) u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 t3))) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 x7) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x8: T).(\lambda (x9: T).(\lambda (H23: (eq T x7 (THead (Flat Appl) x8 x9))).(\lambda (H24: (subst0 (s (Bind x0) i) u (lift (S O) O x3) x8)).(\lambda (H25: (subst0 (s (Flat Appl) (s (Bind x0) i)) u x5 x9)).(eq_ind_r T (THead (Flat Appl) x8 x9) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 t1) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 t1) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 t1) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (ex2_ind T (\lambda (t3: T).(eq T x8 (lift (S O) O t3))) (\lambda (t3: T).(subst0 (minus (s (Bind x0) i) (S O)) u x3 t3)) (or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) x8 x9)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))) (\lambda (x: T).(\lambda (H26: (eq T x8 (lift (S O) O x))).(\lambda (H27: (subst0 (minus (s (Bind x0) i) (S O)) u x3 x)).(let H28 \def (eq_ind nat (minus (s (Bind x0) i) (S O)) (\lambda (n: nat).(subst0 n u x3 x)) H27 i (s_arith1 x0 i)) in (eq_ind_r T (lift (S O) O x) (\lambda (t1: T).(or3 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t1 x9)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t1 x9)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) t1 x9)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))))) (or3_intro2 (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x) x9)) (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Bind x0) x1 x2) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x) x9)) (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x) x9)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (ex6_6_intro B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Bind x0) x1 x2) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x) x9)) (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) x0 x1 x2 x9 x x6 H (refl_equal T (THead (Bind x0) x1 x2)) (refl_equal T (THead (Bind x0) x6 (THead (Flat Appl) (lift (S O) O x) x9))) (pr2_delta c d u i H8 u1 x3 H14 x H28) (pr2_delta c d u i H8 x1 x4 H15 x6 H20) (pr2_delta (CHead c (Bind x0) x6) d u (S i) (getl_clear_bind x0 (CHead c (Bind x0) x6) c x6 (clear_bind x0 c x6) (CHead d (Bind Abbr) u) i H8) x2 x5 H16 x9 H25))) x8 H26))))) (subst0_gen_lift_ge u x3 x8 (s (Bind x0) i) (S O) O H24 (le_S_n (S O) (S i) (lt_le_S (S O) (S (S i)) (lt_n_S O (S i) (le_lt_n_Sm O i (le_O_n i))))))) x7 H23)))))) H22)) (subst0_gen_head (Flat Appl) u (lift (S O) O x3) x5 x7 (s (Bind x0) i) H21)) x H19)))))) H18)) (subst0_gen_head (Bind x0) u x4 (THead (Flat Appl) (lift (S O) O x3) x5) x i H17)) t1 H12)))))))))))))) H11)) (pr0_gen_appl u1 t1 t2 H9))))) t (sym_eq T t x H7))) t0 (sym_eq T t0 (THead (Flat Appl) u1 t1) H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T (THead (Flat Appl) u1 t1)) (refl_equal T x))))))). theorem pr2_gen_abbr: \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c (THead (Bind Abbr) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t2))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t2)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))))))) \def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr2 c (THead (Bind Abbr) u1 t1) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 c) \to ((eq T t (THead (Bind Abbr) u1 t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t2))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t2)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))))))))))) with [(pr2_free c0 t0 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t0 (THead (Bind Abbr) u1 t1))).(\lambda (H3: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t0 (THead (Bind Abbr) u1 t1)) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))))))) (\lambda (H4: (eq T t0 (THead (Bind Abbr) u1 t1))).(eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))))))) (\lambda (H5: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (THead (Bind Abbr) u1 t1) t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))))) (\lambda (H6: (pr0 (THead (Bind Abbr) u1 t1) x)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t1 (lift (S O) O x)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2)))))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3)))))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H: (eq T x (THead (Bind Abbr) x0 x1))).(\lambda (H8: (pr0 u1 x0)).(\lambda (H_x: (or (pr0 t1 x1) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1))))).(or_ind (pr0 t1 x1) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))) (\lambda (H9: (pr0 t1 x1)).(eq_ind_r T (THead (Bind Abbr) x0 x1) (\lambda (t: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O t)))))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O (THead (Bind Abbr) x0 x1))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x0 x1 (refl_equal T (THead (Bind Abbr) x0 x1)) (pr2_free c u1 x0 H8) (or3_intro0 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 x1))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 x1))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x1)))) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c (Bind b) u) t1 x1 H9)))))) x H)) (\lambda (H_x0: (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1)))).(ex2_ind T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (H9: (pr0 t1 x2)).(\lambda (H10: (subst0 O x0 x2 x1)).(eq_ind_r T (THead (Bind Abbr) x0 x1) (\lambda (t: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O t)))))) (ex2_ind T (\lambda (t: T).(subst0 O u1 x2 t)) (\lambda (t: T).(pr0 t x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O (THead (Bind Abbr) x0 x1)))))) (\lambda (x: T).(\lambda (_: (subst0 O u1 x2 x)).(\lambda (_: (pr0 x x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O (THead (Bind Abbr) x0 x1))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x0 x1 (refl_equal T (THead (Bind Abbr) x0 x1)) (pr2_free c u1 x0 H8) (or3_intro1 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 x1))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 x1))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x1)))) (ex_intro2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 x1)) x0 H8 (pr2_delta (CHead c (Bind Abbr) x0) c x0 O (getl_refl Abbr c x0) t1 x2 H9 x1 H10)))))))) (pr0_subst0_back x0 x2 x1 O H10 u1 H8)) x H)))) H_x0)) H_x)))))) H7)) (\lambda (H: (pr0 t1 (lift (S O) O x))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c (Bind b) u) t1 (lift (S O) O x) H))))) (pr0_gen_abbr u1 t1 x H6))) t2 (sym_eq T t2 x H5))) t0 (sym_eq T t0 (THead (Bind Abbr) u1 t1) H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t0 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t0 (THead (Bind Abbr) u1 t1))).(\lambda (H5: (eq T t x)).(eq_ind C c (\lambda (c1: C).((eq T t0 (THead (Bind Abbr) u1 t1)) \to ((eq T t x) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))))))))) (\lambda (H6: (eq T t0 (THead (Bind Abbr) u1 t1))).(eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (t3: T).((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t3 t2) \to ((subst0 i u t2 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Abbr) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t4))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t4)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))))))))) (\lambda (H7: (eq T t x)).(eq_ind T x (\lambda (t3: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 (THead (Bind Abbr) u1 t1) t2) \to ((subst0 i u t2 t3) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Abbr) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t4))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t4)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 (THead (Bind Abbr) u1 t1) t2)).(\lambda (H10: (subst0 i u t2 x)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t1 (lift (S O) O t2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2)))))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3)))))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H: (eq T t2 (THead (Bind Abbr) x0 x1))).(\lambda (H12: (pr0 u1 x0)).(\lambda (H_x: (or (pr0 t1 x1) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1))))).(or_ind (pr0 t1 x1) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (H13: (pr0 t1 x1)).(let H14 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Bind Abbr) x0 x1) H) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Bind Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3)))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (H15: (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Bind Abbr) x2 x1))).(\lambda (H17: (subst0 i u x0 x2)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x2 x1 H16 (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (or3_intro0 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 x1))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 x1))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x1)))) (\lambda (b: B).(\lambda (u0: T).(pr2_free (CHead c (Bind b) u0) t1 x1 H13))))))))) H15)) (\lambda (H15: (ex2 T (\lambda (t2: T).(eq T x (THead (Bind Abbr) x0 t2))) (\lambda (t2: T).(subst0 (s (Bind Abbr) i) u x1 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Bind Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Bind Abbr) x0 x2))).(\lambda (H17: (subst0 (s (Bind Abbr) i) u x1 x2)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x0 x2 H16 (pr2_free c u1 x0 H12) (or3_intro0 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 x2))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 x2))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x2)))) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 x1 H13 x2 H17))))))))) H15)) (\lambda (H15: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abbr) i) u x1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H16: (eq T x (THead (Bind Abbr) x2 x3))).(\lambda (H17: (subst0 i u x0 x2)).(\lambda (H18: (subst0 (s (Bind Abbr) i) u x1 x3)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x2 x3 H16 (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (or3_intro0 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 x3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 x3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x3)))) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 x1 H13 x3 H18))))))))))) H15)) (subst0_gen_head (Bind Abbr) u x0 x1 x i H14)))) (\lambda (H_x0: (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1)))).(ex2_ind T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (H13: (pr0 t1 x2)).(\lambda (H14: (subst0 O x0 x2 x1)).(let H15 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Bind Abbr) x0 x1) H) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Bind Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3)))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (H16: (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x3: T).(\lambda (H17: (eq T x (THead (Bind Abbr) x3 x1))).(\lambda (H18: (subst0 i u x0 x3)).(ex2_ind T (\lambda (t1: T).(subst0 O u1 x2 t1)) (\lambda (t1: T).(pr0 t1 x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x4: T).(\lambda (_: (subst0 O u1 x2 x4)).(\lambda (_: (pr0 x4 x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x3 x1 H17 (pr2_delta c d u i H8 u1 x0 H12 x3 H18) (or3_intro1 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 x1))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 x1))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x1)))) (ex_intro2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 x1)) x0 H12 (pr2_delta (CHead c (Bind Abbr) x0) c x0 O (getl_refl Abbr c x0) t1 x2 H13 x1 H14)))))))) (pr0_subst0_back x0 x2 x1 O H14 u1 H12))))) H16)) (\lambda (H16: (ex2 T (\lambda (t2: T).(eq T x (THead (Bind Abbr) x0 t2))) (\lambda (t2: T).(subst0 (s (Bind Abbr) i) u x1 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Bind Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x3: T).(\lambda (H17: (eq T x (THead (Bind Abbr) x0 x3))).(\lambda (H18: (subst0 (s (Bind Abbr) i) u x1 x3)).(ex2_ind T (\lambda (t1: T).(subst0 O u1 x2 t1)) (\lambda (t1: T).(pr0 t1 x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x4: T).(\lambda (H19: (subst0 O u1 x2 x4)).(\lambda (H20: (pr0 x4 x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x0 x3 H17 (pr2_free c u1 x0 H12) (or3_intro2 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 x3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 x3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x3)))) (ex3_2_intro T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x3))) x4 x1 (pr2_delta (CHead c (Bind Abbr) u1) c u1 O (getl_refl Abbr c u1) t1 x2 H13 x4 H19) H20 (pr2_delta (CHead c (Bind Abbr) u1) d u (S i) (getl_head (Bind Abbr) i c (CHead d (Bind Abbr) u) H8 u1) x1 x1 (pr0_refl x1) x3 H18)))))))) (pr0_subst0_back x0 x2 x1 O H14 u1 H12))))) H16)) (\lambda (H16: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abbr) i) u x1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x3: T).(\lambda (x4: T).(\lambda (H17: (eq T x (THead (Bind Abbr) x3 x4))).(\lambda (H18: (subst0 i u x0 x3)).(\lambda (H19: (subst0 (s (Bind Abbr) i) u x1 x4)).(ex2_ind T (\lambda (t1: T).(subst0 O u1 x2 t1)) (\lambda (t1: T).(pr0 t1 x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x5: T).(\lambda (H20: (subst0 O u1 x2 x5)).(\lambda (H21: (pr0 x5 x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x3 x4 H17 (pr2_delta c d u i H8 u1 x0 H12 x3 H18) (or3_intro2 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 x4))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 x4))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x4)))) (ex3_2_intro T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x4))) x5 x1 (pr2_delta (CHead c (Bind Abbr) u1) c u1 O (getl_refl Abbr c u1) t1 x2 H13 x5 H20) H21 (pr2_delta (CHead c (Bind Abbr) u1) d u (S i) (getl_head (Bind Abbr) i c (CHead d (Bind Abbr) u) H8 u1) x1 x1 (pr0_refl x1) x4 H19)))))))) (pr0_subst0_back x0 x2 x1 O H14 u1 H12))))))) H16)) (subst0_gen_head (Bind Abbr) u x0 x1 x i H15)))))) H_x0)) H_x)))))) H11)) (\lambda (H: (pr0 t1 (lift (S O) O t2))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 (lift (S O) O t2) H (lift (S O) O x) (subst0_lift_ge_S t2 x u i H10 O (le_O_n i))))))) (pr0_gen_abbr u1 t1 t2 H9))))) t (sym_eq T t x H7))) t0 (sym_eq T t0 (THead (Bind Abbr) u1 t1) H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T (THead (Bind Abbr) u1 t1)) (refl_equal T x))))))). + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr2 c (THead (Bind Abbr) u1 t1) x)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 c) \to ((eq T t (THead (Bind Abbr) u1 t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t2))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t2)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))))))))))) with [(pr2_free c0 t0 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t0 (THead (Bind Abbr) u1 t1))).(\lambda (H3: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t0 (THead (Bind Abbr) u1 t1)) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))))))) (\lambda (H4: (eq T t0 (THead (Bind Abbr) u1 t1))).(eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))))))) (\lambda (H5: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (THead (Bind Abbr) u1 t1) t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))))) (\lambda (H6: (pr0 (THead (Bind Abbr) u1 t1) x)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t1 (lift (S O) O x)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2)))))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3)))))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H: (eq T x (THead (Bind Abbr) x0 x1))).(\lambda (H8: (pr0 u1 x0)).(\lambda (H_x: (or (pr0 t1 x1) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1))))).(or_ind (pr0 t1 x1) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))) (\lambda (H9: (pr0 t1 x1)).(eq_ind_r T (THead (Bind Abbr) x0 x1) (\lambda (t: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O t)))))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O (THead (Bind Abbr) x0 x1))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x0 x1 (refl_equal T (THead (Bind Abbr) x0 x1)) (pr2_free c u1 x0 H8) (or3_intro0 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 x1))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 x1))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x1)))) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c (Bind b) u) t1 x1 H9)))))) x H)) (\lambda (H_x0: (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1)))).(ex2_ind T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (H9: (pr0 t1 x2)).(\lambda (H10: (subst0 O x0 x2 x1)).(eq_ind_r T (THead (Bind Abbr) x0 x1) (\lambda (t: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O t)))))) (ex2_ind T (\lambda (t: T).(subst0 O u1 x2 t)) (\lambda (t: T).(pr0 t x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O (THead (Bind Abbr) x0 x1)))))) (\lambda (x: T).(\lambda (_: (subst0 O u1 x2 x)).(\lambda (_: (pr0 x x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O (THead (Bind Abbr) x0 x1))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Abbr) x0 x1) (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x0 x1 (refl_equal T (THead (Bind Abbr) x0 x1)) (pr2_free c u1 x0 H8) (or3_intro1 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 x1))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 x1))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x1)))) (ex_intro2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 x1)) x0 H8 (pr2_delta (CHead c (Bind Abbr) x0) c x0 O (getl_refl Abbr c x0) t1 x2 H9 x1 H10)))))))) (pr0_subst0_back x0 x2 x1 O H10 u1 H8)) x H)))) H_x0)) H_x)))))) H7)) (\lambda (H: (pr0 t1 (lift (S O) O x))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))) (ex2 T (\lambda (u: T).(pr0 u1 u)) (\lambda (u: T).(pr2 (CHead c (Bind Abbr) u) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c (Bind b) u) t1 (lift (S O) O x) H))))) (pr0_gen_abbr u1 t1 x H6))) t2 (sym_eq T t2 x H5))) t0 (sym_eq T t0 (THead (Bind Abbr) u1 t1) H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t0 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t0 (THead (Bind Abbr) u1 t1))).(\lambda (H5: (eq T t x)).(eq_ind C c (\lambda (c1: C).((eq T t0 (THead (Bind Abbr) u1 t1)) \to ((eq T t x) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))))))))) (\lambda (H6: (eq T t0 (THead (Bind Abbr) u1 t1))).(eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (t3: T).((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t3 t2) \to ((subst0 i u t2 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Abbr) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t4))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t4)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))))))))) (\lambda (H7: (eq T t x)).(eq_ind T x (\lambda (t3: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 (THead (Bind Abbr) u1 t1) t2) \to ((subst0 i u t2 t3) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Abbr) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t4))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t4)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 (THead (Bind Abbr) u1 t1) t2)).(\lambda (H10: (subst0 i u t2 x)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3))))))) (pr0 t1 (lift (S O) O t2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t2: T).(or (pr0 t1 t2) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t2)))))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (u2: T).(\lambda (t3: T).(or (pr0 t1 t3) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O u2 y t3)))))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H: (eq T t2 (THead (Bind Abbr) x0 x1))).(\lambda (H12: (pr0 u1 x0)).(\lambda (H_x: (or (pr0 t1 x1) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1))))).(or_ind (pr0 t1 x1) (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (H13: (pr0 t1 x1)).(let H14 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Bind Abbr) x0 x1) H) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Bind Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3)))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (H15: (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Bind Abbr) x2 x1))).(\lambda (H17: (subst0 i u x0 x2)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x2 x1 H16 (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (or3_intro0 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 x1))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 x1))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x1)))) (\lambda (b: B).(\lambda (u0: T).(pr2_free (CHead c (Bind b) u0) t1 x1 H13))))))))) H15)) (\lambda (H15: (ex2 T (\lambda (t2: T).(eq T x (THead (Bind Abbr) x0 t2))) (\lambda (t2: T).(subst0 (s (Bind Abbr) i) u x1 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Bind Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Bind Abbr) x0 x2))).(\lambda (H17: (subst0 (s (Bind Abbr) i) u x1 x2)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x0 x2 H16 (pr2_free c u1 x0 H12) (or3_intro0 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 x2))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 x2))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x2)))) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 x1 H13 x2 H17))))))))) H15)) (\lambda (H15: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abbr) i) u x1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H16: (eq T x (THead (Bind Abbr) x2 x3))).(\lambda (H17: (subst0 i u x0 x2)).(\lambda (H18: (subst0 (s (Bind Abbr) i) u x1 x3)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x2 x3 H16 (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (or3_intro0 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 x3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 x3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x3)))) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 x1 H13 x3 H18))))))))))) H15)) (subst0_gen_head (Bind Abbr) u x0 x1 x i H14)))) (\lambda (H_x0: (ex2 T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1)))).(ex2_ind T (\lambda (y: T).(pr0 t1 y)) (\lambda (y: T).(subst0 O x0 y x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (H13: (pr0 t1 x2)).(\lambda (H14: (subst0 O x0 x2 x1)).(let H15 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Bind Abbr) x0 x1) H) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Bind Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3)))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (H16: (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Bind Abbr) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x3: T).(\lambda (H17: (eq T x (THead (Bind Abbr) x3 x1))).(\lambda (H18: (subst0 i u x0 x3)).(ex2_ind T (\lambda (t1: T).(subst0 O u1 x2 t1)) (\lambda (t1: T).(pr0 t1 x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x4: T).(\lambda (_: (subst0 O u1 x2 x4)).(\lambda (_: (pr0 x4 x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x3 x1 H17 (pr2_delta c d u i H8 u1 x0 H12 x3 H18) (or3_intro1 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 x1))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 x1))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x1)))) (ex_intro2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 x1)) x0 H12 (pr2_delta (CHead c (Bind Abbr) x0) c x0 O (getl_refl Abbr c x0) t1 x2 H13 x1 H14)))))))) (pr0_subst0_back x0 x2 x1 O H14 u1 H12))))) H16)) (\lambda (H16: (ex2 T (\lambda (t2: T).(eq T x (THead (Bind Abbr) x0 t2))) (\lambda (t2: T).(subst0 (s (Bind Abbr) i) u x1 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Bind Abbr) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x3: T).(\lambda (H17: (eq T x (THead (Bind Abbr) x0 x3))).(\lambda (H18: (subst0 (s (Bind Abbr) i) u x1 x3)).(ex2_ind T (\lambda (t1: T).(subst0 O u1 x2 t1)) (\lambda (t1: T).(pr0 t1 x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x4: T).(\lambda (H19: (subst0 O u1 x2 x4)).(\lambda (H20: (pr0 x4 x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x0 x3 H17 (pr2_free c u1 x0 H12) (or3_intro2 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 x3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 x3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x3)))) (ex3_2_intro T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x3))) x4 x1 (pr2_delta (CHead c (Bind Abbr) u1) c u1 O (getl_refl Abbr c u1) t1 x2 H13 x4 H19) H20 (pr2_delta (CHead c (Bind Abbr) u1) d u (S i) (getl_head (Bind Abbr) i c (CHead d (Bind Abbr) u) H8 u1) x1 x1 (pr0_refl x1) x3 H18)))))))) (pr0_subst0_back x0 x2 x1 O H14 u1 H12))))) H16)) (\lambda (H16: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Abbr) i) u x1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Abbr) i) u x1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x3: T).(\lambda (x4: T).(\lambda (H17: (eq T x (THead (Bind Abbr) x3 x4))).(\lambda (H18: (subst0 i u x0 x3)).(\lambda (H19: (subst0 (s (Bind Abbr) i) u x1 x4)).(ex2_ind T (\lambda (t1: T).(subst0 O u1 x2 t1)) (\lambda (t1: T).(pr0 t1 x1)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x5: T).(\lambda (H20: (subst0 O u1 x2 x5)).(\lambda (H21: (pr0 x5 x1)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3))))))) x3 x4 H17 (pr2_delta c d u i H8 u1 x0 H12 x3 H18) (or3_intro2 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 x4))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 x4))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x4)))) (ex3_2_intro T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z x4))) x5 x1 (pr2_delta (CHead c (Bind Abbr) u1) c u1 O (getl_refl Abbr c u1) t1 x2 H13 x5 H20) H21 (pr2_delta (CHead c (Bind Abbr) u1) d u (S i) (getl_head (Bind Abbr) i c (CHead d (Bind Abbr) u) H8 u1) x1 x1 (pr0_refl x1) x4 H19)))))))) (pr0_subst0_back x0 x2 x1 O H14 u1 H12))))))) H16)) (subst0_gen_head (Bind Abbr) u x0 x1 x i H15)))))) H_x0)) H_x)))))) H11)) (\lambda (H: (pr0 t1 (lift (S O) O t2))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(or3 (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))) (ex2 T (\lambda (u0: T).(pr0 u1 u0)) (\lambda (u0: T).(pr2 (CHead c (Bind Abbr) u0) t1 t3))) (ex3_2 T T (\lambda (y: T).(\lambda (_: T).(pr2 (CHead c (Bind Abbr) u1) t1 y))) (\lambda (y: T).(\lambda (z: T).(pr0 y z))) (\lambda (_: T).(\lambda (z: T).(pr2 (CHead c (Bind Abbr) u1) z t3)))))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 (lift (S O) O t2) H (lift (S O) O x) (subst0_lift_ge_S t2 x u i H10 O (le_O_n i))))))) (pr0_gen_abbr u1 t1 t2 H9))))) t (sym_eq T t x H7))) t0 (sym_eq T t0 (THead (Bind Abbr) u1 t1) H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T (THead (Bind Abbr) u1 t1)) (refl_equal T x))))))). theorem pr2_gen_void: \forall (c: C).(\forall (u1: T).(\forall (t1: T).(\forall (x: T).((pr2 c (THead (Bind Void) u1 t1) x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))))))) \def - \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr2 c (THead (Bind Void) u1 t1) x)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 c) \to ((eq T t (THead (Bind Void) u1 t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))))))))))) with [(pr2_free c0 t0 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t0 (THead (Bind Void) u1 t1))).(\lambda (H3: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t0 (THead (Bind Void) u1 t1)) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))))))) (\lambda (H4: (eq T t0 (THead (Bind Void) u1 t1))).(eq_ind T (THead (Bind Void) u1 t1) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))))))) (\lambda (H5: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (THead (Bind Void) u1 t1) t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))))) (\lambda (H6: (pr0 (THead (Bind Void) u1 t1) x)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H: (eq T x (THead (Bind Void) x0 x1))).(\lambda (H8: (pr0 u1 x0)).(\lambda (H9: (pr0 t1 x1)).(eq_ind_r T (THead (Bind Void) x0 x1) (\lambda (t: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O t)))))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Void) x0 x1) (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O (THead (Bind Void) x0 x1))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Void) x0 x1) (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))))) x0 x1 (refl_equal T (THead (Bind Void) x0 x1)) (pr2_free c u1 x0 H8) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c (Bind b) u) t1 x1 H9))))) x H)))))) H7)) (\lambda (H: (pr0 t1 (lift (S O) O x))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c (Bind b) u) t1 (lift (S O) O x) H))))) (pr0_gen_void u1 t1 x H6))) t2 (sym_eq T t2 x H5))) t0 (sym_eq T t0 (THead (Bind Void) u1 t1) H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t0 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t0 (THead (Bind Void) u1 t1))).(\lambda (H5: (eq T t x)).(eq_ind C c (\lambda (c1: C).((eq T t0 (THead (Bind Void) u1 t1)) \to ((eq T t x) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))))))))) (\lambda (H6: (eq T t0 (THead (Bind Void) u1 t1))).(eq_ind T (THead (Bind Void) u1 t1) (\lambda (t3: T).((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t3 t2) \to ((subst0 i u t2 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Void) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))))))))) (\lambda (H7: (eq T t x)).(eq_ind T x (\lambda (t3: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 (THead (Bind Void) u1 t1) t2) \to ((subst0 i u t2 t3) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Void) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 (THead (Bind Void) u1 t1) t2)).(\lambda (H10: (subst0 i u t2 x)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O t2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H: (eq T t2 (THead (Bind Void) x0 x1))).(\lambda (H12: (pr0 u1 x0)).(\lambda (H13: (pr0 t1 x1)).(let H14 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Bind Void) x0 x1) H) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Void) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Bind Void) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3)))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (H15: (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Void) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Bind Void) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Bind Void) x2 x1))).(\lambda (H17: (subst0 i u x0 x2)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))))) x2 x1 H16 (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (\lambda (b: B).(\lambda (u0: T).(pr2_free (CHead c (Bind b) u0) t1 x1 H13)))))))) H15)) (\lambda (H15: (ex2 T (\lambda (t2: T).(eq T x (THead (Bind Void) x0 t2))) (\lambda (t2: T).(subst0 (s (Bind Void) i) u x1 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Bind Void) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Bind Void) x0 x2))).(\lambda (H17: (subst0 (s (Bind Void) i) u x1 x2)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))))) x0 x2 H16 (pr2_free c u1 x0 H12) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 x1 H13 x2 H17)))))))) H15)) (\lambda (H15: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Void) i) u x1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H16: (eq T x (THead (Bind Void) x2 x3))).(\lambda (H17: (subst0 i u x0 x2)).(\lambda (H18: (subst0 (s (Bind Void) i) u x1 x3)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))))) x2 x3 H16 (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 x1 H13 x3 H18)))))))))) H15)) (subst0_gen_head (Bind Void) u x0 x1 x i H14)))))))) H11)) (\lambda (H: (pr0 t1 (lift (S O) O t2))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 (lift (S O) O t2) H (lift (S O) O x) (subst0_lift_ge_S t2 x u i H10 O (le_O_n i))))))) (pr0_gen_void u1 t1 t2 H9))))) t (sym_eq T t x H7))) t0 (sym_eq T t0 (THead (Bind Void) u1 t1) H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T (THead (Bind Void) u1 t1)) (refl_equal T x))))))). + \lambda (c: C).(\lambda (u1: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (pr2 c (THead (Bind Void) u1 t1) x)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 c) \to ((eq T t (THead (Bind Void) u1 t1)) \to ((eq T t0 x) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t2)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))))))))))) with [(pr2_free c0 t0 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t0 (THead (Bind Void) u1 t1))).(\lambda (H3: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t0 (THead (Bind Void) u1 t1)) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))))))) (\lambda (H4: (eq T t0 (THead (Bind Void) u1 t1))).(eq_ind T (THead (Bind Void) u1 t1) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))))))) (\lambda (H5: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (THead (Bind Void) u1 t1) t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))))) (\lambda (H6: (pr0 (THead (Bind Void) u1 t1) x)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O x)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H: (eq T x (THead (Bind Void) x0 x1))).(\lambda (H8: (pr0 u1 x0)).(\lambda (H9: (pr0 t1 x1)).(eq_ind_r T (THead (Bind Void) x0 x1) (\lambda (t: T).(or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O t)))))) (or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Void) x0 x1) (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O (THead (Bind Void) x0 x1))))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead (Bind Void) x0 x1) (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3))))) x0 x1 (refl_equal T (THead (Bind Void) x0 x1)) (pr2_free c u1 x0 H8) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c (Bind b) u) t1 x1 H9))))) x H)))))) H7)) (\lambda (H: (pr0 t1 (lift (S O) O x))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 t3)))))) (\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) t1 (lift (S O) O x)))) (\lambda (b: B).(\lambda (u: T).(pr2_free (CHead c (Bind b) u) t1 (lift (S O) O x) H))))) (pr0_gen_void u1 t1 x H6))) t2 (sym_eq T t2 x H5))) t0 (sym_eq T t0 (THead (Bind Void) u1 t1) H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t0 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t0 (THead (Bind Void) u1 t1))).(\lambda (H5: (eq T t x)).(eq_ind C c (\lambda (c1: C).((eq T t0 (THead (Bind Void) u1 t1)) \to ((eq T t x) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))))))))) (\lambda (H6: (eq T t0 (THead (Bind Void) u1 t1))).(eq_ind T (THead (Bind Void) u1 t1) (\lambda (t3: T).((eq T t x) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t3 t2) \to ((subst0 i u t2 t) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Void) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))))))))) (\lambda (H7: (eq T t x)).(eq_ind T x (\lambda (t3: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 (THead (Bind Void) u1 t1) t2) \to ((subst0 i u t2 t3) \to (or (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x (THead (Bind Void) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t4)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 (THead (Bind Void) u1 t1) t2)).(\lambda (H10: (subst0 i u t2 x)).(or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3)))) (pr0 t1 (lift (S O) O t2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (H11: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr0 t1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr0 t1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H: (eq T t2 (THead (Bind Void) x0 x1))).(\lambda (H12: (pr0 u1 x0)).(\lambda (H13: (pr0 t1 x1)).(let H14 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H10 (THead (Bind Void) x0 x1) H) in (or3_ind (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Void) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2))) (ex2 T (\lambda (t3: T).(eq T x (THead (Bind Void) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3)))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (H15: (ex2 T (\lambda (u2: T).(eq T x (THead (Bind Void) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T x (THead (Bind Void) u2 x1))) (\lambda (u2: T).(subst0 i u x0 u2)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Bind Void) x2 x1))).(\lambda (H17: (subst0 i u x0 x2)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))))) x2 x1 H16 (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (\lambda (b: B).(\lambda (u0: T).(pr2_free (CHead c (Bind b) u0) t1 x1 H13)))))))) H15)) (\lambda (H15: (ex2 T (\lambda (t2: T).(eq T x (THead (Bind Void) x0 t2))) (\lambda (t2: T).(subst0 (s (Bind Void) i) u x1 t2)))).(ex2_ind T (\lambda (t3: T).(eq T x (THead (Bind Void) x0 t3))) (\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3)) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (H16: (eq T x (THead (Bind Void) x0 x2))).(\lambda (H17: (subst0 (s (Bind Void) i) u x1 x2)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))))) x0 x2 H16 (pr2_free c u1 x0 H12) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 x1 H13 x2 H17)))))))) H15)) (\lambda (H15: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Bind Void) i) u x1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u x0 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind Void) i) u x1 t3))) (or (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x))))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H16: (eq T x (THead (Bind Void) x2 x3))).(\lambda (H17: (subst0 i u x0 x2)).(\lambda (H18: (subst0 (s (Bind Void) i) u x1 x3)).(or_introl (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (ex3_2_intro T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3))))) x2 x3 H16 (pr2_delta c d u i H8 u1 x0 H12 x2 H17) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 x1 H13 x3 H18)))))))))) H15)) (subst0_gen_head (Bind Void) u x0 x1 x i H14)))))))) H11)) (\lambda (H: (pr0 t1 (lift (S O) O t2))).(or_intror (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u1 u2))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 t3)))))) (\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) t1 (lift (S O) O x)))) (\lambda (b: B).(\lambda (u0: T).(pr2_delta (CHead c (Bind b) u0) d u (S i) (getl_head (Bind b) i c (CHead d (Bind Abbr) u) H8 u0) t1 (lift (S O) O t2) H (lift (S O) O x) (subst0_lift_ge_S t2 x u i H10 O (le_O_n i))))))) (pr0_gen_void u1 t1 t2 H9))))) t (sym_eq T t x H7))) t0 (sym_eq T t0 (THead (Bind Void) u1 t1) H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T (THead (Bind Void) u1 t1)) (refl_equal T x))))))). theorem pr2_gen_lift: \forall (c: C).(\forall (t1: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).((pr2 c (lift h d t1) x) \to (\forall (e: C).((drop h d c e) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr2 e t1 t2)))))))))) \def - \lambda (c: C).(\lambda (t1: T).(\lambda (x: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (pr2 c (lift h d t1) x)).(\lambda (e: C).(\lambda (H0: (drop h d c e)).(let H1 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 c) \to ((eq T t (lift h d t1)) \to ((eq T t0 x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr2 e t1 t2)))))))))) with [(pr2_free c0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq T t0 (lift h d t1))).(\lambda (H4: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t0 (lift h d t1)) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))))))) (\lambda (H5: (eq T t0 (lift h d t1))).(eq_ind T (lift h d t1) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)))))) (\lambda (H6: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (lift h d t1) t) \to (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))))) (\lambda (H7: (pr0 (lift h d t1) x)).(ex2_ind T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr0 t1 t3)) (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (x0: T).(\lambda (H: (eq T x (lift h d x0))).(\lambda (H8: (pr0 t1 x0)).(eq_ind_r T (lift h d x0) (\lambda (t: T).(ex2 T (\lambda (t3: T).(eq T t (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)))) (ex_intro2 T (\lambda (t3: T).(eq T (lift h d x0) (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)) x0 (refl_equal T (lift h d x0)) (pr2_free e t1 x0 H8)) x H)))) (pr0_gen_lift t1 x h d H7))) t2 (sym_eq T t2 x H6))) t0 (sym_eq T t0 (lift h d t1) H5))) c0 (sym_eq C c0 c H2) H3 H4 H1)))) | (pr2_delta c0 d0 u i H1 t0 t2 H2 t H3) \Rightarrow (\lambda (H4: (eq C c0 c)).(\lambda (H5: (eq T t0 (lift h d t1))).(\lambda (H6: (eq T t x)).(eq_ind C c (\lambda (c: C).((eq T t0 (lift h d t1)) \to ((eq T t x) \to ((getl i c (CHead d0 (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))))))))) (\lambda (H7: (eq T t0 (lift h d t1))).(eq_ind T (lift h d t1) (\lambda (t3: T).((eq T t x) \to ((getl i c (CHead d0 (Bind Abbr) u)) \to ((pr0 t3 t2) \to ((subst0 i u t2 t) \to (ex2 T (\lambda (t4: T).(eq T x (lift h d t4))) (\lambda (t4: T).(pr2 e t1 t4)))))))) (\lambda (H8: (eq T t x)).(eq_ind T x (\lambda (t3: T).((getl i c (CHead d0 (Bind Abbr) u)) \to ((pr0 (lift h d t1) t2) \to ((subst0 i u t2 t3) \to (ex2 T (\lambda (t4: T).(eq T x (lift h d t4))) (\lambda (t4: T).(pr2 e t1 t4))))))) (\lambda (H9: (getl i c (CHead d0 (Bind Abbr) u))).(\lambda (H10: (pr0 (lift h d t1) t2)).(\lambda (H11: (subst0 i u t2 x)).(ex2_ind T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(pr0 t1 t3)) (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (x0: T).(\lambda (H: (eq T t2 (lift h d x0))).(\lambda (H12: (pr0 t1 x0)).(let H13 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H11 (lift h d x0) H) in (lt_le_e i d (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (H14: (lt i d)).(let H15 \def (eq_ind nat d (\lambda (n: nat).(drop h n c e)) H0 (S (plus i (minus d (S i)))) (lt_plus_minus i d H14)) in (let H16 \def (eq_ind nat d (\lambda (n: nat).(subst0 i u (lift h n x0) x)) H13 (S (plus i (minus d (S i)))) (lt_plus_minus i d H14)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (minus d (S i)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind Abbr) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (minus d (S i)) d0 e0))) (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (x1: T).(\lambda (x2: C).(\lambda (H0: (eq T u (lift h (minus d (S i)) x1))).(\lambda (H17: (getl i e (CHead x2 (Bind Abbr) x1))).(\lambda (_: (drop h (minus d (S i)) d0 x2)).(let H19 \def (eq_ind T u (\lambda (t: T).(subst0 i t (lift h (S (plus i (minus d (S i)))) x0) x)) H16 (lift h (minus d (S i)) x1) H0) in (ex2_ind T (\lambda (t3: T).(eq T x (lift h (S (plus i (minus d (S i)))) t3))) (\lambda (t3: T).(subst0 i x1 x0 t3)) (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (x3: T).(\lambda (H20: (eq T x (lift h (S (plus i (minus d (S i)))) x3))).(\lambda (H21: (subst0 i x1 x0 x3)).(let H22 \def (eq_ind_r nat (S (plus i (minus d (S i)))) (\lambda (n: nat).(eq T x (lift h n x3))) H20 d (lt_plus_minus i d H14)) in (ex_intro2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)) x3 H22 (pr2_delta e x2 x1 i H17 t1 x0 H12 x3 H21)))))) (subst0_gen_lift_lt x1 x0 x i h (minus d (S i)) H19)))))))) (getl_drop_conf_lt Abbr c d0 u i H9 e h (minus d (S i)) H15))))) (\lambda (H14: (le d i)).(lt_le_e i (plus d h) (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (H15: (lt i (plus d h))).(subst0_gen_lift_false x0 u x h d i H14 H15 H13 (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))))) (\lambda (H15: (le (plus d h) i)).(ex2_ind T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u x0 t3)) (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (x1: T).(\lambda (H16: (eq T x (lift h d x1))).(\lambda (H17: (subst0 (minus i h) u x0 x1)).(ex_intro2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)) x1 H16 (pr2_delta e d0 u (minus i h) (getl_drop_conf_ge i (CHead d0 (Bind Abbr) u) c H9 e h d H0 H15) t1 x0 H12 x1 H17))))) (subst0_gen_lift_ge u x0 x i h d H13 H15)))))))))) (pr0_gen_lift t1 t2 h d H10))))) t (sym_eq T t x H8))) t0 (sym_eq T t0 (lift h d t1) H7))) c0 (sym_eq C c0 c H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C c) (refl_equal T (lift h d t1)) (refl_equal T x)))))))))). + \lambda (c: C).(\lambda (t1: T).(\lambda (x: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (pr2 c (lift h d t1) x)).(\lambda (e: C).(\lambda (H0: (drop h d c e)).(let H1 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 c) \to ((eq T t (lift h d t1)) \to ((eq T t0 x) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr2 e t1 t2)))))))))) with [(pr2_free c0 t0 t2 H1) \Rightarrow (\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq T t0 (lift h d t1))).(\lambda (H4: (eq T t2 x)).(eq_ind C c (\lambda (_: C).((eq T t0 (lift h d t1)) \to ((eq T t2 x) \to ((pr0 t0 t2) \to (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))))))) (\lambda (H5: (eq T t0 (lift h d t1))).(eq_ind T (lift h d t1) (\lambda (t: T).((eq T t2 x) \to ((pr0 t t2) \to (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)))))) (\lambda (H6: (eq T t2 x)).(eq_ind T x (\lambda (t: T).((pr0 (lift h d t1) t) \to (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))))) (\lambda (H7: (pr0 (lift h d t1) x)).(ex2_ind T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr0 t1 t3)) (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (x0: T).(\lambda (H: (eq T x (lift h d x0))).(\lambda (H8: (pr0 t1 x0)).(eq_ind_r T (lift h d x0) (\lambda (t: T).(ex2 T (\lambda (t3: T).(eq T t (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)))) (ex_intro2 T (\lambda (t3: T).(eq T (lift h d x0) (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)) x0 (refl_equal T (lift h d x0)) (pr2_free e t1 x0 H8)) x H)))) (pr0_gen_lift t1 x h d H7))) t2 (sym_eq T t2 x H6))) t0 (sym_eq T t0 (lift h d t1) H5))) c0 (sym_eq C c0 c H2) H3 H4 H1)))) | (pr2_delta c0 d0 u i H1 t0 t2 H2 t H3) \Rightarrow (\lambda (H4: (eq C c0 c)).(\lambda (H5: (eq T t0 (lift h d t1))).(\lambda (H6: (eq T t x)).(eq_ind C c (\lambda (c: C).((eq T t0 (lift h d t1)) \to ((eq T t x) \to ((getl i c (CHead d0 (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))))))))) (\lambda (H7: (eq T t0 (lift h d t1))).(eq_ind T (lift h d t1) (\lambda (t3: T).((eq T t x) \to ((getl i c (CHead d0 (Bind Abbr) u)) \to ((pr0 t3 t2) \to ((subst0 i u t2 t) \to (ex2 T (\lambda (t4: T).(eq T x (lift h d t4))) (\lambda (t4: T).(pr2 e t1 t4)))))))) (\lambda (H8: (eq T t x)).(eq_ind T x (\lambda (t3: T).((getl i c (CHead d0 (Bind Abbr) u)) \to ((pr0 (lift h d t1) t2) \to ((subst0 i u t2 t3) \to (ex2 T (\lambda (t4: T).(eq T x (lift h d t4))) (\lambda (t4: T).(pr2 e t1 t4))))))) (\lambda (H9: (getl i c (CHead d0 (Bind Abbr) u))).(\lambda (H10: (pr0 (lift h d t1) t2)).(\lambda (H11: (subst0 i u t2 x)).(ex2_ind T (\lambda (t3: T).(eq T t2 (lift h d t3))) (\lambda (t3: T).(pr0 t1 t3)) (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (x0: T).(\lambda (H: (eq T t2 (lift h d x0))).(\lambda (H12: (pr0 t1 x0)).(let H13 \def (eq_ind T t2 (\lambda (t: T).(subst0 i u t x)) H11 (lift h d x0) H) in (lt_le_e i d (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (H14: (lt i d)).(let H15 \def (eq_ind nat d (\lambda (n: nat).(drop h n c e)) H0 (S (plus i (minus d (S i)))) (lt_plus_minus i d H14)) in (let H16 \def (eq_ind nat d (\lambda (n: nat).(subst0 i u (lift h n x0) x)) H13 (S (plus i (minus d (S i)))) (lt_plus_minus i d H14)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (minus d (S i)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl i e (CHead e0 (Bind Abbr) v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (minus d (S i)) d0 e0))) (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (x1: T).(\lambda (x2: C).(\lambda (H0: (eq T u (lift h (minus d (S i)) x1))).(\lambda (H17: (getl i e (CHead x2 (Bind Abbr) x1))).(\lambda (_: (drop h (minus d (S i)) d0 x2)).(let H19 \def (eq_ind T u (\lambda (t: T).(subst0 i t (lift h (S (plus i (minus d (S i)))) x0) x)) H16 (lift h (minus d (S i)) x1) H0) in (ex2_ind T (\lambda (t3: T).(eq T x (lift h (S (plus i (minus d (S i)))) t3))) (\lambda (t3: T).(subst0 i x1 x0 t3)) (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (x3: T).(\lambda (H20: (eq T x (lift h (S (plus i (minus d (S i)))) x3))).(\lambda (H21: (subst0 i x1 x0 x3)).(let H22 \def (eq_ind_r nat (S (plus i (minus d (S i)))) (\lambda (n: nat).(eq T x (lift h n x3))) H20 d (lt_plus_minus i d H14)) in (ex_intro2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)) x3 H22 (pr2_delta e x2 x1 i H17 t1 x0 H12 x3 H21)))))) (subst0_gen_lift_lt x1 x0 x i h (minus d (S i)) H19)))))))) (getl_drop_conf_lt Abbr c d0 u i H9 e h (minus d (S i)) H15))))) (\lambda (H14: (le d i)).(lt_le_e i (plus d h) (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (H15: (lt i (plus d h))).(subst0_gen_lift_false x0 u x h d i H14 H15 H13 (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))))) (\lambda (H15: (le (plus d h) i)).(ex2_ind T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(subst0 (minus i h) u x0 t3)) (ex2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3))) (\lambda (x1: T).(\lambda (H16: (eq T x (lift h d x1))).(\lambda (H17: (subst0 (minus i h) u x0 x1)).(ex_intro2 T (\lambda (t3: T).(eq T x (lift h d t3))) (\lambda (t3: T).(pr2 e t1 t3)) x1 H16 (pr2_delta e d0 u (minus i h) (getl_drop_conf_ge i (CHead d0 (Bind Abbr) u) c H9 e h d H0 H15) t1 x0 H12 x1 H17))))) (subst0_gen_lift_ge u x0 x i h d H13 H15)))))))))) (pr0_gen_lift t1 t2 h d H10))))) t (sym_eq T t x H8))) t0 (sym_eq T t0 (lift h d t1) H7))) c0 (sym_eq C c0 c H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C c) (refl_equal T (lift h d t1)) (refl_equal T x)))))))))). theorem pr2_confluence__pr2_free_free: \forall (c: C).(\forall (t0: T).(\forall (t1: T).(\forall (t2: T).((pr0 t0 t1) \to ((pr0 t0 t2) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)))))))) @@ -2099,12 +2099,12 @@ theorem pr2_confluence__pr2_free_delta: theorem pr2_confluence__pr2_delta_delta: \forall (c: C).(\forall (d: C).(\forall (d0: C).(\forall (t0: T).(\forall (t1: T).(\forall (t2: T).(\forall (t3: T).(\forall (t4: T).(\forall (u: T).(\forall (u0: T).(\forall (i: nat).(\forall (i0: nat).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t1) \to ((getl i0 c (CHead d0 (Bind Abbr) u0)) \to ((pr0 t0 t4) \to ((subst0 i0 u0 t4 t2) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)))))))))))))))))))) \def - \lambda (c: C).(\lambda (d: C).(\lambda (d0: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (u: T).(\lambda (u0: T).(\lambda (i: nat).(\lambda (i0: nat).(\lambda (H: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H0: (pr0 t0 t3)).(\lambda (H1: (subst0 i u t3 t1)).(\lambda (H2: (getl i0 c (CHead d0 (Bind Abbr) u0))).(\lambda (H3: (pr0 t0 t4)).(\lambda (H4: (subst0 i0 u0 t4 t2)).(ex2_ind T (\lambda (t: T).(pr0 t4 t)) (\lambda (t: T).(pr0 t3 t)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x: T).(\lambda (H5: (pr0 t4 x)).(\lambda (H6: (pr0 t3 x)).(or_ind (pr0 t1 x) (ex2 T (\lambda (w2: T).(pr0 t1 w2)) (\lambda (w2: T).(subst0 i u x w2))) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (H7: (pr0 t1 x)).(or_ind (pr0 t2 x) (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x w2))) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (H8: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x (pr2_free c t1 x H7) (pr2_free c t2 x H8))) (\lambda (H8: (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x w2)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x0: T).(\lambda (H9: (pr0 t2 x0)).(\lambda (H10: (subst0 i0 u0 x x0)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x0 (pr2_delta c d0 u0 i0 H2 t1 x H7 x0 H10) (pr2_free c t2 x0 H9))))) H8)) (pr0_subst0 t4 x H5 u0 t2 i0 H4 u0 (pr0_refl u0)))) (\lambda (H7: (ex2 T (\lambda (w2: T).(pr0 t1 w2)) (\lambda (w2: T).(subst0 i u x w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t1 w2)) (\lambda (w2: T).(subst0 i u x w2)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x0: T).(\lambda (H8: (pr0 t1 x0)).(\lambda (H9: (subst0 i u x x0)).(or_ind (pr0 t2 x) (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x w2))) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (H10: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x0 (pr2_free c t1 x0 H8) (pr2_delta c d u i H t2 x H10 x0 H9))) (\lambda (H10: (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x w2)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x1: T).(\lambda (H11: (pr0 t2 x1)).(\lambda (H12: (subst0 i0 u0 x x1)).(neq_eq_e i i0 (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (H13: (not (eq nat i i0))).(ex2_ind T (\lambda (t: T).(subst0 i u x1 t)) (\lambda (t: T).(subst0 i0 u0 x0 t)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x2: T).(\lambda (H14: (subst0 i u x1 x2)).(\lambda (H15: (subst0 i0 u0 x0 x2)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x2 (pr2_delta c d0 u0 i0 H2 t1 x0 H8 x2 H15) (pr2_delta c d u i H t2 x1 H11 x2 H14))))) (subst0_confluence_neq x x1 u0 i0 H12 x0 u i H9 (sym_not_eq nat i i0 H13)))) (\lambda (H13: (eq nat i i0)).(let H14 \def (eq_ind_r nat i0 (\lambda (n: nat).(subst0 n u0 x x1)) H12 i H13) in (let H15 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d0 (Bind Abbr) u0))) H2 i H13) in (let H16 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H (CHead d0 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H (CHead d0 (Bind Abbr) u0) H15)) in (let H17 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead d0 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H (CHead d0 (Bind Abbr) u0) H15)) in ((let H18 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead d0 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H (CHead d0 (Bind Abbr) u0) H15)) in (\lambda (H19: (eq C d d0)).(let H20 \def (eq_ind_r T u0 (\lambda (t: T).(subst0 i t x x1)) H14 u H18) in (let H21 \def (eq_ind_r T u0 (\lambda (t: T).(getl i c (CHead d0 (Bind Abbr) t))) H16 u H18) in (let H22 \def (eq_ind_r C d0 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) u))) H21 d H19) in (or4_ind (eq T x1 x0) (ex2 T (\lambda (t: T).(subst0 i u x1 t)) (\lambda (t: T).(subst0 i u x0 t))) (subst0 i u x1 x0) (subst0 i u x0 x1) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (H23: (eq T x1 x0)).(let H24 \def (eq_ind T x1 (\lambda (t: T).(pr0 t2 t)) H11 x0 H23) in (ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x0 (pr2_free c t1 x0 H8) (pr2_free c t2 x0 H24)))) (\lambda (H23: (ex2 T (\lambda (t: T).(subst0 i u x1 t)) (\lambda (t: T).(subst0 i u x0 t)))).(ex2_ind T (\lambda (t: T).(subst0 i u x1 t)) (\lambda (t: T).(subst0 i u x0 t)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x2: T).(\lambda (H24: (subst0 i u x1 x2)).(\lambda (H25: (subst0 i u x0 x2)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x2 (pr2_delta c d u i H22 t1 x0 H8 x2 H25) (pr2_delta c d u i H22 t2 x1 H11 x2 H24))))) H23)) (\lambda (H23: (subst0 i u x1 x0)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x0 (pr2_free c t1 x0 H8) (pr2_delta c d u i H22 t2 x1 H11 x0 H23))) (\lambda (H23: (subst0 i u x0 x1)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x1 (pr2_delta c d u i H22 t1 x0 H8 x1 H23) (pr2_free c t2 x1 H11))) (subst0_confluence_eq x x1 u i H20 x0 H9))))))) H17)))))))))) H10)) (pr0_subst0 t4 x H5 u0 t2 i0 H4 u0 (pr0_refl u0)))))) H7)) (pr0_subst0 t3 x H6 u t1 i H1 u (pr0_refl u)))))) (pr0_confluence t0 t4 H3 t3 H0))))))))))))))))))). + \lambda (c: C).(\lambda (d: C).(\lambda (d0: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (t4: T).(\lambda (u: T).(\lambda (u0: T).(\lambda (i: nat).(\lambda (i0: nat).(\lambda (H: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H0: (pr0 t0 t3)).(\lambda (H1: (subst0 i u t3 t1)).(\lambda (H2: (getl i0 c (CHead d0 (Bind Abbr) u0))).(\lambda (H3: (pr0 t0 t4)).(\lambda (H4: (subst0 i0 u0 t4 t2)).(ex2_ind T (\lambda (t: T).(pr0 t4 t)) (\lambda (t: T).(pr0 t3 t)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x: T).(\lambda (H5: (pr0 t4 x)).(\lambda (H6: (pr0 t3 x)).(or_ind (pr0 t1 x) (ex2 T (\lambda (w2: T).(pr0 t1 w2)) (\lambda (w2: T).(subst0 i u x w2))) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (H7: (pr0 t1 x)).(or_ind (pr0 t2 x) (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x w2))) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (H8: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x (pr2_free c t1 x H7) (pr2_free c t2 x H8))) (\lambda (H8: (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x w2)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x0: T).(\lambda (H9: (pr0 t2 x0)).(\lambda (H10: (subst0 i0 u0 x x0)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x0 (pr2_delta c d0 u0 i0 H2 t1 x H7 x0 H10) (pr2_free c t2 x0 H9))))) H8)) (pr0_subst0 t4 x H5 u0 t2 i0 H4 u0 (pr0_refl u0)))) (\lambda (H7: (ex2 T (\lambda (w2: T).(pr0 t1 w2)) (\lambda (w2: T).(subst0 i u x w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t1 w2)) (\lambda (w2: T).(subst0 i u x w2)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x0: T).(\lambda (H8: (pr0 t1 x0)).(\lambda (H9: (subst0 i u x x0)).(or_ind (pr0 t2 x) (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x w2))) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (H10: (pr0 t2 x)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x0 (pr2_free c t1 x0 H8) (pr2_delta c d u i H t2 x H10 x0 H9))) (\lambda (H10: (ex2 T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t2 w2)) (\lambda (w2: T).(subst0 i0 u0 x w2)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x1: T).(\lambda (H11: (pr0 t2 x1)).(\lambda (H12: (subst0 i0 u0 x x1)).(neq_eq_e i i0 (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (H13: (not (eq nat i i0))).(ex2_ind T (\lambda (t: T).(subst0 i u x1 t)) (\lambda (t: T).(subst0 i0 u0 x0 t)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x2: T).(\lambda (H14: (subst0 i u x1 x2)).(\lambda (H15: (subst0 i0 u0 x0 x2)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x2 (pr2_delta c d0 u0 i0 H2 t1 x0 H8 x2 H15) (pr2_delta c d u i H t2 x1 H11 x2 H14))))) (subst0_confluence_neq x x1 u0 i0 H12 x0 u i H9 (sym_not_eq nat i i0 H13)))) (\lambda (H13: (eq nat i i0)).(let H14 \def (eq_ind_r nat i0 (\lambda (n: nat).(subst0 n u0 x x1)) H12 i H13) in (let H15 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d0 (Bind Abbr) u0))) H2 i H13) in (let H16 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl i c c0)) H (CHead d0 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H (CHead d0 (Bind Abbr) u0) H15)) in (let H17 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead d0 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H (CHead d0 (Bind Abbr) u0) H15)) in ((let H18 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead d0 (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) i H (CHead d0 (Bind Abbr) u0) H15)) in (\lambda (H19: (eq C d d0)).(let H20 \def (eq_ind_r T u0 (\lambda (t: T).(subst0 i t x x1)) H14 u H18) in (let H21 \def (eq_ind_r T u0 (\lambda (t: T).(getl i c (CHead d0 (Bind Abbr) t))) H16 u H18) in (let H22 \def (eq_ind_r C d0 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) u))) H21 d H19) in (or4_ind (eq T x1 x0) (ex2 T (\lambda (t: T).(subst0 i u x1 t)) (\lambda (t: T).(subst0 i u x0 t))) (subst0 i u x1 x0) (subst0 i u x0 x1) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (H23: (eq T x1 x0)).(let H24 \def (eq_ind T x1 (\lambda (t: T).(pr0 t2 t)) H11 x0 H23) in (ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x0 (pr2_free c t1 x0 H8) (pr2_free c t2 x0 H24)))) (\lambda (H23: (ex2 T (\lambda (t: T).(subst0 i u x1 t)) (\lambda (t: T).(subst0 i u x0 t)))).(ex2_ind T (\lambda (t: T).(subst0 i u x1 t)) (\lambda (t: T).(subst0 i u x0 t)) (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))) (\lambda (x2: T).(\lambda (H24: (subst0 i u x1 x2)).(\lambda (H25: (subst0 i u x0 x2)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x2 (pr2_delta c d u i H22 t1 x0 H8 x2 H25) (pr2_delta c d u i H22 t2 x1 H11 x2 H24))))) H23)) (\lambda (H23: (subst0 i u x1 x0)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x0 (pr2_free c t1 x0 H8) (pr2_delta c d u i H22 t2 x1 H11 x0 H23))) (\lambda (H23: (subst0 i u x0 x1)).(ex_intro2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)) x1 (pr2_delta c d u i H22 t1 x0 H8 x1 H23) (pr2_free c t2 x1 H11))) (subst0_confluence_eq x x1 u i H20 x0 H9))))))) H17)))))))))) H10)) (pr0_subst0 t4 x H5 u0 t2 i0 H4 u0 (pr0_refl u0)))))) H7)) (pr0_subst0 t3 x H6 u t1 i H1 u (pr0_refl u)))))) (pr0_confluence t0 t4 H3 t3 H0))))))))))))))))))). theorem pr2_confluence: \forall (c: C).(\forall (t0: T).(\forall (t1: T).((pr2 c t0 t1) \to (\forall (t2: T).((pr2 c t0 t2) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t)))))))) \def - \lambda (c: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr2 c t0 t1)).(\lambda (t2: T).(\lambda (H0: (pr2 c t0 t2)).(let H1 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t3: T).((eq C c0 c) \to ((eq T t t0) \to ((eq T t3 t1) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0)))))))))) with [(pr2_free c0 t3 t4 H1) \Rightarrow (\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq T t3 t0)).(\lambda (H4: (eq T t4 t1)).(eq_ind C c (\lambda (_: C).((eq T t3 t0) \to ((eq T t4 t1) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))))))) (\lambda (H5: (eq T t3 t0)).(eq_ind T t0 (\lambda (t: T).((eq T t4 t1) \to ((pr0 t t4) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0)))))) (\lambda (H6: (eq T t4 t1)).(eq_ind T t1 (\lambda (t: T).((pr0 t0 t) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))) (\lambda (H7: (pr0 t0 t1)).(let H8 \def (match H0 return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t3: T).((eq C c0 c) \to ((eq T t t0) \to ((eq T t3 t2) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0)))))))))) with [(pr2_free c1 t5 t6 H5) \Rightarrow (\lambda (H6: (eq C c1 c)).(\lambda (H8: (eq T t5 t0)).(\lambda (H9: (eq T t6 t2)).(eq_ind C c (\lambda (_: C).((eq T t5 t0) \to ((eq T t6 t2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))))))) (\lambda (H10: (eq T t5 t0)).(eq_ind T t0 (\lambda (t: T).((eq T t6 t2) \to ((pr0 t t6) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0)))))) (\lambda (H11: (eq T t6 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t0 t) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))) (\lambda (H12: (pr0 t0 t2)).(pr2_confluence__pr2_free_free c t0 t1 t2 H7 H12)) t6 (sym_eq T t6 t2 H11))) t5 (sym_eq T t5 t0 H10))) c1 (sym_eq C c1 c H6) H8 H9 H5)))) | (pr2_delta c1 d u i H5 t5 t6 H6 t H7) \Rightarrow (\lambda (H8: (eq C c1 c)).(\lambda (H9: (eq T t5 t0)).(\lambda (H10: (eq T t t2)).(eq_ind C c (\lambda (c0: C).((eq T t5 t0) \to ((eq T t t2) \to ((getl i c0 (CHead d (Bind Abbr) u)) \to ((pr0 t5 t6) \to ((subst0 i u t6 t) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))))))) (\lambda (H11: (eq T t5 t0)).(eq_ind T t0 (\lambda (t0: T).((eq T t t2) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t6) \to ((subst0 i u t6 t) \to (ex2 T (\lambda (t2: T).(pr2 c t1 t2)) (\lambda (t1: T).(pr2 c t2 t1)))))))) (\lambda (H12: (eq T t t2)).(eq_ind T t2 (\lambda (t3: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t6) \to ((subst0 i u t6 t3) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))))) (\lambda (H13: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H14: (pr0 t0 t6)).(\lambda (H15: (subst0 i u t6 t2)).(pr2_confluence__pr2_free_delta c d t0 t1 t2 t6 u i H7 H13 H14 H15)))) t (sym_eq T t t2 H12))) t5 (sym_eq T t5 t0 H11))) c1 (sym_eq C c1 c H8) H9 H10 H5 H6 H7))))]) in (H8 (refl_equal C c) (refl_equal T t0) (refl_equal T t2)))) t4 (sym_eq T t4 t1 H6))) t3 (sym_eq T t3 t0 H5))) c0 (sym_eq C c0 c H2) H3 H4 H1)))) | (pr2_delta c0 d u i H1 t3 t4 H2 t H3) \Rightarrow (\lambda (H4: (eq C c0 c)).(\lambda (H5: (eq T t3 t0)).(\lambda (H6: (eq T t t1)).(eq_ind C c (\lambda (c1: C).((eq T t3 t0) \to ((eq T t t1) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t3 t4) \to ((subst0 i u t4 t) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))))))) (\lambda (H7: (eq T t3 t0)).(eq_ind T t0 (\lambda (t0: T).((eq T t t1) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t4) \to ((subst0 i u t4 t) \to (ex2 T (\lambda (t2: T).(pr2 c t1 t2)) (\lambda (t1: T).(pr2 c t2 t1)))))))) (\lambda (H8: (eq T t t1)).(eq_ind T t1 (\lambda (t5: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t4) \to ((subst0 i u t4 t5) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))))) (\lambda (H9: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H10: (pr0 t0 t4)).(\lambda (H11: (subst0 i u t4 t1)).(let H12 \def (match H0 return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t3: T).((eq C c0 c) \to ((eq T t t0) \to ((eq T t3 t2) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0)))))))))) with [(pr2_free c1 t5 t6 H7) \Rightarrow (\lambda (H8: (eq C c1 c)).(\lambda (H12: (eq T t5 t0)).(\lambda (H13: (eq T t6 t2)).(eq_ind C c (\lambda (_: C).((eq T t5 t0) \to ((eq T t6 t2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))))))) (\lambda (H14: (eq T t5 t0)).(eq_ind T t0 (\lambda (t: T).((eq T t6 t2) \to ((pr0 t t6) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0)))))) (\lambda (H15: (eq T t6 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t0 t) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))) (\lambda (H16: (pr0 t0 t2)).(ex2_sym T (pr2 c t2) (pr2 c t1) (pr2_confluence__pr2_free_delta c d t0 t2 t1 t4 u i H16 H9 H10 H11))) t6 (sym_eq T t6 t2 H15))) t5 (sym_eq T t5 t0 H14))) c1 (sym_eq C c1 c H8) H12 H13 H7)))) | (pr2_delta c1 d0 u0 i0 H7 t5 t6 H8 t7 H9) \Rightarrow (\lambda (H12: (eq C c1 c)).(\lambda (H13: (eq T t5 t0)).(\lambda (H14: (eq T t7 t2)).(eq_ind C c (\lambda (c0: C).((eq T t5 t0) \to ((eq T t7 t2) \to ((getl i0 c0 (CHead d0 (Bind Abbr) u0)) \to ((pr0 t5 t6) \to ((subst0 i0 u0 t6 t7) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))))))))) (\lambda (H15: (eq T t5 t0)).(eq_ind T t0 (\lambda (t: T).((eq T t7 t2) \to ((getl i0 c (CHead d0 (Bind Abbr) u0)) \to ((pr0 t t6) \to ((subst0 i0 u0 t6 t7) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0)))))))) (\lambda (H16: (eq T t7 t2)).(eq_ind T t2 (\lambda (t: T).((getl i0 c (CHead d0 (Bind Abbr) u0)) \to ((pr0 t0 t6) \to ((subst0 i0 u0 t6 t) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))))) (\lambda (H17: (getl i0 c (CHead d0 (Bind Abbr) u0))).(\lambda (H18: (pr0 t0 t6)).(\lambda (H19: (subst0 i0 u0 t6 t2)).(pr2_confluence__pr2_delta_delta c d d0 t0 t1 t2 t4 t6 u u0 i i0 H9 H10 H11 H17 H18 H19)))) t7 (sym_eq T t7 t2 H16))) t5 (sym_eq T t5 t0 H15))) c1 (sym_eq C c1 c H12) H13 H14 H7 H8 H9))))]) in (H12 (refl_equal C c) (refl_equal T t0) (refl_equal T t2)))))) t (sym_eq T t t1 H8))) t3 (sym_eq T t3 t0 H7))) c0 (sym_eq C c0 c H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C c) (refl_equal T t0) (refl_equal T t1)))))))). + \lambda (c: C).(\lambda (t0: T).(\lambda (t1: T).(\lambda (H: (pr2 c t0 t1)).(\lambda (t2: T).(\lambda (H0: (pr2 c t0 t2)).(let H1 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t3: T).(\lambda (_: (pr2 c0 t t3)).((eq C c0 c) \to ((eq T t t0) \to ((eq T t3 t1) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0)))))))))) with [(pr2_free c0 t3 t4 H1) \Rightarrow (\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq T t3 t0)).(\lambda (H4: (eq T t4 t1)).(eq_ind C c (\lambda (_: C).((eq T t3 t0) \to ((eq T t4 t1) \to ((pr0 t3 t4) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))))))) (\lambda (H5: (eq T t3 t0)).(eq_ind T t0 (\lambda (t: T).((eq T t4 t1) \to ((pr0 t t4) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0)))))) (\lambda (H6: (eq T t4 t1)).(eq_ind T t1 (\lambda (t: T).((pr0 t0 t) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))) (\lambda (H7: (pr0 t0 t1)).(let H8 \def (match H0 return (\lambda (c0: C).(\lambda (t: T).(\lambda (t3: T).(\lambda (_: (pr2 c0 t t3)).((eq C c0 c) \to ((eq T t t0) \to ((eq T t3 t2) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0)))))))))) with [(pr2_free c1 t5 t6 H5) \Rightarrow (\lambda (H6: (eq C c1 c)).(\lambda (H8: (eq T t5 t0)).(\lambda (H9: (eq T t6 t2)).(eq_ind C c (\lambda (_: C).((eq T t5 t0) \to ((eq T t6 t2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))))))) (\lambda (H10: (eq T t5 t0)).(eq_ind T t0 (\lambda (t: T).((eq T t6 t2) \to ((pr0 t t6) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0)))))) (\lambda (H11: (eq T t6 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t0 t) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))) (\lambda (H12: (pr0 t0 t2)).(pr2_confluence__pr2_free_free c t0 t1 t2 H7 H12)) t6 (sym_eq T t6 t2 H11))) t5 (sym_eq T t5 t0 H10))) c1 (sym_eq C c1 c H6) H8 H9 H5)))) | (pr2_delta c1 d u i H5 t5 t6 H6 t H7) \Rightarrow (\lambda (H8: (eq C c1 c)).(\lambda (H9: (eq T t5 t0)).(\lambda (H10: (eq T t t2)).(eq_ind C c (\lambda (c0: C).((eq T t5 t0) \to ((eq T t t2) \to ((getl i c0 (CHead d (Bind Abbr) u)) \to ((pr0 t5 t6) \to ((subst0 i u t6 t) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))))))) (\lambda (H11: (eq T t5 t0)).(eq_ind T t0 (\lambda (t0: T).((eq T t t2) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t6) \to ((subst0 i u t6 t) \to (ex2 T (\lambda (t2: T).(pr2 c t1 t2)) (\lambda (t1: T).(pr2 c t2 t1)))))))) (\lambda (H12: (eq T t t2)).(eq_ind T t2 (\lambda (t3: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t6) \to ((subst0 i u t6 t3) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))))) (\lambda (H13: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H14: (pr0 t0 t6)).(\lambda (H15: (subst0 i u t6 t2)).(pr2_confluence__pr2_free_delta c d t0 t1 t2 t6 u i H7 H13 H14 H15)))) t (sym_eq T t t2 H12))) t5 (sym_eq T t5 t0 H11))) c1 (sym_eq C c1 c H8) H9 H10 H5 H6 H7))))]) in (H8 (refl_equal C c) (refl_equal T t0) (refl_equal T t2)))) t4 (sym_eq T t4 t1 H6))) t3 (sym_eq T t3 t0 H5))) c0 (sym_eq C c0 c H2) H3 H4 H1)))) | (pr2_delta c0 d u i H1 t3 t4 H2 t H3) \Rightarrow (\lambda (H4: (eq C c0 c)).(\lambda (H5: (eq T t3 t0)).(\lambda (H6: (eq T t t1)).(eq_ind C c (\lambda (c1: C).((eq T t3 t0) \to ((eq T t t1) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t3 t4) \to ((subst0 i u t4 t) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))))))) (\lambda (H7: (eq T t3 t0)).(eq_ind T t0 (\lambda (t0: T).((eq T t t1) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t4) \to ((subst0 i u t4 t) \to (ex2 T (\lambda (t2: T).(pr2 c t1 t2)) (\lambda (t1: T).(pr2 c t2 t1)))))))) (\lambda (H8: (eq T t t1)).(eq_ind T t1 (\lambda (t5: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t4) \to ((subst0 i u t4 t5) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))))) (\lambda (H9: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H10: (pr0 t0 t4)).(\lambda (H11: (subst0 i u t4 t1)).(let H12 \def (match H0 return (\lambda (c0: C).(\lambda (t: T).(\lambda (t3: T).(\lambda (_: (pr2 c0 t t3)).((eq C c0 c) \to ((eq T t t0) \to ((eq T t3 t2) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0)))))))))) with [(pr2_free c1 t5 t6 H7) \Rightarrow (\lambda (H8: (eq C c1 c)).(\lambda (H12: (eq T t5 t0)).(\lambda (H13: (eq T t6 t2)).(eq_ind C c (\lambda (_: C).((eq T t5 t0) \to ((eq T t6 t2) \to ((pr0 t5 t6) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))))))) (\lambda (H14: (eq T t5 t0)).(eq_ind T t0 (\lambda (t: T).((eq T t6 t2) \to ((pr0 t t6) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0)))))) (\lambda (H15: (eq T t6 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t0 t) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))) (\lambda (H16: (pr0 t0 t2)).(ex2_sym T (pr2 c t2) (pr2 c t1) (pr2_confluence__pr2_free_delta c d t0 t2 t1 t4 u i H16 H9 H10 H11))) t6 (sym_eq T t6 t2 H15))) t5 (sym_eq T t5 t0 H14))) c1 (sym_eq C c1 c H8) H12 H13 H7)))) | (pr2_delta c1 d0 u0 i0 H7 t5 t6 H8 t7 H9) \Rightarrow (\lambda (H12: (eq C c1 c)).(\lambda (H13: (eq T t5 t0)).(\lambda (H14: (eq T t7 t2)).(eq_ind C c (\lambda (c0: C).((eq T t5 t0) \to ((eq T t7 t2) \to ((getl i0 c0 (CHead d0 (Bind Abbr) u0)) \to ((pr0 t5 t6) \to ((subst0 i0 u0 t6 t7) \to (ex2 T (\lambda (t: T).(pr2 c t1 t)) (\lambda (t: T).(pr2 c t2 t))))))))) (\lambda (H15: (eq T t5 t0)).(eq_ind T t0 (\lambda (t: T).((eq T t7 t2) \to ((getl i0 c (CHead d0 (Bind Abbr) u0)) \to ((pr0 t t6) \to ((subst0 i0 u0 t6 t7) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0)))))))) (\lambda (H16: (eq T t7 t2)).(eq_ind T t2 (\lambda (t: T).((getl i0 c (CHead d0 (Bind Abbr) u0)) \to ((pr0 t0 t6) \to ((subst0 i0 u0 t6 t) \to (ex2 T (\lambda (t0: T).(pr2 c t1 t0)) (\lambda (t0: T).(pr2 c t2 t0))))))) (\lambda (H17: (getl i0 c (CHead d0 (Bind Abbr) u0))).(\lambda (H18: (pr0 t0 t6)).(\lambda (H19: (subst0 i0 u0 t6 t2)).(pr2_confluence__pr2_delta_delta c d d0 t0 t1 t2 t4 t6 u u0 i i0 H9 H10 H11 H17 H18 H19)))) t7 (sym_eq T t7 t2 H16))) t5 (sym_eq T t5 t0 H15))) c1 (sym_eq C c1 c H12) H13 H14 H7 H8 H9))))]) in (H12 (refl_equal C c) (refl_equal T t0) (refl_equal T t2)))))) t (sym_eq T t t1 H8))) t3 (sym_eq T t3 t0 H7))) c0 (sym_eq C c0 c H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C c) (refl_equal T t0) (refl_equal T t1)))))))). theorem pr2_delta1: \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d (Bind Abbr) u)) \to (\forall (t1: T).(\forall (t2: T).((pr0 t1 t2) \to (\forall (t: T).((subst1 i u t2 t) \to (pr2 c t1 t)))))))))) @@ -2114,12 +2114,12 @@ theorem pr2_delta1: theorem pr2_subst1: \forall (c: C).(\forall (e: C).(\forall (v: T).(\forall (i: nat).((getl i c (CHead e (Bind Abbr) v)) \to (\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)))))))))))) \def - \lambda (c: C).(\lambda (e: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H: (getl i c (CHead e (Bind Abbr) v))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr2 c t1 t2)).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 c) \to ((eq T t t1) \to ((eq T t0 t2) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)))))))))))) with [(pr2_free c0 t0 t3 H1) \Rightarrow (\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq T t0 t1)).(\lambda (H4: (eq T t3 t2)).(eq_ind C c (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))))))))) (\lambda (H5: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)))))))) (\lambda (H6: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))))))) (\lambda (H7: (pr0 t1 t2)).(\lambda (w1: T).(\lambda (H0: (subst1 i v t1 w1)).(ex2_ind T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)) (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))) (\lambda (x: T).(\lambda (H8: (pr0 w1 x)).(\lambda (H9: (subst1 i v t2 x)).(ex_intro2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)) x (pr2_free c w1 x H8) H9)))) (pr0_subst1 t1 t2 H7 v w1 i H0 v (pr0_refl v)))))) t3 (sym_eq T t3 t2 H6))) t0 (sym_eq T t0 t1 H5))) c0 (sym_eq C c0 c H2) H3 H4 H1)))) | (pr2_delta c0 d u i0 H1 t0 t3 H2 t H3) \Rightarrow (\lambda (H4: (eq C c0 c)).(\lambda (H5: (eq T t0 t1)).(\lambda (H6: (eq T t t2)).(eq_ind C c (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i0 c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i0 u t3 t) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))))))))))) (\lambda (H7: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i0 c (CHead d (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i0 u t3 t) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)))))))))) (\lambda (H8: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i0 c (CHead d (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i0 u t3 t4) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))))))))) (\lambda (H9: (getl i0 c (CHead d (Bind Abbr) u))).(\lambda (H10: (pr0 t1 t3)).(\lambda (H11: (subst0 i0 u t3 t2)).(\lambda (w1: T).(\lambda (H0: (subst1 i v t1 w1)).(ex2_ind T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst1 i v t3 w2)) (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))) (\lambda (x: T).(\lambda (H12: (pr0 w1 x)).(\lambda (H13: (subst1 i v t3 x)).(neq_eq_e i i0 (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))) (\lambda (H14: (not (eq nat i i0))).(ex2_ind T (\lambda (t1: T).(subst1 i v t2 t1)) (\lambda (t1: T).(subst1 i0 u x t1)) (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))) (\lambda (x0: T).(\lambda (H15: (subst1 i v t2 x0)).(\lambda (H16: (subst1 i0 u x x0)).(ex_intro2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)) x0 (pr2_delta1 c d u i0 H9 w1 x H12 x0 H16) H15)))) (subst1_confluence_neq t3 t2 u i0 (subst1_single i0 u t3 t2 H11) x v i H13 (sym_not_eq nat i i0 H14)))) (\lambda (H14: (eq nat i i0)).(let H15 \def (eq_ind_r nat i0 (\lambda (n: nat).(subst0 n u t3 t2)) H11 i H14) in (let H16 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d (Bind Abbr) u))) H9 i H14) in (let H17 \def (eq_ind C (CHead e (Bind Abbr) v) (\lambda (c0: C).(getl i c c0)) H (CHead d (Bind Abbr) u) (getl_mono c (CHead e (Bind Abbr) v) i H (CHead d (Bind Abbr) u) H16)) in (let H18 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow c])) (CHead e (Bind Abbr) v) (CHead d (Bind Abbr) u) (getl_mono c (CHead e (Bind Abbr) v) i H (CHead d (Bind Abbr) u) H16)) in ((let H19 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead e (Bind Abbr) v) (CHead d (Bind Abbr) u) (getl_mono c (CHead e (Bind Abbr) v) i H (CHead d (Bind Abbr) u) H16)) in (\lambda (H20: (eq C e d)).(let H21 \def (eq_ind_r T u (\lambda (t: T).(getl i c (CHead d (Bind Abbr) t))) H17 v H19) in (let H22 \def (eq_ind_r T u (\lambda (t: T).(subst0 i t t3 t2)) H15 v H19) in (let H23 \def (eq_ind_r C d (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) v))) H21 e H20) in (ex2_ind T (\lambda (t1: T).(subst1 i v t2 t1)) (\lambda (t1: T).(subst1 i v x t1)) (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))) (\lambda (x0: T).(\lambda (H24: (subst1 i v t2 x0)).(\lambda (H25: (subst1 i v x x0)).(ex_intro2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)) x0 (pr2_delta1 c e v i H23 w1 x H12 x0 H25) H24)))) (subst1_confluence_eq t3 t2 v i (subst1_single i v t3 t2 H22) x H13))))))) H18)))))))))) (pr0_subst1 t1 t3 H10 v w1 i H0 v (pr0_refl v)))))))) t (sym_eq T t t2 H8))) t0 (sym_eq T t0 t1 H7))) c0 (sym_eq C c0 c H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C c) (refl_equal T t1) (refl_equal T t2)))))))))). + \lambda (c: C).(\lambda (e: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H: (getl i c (CHead e (Bind Abbr) v))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr2 c t1 t2)).(let H1 \def (match H0 return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 c) \to ((eq T t t1) \to ((eq T t0 t2) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)))))))))))) with [(pr2_free c0 t0 t3 H1) \Rightarrow (\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq T t0 t1)).(\lambda (H4: (eq T t3 t2)).(eq_ind C c (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))))))))) (\lambda (H5: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)))))))) (\lambda (H6: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))))))) (\lambda (H7: (pr0 t1 t2)).(\lambda (w1: T).(\lambda (H0: (subst1 i v t1 w1)).(ex2_ind T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)) (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))) (\lambda (x: T).(\lambda (H8: (pr0 w1 x)).(\lambda (H9: (subst1 i v t2 x)).(ex_intro2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)) x (pr2_free c w1 x H8) H9)))) (pr0_subst1 t1 t2 H7 v w1 i H0 v (pr0_refl v)))))) t3 (sym_eq T t3 t2 H6))) t0 (sym_eq T t0 t1 H5))) c0 (sym_eq C c0 c H2) H3 H4 H1)))) | (pr2_delta c0 d u i0 H1 t0 t3 H2 t H3) \Rightarrow (\lambda (H4: (eq C c0 c)).(\lambda (H5: (eq T t0 t1)).(\lambda (H6: (eq T t t2)).(eq_ind C c (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i0 c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i0 u t3 t) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))))))))))) (\lambda (H7: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i0 c (CHead d (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i0 u t3 t) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)))))))))) (\lambda (H8: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i0 c (CHead d (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i0 u t3 t4) \to (\forall (w1: T).((subst1 i v t1 w1) \to (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))))))))) (\lambda (H9: (getl i0 c (CHead d (Bind Abbr) u))).(\lambda (H10: (pr0 t1 t3)).(\lambda (H11: (subst0 i0 u t3 t2)).(\lambda (w1: T).(\lambda (H0: (subst1 i v t1 w1)).(ex2_ind T (\lambda (w2: T).(pr0 w1 w2)) (\lambda (w2: T).(subst1 i v t3 w2)) (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))) (\lambda (x: T).(\lambda (H12: (pr0 w1 x)).(\lambda (H13: (subst1 i v t3 x)).(neq_eq_e i i0 (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))) (\lambda (H14: (not (eq nat i i0))).(ex2_ind T (\lambda (t1: T).(subst1 i v t2 t1)) (\lambda (t1: T).(subst1 i0 u x t1)) (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))) (\lambda (x0: T).(\lambda (H15: (subst1 i v t2 x0)).(\lambda (H16: (subst1 i0 u x x0)).(ex_intro2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)) x0 (pr2_delta1 c d u i0 H9 w1 x H12 x0 H16) H15)))) (subst1_confluence_neq t3 t2 u i0 (subst1_single i0 u t3 t2 H11) x v i H13 (sym_not_eq nat i i0 H14)))) (\lambda (H14: (eq nat i i0)).(let H15 \def (eq_ind_r nat i0 (\lambda (n: nat).(subst0 n u t3 t2)) H11 i H14) in (let H16 \def (eq_ind_r nat i0 (\lambda (n: nat).(getl n c (CHead d (Bind Abbr) u))) H9 i H14) in (let H17 \def (eq_ind C (CHead e (Bind Abbr) v) (\lambda (c0: C).(getl i c c0)) H (CHead d (Bind Abbr) u) (getl_mono c (CHead e (Bind Abbr) v) i H (CHead d (Bind Abbr) u) H16)) in (let H18 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow c])) (CHead e (Bind Abbr) v) (CHead d (Bind Abbr) u) (getl_mono c (CHead e (Bind Abbr) v) i H (CHead d (Bind Abbr) u) H16)) in ((let H19 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead e (Bind Abbr) v) (CHead d (Bind Abbr) u) (getl_mono c (CHead e (Bind Abbr) v) i H (CHead d (Bind Abbr) u) H16)) in (\lambda (H20: (eq C e d)).(let H21 \def (eq_ind_r T u (\lambda (t: T).(getl i c (CHead d (Bind Abbr) t))) H17 v H19) in (let H22 \def (eq_ind_r T u (\lambda (t: T).(subst0 i t t3 t2)) H15 v H19) in (let H23 \def (eq_ind_r C d (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) v))) H21 e H20) in (ex2_ind T (\lambda (t1: T).(subst1 i v t2 t1)) (\lambda (t1: T).(subst1 i v x t1)) (ex2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2))) (\lambda (x0: T).(\lambda (H24: (subst1 i v t2 x0)).(\lambda (H25: (subst1 i v x x0)).(ex_intro2 T (\lambda (w2: T).(pr2 c w1 w2)) (\lambda (w2: T).(subst1 i v t2 w2)) x0 (pr2_delta1 c e v i H23 w1 x H12 x0 H25) H24)))) (subst1_confluence_eq t3 t2 v i (subst1_single i v t3 t2 H22) x H13))))))) H18)))))))))) (pr0_subst1 t1 t3 H10 v w1 i H0 v (pr0_refl v)))))))) t (sym_eq T t t2 H8))) t0 (sym_eq T t0 t1 H7))) c0 (sym_eq C c0 c H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C c) (refl_equal T t1) (refl_equal T t2)))))))))). theorem pr2_gen_cabbr: \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr2 c t1 t2) \to (\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c (CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (\forall (x1: T).((subst1 d u t1 (lift (S O) d x1)) \to (ex2 T (\lambda (x2: T).(subst1 d u t2 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a x1 x2)))))))))))))))) \def - \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (\forall (x1: T).((subst1 d u t (lift (S O) d x1)) \to (ex2 T (\lambda (x2: T).(subst1 d u t0 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a x1 x2)))))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda (_: (getl d c0 (CHead e (Bind Abbr) u))).(\lambda (a0: C).(\lambda (_: (csubst1 d u c0 a0)).(\lambda (a: C).(\lambda (_: (drop (S O) d a0 a)).(\lambda (x1: T).(\lambda (H4: (subst1 d u t3 (lift (S O) d x1))).(ex2_ind T (\lambda (w2: T).(pr0 (lift (S O) d x1) w2)) (\lambda (w2: T).(subst1 d u t4 w2)) (ex2 T (\lambda (x2: T).(subst1 d u t4 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x: T).(\lambda (H5: (pr0 (lift (S O) d x1) x)).(\lambda (H6: (subst1 d u t4 x)).(ex2_ind T (\lambda (t5: T).(eq T x (lift (S O) d t5))) (\lambda (t5: T).(pr0 x1 t5)) (ex2 T (\lambda (x2: T).(subst1 d u t4 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x0: T).(\lambda (H7: (eq T x (lift (S O) d x0))).(\lambda (H8: (pr0 x1 x0)).(let H9 \def (eq_ind T x (\lambda (t: T).(subst1 d u t4 t)) H6 (lift (S O) d x0) H7) in (ex_intro2 T (\lambda (x2: T).(subst1 d u t4 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a x1 x2)) x0 H9 (pr2_free a x1 x0 H8)))))) (pr0_gen_lift x1 x (S O) d H5))))) (pr0_subst1 t3 t4 H0 u (lift (S O) d x1) d H4 u (pr0_refl u))))))))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (e: C).(\lambda (u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H4: (csubst1 d0 u0 c0 a0)).(\lambda (a: C).(\lambda (H5: (drop (S O) d0 a0 a)).(\lambda (x1: T).(\lambda (H6: (subst1 d0 u0 t3 (lift (S O) d0 x1))).(ex2_ind T (\lambda (w2: T).(pr0 (lift (S O) d0 x1) w2)) (\lambda (w2: T).(subst1 d0 u0 t4 w2)) (ex2 T (\lambda (x2: T).(subst1 d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x: T).(\lambda (H7: (pr0 (lift (S O) d0 x1) x)).(\lambda (H8: (subst1 d0 u0 t4 x)).(ex2_ind T (\lambda (t5: T).(eq T x (lift (S O) d0 t5))) (\lambda (t5: T).(pr0 x1 t5)) (ex2 T (\lambda (x2: T).(subst1 d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x0: T).(\lambda (H9: (eq T x (lift (S O) d0 x0))).(\lambda (H10: (pr0 x1 x0)).(let H11 \def (eq_ind T x (\lambda (t: T).(subst1 d0 u0 t4 t)) H8 (lift (S O) d0 x0) H9) in (lt_eq_gt_e i d0 (ex2 T (\lambda (x2: T).(subst1 d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (H12: (lt i d0)).(ex2_ind T (\lambda (t0: T).(subst1 d0 u0 t t0)) (\lambda (t0: T).(subst1 i u (lift (S O) d0 x0) t0)) (ex2 T (\lambda (x2: T).(subst1 d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x2: T).(\lambda (H13: (subst1 d0 u0 t x2)).(\lambda (H14: (subst1 i u (lift (S O) d0 x0) x2)).(ex2_ind C (\lambda (e2: C).(csubst1 (minus d0 i) u0 (CHead d (Bind Abbr) u) e2)) (\lambda (e2: C).(getl i a0 e2)) (ex2 T (\lambda (x3: T).(subst1 d0 u0 t (lift (S O) d0 x3))) (\lambda (x3: T).(pr2 a x1 x3))) (\lambda (x3: C).(\lambda (H15: (csubst1 (minus d0 i) u0 (CHead d (Bind Abbr) u) x3)).(\lambda (H16: (getl i a0 x3)).(let H17 \def (eq_ind nat (minus d0 i) (\lambda (n: nat).(csubst1 n u0 (CHead d (Bind Abbr) u) x3)) H15 (S (minus d0 (S i))) (minus_x_Sy d0 i H12)) in (let H18 \def (csubst1_gen_head (Bind Abbr) d x3 u u0 (minus d0 (S i)) H17) in (ex3_2_ind T C (\lambda (u2: T).(\lambda (c2: C).(eq C x3 (CHead c2 (Bind Abbr) u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 (minus d0 (S i)) u0 u u2))) (\lambda (_: T).(\lambda (c2: C).(csubst1 (minus d0 (S i)) u0 d c2))) (ex2 T (\lambda (x4: T).(subst1 d0 u0 t (lift (S O) d0 x4))) (\lambda (x4: T).(pr2 a x1 x4))) (\lambda (x4: T).(\lambda (x5: C).(\lambda (H19: (eq C x3 (CHead x5 (Bind Abbr) x4))).(\lambda (H20: (subst1 (minus d0 (S i)) u0 u x4)).(\lambda (_: (csubst1 (minus d0 (S i)) u0 d x5)).(let H22 \def (eq_ind C x3 (\lambda (c: C).(getl i a0 c)) H16 (CHead x5 (Bind Abbr) x4) H19) in (let H23 \def (eq_ind nat d0 (\lambda (n: nat).(drop (S O) n a0 a)) H5 (S (plus i (minus d0 (S i)))) (lt_plus_minus i d0 H12)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T x4 (lift (S O) (minus d0 (S i)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl i a (CHead e0 (Bind Abbr) v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S i)) x5 e0))) (ex2 T (\lambda (x6: T).(subst1 d0 u0 t (lift (S O) d0 x6))) (\lambda (x6: T).(pr2 a x1 x6))) (\lambda (x6: T).(\lambda (x7: C).(\lambda (H24: (eq T x4 (lift (S O) (minus d0 (S i)) x6))).(\lambda (H25: (getl i a (CHead x7 (Bind Abbr) x6))).(\lambda (_: (drop (S O) (minus d0 (S i)) x5 x7)).(let H27 \def (eq_ind T x4 (\lambda (t: T).(subst1 (minus d0 (S i)) u0 u t)) H20 (lift (S O) (minus d0 (S i)) x6) H24) in (ex2_ind T (\lambda (t0: T).(subst1 i (lift (S O) (minus d0 (S i)) x6) (lift (S O) d0 x0) t0)) (\lambda (t0: T).(subst1 (S (plus (minus d0 (S i)) i)) u0 x2 t0)) (ex2 T (\lambda (x8: T).(subst1 d0 u0 t (lift (S O) d0 x8))) (\lambda (x8: T).(pr2 a x1 x8))) (\lambda (x8: T).(\lambda (H28: (subst1 i (lift (S O) (minus d0 (S i)) x6) (lift (S O) d0 x0) x8)).(\lambda (H29: (subst1 (S (plus (minus d0 (S i)) i)) u0 x2 x8)).(let H30 \def (eq_ind nat d0 (\lambda (n: nat).(subst1 i (lift (S O) (minus d0 (S i)) x6) (lift (S O) n x0) x8)) H28 (S (plus i (minus d0 (S i)))) (lt_plus_minus i d0 H12)) in (ex2_ind T (\lambda (t5: T).(eq T x8 (lift (S O) (S (plus i (minus d0 (S i)))) t5))) (\lambda (t5: T).(subst1 i x6 x0 t5)) (ex2 T (\lambda (x9: T).(subst1 d0 u0 t (lift (S O) d0 x9))) (\lambda (x9: T).(pr2 a x1 x9))) (\lambda (x9: T).(\lambda (H31: (eq T x8 (lift (S O) (S (plus i (minus d0 (S i)))) x9))).(\lambda (H32: (subst1 i x6 x0 x9)).(let H33 \def (eq_ind T x8 (\lambda (t: T).(subst1 (S (plus (minus d0 (S i)) i)) u0 x2 t)) H29 (lift (S O) (S (plus i (minus d0 (S i)))) x9) H31) in (let H34 \def (eq_ind_r nat (S (plus i (minus d0 (S i)))) (\lambda (n: nat).(subst1 (S (plus (minus d0 (S i)) i)) u0 x2 (lift (S O) n x9))) H33 d0 (lt_plus_minus i d0 H12)) in (let H35 \def (eq_ind_r nat (S (plus (minus d0 (S i)) i)) (\lambda (n: nat).(subst1 n u0 x2 (lift (S O) d0 x9))) H34 d0 (lt_plus_minus_r i d0 H12)) in (ex_intro2 T (\lambda (x10: T).(subst1 d0 u0 t (lift (S O) d0 x10))) (\lambda (x10: T).(pr2 a x1 x10)) x9 (subst1_trans x2 t u0 d0 H13 (lift (S O) d0 x9) H35) (pr2_delta1 a x7 x6 i H25 x1 x0 H10 x9 H32)))))))) (subst1_gen_lift_lt x6 x0 x8 i (S O) (minus d0 (S i)) H30)))))) (subst1_subst1_back (lift (S O) d0 x0) x2 u i H14 (lift (S O) (minus d0 (S i)) x6) u0 (minus d0 (S i)) H27)))))))) (getl_drop_conf_lt Abbr a0 x5 x4 i H22 a (S O) (minus d0 (S i)) H23))))))))) H18)))))) (csubst1_getl_lt d0 i H12 c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0))))) (subst1_confluence_neq t4 t u i (subst1_single i u t4 t H2) (lift (S O) d0 x0) u0 d0 H11 (lt_neq i d0 H12)))) (\lambda (H12: (eq nat i d0)).(let H13 \def (eq_ind_r nat d0 (\lambda (n: nat).(subst1 n u0 t4 (lift (S O) n x0))) H11 i H12) in (let H14 \def (eq_ind_r nat d0 (\lambda (n: nat).(drop (S O) n a0 a)) H5 i H12) in (let H15 \def (eq_ind_r nat d0 (\lambda (n: nat).(csubst1 n u0 c0 a0)) H4 i H12) in (let H16 \def (eq_ind_r nat d0 (\lambda (n: nat).(getl n c0 (CHead e (Bind Abbr) u0))) H3 i H12) in (eq_ind nat i (\lambda (n: nat).(ex2 T (\lambda (x2: T).(subst1 n u0 t (lift (S O) n x2))) (\lambda (x2: T).(pr2 a x1 x2)))) (let H17 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c: C).(getl i c0 c)) H0 (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead e (Bind Abbr) u0) H16)) in (let H18 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead e (Bind Abbr) u0) H16)) in ((let H19 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead e (Bind Abbr) u0) H16)) in (\lambda (H20: (eq C d e)).(let H21 \def (eq_ind_r T u0 (\lambda (t: T).(getl i c0 (CHead e (Bind Abbr) t))) H17 u H19) in (let H22 \def (eq_ind_r T u0 (\lambda (t: T).(subst1 i t t4 (lift (S O) i x0))) H13 u H19) in (let H23 \def (eq_ind_r T u0 (\lambda (t: T).(csubst1 i t c0 a0)) H15 u H19) in (eq_ind T u (\lambda (t0: T).(ex2 T (\lambda (x2: T).(subst1 i t0 t (lift (S O) i x2))) (\lambda (x2: T).(pr2 a x1 x2)))) (let H24 \def (eq_ind_r C e (\lambda (c: C).(getl i c0 (CHead c (Bind Abbr) u))) H21 d H20) in (ex2_ind T (\lambda (t0: T).(subst1 i u t t0)) (\lambda (t0: T).(subst1 i u (lift (S O) i x0) t0)) (ex2 T (\lambda (x2: T).(subst1 i u t (lift (S O) i x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x2: T).(\lambda (H25: (subst1 i u t x2)).(\lambda (H26: (subst1 i u (lift (S O) i x0) x2)).(let H27 \def (eq_ind T x2 (\lambda (t0: T).(subst1 i u t t0)) H25 (lift (S O) i x0) (subst1_gen_lift_eq x0 u x2 (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))) H26)) in (ex_intro2 T (\lambda (x3: T).(subst1 i u t (lift (S O) i x3))) (\lambda (x3: T).(pr2 a x1 x3)) x0 H27 (pr2_free a x1 x0 H10)))))) (subst1_confluence_eq t4 t u i (subst1_single i u t4 t H2) (lift (S O) i x0) H22))) u0 H19)))))) H18))) d0 H12)))))) (\lambda (H12: (lt d0 i)).(ex2_ind T (\lambda (t0: T).(subst1 d0 u0 t t0)) (\lambda (t0: T).(subst1 i u (lift (S O) d0 x0) t0)) (ex2 T (\lambda (x2: T).(subst1 d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x2: T).(\lambda (H13: (subst1 d0 u0 t x2)).(\lambda (H14: (subst1 i u (lift (S O) d0 x0) x2)).(ex2_ind T (\lambda (t5: T).(eq T x2 (lift (S O) d0 t5))) (\lambda (t5: T).(subst1 (minus i (S O)) u x0 t5)) (ex2 T (\lambda (x3: T).(subst1 d0 u0 t (lift (S O) d0 x3))) (\lambda (x3: T).(pr2 a x1 x3))) (\lambda (x3: T).(\lambda (H15: (eq T x2 (lift (S O) d0 x3))).(\lambda (H16: (subst1 (minus i (S O)) u x0 x3)).(let H17 \def (eq_ind T x2 (\lambda (t0: T).(subst1 d0 u0 t t0)) H13 (lift (S O) d0 x3) H15) in (ex_intro2 T (\lambda (x4: T).(subst1 d0 u0 t (lift (S O) d0 x4))) (\lambda (x4: T).(pr2 a x1 x4)) x3 H17 (pr2_delta1 a d u (minus i (S O)) (getl_drop_conf_ge i (CHead d (Bind Abbr) u) a0 (csubst1_getl_ge d0 i (le_S_n d0 i (le_S (S d0) i H12)) c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0) a (S O) d0 H5 (eq_ind_r nat (plus (S O) d0) (\lambda (n: nat).(le n i)) H12 (plus d0 (S O)) (plus_comm d0 (S O)))) x1 x0 H10 x3 H16)))))) (subst1_gen_lift_ge u x0 x2 i (S O) d0 H14 (eq_ind_r nat (plus (S O) d0) (\lambda (n: nat).(le n i)) H12 (plus d0 (S O)) (plus_comm d0 (S O)))))))) (subst1_confluence_neq t4 t u i (subst1_single i u t4 t H2) (lift (S O) d0 x0) u0 d0 H11 (sym_not_equal nat d0 i (lt_neq d0 i H12)))))))))) (pr0_gen_lift x1 x (S O) d0 H7))))) (pr0_subst1 t3 t4 H1 u0 (lift (S O) d0 x1) d0 H6 u0 (pr0_refl u0))))))))))))))))))))))) c t1 t2 H)))). + \lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pr2 c t1 t2)).(pr2_ind (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (\forall (x1: T).((subst1 d u t (lift (S O) d x1)) \to (ex2 T (\lambda (x2: T).(subst1 d u t0 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a x1 x2)))))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr0 t3 t4)).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda (_: (getl d c0 (CHead e (Bind Abbr) u))).(\lambda (a0: C).(\lambda (_: (csubst1 d u c0 a0)).(\lambda (a: C).(\lambda (_: (drop (S O) d a0 a)).(\lambda (x1: T).(\lambda (H4: (subst1 d u t3 (lift (S O) d x1))).(ex2_ind T (\lambda (w2: T).(pr0 (lift (S O) d x1) w2)) (\lambda (w2: T).(subst1 d u t4 w2)) (ex2 T (\lambda (x2: T).(subst1 d u t4 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x: T).(\lambda (H5: (pr0 (lift (S O) d x1) x)).(\lambda (H6: (subst1 d u t4 x)).(ex2_ind T (\lambda (t5: T).(eq T x (lift (S O) d t5))) (\lambda (t5: T).(pr0 x1 t5)) (ex2 T (\lambda (x2: T).(subst1 d u t4 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x0: T).(\lambda (H7: (eq T x (lift (S O) d x0))).(\lambda (H8: (pr0 x1 x0)).(let H9 \def (eq_ind T x (\lambda (t: T).(subst1 d u t4 t)) H6 (lift (S O) d x0) H7) in (ex_intro2 T (\lambda (x2: T).(subst1 d u t4 (lift (S O) d x2))) (\lambda (x2: T).(pr2 a x1 x2)) x0 H9 (pr2_free a x1 x0 H8)))))) (pr0_gen_lift x1 x (S O) d H5))))) (pr0_subst1 t3 t4 H0 u (lift (S O) d x1) d H4 u (pr0_refl u))))))))))))))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c0 (CHead d (Bind Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1: (pr0 t3 t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (e: C).(\lambda (u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H4: (csubst1 d0 u0 c0 a0)).(\lambda (a: C).(\lambda (H5: (drop (S O) d0 a0 a)).(\lambda (x1: T).(\lambda (H6: (subst1 d0 u0 t3 (lift (S O) d0 x1))).(ex2_ind T (\lambda (w2: T).(pr0 (lift (S O) d0 x1) w2)) (\lambda (w2: T).(subst1 d0 u0 t4 w2)) (ex2 T (\lambda (x2: T).(subst1 d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x: T).(\lambda (H7: (pr0 (lift (S O) d0 x1) x)).(\lambda (H8: (subst1 d0 u0 t4 x)).(ex2_ind T (\lambda (t5: T).(eq T x (lift (S O) d0 t5))) (\lambda (t5: T).(pr0 x1 t5)) (ex2 T (\lambda (x2: T).(subst1 d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x0: T).(\lambda (H9: (eq T x (lift (S O) d0 x0))).(\lambda (H10: (pr0 x1 x0)).(let H11 \def (eq_ind T x (\lambda (t: T).(subst1 d0 u0 t4 t)) H8 (lift (S O) d0 x0) H9) in (lt_eq_gt_e i d0 (ex2 T (\lambda (x2: T).(subst1 d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (H12: (lt i d0)).(ex2_ind T (\lambda (t0: T).(subst1 d0 u0 t t0)) (\lambda (t0: T).(subst1 i u (lift (S O) d0 x0) t0)) (ex2 T (\lambda (x2: T).(subst1 d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x2: T).(\lambda (H13: (subst1 d0 u0 t x2)).(\lambda (H14: (subst1 i u (lift (S O) d0 x0) x2)).(ex2_ind C (\lambda (e2: C).(csubst1 (minus d0 i) u0 (CHead d (Bind Abbr) u) e2)) (\lambda (e2: C).(getl i a0 e2)) (ex2 T (\lambda (x3: T).(subst1 d0 u0 t (lift (S O) d0 x3))) (\lambda (x3: T).(pr2 a x1 x3))) (\lambda (x3: C).(\lambda (H15: (csubst1 (minus d0 i) u0 (CHead d (Bind Abbr) u) x3)).(\lambda (H16: (getl i a0 x3)).(let H17 \def (eq_ind nat (minus d0 i) (\lambda (n: nat).(csubst1 n u0 (CHead d (Bind Abbr) u) x3)) H15 (S (minus d0 (S i))) (minus_x_Sy d0 i H12)) in (let H18 \def (csubst1_gen_head (Bind Abbr) d x3 u u0 (minus d0 (S i)) H17) in (ex3_2_ind T C (\lambda (u2: T).(\lambda (c2: C).(eq C x3 (CHead c2 (Bind Abbr) u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 (minus d0 (S i)) u0 u u2))) (\lambda (_: T).(\lambda (c2: C).(csubst1 (minus d0 (S i)) u0 d c2))) (ex2 T (\lambda (x4: T).(subst1 d0 u0 t (lift (S O) d0 x4))) (\lambda (x4: T).(pr2 a x1 x4))) (\lambda (x4: T).(\lambda (x5: C).(\lambda (H19: (eq C x3 (CHead x5 (Bind Abbr) x4))).(\lambda (H20: (subst1 (minus d0 (S i)) u0 u x4)).(\lambda (_: (csubst1 (minus d0 (S i)) u0 d x5)).(let H22 \def (eq_ind C x3 (\lambda (c: C).(getl i a0 c)) H16 (CHead x5 (Bind Abbr) x4) H19) in (let H23 \def (eq_ind nat d0 (\lambda (n: nat).(drop (S O) n a0 a)) H5 (S (plus i (minus d0 (S i)))) (lt_plus_minus i d0 H12)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T x4 (lift (S O) (minus d0 (S i)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl i a (CHead e0 (Bind Abbr) v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S i)) x5 e0))) (ex2 T (\lambda (x6: T).(subst1 d0 u0 t (lift (S O) d0 x6))) (\lambda (x6: T).(pr2 a x1 x6))) (\lambda (x6: T).(\lambda (x7: C).(\lambda (H24: (eq T x4 (lift (S O) (minus d0 (S i)) x6))).(\lambda (H25: (getl i a (CHead x7 (Bind Abbr) x6))).(\lambda (_: (drop (S O) (minus d0 (S i)) x5 x7)).(let H27 \def (eq_ind T x4 (\lambda (t: T).(subst1 (minus d0 (S i)) u0 u t)) H20 (lift (S O) (minus d0 (S i)) x6) H24) in (ex2_ind T (\lambda (t0: T).(subst1 i (lift (S O) (minus d0 (S i)) x6) (lift (S O) d0 x0) t0)) (\lambda (t0: T).(subst1 (S (plus (minus d0 (S i)) i)) u0 x2 t0)) (ex2 T (\lambda (x8: T).(subst1 d0 u0 t (lift (S O) d0 x8))) (\lambda (x8: T).(pr2 a x1 x8))) (\lambda (x8: T).(\lambda (H28: (subst1 i (lift (S O) (minus d0 (S i)) x6) (lift (S O) d0 x0) x8)).(\lambda (H29: (subst1 (S (plus (minus d0 (S i)) i)) u0 x2 x8)).(let H30 \def (eq_ind nat d0 (\lambda (n: nat).(subst1 i (lift (S O) (minus d0 (S i)) x6) (lift (S O) n x0) x8)) H28 (S (plus i (minus d0 (S i)))) (lt_plus_minus i d0 H12)) in (ex2_ind T (\lambda (t5: T).(eq T x8 (lift (S O) (S (plus i (minus d0 (S i)))) t5))) (\lambda (t5: T).(subst1 i x6 x0 t5)) (ex2 T (\lambda (x9: T).(subst1 d0 u0 t (lift (S O) d0 x9))) (\lambda (x9: T).(pr2 a x1 x9))) (\lambda (x9: T).(\lambda (H31: (eq T x8 (lift (S O) (S (plus i (minus d0 (S i)))) x9))).(\lambda (H32: (subst1 i x6 x0 x9)).(let H33 \def (eq_ind T x8 (\lambda (t: T).(subst1 (S (plus (minus d0 (S i)) i)) u0 x2 t)) H29 (lift (S O) (S (plus i (minus d0 (S i)))) x9) H31) in (let H34 \def (eq_ind_r nat (S (plus i (minus d0 (S i)))) (\lambda (n: nat).(subst1 (S (plus (minus d0 (S i)) i)) u0 x2 (lift (S O) n x9))) H33 d0 (lt_plus_minus i d0 H12)) in (let H35 \def (eq_ind_r nat (S (plus (minus d0 (S i)) i)) (\lambda (n: nat).(subst1 n u0 x2 (lift (S O) d0 x9))) H34 d0 (lt_plus_minus_r i d0 H12)) in (ex_intro2 T (\lambda (x10: T).(subst1 d0 u0 t (lift (S O) d0 x10))) (\lambda (x10: T).(pr2 a x1 x10)) x9 (subst1_trans x2 t u0 d0 H13 (lift (S O) d0 x9) H35) (pr2_delta1 a x7 x6 i H25 x1 x0 H10 x9 H32)))))))) (subst1_gen_lift_lt x6 x0 x8 i (S O) (minus d0 (S i)) H30)))))) (subst1_subst1_back (lift (S O) d0 x0) x2 u i H14 (lift (S O) (minus d0 (S i)) x6) u0 (minus d0 (S i)) H27)))))))) (getl_drop_conf_lt Abbr a0 x5 x4 i H22 a (S O) (minus d0 (S i)) H23))))))))) H18)))))) (csubst1_getl_lt d0 i H12 c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0))))) (subst1_confluence_neq t4 t u i (subst1_single i u t4 t H2) (lift (S O) d0 x0) u0 d0 H11 (lt_neq i d0 H12)))) (\lambda (H12: (eq nat i d0)).(let H13 \def (eq_ind_r nat d0 (\lambda (n: nat).(subst1 n u0 t4 (lift (S O) n x0))) H11 i H12) in (let H14 \def (eq_ind_r nat d0 (\lambda (n: nat).(drop (S O) n a0 a)) H5 i H12) in (let H15 \def (eq_ind_r nat d0 (\lambda (n: nat).(csubst1 n u0 c0 a0)) H4 i H12) in (let H16 \def (eq_ind_r nat d0 (\lambda (n: nat).(getl n c0 (CHead e (Bind Abbr) u0))) H3 i H12) in (eq_ind nat i (\lambda (n: nat).(ex2 T (\lambda (x2: T).(subst1 n u0 t (lift (S O) n x2))) (\lambda (x2: T).(pr2 a x1 x2)))) (let H17 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c: C).(getl i c0 c)) H0 (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead e (Bind Abbr) u0) H16)) in (let H18 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead e (Bind Abbr) u0) H16)) in ((let H19 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) i H0 (CHead e (Bind Abbr) u0) H16)) in (\lambda (H20: (eq C d e)).(let H21 \def (eq_ind_r T u0 (\lambda (t: T).(getl i c0 (CHead e (Bind Abbr) t))) H17 u H19) in (let H22 \def (eq_ind_r T u0 (\lambda (t: T).(subst1 i t t4 (lift (S O) i x0))) H13 u H19) in (let H23 \def (eq_ind_r T u0 (\lambda (t: T).(csubst1 i t c0 a0)) H15 u H19) in (eq_ind T u (\lambda (t0: T).(ex2 T (\lambda (x2: T).(subst1 i t0 t (lift (S O) i x2))) (\lambda (x2: T).(pr2 a x1 x2)))) (let H24 \def (eq_ind_r C e (\lambda (c: C).(getl i c0 (CHead c (Bind Abbr) u))) H21 d H20) in (ex2_ind T (\lambda (t0: T).(subst1 i u t t0)) (\lambda (t0: T).(subst1 i u (lift (S O) i x0) t0)) (ex2 T (\lambda (x2: T).(subst1 i u t (lift (S O) i x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x2: T).(\lambda (H25: (subst1 i u t x2)).(\lambda (H26: (subst1 i u (lift (S O) i x0) x2)).(let H27 \def (eq_ind T x2 (\lambda (t0: T).(subst1 i u t t0)) H25 (lift (S O) i x0) (subst1_gen_lift_eq x0 u x2 (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))) H26)) in (ex_intro2 T (\lambda (x3: T).(subst1 i u t (lift (S O) i x3))) (\lambda (x3: T).(pr2 a x1 x3)) x0 H27 (pr2_free a x1 x0 H10)))))) (subst1_confluence_eq t4 t u i (subst1_single i u t4 t H2) (lift (S O) i x0) H22))) u0 H19)))))) H18))) d0 H12)))))) (\lambda (H12: (lt d0 i)).(ex2_ind T (\lambda (t0: T).(subst1 d0 u0 t t0)) (\lambda (t0: T).(subst1 i u (lift (S O) d0 x0) t0)) (ex2 T (\lambda (x2: T).(subst1 d0 u0 t (lift (S O) d0 x2))) (\lambda (x2: T).(pr2 a x1 x2))) (\lambda (x2: T).(\lambda (H13: (subst1 d0 u0 t x2)).(\lambda (H14: (subst1 i u (lift (S O) d0 x0) x2)).(ex2_ind T (\lambda (t5: T).(eq T x2 (lift (S O) d0 t5))) (\lambda (t5: T).(subst1 (minus i (S O)) u x0 t5)) (ex2 T (\lambda (x3: T).(subst1 d0 u0 t (lift (S O) d0 x3))) (\lambda (x3: T).(pr2 a x1 x3))) (\lambda (x3: T).(\lambda (H15: (eq T x2 (lift (S O) d0 x3))).(\lambda (H16: (subst1 (minus i (S O)) u x0 x3)).(let H17 \def (eq_ind T x2 (\lambda (t0: T).(subst1 d0 u0 t t0)) H13 (lift (S O) d0 x3) H15) in (ex_intro2 T (\lambda (x4: T).(subst1 d0 u0 t (lift (S O) d0 x4))) (\lambda (x4: T).(pr2 a x1 x4)) x3 H17 (pr2_delta1 a d u (minus i (S O)) (getl_drop_conf_ge i (CHead d (Bind Abbr) u) a0 (csubst1_getl_ge d0 i (le_S_n d0 i (le_S (S d0) i H12)) c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0) a (S O) d0 H5 (eq_ind_r nat (plus (S O) d0) (\lambda (n: nat).(le n i)) H12 (plus d0 (S O)) (plus_comm d0 (S O)))) x1 x0 H10 x3 H16)))))) (subst1_gen_lift_ge u x0 x2 i (S O) d0 H14 (eq_ind_r nat (plus (S O) d0) (\lambda (n: nat).(le n i)) H12 (plus d0 (S O)) (plus_comm d0 (S O)))))))) (subst1_confluence_neq t4 t u i (subst1_single i u t4 t H2) (lift (S O) d0 x0) u0 d0 H11 (sym_not_equal nat d0 i (lt_neq d0 i H12)))))))))) (pr0_gen_lift x1 x (S O) d0 H7))))) (pr0_subst1 t3 t4 H1 u0 (lift (S O) d0 x1) d0 H6 u0 (pr0_refl u0))))))))))))))))))))))) c t1 t2 H)))). inductive pr3 (c:C): T \to (T \to Prop) \def | pr3_refl: \forall (t: T).(pr3 c t t) @@ -2193,12 +2193,12 @@ theorem pr3_cflat: theorem pr3_pr0_pr2_t: \forall (u1: T).(\forall (u2: T).((pr0 u1 u2) \to (\forall (c: C).(\forall (t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pr3 (CHead c k u1) t1 t2)))))))) \def - \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr0 u1 u2)).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: K).(\lambda (H0: (pr2 (CHead c k u2) t1 t2)).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 (CHead c k u2)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr3 (CHead c k u1) t1 t2)))))))) with [(pr2_free c0 t0 t3 H1) \Rightarrow (\lambda (H2: (eq C c0 (CHead c k u2))).(\lambda (H3: (eq T t0 t1)).(\lambda (H4: (eq T t3 t2)).(eq_ind C (CHead c k u2) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr3 (CHead c k u1) t1 t2))))) (\lambda (H5: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr3 (CHead c k u1) t1 t2)))) (\lambda (H6: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr3 (CHead c k u1) t1 t2))) (\lambda (H7: (pr0 t1 t2)).(pr3_pr2 (CHead c k u1) t1 t2 (pr2_free (CHead c k u1) t1 t2 H7))) t3 (sym_eq T t3 t2 H6))) t0 (sym_eq T t0 t1 H5))) c0 (sym_eq C c0 (CHead c k u2) H2) H3 H4 H1)))) | (pr2_delta c0 d u i H1 t0 t3 H2 t H3) \Rightarrow (\lambda (H4: (eq C c0 (CHead c k u2))).(\lambda (H5: (eq T t0 t1)).(\lambda (H6: (eq T t t2)).(eq_ind C (CHead c k u2) (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t) \to (pr3 (CHead c k u1) t1 t2))))))) (\lambda (H7: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i u t3 t) \to (pr3 (CHead c k u1) t1 t2)))))) (\lambda (H8: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i u t3 t4) \to (pr3 (CHead c k u1) t1 t2))))) (\lambda (H9: (getl i (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H10: (pr0 t1 t3)).(\lambda (H11: (subst0 i u t3 t2)).(nat_ind (\lambda (n: nat).((getl n (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((subst0 n u t3 t2) \to (pr3 (CHead c k u1) t1 t2)))) (\lambda (H12: (getl O (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H13: (subst0 O u t3 t2)).(K_ind (\lambda (k: K).((getl O (CHead c k u2) (CHead d (Bind Abbr) u)) \to (pr3 (CHead c k u1) t1 t2))) (\lambda (b: B).(\lambda (H14: (getl O (CHead c (Bind b) u2) (CHead d (Bind Abbr) u))).(let H0 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 (getl_gen_O (CHead c (Bind b) u2) (CHead d (Bind Abbr) u) H14))) in ((let H15 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 (getl_gen_O (CHead c (Bind b) u2) (CHead d (Bind Abbr) u) H14))) in ((let H16 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 (getl_gen_O (CHead c (Bind b) u2) (CHead d (Bind Abbr) u) H14))) in (\lambda (H17: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H19 \def (eq_ind T u (\lambda (t: T).(subst0 O t t3 t2)) H13 u2 H16) in (eq_ind B Abbr (\lambda (b0: B).(pr3 (CHead c (Bind b0) u1) t1 t2)) (ex2_ind T (\lambda (t1: T).(subst0 O u1 t3 t1)) (\lambda (t1: T).(pr0 t1 t2)) (pr3 (CHead c (Bind Abbr) u1) t1 t2) (\lambda (x: T).(\lambda (H20: (subst0 O u1 t3 x)).(\lambda (H21: (pr0 x t2)).(pr3_sing (CHead c (Bind Abbr) u1) x t1 (pr2_delta (CHead c (Bind Abbr) u1) c u1 O (getl_refl Abbr c u1) t1 t3 H10 x H20) t2 (pr3_pr2 (CHead c (Bind Abbr) u1) x t2 (pr2_free (CHead c (Bind Abbr) u1) x t2 H21)))))) (pr0_subst0_back u2 t3 t2 O H19 u1 H)) b H17))))) H15)) H0)))) (\lambda (f: F).(\lambda (H14: (getl O (CHead c (Flat f) u2) (CHead d (Bind Abbr) u))).(pr3_pr2 (CHead c (Flat f) u1) t1 t2 (pr2_cflat c t1 t2 (pr2_delta c d u O (getl_intro O c (CHead d (Bind Abbr) u) c (drop_refl c) (clear_gen_flat f c (CHead d (Bind Abbr) u) u2 (getl_gen_O (CHead c (Flat f) u2) (CHead d (Bind Abbr) u) H14))) t1 t3 H10 t2 H13) f u1)))) k H12))) (\lambda (i0: nat).(\lambda (IHi: (((getl i0 (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pr3 (CHead c k u1) t1 t2))))).(\lambda (H12: (getl (S i0) (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H13: (subst0 (S i0) u t3 t2)).(K_ind (\lambda (k: K).((getl (S i0) (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((((getl i0 (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pr3 (CHead c k u1) t1 t2)))) \to (pr3 (CHead c k u1) t1 t2)))) (\lambda (b: B).(\lambda (H14: (getl (S i0) (CHead c (Bind b) u2) (CHead d (Bind Abbr) u))).(\lambda (_: (((getl i0 (CHead c (Bind b) u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pr3 (CHead c (Bind b) u1) t1 t2))))).(pr3_pr2 (CHead c (Bind b) u1) t1 t2 (pr2_delta (CHead c (Bind b) u1) d u (S i0) (getl_head (Bind b) i0 c (CHead d (Bind Abbr) u) (getl_gen_S (Bind b) c (CHead d (Bind Abbr) u) u2 i0 H14) u1) t1 t3 H10 t2 H13))))) (\lambda (f: F).(\lambda (H14: (getl (S i0) (CHead c (Flat f) u2) (CHead d (Bind Abbr) u))).(\lambda (_: (((getl i0 (CHead c (Flat f) u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pr3 (CHead c (Flat f) u1) t1 t2))))).(pr3_pr2 (CHead c (Flat f) u1) t1 t2 (pr2_cflat c t1 t2 (pr2_delta c d u (r (Flat f) i0) (getl_gen_S (Flat f) c (CHead d (Bind Abbr) u) u2 i0 H14) t1 t3 H10 t2 H13) f u1))))) k H12 IHi))))) i H9 H11)))) t (sym_eq T t t2 H8))) t0 (sym_eq T t0 t1 H7))) c0 (sym_eq C c0 (CHead c k u2) H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C (CHead c k u2)) (refl_equal T t1) (refl_equal T t2)))))))))). + \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr0 u1 u2)).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: K).(\lambda (H0: (pr2 (CHead c k u2) t1 t2)).(let H1 \def (match H0 return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 (CHead c k u2)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pr3 (CHead c k u1) t1 t2)))))))) with [(pr2_free c0 t0 t3 H1) \Rightarrow (\lambda (H2: (eq C c0 (CHead c k u2))).(\lambda (H3: (eq T t0 t1)).(\lambda (H4: (eq T t3 t2)).(eq_ind C (CHead c k u2) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pr3 (CHead c k u1) t1 t2))))) (\lambda (H5: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pr3 (CHead c k u1) t1 t2)))) (\lambda (H6: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pr3 (CHead c k u1) t1 t2))) (\lambda (H7: (pr0 t1 t2)).(pr3_pr2 (CHead c k u1) t1 t2 (pr2_free (CHead c k u1) t1 t2 H7))) t3 (sym_eq T t3 t2 H6))) t0 (sym_eq T t0 t1 H5))) c0 (sym_eq C c0 (CHead c k u2) H2) H3 H4 H1)))) | (pr2_delta c0 d u i H1 t0 t3 H2 t H3) \Rightarrow (\lambda (H4: (eq C c0 (CHead c k u2))).(\lambda (H5: (eq T t0 t1)).(\lambda (H6: (eq T t t2)).(eq_ind C (CHead c k u2) (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t) \to (pr3 (CHead c k u1) t1 t2))))))) (\lambda (H7: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i u t3 t) \to (pr3 (CHead c k u1) t1 t2)))))) (\lambda (H8: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i u t3 t4) \to (pr3 (CHead c k u1) t1 t2))))) (\lambda (H9: (getl i (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H10: (pr0 t1 t3)).(\lambda (H11: (subst0 i u t3 t2)).(nat_ind (\lambda (n: nat).((getl n (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((subst0 n u t3 t2) \to (pr3 (CHead c k u1) t1 t2)))) (\lambda (H12: (getl O (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H13: (subst0 O u t3 t2)).(K_ind (\lambda (k: K).((getl O (CHead c k u2) (CHead d (Bind Abbr) u)) \to (pr3 (CHead c k u1) t1 t2))) (\lambda (b: B).(\lambda (H14: (getl O (CHead c (Bind b) u2) (CHead d (Bind Abbr) u))).(let H0 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 (getl_gen_O (CHead c (Bind b) u2) (CHead d (Bind Abbr) u) H14))) in ((let H15 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 (getl_gen_O (CHead c (Bind b) u2) (CHead d (Bind Abbr) u) H14))) in ((let H16 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 (getl_gen_O (CHead c (Bind b) u2) (CHead d (Bind Abbr) u) H14))) in (\lambda (H17: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H19 \def (eq_ind T u (\lambda (t: T).(subst0 O t t3 t2)) H13 u2 H16) in (eq_ind B Abbr (\lambda (b0: B).(pr3 (CHead c (Bind b0) u1) t1 t2)) (ex2_ind T (\lambda (t1: T).(subst0 O u1 t3 t1)) (\lambda (t1: T).(pr0 t1 t2)) (pr3 (CHead c (Bind Abbr) u1) t1 t2) (\lambda (x: T).(\lambda (H20: (subst0 O u1 t3 x)).(\lambda (H21: (pr0 x t2)).(pr3_sing (CHead c (Bind Abbr) u1) x t1 (pr2_delta (CHead c (Bind Abbr) u1) c u1 O (getl_refl Abbr c u1) t1 t3 H10 x H20) t2 (pr3_pr2 (CHead c (Bind Abbr) u1) x t2 (pr2_free (CHead c (Bind Abbr) u1) x t2 H21)))))) (pr0_subst0_back u2 t3 t2 O H19 u1 H)) b H17))))) H15)) H0)))) (\lambda (f: F).(\lambda (H14: (getl O (CHead c (Flat f) u2) (CHead d (Bind Abbr) u))).(pr3_pr2 (CHead c (Flat f) u1) t1 t2 (pr2_cflat c t1 t2 (pr2_delta c d u O (getl_intro O c (CHead d (Bind Abbr) u) c (drop_refl c) (clear_gen_flat f c (CHead d (Bind Abbr) u) u2 (getl_gen_O (CHead c (Flat f) u2) (CHead d (Bind Abbr) u) H14))) t1 t3 H10 t2 H13) f u1)))) k H12))) (\lambda (i0: nat).(\lambda (IHi: (((getl i0 (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pr3 (CHead c k u1) t1 t2))))).(\lambda (H12: (getl (S i0) (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H13: (subst0 (S i0) u t3 t2)).(K_ind (\lambda (k: K).((getl (S i0) (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((((getl i0 (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pr3 (CHead c k u1) t1 t2)))) \to (pr3 (CHead c k u1) t1 t2)))) (\lambda (b: B).(\lambda (H14: (getl (S i0) (CHead c (Bind b) u2) (CHead d (Bind Abbr) u))).(\lambda (_: (((getl i0 (CHead c (Bind b) u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pr3 (CHead c (Bind b) u1) t1 t2))))).(pr3_pr2 (CHead c (Bind b) u1) t1 t2 (pr2_delta (CHead c (Bind b) u1) d u (S i0) (getl_head (Bind b) i0 c (CHead d (Bind Abbr) u) (getl_gen_S (Bind b) c (CHead d (Bind Abbr) u) u2 i0 H14) u1) t1 t3 H10 t2 H13))))) (\lambda (f: F).(\lambda (H14: (getl (S i0) (CHead c (Flat f) u2) (CHead d (Bind Abbr) u))).(\lambda (_: (((getl i0 (CHead c (Flat f) u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pr3 (CHead c (Flat f) u1) t1 t2))))).(pr3_pr2 (CHead c (Flat f) u1) t1 t2 (pr2_cflat c t1 t2 (pr2_delta c d u (r (Flat f) i0) (getl_gen_S (Flat f) c (CHead d (Bind Abbr) u) u2 i0 H14) t1 t3 H10 t2 H13) f u1))))) k H12 IHi))))) i H9 H11)))) t (sym_eq T t t2 H8))) t0 (sym_eq T t0 t1 H7))) c0 (sym_eq C c0 (CHead c k u2) H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C (CHead c k u2)) (refl_equal T t1) (refl_equal T t2)))))))))). theorem pr3_pr2_pr2_t: \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr2 c u1 u2) \to (\forall (t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pr3 (CHead c k u1) t1 t2)))))))) \def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr2 c u1 u2)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 c) \to ((eq T t u1) \to ((eq T t0 u2) \to (\forall (t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pr3 (CHead c k u1) t1 t2)))))))))))) with [(pr2_free c0 t1 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t1 u1)).(\lambda (H3: (eq T t2 u2)).(eq_ind C c (\lambda (_: C).((eq T t1 u1) \to ((eq T t2 u2) \to ((pr0 t1 t2) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pr3 (CHead c k u1) t3 t4))))))))) (\lambda (H4: (eq T t1 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t2 u2) \to ((pr0 t t2) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pr3 (CHead c k u1) t3 t4)))))))) (\lambda (H5: (eq T t2 u2)).(eq_ind T u2 (\lambda (t: T).((pr0 u1 t) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pr3 (CHead c k u1) t3 t4))))))) (\lambda (H6: (pr0 u1 u2)).(\lambda (t3: T).(\lambda (t4: T).(\lambda (k: K).(\lambda (H: (pr2 (CHead c k u2) t3 t4)).(pr3_pr0_pr2_t u1 u2 H6 c t3 t4 k H)))))) t2 (sym_eq T t2 u2 H5))) t1 (sym_eq T t1 u1 H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t1 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t1 u1)).(\lambda (H5: (eq T t u2)).(eq_ind C c (\lambda (c1: C).((eq T t1 u1) \to ((eq T t u2) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t1 t2) \to ((subst0 i u t2 t) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pr3 (CHead c k u1) t3 t4))))))))))) (\lambda (H6: (eq T t1 u1)).(eq_ind T u1 (\lambda (t0: T).((eq T t u2) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pr3 (CHead c k u1) t3 t4)))))))))) (\lambda (H7: (eq T t u2)).(eq_ind T u2 (\lambda (t0: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 u1 t2) \to ((subst0 i u t2 t0) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pr3 (CHead c k u1) t3 t4))))))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 u1 t2)).(\lambda (H10: (subst0 i u t2 u2)).(\lambda (t3: T).(\lambda (t0: T).(\lambda (k: K).(\lambda (H: (pr2 (CHead c k u2) t3 t0)).(let H11 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t1: T).((eq C c0 (CHead c k u2)) \to ((eq T t t3) \to ((eq T t1 t0) \to (pr3 (CHead c k u1) t3 t0)))))))) with [(pr2_free c0 t3 t4 H3) \Rightarrow (\lambda (H4: (eq C c0 (CHead c k u2))).(\lambda (H5: (eq T t3 t3)).(\lambda (H6: (eq T t4 t0)).(eq_ind C (CHead c k u2) (\lambda (_: C).((eq T t3 t3) \to ((eq T t4 t0) \to ((pr0 t3 t4) \to (pr3 (CHead c k u1) t3 t0))))) (\lambda (H7: (eq T t3 t3)).(eq_ind T t3 (\lambda (t: T).((eq T t4 t0) \to ((pr0 t t4) \to (pr3 (CHead c k u1) t3 t0)))) (\lambda (H8: (eq T t4 t0)).(eq_ind T t0 (\lambda (t: T).((pr0 t3 t) \to (pr3 (CHead c k u1) t3 t0))) (\lambda (H9: (pr0 t3 t0)).(pr3_pr2 (CHead c k u1) t3 t0 (pr2_free (CHead c k u1) t3 t0 H9))) t4 (sym_eq T t4 t0 H8))) t3 (sym_eq T t3 t3 H7))) c0 (sym_eq C c0 (CHead c k u2) H4) H5 H6 H3)))) | (pr2_delta c0 d0 u0 i0 H3 t3 t4 H4 t H5) \Rightarrow (\lambda (H6: (eq C c0 (CHead c k u2))).(\lambda (H7: (eq T t3 t3)).(\lambda (H11: (eq T t t0)).(eq_ind C (CHead c k u2) (\lambda (c1: C).((eq T t3 t3) \to ((eq T t t0) \to ((getl i0 c1 (CHead d0 (Bind Abbr) u0)) \to ((pr0 t3 t4) \to ((subst0 i0 u0 t4 t) \to (pr3 (CHead c k u1) t3 t0))))))) (\lambda (H12: (eq T t3 t3)).(eq_ind T t3 (\lambda (t1: T).((eq T t t0) \to ((getl i0 (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((pr0 t1 t4) \to ((subst0 i0 u0 t4 t) \to (pr3 (CHead c k u1) t3 t0)))))) (\lambda (H13: (eq T t t0)).(eq_ind T t0 (\lambda (t1: T).((getl i0 (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((pr0 t3 t4) \to ((subst0 i0 u0 t4 t1) \to (pr3 (CHead c k u1) t3 t0))))) (\lambda (H14: (getl i0 (CHead c k u2) (CHead d0 (Bind Abbr) u0))).(\lambda (H15: (pr0 t3 t4)).(\lambda (H16: (subst0 i0 u0 t4 t0)).((match i0 return (\lambda (_: ?).(\lambda (n: nat).((getl n (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((subst0 n u0 t4 t0) \to (pr3 (CHead c k u1) t3 t0))))) with [O \Rightarrow (\lambda (H17: (getl O (CHead c k u2) (CHead d0 (Bind Abbr) u0))).(\lambda (H18: (subst0 O u0 t4 t0)).((match k return (\lambda (_: ?).(\lambda (k: K).((clear (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to (pr3 (CHead c k u1) t3 t0)))) with [(Bind b) \Rightarrow (\lambda (H19: (clear (CHead c (Bind b) u2) (CHead d0 (Bind Abbr) u0))).(let H \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d0 | (CHead c _ _) \Rightarrow c])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H19)) in ((let H0 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H19)) in ((let H1 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H19)) in (\lambda (H20: (eq B Abbr b)).(\lambda (_: (eq C d0 c)).(let H22 \def (eq_ind T u0 (\lambda (t: T).(subst0 O t t4 t0)) H18 u2 H1) in (eq_ind B Abbr (\lambda (b0: B).(pr3 (CHead c (Bind b0) u1) t3 t0)) (ex2_ind T (\lambda (t0: T).(subst0 O t2 t4 t0)) (\lambda (t1: T).(subst0 (S (plus i O)) u t1 t0)) (pr3 (CHead c (Bind Abbr) u1) t3 t0) (\lambda (x: T).(\lambda (H2: (subst0 O t2 t4 x)).(\lambda (H10: (subst0 (S (plus i O)) u x t0)).(let H23 \def (f_equal nat nat S (plus i O) i (sym_eq nat i (plus i O) (plus_n_O i))) in (let H24 \def (eq_ind nat (S (plus i O)) (\lambda (n: nat).(subst0 n u x t0)) H10 (S i) H23) in (ex2_ind T (\lambda (t0: T).(subst0 O u1 t4 t0)) (\lambda (t0: T).(pr0 t0 x)) (pr3 (CHead c (Bind Abbr) u1) t3 t0) (\lambda (x0: T).(\lambda (H9: (subst0 O u1 t4 x0)).(\lambda (H25: (pr0 x0 x)).(pr3_sing (CHead c (Bind Abbr) u1) x0 t3 (pr2_delta (CHead c (Bind Abbr) u1) c u1 O (getl_refl Abbr c u1) t3 t4 H15 x0 H9) t0 (pr3_pr2 (CHead c (Bind Abbr) u1) x0 t0 (pr2_delta (CHead c (Bind Abbr) u1) d u (S i) (getl_clear_bind Abbr (CHead c (Bind Abbr) u1) c u1 (clear_bind Abbr c u1) (CHead d (Bind Abbr) u) i H8) x0 x H25 t0 H24)))))) (pr0_subst0_back t2 t4 x O H2 u1 H9))))))) (subst0_subst0 t4 t0 u2 O H22 t2 u i H10)) b H20))))) H0)) H))) | (Flat f) \Rightarrow (\lambda (H8: (clear (CHead c (Flat f) u2) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c (Flat f) u1) t3 t0 (pr2_cflat c t3 t0 (pr2_delta c d0 u0 O (getl_intro O c (CHead d0 (Bind Abbr) u0) c (drop_refl c) (clear_gen_flat f c (CHead d0 (Bind Abbr) u0) u2 H8)) t3 t4 H15 t0 H18) f u1)))]) (getl_gen_O (CHead c k u2) (CHead d0 (Bind Abbr) u0) H17)))) | (S n) \Rightarrow (\lambda (H8: (getl (S n) (CHead c k u2) (CHead d0 (Bind Abbr) u0))).(\lambda (H9: (subst0 (S n) u0 t4 t0)).((match k return (\lambda (_: ?).(\lambda (k: K).((getl (S n) (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to (pr3 (CHead c k u1) t3 t0)))) with [(Bind b) \Rightarrow (\lambda (H10: (getl (S n) (CHead c (Bind b) u2) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c (Bind b) u1) t3 t0 (pr2_delta (CHead c (Bind b) u1) d0 u0 (S n) (getl_head (Bind b) n c (CHead d0 (Bind Abbr) u0) (getl_gen_S (Bind b) c (CHead d0 (Bind Abbr) u0) u2 n H10) u1) t3 t4 H15 t0 H9))) | (Flat f) \Rightarrow (\lambda (H10: (getl (S n) (CHead c (Flat f) u2) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c (Flat f) u1) t3 t0 (pr2_cflat c t3 t0 (pr2_delta c d0 u0 (r (Flat f) n) (getl_gen_S (Flat f) c (CHead d0 (Bind Abbr) u0) u2 n H10) t3 t4 H15 t0 H9) f u1)))]) H8)))]) H14 H16)))) t (sym_eq T t t0 H13))) t3 (sym_eq T t3 t3 H12))) c0 (sym_eq C c0 (CHead c k u2) H6) H7 H11 H3 H4 H5))))]) in (H11 (refl_equal C (CHead c k u2)) (refl_equal T t3) (refl_equal T t0)))))))))) t (sym_eq T t u2 H7))) t1 (sym_eq T t1 u1 H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T u1) (refl_equal T u2)))))). + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr2 c u1 u2)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 c) \to ((eq T t u1) \to ((eq T t0 u2) \to (\forall (t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pr3 (CHead c k u1) t1 t2)))))))))))) with [(pr2_free c0 t1 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t1 u1)).(\lambda (H3: (eq T t2 u2)).(eq_ind C c (\lambda (_: C).((eq T t1 u1) \to ((eq T t2 u2) \to ((pr0 t1 t2) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pr3 (CHead c k u1) t3 t4))))))))) (\lambda (H4: (eq T t1 u1)).(eq_ind T u1 (\lambda (t: T).((eq T t2 u2) \to ((pr0 t t2) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pr3 (CHead c k u1) t3 t4)))))))) (\lambda (H5: (eq T t2 u2)).(eq_ind T u2 (\lambda (t: T).((pr0 u1 t) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pr3 (CHead c k u1) t3 t4))))))) (\lambda (H6: (pr0 u1 u2)).(\lambda (t3: T).(\lambda (t4: T).(\lambda (k: K).(\lambda (H: (pr2 (CHead c k u2) t3 t4)).(pr3_pr0_pr2_t u1 u2 H6 c t3 t4 k H)))))) t2 (sym_eq T t2 u2 H5))) t1 (sym_eq T t1 u1 H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t1 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t1 u1)).(\lambda (H5: (eq T t u2)).(eq_ind C c (\lambda (c1: C).((eq T t1 u1) \to ((eq T t u2) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t1 t2) \to ((subst0 i u t2 t) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pr3 (CHead c k u1) t3 t4))))))))))) (\lambda (H6: (eq T t1 u1)).(eq_ind T u1 (\lambda (t0: T).((eq T t u2) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pr3 (CHead c k u1) t3 t4)))))))))) (\lambda (H7: (eq T t u2)).(eq_ind T u2 (\lambda (t0: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 u1 t2) \to ((subst0 i u t2 t0) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pr3 (CHead c k u1) t3 t4))))))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 u1 t2)).(\lambda (H10: (subst0 i u t2 u2)).(\lambda (t3: T).(\lambda (t0: T).(\lambda (k: K).(\lambda (H: (pr2 (CHead c k u2) t3 t0)).(let H11 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t1: T).(\lambda (_: (pr2 c0 t t1)).((eq C c0 (CHead c k u2)) \to ((eq T t t3) \to ((eq T t1 t0) \to (pr3 (CHead c k u1) t3 t0)))))))) with [(pr2_free c0 t3 t4 H3) \Rightarrow (\lambda (H4: (eq C c0 (CHead c k u2))).(\lambda (H5: (eq T t3 t3)).(\lambda (H6: (eq T t4 t0)).(eq_ind C (CHead c k u2) (\lambda (_: C).((eq T t3 t3) \to ((eq T t4 t0) \to ((pr0 t3 t4) \to (pr3 (CHead c k u1) t3 t0))))) (\lambda (H7: (eq T t3 t3)).(eq_ind T t3 (\lambda (t: T).((eq T t4 t0) \to ((pr0 t t4) \to (pr3 (CHead c k u1) t3 t0)))) (\lambda (H8: (eq T t4 t0)).(eq_ind T t0 (\lambda (t: T).((pr0 t3 t) \to (pr3 (CHead c k u1) t3 t0))) (\lambda (H9: (pr0 t3 t0)).(pr3_pr2 (CHead c k u1) t3 t0 (pr2_free (CHead c k u1) t3 t0 H9))) t4 (sym_eq T t4 t0 H8))) t3 (sym_eq T t3 t3 H7))) c0 (sym_eq C c0 (CHead c k u2) H4) H5 H6 H3)))) | (pr2_delta c0 d0 u0 i0 H3 t3 t4 H4 t H5) \Rightarrow (\lambda (H6: (eq C c0 (CHead c k u2))).(\lambda (H7: (eq T t3 t3)).(\lambda (H11: (eq T t t0)).(eq_ind C (CHead c k u2) (\lambda (c1: C).((eq T t3 t3) \to ((eq T t t0) \to ((getl i0 c1 (CHead d0 (Bind Abbr) u0)) \to ((pr0 t3 t4) \to ((subst0 i0 u0 t4 t) \to (pr3 (CHead c k u1) t3 t0))))))) (\lambda (H12: (eq T t3 t3)).(eq_ind T t3 (\lambda (t1: T).((eq T t t0) \to ((getl i0 (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((pr0 t1 t4) \to ((subst0 i0 u0 t4 t) \to (pr3 (CHead c k u1) t3 t0)))))) (\lambda (H13: (eq T t t0)).(eq_ind T t0 (\lambda (t1: T).((getl i0 (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((pr0 t3 t4) \to ((subst0 i0 u0 t4 t1) \to (pr3 (CHead c k u1) t3 t0))))) (\lambda (H14: (getl i0 (CHead c k u2) (CHead d0 (Bind Abbr) u0))).(\lambda (H15: (pr0 t3 t4)).(\lambda (H16: (subst0 i0 u0 t4 t0)).((match i0 return (\lambda (n: nat).((getl n (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((subst0 n u0 t4 t0) \to (pr3 (CHead c k u1) t3 t0)))) with [O \Rightarrow (\lambda (H17: (getl O (CHead c k u2) (CHead d0 (Bind Abbr) u0))).(\lambda (H18: (subst0 O u0 t4 t0)).((match k return (\lambda (k: K).((clear (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to (pr3 (CHead c k u1) t3 t0))) with [(Bind b) \Rightarrow (\lambda (H19: (clear (CHead c (Bind b) u2) (CHead d0 (Bind Abbr) u0))).(let H \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d0 | (CHead c _ _) \Rightarrow c])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H19)) in ((let H0 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H19)) in ((let H1 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H19)) in (\lambda (H20: (eq B Abbr b)).(\lambda (_: (eq C d0 c)).(let H22 \def (eq_ind T u0 (\lambda (t: T).(subst0 O t t4 t0)) H18 u2 H1) in (eq_ind B Abbr (\lambda (b0: B).(pr3 (CHead c (Bind b0) u1) t3 t0)) (ex2_ind T (\lambda (t0: T).(subst0 O t2 t4 t0)) (\lambda (t1: T).(subst0 (S (plus i O)) u t1 t0)) (pr3 (CHead c (Bind Abbr) u1) t3 t0) (\lambda (x: T).(\lambda (H2: (subst0 O t2 t4 x)).(\lambda (H10: (subst0 (S (plus i O)) u x t0)).(let H23 \def (f_equal nat nat S (plus i O) i (sym_eq nat i (plus i O) (plus_n_O i))) in (let H24 \def (eq_ind nat (S (plus i O)) (\lambda (n: nat).(subst0 n u x t0)) H10 (S i) H23) in (ex2_ind T (\lambda (t0: T).(subst0 O u1 t4 t0)) (\lambda (t0: T).(pr0 t0 x)) (pr3 (CHead c (Bind Abbr) u1) t3 t0) (\lambda (x0: T).(\lambda (H9: (subst0 O u1 t4 x0)).(\lambda (H25: (pr0 x0 x)).(pr3_sing (CHead c (Bind Abbr) u1) x0 t3 (pr2_delta (CHead c (Bind Abbr) u1) c u1 O (getl_refl Abbr c u1) t3 t4 H15 x0 H9) t0 (pr3_pr2 (CHead c (Bind Abbr) u1) x0 t0 (pr2_delta (CHead c (Bind Abbr) u1) d u (S i) (getl_clear_bind Abbr (CHead c (Bind Abbr) u1) c u1 (clear_bind Abbr c u1) (CHead d (Bind Abbr) u) i H8) x0 x H25 t0 H24)))))) (pr0_subst0_back t2 t4 x O H2 u1 H9))))))) (subst0_subst0 t4 t0 u2 O H22 t2 u i H10)) b H20))))) H0)) H))) | (Flat f) \Rightarrow (\lambda (H8: (clear (CHead c (Flat f) u2) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c (Flat f) u1) t3 t0 (pr2_cflat c t3 t0 (pr2_delta c d0 u0 O (getl_intro O c (CHead d0 (Bind Abbr) u0) c (drop_refl c) (clear_gen_flat f c (CHead d0 (Bind Abbr) u0) u2 H8)) t3 t4 H15 t0 H18) f u1)))]) (getl_gen_O (CHead c k u2) (CHead d0 (Bind Abbr) u0) H17)))) | (S n) \Rightarrow (\lambda (H8: (getl (S n) (CHead c k u2) (CHead d0 (Bind Abbr) u0))).(\lambda (H9: (subst0 (S n) u0 t4 t0)).((match k return (\lambda (k: K).((getl (S n) (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to (pr3 (CHead c k u1) t3 t0))) with [(Bind b) \Rightarrow (\lambda (H10: (getl (S n) (CHead c (Bind b) u2) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c (Bind b) u1) t3 t0 (pr2_delta (CHead c (Bind b) u1) d0 u0 (S n) (getl_head (Bind b) n c (CHead d0 (Bind Abbr) u0) (getl_gen_S (Bind b) c (CHead d0 (Bind Abbr) u0) u2 n H10) u1) t3 t4 H15 t0 H9))) | (Flat f) \Rightarrow (\lambda (H10: (getl (S n) (CHead c (Flat f) u2) (CHead d0 (Bind Abbr) u0))).(pr3_pr2 (CHead c (Flat f) u1) t3 t0 (pr2_cflat c t3 t0 (pr2_delta c d0 u0 (r (Flat f) n) (getl_gen_S (Flat f) c (CHead d0 (Bind Abbr) u0) u2 n H10) t3 t4 H15 t0 H9) f u1)))]) H8)))]) H14 H16)))) t (sym_eq T t t0 H13))) t3 (sym_eq T t3 t3 H12))) c0 (sym_eq C c0 (CHead c k u2) H6) H7 H11 H3 H4 H5))))]) in (H11 (refl_equal C (CHead c k u2)) (refl_equal T t3) (refl_equal T t0)))))))))) t (sym_eq T t u2 H7))) t1 (sym_eq T t1 u1 H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T u1) (refl_equal T u2)))))). theorem pr3_pr2_pr3_t: \forall (c: C).(\forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall (k: K).((pr3 (CHead c k u2) t1 t2) \to (\forall (u1: T).((pr2 c u1 u2) \to (pr3 (CHead c k u1) t1 t2)))))))) @@ -2218,7 +2218,7 @@ theorem pr3_lift: theorem pr3_wcpr0_t: \forall (c1: C).(\forall (c2: C).((wcpr0 c2 c1) \to (\forall (t1: T).(\forall (t2: T).((pr3 c1 t1 t2) \to (pr3 c2 t1 t2)))))) \def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c2 c1)).(wcpr0_ind (\lambda (c: C).(\lambda (c0: C).(\forall (t1: T).(\forall (t2: T).((pr3 c0 t1 t2) \to (pr3 c t1 t2)))))) (\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr3 c t1 t2)).H0)))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H0: (wcpr0 c0 c3)).(\lambda (_: ((\forall (t1: T).(\forall (t2: T).((pr3 c3 t1 t2) \to (pr3 c0 t1 t2)))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 u2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H3: (pr3 (CHead c3 k u2) t1 t2)).(pr3_ind (CHead c3 k u1) (\lambda (t: T).(\lambda (t0: T).(pr3 (CHead c0 k u1) t t0))) (\lambda (t: T).(pr3_refl (CHead c0 k u1) t)) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H4: (pr2 (CHead c3 k u1) t3 t0)).(\lambda (t4: T).(\lambda (_: (pr3 (CHead c3 k u1) t0 t4)).(\lambda (H6: (pr3 (CHead c0 k u1) t0 t4)).(pr3_t t0 t3 (CHead c0 k u1) (let H7 \def (match H4 return (\lambda (_: ?).(\lambda (c: C).(\lambda (t: T).(\lambda (t1: T).((eq C c (CHead c3 k u1)) \to ((eq T t t3) \to ((eq T t1 t0) \to (pr3 (CHead c0 k u1) t3 t0)))))))) with [(pr2_free c t1 t2 H2) \Rightarrow (\lambda (H3: (eq C c (CHead c3 k u1))).(\lambda (H4: (eq T t1 t3)).(\lambda (H5: (eq T t2 t0)).(eq_ind C (CHead c3 k u1) (\lambda (_: C).((eq T t1 t3) \to ((eq T t2 t0) \to ((pr0 t1 t2) \to (pr3 (CHead c0 k u1) t3 t0))))) (\lambda (H6: (eq T t1 t3)).(eq_ind T t3 (\lambda (t: T).((eq T t2 t0) \to ((pr0 t t2) \to (pr3 (CHead c0 k u1) t3 t0)))) (\lambda (H7: (eq T t2 t0)).(eq_ind T t0 (\lambda (t: T).((pr0 t3 t) \to (pr3 (CHead c0 k u1) t3 t0))) (\lambda (H8: (pr0 t3 t0)).(pr3_pr2 (CHead c0 k u1) t3 t0 (pr2_free (CHead c0 k u1) t3 t0 H8))) t2 (sym_eq T t2 t0 H7))) t1 (sym_eq T t1 t3 H6))) c (sym_eq C c (CHead c3 k u1) H3) H4 H5 H2)))) | (pr2_delta c d u i H2 t1 t2 H3 t H4) \Rightarrow (\lambda (H5: (eq C c (CHead c3 k u1))).(\lambda (H6: (eq T t1 t3)).(\lambda (H7: (eq T t t0)).(eq_ind C (CHead c3 k u1) (\lambda (c1: C).((eq T t1 t3) \to ((eq T t t0) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t1 t2) \to ((subst0 i u t2 t) \to (pr3 (CHead c0 k u1) t3 t0))))))) (\lambda (H8: (eq T t1 t3)).(eq_ind T t3 (\lambda (t4: T).((eq T t t0) \to ((getl i (CHead c3 k u1) (CHead d (Bind Abbr) u)) \to ((pr0 t4 t2) \to ((subst0 i u t2 t) \to (pr3 (CHead c0 k u1) t3 t0)))))) (\lambda (H9: (eq T t t0)).(eq_ind T t0 (\lambda (t4: T).((getl i (CHead c3 k u1) (CHead d (Bind Abbr) u)) \to ((pr0 t3 t2) \to ((subst0 i u t2 t4) \to (pr3 (CHead c0 k u1) t3 t0))))) (\lambda (H10: (getl i (CHead c3 k u1) (CHead d (Bind Abbr) u))).(\lambda (H11: (pr0 t3 t2)).(\lambda (H12: (subst0 i u t2 t0)).(ex3_2_ind C T (\lambda (e2: C).(\lambda (u2: T).(getl i (CHead c0 k u1) (CHead e2 (Bind Abbr) u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 d))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u))) (pr3 (CHead c0 k u1) t3 t0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H1: (getl i (CHead c0 k u1) (CHead x0 (Bind Abbr) x1))).(\lambda (_: (wcpr0 x0 d)).(\lambda (H14: (pr0 x1 u)).(ex2_ind T (\lambda (t0: T).(subst0 i x1 t2 t0)) (\lambda (t3: T).(pr0 t3 t0)) (pr3 (CHead c0 k u1) t3 t0) (\lambda (x: T).(\lambda (H15: (subst0 i x1 t2 x)).(\lambda (H16: (pr0 x t0)).(pr3_sing (CHead c0 k u1) x t3 (pr2_delta (CHead c0 k u1) x0 x1 i H1 t3 t2 H11 x H15) t0 (pr3_pr2 (CHead c0 k u1) x t0 (pr2_free (CHead c0 k u1) x t0 H16)))))) (pr0_subst0_back u t2 t0 i H12 x1 H14))))))) (wcpr0_getl_back (CHead c3 k u1) (CHead c0 k u1) (wcpr0_comp c0 c3 H0 u1 u1 (pr0_refl u1) k) i d u (Bind Abbr) H10))))) t (sym_eq T t t0 H9))) t1 (sym_eq T t1 t3 H8))) c (sym_eq C c (CHead c3 k u1) H5) H6 H7 H2 H3 H4))))]) in (H7 (refl_equal C (CHead c3 k u1)) (refl_equal T t3) (refl_equal T t0))) t4 H6))))))) t1 t2 (pr3_pr2_pr3_t c3 u2 t1 t2 k H3 u1 (pr2_free c3 u1 u2 H2)))))))))))))) c2 c1 H))). + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c2 c1)).(wcpr0_ind (\lambda (c: C).(\lambda (c0: C).(\forall (t1: T).(\forall (t2: T).((pr3 c0 t1 t2) \to (pr3 c t1 t2)))))) (\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr3 c t1 t2)).H0)))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H0: (wcpr0 c0 c3)).(\lambda (_: ((\forall (t1: T).(\forall (t2: T).((pr3 c3 t1 t2) \to (pr3 c0 t1 t2)))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H2: (pr0 u1 u2)).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H3: (pr3 (CHead c3 k u2) t1 t2)).(pr3_ind (CHead c3 k u1) (\lambda (t: T).(\lambda (t0: T).(pr3 (CHead c0 k u1) t t0))) (\lambda (t: T).(pr3_refl (CHead c0 k u1) t)) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H4: (pr2 (CHead c3 k u1) t3 t0)).(\lambda (t4: T).(\lambda (_: (pr3 (CHead c3 k u1) t0 t4)).(\lambda (H6: (pr3 (CHead c0 k u1) t0 t4)).(pr3_t t0 t3 (CHead c0 k u1) (let H7 \def (match H4 return (\lambda (c: C).(\lambda (t: T).(\lambda (t1: T).(\lambda (_: (pr2 c t t1)).((eq C c (CHead c3 k u1)) \to ((eq T t t3) \to ((eq T t1 t0) \to (pr3 (CHead c0 k u1) t3 t0)))))))) with [(pr2_free c t1 t2 H2) \Rightarrow (\lambda (H3: (eq C c (CHead c3 k u1))).(\lambda (H4: (eq T t1 t3)).(\lambda (H5: (eq T t2 t0)).(eq_ind C (CHead c3 k u1) (\lambda (_: C).((eq T t1 t3) \to ((eq T t2 t0) \to ((pr0 t1 t2) \to (pr3 (CHead c0 k u1) t3 t0))))) (\lambda (H6: (eq T t1 t3)).(eq_ind T t3 (\lambda (t: T).((eq T t2 t0) \to ((pr0 t t2) \to (pr3 (CHead c0 k u1) t3 t0)))) (\lambda (H7: (eq T t2 t0)).(eq_ind T t0 (\lambda (t: T).((pr0 t3 t) \to (pr3 (CHead c0 k u1) t3 t0))) (\lambda (H8: (pr0 t3 t0)).(pr3_pr2 (CHead c0 k u1) t3 t0 (pr2_free (CHead c0 k u1) t3 t0 H8))) t2 (sym_eq T t2 t0 H7))) t1 (sym_eq T t1 t3 H6))) c (sym_eq C c (CHead c3 k u1) H3) H4 H5 H2)))) | (pr2_delta c d u i H2 t1 t2 H3 t H4) \Rightarrow (\lambda (H5: (eq C c (CHead c3 k u1))).(\lambda (H6: (eq T t1 t3)).(\lambda (H7: (eq T t t0)).(eq_ind C (CHead c3 k u1) (\lambda (c1: C).((eq T t1 t3) \to ((eq T t t0) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t1 t2) \to ((subst0 i u t2 t) \to (pr3 (CHead c0 k u1) t3 t0))))))) (\lambda (H8: (eq T t1 t3)).(eq_ind T t3 (\lambda (t4: T).((eq T t t0) \to ((getl i (CHead c3 k u1) (CHead d (Bind Abbr) u)) \to ((pr0 t4 t2) \to ((subst0 i u t2 t) \to (pr3 (CHead c0 k u1) t3 t0)))))) (\lambda (H9: (eq T t t0)).(eq_ind T t0 (\lambda (t4: T).((getl i (CHead c3 k u1) (CHead d (Bind Abbr) u)) \to ((pr0 t3 t2) \to ((subst0 i u t2 t4) \to (pr3 (CHead c0 k u1) t3 t0))))) (\lambda (H10: (getl i (CHead c3 k u1) (CHead d (Bind Abbr) u))).(\lambda (H11: (pr0 t3 t2)).(\lambda (H12: (subst0 i u t2 t0)).(ex3_2_ind C T (\lambda (e2: C).(\lambda (u2: T).(getl i (CHead c0 k u1) (CHead e2 (Bind Abbr) u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 e2 d))) (\lambda (_: C).(\lambda (u2: T).(pr0 u2 u))) (pr3 (CHead c0 k u1) t3 t0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H1: (getl i (CHead c0 k u1) (CHead x0 (Bind Abbr) x1))).(\lambda (_: (wcpr0 x0 d)).(\lambda (H14: (pr0 x1 u)).(ex2_ind T (\lambda (t0: T).(subst0 i x1 t2 t0)) (\lambda (t3: T).(pr0 t3 t0)) (pr3 (CHead c0 k u1) t3 t0) (\lambda (x: T).(\lambda (H15: (subst0 i x1 t2 x)).(\lambda (H16: (pr0 x t0)).(pr3_sing (CHead c0 k u1) x t3 (pr2_delta (CHead c0 k u1) x0 x1 i H1 t3 t2 H11 x H15) t0 (pr3_pr2 (CHead c0 k u1) x t0 (pr2_free (CHead c0 k u1) x t0 H16)))))) (pr0_subst0_back u t2 t0 i H12 x1 H14))))))) (wcpr0_getl_back (CHead c3 k u1) (CHead c0 k u1) (wcpr0_comp c0 c3 H0 u1 u1 (pr0_refl u1) k) i d u (Bind Abbr) H10))))) t (sym_eq T t t0 H9))) t1 (sym_eq T t1 t3 H8))) c (sym_eq C c (CHead c3 k u1) H5) H6 H7 H2 H3 H4))))]) in (H7 (refl_equal C (CHead c3 k u1)) (refl_equal T t3) (refl_equal T t0))) t4 H6))))))) t1 t2 (pr3_pr2_pr3_t c3 u2 t1 t2 k H3 u1 (pr2_free c3 u1 u2 H2)))))))))))))) c2 c1 H))). theorem pr3_gen_lift: \forall (c: C).(\forall (t1: T).(\forall (x: T).(\forall (h: nat).(\forall (d: nat).((pr3 c (lift h d t1) x) \to (\forall (e: C).((drop h d c e) \to (ex2 T (\lambda (t2: T).(eq T x (lift h d t2))) (\lambda (t2: T).(pr3 e t1 t2)))))))))) @@ -2278,27 +2278,27 @@ inductive csuba (g:G): C \to (C \to Prop) \def theorem csuba_gen_abbr: \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g (CHead d1 (Bind Abbr) u) c) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))) \def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H: (csuba g (CHead d1 (Bind Abbr) u) c)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (c1: C).((eq C c0 (CHead d1 (Bind Abbr) u)) \to ((eq C c1 c) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) with [(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead d1 (Bind Abbr) u))).(\lambda (H1: (eq C (CSort n) c)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abbr) u) H0) in (False_ind ((eq C (CSort n) c) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) H2)) H1))) | (csuba_head c1 c2 H0 k u0) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u0) (CHead d1 (Bind Abbr) u))).(\lambda (H2: (eq C (CHead c2 k u0) c)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u0) (CHead d1 (Bind Abbr) u) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u0) (CHead d1 (Bind Abbr) u) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u0) (CHead d1 (Bind Abbr) u) H1) in (eq_ind C d1 (\lambda (c0: C).((eq K k (Bind Abbr)) \to ((eq T u0 u) \to ((eq C (CHead c2 k u0) c) \to ((csuba g c0 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) (\lambda (H6: (eq K k (Bind Abbr))).(eq_ind K (Bind Abbr) (\lambda (k0: K).((eq T u0 u) \to ((eq C (CHead c2 k0 u0) c) \to ((csuba g d1 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))) (\lambda (H7: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C (CHead c2 (Bind Abbr) t) c) \to ((csuba g d1 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda (H8: (eq C (CHead c2 (Bind Abbr) u) c)).(eq_ind C (CHead c2 (Bind Abbr) u) (\lambda (c: C).((csuba g d1 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))) (\lambda (H9: (csuba g d1 c2)).(ex_intro2 C (\lambda (d2: C).(eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) c2 (refl_equal C (CHead c2 (Bind Abbr) u)) H9)) c H8)) u0 (sym_eq T u0 u H7))) k (sym_eq K k (Bind Abbr) H6))) c1 (sym_eq C c1 d1 H5))) H4)) H3)) H2 H0))) | (csuba_abst c1 c2 H0 t a H1 u0 H2) \Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abbr) u))).(\lambda (H4: (eq C (CHead c2 (Bind Abbr) u0) c)).((let H5 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H3) in (False_ind ((eq C (CHead c2 (Bind Abbr) u0) c) \to ((csuba g c1 c2) \to ((arity g c1 t (asucc g a)) \to ((arity g c2 u0 a) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))) H5)) H4 H0 H1 H2)))]) in (H0 (refl_equal C (CHead d1 (Bind Abbr) u)) (refl_equal C c))))))). + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H: (csuba g (CHead d1 (Bind Abbr) u) c)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csuba ? c0 c1)).((eq C c0 (CHead d1 (Bind Abbr) u)) \to ((eq C c1 c) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) with [(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead d1 (Bind Abbr) u))).(\lambda (H1: (eq C (CSort n) c)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abbr) u) H0) in (False_ind ((eq C (CSort n) c) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) H2)) H1))) | (csuba_head c1 c2 H0 k u0) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u0) (CHead d1 (Bind Abbr) u))).(\lambda (H2: (eq C (CHead c2 k u0) c)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u0) (CHead d1 (Bind Abbr) u) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u0) (CHead d1 (Bind Abbr) u) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u0) (CHead d1 (Bind Abbr) u) H1) in (eq_ind C d1 (\lambda (c0: C).((eq K k (Bind Abbr)) \to ((eq T u0 u) \to ((eq C (CHead c2 k u0) c) \to ((csuba g c0 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) (\lambda (H6: (eq K k (Bind Abbr))).(eq_ind K (Bind Abbr) (\lambda (k0: K).((eq T u0 u) \to ((eq C (CHead c2 k0 u0) c) \to ((csuba g d1 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))) (\lambda (H7: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C (CHead c2 (Bind Abbr) t) c) \to ((csuba g d1 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda (H8: (eq C (CHead c2 (Bind Abbr) u) c)).(eq_ind C (CHead c2 (Bind Abbr) u) (\lambda (c: C).((csuba g d1 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))) (\lambda (H9: (csuba g d1 c2)).(ex_intro2 C (\lambda (d2: C).(eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) c2 (refl_equal C (CHead c2 (Bind Abbr) u)) H9)) c H8)) u0 (sym_eq T u0 u H7))) k (sym_eq K k (Bind Abbr) H6))) c1 (sym_eq C c1 d1 H5))) H4)) H3)) H2 H0))) | (csuba_abst c1 c2 H0 t a H1 u0 H2) \Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abbr) u))).(\lambda (H4: (eq C (CHead c2 (Bind Abbr) u0) c)).((let H5 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H3) in (False_ind ((eq C (CHead c2 (Bind Abbr) u0) c) \to ((csuba g c1 c2) \to ((arity g c1 t (asucc g a)) \to ((arity g c2 u0 a) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))) H5)) H4 H0 H1 H2)))]) in (H0 (refl_equal C (CHead d1 (Bind Abbr) u)) (refl_equal C c))))))). theorem csuba_gen_void: \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u: T).((csuba g (CHead d1 (Bind Void) u) c) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2))))))) \def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H: (csuba g (CHead d1 (Bind Void) u) c)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (c1: C).((eq C c0 (CHead d1 (Bind Void) u)) \to ((eq C c1 c) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) with [(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead d1 (Bind Void) u))).(\lambda (H1: (eq C (CSort n) c)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Void) u) H0) in (False_ind ((eq C (CSort n) c) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2)))) H2)) H1))) | (csuba_head c1 c2 H0 k u0) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u0) (CHead d1 (Bind Void) u))).(\lambda (H2: (eq C (CHead c2 k u0) c)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u0) (CHead d1 (Bind Void) u) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u0) (CHead d1 (Bind Void) u) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u0) (CHead d1 (Bind Void) u) H1) in (eq_ind C d1 (\lambda (c0: C).((eq K k (Bind Void)) \to ((eq T u0 u) \to ((eq C (CHead c2 k u0) c) \to ((csuba g c0 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) (\lambda (H6: (eq K k (Bind Void))).(eq_ind K (Bind Void) (\lambda (k0: K).((eq T u0 u) \to ((eq C (CHead c2 k0 u0) c) \to ((csuba g d1 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2))))))) (\lambda (H7: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C (CHead c2 (Bind Void) t) c) \to ((csuba g d1 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda (H8: (eq C (CHead c2 (Bind Void) u) c)).(eq_ind C (CHead c2 (Bind Void) u) (\lambda (c: C).((csuba g d1 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2))))) (\lambda (H9: (csuba g d1 c2)).(ex_intro2 C (\lambda (d2: C).(eq C (CHead c2 (Bind Void) u) (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2)) c2 (refl_equal C (CHead c2 (Bind Void) u)) H9)) c H8)) u0 (sym_eq T u0 u H7))) k (sym_eq K k (Bind Void) H6))) c1 (sym_eq C c1 d1 H5))) H4)) H3)) H2 H0))) | (csuba_abst c1 c2 H0 t a H1 u0 H2) \Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) (CHead d1 (Bind Void) u))).(\lambda (H4: (eq C (CHead c2 (Bind Abbr) u0) c)).((let H5 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Void) u) H3) in (False_ind ((eq C (CHead c2 (Bind Abbr) u0) c) \to ((csuba g c1 c2) \to ((arity g c1 t (asucc g a)) \to ((arity g c2 u0 a) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2))))))) H5)) H4 H0 H1 H2)))]) in (H0 (refl_equal C (CHead d1 (Bind Void) u)) (refl_equal C c))))))). + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u: T).(\lambda (H: (csuba g (CHead d1 (Bind Void) u) c)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csuba ? c0 c1)).((eq C c0 (CHead d1 (Bind Void) u)) \to ((eq C c1 c) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) with [(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead d1 (Bind Void) u))).(\lambda (H1: (eq C (CSort n) c)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Void) u) H0) in (False_ind ((eq C (CSort n) c) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2)))) H2)) H1))) | (csuba_head c1 c2 H0 k u0) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u0) (CHead d1 (Bind Void) u))).(\lambda (H2: (eq C (CHead c2 k u0) c)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u0) (CHead d1 (Bind Void) u) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u0) (CHead d1 (Bind Void) u) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u0) (CHead d1 (Bind Void) u) H1) in (eq_ind C d1 (\lambda (c0: C).((eq K k (Bind Void)) \to ((eq T u0 u) \to ((eq C (CHead c2 k u0) c) \to ((csuba g c0 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) (\lambda (H6: (eq K k (Bind Void))).(eq_ind K (Bind Void) (\lambda (k0: K).((eq T u0 u) \to ((eq C (CHead c2 k0 u0) c) \to ((csuba g d1 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2))))))) (\lambda (H7: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C (CHead c2 (Bind Void) t) c) \to ((csuba g d1 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda (H8: (eq C (CHead c2 (Bind Void) u) c)).(eq_ind C (CHead c2 (Bind Void) u) (\lambda (c: C).((csuba g d1 c2) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2))))) (\lambda (H9: (csuba g d1 c2)).(ex_intro2 C (\lambda (d2: C).(eq C (CHead c2 (Bind Void) u) (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2)) c2 (refl_equal C (CHead c2 (Bind Void) u)) H9)) c H8)) u0 (sym_eq T u0 u H7))) k (sym_eq K k (Bind Void) H6))) c1 (sym_eq C c1 d1 H5))) H4)) H3)) H2 H0))) | (csuba_abst c1 c2 H0 t a H1 u0 H2) \Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) (CHead d1 (Bind Void) u))).(\lambda (H4: (eq C (CHead c2 (Bind Abbr) u0) c)).((let H5 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Void) u) H3) in (False_ind ((eq C (CHead c2 (Bind Abbr) u0) c) \to ((csuba g c1 c2) \to ((arity g c1 t (asucc g a)) \to ((arity g c2 u0 a) \to (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Void) u))) (\lambda (d2: C).(csuba g d1 d2))))))) H5)) H4 H0 H1 H2)))]) in (H0 (refl_equal C (CHead d1 (Bind Void) u)) (refl_equal C c))))))). theorem csuba_gen_abst: \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).((csuba g (CHead d1 (Bind Abst) u1) c) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))) \def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda (H: (csuba g (CHead d1 (Bind Abst) u1) c)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (c1: C).((eq C c0 (CHead d1 (Bind Abst) u1)) \to ((eq C c1 c) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) with [(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead d1 (Bind Abst) u1))).(\lambda (H1: (eq C (CSort n) c)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abst) u1) H0) in (False_ind ((eq C (CSort n) c) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) H2)) H1))) | (csuba_head c1 c2 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) (CHead d1 (Bind Abst) u1))).(\lambda (H2: (eq C (CHead c2 k u) c)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead d1 (Bind Abst) u1) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u) (CHead d1 (Bind Abst) u1) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead d1 (Bind Abst) u1) H1) in (eq_ind C d1 (\lambda (c0: C).((eq K k (Bind Abst)) \to ((eq T u u1) \to ((eq C (CHead c2 k u) c) \to ((csuba g c0 c2) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) (\lambda (H6: (eq K k (Bind Abst))).(eq_ind K (Bind Abst) (\lambda (k0: K).((eq T u u1) \to ((eq C (CHead c2 k0 u) c) \to ((csuba g d1 c2) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))) (\lambda (H7: (eq T u u1)).(eq_ind T u1 (\lambda (t: T).((eq C (CHead c2 (Bind Abst) t) c) \to ((csuba g d1 c2) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))) (\lambda (H8: (eq C (CHead c2 (Bind Abst) u1) c)).(eq_ind C (CHead c2 (Bind Abst) u1) (\lambda (c: C).((csuba g d1 c2) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))) (\lambda (H9: (csuba g d1 c2)).(or_introl (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 (Bind Abst) u1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(eq C (CHead c2 (Bind Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) c2 (refl_equal C (CHead c2 (Bind Abst) u1)) H9))) c H8)) u (sym_eq T u u1 H7))) k (sym_eq K k (Bind Abst) H6))) c1 (sym_eq C c1 d1 H5))) H4)) H3)) H2 H0))) | (csuba_abst c1 c2 H0 t a H1 u H2) \Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abst) u1))).(\lambda (H4: (eq C (CHead c2 (Bind Abbr) u) c)).((let H5 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abst) u1) H3) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abst) u1) H3) in (eq_ind C d1 (\lambda (c0: C).((eq T t u1) \to ((eq C (CHead c2 (Bind Abbr) u) c) \to ((csuba g c0 c2) \to ((arity g c0 t (asucc g a)) \to ((arity g c2 u a) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 a0)))))))))))) (\lambda (H7: (eq T t u1)).(eq_ind T u1 (\lambda (t0: T).((eq C (CHead c2 (Bind Abbr) u) c) \to ((csuba g d1 c2) \to ((arity g d1 t0 (asucc g a)) \to ((arity g c2 u a) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 a0))))))))))) (\lambda (H8: (eq C (CHead c2 (Bind Abbr) u) c)).(eq_ind C (CHead c2 (Bind Abbr) u) (\lambda (c: C).((csuba g d1 c2) \to ((arity g d1 u1 (asucc g a)) \to ((arity g c2 u a) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 a0)))))))))) (\lambda (H9: (csuba g d1 c2)).(\lambda (H10: (arity g d1 u1 (asucc g a))).(\lambda (H11: (arity g c2 u a)).(or_intror (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 a0))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 a0)))) c2 u a (refl_equal C (CHead c2 (Bind Abbr) u)) H9 H10 H11))))) c H8)) t (sym_eq T t u1 H7))) c1 (sym_eq C c1 d1 H6))) H5)) H4 H0 H1 H2)))]) in (H0 (refl_equal C (CHead d1 (Bind Abst) u1)) (refl_equal C c))))))). + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda (H: (csuba g (CHead d1 (Bind Abst) u1) c)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csuba ? c0 c1)).((eq C c0 (CHead d1 (Bind Abst) u1)) \to ((eq C c1 c) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) with [(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead d1 (Bind Abst) u1))).(\lambda (H1: (eq C (CSort n) c)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abst) u1) H0) in (False_ind ((eq C (CSort n) c) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) H2)) H1))) | (csuba_head c1 c2 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) (CHead d1 (Bind Abst) u1))).(\lambda (H2: (eq C (CHead c2 k u) c)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead d1 (Bind Abst) u1) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u) (CHead d1 (Bind Abst) u1) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead d1 (Bind Abst) u1) H1) in (eq_ind C d1 (\lambda (c0: C).((eq K k (Bind Abst)) \to ((eq T u u1) \to ((eq C (CHead c2 k u) c) \to ((csuba g c0 c2) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) (\lambda (H6: (eq K k (Bind Abst))).(eq_ind K (Bind Abst) (\lambda (k0: K).((eq T u u1) \to ((eq C (CHead c2 k0 u) c) \to ((csuba g d1 c2) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))) (\lambda (H7: (eq T u u1)).(eq_ind T u1 (\lambda (t: T).((eq C (CHead c2 (Bind Abst) t) c) \to ((csuba g d1 c2) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))) (\lambda (H8: (eq C (CHead c2 (Bind Abst) u1) c)).(eq_ind C (CHead c2 (Bind Abst) u1) (\lambda (c: C).((csuba g d1 c2) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))) (\lambda (H9: (csuba g d1 c2)).(or_introl (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 (Bind Abst) u1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(eq C (CHead c2 (Bind Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) c2 (refl_equal C (CHead c2 (Bind Abst) u1)) H9))) c H8)) u (sym_eq T u u1 H7))) k (sym_eq K k (Bind Abst) H6))) c1 (sym_eq C c1 d1 H5))) H4)) H3)) H2 H0))) | (csuba_abst c1 c2 H0 t a H1 u H2) \Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abst) u1))).(\lambda (H4: (eq C (CHead c2 (Bind Abbr) u) c)).((let H5 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abst) u1) H3) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abst) u1) H3) in (eq_ind C d1 (\lambda (c0: C).((eq T t u1) \to ((eq C (CHead c2 (Bind Abbr) u) c) \to ((csuba g c0 c2) \to ((arity g c0 t (asucc g a)) \to ((arity g c2 u a) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 a0)))))))))))) (\lambda (H7: (eq T t u1)).(eq_ind T u1 (\lambda (t0: T).((eq C (CHead c2 (Bind Abbr) u) c) \to ((csuba g d1 c2) \to ((arity g d1 t0 (asucc g a)) \to ((arity g c2 u a) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 a0))))))))))) (\lambda (H8: (eq C (CHead c2 (Bind Abbr) u) c)).(eq_ind C (CHead c2 (Bind Abbr) u) (\lambda (c: C).((csuba g d1 c2) \to ((arity g d1 u1 (asucc g a)) \to ((arity g c2 u a) \to (or (ex2 C (\lambda (d2: C).(eq C c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 a0)))))))))) (\lambda (H9: (csuba g d1 c2)).(\lambda (H10: (arity g d1 u1 (asucc g a))).(\lambda (H11: (arity g c2 u a)).(or_intror (ex2 C (\lambda (d2: C).(eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 a0))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a0: A).(arity g d1 u1 (asucc g a0))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a0: A).(arity g d2 u2 a0)))) c2 u a (refl_equal C (CHead c2 (Bind Abbr) u)) H9 H10 H11))))) c H8)) t (sym_eq T t u1 H7))) c1 (sym_eq C c1 d1 H6))) H5)) H4 H0 H1 H2)))]) in (H0 (refl_equal C (CHead d1 (Bind Abst) u1)) (refl_equal C c))))))). theorem csuba_gen_flat: \forall (g: G).(\forall (d1: C).(\forall (c: C).(\forall (u1: T).(\forall (f: F).((csuba g (CHead d1 (Flat f) u1) c) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))))) \def - \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda (f: F).(\lambda (H: (csuba g (CHead d1 (Flat f) u1) c)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (c1: C).((eq C c0 (CHead d1 (Flat f) u1)) \to ((eq C c1 c) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))))) with [(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead d1 (Flat f) u1))).(\lambda (H1: (eq C (CSort n) c)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Flat f) u1) H0) in (False_ind ((eq C (CSort n) c) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))) H2)) H1))) | (csuba_head c1 c2 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) (CHead d1 (Flat f) u1))).(\lambda (H2: (eq C (CHead c2 k u) c)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead d1 (Flat f) u1) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u) (CHead d1 (Flat f) u1) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead d1 (Flat f) u1) H1) in (eq_ind C d1 (\lambda (c0: C).((eq K k (Flat f)) \to ((eq T u u1) \to ((eq C (CHead c2 k u) c) \to ((csuba g c0 c2) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))))) (\lambda (H6: (eq K k (Flat f))).(eq_ind K (Flat f) (\lambda (k0: K).((eq T u u1) \to ((eq C (CHead c2 k0 u) c) \to ((csuba g d1 c2) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))))) (\lambda (H7: (eq T u u1)).(eq_ind T u1 (\lambda (t: T).((eq C (CHead c2 (Flat f) t) c) \to ((csuba g d1 c2) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))) (\lambda (H8: (eq C (CHead c2 (Flat f) u1) c)).(eq_ind C (CHead c2 (Flat f) u1) (\lambda (c: C).((csuba g d1 c2) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))) (\lambda (H9: (csuba g d1 c2)).(ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c2 (Flat f) u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))) c2 u1 (refl_equal C (CHead c2 (Flat f) u1)) H9)) c H8)) u (sym_eq T u u1 H7))) k (sym_eq K k (Flat f) H6))) c1 (sym_eq C c1 d1 H5))) H4)) H3)) H2 H0))) | (csuba_abst c1 c2 H0 t a H1 u H2) \Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) (CHead d1 (Flat f) u1))).(\lambda (H4: (eq C (CHead c2 (Bind Abbr) u) c)).((let H5 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u1) H3) in (False_ind ((eq C (CHead c2 (Bind Abbr) u) c) \to ((csuba g c1 c2) \to ((arity g c1 t (asucc g a)) \to ((arity g c2 u a) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))))) H5)) H4 H0 H1 H2)))]) in (H0 (refl_equal C (CHead d1 (Flat f) u1)) (refl_equal C c)))))))). + \lambda (g: G).(\lambda (d1: C).(\lambda (c: C).(\lambda (u1: T).(\lambda (f: F).(\lambda (H: (csuba g (CHead d1 (Flat f) u1) c)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csuba ? c0 c1)).((eq C c0 (CHead d1 (Flat f) u1)) \to ((eq C c1 c) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))))) with [(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead d1 (Flat f) u1))).(\lambda (H1: (eq C (CSort n) c)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Flat f) u1) H0) in (False_ind ((eq C (CSort n) c) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))) H2)) H1))) | (csuba_head c1 c2 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) (CHead d1 (Flat f) u1))).(\lambda (H2: (eq C (CHead c2 k u) c)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead d1 (Flat f) u1) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u) (CHead d1 (Flat f) u1) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead d1 (Flat f) u1) H1) in (eq_ind C d1 (\lambda (c0: C).((eq K k (Flat f)) \to ((eq T u u1) \to ((eq C (CHead c2 k u) c) \to ((csuba g c0 c2) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))))) (\lambda (H6: (eq K k (Flat f))).(eq_ind K (Flat f) (\lambda (k0: K).((eq T u u1) \to ((eq C (CHead c2 k0 u) c) \to ((csuba g d1 c2) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))))) (\lambda (H7: (eq T u u1)).(eq_ind T u1 (\lambda (t: T).((eq C (CHead c2 (Flat f) t) c) \to ((csuba g d1 c2) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))))))) (\lambda (H8: (eq C (CHead c2 (Flat f) u1) c)).(eq_ind C (CHead c2 (Flat f) u1) (\lambda (c: C).((csuba g d1 c2) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))) (\lambda (H9: (csuba g d1 c2)).(ex2_2_intro C T (\lambda (d2: C).(\lambda (u2: T).(eq C (CHead c2 (Flat f) u1) (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2))) c2 u1 (refl_equal C (CHead c2 (Flat f) u1)) H9)) c H8)) u (sym_eq T u u1 H7))) k (sym_eq K k (Flat f) H6))) c1 (sym_eq C c1 d1 H5))) H4)) H3)) H2 H0))) | (csuba_abst c1 c2 H0 t a H1 u H2) \Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) (CHead d1 (Flat f) u1))).(\lambda (H4: (eq C (CHead c2 (Bind Abbr) u) c)).((let H5 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u1) H3) in (False_ind ((eq C (CHead c2 (Bind Abbr) u) c) \to ((csuba g c1 c2) \to ((arity g c1 t (asucc g a)) \to ((arity g c2 u a) \to (ex2_2 C T (\lambda (d2: C).(\lambda (u2: T).(eq C c (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d1 d2)))))))) H5)) H4 H0 H1 H2)))]) in (H0 (refl_equal C (CHead d1 (Flat f) u1)) (refl_equal C c)))))))). theorem csuba_gen_bind: \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall (v1: T).((csuba g (CHead e1 (Bind b1) v1) c2) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))))) \def - \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v1: T).(\lambda (H: (csuba g (CHead e1 (Bind b1) v1) c2)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e1 (Bind b1) v1)) \to ((eq C c0 c2) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))))) with [(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead e1 (Bind b1) v1))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e1 (Bind b1) v1) H0) in (False_ind ((eq C (CSort n) c2) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))) H2)) H1))) | (csuba_head c1 c0 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) (CHead e1 (Bind b1) v1))).(\lambda (H2: (eq C (CHead c0 k u) c2)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H1) in (eq_ind C e1 (\lambda (c: C).((eq K k (Bind b1)) \to ((eq T u v1) \to ((eq C (CHead c0 k u) c2) \to ((csuba g c c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))))) (\lambda (H6: (eq K k (Bind b1))).(eq_ind K (Bind b1) (\lambda (k0: K).((eq T u v1) \to ((eq C (CHead c0 k0 u) c2) \to ((csuba g e1 c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))))) (\lambda (H7: (eq T u v1)).(eq_ind T v1 (\lambda (t: T).((eq C (CHead c0 (Bind b1) t) c2) \to ((csuba g e1 c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))) (\lambda (H8: (eq C (CHead c0 (Bind b1) v1) c2)).(eq_ind C (CHead c0 (Bind b1) v1) (\lambda (c: C).((csuba g e1 c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))) (\lambda (H9: (csuba g e1 c0)).(let H10 \def (eq_ind_r C c2 (\lambda (c: C).(csuba g (CHead e1 (Bind b1) v1) c)) H (CHead c0 (Bind b1) v1) H8) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))) b1 c0 v1 (refl_equal C (CHead c0 (Bind b1) v1)) H9))) c2 H8)) u (sym_eq T u v1 H7))) k (sym_eq K k (Bind b1) H6))) c1 (sym_eq C c1 e1 H5))) H4)) H3)) H2 H0))) | (csuba_abst c1 c0 H0 t a H1 u H2) \Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1))).(\lambda (H4: (eq C (CHead c0 (Bind Abbr) u) c2)).((let H5 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H3) in ((let H6 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H3) in ((let H7 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H3) in (eq_ind C e1 (\lambda (c: C).((eq B Abst b1) \to ((eq T t v1) \to ((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csuba g c c0) \to ((arity g c t (asucc g a)) \to ((arity g c0 u a) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))))))) (\lambda (H8: (eq B Abst b1)).(eq_ind B Abst (\lambda (_: B).((eq T t v1) \to ((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csuba g e1 c0) \to ((arity g e1 t (asucc g a)) \to ((arity g c0 u a) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))))))) (\lambda (H9: (eq T t v1)).(eq_ind T v1 (\lambda (t0: T).((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csuba g e1 c0) \to ((arity g e1 t0 (asucc g a)) \to ((arity g c0 u a) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))))) (\lambda (H10: (eq C (CHead c0 (Bind Abbr) u) c2)).(eq_ind C (CHead c0 (Bind Abbr) u) (\lambda (c: C).((csuba g e1 c0) \to ((arity g e1 v1 (asucc g a)) \to ((arity g c0 u a) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))))) (\lambda (H11: (csuba g e1 c0)).(\lambda (_: (arity g e1 v1 (asucc g a))).(\lambda (_: (arity g c0 u a)).(let H14 \def (eq_ind_r C c2 (\lambda (c: C).(csuba g (CHead e1 (Bind b1) v1) c)) H (CHead c0 (Bind Abbr) u) H10) in (let H15 \def (eq_ind_r B b1 (\lambda (b: B).(csuba g (CHead e1 (Bind b) v1) (CHead c0 (Bind Abbr) u))) H14 Abst H8) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind Abbr) u) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))) Abbr c0 u (refl_equal C (CHead c0 (Bind Abbr) u)) H11)))))) c2 H10)) t (sym_eq T t v1 H9))) b1 H8)) c1 (sym_eq C c1 e1 H7))) H6)) H5)) H4 H0 H1 H2)))]) in (H0 (refl_equal C (CHead e1 (Bind b1) v1)) (refl_equal C c2)))))))). + \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v1: T).(\lambda (H: (csuba g (CHead e1 (Bind b1) v1) c2)).(let H0 \def (match H return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csuba ? c c0)).((eq C c (CHead e1 (Bind b1) v1)) \to ((eq C c0 c2) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))))) with [(csuba_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead e1 (Bind b1) v1))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e1 (Bind b1) v1) H0) in (False_ind ((eq C (CSort n) c2) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))) H2)) H1))) | (csuba_head c1 c0 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) (CHead e1 (Bind b1) v1))).(\lambda (H2: (eq C (CHead c0 k u) c2)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H1) in (eq_ind C e1 (\lambda (c: C).((eq K k (Bind b1)) \to ((eq T u v1) \to ((eq C (CHead c0 k u) c2) \to ((csuba g c c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))))) (\lambda (H6: (eq K k (Bind b1))).(eq_ind K (Bind b1) (\lambda (k0: K).((eq T u v1) \to ((eq C (CHead c0 k0 u) c2) \to ((csuba g e1 c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))))) (\lambda (H7: (eq T u v1)).(eq_ind T v1 (\lambda (t: T).((eq C (CHead c0 (Bind b1) t) c2) \to ((csuba g e1 c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))) (\lambda (H8: (eq C (CHead c0 (Bind b1) v1) c2)).(eq_ind C (CHead c0 (Bind b1) v1) (\lambda (c: C).((csuba g e1 c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))) (\lambda (H9: (csuba g e1 c0)).(let H10 \def (eq_ind_r C c2 (\lambda (c: C).(csuba g (CHead e1 (Bind b1) v1) c)) H (CHead c0 (Bind b1) v1) H8) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))) b1 c0 v1 (refl_equal C (CHead c0 (Bind b1) v1)) H9))) c2 H8)) u (sym_eq T u v1 H7))) k (sym_eq K k (Bind b1) H6))) c1 (sym_eq C c1 e1 H5))) H4)) H3)) H2 H0))) | (csuba_abst c1 c0 H0 t a H1 u H2) \Rightarrow (\lambda (H3: (eq C (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1))).(\lambda (H4: (eq C (CHead c0 (Bind Abbr) u) c2)).((let H5 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H3) in ((let H6 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H3) in ((let H7 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H3) in (eq_ind C e1 (\lambda (c: C).((eq B Abst b1) \to ((eq T t v1) \to ((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csuba g c c0) \to ((arity g c t (asucc g a)) \to ((arity g c0 u a) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))))))) (\lambda (H8: (eq B Abst b1)).(eq_ind B Abst (\lambda (_: B).((eq T t v1) \to ((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csuba g e1 c0) \to ((arity g e1 t (asucc g a)) \to ((arity g c0 u a) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))))))) (\lambda (H9: (eq T t v1)).(eq_ind T v1 (\lambda (t0: T).((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csuba g e1 c0) \to ((arity g e1 t0 (asucc g a)) \to ((arity g c0 u a) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))))))))) (\lambda (H10: (eq C (CHead c0 (Bind Abbr) u) c2)).(eq_ind C (CHead c0 (Bind Abbr) u) (\lambda (c: C).((csuba g e1 c0) \to ((arity g e1 v1 (asucc g a)) \to ((arity g c0 u a) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2))))))))) (\lambda (H11: (csuba g e1 c0)).(\lambda (_: (arity g e1 v1 (asucc g a))).(\lambda (_: (arity g c0 u a)).(let H14 \def (eq_ind_r C c2 (\lambda (c: C).(csuba g (CHead e1 (Bind b1) v1) c)) H (CHead c0 (Bind Abbr) u) H10) in (let H15 \def (eq_ind_r B b1 (\lambda (b: B).(csuba g (CHead e1 (Bind b) v1) (CHead c0 (Bind Abbr) u))) H14 Abst H8) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind Abbr) u) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g e1 e2)))) Abbr c0 u (refl_equal C (CHead c0 (Bind Abbr) u)) H11)))))) c2 H10)) t (sym_eq T t v1 H9))) b1 H8)) c1 (sym_eq C c1 e1 H7))) H6)) H5)) H4 H0 H1 H2)))]) in (H0 (refl_equal C (CHead e1 (Bind b1) v1)) (refl_equal C c2)))))))). theorem csuba_refl: \forall (g: G).(\forall (c: C).(csuba g c c)) @@ -2308,27 +2308,27 @@ theorem csuba_refl: theorem csuba_clear_conf: \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csuba g c1 c2) \to (\forall (e1: C).((clear c1 e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c2 e2)))))))) \def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csuba g c1 c2)).(csuba_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).((clear c e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c0 e2))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (H0: (clear (CSort n) e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear (CSort n) e2))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: (clear (CHead c3 k u) e1)).((match k return (\lambda (_: ?).(\lambda (k0: K).((clear (CHead c3 k0 u) e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear (CHead c4 k0 u) e2)))))) with [(Bind b) \Rightarrow (\lambda (H3: (clear (CHead c3 (Bind b) u) e1)).(eq_ind_r C (CHead c3 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csuba g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g (CHead c3 (Bind b) u) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)) (CHead c4 (Bind b) u) (csuba_head g c3 c4 H0 (Bind b) u) (clear_bind b c4 u)) e1 (clear_gen_bind b c3 e1 u H3))) | (Flat f) \Rightarrow (\lambda (H3: (clear (CHead c3 (Flat f) u) e1)).(let H4 \def (H1 e1 (clear_gen_flat f c3 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c4 e2)) (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2))) (\lambda (x: C).(\lambda (H5: (csuba g e1 x)).(\lambda (H6: (clear c4 x)).(ex_intro2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2)) x H5 (clear_flat c4 x H6 f u))))) H4)))]) H2))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (_: ((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (H2: (arity g c3 t (asucc g a))).(\lambda (u: T).(\lambda (H3: (arity g c4 u a)).(\lambda (e1: C).(\lambda (H4: (clear (CHead c3 (Bind Abst) t) e1)).(eq_ind_r C (CHead c3 (Bind Abst) t) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csuba g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g (CHead c3 (Bind Abst) t) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)) (CHead c4 (Bind Abbr) u) (csuba_abst g c3 c4 H0 t a H2 u H3) (clear_bind Abbr c4 u)) e1 (clear_gen_bind Abst c3 e1 t H4))))))))))))) c1 c2 H)))). + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csuba g c1 c2)).(csuba_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).((clear c e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c0 e2))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (H0: (clear (CSort n) e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear (CSort n) e2))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: (clear (CHead c3 k u) e1)).((match k return (\lambda (k0: K).((clear (CHead c3 k0 u) e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear (CHead c4 k0 u) e2))))) with [(Bind b) \Rightarrow (\lambda (H3: (clear (CHead c3 (Bind b) u) e1)).(eq_ind_r C (CHead c3 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csuba g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g (CHead c3 (Bind b) u) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)) (CHead c4 (Bind b) u) (csuba_head g c3 c4 H0 (Bind b) u) (clear_bind b c4 u)) e1 (clear_gen_bind b c3 e1 u H3))) | (Flat f) \Rightarrow (\lambda (H3: (clear (CHead c3 (Flat f) u) e1)).(let H4 \def (H1 e1 (clear_gen_flat f c3 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c4 e2)) (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2))) (\lambda (x: C).(\lambda (H5: (csuba g e1 x)).(\lambda (H6: (clear c4 x)).(ex_intro2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2)) x H5 (clear_flat c4 x H6 f u))))) H4)))]) H2))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csuba g c3 c4)).(\lambda (_: ((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csuba g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (t: T).(\lambda (a: A).(\lambda (H2: (arity g c3 t (asucc g a))).(\lambda (u: T).(\lambda (H3: (arity g c4 u a)).(\lambda (e1: C).(\lambda (H4: (clear (CHead c3 (Bind Abst) t) e1)).(eq_ind_r C (CHead c3 (Bind Abst) t) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csuba g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)))) (ex_intro2 C (\lambda (e2: C).(csuba g (CHead c3 (Bind Abst) t) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)) (CHead c4 (Bind Abbr) u) (csuba_abst g c3 c4 H0 t a H2 u H3) (clear_bind Abbr c4 u)) e1 (clear_gen_bind Abst c3 e1 t H4))))))))))))) c1 c2 H)))). theorem csuba_drop_abbr: \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop i O c1 (CHead d1 (Bind Abbr) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))))) \def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abbr) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda (H: (drop O O c1 (CHead d1 (Bind Abbr) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: (csuba g c1 c2)).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csuba g c c2)) H0 (CHead d1 (Bind Abbr) u) (drop_gen_refl c1 (CHead d1 (Bind Abbr) u) H)) in (let H2 \def (csuba_gen_abbr g d1 c2 u H1) in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H3: (eq C c2 (CHead x (Bind Abbr) u))).(\lambda (H4: (csuba g d1 x)).(eq_ind_r C (CHead x (Bind Abbr) u) (\lambda (c: C).(ex2 C (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (ex_intro2 C (\lambda (d2: C).(drop O O (CHead x (Bind Abbr) u) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_refl (CHead x (Bind Abbr) u)) H4) c2 H3)))) H2)))))))))) (\lambda (n: nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abbr) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: C).(\forall (u: T).((drop (S n) O c (CHead d1 (Bind Abbr) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c c2) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))))) (\lambda (n0: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop (S n) O (CSort n0) (CHead d1 (Bind Abbr) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: (csuba g (CSort n0) c2)).(and3_ind (eq C (CHead d1 (Bind Abbr) u) (CSort n0)) (eq nat (S n) O) (eq nat O O) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (H2: (eq C (CHead d1 (Bind Abbr) u) (CSort n0))).(\lambda (_: (eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (match H2 return (\lambda (_: ?).(\lambda (c: C).((eq C c (CSort n0)) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))) with [refl_equal \Rightarrow (\lambda (H4: (eq C (CHead d1 (Bind Abbr) u) (CSort n0))).(let H5 \def (eq_ind C (CHead d1 (Bind Abbr) u) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n0) H4) in (False_ind (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) H5)))]) in (H5 (refl_equal C (CSort n0))))))) (drop_gen_sort n0 (S n) O (CHead d1 (Bind Abbr) u) H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).(\forall (u: T).((drop (S n) O c (CHead d1 (Bind Abbr) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c c2) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (u: T).(\lambda (H1: (drop (S n) O (CHead c k t) (CHead d1 (Bind Abbr) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H2: (csuba g (CHead c k t) c2)).(K_ind (\lambda (k0: K).((csuba g (CHead c k0 t) c2) \to ((drop (r k0 n) O c (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda (b: B).(\lambda (H3: (csuba g (CHead c (Bind b) t) c2)).(\lambda (H4: (drop (r (Bind b) n) O c (CHead d1 (Bind Abbr) u))).(B_ind (\lambda (b0: B).((csuba g (CHead c (Bind b0) t) c2) \to ((drop (r (Bind b0) n) O c (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda (H5: (csuba g (CHead c (Bind Abbr) t) c2)).(\lambda (H6: (drop (r (Bind Abbr) n) O c (CHead d1 (Bind Abbr) u))).(let H7 \def (csuba_gen_abbr g c c2 t H5) in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g c d2)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Abbr) t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abbr) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H10 \def (H c d1 u H6 g x H9) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (H11: (drop n O x (CHead x0 (Bind Abbr) u))).(\lambda (H12: (csuba g d1 x0)).(let H13 \def (refl_equal nat (r (Bind Abbr) n)) in (let H14 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abbr) u))) H11 (r (Bind Abbr) n) H13) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abbr) n x (CHead x0 (Bind Abbr) u) H14 t) H12)))))) H10)) c2 H8)))) H7)))) (\lambda (H5: (csuba g (CHead c (Bind Abst) t) c2)).(\lambda (H6: (drop (r (Bind Abst) n) O c (CHead d1 (Bind Abbr) u))).(let H7 \def (csuba_gen_abst g c c2 t H5) in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H9: (eq C c2 (CHead x (Bind Abst) t))).(\lambda (H10: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abst) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H11 \def (H c d1 u H6 g x H10) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abbr) u))).(\lambda (H13: (csuba g d1 x0)).(let H14 \def (refl_equal nat (r (Bind Abbr) n)) in (let H15 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abbr) u))) H12 (r (Bind Abbr) n) H14) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abbr) u) H15 t) H13)))))) H11)) c2 H9)))) H8)) (\lambda (H8: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H9: (eq C c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H10: (csuba g c x0)).(\lambda (_: (arity g c t (asucc g x2))).(\lambda (_: (arity g x0 x1 x2)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H13 \def (H c d1 u H6 g x0 H10) in (ex2_ind C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H14: (drop n O x0 (CHead x (Bind Abbr) u))).(\lambda (H15: (csuba g d1 x)).(let H16 \def (refl_equal nat (r (Bind Abbr) n)) in (let H17 \def (eq_ind nat n (\lambda (n: nat).(drop n O x0 (CHead x (Bind Abbr) u))) H14 (r (Bind Abbr) n) H16) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Bind Abbr) n x0 (CHead x (Bind Abbr) u) H17 x1) H15)))))) H13)) c2 H9)))))))) H8)) H7)))) (\lambda (H5: (csuba g (CHead c (Bind Void) t) c2)).(\lambda (H6: (drop (r (Bind Void) n) O c (CHead d1 (Bind Abbr) u))).(let H7 \def (csuba_gen_void g c c2 t H5) in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Void) t))) (\lambda (d2: C).(csuba g c d2)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Void) t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Void) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H10 \def (H c d1 u H6 g x H9) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (H11: (drop n O x (CHead x0 (Bind Abbr) u))).(\lambda (H12: (csuba g d1 x0)).(let H13 \def (refl_equal nat (r (Bind Abbr) n)) in (let H14 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abbr) u))) H11 (r (Bind Abbr) n) H13) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Void) n x (CHead x0 (Bind Abbr) u) H14 t) H12)))))) H10)) c2 H8)))) H7)))) b H3 H4)))) (\lambda (f: F).(\lambda (H3: (csuba g (CHead c (Flat f) t) c2)).(\lambda (H4: (drop (r (Flat f) n) O c (CHead d1 (Bind Abbr) u))).(let H5 \def (csuba_gen_flat g c c2 t f H3) in (ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g c d2))) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c2 (CHead x0 (Flat f) x1))).(\lambda (H7: (csuba g c x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H8 \def (H0 d1 u H4 g x0 H7) in (ex2_ind C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H9: (drop (S n) O x0 (CHead x (Bind Abbr) u))).(\lambda (H10: (csuba g d1 x)).(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Flat f) n x0 (CHead x (Bind Abbr) u) H9 x1) H10)))) H8)) c2 H6))))) H5))))) k H2 (drop_gen_drop k c (CHead d1 (Bind Abbr) u) t n H1)))))))))))) c1)))) i). + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abbr) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda (H: (drop O O c1 (CHead d1 (Bind Abbr) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: (csuba g c1 c2)).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csuba g c c2)) H0 (CHead d1 (Bind Abbr) u) (drop_gen_refl c1 (CHead d1 (Bind Abbr) u) H)) in (let H2 \def (csuba_gen_abbr g d1 c2 u H1) in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H3: (eq C c2 (CHead x (Bind Abbr) u))).(\lambda (H4: (csuba g d1 x)).(eq_ind_r C (CHead x (Bind Abbr) u) (\lambda (c: C).(ex2 C (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (ex_intro2 C (\lambda (d2: C).(drop O O (CHead x (Bind Abbr) u) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_refl (CHead x (Bind Abbr) u)) H4) c2 H3)))) H2)))))))))) (\lambda (n: nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abbr) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: C).(\forall (u: T).((drop (S n) O c (CHead d1 (Bind Abbr) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c c2) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))))) (\lambda (n0: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop (S n) O (CSort n0) (CHead d1 (Bind Abbr) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: (csuba g (CSort n0) c2)).(and3_ind (eq C (CHead d1 (Bind Abbr) u) (CSort n0)) (eq nat (S n) O) (eq nat O O) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (H2: (eq C (CHead d1 (Bind Abbr) u) (CSort n0))).(\lambda (_: (eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (match H2 return (\lambda (c: C).(\lambda (_: (eq ? ? c)).((eq C c (CSort n0)) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))) with [refl_equal \Rightarrow (\lambda (H4: (eq C (CHead d1 (Bind Abbr) u) (CSort n0))).(let H5 \def (eq_ind C (CHead d1 (Bind Abbr) u) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n0) H4) in (False_ind (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) H5)))]) in (H5 (refl_equal C (CSort n0))))))) (drop_gen_sort n0 (S n) O (CHead d1 (Bind Abbr) u) H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).(\forall (u: T).((drop (S n) O c (CHead d1 (Bind Abbr) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c c2) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (u: T).(\lambda (H1: (drop (S n) O (CHead c k t) (CHead d1 (Bind Abbr) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H2: (csuba g (CHead c k t) c2)).(K_ind (\lambda (k0: K).((csuba g (CHead c k0 t) c2) \to ((drop (r k0 n) O c (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda (b: B).(\lambda (H3: (csuba g (CHead c (Bind b) t) c2)).(\lambda (H4: (drop (r (Bind b) n) O c (CHead d1 (Bind Abbr) u))).(B_ind (\lambda (b0: B).((csuba g (CHead c (Bind b0) t) c2) \to ((drop (r (Bind b0) n) O c (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))) (\lambda (H5: (csuba g (CHead c (Bind Abbr) t) c2)).(\lambda (H6: (drop (r (Bind Abbr) n) O c (CHead d1 (Bind Abbr) u))).(let H7 \def (csuba_gen_abbr g c c2 t H5) in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g c d2)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Abbr) t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abbr) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H10 \def (H c d1 u H6 g x H9) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (H11: (drop n O x (CHead x0 (Bind Abbr) u))).(\lambda (H12: (csuba g d1 x0)).(let H13 \def (refl_equal nat (r (Bind Abbr) n)) in (let H14 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abbr) u))) H11 (r (Bind Abbr) n) H13) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abbr) n x (CHead x0 (Bind Abbr) u) H14 t) H12)))))) H10)) c2 H8)))) H7)))) (\lambda (H5: (csuba g (CHead c (Bind Abst) t) c2)).(\lambda (H6: (drop (r (Bind Abst) n) O c (CHead d1 (Bind Abbr) u))).(let H7 \def (csuba_gen_abst g c c2 t H5) in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H9: (eq C c2 (CHead x (Bind Abst) t))).(\lambda (H10: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abst) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H11 \def (H c d1 u H6 g x H10) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abbr) u))).(\lambda (H13: (csuba g d1 x0)).(let H14 \def (refl_equal nat (r (Bind Abbr) n)) in (let H15 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abbr) u))) H12 (r (Bind Abbr) n) H14) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abbr) u) H15 t) H13)))))) H11)) c2 H9)))) H8)) (\lambda (H8: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H9: (eq C c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H10: (csuba g c x0)).(\lambda (_: (arity g c t (asucc g x2))).(\lambda (_: (arity g x0 x1 x2)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H13 \def (H c d1 u H6 g x0 H10) in (ex2_ind C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H14: (drop n O x0 (CHead x (Bind Abbr) u))).(\lambda (H15: (csuba g d1 x)).(let H16 \def (refl_equal nat (r (Bind Abbr) n)) in (let H17 \def (eq_ind nat n (\lambda (n: nat).(drop n O x0 (CHead x (Bind Abbr) u))) H14 (r (Bind Abbr) n) H16) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Bind Abbr) n x0 (CHead x (Bind Abbr) u) H17 x1) H15)))))) H13)) c2 H9)))))))) H8)) H7)))) (\lambda (H5: (csuba g (CHead c (Bind Void) t) c2)).(\lambda (H6: (drop (r (Bind Void) n) O c (CHead d1 (Bind Abbr) u))).(let H7 \def (csuba_gen_void g c c2 t H5) in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Void) t))) (\lambda (d2: C).(csuba g c d2)) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Void) t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Void) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H10 \def (H c d1 u H6 g x H9) in (ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (H11: (drop n O x (CHead x0 (Bind Abbr) u))).(\lambda (H12: (csuba g d1 x0)).(let H13 \def (refl_equal nat (r (Bind Abbr) n)) in (let H14 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abbr) u))) H11 (r (Bind Abbr) n) H13) in (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Void) n x (CHead x0 (Bind Abbr) u) H14 t) H12)))))) H10)) c2 H8)))) H7)))) b H3 H4)))) (\lambda (f: F).(\lambda (H3: (csuba g (CHead c (Flat f) t) c2)).(\lambda (H4: (drop (r (Flat f) n) O c (CHead d1 (Bind Abbr) u))).(let H5 \def (csuba_gen_flat g c c2 t f H3) in (ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g c d2))) (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c2 (CHead x0 (Flat f) x1))).(\lambda (H7: (csuba g c x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))) (let H8 \def (H0 d1 u H4 g x0 H7) in (ex2_ind C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x: C).(\lambda (H9: (drop (S n) O x0 (CHead x (Bind Abbr) u))).(\lambda (H10: (csuba g d1 x)).(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Flat f) n x0 (CHead x (Bind Abbr) u) H9 x1) H10)))) H8)) c2 H6))))) H5))))) k H2 (drop_gen_drop k c (CHead d1 (Bind Abbr) u) t n H1)))))))))))) c1)))) i). theorem csuba_drop_abst: \forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop i O c1 (CHead d1 (Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))))) \def - \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop n O c1 (CHead d1 (Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: T).(\lambda (H: (drop O O c1 (CHead d1 (Bind Abst) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: (csuba g c1 c2)).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csuba g c c2)) H0 (CHead d1 (Bind Abst) u1) (drop_gen_refl c1 (CHead d1 (Bind Abst) u1) H)) in (let H2 \def (csuba_gen_abst g d1 c2 u1 H1) in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H3: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CHead x (Bind Abst) u1))).(\lambda (H5: (csuba g d1 x)).(eq_ind_r C (CHead x (Bind Abst) u1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (or_introl (ex2 C (\lambda (d2: C).(drop O O (CHead x (Bind Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x (Bind Abst) u1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(drop O O (CHead x (Bind Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_refl (CHead x (Bind Abst) u1)) H5)) c2 H4)))) H3)) (\lambda (H3: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H4: (eq C c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H5: (csuba g d1 x0)).(\lambda (H6: (arity g d1 u1 (asucc g x2))).(\lambda (H7: (arity g x0 x1 x2)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (or_intror (ex2 C (\lambda (d2: C).(drop O O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (drop_refl (CHead x0 (Bind Abbr) x1)) H5 H6 H7)) c2 H4)))))))) H3)) H2)))))))))) (\lambda (n: nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop n O c1 (CHead d1 (Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c c2) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))))) (\lambda (n0: nat).(\lambda (d1: C).(\lambda (u1: T).(\lambda (H0: (drop (S n) O (CSort n0) (CHead d1 (Bind Abst) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: (csuba g (CSort n0) c2)).(and3_ind (eq C (CHead d1 (Bind Abst) u1) (CSort n0)) (eq nat (S n) O) (eq nat O O) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H2: (eq C (CHead d1 (Bind Abst) u1) (CSort n0))).(\lambda (_: (eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (match H2 return (\lambda (_: ?).(\lambda (c: C).((eq C c (CSort n0)) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))) with [refl_equal \Rightarrow (\lambda (H4: (eq C (CHead d1 (Bind Abst) u1) (CSort n0))).(let H5 \def (eq_ind C (CHead d1 (Bind Abst) u1) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n0) H4) in (False_ind (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) H5)))]) in (H5 (refl_equal C (CSort n0))))))) (drop_gen_sort n0 (S n) O (CHead d1 (Bind Abst) u1) H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c c2) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (u1: T).(\lambda (H1: (drop (S n) O (CHead c k t) (CHead d1 (Bind Abst) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H2: (csuba g (CHead c k t) c2)).(K_ind (\lambda (k0: K).((csuba g (CHead c k0 t) c2) \to ((drop (r k0 n) O c (CHead d1 (Bind Abst) u1)) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))) (\lambda (b: B).(\lambda (H3: (csuba g (CHead c (Bind b) t) c2)).(\lambda (H4: (drop (r (Bind b) n) O c (CHead d1 (Bind Abst) u1))).(B_ind (\lambda (b0: B).((csuba g (CHead c (Bind b0) t) c2) \to ((drop (r (Bind b0) n) O c (CHead d1 (Bind Abst) u1)) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))) (\lambda (H5: (csuba g (CHead c (Bind Abbr) t) c2)).(\lambda (H6: (drop (r (Bind Abbr) n) O c (CHead d1 (Bind Abst) u1))).(let H7 \def (csuba_gen_abbr g c c2 t H5) in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g c d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Abbr) t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abbr) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H10 \def (H c d1 u1 H6 g x H9) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H11: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abst) u1))).(\lambda (H13: (csuba g d1 x0)).(let H14 \def (refl_equal nat (r (Bind Abbr) n)) in (let H15 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abst) u1))) H12 (r (Bind Abbr) n) H14) in (or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abbr) n x (CHead x0 (Bind Abst) u1) H15 t) H13))))))) H11)) (\lambda (H11: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H12: (drop n O x (CHead x0 (Bind Abbr) x1))).(\lambda (H13: (csuba g d1 x0)).(\lambda (H14: (arity g d1 u1 (asucc g x2))).(\lambda (H15: (arity g x0 x1 x2)).(let H16 \def (refl_equal nat (r (Bind Abbr) n)) in (let H17 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abbr) x1))) H12 (r (Bind Abbr) n) H16) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (drop_drop (Bind Abbr) n x (CHead x0 (Bind Abbr) x1) H17 t) H13 H14 H15))))))))))) H11)) H10)) c2 H8)))) H7)))) (\lambda (H5: (csuba g (CHead c (Bind Abst) t) c2)).(\lambda (H6: (drop (r (Bind Abst) n) O c (CHead d1 (Bind Abst) u1))).(let H7 \def (csuba_gen_abst g c c2 t H5) in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H9: (eq C c2 (CHead x (Bind Abst) t))).(\lambda (H10: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abst) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H11 \def (H c d1 u1 H6 g x H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abst) u1))).(\lambda (H14: (csuba g d1 x0)).(let H15 \def (refl_equal nat (r (Bind Abbr) n)) in (let H16 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abst) u1))) H13 (r (Bind Abbr) n) H15) in (or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abst) u1) H16 t) H14))))))) H12)) (\lambda (H12: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H13: (drop n O x (CHead x0 (Bind Abbr) x1))).(\lambda (H14: (csuba g d1 x0)).(\lambda (H15: (arity g d1 u1 (asucc g x2))).(\lambda (H16: (arity g x0 x1 x2)).(let H17 \def (refl_equal nat (r (Bind Abbr) n)) in (let H18 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abbr) x1))) H13 (r (Bind Abbr) n) H17) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abbr) x1) H18 t) H14 H15 H16))))))))))) H12)) H11)) c2 H9)))) H8)) (\lambda (H8: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H9: (eq C c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H10: (csuba g c x0)).(\lambda (_: (arity g c t (asucc g x2))).(\lambda (_: (arity g x0 x1 x2)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H13 \def (H c d1 u1 H6 g x0 H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H14: (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H15: (drop n O x0 (CHead x (Bind Abst) u1))).(\lambda (H16: (csuba g d1 x)).(let H17 \def (refl_equal nat (r (Bind Abbr) n)) in (let H18 \def (eq_ind nat n (\lambda (n: nat).(drop n O x0 (CHead x (Bind Abst) u1))) H15 (r (Bind Abbr) n) H17) in (or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Bind Abbr) n x0 (CHead x (Bind Abst) u1) H18 x1) H16))))))) H14)) (\lambda (H14: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: A).(\lambda (H15: (drop n O x0 (CHead x3 (Bind Abbr) x4))).(\lambda (H16: (csuba g d1 x3)).(\lambda (H17: (arity g d1 u1 (asucc g x5))).(\lambda (H18: (arity g x3 x4 x5)).(let H19 \def (refl_equal nat (r (Bind Abbr) n)) in (let H20 \def (eq_ind nat n (\lambda (n: nat).(drop n O x0 (CHead x3 (Bind Abbr) x4))) H15 (r (Bind Abbr) n) H19) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x3 x4 x5 (drop_drop (Bind Abbr) n x0 (CHead x3 (Bind Abbr) x4) H20 x1) H16 H17 H18))))))))))) H14)) H13)) c2 H9)))))))) H8)) H7)))) (\lambda (H5: (csuba g (CHead c (Bind Void) t) c2)).(\lambda (H6: (drop (r (Bind Void) n) O c (CHead d1 (Bind Abst) u1))).(let H7 \def (csuba_gen_void g c c2 t H5) in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Void) t))) (\lambda (d2: C).(csuba g c d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Void) t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Void) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H10 \def (H c d1 u1 H6 g x H9) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H11: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abst) u1))).(\lambda (H13: (csuba g d1 x0)).(let H14 \def (refl_equal nat (r (Bind Abbr) n)) in (let H15 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abst) u1))) H12 (r (Bind Abbr) n) H14) in (or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Void) n x (CHead x0 (Bind Abst) u1) H15 t) H13))))))) H11)) (\lambda (H11: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H12: (drop n O x (CHead x0 (Bind Abbr) x1))).(\lambda (H13: (csuba g d1 x0)).(\lambda (H14: (arity g d1 u1 (asucc g x2))).(\lambda (H15: (arity g x0 x1 x2)).(let H16 \def (refl_equal nat (r (Bind Abbr) n)) in (let H17 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abbr) x1))) H12 (r (Bind Abbr) n) H16) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (drop_drop (Bind Void) n x (CHead x0 (Bind Abbr) x1) H17 t) H13 H14 H15))))))))))) H11)) H10)) c2 H8)))) H7)))) b H3 H4)))) (\lambda (f: F).(\lambda (H3: (csuba g (CHead c (Flat f) t) c2)).(\lambda (H4: (drop (r (Flat f) n) O c (CHead d1 (Bind Abst) u1))).(let H5 \def (csuba_gen_flat g c c2 t f H3) in (ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g c d2))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c2 (CHead x0 (Flat f) x1))).(\lambda (H7: (csuba g c x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H8 \def (H0 d1 u1 H4 g x0 H7) in (or_ind (ex2 C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H9: (ex2 C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H10: (drop (S n) O x0 (CHead x (Bind Abst) u1))).(\lambda (H11: (csuba g d1 x)).(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Flat f) n x0 (CHead x (Bind Abst) u1) H10 x1) H11))))) H9)) (\lambda (H9: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: A).(\lambda (H10: (drop (S n) O x0 (CHead x2 (Bind Abbr) x3))).(\lambda (H11: (csuba g d1 x2)).(\lambda (H12: (arity g d1 u1 (asucc g x4))).(\lambda (H13: (arity g x2 x3 x4)).(or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x2 x3 x4 (drop_drop (Flat f) n x0 (CHead x2 (Bind Abbr) x3) H10 x1) H11 H12 H13))))))))) H9)) H8)) c2 H6))))) H5))))) k H2 (drop_gen_drop k c (CHead d1 (Bind Abst) u1) t n H1)))))))))))) c1)))) i). + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop n O c1 (CHead d1 (Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: T).(\lambda (H: (drop O O c1 (CHead d1 (Bind Abst) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: (csuba g c1 c2)).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csuba g c c2)) H0 (CHead d1 (Bind Abst) u1) (drop_gen_refl c1 (CHead d1 (Bind Abst) u1) H)) in (let H2 \def (csuba_gen_abst g d1 c2 u1 H1) in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H3: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H4: (eq C c2 (CHead x (Bind Abst) u1))).(\lambda (H5: (csuba g d1 x)).(eq_ind_r C (CHead x (Bind Abst) u1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (or_introl (ex2 C (\lambda (d2: C).(drop O O (CHead x (Bind Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x (Bind Abst) u1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(drop O O (CHead x (Bind Abst) u1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_refl (CHead x (Bind Abst) u1)) H5)) c2 H4)))) H3)) (\lambda (H3: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H4: (eq C c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H5: (csuba g d1 x0)).(\lambda (H6: (arity g d1 u1 (asucc g x2))).(\lambda (H7: (arity g x0 x1 x2)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) (\lambda (c: C).(or (ex2 C (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O c (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (or_intror (ex2 C (\lambda (d2: C).(drop O O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop O O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (drop_refl (CHead x0 (Bind Abbr) x1)) H5 H6 H7)) c2 H4)))))))) H3)) H2)))))))))) (\lambda (n: nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: C).(\forall (u1: T).((drop n O c1 (CHead d1 (Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (d1: C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c c2) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))))) (\lambda (n0: nat).(\lambda (d1: C).(\lambda (u1: T).(\lambda (H0: (drop (S n) O (CSort n0) (CHead d1 (Bind Abst) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: (csuba g (CSort n0) c2)).(and3_ind (eq C (CHead d1 (Bind Abst) u1) (CSort n0)) (eq nat (S n) O) (eq nat O O) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H2: (eq C (CHead d1 (Bind Abst) u1) (CSort n0))).(\lambda (_: (eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (match H2 return (\lambda (c: C).(\lambda (_: (eq ? ? c)).((eq C c (CSort n0)) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))) with [refl_equal \Rightarrow (\lambda (H4: (eq C (CHead d1 (Bind Abst) u1) (CSort n0))).(let H5 \def (eq_ind C (CHead d1 (Bind Abst) u1) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n0) H4) in (False_ind (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) H5)))]) in (H5 (refl_equal C (CSort n0))))))) (drop_gen_sort n0 (S n) O (CHead d1 (Bind Abst) u1) H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abst) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c c2) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (u1: T).(\lambda (H1: (drop (S n) O (CHead c k t) (CHead d1 (Bind Abst) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H2: (csuba g (CHead c k t) c2)).(K_ind (\lambda (k0: K).((csuba g (CHead c k0 t) c2) \to ((drop (r k0 n) O c (CHead d1 (Bind Abst) u1)) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))) (\lambda (b: B).(\lambda (H3: (csuba g (CHead c (Bind b) t) c2)).(\lambda (H4: (drop (r (Bind b) n) O c (CHead d1 (Bind Abst) u1))).(B_ind (\lambda (b0: B).((csuba g (CHead c (Bind b0) t) c2) \to ((drop (r (Bind b0) n) O c (CHead d1 (Bind Abst) u1)) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))) (\lambda (H5: (csuba g (CHead c (Bind Abbr) t) c2)).(\lambda (H6: (drop (r (Bind Abbr) n) O c (CHead d1 (Bind Abst) u1))).(let H7 \def (csuba_gen_abbr g c c2 t H5) in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g c d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Abbr) t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abbr) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H10 \def (H c d1 u1 H6 g x H9) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H11: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abst) u1))).(\lambda (H13: (csuba g d1 x0)).(let H14 \def (refl_equal nat (r (Bind Abbr) n)) in (let H15 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abst) u1))) H12 (r (Bind Abbr) n) H14) in (or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abbr) n x (CHead x0 (Bind Abst) u1) H15 t) H13))))))) H11)) (\lambda (H11: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H12: (drop n O x (CHead x0 (Bind Abbr) x1))).(\lambda (H13: (csuba g d1 x0)).(\lambda (H14: (arity g d1 u1 (asucc g x2))).(\lambda (H15: (arity g x0 x1 x2)).(let H16 \def (refl_equal nat (r (Bind Abbr) n)) in (let H17 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abbr) x1))) H12 (r (Bind Abbr) n) H16) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (drop_drop (Bind Abbr) n x (CHead x0 (Bind Abbr) x1) H17 t) H13 H14 H15))))))))))) H11)) H10)) c2 H8)))) H7)))) (\lambda (H5: (csuba g (CHead c (Bind Abst) t) c2)).(\lambda (H6: (drop (r (Bind Abst) n) O c (CHead d1 (Bind Abst) u1))).(let H7 \def (csuba_gen_abst g c c2 t H5) in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) t))) (\lambda (d2: C).(csuba g c d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H9: (eq C c2 (CHead x (Bind Abst) t))).(\lambda (H10: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abst) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H11 \def (H c d1 u1 H6 g x H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abst) u1))).(\lambda (H14: (csuba g d1 x0)).(let H15 \def (refl_equal nat (r (Bind Abbr) n)) in (let H16 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abst) u1))) H13 (r (Bind Abbr) n) H15) in (or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abst) u1) H16 t) H14))))))) H12)) (\lambda (H12: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H13: (drop n O x (CHead x0 (Bind Abbr) x1))).(\lambda (H14: (csuba g d1 x0)).(\lambda (H15: (arity g d1 u1 (asucc g x2))).(\lambda (H16: (arity g x0 x1 x2)).(let H17 \def (refl_equal nat (r (Bind Abbr) n)) in (let H18 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abbr) x1))) H13 (r (Bind Abbr) n) H17) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abbr) x1) H18 t) H14 H15 H16))))))))))) H12)) H11)) c2 H9)))) H8)) (\lambda (H8: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g c d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H9: (eq C c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H10: (csuba g c x0)).(\lambda (_: (arity g c t (asucc g x2))).(\lambda (_: (arity g x0 x1 x2)).(eq_ind_r C (CHead x0 (Bind Abbr) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H13 \def (H c d1 u1 H6 g x0 H10) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H14: (ex2 C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H15: (drop n O x0 (CHead x (Bind Abst) u1))).(\lambda (H16: (csuba g d1 x)).(let H17 \def (refl_equal nat (r (Bind Abbr) n)) in (let H18 \def (eq_ind nat n (\lambda (n: nat).(drop n O x0 (CHead x (Bind Abst) u1))) H15 (r (Bind Abbr) n) H17) in (or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Bind Abbr) n x0 (CHead x (Bind Abst) u1) H18 x1) H16))))))) H14)) (\lambda (H14: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: A).(\lambda (H15: (drop n O x0 (CHead x3 (Bind Abbr) x4))).(\lambda (H16: (csuba g d1 x3)).(\lambda (H17: (arity g d1 u1 (asucc g x5))).(\lambda (H18: (arity g x3 x4 x5)).(let H19 \def (refl_equal nat (r (Bind Abbr) n)) in (let H20 \def (eq_ind nat n (\lambda (n: nat).(drop n O x0 (CHead x3 (Bind Abbr) x4))) H15 (r (Bind Abbr) n) H19) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abbr) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x3 x4 x5 (drop_drop (Bind Abbr) n x0 (CHead x3 (Bind Abbr) x4) H20 x1) H16 H17 H18))))))))))) H14)) H13)) c2 H9)))))))) H8)) H7)))) (\lambda (H5: (csuba g (CHead c (Bind Void) t) c2)).(\lambda (H6: (drop (r (Bind Void) n) O c (CHead d1 (Bind Abst) u1))).(let H7 \def (csuba_gen_void g c c2 t H5) in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Void) t))) (\lambda (d2: C).(csuba g c d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Void) t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Void) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H10 \def (H c d1 u1 H6 g x H9) in (or_ind (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H11: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abst) u1))).(\lambda (H13: (csuba g d1 x0)).(let H14 \def (refl_equal nat (r (Bind Abbr) n)) in (let H15 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abst) u1))) H12 (r (Bind Abbr) n) H14) in (or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Void) n x (CHead x0 (Bind Abst) u1) H15 t) H13))))))) H11)) (\lambda (H11: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H12: (drop n O x (CHead x0 (Bind Abbr) x1))).(\lambda (H13: (csuba g d1 x0)).(\lambda (H14: (arity g d1 u1 (asucc g x2))).(\lambda (H15: (arity g x0 x1 x2)).(let H16 \def (refl_equal nat (r (Bind Abbr) n)) in (let H17 \def (eq_ind nat n (\lambda (n: nat).(drop n O x (CHead x0 (Bind Abbr) x1))) H12 (r (Bind Abbr) n) H16) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (drop_drop (Bind Void) n x (CHead x0 (Bind Abbr) x1) H17 t) H13 H14 H15))))))))))) H11)) H10)) c2 H8)))) H7)))) b H3 H4)))) (\lambda (f: F).(\lambda (H3: (csuba g (CHead c (Flat f) t) c2)).(\lambda (H4: (drop (r (Flat f) n) O c (CHead d1 (Bind Abst) u1))).(let H5 \def (csuba_gen_flat g c c2 t f H3) in (ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g c d2))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c2 (CHead x0 (Flat f) x1))).(\lambda (H7: (csuba g c x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (let H8 \def (H0 d1 u1 H4 g x0 H7) in (or_ind (ex2 C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H9: (ex2 C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop (S n) O x0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: C).(\lambda (H10: (drop (S n) O x0 (CHead x (Bind Abst) u1))).(\lambda (H11: (csuba g d1 x)).(or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x (drop_drop (Flat f) n x0 (CHead x (Bind Abst) u1) H10 x1) H11))))) H9)) (\lambda (H9: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: A).(\lambda (H10: (drop (S n) O x0 (CHead x2 (Bind Abbr) x3))).(\lambda (H11: (csuba g d1 x2)).(\lambda (H12: (arity g d1 u1 (asucc g x4))).(\lambda (H13: (arity g x2 x3 x4)).(or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x2 x3 x4 (drop_drop (Flat f) n x0 (CHead x2 (Bind Abbr) x3) H10 x1) H11 H12 H13))))))))) H9)) H8)) c2 H6))))) H5))))) k H2 (drop_gen_drop k c (CHead d1 (Bind Abst) u1) t n H1)))))))))))) c1)))) i). theorem csuba_getl_abbr: \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).(\forall (i: nat).((getl i c1 (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))))) \def - \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abbr) u))).(let H0 \def (getl_gen_all c1 (CHead d1 (Bind Abbr) u) i H) in (ex2_ind C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u))) (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))) (\lambda (x: C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind Abbr) u))).((match x return (\lambda (_: ?).(\lambda (c: C).((drop i O c1 c) \to ((clear c (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))))) with [(CSort n) \Rightarrow (\lambda (_: (drop i O c1 (CSort n))).(\lambda (H4: (clear (CSort n) (CHead d1 (Bind Abbr) u))).(clear_gen_sort (CHead d1 (Bind Abbr) u) n H4 (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) | (CHead c k t) \Rightarrow (\lambda (H3: (drop i O c1 (CHead c k t))).(\lambda (H4: (clear (CHead c k t) (CHead d1 (Bind Abbr) u))).((match k return (\lambda (_: ?).(\lambda (k0: K).((drop i O c1 (CHead c k0 t)) \to ((clear (CHead c k0 t) (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))))) with [(Bind b) \Rightarrow (\lambda (H5: (drop i O c1 (CHead c (Bind b) t))).(\lambda (H6: (clear (CHead c (Bind b) t) (CHead d1 (Bind Abbr) u))).(let H7 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t H6)) in (\lambda (H10: (eq B Abbr b)).(\lambda (H11: (eq C d1 c)).(\lambda (c2: C).(\lambda (H12: (csuba g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda (t: T).(drop i O c1 (CHead c (Bind b) t))) H5 u H9) in (let H14 \def (eq_ind_r B b (\lambda (b: B).(drop i O c1 (CHead c (Bind b) u))) H13 Abbr H10) in (let H15 \def (eq_ind_r C c (\lambda (c: C).(drop i O c1 (CHead c (Bind Abbr) u))) H14 d1 H11) in (let H16 \def (csuba_drop_abbr i c1 d1 u H15 g c2 H12) in (ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (H17: (drop i O c2 (CHead x0 (Bind Abbr) u))).(\lambda (H18: (csuba g d1 x0)).(ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (getl_intro i c2 (CHead x0 (Bind Abbr) u) (CHead x0 (Bind Abbr) u) H17 (clear_bind Abbr x0 u)) H18)))) H16)))))))))) H8)) H7)))) | (Flat f) \Rightarrow (\lambda (H5: (drop i O c1 (CHead c (Flat f) t))).(\lambda (H6: (clear (CHead c (Flat f) t) (CHead d1 (Bind Abbr) u))).(let H7 \def H5 in (unintro C c1 (\lambda (c0: C).((drop i O c0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g c0 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))) (nat_ind (\lambda (n: nat).(\forall (x0: C).((drop n O x0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g x0 c2) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) (\lambda (x0: C).(\lambda (H8: (drop O O x0 (CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g x0 c2)).(let H10 \def (eq_ind C x0 (\lambda (c: C).(csuba g c c2)) H9 (CHead c (Flat f) t) (drop_gen_refl x0 (CHead c (Flat f) t) H8)) in (let H_y \def (clear_flat c (CHead d1 (Bind Abbr) u) (clear_gen_flat f c (CHead d1 (Bind Abbr) u) t H6) f t) in (let H11 \def (csuba_clear_conf g (CHead c (Flat f) t) c2 H10 (CHead d1 (Bind Abbr) u) H_y) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead d1 (Bind Abbr) u) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x1: C).(\lambda (H12: (csuba g (CHead d1 (Bind Abbr) u) x1)).(\lambda (H13: (clear c2 x1)).(let H14 \def (csuba_gen_abbr g d1 x1 u H12) in (ex2_ind C (\lambda (d2: C).(eq C x1 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x2: C).(\lambda (H15: (eq C x1 (CHead x2 (Bind Abbr) u))).(\lambda (H16: (csuba g d1 x2)).(let H17 \def (eq_ind C x1 (\lambda (c: C).(clear c2 c)) H13 (CHead x2 (Bind Abbr) u) H15) in (ex_intro2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x2 (getl_intro O c2 (CHead x2 (Bind Abbr) u) c2 (drop_refl c2) H17) H16))))) H14))))) H11)))))))) (\lambda (n: nat).(\lambda (H8: ((\forall (x: C).((drop n O x (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g x c2) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))))).(\lambda (x0: C).(\lambda (H9: (drop (S n) O x0 (CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g x0 c2)).(let H11 \def (drop_clear x0 (CHead c (Flat f) t) n H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x0 (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead c (Flat f) t))))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x1: B).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (clear x0 (CHead x2 (Bind x1) x3))).(\lambda (H13: (drop n O x2 (CHead c (Flat f) t))).(let H14 \def (csuba_clear_conf g x0 c2 H10 (CHead x2 (Bind x1) x3) H12) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead x2 (Bind x1) x3) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x4: C).(\lambda (H15: (csuba g (CHead x2 (Bind x1) x3) x4)).(\lambda (H16: (clear c2 x4)).(let H17 \def (csuba_gen_bind g x1 x2 x4 x3 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x4 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g x2 e2)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x5: B).(\lambda (x6: C).(\lambda (x7: T).(\lambda (H18: (eq C x4 (CHead x6 (Bind x5) x7))).(\lambda (H19: (csuba g x2 x6)).(let H20 \def (eq_ind C x4 (\lambda (c: C).(clear c2 c)) H16 (CHead x6 (Bind x5) x7) H18) in (let H21 \def (H8 x2 H13 x6 H19) in (ex2_ind C (\lambda (d2: C).(getl n x6 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x8: C).(\lambda (H22: (getl n x6 (CHead x8 (Bind Abbr) u))).(\lambda (H23: (csuba g d1 x8)).(ex_intro2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x8 (getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abbr) u) n H22) H23)))) H21)))))))) H17))))) H14))))))) H11)))))))) i) H7))))]) H3 H4)))]) H1 H2)))) H0))))))). + \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abbr) u))).(let H0 \def (getl_gen_all c1 (CHead d1 (Bind Abbr) u) i H) in (ex2_ind C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u))) (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))) (\lambda (x: C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind Abbr) u))).((match x return (\lambda (c: C).((drop i O c1 c) \to ((clear c (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) with [(CSort n) \Rightarrow (\lambda (_: (drop i O c1 (CSort n))).(\lambda (H4: (clear (CSort n) (CHead d1 (Bind Abbr) u))).(clear_gen_sort (CHead d1 (Bind Abbr) u) n H4 (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) | (CHead c k t) \Rightarrow (\lambda (H3: (drop i O c1 (CHead c k t))).(\lambda (H4: (clear (CHead c k t) (CHead d1 (Bind Abbr) u))).((match k return (\lambda (k0: K).((drop i O c1 (CHead c k0 t)) \to ((clear (CHead c k0 t) (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csuba g c1 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) with [(Bind b) \Rightarrow (\lambda (H5: (drop i O c1 (CHead c (Bind b) t))).(\lambda (H6: (clear (CHead c (Bind b) t) (CHead d1 (Bind Abbr) u))).(let H7 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t H6)) in (\lambda (H10: (eq B Abbr b)).(\lambda (H11: (eq C d1 c)).(\lambda (c2: C).(\lambda (H12: (csuba g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda (t: T).(drop i O c1 (CHead c (Bind b) t))) H5 u H9) in (let H14 \def (eq_ind_r B b (\lambda (b: B).(drop i O c1 (CHead c (Bind b) u))) H13 Abbr H10) in (let H15 \def (eq_ind_r C c (\lambda (c: C).(drop i O c1 (CHead c (Bind Abbr) u))) H14 d1 H11) in (let H16 \def (csuba_drop_abbr i c1 d1 u H15 g c2 H12) in (ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x0: C).(\lambda (H17: (drop i O c2 (CHead x0 (Bind Abbr) u))).(\lambda (H18: (csuba g d1 x0)).(ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x0 (getl_intro i c2 (CHead x0 (Bind Abbr) u) (CHead x0 (Bind Abbr) u) H17 (clear_bind Abbr x0 u)) H18)))) H16)))))))))) H8)) H7)))) | (Flat f) \Rightarrow (\lambda (H5: (drop i O c1 (CHead c (Flat f) t))).(\lambda (H6: (clear (CHead c (Flat f) t) (CHead d1 (Bind Abbr) u))).(let H7 \def H5 in (unintro C c1 (\lambda (c0: C).((drop i O c0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g c0 c2) \to (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))) (nat_ind (\lambda (n: nat).(\forall (x0: C).((drop n O x0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g x0 c2) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)))))))) (\lambda (x0: C).(\lambda (H8: (drop O O x0 (CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g x0 c2)).(let H10 \def (eq_ind C x0 (\lambda (c: C).(csuba g c c2)) H9 (CHead c (Flat f) t) (drop_gen_refl x0 (CHead c (Flat f) t) H8)) in (let H_y \def (clear_flat c (CHead d1 (Bind Abbr) u) (clear_gen_flat f c (CHead d1 (Bind Abbr) u) t H6) f t) in (let H11 \def (csuba_clear_conf g (CHead c (Flat f) t) c2 H10 (CHead d1 (Bind Abbr) u) H_y) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead d1 (Bind Abbr) u) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x1: C).(\lambda (H12: (csuba g (CHead d1 (Bind Abbr) u) x1)).(\lambda (H13: (clear c2 x1)).(let H14 \def (csuba_gen_abbr g d1 x1 u H12) in (ex2_ind C (\lambda (d2: C).(eq C x1 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x2: C).(\lambda (H15: (eq C x1 (CHead x2 (Bind Abbr) u))).(\lambda (H16: (csuba g d1 x2)).(let H17 \def (eq_ind C x1 (\lambda (c: C).(clear c2 c)) H13 (CHead x2 (Bind Abbr) u) H15) in (ex_intro2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x2 (getl_intro O c2 (CHead x2 (Bind Abbr) u) c2 (drop_refl c2) H17) H16))))) H14))))) H11)))))))) (\lambda (n: nat).(\lambda (H8: ((\forall (x: C).((drop n O x (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g x c2) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))))))))).(\lambda (x0: C).(\lambda (H9: (drop (S n) O x0 (CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g x0 c2)).(let H11 \def (drop_clear x0 (CHead c (Flat f) t) n H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x0 (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead c (Flat f) t))))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x1: B).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (clear x0 (CHead x2 (Bind x1) x3))).(\lambda (H13: (drop n O x2 (CHead c (Flat f) t))).(let H14 \def (csuba_clear_conf g x0 c2 H10 (CHead x2 (Bind x1) x3) H12) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead x2 (Bind x1) x3) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x4: C).(\lambda (H15: (csuba g (CHead x2 (Bind x1) x3) x4)).(\lambda (H16: (clear c2 x4)).(let H17 \def (csuba_gen_bind g x1 x2 x4 x3 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x4 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g x2 e2)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x5: B).(\lambda (x6: C).(\lambda (x7: T).(\lambda (H18: (eq C x4 (CHead x6 (Bind x5) x7))).(\lambda (H19: (csuba g x2 x6)).(let H20 \def (eq_ind C x4 (\lambda (c: C).(clear c2 c)) H16 (CHead x6 (Bind x5) x7) H18) in (let H21 \def (H8 x2 H13 x6 H19) in (ex2_ind C (\lambda (d2: C).(getl n x6 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2))) (\lambda (x8: C).(\lambda (H22: (getl n x6 (CHead x8 (Bind Abbr) u))).(\lambda (H23: (csuba g d1 x8)).(ex_intro2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(csuba g d1 d2)) x8 (getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abbr) u) n H22) H23)))) H21)))))))) H17))))) H14))))))) H11)))))))) i) H7))))]) H3 H4)))]) H1 H2)))) H0))))))). theorem csuba_getl_abst: \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u1: T).(\forall (i: nat).((getl i c1 (CHead d1 (Bind Abst) u1)) \to (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))))) \def - \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: T).(\lambda (i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abst) u1))).(let H0 \def (getl_gen_all c1 (CHead d1 (Bind Abst) u1) i H) in (ex2_ind C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abst) u1))) (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))) (\lambda (x: C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind Abst) u1))).((match x return (\lambda (_: ?).(\lambda (c: C).((drop i O c1 c) \to ((clear c (CHead d1 (Bind Abst) u1)) \to (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))))) with [(CSort n) \Rightarrow (\lambda (_: (drop i O c1 (CSort n))).(\lambda (H4: (clear (CSort n) (CHead d1 (Bind Abst) u1))).(clear_gen_sort (CHead d1 (Bind Abst) u1) n H4 (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) | (CHead c k t) \Rightarrow (\lambda (H3: (drop i O c1 (CHead c k t))).(\lambda (H4: (clear (CHead c k t) (CHead d1 (Bind Abst) u1))).((match k return (\lambda (_: ?).(\lambda (k0: K).((drop i O c1 (CHead c k0 t)) \to ((clear (CHead c k0 t) (CHead d1 (Bind Abst) u1)) \to (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))))) with [(Bind b) \Rightarrow (\lambda (H5: (drop i O c1 (CHead c (Bind b) t))).(\lambda (H6: (clear (CHead c (Bind b) t) (CHead d1 (Bind Abst) u1))).(let H7 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abst) u1) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abst) u1) t H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d1 (Bind Abst) u1) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abst) u1) t H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind Abst) u1) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abst) u1) t H6)) in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq C d1 c)).(\lambda (c2: C).(\lambda (H12: (csuba g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda (t: T).(drop i O c1 (CHead c (Bind b) t))) H5 u1 H9) in (let H14 \def (eq_ind_r B b (\lambda (b: B).(drop i O c1 (CHead c (Bind b) u1))) H13 Abst H10) in (let H15 \def (eq_ind_r C c (\lambda (c: C).(drop i O c1 (CHead c (Bind Abst) u1))) H14 d1 H11) in (let H16 \def (csuba_drop_abst i c1 d1 u1 H15 g c2 H12) in (or_ind (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H17: (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (H18: (drop i O c2 (CHead x0 (Bind Abst) u1))).(\lambda (H19: (csuba g d1 x0)).(or_introl (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x0 (getl_intro i c2 (CHead x0 (Bind Abst) u1) (CHead x0 (Bind Abst) u1) H18 (clear_bind Abst x0 u1)) H19))))) H17)) (\lambda (H17: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H18: (drop i O c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H19: (csuba g d1 x0)).(\lambda (H20: (arity g d1 u1 (asucc g x2))).(\lambda (H21: (arity g x0 x1 x2)).(or_intror (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (getl_intro i c2 (CHead x0 (Bind Abbr) x1) (CHead x0 (Bind Abbr) x1) H18 (clear_bind Abbr x0 x1)) H19 H20 H21))))))))) H17)) H16)))))))))) H8)) H7)))) | (Flat f) \Rightarrow (\lambda (H5: (drop i O c1 (CHead c (Flat f) t))).(\lambda (H6: (clear (CHead c (Flat f) t) (CHead d1 (Bind Abst) u1))).(let H7 \def H5 in (unintro C c1 (\lambda (c0: C).((drop i O c0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g c0 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))) (nat_ind (\lambda (n: nat).(\forall (x0: C).((drop n O x0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g x0 c2) \to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) (\lambda (x0: C).(\lambda (H8: (drop O O x0 (CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g x0 c2)).(let H10 \def (eq_ind C x0 (\lambda (c: C).(csuba g c c2)) H9 (CHead c (Flat f) t) (drop_gen_refl x0 (CHead c (Flat f) t) H8)) in (let H_y \def (clear_flat c (CHead d1 (Bind Abst) u1) (clear_gen_flat f c (CHead d1 (Bind Abst) u1) t H6) f t) in (let H11 \def (csuba_clear_conf g (CHead c (Flat f) t) c2 H10 (CHead d1 (Bind Abst) u1) H_y) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead d1 (Bind Abst) u1) e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x1: C).(\lambda (H12: (csuba g (CHead d1 (Bind Abst) u1) x1)).(\lambda (H13: (clear c2 x1)).(let H14 \def (csuba_gen_abst g d1 x1 u1 H12) in (or_ind (ex2 C (\lambda (d2: C).(eq C x1 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C x1 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H15: (ex2 C (\lambda (d2: C).(eq C x1 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(eq C x1 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x2: C).(\lambda (H16: (eq C x1 (CHead x2 (Bind Abst) u1))).(\lambda (H17: (csuba g d1 x2)).(let H18 \def (eq_ind C x1 (\lambda (c: C).(clear c2 c)) H13 (CHead x2 (Bind Abst) u1) H16) in (or_introl (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x2 (getl_intro O c2 (CHead x2 (Bind Abst) u1) c2 (drop_refl c2) H18) H17)))))) H15)) (\lambda (H15: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C x1 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C x1 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: A).(\lambda (H16: (eq C x1 (CHead x2 (Bind Abbr) x3))).(\lambda (H17: (csuba g d1 x2)).(\lambda (H18: (arity g d1 u1 (asucc g x4))).(\lambda (H19: (arity g x2 x3 x4)).(let H20 \def (eq_ind C x1 (\lambda (c: C).(clear c2 c)) H13 (CHead x2 (Bind Abbr) x3) H16) in (or_intror (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x2 x3 x4 (getl_intro O c2 (CHead x2 (Bind Abbr) x3) c2 (drop_refl c2) H20) H17 H18 H19)))))))))) H15)) H14))))) H11)))))))) (\lambda (n: nat).(\lambda (H8: ((\forall (x: C).((drop n O x (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g x c2) \to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))))).(\lambda (x0: C).(\lambda (H9: (drop (S n) O x0 (CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g x0 c2)).(let H11 \def (drop_clear x0 (CHead c (Flat f) t) n H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x0 (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead c (Flat f) t))))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x1: B).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (clear x0 (CHead x2 (Bind x1) x3))).(\lambda (H13: (drop n O x2 (CHead c (Flat f) t))).(let H14 \def (csuba_clear_conf g x0 c2 H10 (CHead x2 (Bind x1) x3) H12) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead x2 (Bind x1) x3) e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x4: C).(\lambda (H15: (csuba g (CHead x2 (Bind x1) x3) x4)).(\lambda (H16: (clear c2 x4)).(let H17 \def (csuba_gen_bind g x1 x2 x4 x3 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x4 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g x2 e2)))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x5: B).(\lambda (x6: C).(\lambda (x7: T).(\lambda (H18: (eq C x4 (CHead x6 (Bind x5) x7))).(\lambda (H19: (csuba g x2 x6)).(let H20 \def (eq_ind C x4 (\lambda (c: C).(clear c2 c)) H16 (CHead x6 (Bind x5) x7) H18) in (let H21 \def (H8 x2 H13 x6 H19) in (or_ind (ex2 C (\lambda (d2: C).(getl n x6 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x6 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H22: (ex2 C (\lambda (d2: C).(getl n x6 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(getl n x6 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x8: C).(\lambda (H23: (getl n x6 (CHead x8 (Bind Abst) u1))).(\lambda (H24: (csuba g d1 x8)).(or_introl (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x8 (getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abst) u1) n H23) H24))))) H22)) (\lambda (H22: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x6 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x6 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x8: C).(\lambda (x9: T).(\lambda (x10: A).(\lambda (H23: (getl n x6 (CHead x8 (Bind Abbr) x9))).(\lambda (H24: (csuba g d1 x8)).(\lambda (H25: (arity g d1 u1 (asucc g x10))).(\lambda (H26: (arity g x8 x9 x10)).(or_intror (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x8 x9 x10 (getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abbr) x9) n H23) H24 H25 H26))))))))) H22)) H21)))))))) H17))))) H14))))))) H11)))))))) i) H7))))]) H3 H4)))]) H1 H2)))) H0))))))). + \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u1: T).(\lambda (i: nat).(\lambda (H: (getl i c1 (CHead d1 (Bind Abst) u1))).(let H0 \def (getl_gen_all c1 (CHead d1 (Bind Abst) u1) i H) in (ex2_ind C (\lambda (e: C).(drop i O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abst) u1))) (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))) (\lambda (x: C).(\lambda (H1: (drop i O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind Abst) u1))).((match x return (\lambda (c: C).((drop i O c1 c) \to ((clear c (CHead d1 (Bind Abst) u1)) \to (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) with [(CSort n) \Rightarrow (\lambda (_: (drop i O c1 (CSort n))).(\lambda (H4: (clear (CSort n) (CHead d1 (Bind Abst) u1))).(clear_gen_sort (CHead d1 (Bind Abst) u1) n H4 (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) | (CHead c k t) \Rightarrow (\lambda (H3: (drop i O c1 (CHead c k t))).(\lambda (H4: (clear (CHead c k t) (CHead d1 (Bind Abst) u1))).((match k return (\lambda (k0: K).((drop i O c1 (CHead c k0 t)) \to ((clear (CHead c k0 t) (CHead d1 (Bind Abst) u1)) \to (\forall (c2: C).((csuba g c1 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) with [(Bind b) \Rightarrow (\lambda (H5: (drop i O c1 (CHead c (Bind b) t))).(\lambda (H6: (clear (CHead c (Bind b) t) (CHead d1 (Bind Abst) u1))).(let H7 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abst) u1) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abst) u1) t H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d1 (Bind Abst) u1) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abst) u1) t H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind Abst) u1) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abst) u1) t H6)) in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq C d1 c)).(\lambda (c2: C).(\lambda (H12: (csuba g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda (t: T).(drop i O c1 (CHead c (Bind b) t))) H5 u1 H9) in (let H14 \def (eq_ind_r B b (\lambda (b: B).(drop i O c1 (CHead c (Bind b) u1))) H13 Abst H10) in (let H15 \def (eq_ind_r C c (\lambda (c: C).(drop i O c1 (CHead c (Bind Abst) u1))) H14 d1 H11) in (let H16 \def (csuba_drop_abst i c1 d1 u1 H15 g c2 H12) in (or_ind (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H17: (ex2 C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop i O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (H18: (drop i O c2 (CHead x0 (Bind Abst) u1))).(\lambda (H19: (csuba g d1 x0)).(or_introl (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x0 (getl_intro i c2 (CHead x0 (Bind Abst) u1) (CHead x0 (Bind Abst) u1) H18 (clear_bind Abst x0 u1)) H19))))) H17)) (\lambda (H17: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop i O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H18: (drop i O c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H19: (csuba g d1 x0)).(\lambda (H20: (arity g d1 u1 (asucc g x2))).(\lambda (H21: (arity g x0 x1 x2)).(or_intror (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x0 x1 x2 (getl_intro i c2 (CHead x0 (Bind Abbr) x1) (CHead x0 (Bind Abbr) x1) H18 (clear_bind Abbr x0 x1)) H19 H20 H21))))))))) H17)) H16)))))))))) H8)) H7)))) | (Flat f) \Rightarrow (\lambda (H5: (drop i O c1 (CHead c (Flat f) t))).(\lambda (H6: (clear (CHead c (Flat f) t) (CHead d1 (Bind Abst) u1))).(let H7 \def H5 in (unintro C c1 (\lambda (c0: C).((drop i O c0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g c0 c2) \to (or (ex2 C (\lambda (d2: C).(getl i c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl i c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))) (nat_ind (\lambda (n: nat).(\forall (x0: C).((drop n O x0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g x0 c2) \to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))))))))) (\lambda (x0: C).(\lambda (H8: (drop O O x0 (CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csuba g x0 c2)).(let H10 \def (eq_ind C x0 (\lambda (c: C).(csuba g c c2)) H9 (CHead c (Flat f) t) (drop_gen_refl x0 (CHead c (Flat f) t) H8)) in (let H_y \def (clear_flat c (CHead d1 (Bind Abst) u1) (clear_gen_flat f c (CHead d1 (Bind Abst) u1) t H6) f t) in (let H11 \def (csuba_clear_conf g (CHead c (Flat f) t) c2 H10 (CHead d1 (Bind Abst) u1) H_y) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead d1 (Bind Abst) u1) e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x1: C).(\lambda (H12: (csuba g (CHead d1 (Bind Abst) u1) x1)).(\lambda (H13: (clear c2 x1)).(let H14 \def (csuba_gen_abst g d1 x1 u1 H12) in (or_ind (ex2 C (\lambda (d2: C).(eq C x1 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C x1 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H15: (ex2 C (\lambda (d2: C).(eq C x1 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(eq C x1 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x2: C).(\lambda (H16: (eq C x1 (CHead x2 (Bind Abst) u1))).(\lambda (H17: (csuba g d1 x2)).(let H18 \def (eq_ind C x1 (\lambda (c: C).(clear c2 c)) H13 (CHead x2 (Bind Abst) u1) H16) in (or_introl (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x2 (getl_intro O c2 (CHead x2 (Bind Abst) u1) c2 (drop_refl c2) H18) H17)))))) H15)) (\lambda (H15: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C x1 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C x1 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: A).(\lambda (H16: (eq C x1 (CHead x2 (Bind Abbr) x3))).(\lambda (H17: (csuba g d1 x2)).(\lambda (H18: (arity g d1 u1 (asucc g x4))).(\lambda (H19: (arity g x2 x3 x4)).(let H20 \def (eq_ind C x1 (\lambda (c: C).(clear c2 c)) H13 (CHead x2 (Bind Abbr) x3) H16) in (or_intror (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x2 x3 x4 (getl_intro O c2 (CHead x2 (Bind Abbr) x3) c2 (drop_refl c2) H20) H17 H18 H19)))))))))) H15)) H14))))) H11)))))))) (\lambda (n: nat).(\lambda (H8: ((\forall (x: C).((drop n O x (CHead c (Flat f) t)) \to (\forall (c2: C).((csuba g x c2) \to (or (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))))))))).(\lambda (x0: C).(\lambda (H9: (drop (S n) O x0 (CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csuba g x0 c2)).(let H11 \def (drop_clear x0 (CHead c (Flat f) t) n H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x0 (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n O e (CHead c (Flat f) t))))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x1: B).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (clear x0 (CHead x2 (Bind x1) x3))).(\lambda (H13: (drop n O x2 (CHead c (Flat f) t))).(let H14 \def (csuba_clear_conf g x0 c2 H10 (CHead x2 (Bind x1) x3) H12) in (ex2_ind C (\lambda (e2: C).(csuba g (CHead x2 (Bind x1) x3) e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x4: C).(\lambda (H15: (csuba g (CHead x2 (Bind x1) x3) x4)).(\lambda (H16: (clear c2 x4)).(let H17 \def (csuba_gen_bind g x1 x2 x4 x3 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x4 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csuba g x2 e2)))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x5: B).(\lambda (x6: C).(\lambda (x7: T).(\lambda (H18: (eq C x4 (CHead x6 (Bind x5) x7))).(\lambda (H19: (csuba g x2 x6)).(let H20 \def (eq_ind C x4 (\lambda (c: C).(clear c2 c)) H16 (CHead x6 (Bind x5) x7) H18) in (let H21 \def (H8 x2 H13 x6 H19) in (or_ind (ex2 C (\lambda (d2: C).(getl n x6 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x6 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (H22: (ex2 C (\lambda (d2: C).(getl n x6 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(getl n x6 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x8: C).(\lambda (H23: (getl n x6 (CHead x8 (Bind Abst) u1))).(\lambda (H24: (csuba g d1 x8)).(or_introl (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) x8 (getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abst) u1) n H23) H24))))) H22)) (\lambda (H22: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x6 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl n x6 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) (or (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x8: C).(\lambda (x9: T).(\lambda (x10: A).(\lambda (H23: (getl n x6 (CHead x8 (Bind Abbr) x9))).(\lambda (H24: (csuba g d1 x8)).(\lambda (H25: (arity g d1 u1 (asucc g x10))).(\lambda (H26: (arity g x8 x9 x10)).(or_intror (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(getl (S n) c2 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))) x8 x9 x10 (getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abbr) x9) n H23) H24 H25 H26))))))))) H22)) H21)))))))) H17))))) H14))))))) H11)))))))) i) H7))))]) H3 H4)))]) H1 H2)))) H0))))))). theorem csuba_arity: \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (a: A).((arity g c1 t a) \to (\forall (c2: C).((csuba g c1 c2) \to (arity g c2 t a))))))) @@ -2347,7 +2347,7 @@ theorem arity_appls_appl: theorem arity_sred_wcpr0_pr0: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (a: A).((arity g c1 t1 a) \to (\forall (c2: C).((wcpr0 c1 c2) \to (\forall (t2: T).((pr0 t1 t2) \to (arity g c2 t2 a))))))))) \def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (a: A).(\lambda (H: (arity g c1 t1 a)).(arity_ind g (\lambda (c: C).(\lambda (t: T).(\lambda (a0: A).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a0)))))))) (\lambda (c: C).(\lambda (n: nat).(\lambda (c2: C).(\lambda (_: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H1: (pr0 (TSort n) t2)).(eq_ind_r T (TSort n) (\lambda (t: T).(arity g c2 t (ASort O n))) (arity_sort g c2 n) t2 (pr0_gen_sort t2 n H1)))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (H2: ((\forall (c2: C).((wcpr0 d c2) \to (\forall (t2: T).((pr0 u t2) \to (arity g c2 t2 a0))))))).(\lambda (c2: C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H4: (pr0 (TLRef i) t2)).(eq_ind_r T (TLRef i) (\lambda (t: T).(arity g c2 t a0)) (ex3_2_ind C T (\lambda (e2: C).(\lambda (u2: T).(getl i c2 (CHead e2 (Bind Abbr) u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u u2))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (getl i c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H6: (wcpr0 d x0)).(\lambda (H7: (pr0 u x1)).(arity_abbr g c2 x0 x1 i H5 a0 (H2 x0 H6 x1 H7))))))) (wcpr0_getl c c2 H3 i d u (Bind Abbr) H0)) t2 (pr0_gen_lref t2 i H4)))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (H2: ((\forall (c2: C).((wcpr0 d c2) \to (\forall (t2: T).((pr0 u t2) \to (arity g c2 t2 (asucc g a0)))))))).(\lambda (c2: C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H4: (pr0 (TLRef i) t2)).(eq_ind_r T (TLRef i) (\lambda (t: T).(arity g c2 t a0)) (ex3_2_ind C T (\lambda (e2: C).(\lambda (u2: T).(getl i c2 (CHead e2 (Bind Abst) u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u u2))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (getl i c2 (CHead x0 (Bind Abst) x1))).(\lambda (H6: (wcpr0 d x0)).(\lambda (H7: (pr0 u x1)).(arity_abst g c2 x0 x1 i H5 a0 (H2 x0 H6 x1 H7))))))) (wcpr0_getl c c2 H3 i d u (Bind Abst) H0)) t2 (pr0_gen_lref t2 i H4)))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H2: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 u t2) \to (arity g c2 t2 a1))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (H3: (arity g (CHead c (Bind b) u) t a2)).(\lambda (H4: ((\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a2))))))).(\lambda (c2: C).(\lambda (H5: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H6: (pr0 (THead (Bind b) u t) t2)).(insert_eq T (THead (Bind b) u t) (\lambda (t0: T).(pr0 t0 t2)) (arity g c2 t2 a2) (\lambda (y: T).(\lambda (H7: (pr0 y t2)).(pr0_ind (\lambda (t0: T).(\lambda (t3: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 t3 a2)))) (\lambda (t0: T).(\lambda (H8: (eq T t0 (THead (Bind b) u t))).(let H9 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Bind b) u t) H8) in (eq_ind_r T (THead (Bind b) u t) (\lambda (t3: T).(arity g c2 t3 a2)) (arity_bind g b H0 c2 u a1 (H2 c2 H5 u (pr0_refl u)) t a2 (H4 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H5 u u (pr0_refl u) (Bind b)) t (pr0_refl t))) t0 H9)))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (H8: (pr0 u1 u2)).(\lambda (H9: (((eq T u1 (THead (Bind b) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H10: (pr0 t3 t4)).(\lambda (H11: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (k: K).(\lambda (H12: (eq T (THead k u1 t3) (THead (Bind b) u t))).(let H13 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t3) (THead (Bind b) u t) H12) in ((let H14 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t3) (THead (Bind b) u t) H12) in ((let H15 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) (THead k u1 t3) (THead (Bind b) u t) H12) in (\lambda (H16: (eq T u1 u)).(\lambda (H17: (eq K k (Bind b))).(eq_ind_r K (Bind b) (\lambda (k0: K).(arity g c2 (THead k0 u2 t4) a2)) (let H18 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 t4 a2))) H11 t H15) in (let H19 \def (eq_ind T t3 (\lambda (t: T).(pr0 t t4)) H10 t H15) in (let H20 \def (eq_ind T u1 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 u2 a2))) H9 u H16) in (let H21 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H8 u H16) in (arity_bind g b H0 c2 u2 a1 (H2 c2 H5 u2 H21) t4 a2 (H4 (CHead c2 (Bind b) u2) (wcpr0_comp c c2 H5 u u2 H21 (Bind b)) t4 H19)))))) k H17)))) H14)) H13)))))))))))) (\lambda (u0: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind b) u t)) \to (arity g c2 v2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (H12: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Bind b) u t))).(let H13 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t) H12) in (False_ind (arity g c2 (THead (Bind Abbr) v2 t4) a2) H13)))))))))))) (\lambda (b0: B).(\lambda (_: (not (eq B b0 Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind b) u t)) \to (arity g c2 v2 a2)))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead (Bind b) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (H15: (eq T (THead (Flat Appl) v1 (THead (Bind b0) u1 t3)) (THead (Bind b) u t))).(let H16 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b0) u1 t3)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t) H15) in (False_ind (arity g c2 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) a2) H16))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (H8: (pr0 u1 u2)).(\lambda (H9: (((eq T u1 (THead (Bind b) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H10: (pr0 t3 t4)).(\lambda (H11: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (w: T).(\lambda (H12: (subst0 O u2 t4 w)).(\lambda (H13: (eq T (THead (Bind Abbr) u1 t3) (THead (Bind b) u t))).(let H14 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (THead (Bind Abbr) u1 t3) (THead (Bind b) u t) H13) in ((let H15 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u1 t3) (THead (Bind b) u t) H13) in ((let H16 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u1 t3) (THead (Bind b) u t) H13) in (\lambda (H17: (eq T u1 u)).(\lambda (H18: (eq B Abbr b)).(let H19 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 t4 a2))) H11 t H16) in (let H20 \def (eq_ind T t3 (\lambda (t: T).(pr0 t t4)) H10 t H16) in (let H21 \def (eq_ind T u1 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 u2 a2))) H9 u H17) in (let H22 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H8 u H17) in (let H23 \def (eq_ind_r B b (\lambda (b: B).((eq T t (THead (Bind b) u t)) \to (arity g c2 t4 a2))) H19 Abbr H18) in (let H24 \def (eq_ind_r B b (\lambda (b: B).((eq T u (THead (Bind b) u t)) \to (arity g c2 u2 a2))) H21 Abbr H18) in (let H25 \def (eq_ind_r B b (\lambda (b: B).(\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a2)))))) H4 Abbr H18) in (let H26 \def (eq_ind_r B b (\lambda (b: B).(arity g (CHead c (Bind b) u) t a2)) H3 Abbr H18) in (let H27 \def (eq_ind_r B b (\lambda (b: B).(not (eq B b Abst))) H0 Abbr H18) in (arity_bind g Abbr H27 c2 u2 a1 (H2 c2 H5 u2 H22) w a2 (arity_subst0 g (CHead c2 (Bind Abbr) u2) t4 a2 (H25 (CHead c2 (Bind Abbr) u2) (wcpr0_comp c c2 H5 u u2 H22 (Bind Abbr)) t4 H20) c2 u2 O (getl_refl Abbr c2 u2) w H12)))))))))))))) H15)) H14))))))))))))) (\lambda (b0: B).(\lambda (H8: (not (eq B b0 Abst))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 t4)).(\lambda (H10: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (u0: T).(\lambda (H11: (eq T (THead (Bind b0) u0 (lift (S O) O t3)) (THead (Bind b) u t))).(let H12 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u0 (lift (S O) O t3)) (THead (Bind b) u t) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b0) u0 (lift (S O) O t3)) (THead (Bind b) u t) H11) in ((let H14 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t3) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t3) | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) u0 (lift (S O) O t3)) (THead (Bind b) u t) H11) in (\lambda (_: (eq T u0 u)).(\lambda (H16: (eq B b0 b)).(let H17 \def (eq_ind B b0 (\lambda (b: B).(not (eq B b Abst))) H8 b H16) in (let H18 \def (eq_ind_r T t (\lambda (t: T).((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2))) H10 (lift (S O) O t3) H14) in (let H19 \def (eq_ind_r T t (\lambda (t: T).(\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a2)))))) H4 (lift (S O) O t3) H14) in (let H20 \def (eq_ind_r T t (\lambda (t: T).(arity g (CHead c (Bind b) u) t a2)) H3 (lift (S O) O t3) H14) in (arity_gen_lift g (CHead c2 (Bind b) u) t4 a2 (S O) O (H19 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H5 u u (pr0_refl u) (Bind b)) (lift (S O) O t4) (pr0_lift t3 t4 H9 (S O) O)) c2 (drop_drop (Bind b) O c2 c2 (drop_refl c2) u))))))))) H13)) H12)))))))))) (\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (u0: T).(\lambda (H10: (eq T (THead (Flat Cast) u0 t3) (THead (Bind b) u t))).(let H11 \def (eq_ind T (THead (Flat Cast) u0 t3) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t) H10) in (False_ind (arity g c2 t4 a2) H11)))))))) y t2 H7))) H6)))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 u t2) \to (arity g c2 t2 (asucc g a1)))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (H2: (arity g (CHead c (Bind Abst) u) t a2)).(\lambda (H3: ((\forall (c2: C).((wcpr0 (CHead c (Bind Abst) u) c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a2))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Bind Abst) u t) t2)).(insert_eq T (THead (Bind Abst) u t) (\lambda (t0: T).(pr0 t0 t2)) (arity g c2 t2 (AHead a1 a2)) (\lambda (y: T).(\lambda (H6: (pr0 y t2)).(pr0_ind (\lambda (t0: T).(\lambda (t3: T).((eq T t0 (THead (Bind Abst) u t)) \to (arity g c2 t3 (AHead a1 a2))))) (\lambda (t0: T).(\lambda (H7: (eq T t0 (THead (Bind Abst) u t))).(let H8 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Bind Abst) u t) H7) in (eq_ind_r T (THead (Bind Abst) u t) (\lambda (t3: T).(arity g c2 t3 (AHead a1 a2))) (arity_head g c2 u a1 (H1 c2 H4 u (pr0_refl u)) t a2 (H3 (CHead c2 (Bind Abst) u) (wcpr0_comp c c2 H4 u u (pr0_refl u) (Bind Abst)) t (pr0_refl t))) t0 H8)))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (H7: (pr0 u1 u2)).(\lambda (H8: (((eq T u1 (THead (Bind Abst) u t)) \to (arity g c2 u2 (AHead a1 a2))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 t4)).(\lambda (H10: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2))))).(\lambda (k: K).(\lambda (H11: (eq T (THead k u1 t3) (THead (Bind Abst) u t))).(let H12 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t3) (THead (Bind Abst) u t) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t3) (THead (Bind Abst) u t) H11) in ((let H14 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) (THead k u1 t3) (THead (Bind Abst) u t) H11) in (\lambda (H15: (eq T u1 u)).(\lambda (H16: (eq K k (Bind Abst))).(eq_ind_r K (Bind Abst) (\lambda (k0: K).(arity g c2 (THead k0 u2 t4) (AHead a1 a2))) (let H17 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2)))) H10 t H14) in (let H18 \def (eq_ind T t3 (\lambda (t: T).(pr0 t t4)) H9 t H14) in (let H19 \def (eq_ind T u1 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (arity g c2 u2 (AHead a1 a2)))) H8 u H15) in (let H20 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 u H15) in (arity_head g c2 u2 a1 (H1 c2 H4 u2 H20) t4 a2 (H3 (CHead c2 (Bind Abst) u2) (wcpr0_comp c c2 H4 u u2 H20 (Bind Abst)) t4 H18)))))) k H16)))) H13)) H12)))))))))))) (\lambda (u0: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind Abst) u t)) \to (arity g c2 v2 (AHead a1 a2))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2))))).(\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Bind Abst) u t))).(let H12 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t) H11) in (False_ind (arity g c2 (THead (Bind Abbr) v2 t4) (AHead a1 a2)) H12)))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind Abst) u t)) \to (arity g c2 v2 (AHead a1 a2))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead (Bind Abst) u t)) \to (arity g c2 u2 (AHead a1 a2))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2))))).(\lambda (H14: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Bind Abst) u t))).(let H15 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t) H14) in (False_ind (arity g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) (AHead a1 a2)) H15))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead (Bind Abst) u t)) \to (arity g c2 u2 (AHead a1 a2))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2))))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t4 w)).(\lambda (H12: (eq T (THead (Bind Abbr) u1 t3) (THead (Bind Abst) u t))).(let H13 \def (eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Abst) u t) H12) in (False_ind (arity g c2 (THead (Bind Abbr) u2 w) (AHead a1 a2)) H13))))))))))))) (\lambda (b: B).(\lambda (H7: (not (eq B b Abst))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (H9: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2))))).(\lambda (u0: T).(\lambda (H10: (eq T (THead (Bind b) u0 (lift (S O) O t3)) (THead (Bind Abst) u t))).(let H11 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u0 (lift (S O) O t3)) (THead (Bind Abst) u t) H10) in ((let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b) u0 (lift (S O) O t3)) (THead (Bind Abst) u t) H10) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t3) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t3) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u0 (lift (S O) O t3)) (THead (Bind Abst) u t) H10) in (\lambda (_: (eq T u0 u)).(\lambda (H15: (eq B b Abst)).(let H16 \def (eq_ind B b (\lambda (b: B).(not (eq B b Abst))) H7 Abst H15) in (let H17 \def (eq_ind_r T t (\lambda (t: T).((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2)))) H9 (lift (S O) O t3) H13) in (let H18 \def (eq_ind_r T t (\lambda (t: T).(\forall (c2: C).((wcpr0 (CHead c (Bind Abst) u) c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a2)))))) H3 (lift (S O) O t3) H13) in (let H19 \def (eq_ind_r T t (\lambda (t: T).(arity g (CHead c (Bind Abst) u) t a2)) H2 (lift (S O) O t3) H13) in (let H20 \def (match (H16 (refl_equal B Abst)) return (\lambda (_: ?).(arity g c2 t4 (AHead a1 a2))) with []) in H20)))))))) H12)) H11)))))))))) (\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2))))).(\lambda (u0: T).(\lambda (H9: (eq T (THead (Flat Cast) u0 t3) (THead (Bind Abst) u t))).(let H10 \def (eq_ind T (THead (Flat Cast) u0 t3) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t) H9) in (False_ind (arity g c2 t4 (AHead a1 a2)) H10)))))))) y t2 H6))) H5)))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 u t2) \to (arity g c2 t2 a1))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (H2: (arity g c t (AHead a1 a2))).(\lambda (H3: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 (AHead a1 a2)))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Flat Appl) u t) t2)).(insert_eq T (THead (Flat Appl) u t) (\lambda (t0: T).(pr0 t0 t2)) (arity g c2 t2 a2) (\lambda (y: T).(\lambda (H6: (pr0 y t2)).(pr0_ind (\lambda (t0: T).(\lambda (t3: T).((eq T t0 (THead (Flat Appl) u t)) \to (arity g c2 t3 a2)))) (\lambda (t0: T).(\lambda (H7: (eq T t0 (THead (Flat Appl) u t))).(let H8 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Flat Appl) u t) H7) in (eq_ind_r T (THead (Flat Appl) u t) (\lambda (t3: T).(arity g c2 t3 a2)) (arity_appl g c2 u a1 (H1 c2 H4 u (pr0_refl u)) t a2 (H3 c2 H4 t (pr0_refl t))) t0 H8)))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (H7: (pr0 u1 u2)).(\lambda (H8: (((eq T u1 (THead (Flat Appl) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 t4)).(\lambda (H10: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (k: K).(\lambda (H11: (eq T (THead k u1 t3) (THead (Flat Appl) u t))).(let H12 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t3) (THead (Flat Appl) u t) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t3) (THead (Flat Appl) u t) H11) in ((let H14 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) (THead k u1 t3) (THead (Flat Appl) u t) H11) in (\lambda (H15: (eq T u1 u)).(\lambda (H16: (eq K k (Flat Appl))).(eq_ind_r K (Flat Appl) (\lambda (k0: K).(arity g c2 (THead k0 u2 t4) a2)) (let H17 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2))) H10 t H14) in (let H18 \def (eq_ind T t3 (\lambda (t: T).(pr0 t t4)) H9 t H14) in (let H19 \def (eq_ind T u1 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (arity g c2 u2 a2))) H8 u H15) in (let H20 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 u H15) in (arity_appl g c2 u2 a1 (H1 c2 H4 u2 H20) t4 a2 (H3 c2 H4 t4 H18)))))) k H16)))) H13)) H12)))))))))))) (\lambda (u0: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H7: (pr0 v1 v2)).(\lambda (H8: (((eq T v1 (THead (Flat Appl) u t)) \to (arity g c2 v2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 t4)).(\lambda (H10: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Flat Appl) u t))).(let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Flat Appl) u t) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow (THead (Bind Abst) u0 t3) | (TLRef _) \Rightarrow (THead (Bind Abst) u0 t3) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Flat Appl) u t) H11) in (\lambda (H14: (eq T v1 u)).(let H15 \def (eq_ind T v1 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (arity g c2 v2 a2))) H8 u H14) in (let H16 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H7 u H14) in (let H17 \def (eq_ind_r T t (\lambda (t: T).((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2))) H10 (THead (Bind Abst) u0 t3) H13) in (let H18 \def (eq_ind_r T t (\lambda (t: T).((eq T u (THead (Flat Appl) u t)) \to (arity g c2 v2 a2))) H15 (THead (Bind Abst) u0 t3) H13) in (let H19 \def (eq_ind_r T t (\lambda (t: T).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 (AHead a1 a2))))))) H3 (THead (Bind Abst) u0 t3) H13) in (let H20 \def (eq_ind_r T t (\lambda (t: T).(arity g c t (AHead a1 a2))) H2 (THead (Bind Abst) u0 t3) H13) in (let H21 \def (H1 c2 H4 v2 H16) in (let H22 \def (H19 c2 H4 (THead (Bind Abst) u0 t4) (pr0_comp u0 u0 (pr0_refl u0) t3 t4 H9 (Bind Abst))) in (let H23 \def (arity_gen_abst g c2 u0 t4 (AHead a1 a2) H22) in (ex3_2_ind A A (\lambda (a3: A).(\lambda (a4: A).(eq A (AHead a1 a2) (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c2 u0 (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c2 (Bind Abst) u0) t4 a4))) (arity g c2 (THead (Bind Abbr) v2 t4) a2) (\lambda (x0: A).(\lambda (x1: A).(\lambda (H24: (eq A (AHead a1 a2) (AHead x0 x1))).(\lambda (H25: (arity g c2 u0 (asucc g x0))).(\lambda (H26: (arity g (CHead c2 (Bind Abst) u0) t4 x1)).(let H27 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a2) (AHead x0 x1) H24) in ((let H28 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: ?).A) with [(ASort _ _) \Rightarrow a2 | (AHead _ a) \Rightarrow a])) (AHead a1 a2) (AHead x0 x1) H24) in (\lambda (H29: (eq A a1 x0)).(let H30 \def (eq_ind_r A x1 (\lambda (a: A).(arity g (CHead c2 (Bind Abst) u0) t4 a)) H26 a2 H28) in (let H31 \def (eq_ind_r A x0 (\lambda (a: A).(arity g c2 u0 (asucc g a))) H25 a1 H29) in (arity_bind g Abbr not_abbr_abst c2 v2 a1 H21 t4 a2 (csuba_arity g (CHead c2 (Bind Abst) u0) t4 a2 H30 (CHead c2 (Bind Abbr) v2) (csuba_abst g c2 c2 (csuba_refl g c2) u0 a1 H31 v2 H21))))))) H27))))))) H23)))))))))))) H12)))))))))))) (\lambda (b: B).(\lambda (H7: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H8: (pr0 v1 v2)).(\lambda (H9: (((eq T v1 (THead (Flat Appl) u t)) \to (arity g c2 v2 a2)))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (((eq T u1 (THead (Flat Appl) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H12: (pr0 t3 t4)).(\lambda (H13: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (H14: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) u t))).(let H15 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) u t) H14) in ((let H16 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow (THead (Bind b) u1 t3) | (TLRef _) \Rightarrow (THead (Bind b) u1 t3) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) u t) H14) in (\lambda (H17: (eq T v1 u)).(let H18 \def (eq_ind T v1 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (arity g c2 v2 a2))) H9 u H17) in (let H19 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H8 u H17) in (let H20 \def (eq_ind_r T t (\lambda (t: T).((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2))) H13 (THead (Bind b) u1 t3) H16) in (let H21 \def (eq_ind_r T t (\lambda (t: T).((eq T u1 (THead (Flat Appl) u t)) \to (arity g c2 u2 a2))) H11 (THead (Bind b) u1 t3) H16) in (let H22 \def (eq_ind_r T t (\lambda (t: T).((eq T u (THead (Flat Appl) u t)) \to (arity g c2 v2 a2))) H18 (THead (Bind b) u1 t3) H16) in (let H23 \def (eq_ind_r T t (\lambda (t: T).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 (AHead a1 a2))))))) H3 (THead (Bind b) u1 t3) H16) in (let H24 \def (eq_ind_r T t (\lambda (t: T).(arity g c t (AHead a1 a2))) H2 (THead (Bind b) u1 t3) H16) in (let H25 \def (H1 c2 H4 v2 H19) in (let H26 \def (H23 c2 H4 (THead (Bind b) u2 t4) (pr0_comp u1 u2 H10 t3 t4 H12 (Bind b))) in (let H27 \def (arity_gen_bind b H7 g c2 u2 t4 (AHead a1 a2) H26) in (ex2_ind A (\lambda (a3: A).(arity g c2 u2 a3)) (\lambda (_: A).(arity g (CHead c2 (Bind b) u2) t4 (AHead a1 a2))) (arity g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) a2) (\lambda (x: A).(\lambda (H28: (arity g c2 u2 x)).(\lambda (H29: (arity g (CHead c2 (Bind b) u2) t4 (AHead a1 a2))).(arity_bind g b H7 c2 u2 x H28 (THead (Flat Appl) (lift (S O) O v2) t4) a2 (arity_appl g (CHead c2 (Bind b) u2) (lift (S O) O v2) a1 (arity_lift g c2 v2 a1 H25 (CHead c2 (Bind b) u2) (S O) O (drop_drop (Bind b) O c2 c2 (drop_refl c2) u2)) t4 a2 H29))))) H27))))))))))))) H15))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead (Flat Appl) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t4 w)).(\lambda (H12: (eq T (THead (Bind Abbr) u1 t3) (THead (Flat Appl) u t))).(let H13 \def (eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u t) H12) in (False_ind (arity g c2 (THead (Bind Abbr) u2 w) a2) H13))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (u0: T).(\lambda (H10: (eq T (THead (Bind b) u0 (lift (S O) O t3)) (THead (Flat Appl) u t))).(let H11 \def (eq_ind T (THead (Bind b) u0 (lift (S O) O t3)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u t) H10) in (False_ind (arity g c2 t4 a2) H11)))))))))) (\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (u0: T).(\lambda (H9: (eq T (THead (Flat Cast) u0 t3) (THead (Flat Appl) u t))).(let H10 \def (eq_ind T (THead (Flat Cast) u0 t3) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) u t) H9) in (False_ind (arity g c2 t4 a2) H10)))))))) y t2 H6))) H5)))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g a0))).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 u t2) \to (arity g c2 t2 (asucc g a0)))))))).(\lambda (t: T).(\lambda (_: (arity g c t a0)).(\lambda (H3: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a0))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Flat Cast) u t) t2)).(insert_eq T (THead (Flat Cast) u t) (\lambda (t0: T).(pr0 t0 t2)) (arity g c2 t2 a0) (\lambda (y: T).(\lambda (H6: (pr0 y t2)).(pr0_ind (\lambda (t0: T).(\lambda (t3: T).((eq T t0 (THead (Flat Cast) u t)) \to (arity g c2 t3 a0)))) (\lambda (t0: T).(\lambda (H7: (eq T t0 (THead (Flat Cast) u t))).(let H8 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Flat Cast) u t) H7) in (eq_ind_r T (THead (Flat Cast) u t) (\lambda (t3: T).(arity g c2 t3 a0)) (arity_cast g c2 u a0 (H1 c2 H4 u (pr0_refl u)) t (H3 c2 H4 t (pr0_refl t))) t0 H8)))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (H7: (pr0 u1 u2)).(\lambda (H8: (((eq T u1 (THead (Flat Cast) u t)) \to (arity g c2 u2 a0)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 t4)).(\lambda (H10: (((eq T t3 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (k: K).(\lambda (H11: (eq T (THead k u1 t3) (THead (Flat Cast) u t))).(let H12 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t3) (THead (Flat Cast) u t) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t3) (THead (Flat Cast) u t) H11) in ((let H14 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) (THead k u1 t3) (THead (Flat Cast) u t) H11) in (\lambda (H15: (eq T u1 u)).(\lambda (H16: (eq K k (Flat Cast))).(eq_ind_r K (Flat Cast) (\lambda (k0: K).(arity g c2 (THead k0 u2 t4) a0)) (let H17 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0))) H10 t H14) in (let H18 \def (eq_ind T t3 (\lambda (t: T).(pr0 t t4)) H9 t H14) in (let H19 \def (eq_ind T u1 (\lambda (t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (arity g c2 u2 a0))) H8 u H15) in (let H20 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 u H15) in (arity_cast g c2 u2 a0 (H1 c2 H4 u2 H20) t4 (H3 c2 H4 t4 H18)))))) k H16)))) H13)) H12)))))))))))) (\lambda (u0: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Flat Cast) u t)) \to (arity g c2 v2 a0)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Flat Cast) u t))).(let H12 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u t) H11) in (False_ind (arity g c2 (THead (Bind Abbr) v2 t4) a0) H12)))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Flat Cast) u t)) \to (arity g c2 v2 a0)))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead (Flat Cast) u t)) \to (arity g c2 u2 a0)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (H14: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Cast) u t))).(let H15 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u t) H14) in (False_ind (arity g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) a0) H15))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead (Flat Cast) u t)) \to (arity g c2 u2 a0)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t4 w)).(\lambda (H12: (eq T (THead (Bind Abbr) u1 t3) (THead (Flat Cast) u t))).(let H13 \def (eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u t) H12) in (False_ind (arity g c2 (THead (Bind Abbr) u2 w) a0) H13))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (u0: T).(\lambda (H10: (eq T (THead (Bind b) u0 (lift (S O) O t3)) (THead (Flat Cast) u t))).(let H11 \def (eq_ind T (THead (Bind b) u0 (lift (S O) O t3)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u t) H10) in (False_ind (arity g c2 t4 a0) H11)))))))))) (\lambda (t3: T).(\lambda (t4: T).(\lambda (H7: (pr0 t3 t4)).(\lambda (H8: (((eq T t3 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (u0: T).(\lambda (H9: (eq T (THead (Flat Cast) u0 t3) (THead (Flat Cast) u t))).(let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) u0 t3) (THead (Flat Cast) u t) H9) in ((let H11 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) u0 t3) (THead (Flat Cast) u t) H9) in (\lambda (_: (eq T u0 u)).(let H13 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0))) H8 t H11) in (let H14 \def (eq_ind T t3 (\lambda (t: T).(pr0 t t4)) H7 t H11) in (H3 c2 H4 t4 H14))))) H10)))))))) y t2 H6))) H5))))))))))))) (\lambda (c: C).(\lambda (t: T).(\lambda (a1: A).(\lambda (_: (arity g c t a1)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a1))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (c2: C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H4: (pr0 t t2)).(arity_repl g c2 t2 a1 (H1 c2 H3 t2 H4) a2 H2)))))))))))) c1 t1 a H))))). + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (a: A).(\lambda (H: (arity g c1 t1 a)).(arity_ind g (\lambda (c: C).(\lambda (t: T).(\lambda (a0: A).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a0)))))))) (\lambda (c: C).(\lambda (n: nat).(\lambda (c2: C).(\lambda (_: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H1: (pr0 (TSort n) t2)).(eq_ind_r T (TSort n) (\lambda (t: T).(arity g c2 t (ASort O n))) (arity_sort g c2 n) t2 (pr0_gen_sort t2 n H1)))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (a0: A).(\lambda (_: (arity g d u a0)).(\lambda (H2: ((\forall (c2: C).((wcpr0 d c2) \to (\forall (t2: T).((pr0 u t2) \to (arity g c2 t2 a0))))))).(\lambda (c2: C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H4: (pr0 (TLRef i) t2)).(eq_ind_r T (TLRef i) (\lambda (t: T).(arity g c2 t a0)) (ex3_2_ind C T (\lambda (e2: C).(\lambda (u2: T).(getl i c2 (CHead e2 (Bind Abbr) u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u u2))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (getl i c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H6: (wcpr0 d x0)).(\lambda (H7: (pr0 u x1)).(arity_abbr g c2 x0 x1 i H5 a0 (H2 x0 H6 x1 H7))))))) (wcpr0_getl c c2 H3 i d u (Bind Abbr) H0)) t2 (pr0_gen_lref t2 i H4)))))))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abst) u))).(\lambda (a0: A).(\lambda (_: (arity g d u (asucc g a0))).(\lambda (H2: ((\forall (c2: C).((wcpr0 d c2) \to (\forall (t2: T).((pr0 u t2) \to (arity g c2 t2 (asucc g a0)))))))).(\lambda (c2: C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H4: (pr0 (TLRef i) t2)).(eq_ind_r T (TLRef i) (\lambda (t: T).(arity g c2 t a0)) (ex3_2_ind C T (\lambda (e2: C).(\lambda (u2: T).(getl i c2 (CHead e2 (Bind Abst) u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u u2))) (arity g c2 (TLRef i) a0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (getl i c2 (CHead x0 (Bind Abst) x1))).(\lambda (H6: (wcpr0 d x0)).(\lambda (H7: (pr0 u x1)).(arity_abst g c2 x0 x1 i H5 a0 (H2 x0 H6 x1 H7))))))) (wcpr0_getl c c2 H3 i d u (Bind Abst) H0)) t2 (pr0_gen_lref t2 i H4)))))))))))))) (\lambda (b: B).(\lambda (H0: (not (eq B b Abst))).(\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H2: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 u t2) \to (arity g c2 t2 a1))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (H3: (arity g (CHead c (Bind b) u) t a2)).(\lambda (H4: ((\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a2))))))).(\lambda (c2: C).(\lambda (H5: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H6: (pr0 (THead (Bind b) u t) t2)).(insert_eq T (THead (Bind b) u t) (\lambda (t0: T).(pr0 t0 t2)) (arity g c2 t2 a2) (\lambda (y: T).(\lambda (H7: (pr0 y t2)).(pr0_ind (\lambda (t0: T).(\lambda (t3: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 t3 a2)))) (\lambda (t0: T).(\lambda (H8: (eq T t0 (THead (Bind b) u t))).(let H9 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Bind b) u t) H8) in (eq_ind_r T (THead (Bind b) u t) (\lambda (t3: T).(arity g c2 t3 a2)) (arity_bind g b H0 c2 u a1 (H2 c2 H5 u (pr0_refl u)) t a2 (H4 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H5 u u (pr0_refl u) (Bind b)) t (pr0_refl t))) t0 H9)))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (H8: (pr0 u1 u2)).(\lambda (H9: (((eq T u1 (THead (Bind b) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H10: (pr0 t3 t4)).(\lambda (H11: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (k: K).(\lambda (H12: (eq T (THead k u1 t3) (THead (Bind b) u t))).(let H13 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t3) (THead (Bind b) u t) H12) in ((let H14 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t3) (THead (Bind b) u t) H12) in ((let H15 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) (THead k u1 t3) (THead (Bind b) u t) H12) in (\lambda (H16: (eq T u1 u)).(\lambda (H17: (eq K k (Bind b))).(eq_ind_r K (Bind b) (\lambda (k0: K).(arity g c2 (THead k0 u2 t4) a2)) (let H18 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 t4 a2))) H11 t H15) in (let H19 \def (eq_ind T t3 (\lambda (t: T).(pr0 t t4)) H10 t H15) in (let H20 \def (eq_ind T u1 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 u2 a2))) H9 u H16) in (let H21 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H8 u H16) in (arity_bind g b H0 c2 u2 a1 (H2 c2 H5 u2 H21) t4 a2 (H4 (CHead c2 (Bind b) u2) (wcpr0_comp c c2 H5 u u2 H21 (Bind b)) t4 H19)))))) k H17)))) H14)) H13)))))))))))) (\lambda (u0: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind b) u t)) \to (arity g c2 v2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (H12: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Bind b) u t))).(let H13 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t) H12) in (False_ind (arity g c2 (THead (Bind Abbr) v2 t4) a2) H13)))))))))))) (\lambda (b0: B).(\lambda (_: (not (eq B b0 Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind b) u t)) \to (arity g c2 v2 a2)))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead (Bind b) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (H15: (eq T (THead (Flat Appl) v1 (THead (Bind b0) u1 t3)) (THead (Bind b) u t))).(let H16 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b0) u1 t3)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t) H15) in (False_ind (arity g c2 (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) a2) H16))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (H8: (pr0 u1 u2)).(\lambda (H9: (((eq T u1 (THead (Bind b) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H10: (pr0 t3 t4)).(\lambda (H11: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (w: T).(\lambda (H12: (subst0 O u2 t4 w)).(\lambda (H13: (eq T (THead (Bind Abbr) u1 t3) (THead (Bind b) u t))).(let H14 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (THead (Bind Abbr) u1 t3) (THead (Bind b) u t) H13) in ((let H15 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u1 t3) (THead (Bind b) u t) H13) in ((let H16 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u1 t3) (THead (Bind b) u t) H13) in (\lambda (H17: (eq T u1 u)).(\lambda (H18: (eq B Abbr b)).(let H19 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 t4 a2))) H11 t H16) in (let H20 \def (eq_ind T t3 (\lambda (t: T).(pr0 t t4)) H10 t H16) in (let H21 \def (eq_ind T u1 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t)) \to (arity g c2 u2 a2))) H9 u H17) in (let H22 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H8 u H17) in (let H23 \def (eq_ind_r B b (\lambda (b: B).((eq T t (THead (Bind b) u t)) \to (arity g c2 t4 a2))) H19 Abbr H18) in (let H24 \def (eq_ind_r B b (\lambda (b: B).((eq T u (THead (Bind b) u t)) \to (arity g c2 u2 a2))) H21 Abbr H18) in (let H25 \def (eq_ind_r B b (\lambda (b: B).(\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a2)))))) H4 Abbr H18) in (let H26 \def (eq_ind_r B b (\lambda (b: B).(arity g (CHead c (Bind b) u) t a2)) H3 Abbr H18) in (let H27 \def (eq_ind_r B b (\lambda (b: B).(not (eq B b Abst))) H0 Abbr H18) in (arity_bind g Abbr H27 c2 u2 a1 (H2 c2 H5 u2 H22) w a2 (arity_subst0 g (CHead c2 (Bind Abbr) u2) t4 a2 (H25 (CHead c2 (Bind Abbr) u2) (wcpr0_comp c c2 H5 u u2 H22 (Bind Abbr)) t4 H20) c2 u2 O (getl_refl Abbr c2 u2) w H12)))))))))))))) H15)) H14))))))))))))) (\lambda (b0: B).(\lambda (H8: (not (eq B b0 Abst))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 t4)).(\lambda (H10: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (u0: T).(\lambda (H11: (eq T (THead (Bind b0) u0 (lift (S O) O t3)) (THead (Bind b) u t))).(let H12 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u0 (lift (S O) O t3)) (THead (Bind b) u t) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b0) u0 (lift (S O) O t3)) (THead (Bind b) u t) H11) in ((let H14 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t3) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t3) | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) u0 (lift (S O) O t3)) (THead (Bind b) u t) H11) in (\lambda (_: (eq T u0 u)).(\lambda (H16: (eq B b0 b)).(let H17 \def (eq_ind B b0 (\lambda (b: B).(not (eq B b Abst))) H8 b H16) in (let H18 \def (eq_ind_r T t (\lambda (t: T).((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2))) H10 (lift (S O) O t3) H14) in (let H19 \def (eq_ind_r T t (\lambda (t: T).(\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a2)))))) H4 (lift (S O) O t3) H14) in (let H20 \def (eq_ind_r T t (\lambda (t: T).(arity g (CHead c (Bind b) u) t a2)) H3 (lift (S O) O t3) H14) in (arity_gen_lift g (CHead c2 (Bind b) u) t4 a2 (S O) O (H19 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H5 u u (pr0_refl u) (Bind b)) (lift (S O) O t4) (pr0_lift t3 t4 H9 (S O) O)) c2 (drop_drop (Bind b) O c2 c2 (drop_refl c2) u))))))))) H13)) H12)))))))))) (\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind b) u t)) \to (arity g c2 t4 a2)))).(\lambda (u0: T).(\lambda (H10: (eq T (THead (Flat Cast) u0 t3) (THead (Bind b) u t))).(let H11 \def (eq_ind T (THead (Flat Cast) u0 t3) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t) H10) in (False_ind (arity g c2 t4 a2) H11)))))))) y t2 H7))) H6)))))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u (asucc g a1))).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 u t2) \to (arity g c2 t2 (asucc g a1)))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (H2: (arity g (CHead c (Bind Abst) u) t a2)).(\lambda (H3: ((\forall (c2: C).((wcpr0 (CHead c (Bind Abst) u) c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a2))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Bind Abst) u t) t2)).(insert_eq T (THead (Bind Abst) u t) (\lambda (t0: T).(pr0 t0 t2)) (arity g c2 t2 (AHead a1 a2)) (\lambda (y: T).(\lambda (H6: (pr0 y t2)).(pr0_ind (\lambda (t0: T).(\lambda (t3: T).((eq T t0 (THead (Bind Abst) u t)) \to (arity g c2 t3 (AHead a1 a2))))) (\lambda (t0: T).(\lambda (H7: (eq T t0 (THead (Bind Abst) u t))).(let H8 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Bind Abst) u t) H7) in (eq_ind_r T (THead (Bind Abst) u t) (\lambda (t3: T).(arity g c2 t3 (AHead a1 a2))) (arity_head g c2 u a1 (H1 c2 H4 u (pr0_refl u)) t a2 (H3 (CHead c2 (Bind Abst) u) (wcpr0_comp c c2 H4 u u (pr0_refl u) (Bind Abst)) t (pr0_refl t))) t0 H8)))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (H7: (pr0 u1 u2)).(\lambda (H8: (((eq T u1 (THead (Bind Abst) u t)) \to (arity g c2 u2 (AHead a1 a2))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 t4)).(\lambda (H10: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2))))).(\lambda (k: K).(\lambda (H11: (eq T (THead k u1 t3) (THead (Bind Abst) u t))).(let H12 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t3) (THead (Bind Abst) u t) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t3) (THead (Bind Abst) u t) H11) in ((let H14 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) (THead k u1 t3) (THead (Bind Abst) u t) H11) in (\lambda (H15: (eq T u1 u)).(\lambda (H16: (eq K k (Bind Abst))).(eq_ind_r K (Bind Abst) (\lambda (k0: K).(arity g c2 (THead k0 u2 t4) (AHead a1 a2))) (let H17 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2)))) H10 t H14) in (let H18 \def (eq_ind T t3 (\lambda (t: T).(pr0 t t4)) H9 t H14) in (let H19 \def (eq_ind T u1 (\lambda (t0: T).((eq T t0 (THead (Bind Abst) u t)) \to (arity g c2 u2 (AHead a1 a2)))) H8 u H15) in (let H20 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 u H15) in (arity_head g c2 u2 a1 (H1 c2 H4 u2 H20) t4 a2 (H3 (CHead c2 (Bind Abst) u2) (wcpr0_comp c c2 H4 u u2 H20 (Bind Abst)) t4 H18)))))) k H16)))) H13)) H12)))))))))))) (\lambda (u0: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind Abst) u t)) \to (arity g c2 v2 (AHead a1 a2))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2))))).(\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Bind Abst) u t))).(let H12 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t) H11) in (False_ind (arity g c2 (THead (Bind Abbr) v2 t4) (AHead a1 a2)) H12)))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind Abst) u t)) \to (arity g c2 v2 (AHead a1 a2))))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead (Bind Abst) u t)) \to (arity g c2 u2 (AHead a1 a2))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2))))).(\lambda (H14: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Bind Abst) u t))).(let H15 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t) H14) in (False_ind (arity g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) (AHead a1 a2)) H15))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead (Bind Abst) u t)) \to (arity g c2 u2 (AHead a1 a2))))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2))))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t4 w)).(\lambda (H12: (eq T (THead (Bind Abbr) u1 t3) (THead (Bind Abst) u t))).(let H13 \def (eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Abst) u t) H12) in (False_ind (arity g c2 (THead (Bind Abbr) u2 w) (AHead a1 a2)) H13))))))))))))) (\lambda (b: B).(\lambda (H7: (not (eq B b Abst))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (H9: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2))))).(\lambda (u0: T).(\lambda (H10: (eq T (THead (Bind b) u0 (lift (S O) O t3)) (THead (Bind Abst) u t))).(let H11 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b | (TLRef _) \Rightarrow b | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b])])) (THead (Bind b) u0 (lift (S O) O t3)) (THead (Bind Abst) u t) H10) in ((let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b) u0 (lift (S O) O t3)) (THead (Bind Abst) u t) H10) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t3) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t3) | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u0 (lift (S O) O t3)) (THead (Bind Abst) u t) H10) in (\lambda (_: (eq T u0 u)).(\lambda (H15: (eq B b Abst)).(let H16 \def (eq_ind B b (\lambda (b: B).(not (eq B b Abst))) H7 Abst H15) in (let H17 \def (eq_ind_r T t (\lambda (t: T).((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2)))) H9 (lift (S O) O t3) H13) in (let H18 \def (eq_ind_r T t (\lambda (t: T).(\forall (c2: C).((wcpr0 (CHead c (Bind Abst) u) c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a2)))))) H3 (lift (S O) O t3) H13) in (let H19 \def (eq_ind_r T t (\lambda (t: T).(arity g (CHead c (Bind Abst) u) t a2)) H2 (lift (S O) O t3) H13) in (let H20 \def (match (H16 (refl_equal B Abst)) return (\lambda (_: False).(arity g c2 t4 (AHead a1 a2))) with []) in H20)))))))) H12)) H11)))))))))) (\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Bind Abst) u t)) \to (arity g c2 t4 (AHead a1 a2))))).(\lambda (u0: T).(\lambda (H9: (eq T (THead (Flat Cast) u0 t3) (THead (Bind Abst) u t))).(let H10 \def (eq_ind T (THead (Flat Cast) u0 t3) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) u t) H9) in (False_ind (arity g c2 t4 (AHead a1 a2)) H10)))))))) y t2 H6))) H5)))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a1: A).(\lambda (_: (arity g c u a1)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 u t2) \to (arity g c2 t2 a1))))))).(\lambda (t: T).(\lambda (a2: A).(\lambda (H2: (arity g c t (AHead a1 a2))).(\lambda (H3: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 (AHead a1 a2)))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Flat Appl) u t) t2)).(insert_eq T (THead (Flat Appl) u t) (\lambda (t0: T).(pr0 t0 t2)) (arity g c2 t2 a2) (\lambda (y: T).(\lambda (H6: (pr0 y t2)).(pr0_ind (\lambda (t0: T).(\lambda (t3: T).((eq T t0 (THead (Flat Appl) u t)) \to (arity g c2 t3 a2)))) (\lambda (t0: T).(\lambda (H7: (eq T t0 (THead (Flat Appl) u t))).(let H8 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Flat Appl) u t) H7) in (eq_ind_r T (THead (Flat Appl) u t) (\lambda (t3: T).(arity g c2 t3 a2)) (arity_appl g c2 u a1 (H1 c2 H4 u (pr0_refl u)) t a2 (H3 c2 H4 t (pr0_refl t))) t0 H8)))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (H7: (pr0 u1 u2)).(\lambda (H8: (((eq T u1 (THead (Flat Appl) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 t4)).(\lambda (H10: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (k: K).(\lambda (H11: (eq T (THead k u1 t3) (THead (Flat Appl) u t))).(let H12 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t3) (THead (Flat Appl) u t) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t3) (THead (Flat Appl) u t) H11) in ((let H14 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) (THead k u1 t3) (THead (Flat Appl) u t) H11) in (\lambda (H15: (eq T u1 u)).(\lambda (H16: (eq K k (Flat Appl))).(eq_ind_r K (Flat Appl) (\lambda (k0: K).(arity g c2 (THead k0 u2 t4) a2)) (let H17 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2))) H10 t H14) in (let H18 \def (eq_ind T t3 (\lambda (t: T).(pr0 t t4)) H9 t H14) in (let H19 \def (eq_ind T u1 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (arity g c2 u2 a2))) H8 u H15) in (let H20 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 u H15) in (arity_appl g c2 u2 a1 (H1 c2 H4 u2 H20) t4 a2 (H3 c2 H4 t4 H18)))))) k H16)))) H13)) H12)))))))))))) (\lambda (u0: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H7: (pr0 v1 v2)).(\lambda (H8: (((eq T v1 (THead (Flat Appl) u t)) \to (arity g c2 v2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 t4)).(\lambda (H10: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Flat Appl) u t))).(let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Flat Appl) u t) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead (Bind Abst) u0 t3) | (TLRef _) \Rightarrow (THead (Bind Abst) u0 t3) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Flat Appl) u t) H11) in (\lambda (H14: (eq T v1 u)).(let H15 \def (eq_ind T v1 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (arity g c2 v2 a2))) H8 u H14) in (let H16 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H7 u H14) in (let H17 \def (eq_ind_r T t (\lambda (t: T).((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2))) H10 (THead (Bind Abst) u0 t3) H13) in (let H18 \def (eq_ind_r T t (\lambda (t: T).((eq T u (THead (Flat Appl) u t)) \to (arity g c2 v2 a2))) H15 (THead (Bind Abst) u0 t3) H13) in (let H19 \def (eq_ind_r T t (\lambda (t: T).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 (AHead a1 a2))))))) H3 (THead (Bind Abst) u0 t3) H13) in (let H20 \def (eq_ind_r T t (\lambda (t: T).(arity g c t (AHead a1 a2))) H2 (THead (Bind Abst) u0 t3) H13) in (let H21 \def (H1 c2 H4 v2 H16) in (let H22 \def (H19 c2 H4 (THead (Bind Abst) u0 t4) (pr0_comp u0 u0 (pr0_refl u0) t3 t4 H9 (Bind Abst))) in (let H23 \def (arity_gen_abst g c2 u0 t4 (AHead a1 a2) H22) in (ex3_2_ind A A (\lambda (a3: A).(\lambda (a4: A).(eq A (AHead a1 a2) (AHead a3 a4)))) (\lambda (a3: A).(\lambda (_: A).(arity g c2 u0 (asucc g a3)))) (\lambda (_: A).(\lambda (a4: A).(arity g (CHead c2 (Bind Abst) u0) t4 a4))) (arity g c2 (THead (Bind Abbr) v2 t4) a2) (\lambda (x0: A).(\lambda (x1: A).(\lambda (H24: (eq A (AHead a1 a2) (AHead x0 x1))).(\lambda (H25: (arity g c2 u0 (asucc g x0))).(\lambda (H26: (arity g (CHead c2 (Bind Abst) u0) t4 x1)).(let H27 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a1 | (AHead a _) \Rightarrow a])) (AHead a1 a2) (AHead x0 x1) H24) in ((let H28 \def (f_equal A A (\lambda (e: A).(match e return (\lambda (_: A).A) with [(ASort _ _) \Rightarrow a2 | (AHead _ a) \Rightarrow a])) (AHead a1 a2) (AHead x0 x1) H24) in (\lambda (H29: (eq A a1 x0)).(let H30 \def (eq_ind_r A x1 (\lambda (a: A).(arity g (CHead c2 (Bind Abst) u0) t4 a)) H26 a2 H28) in (let H31 \def (eq_ind_r A x0 (\lambda (a: A).(arity g c2 u0 (asucc g a))) H25 a1 H29) in (arity_bind g Abbr not_abbr_abst c2 v2 a1 H21 t4 a2 (csuba_arity g (CHead c2 (Bind Abst) u0) t4 a2 H30 (CHead c2 (Bind Abbr) v2) (csuba_abst g c2 c2 (csuba_refl g c2) u0 a1 H31 v2 H21))))))) H27))))))) H23)))))))))))) H12)))))))))))) (\lambda (b: B).(\lambda (H7: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (H8: (pr0 v1 v2)).(\lambda (H9: (((eq T v1 (THead (Flat Appl) u t)) \to (arity g c2 v2 a2)))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H10: (pr0 u1 u2)).(\lambda (H11: (((eq T u1 (THead (Flat Appl) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H12: (pr0 t3 t4)).(\lambda (H13: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (H14: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) u t))).(let H15 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) u t) H14) in ((let H16 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead (Bind b) u1 t3) | (TLRef _) \Rightarrow (THead (Bind b) u1 t3) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Appl) u t) H14) in (\lambda (H17: (eq T v1 u)).(let H18 \def (eq_ind T v1 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) u t)) \to (arity g c2 v2 a2))) H9 u H17) in (let H19 \def (eq_ind T v1 (\lambda (t: T).(pr0 t v2)) H8 u H17) in (let H20 \def (eq_ind_r T t (\lambda (t: T).((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2))) H13 (THead (Bind b) u1 t3) H16) in (let H21 \def (eq_ind_r T t (\lambda (t: T).((eq T u1 (THead (Flat Appl) u t)) \to (arity g c2 u2 a2))) H11 (THead (Bind b) u1 t3) H16) in (let H22 \def (eq_ind_r T t (\lambda (t: T).((eq T u (THead (Flat Appl) u t)) \to (arity g c2 v2 a2))) H18 (THead (Bind b) u1 t3) H16) in (let H23 \def (eq_ind_r T t (\lambda (t: T).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 (AHead a1 a2))))))) H3 (THead (Bind b) u1 t3) H16) in (let H24 \def (eq_ind_r T t (\lambda (t: T).(arity g c t (AHead a1 a2))) H2 (THead (Bind b) u1 t3) H16) in (let H25 \def (H1 c2 H4 v2 H19) in (let H26 \def (H23 c2 H4 (THead (Bind b) u2 t4) (pr0_comp u1 u2 H10 t3 t4 H12 (Bind b))) in (let H27 \def (arity_gen_bind b H7 g c2 u2 t4 (AHead a1 a2) H26) in (ex2_ind A (\lambda (a3: A).(arity g c2 u2 a3)) (\lambda (_: A).(arity g (CHead c2 (Bind b) u2) t4 (AHead a1 a2))) (arity g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) a2) (\lambda (x: A).(\lambda (H28: (arity g c2 u2 x)).(\lambda (H29: (arity g (CHead c2 (Bind b) u2) t4 (AHead a1 a2))).(arity_bind g b H7 c2 u2 x H28 (THead (Flat Appl) (lift (S O) O v2) t4) a2 (arity_appl g (CHead c2 (Bind b) u2) (lift (S O) O v2) a1 (arity_lift g c2 v2 a1 H25 (CHead c2 (Bind b) u2) (S O) O (drop_drop (Bind b) O c2 c2 (drop_refl c2) u2)) t4 a2 H29))))) H27))))))))))))) H15))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead (Flat Appl) u t)) \to (arity g c2 u2 a2)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t4 w)).(\lambda (H12: (eq T (THead (Bind Abbr) u1 t3) (THead (Flat Appl) u t))).(let H13 \def (eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u t) H12) in (False_ind (arity g c2 (THead (Bind Abbr) u2 w) a2) H13))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (u0: T).(\lambda (H10: (eq T (THead (Bind b) u0 (lift (S O) O t3)) (THead (Flat Appl) u t))).(let H11 \def (eq_ind T (THead (Bind b) u0 (lift (S O) O t3)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) u t) H10) in (False_ind (arity g c2 t4 a2) H11)))))))))) (\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Appl) u t)) \to (arity g c2 t4 a2)))).(\lambda (u0: T).(\lambda (H9: (eq T (THead (Flat Cast) u0 t3) (THead (Flat Appl) u t))).(let H10 \def (eq_ind T (THead (Flat Cast) u0 t3) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) u t) H9) in (False_ind (arity g c2 t4 a2) H10)))))))) y t2 H6))) H5)))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (a0: A).(\lambda (_: (arity g c u (asucc g a0))).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 u t2) \to (arity g c2 t2 (asucc g a0)))))))).(\lambda (t: T).(\lambda (_: (arity g c t a0)).(\lambda (H3: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a0))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Flat Cast) u t) t2)).(insert_eq T (THead (Flat Cast) u t) (\lambda (t0: T).(pr0 t0 t2)) (arity g c2 t2 a0) (\lambda (y: T).(\lambda (H6: (pr0 y t2)).(pr0_ind (\lambda (t0: T).(\lambda (t3: T).((eq T t0 (THead (Flat Cast) u t)) \to (arity g c2 t3 a0)))) (\lambda (t0: T).(\lambda (H7: (eq T t0 (THead (Flat Cast) u t))).(let H8 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Flat Cast) u t) H7) in (eq_ind_r T (THead (Flat Cast) u t) (\lambda (t3: T).(arity g c2 t3 a0)) (arity_cast g c2 u a0 (H1 c2 H4 u (pr0_refl u)) t (H3 c2 H4 t (pr0_refl t))) t0 H8)))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (H7: (pr0 u1 u2)).(\lambda (H8: (((eq T u1 (THead (Flat Cast) u t)) \to (arity g c2 u2 a0)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H9: (pr0 t3 t4)).(\lambda (H10: (((eq T t3 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (k: K).(\lambda (H11: (eq T (THead k u1 t3) (THead (Flat Cast) u t))).(let H12 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t3) (THead (Flat Cast) u t) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t3) (THead (Flat Cast) u t) H11) in ((let H14 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) (THead k u1 t3) (THead (Flat Cast) u t) H11) in (\lambda (H15: (eq T u1 u)).(\lambda (H16: (eq K k (Flat Cast))).(eq_ind_r K (Flat Cast) (\lambda (k0: K).(arity g c2 (THead k0 u2 t4) a0)) (let H17 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0))) H10 t H14) in (let H18 \def (eq_ind T t3 (\lambda (t: T).(pr0 t t4)) H9 t H14) in (let H19 \def (eq_ind T u1 (\lambda (t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (arity g c2 u2 a0))) H8 u H15) in (let H20 \def (eq_ind T u1 (\lambda (t: T).(pr0 t u2)) H7 u H15) in (arity_cast g c2 u2 a0 (H1 c2 H4 u2 H20) t4 (H3 c2 H4 t4 H18)))))) k H16)))) H13)) H12)))))))))))) (\lambda (u0: T).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Flat Cast) u t)) \to (arity g c2 v2 a0)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (THead (Flat Cast) u t))).(let H12 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t3)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u t) H11) in (False_ind (arity g c2 (THead (Bind Abbr) v2 t4) a0) H12)))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (pr0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Flat Cast) u t)) \to (arity g c2 v2 a0)))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead (Flat Cast) u t)) \to (arity g c2 u2 a0)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (H14: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (THead (Flat Cast) u t))).(let H15 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t3)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) u t) H14) in (False_ind (arity g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t4)) a0) H15))))))))))))))))) (\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pr0 u1 u2)).(\lambda (_: (((eq T u1 (THead (Flat Cast) u t)) \to (arity g c2 u2 a0)))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (w: T).(\lambda (_: (subst0 O u2 t4 w)).(\lambda (H12: (eq T (THead (Bind Abbr) u1 t3) (THead (Flat Cast) u t))).(let H13 \def (eq_ind T (THead (Bind Abbr) u1 t3) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u t) H12) in (False_ind (arity g c2 (THead (Bind Abbr) u2 w) a0) H13))))))))))))) (\lambda (b: B).(\lambda (_: (not (eq B b Abst))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (pr0 t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (u0: T).(\lambda (H10: (eq T (THead (Bind b) u0 (lift (S O) O t3)) (THead (Flat Cast) u t))).(let H11 \def (eq_ind T (THead (Bind b) u0 (lift (S O) O t3)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) u t) H10) in (False_ind (arity g c2 t4 a0) H11)))))))))) (\lambda (t3: T).(\lambda (t4: T).(\lambda (H7: (pr0 t3 t4)).(\lambda (H8: (((eq T t3 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0)))).(\lambda (u0: T).(\lambda (H9: (eq T (THead (Flat Cast) u0 t3) (THead (Flat Cast) u t))).(let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) u0 t3) (THead (Flat Cast) u t) H9) in ((let H11 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) u0 t3) (THead (Flat Cast) u t) H9) in (\lambda (_: (eq T u0 u)).(let H13 \def (eq_ind T t3 (\lambda (t0: T).((eq T t0 (THead (Flat Cast) u t)) \to (arity g c2 t4 a0))) H8 t H11) in (let H14 \def (eq_ind T t3 (\lambda (t: T).(pr0 t t4)) H7 t H11) in (H3 c2 H4 t4 H14))))) H10)))))))) y t2 H6))) H5))))))))))))) (\lambda (c: C).(\lambda (t: T).(\lambda (a1: A).(\lambda (_: (arity g c t a1)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (arity g c2 t2 a1))))))).(\lambda (a2: A).(\lambda (H2: (leq g a1 a2)).(\lambda (c2: C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H4: (pr0 t t2)).(arity_repl g c2 t2 a1 (H1 c2 H3 t2 H4) a2 H2)))))))))))) c1 t1 a H))))). theorem arity_sred_wcpr0_pr1: \forall (t1: T).(\forall (t2: T).((pr1 t1 t2) \to (\forall (g: G).(\forall (c1: C).(\forall (a: A).((arity g c1 t1 a) \to (\forall (c2: C).((wcpr0 c1 c2) \to (arity g c2 t2 a))))))))) @@ -2372,7 +2372,7 @@ definition nf2: theorem nf2_gen_base__aux: \forall (k: K).(\forall (t: T).(\forall (u: T).((eq T (THead k u t) t) \to (\forall (P: Prop).P)))) \def - \lambda (k: K).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (u: T).((eq T (THead k u t0) t0) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (u: T).(\lambda (H: (eq T (THead k u (TSort n)) (TSort n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k u (TSort n)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H) in (False_ind P H0)))))) (\lambda (n: nat).(\lambda (u: T).(\lambda (H: (eq T (THead k u (TLRef n)) (TLRef n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k u (TLRef n)) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H) in (False_ind P H0)))))) (\lambda (k0: K).(\lambda (t0: T).(\lambda (_: ((\forall (u: T).((eq T (THead k u t0) t0) \to (\forall (P: Prop).P))))).(\lambda (t1: T).(\lambda (H0: ((\forall (u: T).((eq T (THead k u t1) t1) \to (\forall (P: Prop).P))))).(\lambda (u: T).(\lambda (H1: (eq T (THead k u (THead k0 t0 t1)) (THead k0 t0 t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u (THead k0 t0 t1)) (THead k0 t0 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead k u (THead k0 t0 t1)) (THead k0 t0 t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow (THead k0 t0 t1) | (TLRef _) \Rightarrow (THead k0 t0 t1) | (THead _ _ t) \Rightarrow t])) (THead k u (THead k0 t0 t1)) (THead k0 t0 t1) H1) in (\lambda (_: (eq T u t0)).(\lambda (H6: (eq K k k0)).(let H7 \def (eq_ind K k (\lambda (k: K).(\forall (u: T).((eq T (THead k u t1) t1) \to (\forall (P: Prop).P)))) H0 k0 H6) in (H7 t0 H4 P))))) H3)) H2)))))))))) t)). + \lambda (k: K).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (u: T).((eq T (THead k u t0) t0) \to (\forall (P: Prop).P)))) (\lambda (n: nat).(\lambda (u: T).(\lambda (H: (eq T (THead k u (TSort n)) (TSort n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k u (TSort n)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H) in (False_ind P H0)))))) (\lambda (n: nat).(\lambda (u: T).(\lambda (H: (eq T (THead k u (TLRef n)) (TLRef n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k u (TLRef n)) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H) in (False_ind P H0)))))) (\lambda (k0: K).(\lambda (t0: T).(\lambda (_: ((\forall (u: T).((eq T (THead k u t0) t0) \to (\forall (P: Prop).P))))).(\lambda (t1: T).(\lambda (H0: ((\forall (u: T).((eq T (THead k u t1) t1) \to (\forall (P: Prop).P))))).(\lambda (u: T).(\lambda (H1: (eq T (THead k u (THead k0 t0 t1)) (THead k0 t0 t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u (THead k0 t0 t1)) (THead k0 t0 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead k u (THead k0 t0 t1)) (THead k0 t0 t1) H1) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead k0 t0 t1) | (TLRef _) \Rightarrow (THead k0 t0 t1) | (THead _ _ t) \Rightarrow t])) (THead k u (THead k0 t0 t1)) (THead k0 t0 t1) H1) in (\lambda (_: (eq T u t0)).(\lambda (H6: (eq K k k0)).(let H7 \def (eq_ind K k (\lambda (k: K).(\forall (u: T).((eq T (THead k u t1) t1) \to (\forall (P: Prop).P)))) H0 k0 H6) in (H7 t0 H4 P))))) H3)) H2)))))))))) t)). theorem nf2_gen_lref: \forall (c: C).(\forall (d: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead d (Bind Abbr) u)) \to ((nf2 c (TLRef i)) \to (\forall (P: Prop).P)))))) @@ -2382,7 +2382,7 @@ theorem nf2_gen_lref: theorem nf2_gen_abst: \forall (c: C).(\forall (u: T).(\forall (t: T).((nf2 c (THead (Bind Abst) u t)) \to (land (nf2 c u) (nf2 (CHead c (Bind Abst) u) t))))) \def - \lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: ((\forall (t2: T).((pr2 c (THead (Bind Abst) u t) t2) \to (eq T (THead (Bind Abst) u t) t2))))).(conj (\forall (t2: T).((pr2 c u t2) \to (eq T u t2))) (\forall (t2: T).((pr2 (CHead c (Bind Abst) u) t t2) \to (eq T t t2))) (\lambda (t2: T).(\lambda (H0: (pr2 c u t2)).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind Abst) u t) (THead (Bind Abst) t2 t) (H (THead (Bind Abst) t2 t) (pr2_head_1 c u t2 H0 (Bind Abst) t))) in (let H2 \def (eq_ind_r T t2 (\lambda (t: T).(pr2 c u t)) H0 u H1) in (eq_ind T u (\lambda (t0: T).(eq T u t0)) (refl_equal T u) t2 H1))))) (\lambda (t2: T).(\lambda (H0: (pr2 (CHead c (Bind Abst) u) t t2)).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead (Bind Abst) u t) (THead (Bind Abst) u t2) (H (THead (Bind Abst) u t2) (let H_y \def (pr2_gen_cbind Abst c u t t2 H0) in H_y))) in (let H2 \def (eq_ind_r T t2 (\lambda (t0: T).(pr2 (CHead c (Bind Abst) u) t t0)) H0 t H1) in (eq_ind T t (\lambda (t0: T).(eq T t t0)) (refl_equal T t) t2 H1))))))))). + \lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: ((\forall (t2: T).((pr2 c (THead (Bind Abst) u t) t2) \to (eq T (THead (Bind Abst) u t) t2))))).(conj (\forall (t2: T).((pr2 c u t2) \to (eq T u t2))) (\forall (t2: T).((pr2 (CHead c (Bind Abst) u) t t2) \to (eq T t t2))) (\lambda (t2: T).(\lambda (H0: (pr2 c u t2)).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind Abst) u t) (THead (Bind Abst) t2 t) (H (THead (Bind Abst) t2 t) (pr2_head_1 c u t2 H0 (Bind Abst) t))) in (let H2 \def (eq_ind_r T t2 (\lambda (t: T).(pr2 c u t)) H0 u H1) in (eq_ind T u (\lambda (t0: T).(eq T u t0)) (refl_equal T u) t2 H1))))) (\lambda (t2: T).(\lambda (H0: (pr2 (CHead c (Bind Abst) u) t t2)).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead (Bind Abst) u t) (THead (Bind Abst) u t2) (H (THead (Bind Abst) u t2) (let H_y \def (pr2_gen_cbind Abst c u t t2 H0) in H_y))) in (let H2 \def (eq_ind_r T t2 (\lambda (t0: T).(pr2 (CHead c (Bind Abst) u) t t0)) H0 t H1) in (eq_ind T t (\lambda (t0: T).(eq T t t0)) (refl_equal T t) t2 H1))))))))). theorem nf2_gen_cast: \forall (c: C).(\forall (u: T).(\forall (t: T).((nf2 c (THead (Flat Cast) u t)) \to (\forall (P: Prop).P)))) @@ -2392,7 +2392,7 @@ theorem nf2_gen_cast: theorem nf2_gen_flat: \forall (f: F).(\forall (c: C).(\forall (u: T).(\forall (t: T).((nf2 c (THead (Flat f) u t)) \to (land (nf2 c u) (nf2 c t)))))) \def - \lambda (f: F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: ((\forall (t2: T).((pr2 c (THead (Flat f) u t) t2) \to (eq T (THead (Flat f) u t) t2))))).(conj (\forall (t2: T).((pr2 c u t2) \to (eq T u t2))) (\forall (t2: T).((pr2 c t t2) \to (eq T t t2))) (\lambda (t2: T).(\lambda (H0: (pr2 c u t2)).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat f) u t) (THead (Flat f) t2 t) (H (THead (Flat f) t2 t) (pr2_head_1 c u t2 H0 (Flat f) t))) in H1))) (\lambda (t2: T).(\lambda (H0: (pr2 c t t2)).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead (Flat f) u t) (THead (Flat f) u t2) (H (THead (Flat f) u t2) (pr2_head_2 c u t t2 (Flat f) (pr2_cflat c t t2 H0 f u)))) in H1)))))))). + \lambda (f: F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: ((\forall (t2: T).((pr2 c (THead (Flat f) u t) t2) \to (eq T (THead (Flat f) u t) t2))))).(conj (\forall (t2: T).((pr2 c u t2) \to (eq T u t2))) (\forall (t2: T).((pr2 c t t2) \to (eq T t t2))) (\lambda (t2: T).(\lambda (H0: (pr2 c u t2)).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat f) u t) (THead (Flat f) t2 t) (H (THead (Flat f) t2 t) (pr2_head_1 c u t2 H0 (Flat f) t))) in H1))) (\lambda (t2: T).(\lambda (H0: (pr2 c t t2)).(let H1 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead (Flat f) u t) (THead (Flat f) u t2) (H (THead (Flat f) u t2) (pr2_head_2 c u t t2 (Flat f) (pr2_cflat c t t2 H0 f u)))) in H1)))))))). theorem nf2_sort: \forall (c: C).(\forall (n: nat).(nf2 c (TSort n))) @@ -2417,12 +2417,12 @@ theorem nf2_pr3_confluence: theorem nf2_appl_lref: \forall (c: C).(\forall (u: T).((nf2 c u) \to (\forall (i: nat).((nf2 c (TLRef i)) \to (nf2 c (THead (Flat Appl) u (TLRef i))))))) \def - \lambda (c: C).(\lambda (u: T).(\lambda (H: ((\forall (t2: T).((pr2 c u t2) \to (eq T u t2))))).(\lambda (i: nat).(\lambda (H0: ((\forall (t2: T).((pr2 c (TLRef i) t2) \to (eq T (TLRef i) t2))))).(\lambda (t2: T).(\lambda (H1: (pr2 c (THead (Flat Appl) u (TLRef i)) t2)).(let H2 \def (pr2_gen_appl c u (TLRef i) t2 H1) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (eq T (THead (Flat Appl) u (TLRef i)) t2) (\lambda (H3: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c (TLRef i) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3))) (eq T (THead (Flat Appl) u (TLRef i)) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H5: (pr2 c u x0)).(\lambda (H6: (pr2 c (TLRef i) x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t: T).(eq T (THead (Flat Appl) u (TLRef i)) t)) (let H7 \def (eq_ind_r T x1 (\lambda (t: T).(pr2 c (TLRef i) t)) H6 (TLRef i) (H0 x1 H6)) in (eq_ind T (TLRef i) (\lambda (t: T).(eq T (THead (Flat Appl) u (TLRef i)) (THead (Flat Appl) x0 t))) (let H8 \def (eq_ind_r T x0 (\lambda (t: T).(pr2 c u t)) H5 u (H x0 H5)) in (eq_ind T u (\lambda (t: T).(eq T (THead (Flat Appl) u (TLRef i)) (THead (Flat Appl) t (TLRef i)))) (refl_equal T (THead (Flat Appl) u (TLRef i))) x0 (H x0 H5))) x1 (H0 x1 H6))) t2 H4)))))) H3)) (\lambda (H3: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3))))))) (eq T (THead (Flat Appl) u (TLRef i)) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H4: (eq T (TLRef i) (THead (Bind Abst) x0 x1))).(\lambda (H5: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (_: (pr2 c u x2)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 x3))))).(eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t: T).(eq T (THead (Flat Appl) u (TLRef i)) t)) (let H8 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) x0 x1) H4) in (False_ind (eq T (THead (Flat Appl) u (TLRef i)) (THead (Bind Abbr) x2 x3)) H8)) t2 H5))))))))) H3)) (\lambda (H3: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (eq T (THead (Flat Appl) u (TLRef i)) t2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 Abst))).(\lambda (H5: (eq T (TLRef i) (THead (Bind x0) x1 x2))).(\lambda (H6: (eq T t2 (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)))).(\lambda (_: (pr2 c u x4)).(\lambda (_: (pr2 c x1 x5)).(\lambda (_: (pr2 (CHead c (Bind x0) x5) x2 x3)).(eq_ind_r T (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) (\lambda (t: T).(eq T (THead (Flat Appl) u (TLRef i)) t)) (let H10 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind x0) x1 x2) H5) in (False_ind (eq T (THead (Flat Appl) u (TLRef i)) (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3))) H10)) t2 H6))))))))))))) H3)) H2)))))))). + \lambda (c: C).(\lambda (u: T).(\lambda (H: ((\forall (t2: T).((pr2 c u t2) \to (eq T u t2))))).(\lambda (i: nat).(\lambda (H0: ((\forall (t2: T).((pr2 c (TLRef i) t2) \to (eq T (TLRef i) t2))))).(\lambda (t2: T).(\lambda (H1: (pr2 c (THead (Flat Appl) u (TLRef i)) t2)).(let H2 \def (pr2_gen_appl c u (TLRef i) t2 H1) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (eq T (THead (Flat Appl) u (TLRef i)) t2) (\lambda (H3: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c (TLRef i) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3))) (eq T (THead (Flat Appl) u (TLRef i)) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H5: (pr2 c u x0)).(\lambda (H6: (pr2 c (TLRef i) x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t: T).(eq T (THead (Flat Appl) u (TLRef i)) t)) (let H7 \def (eq_ind_r T x1 (\lambda (t: T).(pr2 c (TLRef i) t)) H6 (TLRef i) (H0 x1 H6)) in (eq_ind T (TLRef i) (\lambda (t: T).(eq T (THead (Flat Appl) u (TLRef i)) (THead (Flat Appl) x0 t))) (let H8 \def (eq_ind_r T x0 (\lambda (t: T).(pr2 c u t)) H5 u (H x0 H5)) in (eq_ind T u (\lambda (t: T).(eq T (THead (Flat Appl) u (TLRef i)) (THead (Flat Appl) t (TLRef i)))) (refl_equal T (THead (Flat Appl) u (TLRef i))) x0 (H x0 H5))) x1 (H0 x1 H6))) t2 H4)))))) H3)) (\lambda (H3: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3))))))) (eq T (THead (Flat Appl) u (TLRef i)) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H4: (eq T (TLRef i) (THead (Bind Abst) x0 x1))).(\lambda (H5: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (_: (pr2 c u x2)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 x3))))).(eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t: T).(eq T (THead (Flat Appl) u (TLRef i)) t)) (let H8 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) x0 x1) H4) in (False_ind (eq T (THead (Flat Appl) u (TLRef i)) (THead (Bind Abbr) x2 x3)) H8)) t2 H5))))))))) H3)) (\lambda (H3: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c u u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (eq T (THead (Flat Appl) u (TLRef i)) t2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 Abst))).(\lambda (H5: (eq T (TLRef i) (THead (Bind x0) x1 x2))).(\lambda (H6: (eq T t2 (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)))).(\lambda (_: (pr2 c u x4)).(\lambda (_: (pr2 c x1 x5)).(\lambda (_: (pr2 (CHead c (Bind x0) x5) x2 x3)).(eq_ind_r T (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) (\lambda (t: T).(eq T (THead (Flat Appl) u (TLRef i)) t)) (let H10 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind x0) x1 x2) H5) in (False_ind (eq T (THead (Flat Appl) u (TLRef i)) (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3))) H10)) t2 H6))))))))))))) H3)) H2)))))))). theorem nf2_lref_abst: \forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c (CHead e (Bind Abst) u)) \to (nf2 c (TLRef i)))))) \def - \lambda (c: C).(\lambda (e: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (getl i c (CHead e (Bind Abst) u))).(\lambda (t2: T).(\lambda (H0: (pr2 c (TLRef i) t2)).(let H1 \def (pr2_gen_lref c t2 i H0) in (or_ind (eq T t2 (TLRef i)) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c (CHead d (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t2 (lift (S i) O u0))))) (eq T (TLRef i) t2) (\lambda (H2: (eq T t2 (TLRef i))).(eq_ind_r T (TLRef i) (\lambda (t: T).(eq T (TLRef i) t)) (refl_equal T (TLRef i)) t2 H2)) (\lambda (H2: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S i) O u)))))).(ex2_2_ind C T (\lambda (d: C).(\lambda (u0: T).(getl i c (CHead d (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t2 (lift (S i) O u0)))) (eq T (TLRef i) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: (getl i c (CHead x0 (Bind Abbr) x1))).(\lambda (H4: (eq T t2 (lift (S i) O x1))).(eq_ind_r T (lift (S i) O x1) (\lambda (t: T).(eq T (TLRef i) t)) (let H5 \def (eq_ind C (CHead e (Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead e (Bind Abst) u) i H (CHead x0 (Bind Abbr) x1) H3)) in (let H6 \def (eq_ind C (CHead e (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead e (Bind Abst) u) i H (CHead x0 (Bind Abbr) x1) H3)) in (False_ind (eq T (TLRef i) (lift (S i) O x1)) H6))) t2 H4))))) H2)) H1)))))))). + \lambda (c: C).(\lambda (e: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (getl i c (CHead e (Bind Abst) u))).(\lambda (t2: T).(\lambda (H0: (pr2 c (TLRef i) t2)).(let H1 \def (pr2_gen_lref c t2 i H0) in (or_ind (eq T t2 (TLRef i)) (ex2_2 C T (\lambda (d: C).(\lambda (u0: T).(getl i c (CHead d (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t2 (lift (S i) O u0))))) (eq T (TLRef i) t2) (\lambda (H2: (eq T t2 (TLRef i))).(eq_ind_r T (TLRef i) (\lambda (t: T).(eq T (TLRef i) t)) (refl_equal T (TLRef i)) t2 H2)) (\lambda (H2: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S i) O u)))))).(ex2_2_ind C T (\lambda (d: C).(\lambda (u0: T).(getl i c (CHead d (Bind Abbr) u0)))) (\lambda (_: C).(\lambda (u0: T).(eq T t2 (lift (S i) O u0)))) (eq T (TLRef i) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: (getl i c (CHead x0 (Bind Abbr) x1))).(\lambda (H4: (eq T t2 (lift (S i) O x1))).(eq_ind_r T (lift (S i) O x1) (\lambda (t: T).(eq T (TLRef i) t)) (let H5 \def (eq_ind C (CHead e (Bind Abst) u) (\lambda (c0: C).(getl i c c0)) H (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead e (Bind Abst) u) i H (CHead x0 (Bind Abbr) x1) H3)) in (let H6 \def (eq_ind C (CHead e (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead e (Bind Abst) u) i H (CHead x0 (Bind Abbr) x1) H3)) in (False_ind (eq T (TLRef i) (lift (S i) O x1)) H6))) t2 H4))))) H2)) H1)))))))). theorem nf2_lift: \forall (d: C).(\forall (t: T).((nf2 d t) \to (\forall (c: C).(\forall (h: nat).(\forall (i: nat).((drop h i c d) \to (nf2 c (lift h i t)))))))) @@ -2432,7 +2432,7 @@ theorem nf2_lift: theorem nf2_lift1: \forall (e: C).(\forall (hds: PList).(\forall (c: C).(\forall (t: T).((drop1 hds c e) \to ((nf2 e t) \to (nf2 c (lift1 hds t))))))) \def - \lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c: C).(\forall (t: T).((drop1 p c e) \to ((nf2 e t) \to (nf2 c (lift1 p t))))))) (\lambda (c: C).(\lambda (t: T).(\lambda (H: (drop1 PNil c e)).(\lambda (H0: (nf2 e t)).(let H1 \def (match H return (\lambda (_: ?).(\lambda (p: PList).(\lambda (c0: C).(\lambda (c1: C).((eq PList p PNil) \to ((eq C c0 c) \to ((eq C c1 e) \to (nf2 c t)))))))) with [(drop1_nil c0) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq C c0 e)).(eq_ind C c (\lambda (c1: C).((eq C c1 e) \to (nf2 c t))) (\lambda (H4: (eq C c e)).(eq_ind C e (\lambda (c: C).(nf2 c t)) H0 c (sym_eq C c e H4))) c0 (sym_eq C c0 c H2) H3)))) | (drop1_cons c1 c2 h d H1 c3 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: (eq C c1 c)).(\lambda (H5: (eq C c3 e)).((let H6 \def (eq_ind PList (PCons h d hds) (\lambda (e0: PList).(match e0 return (\lambda (_: ?).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c1 c) \to ((eq C c3 e) \to ((drop h d c1 c2) \to ((drop1 hds c2 c3) \to (nf2 c t))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c) (refl_equal C e))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: C).(\forall (t: T).((drop1 p c e) \to ((nf2 e t) \to (nf2 c (lift1 p t)))))))).(\lambda (c: C).(\lambda (t: T).(\lambda (H0: (drop1 (PCons n n0 p) c e)).(\lambda (H1: (nf2 e t)).(let H2 \def (match H0 return (\lambda (_: ?).(\lambda (p0: PList).(\lambda (c0: C).(\lambda (c1: C).((eq PList p0 (PCons n n0 p)) \to ((eq C c0 c) \to ((eq C c1 e) \to (nf2 c (lift n n0 (lift1 p t)))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq C c0 e)).((let H5 \def (eq_ind PList PNil (\lambda (e0: PList).(match e0 return (\lambda (_: ?).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c0 c) \to ((eq C c0 e) \to (nf2 c (lift n n0 (lift1 p t))))) H5)) H3 H4)))) | (drop1_cons c1 c2 h d H2 c3 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c1 c)).(\lambda (H6: (eq C c3 e)).((let H7 \def (f_equal PList PList (\lambda (e0: PList).(match e0 return (\lambda (_: ?).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: ?).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: ?).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n1 d c1 c2) \to ((drop1 hds c2 c3) \to (nf2 c (lift n n0 (lift1 p t)))))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n n1 c1 c2) \to ((drop1 hds c2 c3) \to (nf2 c (lift n n0 (lift1 p t))))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c1 c) \to ((eq C c3 e) \to ((drop n n0 c1 c2) \to ((drop1 p0 c2 c3) \to (nf2 c (lift n n0 (lift1 p t)))))))) (\lambda (H12: (eq C c1 c)).(eq_ind C c (\lambda (c0: C).((eq C c3 e) \to ((drop n n0 c0 c2) \to ((drop1 p c2 c3) \to (nf2 c (lift n n0 (lift1 p t))))))) (\lambda (H13: (eq C c3 e)).(eq_ind C e (\lambda (c0: C).((drop n n0 c c2) \to ((drop1 p c2 c0) \to (nf2 c (lift n n0 (lift1 p t)))))) (\lambda (H14: (drop n n0 c c2)).(\lambda (H15: (drop1 p c2 e)).(nf2_lift c2 (lift1 p t) (H c2 t H15 H1) c n n0 H14))) c3 (sym_eq C c3 e H13))) c1 (sym_eq C c1 c H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c) (refl_equal C e))))))))))) hds)). + \lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c: C).(\forall (t: T).((drop1 p c e) \to ((nf2 e t) \to (nf2 c (lift1 p t))))))) (\lambda (c: C).(\lambda (t: T).(\lambda (H: (drop1 PNil c e)).(\lambda (H0: (nf2 e t)).(let H1 \def (match H return (\lambda (p: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p c0 c1)).((eq PList p PNil) \to ((eq C c0 c) \to ((eq C c1 e) \to (nf2 c t)))))))) with [(drop1_nil c0) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq C c0 e)).(eq_ind C c (\lambda (c1: C).((eq C c1 e) \to (nf2 c t))) (\lambda (H4: (eq C c e)).(eq_ind C e (\lambda (c: C).(nf2 c t)) H0 c (sym_eq C c e H4))) c0 (sym_eq C c0 c H2) H3)))) | (drop1_cons c1 c2 h d H1 c3 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: (eq C c1 c)).(\lambda (H5: (eq C c3 e)).((let H6 \def (eq_ind PList (PCons h d hds) (\lambda (e0: PList).(match e0 return (\lambda (_: PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c1 c) \to ((eq C c3 e) \to ((drop h d c1 c2) \to ((drop1 hds c2 c3) \to (nf2 c t))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c) (refl_equal C e))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: C).(\forall (t: T).((drop1 p c e) \to ((nf2 e t) \to (nf2 c (lift1 p t)))))))).(\lambda (c: C).(\lambda (t: T).(\lambda (H0: (drop1 (PCons n n0 p) c e)).(\lambda (H1: (nf2 e t)).(let H2 \def (match H0 return (\lambda (p0: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p0 c0 c1)).((eq PList p0 (PCons n n0 p)) \to ((eq C c0 c) \to ((eq C c1 e) \to (nf2 c (lift n n0 (lift1 p t)))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq C c0 e)).((let H5 \def (eq_ind PList PNil (\lambda (e0: PList).(match e0 return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c0 c) \to ((eq C c0 e) \to (nf2 c (lift n n0 (lift1 p t))))) H5)) H3 H4)))) | (drop1_cons c1 c2 h d H2 c3 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c1 c)).(\lambda (H6: (eq C c3 e)).((let H7 \def (f_equal PList PList (\lambda (e0: PList).(match e0 return (\lambda (_: PList).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: PList).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: PList).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n1 d c1 c2) \to ((drop1 hds c2 c3) \to (nf2 c (lift n n0 (lift1 p t)))))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n n1 c1 c2) \to ((drop1 hds c2 c3) \to (nf2 c (lift n n0 (lift1 p t))))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c1 c) \to ((eq C c3 e) \to ((drop n n0 c1 c2) \to ((drop1 p0 c2 c3) \to (nf2 c (lift n n0 (lift1 p t)))))))) (\lambda (H12: (eq C c1 c)).(eq_ind C c (\lambda (c0: C).((eq C c3 e) \to ((drop n n0 c0 c2) \to ((drop1 p c2 c3) \to (nf2 c (lift n n0 (lift1 p t))))))) (\lambda (H13: (eq C c3 e)).(eq_ind C e (\lambda (c0: C).((drop n n0 c c2) \to ((drop1 p c2 c0) \to (nf2 c (lift n n0 (lift1 p t)))))) (\lambda (H14: (drop n n0 c c2)).(\lambda (H15: (drop1 p c2 e)).(nf2_lift c2 (lift1 p t) (H c2 t H15 H1) c n n0 H14))) c3 (sym_eq C c3 e H13))) c1 (sym_eq C c1 c H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c) (refl_equal C e))))))))))) hds)). theorem nf2_iso_appls_lref: \forall (c: C).(\forall (i: nat).((nf2 c (TLRef i)) \to (\forall (vs: TList).(\forall (u: T).((pr3 c (THeads (Flat Appl) vs (TLRef i)) u) \to (iso (THeads (Flat Appl) vs (TLRef i)) u)))))) @@ -2442,7 +2442,7 @@ theorem nf2_iso_appls_lref: theorem nf2_dec: \forall (c: C).(\forall (t1: T).(or (nf2 c t1) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c t1 t2))))) \def - \lambda (c: C).(c_tail_ind (\lambda (c0: C).(\forall (t1: T).(or (\forall (t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2)))))) (\lambda (n: nat).(\lambda (t1: T).(let H_x \def (nf0_dec t1) in (let H \def H_x in (or_ind (\forall (t2: T).((pr0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t1 t2))) (or (\forall (t2: T).((pr2 (CSort n) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CSort n) t1 t2)))) (\lambda (H0: ((\forall (t2: T).((pr0 t1 t2) \to (eq T t1 t2))))).(or_introl (\forall (t2: T).((pr2 (CSort n) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CSort n) t1 t2))) (\lambda (t2: T).(\lambda (H1: (pr2 (CSort n) t1 t2)).(let H_y \def (pr2_gen_csort t1 t2 n H1) in (H0 t2 H_y)))))) (\lambda (H0: (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t1 t2)))).(ex2_ind T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t1 t2)) (or (\forall (t2: T).((pr2 (CSort n) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CSort n) t1 t2)))) (\lambda (x: T).(\lambda (H1: (((eq T t1 x) \to (\forall (P: Prop).P)))).(\lambda (H2: (pr0 t1 x)).(or_intror (\forall (t2: T).((pr2 (CSort n) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CSort n) t1 t2))) (ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CSort n) t1 t2)) x H1 (pr2_free (CSort n) t1 x H2)))))) H0)) H))))) (\lambda (c0: C).(\lambda (H: ((\forall (t1: T).(or (\forall (t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (t1: T).(let H_x \def (H t1) in (let H0 \def H_x in (or_ind (\forall (t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2))) (or (\forall (t2: T).((pr2 (CTail k t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t c0) t1 t2)))) (\lambda (H1: ((\forall (t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))))).(match k return (\lambda (_: ?).(\lambda (k0: K).(or (\forall (t2: T).((pr2 (CTail k0 t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k0 t c0) t1 t2)))))) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).(\lambda (b0: B).(or (\forall (t2: T).((pr2 (CTail (Bind b0) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind b0) t c0) t1 t2)))))) with [Abbr \Rightarrow (let H_x0 \def (dnf_dec t t1 (clen c0)) in (let H2 \def H_x0 in (ex_ind T (\lambda (v: T).(or (subst0 (clen c0) t t1 (lift (S O) (clen c0) v)) (eq T t1 (lift (S O) (clen c0) v)))) (or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)))) (\lambda (x: T).(\lambda (H3: (or (subst0 (clen c0) t t1 (lift (S O) (clen c0) x)) (eq T t1 (lift (S O) (clen c0) x)))).(or_ind (subst0 (clen c0) t t1 (lift (S O) (clen c0) x)) (eq T t1 (lift (S O) (clen c0) x)) (or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)))) (\lambda (H4: (subst0 (clen c0) t t1 (lift (S O) (clen c0) x))).(let H_x1 \def (getl_ctail_clen Abbr t c0) in (let H5 \def H_x1 in (ex_ind nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind Abbr) t c0) (CHead (CSort n) (Bind Abbr) t))) (or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)))) (\lambda (x0: nat).(\lambda (H6: (getl (clen c0) (CTail (Bind Abbr) t c0) (CHead (CSort x0) (Bind Abbr) t))).(or_intror (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2))) (ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)) (lift (S O) (clen c0) x) (\lambda (H7: (eq T t1 (lift (S O) (clen c0) x))).(\lambda (P: Prop).(let H8 \def (eq_ind T t1 (\lambda (t0: T).(subst0 (clen c0) t t0 (lift (S O) (clen c0) x))) H4 (lift (S O) (clen c0) x) H7) in (subst0_gen_lift_false x t (lift (S O) (clen c0) x) (S O) (clen c0) (clen c0) (le_n (clen c0)) (eq_ind_r nat (plus (S O) (clen c0)) (\lambda (n: nat).(lt (clen c0) n)) (le_n (plus (S O) (clen c0))) (plus (clen c0) (S O)) (plus_comm (clen c0) (S O))) H8 P)))) (pr2_delta (CTail (Bind Abbr) t c0) (CSort x0) t (clen c0) H6 t1 t1 (pr0_refl t1) (lift (S O) (clen c0) x) H4))))) H5)))) (\lambda (H4: (eq T t1 (lift (S O) (clen c0) x))).(let H5 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: T).((pr2 c0 t t2) \to (eq T t t2)))) H1 (lift (S O) (clen c0) x) H4) in (eq_ind_r T (lift (S O) (clen c0) x) (\lambda (t0: T).(or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t0 t2))))) (or_introl (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) (lift (S O) (clen c0) x) t2) \to (eq T (lift (S O) (clen c0) x) t2))) (ex2 T (\lambda (t2: T).((eq T (lift (S O) (clen c0) x) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) (lift (S O) (clen c0) x) t2))) (\lambda (t2: T).(\lambda (H6: (pr2 (CTail (Bind Abbr) t c0) (lift (S O) (clen c0) x) t2)).(let H_x1 \def (pr2_gen_ctail (Bind Abbr) c0 t (lift (S O) (clen c0) x) t2 H6) in (let H7 \def H_x1 in (or_ind (pr2 c0 (lift (S O) (clen c0) x) t2) (ex3 T (\lambda (_: T).(eq K (Bind Abbr) (Bind Abbr))) (\lambda (t0: T).(pr0 (lift (S O) (clen c0) x) t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) (eq T (lift (S O) (clen c0) x) t2) (\lambda (H8: (pr2 c0 (lift (S O) (clen c0) x) t2)).(H5 t2 H8)) (\lambda (H8: (ex3 T (\lambda (_: T).(eq K (Bind Abbr) (Bind Abbr))) (\lambda (t: T).(pr0 (lift (S O) (clen c0) x) t)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq K (Bind Abbr) (Bind Abbr))) (\lambda (t0: T).(pr0 (lift (S O) (clen c0) x) t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)) (eq T (lift (S O) (clen c0) x) t2) (\lambda (x0: T).(\lambda (_: (eq K (Bind Abbr) (Bind Abbr))).(\lambda (H10: (pr0 (lift (S O) (clen c0) x) x0)).(\lambda (H11: (subst0 (clen c0) t x0 t2)).(ex2_ind T (\lambda (t3: T).(eq T x0 (lift (S O) (clen c0) t3))) (\lambda (t3: T).(pr0 x t3)) (eq T (lift (S O) (clen c0) x) t2) (\lambda (x1: T).(\lambda (H12: (eq T x0 (lift (S O) (clen c0) x1))).(\lambda (_: (pr0 x x1)).(let H14 \def (eq_ind T x0 (\lambda (t0: T).(subst0 (clen c0) t t0 t2)) H11 (lift (S O) (clen c0) x1) H12) in (subst0_gen_lift_false x1 t t2 (S O) (clen c0) (clen c0) (le_n (clen c0)) (eq_ind_r nat (plus (S O) (clen c0)) (\lambda (n: nat).(lt (clen c0) n)) (le_n (plus (S O) (clen c0))) (plus (clen c0) (S O)) (plus_comm (clen c0) (S O))) H14 (eq T (lift (S O) (clen c0) x) t2)))))) (pr0_gen_lift x x0 (S O) (clen c0) H10)))))) H8)) H7)))))) t1 H4))) H3))) H2))) | Abst \Rightarrow (or_introl (\forall (t2: T).((pr2 (CTail (Bind Abst) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abst) t c0) t1 t2))) (\lambda (t2: T).(\lambda (H2: (pr2 (CTail (Bind Abst) t c0) t1 t2)).(let H_x0 \def (pr2_gen_ctail (Bind Abst) c0 t t1 t2 H2) in (let H3 \def H_x0 in (or_ind (pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Bind Abst) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) (eq T t1 t2) (\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: (ex3 T (\lambda (_: T).(eq K (Bind Abst) (Bind Abbr))) (\lambda (t: T).(pr0 t1 t)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq K (Bind Abst) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: (eq K (Bind Abst) (Bind Abbr))).(\lambda (_: (pr0 t1 x0)).(\lambda (_: (subst0 (clen c0) t x0 t2)).(let H8 \def (eq_ind K (Bind Abst) (\lambda (ee: K).(match ee return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) H4)) H3)))))) | Void \Rightarrow (or_introl (\forall (t2: T).((pr2 (CTail (Bind Void) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Void) t c0) t1 t2))) (\lambda (t2: T).(\lambda (H2: (pr2 (CTail (Bind Void) t c0) t1 t2)).(let H_x0 \def (pr2_gen_ctail (Bind Void) c0 t t1 t2 H2) in (let H3 \def H_x0 in (or_ind (pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Bind Void) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) (eq T t1 t2) (\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: (ex3 T (\lambda (_: T).(eq K (Bind Void) (Bind Abbr))) (\lambda (t: T).(pr0 t1 t)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq K (Bind Void) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: (eq K (Bind Void) (Bind Abbr))).(\lambda (_: (pr0 t1 x0)).(\lambda (_: (subst0 (clen c0) t x0 t2)).(let H8 \def (eq_ind K (Bind Void) (\lambda (ee: K).(match ee return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) H4)) H3))))))]) | (Flat f) \Rightarrow (or_introl (\forall (t2: T).((pr2 (CTail (Flat f) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Flat f) t c0) t1 t2))) (\lambda (t2: T).(\lambda (H2: (pr2 (CTail (Flat f) t c0) t1 t2)).(let H_x0 \def (pr2_gen_ctail (Flat f) c0 t t1 t2 H2) in (let H3 \def H_x0 in (or_ind (pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Flat f) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) (eq T t1 t2) (\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: (ex3 T (\lambda (_: T).(eq K (Flat f) (Bind Abbr))) (\lambda (t: T).(pr0 t1 t)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq K (Flat f) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: (eq K (Flat f) (Bind Abbr))).(\lambda (_: (pr0 t1 x0)).(\lambda (_: (subst0 (clen c0) t x0 t2)).(let H8 \def (eq_ind K (Flat f) (\lambda (ee: K).(match ee return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) H4)) H3))))))])) (\lambda (H1: (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2)))).(ex2_ind T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2)) (or (\forall (t2: T).((pr2 (CTail k t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t c0) t1 t2)))) (\lambda (x: T).(\lambda (H2: (((eq T t1 x) \to (\forall (P: Prop).P)))).(\lambda (H3: (pr2 c0 t1 x)).(or_intror (\forall (t2: T).((pr2 (CTail k t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t c0) t1 t2))) (ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t c0) t1 t2)) x H2 (pr2_ctail c0 t1 x H3 k t)))))) H1)) H0)))))))) c). + \lambda (c: C).(c_tail_ind (\lambda (c0: C).(\forall (t1: T).(or (\forall (t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2)))))) (\lambda (n: nat).(\lambda (t1: T).(let H_x \def (nf0_dec t1) in (let H \def H_x in (or_ind (\forall (t2: T).((pr0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t1 t2))) (or (\forall (t2: T).((pr2 (CSort n) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CSort n) t1 t2)))) (\lambda (H0: ((\forall (t2: T).((pr0 t1 t2) \to (eq T t1 t2))))).(or_introl (\forall (t2: T).((pr2 (CSort n) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CSort n) t1 t2))) (\lambda (t2: T).(\lambda (H1: (pr2 (CSort n) t1 t2)).(let H_y \def (pr2_gen_csort t1 t2 n H1) in (H0 t2 H_y)))))) (\lambda (H0: (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t1 t2)))).(ex2_ind T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr0 t1 t2)) (or (\forall (t2: T).((pr2 (CSort n) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CSort n) t1 t2)))) (\lambda (x: T).(\lambda (H1: (((eq T t1 x) \to (\forall (P: Prop).P)))).(\lambda (H2: (pr0 t1 x)).(or_intror (\forall (t2: T).((pr2 (CSort n) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CSort n) t1 t2))) (ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CSort n) t1 t2)) x H1 (pr2_free (CSort n) t1 x H2)))))) H0)) H))))) (\lambda (c0: C).(\lambda (H: ((\forall (t1: T).(or (\forall (t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (t1: T).(let H_x \def (H t1) in (let H0 \def H_x in (or_ind (\forall (t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2))) (or (\forall (t2: T).((pr2 (CTail k t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t c0) t1 t2)))) (\lambda (H1: ((\forall (t2: T).((pr2 c0 t1 t2) \to (eq T t1 t2))))).(match k return (\lambda (k0: K).(or (\forall (t2: T).((pr2 (CTail k0 t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k0 t c0) t1 t2))))) with [(Bind b) \Rightarrow (match b return (\lambda (b0: B).(or (\forall (t2: T).((pr2 (CTail (Bind b0) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind b0) t c0) t1 t2))))) with [Abbr \Rightarrow (let H_x0 \def (dnf_dec t t1 (clen c0)) in (let H2 \def H_x0 in (ex_ind T (\lambda (v: T).(or (subst0 (clen c0) t t1 (lift (S O) (clen c0) v)) (eq T t1 (lift (S O) (clen c0) v)))) (or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)))) (\lambda (x: T).(\lambda (H3: (or (subst0 (clen c0) t t1 (lift (S O) (clen c0) x)) (eq T t1 (lift (S O) (clen c0) x)))).(or_ind (subst0 (clen c0) t t1 (lift (S O) (clen c0) x)) (eq T t1 (lift (S O) (clen c0) x)) (or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)))) (\lambda (H4: (subst0 (clen c0) t t1 (lift (S O) (clen c0) x))).(let H_x1 \def (getl_ctail_clen Abbr t c0) in (let H5 \def H_x1 in (ex_ind nat (\lambda (n: nat).(getl (clen c0) (CTail (Bind Abbr) t c0) (CHead (CSort n) (Bind Abbr) t))) (or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)))) (\lambda (x0: nat).(\lambda (H6: (getl (clen c0) (CTail (Bind Abbr) t c0) (CHead (CSort x0) (Bind Abbr) t))).(or_intror (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2))) (ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t1 t2)) (lift (S O) (clen c0) x) (\lambda (H7: (eq T t1 (lift (S O) (clen c0) x))).(\lambda (P: Prop).(let H8 \def (eq_ind T t1 (\lambda (t0: T).(subst0 (clen c0) t t0 (lift (S O) (clen c0) x))) H4 (lift (S O) (clen c0) x) H7) in (subst0_gen_lift_false x t (lift (S O) (clen c0) x) (S O) (clen c0) (clen c0) (le_n (clen c0)) (eq_ind_r nat (plus (S O) (clen c0)) (\lambda (n: nat).(lt (clen c0) n)) (le_n (plus (S O) (clen c0))) (plus (clen c0) (S O)) (plus_comm (clen c0) (S O))) H8 P)))) (pr2_delta (CTail (Bind Abbr) t c0) (CSort x0) t (clen c0) H6 t1 t1 (pr0_refl t1) (lift (S O) (clen c0) x) H4))))) H5)))) (\lambda (H4: (eq T t1 (lift (S O) (clen c0) x))).(let H5 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: T).((pr2 c0 t t2) \to (eq T t t2)))) H1 (lift (S O) (clen c0) x) H4) in (eq_ind_r T (lift (S O) (clen c0) x) (\lambda (t0: T).(or (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) t0 t2) \to (eq T t0 t2))) (ex2 T (\lambda (t2: T).((eq T t0 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) t0 t2))))) (or_introl (\forall (t2: T).((pr2 (CTail (Bind Abbr) t c0) (lift (S O) (clen c0) x) t2) \to (eq T (lift (S O) (clen c0) x) t2))) (ex2 T (\lambda (t2: T).((eq T (lift (S O) (clen c0) x) t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abbr) t c0) (lift (S O) (clen c0) x) t2))) (\lambda (t2: T).(\lambda (H6: (pr2 (CTail (Bind Abbr) t c0) (lift (S O) (clen c0) x) t2)).(let H_x1 \def (pr2_gen_ctail (Bind Abbr) c0 t (lift (S O) (clen c0) x) t2 H6) in (let H7 \def H_x1 in (or_ind (pr2 c0 (lift (S O) (clen c0) x) t2) (ex3 T (\lambda (_: T).(eq K (Bind Abbr) (Bind Abbr))) (\lambda (t0: T).(pr0 (lift (S O) (clen c0) x) t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) (eq T (lift (S O) (clen c0) x) t2) (\lambda (H8: (pr2 c0 (lift (S O) (clen c0) x) t2)).(H5 t2 H8)) (\lambda (H8: (ex3 T (\lambda (_: T).(eq K (Bind Abbr) (Bind Abbr))) (\lambda (t: T).(pr0 (lift (S O) (clen c0) x) t)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq K (Bind Abbr) (Bind Abbr))) (\lambda (t0: T).(pr0 (lift (S O) (clen c0) x) t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)) (eq T (lift (S O) (clen c0) x) t2) (\lambda (x0: T).(\lambda (_: (eq K (Bind Abbr) (Bind Abbr))).(\lambda (H10: (pr0 (lift (S O) (clen c0) x) x0)).(\lambda (H11: (subst0 (clen c0) t x0 t2)).(ex2_ind T (\lambda (t3: T).(eq T x0 (lift (S O) (clen c0) t3))) (\lambda (t3: T).(pr0 x t3)) (eq T (lift (S O) (clen c0) x) t2) (\lambda (x1: T).(\lambda (H12: (eq T x0 (lift (S O) (clen c0) x1))).(\lambda (_: (pr0 x x1)).(let H14 \def (eq_ind T x0 (\lambda (t0: T).(subst0 (clen c0) t t0 t2)) H11 (lift (S O) (clen c0) x1) H12) in (subst0_gen_lift_false x1 t t2 (S O) (clen c0) (clen c0) (le_n (clen c0)) (eq_ind_r nat (plus (S O) (clen c0)) (\lambda (n: nat).(lt (clen c0) n)) (le_n (plus (S O) (clen c0))) (plus (clen c0) (S O)) (plus_comm (clen c0) (S O))) H14 (eq T (lift (S O) (clen c0) x) t2)))))) (pr0_gen_lift x x0 (S O) (clen c0) H10)))))) H8)) H7)))))) t1 H4))) H3))) H2))) | Abst \Rightarrow (or_introl (\forall (t2: T).((pr2 (CTail (Bind Abst) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Abst) t c0) t1 t2))) (\lambda (t2: T).(\lambda (H2: (pr2 (CTail (Bind Abst) t c0) t1 t2)).(let H_x0 \def (pr2_gen_ctail (Bind Abst) c0 t t1 t2 H2) in (let H3 \def H_x0 in (or_ind (pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Bind Abst) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) (eq T t1 t2) (\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: (ex3 T (\lambda (_: T).(eq K (Bind Abst) (Bind Abbr))) (\lambda (t: T).(pr0 t1 t)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq K (Bind Abst) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: (eq K (Bind Abst) (Bind Abbr))).(\lambda (_: (pr0 t1 x0)).(\lambda (_: (subst0 (clen c0) t x0 t2)).(let H8 \def (eq_ind K (Bind Abst) (\lambda (ee: K).(match ee return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) H4)) H3)))))) | Void \Rightarrow (or_introl (\forall (t2: T).((pr2 (CTail (Bind Void) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Bind Void) t c0) t1 t2))) (\lambda (t2: T).(\lambda (H2: (pr2 (CTail (Bind Void) t c0) t1 t2)).(let H_x0 \def (pr2_gen_ctail (Bind Void) c0 t t1 t2 H2) in (let H3 \def H_x0 in (or_ind (pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Bind Void) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) (eq T t1 t2) (\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: (ex3 T (\lambda (_: T).(eq K (Bind Void) (Bind Abbr))) (\lambda (t: T).(pr0 t1 t)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq K (Bind Void) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: (eq K (Bind Void) (Bind Abbr))).(\lambda (_: (pr0 t1 x0)).(\lambda (_: (subst0 (clen c0) t x0 t2)).(let H8 \def (eq_ind K (Bind Void) (\lambda (ee: K).(match ee return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) H4)) H3))))))]) | (Flat f) \Rightarrow (or_introl (\forall (t2: T).((pr2 (CTail (Flat f) t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail (Flat f) t c0) t1 t2))) (\lambda (t2: T).(\lambda (H2: (pr2 (CTail (Flat f) t c0) t1 t2)).(let H_x0 \def (pr2_gen_ctail (Flat f) c0 t t1 t2 H2) in (let H3 \def H_x0 in (or_ind (pr2 c0 t1 t2) (ex3 T (\lambda (_: T).(eq K (Flat f) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2))) (eq T t1 t2) (\lambda (H4: (pr2 c0 t1 t2)).(H1 t2 H4)) (\lambda (H4: (ex3 T (\lambda (_: T).(eq K (Flat f) (Bind Abbr))) (\lambda (t: T).(pr0 t1 t)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)))).(ex3_ind T (\lambda (_: T).(eq K (Flat f) (Bind Abbr))) (\lambda (t0: T).(pr0 t1 t0)) (\lambda (t0: T).(subst0 (clen c0) t t0 t2)) (eq T t1 t2) (\lambda (x0: T).(\lambda (H5: (eq K (Flat f) (Bind Abbr))).(\lambda (_: (pr0 t1 x0)).(\lambda (_: (subst0 (clen c0) t x0 t2)).(let H8 \def (eq_ind K (Flat f) (\lambda (ee: K).(match ee return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])) I (Bind Abbr) H5) in (False_ind (eq T t1 t2) H8)))))) H4)) H3))))))])) (\lambda (H1: (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2)))).(ex2_ind T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 c0 t1 t2)) (or (\forall (t2: T).((pr2 (CTail k t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t c0) t1 t2)))) (\lambda (x: T).(\lambda (H2: (((eq T t1 x) \to (\forall (P: Prop).P)))).(\lambda (H3: (pr2 c0 t1 x)).(or_intror (\forall (t2: T).((pr2 (CTail k t c0) t1 t2) \to (eq T t1 t2))) (ex2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t c0) t1 t2))) (ex_intro2 T (\lambda (t2: T).((eq T t1 t2) \to (\forall (P: Prop).P))) (\lambda (t2: T).(pr2 (CTail k t c0) t1 t2)) x H2 (pr2_ctail c0 t1 x H3 k t)))))) H1)) H0)))))))) c). inductive sn3 (c:C): T \to Prop \def | sn3_sing: \forall (t1: T).(((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2))))) \to (sn3 c t1)). @@ -2455,7 +2455,7 @@ definition sns3: theorem sn3_gen_flat: \forall (f: F).(\forall (c: C).(\forall (u: T).(\forall (t: T).((sn3 c (THead (Flat f) u t)) \to (land (sn3 c u) (sn3 c t)))))) \def - \lambda (f: F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead (Flat f) u t))).(insert_eq T (THead (Flat f) u t) (\lambda (t0: T).(sn3 c t0)) (land (sn3 c u) (sn3 c t)) (\lambda (y: T).(\lambda (H0: (sn3 c y)).(unintro T t (\lambda (t0: T).((eq T y (THead (Flat f) u t0)) \to (land (sn3 c u) (sn3 c t0)))) (unintro T u (\lambda (t0: T).(\forall (x: T).((eq T y (THead (Flat f) t0 x)) \to (land (sn3 c t0) (sn3 c x))))) (sn3_ind c (\lambda (t0: T).(\forall (x: T).(\forall (x0: T).((eq T t0 (THead (Flat f) x x0)) \to (land (sn3 c x) (sn3 c x0)))))) (\lambda (t1: T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat f) x x0)) \to (land (sn3 c x) (sn3 c x0)))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T t1 (THead (Flat f) x x0))).(let H4 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat f) x x0)) \to (land (sn3 c x) (sn3 c x0))))))))) H2 (THead (Flat f) x x0) H3) in (let H5 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (sn3 c t2))))) H1 (THead (Flat f) x x0) H3) in (conj (sn3 c x) (sn3 c x0) (sn3_sing c x (\lambda (t2: T).(\lambda (H6: (((eq T x t2) \to (\forall (P: Prop).P)))).(\lambda (H7: (pr3 c x t2)).(let H8 \def (H4 (THead (Flat f) t2 x0) (\lambda (H3: (eq T (THead (Flat f) x x0) (THead (Flat f) t2 x0))).(\lambda (P: Prop).(let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) (THead (Flat f) x x0) (THead (Flat f) t2 x0) H3) in (let H5 \def (eq_ind_r T t2 (\lambda (t: T).(pr3 c x t)) H7 x H4) in (let H6 \def (eq_ind_r T t2 (\lambda (t: T).((eq T x t) \to (\forall (P: Prop).P))) H6 x H4) in (H6 (refl_equal T x) P)))))) (pr3_head_12 c x t2 H7 (Flat f) x0 x0 (pr3_refl (CHead c (Flat f) t2) x0)) t2 x0 (refl_equal T (THead (Flat f) t2 x0))) in (and_ind (sn3 c t2) (sn3 c x0) (sn3 c t2) (\lambda (H9: (sn3 c t2)).(\lambda (_: (sn3 c x0)).H9)) H8)))))) (sn3_sing c x0 (\lambda (t2: T).(\lambda (H6: (((eq T x0 t2) \to (\forall (P: Prop).P)))).(\lambda (H7: (pr3 c x0 t2)).(let H8 \def (H4 (THead (Flat f) x t2) (\lambda (H3: (eq T (THead (Flat f) x x0) (THead (Flat f) x t2))).(\lambda (P: Prop).(let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t) \Rightarrow t])) (THead (Flat f) x x0) (THead (Flat f) x t2) H3) in (let H5 \def (eq_ind_r T t2 (\lambda (t: T).(pr3 c x0 t)) H7 x0 H4) in (let H6 \def (eq_ind_r T t2 (\lambda (t: T).((eq T x0 t) \to (\forall (P: Prop).P))) H6 x0 H4) in (H6 (refl_equal T x0) P)))))) (pr3_thin_dx c x0 t2 H7 x f) x t2 (refl_equal T (THead (Flat f) x t2))) in (and_ind (sn3 c x) (sn3 c t2) (sn3 c t2) (\lambda (_: (sn3 c x)).(\lambda (H10: (sn3 c t2)).H10)) H8))))))))))))))) y H0))))) H))))). + \lambda (f: F).(\lambda (c: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H: (sn3 c (THead (Flat f) u t))).(insert_eq T (THead (Flat f) u t) (\lambda (t0: T).(sn3 c t0)) (land (sn3 c u) (sn3 c t)) (\lambda (y: T).(\lambda (H0: (sn3 c y)).(unintro T t (\lambda (t0: T).((eq T y (THead (Flat f) u t0)) \to (land (sn3 c u) (sn3 c t0)))) (unintro T u (\lambda (t0: T).(\forall (x: T).((eq T y (THead (Flat f) t0 x)) \to (land (sn3 c t0) (sn3 c x))))) (sn3_ind c (\lambda (t0: T).(\forall (x: T).(\forall (x0: T).((eq T t0 (THead (Flat f) x x0)) \to (land (sn3 c x) (sn3 c x0)))))) (\lambda (t1: T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat f) x x0)) \to (land (sn3 c x) (sn3 c x0)))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T t1 (THead (Flat f) x x0))).(let H4 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat f) x x0)) \to (land (sn3 c x) (sn3 c x0))))))))) H2 (THead (Flat f) x x0) H3) in (let H5 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (sn3 c t2))))) H1 (THead (Flat f) x x0) H3) in (conj (sn3 c x) (sn3 c x0) (sn3_sing c x (\lambda (t2: T).(\lambda (H6: (((eq T x t2) \to (\forall (P: Prop).P)))).(\lambda (H7: (pr3 c x t2)).(let H8 \def (H4 (THead (Flat f) t2 x0) (\lambda (H3: (eq T (THead (Flat f) x x0) (THead (Flat f) t2 x0))).(\lambda (P: Prop).(let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) (THead (Flat f) x x0) (THead (Flat f) t2 x0) H3) in (let H5 \def (eq_ind_r T t2 (\lambda (t: T).(pr3 c x t)) H7 x H4) in (let H6 \def (eq_ind_r T t2 (\lambda (t: T).((eq T x t) \to (\forall (P: Prop).P))) H6 x H4) in (H6 (refl_equal T x) P)))))) (pr3_head_12 c x t2 H7 (Flat f) x0 x0 (pr3_refl (CHead c (Flat f) t2) x0)) t2 x0 (refl_equal T (THead (Flat f) t2 x0))) in (and_ind (sn3 c t2) (sn3 c x0) (sn3 c t2) (\lambda (H9: (sn3 c t2)).(\lambda (_: (sn3 c x0)).H9)) H8)))))) (sn3_sing c x0 (\lambda (t2: T).(\lambda (H6: (((eq T x0 t2) \to (\forall (P: Prop).P)))).(\lambda (H7: (pr3 c x0 t2)).(let H8 \def (H4 (THead (Flat f) x t2) (\lambda (H3: (eq T (THead (Flat f) x x0) (THead (Flat f) x t2))).(\lambda (P: Prop).(let H4 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t) \Rightarrow t])) (THead (Flat f) x x0) (THead (Flat f) x t2) H3) in (let H5 \def (eq_ind_r T t2 (\lambda (t: T).(pr3 c x0 t)) H7 x0 H4) in (let H6 \def (eq_ind_r T t2 (\lambda (t: T).((eq T x0 t) \to (\forall (P: Prop).P))) H6 x0 H4) in (H6 (refl_equal T x0) P)))))) (pr3_thin_dx c x0 t2 H7 x f) x t2 (refl_equal T (THead (Flat f) x t2))) in (and_ind (sn3 c x) (sn3 c t2) (sn3 c t2) (\lambda (_: (sn3 c x)).(\lambda (H10: (sn3 c t2)).H10)) H8))))))))))))))) y H0))))) H))))). theorem sn3_nf2: \forall (c: C).(\forall (t: T).((nf2 c t) \to (sn3 c t))) @@ -2485,17 +2485,17 @@ theorem nf2_sn3: theorem sn3_appl_lref: \forall (c: C).(\forall (i: nat).((nf2 c (TLRef i)) \to (\forall (v: T).((sn3 c v) \to (sn3 c (THead (Flat Appl) v (TLRef i))))))) \def - \lambda (c: C).(\lambda (i: nat).(\lambda (H: (nf2 c (TLRef i))).(\lambda (v: T).(\lambda (H0: (sn3 c v)).(sn3_ind c (\lambda (t: T).(sn3 c (THead (Flat Appl) t (TLRef i)))) (\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c (THead (Flat Appl) t2 (TLRef i)))))))).(sn3_pr2_intro c (THead (Flat Appl) t1 (TLRef i)) (\lambda (t2: T).(\lambda (H3: (((eq T (THead (Flat Appl) t1 (TLRef i)) t2) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr2 c (THead (Flat Appl) t1 (TLRef i)) t2)).(let H5 \def (pr2_gen_appl c t1 (TLRef i) t2 H4) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (sn3 c t2) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c (TLRef i) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3))) (sn3 c t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H8: (pr2 c t1 x0)).(\lambda (H9: (pr2 c (TLRef i) x1)).(let H10 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) t1 (TLRef i)) t) \to (\forall (P: Prop).P))) H3 (THead (Flat Appl) x0 x1) H7) in (eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t: T).(sn3 c t)) (let H11 \def (eq_ind_r T x1 (\lambda (t: T).((eq T (THead (Flat Appl) t1 (TLRef i)) (THead (Flat Appl) x0 t)) \to (\forall (P: Prop).P))) H10 (TLRef i) (H x1 H9)) in (let H12 \def (eq_ind_r T x1 (\lambda (t: T).(pr2 c (TLRef i) t)) H9 (TLRef i) (H x1 H9)) in (eq_ind T (TLRef i) (\lambda (t: T).(sn3 c (THead (Flat Appl) x0 t))) (let H_x \def (term_dec t1 x0) in (let H13 \def H_x in (or_ind (eq T t1 x0) ((eq T t1 x0) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x0 (TLRef i))) (\lambda (H14: (eq T t1 x0)).(let H15 \def (eq_ind_r T x0 (\lambda (t: T).((eq T (THead (Flat Appl) t1 (TLRef i)) (THead (Flat Appl) t (TLRef i))) \to (\forall (P: Prop).P))) H11 t1 H14) in (let H16 \def (eq_ind_r T x0 (\lambda (t: T).(pr2 c t1 t)) H8 t1 H14) in (eq_ind T t1 (\lambda (t: T).(sn3 c (THead (Flat Appl) t (TLRef i)))) (H15 (refl_equal T (THead (Flat Appl) t1 (TLRef i))) (sn3 c (THead (Flat Appl) t1 (TLRef i)))) x0 H14)))) (\lambda (H14: (((eq T t1 x0) \to (\forall (P: Prop).P)))).(H2 x0 H14 (pr3_pr2 c t1 x0 H8))) H13))) x1 (H x1 H9)))) t2 H7))))))) H6)) (\lambda (H6: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3))))))) (sn3 c t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq T (TLRef i) (THead (Bind Abst) x0 x1))).(\lambda (H8: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (_: (pr2 c t1 x2)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 x3))))).(let H11 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) t1 (TLRef i)) t) \to (\forall (P: Prop).P))) H3 (THead (Bind Abbr) x2 x3) H8) in (eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t: T).(sn3 c t)) (let H12 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) x0 x1) H7) in (False_ind (sn3 c (THead (Bind Abbr) x2 x3)) H12)) t2 H8)))))))))) H6)) (\lambda (H6: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c t2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 Abst))).(\lambda (H8: (eq T (TLRef i) (THead (Bind x0) x1 x2))).(\lambda (H9: (eq T t2 (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)))).(\lambda (_: (pr2 c t1 x4)).(\lambda (_: (pr2 c x1 x5)).(\lambda (_: (pr2 (CHead c (Bind x0) x5) x2 x3)).(let H13 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) t1 (TLRef i)) t) \to (\forall (P: Prop).P))) H3 (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) H9) in (eq_ind_r T (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) (\lambda (t: T).(sn3 c t)) (let H14 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind x0) x1 x2) H8) in (False_ind (sn3 c (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3))) H14)) t2 H9)))))))))))))) H6)) H5))))))))) v H0))))). + \lambda (c: C).(\lambda (i: nat).(\lambda (H: (nf2 c (TLRef i))).(\lambda (v: T).(\lambda (H0: (sn3 c v)).(sn3_ind c (\lambda (t: T).(sn3 c (THead (Flat Appl) t (TLRef i)))) (\lambda (t1: T).(\lambda (_: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c (THead (Flat Appl) t2 (TLRef i)))))))).(sn3_pr2_intro c (THead (Flat Appl) t1 (TLRef i)) (\lambda (t2: T).(\lambda (H3: (((eq T (THead (Flat Appl) t1 (TLRef i)) t2) \to (\forall (P: Prop).P)))).(\lambda (H4: (pr2 c (THead (Flat Appl) t1 (TLRef i)) t2)).(let H5 \def (pr2_gen_appl c t1 (TLRef i) t2 H4) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (sn3 c t2) (\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c (TLRef i) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (TLRef i) t3))) (sn3 c t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T t2 (THead (Flat Appl) x0 x1))).(\lambda (H8: (pr2 c t1 x0)).(\lambda (H9: (pr2 c (TLRef i) x1)).(let H10 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) t1 (TLRef i)) t) \to (\forall (P: Prop).P))) H3 (THead (Flat Appl) x0 x1) H7) in (eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t: T).(sn3 c t)) (let H11 \def (eq_ind_r T x1 (\lambda (t: T).((eq T (THead (Flat Appl) t1 (TLRef i)) (THead (Flat Appl) x0 t)) \to (\forall (P: Prop).P))) H10 (TLRef i) (H x1 H9)) in (let H12 \def (eq_ind_r T x1 (\lambda (t: T).(pr2 c (TLRef i) t)) H9 (TLRef i) (H x1 H9)) in (eq_ind T (TLRef i) (\lambda (t: T).(sn3 c (THead (Flat Appl) x0 t))) (let H_x \def (term_dec t1 x0) in (let H13 \def H_x in (or_ind (eq T t1 x0) ((eq T t1 x0) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x0 (TLRef i))) (\lambda (H14: (eq T t1 x0)).(let H15 \def (eq_ind_r T x0 (\lambda (t: T).((eq T (THead (Flat Appl) t1 (TLRef i)) (THead (Flat Appl) t (TLRef i))) \to (\forall (P: Prop).P))) H11 t1 H14) in (let H16 \def (eq_ind_r T x0 (\lambda (t: T).(pr2 c t1 t)) H8 t1 H14) in (eq_ind T t1 (\lambda (t: T).(sn3 c (THead (Flat Appl) t (TLRef i)))) (H15 (refl_equal T (THead (Flat Appl) t1 (TLRef i))) (sn3 c (THead (Flat Appl) t1 (TLRef i)))) x0 H14)))) (\lambda (H14: (((eq T t1 x0) \to (\forall (P: Prop).P)))).(H2 x0 H14 (pr3_pr2 c t1 x0 H8))) H13))) x1 (H x1 H9)))) t2 H7))))))) H6)) (\lambda (H6: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t3))))))) (sn3 c t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H7: (eq T (TLRef i) (THead (Bind Abst) x0 x1))).(\lambda (H8: (eq T t2 (THead (Bind Abbr) x2 x3))).(\lambda (_: (pr2 c t1 x2)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x1 x3))))).(let H11 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) t1 (TLRef i)) t) \to (\forall (P: Prop).P))) H3 (THead (Bind Abbr) x2 x3) H8) in (eq_ind_r T (THead (Bind Abbr) x2 x3) (\lambda (t: T).(sn3 c t)) (let H12 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind Abst) x0 x1) H7) in (False_ind (sn3 c (THead (Bind Abbr) x2 x3)) H12)) t2 H8)))))))))) H6)) (\lambda (H6: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (TLRef i) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t1 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c t2) (\lambda (x0: B).(\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (not (eq B x0 Abst))).(\lambda (H8: (eq T (TLRef i) (THead (Bind x0) x1 x2))).(\lambda (H9: (eq T t2 (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)))).(\lambda (_: (pr2 c t1 x4)).(\lambda (_: (pr2 c x1 x5)).(\lambda (_: (pr2 (CHead c (Bind x0) x5) x2 x3)).(let H13 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) t1 (TLRef i)) t) \to (\forall (P: Prop).P))) H3 (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) H9) in (eq_ind_r T (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3)) (\lambda (t: T).(sn3 c t)) (let H14 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind x0) x1 x2) H8) in (False_ind (sn3 c (THead (Bind x0) x5 (THead (Flat Appl) (lift (S O) O x4) x3))) H14)) t2 H9)))))))))))))) H6)) H5))))))))) v H0))))). theorem sn3_appl_cast: \forall (c: C).(\forall (v: T).(\forall (u: T).((sn3 c (THead (Flat Appl) v u)) \to (\forall (t: T).((sn3 c (THead (Flat Appl) v t)) \to (sn3 c (THead (Flat Appl) v (THead (Flat Cast) u t)))))))) \def - \lambda (c: C).(\lambda (v: T).(\lambda (u: T).(\lambda (H: (sn3 c (THead (Flat Appl) v u))).(insert_eq T (THead (Flat Appl) v u) (\lambda (t: T).(sn3 c t)) (\forall (t: T).((sn3 c (THead (Flat Appl) v t)) \to (sn3 c (THead (Flat Appl) v (THead (Flat Cast) u t))))) (\lambda (y: T).(\lambda (H0: (sn3 c y)).(unintro T u (\lambda (t: T).((eq T y (THead (Flat Appl) v t)) \to (\forall (t0: T).((sn3 c (THead (Flat Appl) v t0)) \to (sn3 c (THead (Flat Appl) v (THead (Flat Cast) t t0))))))) (unintro T v (\lambda (t: T).(\forall (x: T).((eq T y (THead (Flat Appl) t x)) \to (\forall (t0: T).((sn3 c (THead (Flat Appl) t t0)) \to (sn3 c (THead (Flat Appl) t (THead (Flat Cast) x t0)))))))) (sn3_ind c (\lambda (t: T).(\forall (x: T).(\forall (x0: T).((eq T t (THead (Flat Appl) x x0)) \to (\forall (t0: T).((sn3 c (THead (Flat Appl) x t0)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t0))))))))) (\lambda (t1: T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat Appl) x x0)) \to (\forall (t: T).((sn3 c (THead (Flat Appl) x t)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t))))))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T t1 (THead (Flat Appl) x x0))).(\lambda (t: T).(\lambda (H4: (sn3 c (THead (Flat Appl) x t))).(insert_eq T (THead (Flat Appl) x t) (\lambda (t0: T).(sn3 c t0)) (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t))) (\lambda (y0: T).(\lambda (H5: (sn3 c y0)).(unintro T t (\lambda (t0: T).((eq T y0 (THead (Flat Appl) x t0)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t0))))) (sn3_ind c (\lambda (t0: T).(\forall (x1: T).((eq T t0 (THead (Flat Appl) x x1)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 x1)))))) (\lambda (t0: T).(\lambda (H6: ((\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (sn3 c t2)))))).(\lambda (H7: ((\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (\forall (x1: T).((eq T t2 (THead (Flat Appl) x x1)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 x1)))))))))).(\lambda (x1: T).(\lambda (H8: (eq T t0 (THead (Flat Appl) x x1))).(let H9 \def (eq_ind T t0 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (\forall (x1: T).((eq T t2 (THead (Flat Appl) x x1)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 x1))))))))) H7 (THead (Flat Appl) x x1) H8) in (let H10 \def (eq_ind T t0 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (sn3 c t2))))) H6 (THead (Flat Appl) x x1) H8) in (let H11 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat Appl) x x0)) \to (\forall (t0: T).((sn3 c (THead (Flat Appl) x t0)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t0)))))))))))) H2 (THead (Flat Appl) x x0) H3) in (let H12 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (sn3 c t2))))) H1 (THead (Flat Appl) x x0) H3) in (sn3_pr2_intro c (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (\lambda (t2: T).(\lambda (H13: (((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t2) \to (\forall (P: Prop).P)))).(\lambda (H14: (pr2 c (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t2)).(let H15 \def (pr2_gen_appl c x (THead (Flat Cast) x0 x1) t2 H14) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Flat Cast) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (sn3 c t2) (\lambda (H16: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c (THead (Flat Cast) x0 x1) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Flat Cast) x0 x1) t3))) (sn3 c t2) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H17: (eq T t2 (THead (Flat Appl) x2 x3))).(\lambda (H18: (pr2 c x x2)).(\lambda (H19: (pr2 c (THead (Flat Cast) x0 x1) x3)).(let H20 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t) \to (\forall (P: Prop).P))) H13 (THead (Flat Appl) x2 x3) H17) in (eq_ind_r T (THead (Flat Appl) x2 x3) (\lambda (t3: T).(sn3 c t3)) (let H21 \def (pr2_gen_cast c x0 x1 x3 H19) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x3 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c x1 t3)))) (pr2 c x1 x3) (sn3 c (THead (Flat Appl) x2 x3)) (\lambda (H22: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x3 (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c x1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x3 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c x1 t3))) (sn3 c (THead (Flat Appl) x2 x3)) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H23: (eq T x3 (THead (Flat Cast) x4 x5))).(\lambda (H24: (pr2 c x0 x4)).(\lambda (H25: (pr2 c x1 x5)).(let H26 \def (eq_ind T x3 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) x2 t)) \to (\forall (P: Prop).P))) H20 (THead (Flat Cast) x4 x5) H23) in (eq_ind_r T (THead (Flat Cast) x4 x5) (\lambda (t3: T).(sn3 c (THead (Flat Appl) x2 t3))) (let H_x \def (term_dec (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4)) in (let H27 \def H_x in (or_ind (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4)) ((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x2 (THead (Flat Cast) x4 x5))) (\lambda (H28: (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4))).(let H29 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4) H28) in ((let H30 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4) H28) in (\lambda (H31: (eq T x x2)).(let H32 \def (eq_ind_r T x4 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) x2 (THead (Flat Cast) t x5))) \to (\forall (P: Prop).P))) H26 x0 H30) in (let H33 \def (eq_ind_r T x4 (\lambda (t: T).(pr2 c x0 t)) H24 x0 H30) in (eq_ind T x0 (\lambda (t3: T).(sn3 c (THead (Flat Appl) x2 (THead (Flat Cast) t3 x5)))) (let H34 \def (eq_ind_r T x2 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) t (THead (Flat Cast) x0 x5))) \to (\forall (P: Prop).P))) H32 x H31) in (let H35 \def (eq_ind_r T x2 (\lambda (t: T).(pr2 c x t)) H18 x H31) in (eq_ind T x (\lambda (t3: T).(sn3 c (THead (Flat Appl) t3 (THead (Flat Cast) x0 x5)))) (let H_x0 \def (term_dec (THead (Flat Appl) x x1) (THead (Flat Appl) x x5)) in (let H36 \def H_x0 in (or_ind (eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x x5)) ((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x x5)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 x5))) (\lambda (H37: (eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x x5))).(let H38 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) x x1) (THead (Flat Appl) x x5) H37) in (let H39 \def (eq_ind_r T x5 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) x (THead (Flat Cast) x0 t))) \to (\forall (P: Prop).P))) H34 x1 H38) in (let H40 \def (eq_ind_r T x5 (\lambda (t: T).(pr2 c x1 t)) H25 x1 H38) in (eq_ind T x1 (\lambda (t3: T).(sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t3)))) (H39 (refl_equal T (THead (Flat Appl) x (THead (Flat Cast) x0 x1))) (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 x1)))) x5 H38))))) (\lambda (H37: (((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x x5)) \to (\forall (P: Prop).P)))).(H9 (THead (Flat Appl) x x5) H37 (pr3_pr2 c (THead (Flat Appl) x x1) (THead (Flat Appl) x x5) (pr2_thin_dx c x1 x5 H25 x Appl)) x5 (refl_equal T (THead (Flat Appl) x x5)))) H36))) x2 H31))) x4 H30))))) H29))) (\lambda (H28: (((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4)) \to (\forall (P: Prop).P)))).(let H_x0 \def (term_dec (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5)) in (let H29 \def H_x0 in (or_ind (eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5)) ((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x2 (THead (Flat Cast) x4 x5))) (\lambda (H30: (eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5))).(let H31 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5) H30) in ((let H32 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5) H30) in (\lambda (H33: (eq T x x2)).(let H34 \def (eq_ind_r T x5 (\lambda (t: T).(pr2 c x1 t)) H25 x1 H32) in (eq_ind T x1 (\lambda (t3: T).(sn3 c (THead (Flat Appl) x2 (THead (Flat Cast) x4 t3)))) (let H35 \def (eq_ind_r T x2 (\lambda (t: T).((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) t x4)) \to (\forall (P: Prop).P))) H28 x H33) in (let H36 \def (eq_ind_r T x2 (\lambda (t: T).(pr2 c x t)) H18 x H33) in (eq_ind T x (\lambda (t3: T).(sn3 c (THead (Flat Appl) t3 (THead (Flat Cast) x4 x1)))) (H11 (THead (Flat Appl) x x4) H35 (pr3_pr2 c (THead (Flat Appl) x x0) (THead (Flat Appl) x x4) (pr2_thin_dx c x0 x4 H24 x Appl)) x x4 (refl_equal T (THead (Flat Appl) x x4)) x1 (sn3_sing c (THead (Flat Appl) x x1) H10)) x2 H33))) x5 H32)))) H31))) (\lambda (H30: (((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5)) \to (\forall (P: Prop).P)))).(H11 (THead (Flat Appl) x2 x4) H28 (pr3_head_12 c x x2 (pr3_pr2 c x x2 H18) (Flat Appl) x0 x4 (pr3_pr2 (CHead c (Flat Appl) x2) x0 x4 (pr2_cflat c x0 x4 H24 Appl x2))) x2 x4 (refl_equal T (THead (Flat Appl) x2 x4)) x5 (H10 (THead (Flat Appl) x2 x5) H30 (pr3_head_12 c x x2 (pr3_pr2 c x x2 H18) (Flat Appl) x1 x5 (pr3_pr2 (CHead c (Flat Appl) x2) x1 x5 (pr2_cflat c x1 x5 H25 Appl x2)))))) H29)))) H27))) x3 H23))))))) H22)) (\lambda (H22: (pr2 c x1 x3)).(let H_x \def (term_dec (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3)) in (let H23 \def H_x in (or_ind (eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3)) ((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x2 x3)) (\lambda (H24: (eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3))).(let H25 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3) H24) in ((let H26 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3) H24) in (\lambda (H27: (eq T x x2)).(let H28 \def (eq_ind_r T x3 (\lambda (t: T).(pr2 c x1 t)) H22 x1 H26) in (let H29 \def (eq_ind_r T x3 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) x2 t)) \to (\forall (P: Prop).P))) H20 x1 H26) in (eq_ind T x1 (\lambda (t3: T).(sn3 c (THead (Flat Appl) x2 t3))) (let H30 \def (eq_ind_r T x2 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) t x1)) \to (\forall (P: Prop).P))) H29 x H27) in (let H31 \def (eq_ind_r T x2 (\lambda (t: T).(pr2 c x t)) H18 x H27) in (eq_ind T x (\lambda (t3: T).(sn3 c (THead (Flat Appl) t3 x1))) (sn3_sing c (THead (Flat Appl) x x1) H10) x2 H27))) x3 H26))))) H25))) (\lambda (H24: (((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3)) \to (\forall (P: Prop).P)))).(H10 (THead (Flat Appl) x2 x3) H24 (pr3_head_12 c x x2 (pr3_pr2 c x x2 H18) (Flat Appl) x1 x3 (pr3_pr2 (CHead c (Flat Appl) x2) x1 x3 (pr2_cflat c x1 x3 H22 Appl x2))))) H23)))) H21)) t2 H17))))))) H16)) (\lambda (H16: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3))))))) (sn3 c t2) (\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H17: (eq T (THead (Flat Cast) x0 x1) (THead (Bind Abst) x2 x3))).(\lambda (H18: (eq T t2 (THead (Bind Abbr) x4 x5))).(\lambda (_: (pr2 c x x4)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x3 x5))))).(let H21 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t) \to (\forall (P: Prop).P))) H13 (THead (Bind Abbr) x4 x5) H18) in (eq_ind_r T (THead (Bind Abbr) x4 x5) (\lambda (t3: T).(sn3 c t3)) (let H22 \def (eq_ind T (THead (Flat Cast) x0 x1) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) x2 x3) H17) in (False_ind (sn3 c (THead (Bind Abbr) x4 x5)) H22)) t2 H18)))))))))) H16)) (\lambda (H16: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c t2) (\lambda (x2: B).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (x6: T).(\lambda (x7: T).(\lambda (_: (not (eq B x2 Abst))).(\lambda (H18: (eq T (THead (Flat Cast) x0 x1) (THead (Bind x2) x3 x4))).(\lambda (H19: (eq T t2 (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5)))).(\lambda (_: (pr2 c x x6)).(\lambda (_: (pr2 c x3 x7)).(\lambda (_: (pr2 (CHead c (Bind x2) x7) x4 x5)).(let H23 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t) \to (\forall (P: Prop).P))) H13 (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5)) H19) in (eq_ind_r T (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5)) (\lambda (t3: T).(sn3 c t3)) (let H24 \def (eq_ind T (THead (Flat Cast) x0 x1) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind x2) x3 x4) H18) in (False_ind (sn3 c (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5))) H24)) t2 H19)))))))))))))) H16)) H15))))))))))))))) y0 H5)))) H4))))))))) y H0))))) H)))). + \lambda (c: C).(\lambda (v: T).(\lambda (u: T).(\lambda (H: (sn3 c (THead (Flat Appl) v u))).(insert_eq T (THead (Flat Appl) v u) (\lambda (t: T).(sn3 c t)) (\forall (t: T).((sn3 c (THead (Flat Appl) v t)) \to (sn3 c (THead (Flat Appl) v (THead (Flat Cast) u t))))) (\lambda (y: T).(\lambda (H0: (sn3 c y)).(unintro T u (\lambda (t: T).((eq T y (THead (Flat Appl) v t)) \to (\forall (t0: T).((sn3 c (THead (Flat Appl) v t0)) \to (sn3 c (THead (Flat Appl) v (THead (Flat Cast) t t0))))))) (unintro T v (\lambda (t: T).(\forall (x: T).((eq T y (THead (Flat Appl) t x)) \to (\forall (t0: T).((sn3 c (THead (Flat Appl) t t0)) \to (sn3 c (THead (Flat Appl) t (THead (Flat Cast) x t0)))))))) (sn3_ind c (\lambda (t: T).(\forall (x: T).(\forall (x0: T).((eq T t (THead (Flat Appl) x x0)) \to (\forall (t0: T).((sn3 c (THead (Flat Appl) x t0)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t0))))))))) (\lambda (t1: T).(\lambda (H1: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (sn3 c t2)))))).(\lambda (H2: ((\forall (t2: T).((((eq T t1 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t1 t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat Appl) x x0)) \to (\forall (t: T).((sn3 c (THead (Flat Appl) x t)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t))))))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T t1 (THead (Flat Appl) x x0))).(\lambda (t: T).(\lambda (H4: (sn3 c (THead (Flat Appl) x t))).(insert_eq T (THead (Flat Appl) x t) (\lambda (t0: T).(sn3 c t0)) (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t))) (\lambda (y0: T).(\lambda (H5: (sn3 c y0)).(unintro T t (\lambda (t0: T).((eq T y0 (THead (Flat Appl) x t0)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t0))))) (sn3_ind c (\lambda (t0: T).(\forall (x1: T).((eq T t0 (THead (Flat Appl) x x1)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 x1)))))) (\lambda (t0: T).(\lambda (H6: ((\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (sn3 c t2)))))).(\lambda (H7: ((\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (\forall (x1: T).((eq T t2 (THead (Flat Appl) x x1)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 x1)))))))))).(\lambda (x1: T).(\lambda (H8: (eq T t0 (THead (Flat Appl) x x1))).(let H9 \def (eq_ind T t0 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (\forall (x1: T).((eq T t2 (THead (Flat Appl) x x1)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 x1))))))))) H7 (THead (Flat Appl) x x1) H8) in (let H10 \def (eq_ind T t0 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (sn3 c t2))))) H6 (THead (Flat Appl) x x1) H8) in (let H11 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat Appl) x x0)) \to (\forall (t0: T).((sn3 c (THead (Flat Appl) x t0)) \to (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t0)))))))))))) H2 (THead (Flat Appl) x x0) H3) in (let H12 \def (eq_ind T t1 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (sn3 c t2))))) H1 (THead (Flat Appl) x x0) H3) in (sn3_pr2_intro c (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (\lambda (t2: T).(\lambda (H13: (((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t2) \to (\forall (P: Prop).P)))).(\lambda (H14: (pr2 c (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t2)).(let H15 \def (pr2_gen_appl c x (THead (Flat Cast) x0 x1) t2 H14) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Flat Cast) x0 x1) t3)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (sn3 c t2) (\lambda (H16: (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c (THead (Flat Cast) x0 x1) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c (THead (Flat Cast) x0 x1) t3))) (sn3 c t2) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H17: (eq T t2 (THead (Flat Appl) x2 x3))).(\lambda (H18: (pr2 c x x2)).(\lambda (H19: (pr2 c (THead (Flat Cast) x0 x1) x3)).(let H20 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t) \to (\forall (P: Prop).P))) H13 (THead (Flat Appl) x2 x3) H17) in (eq_ind_r T (THead (Flat Appl) x2 x3) (\lambda (t3: T).(sn3 c t3)) (let H21 \def (pr2_gen_cast c x0 x1 x3 H19) in (or_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T x3 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c x1 t3)))) (pr2 c x1 x3) (sn3 c (THead (Flat Appl) x2 x3)) (\lambda (H22: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x3 (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c x1 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T x3 (THead (Flat Cast) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x0 u2))) (\lambda (_: T).(\lambda (t3: T).(pr2 c x1 t3))) (sn3 c (THead (Flat Appl) x2 x3)) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H23: (eq T x3 (THead (Flat Cast) x4 x5))).(\lambda (H24: (pr2 c x0 x4)).(\lambda (H25: (pr2 c x1 x5)).(let H26 \def (eq_ind T x3 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) x2 t)) \to (\forall (P: Prop).P))) H20 (THead (Flat Cast) x4 x5) H23) in (eq_ind_r T (THead (Flat Cast) x4 x5) (\lambda (t3: T).(sn3 c (THead (Flat Appl) x2 t3))) (let H_x \def (term_dec (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4)) in (let H27 \def H_x in (or_ind (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4)) ((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x2 (THead (Flat Cast) x4 x5))) (\lambda (H28: (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4))).(let H29 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4) H28) in ((let H30 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4) H28) in (\lambda (H31: (eq T x x2)).(let H32 \def (eq_ind_r T x4 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) x2 (THead (Flat Cast) t x5))) \to (\forall (P: Prop).P))) H26 x0 H30) in (let H33 \def (eq_ind_r T x4 (\lambda (t: T).(pr2 c x0 t)) H24 x0 H30) in (eq_ind T x0 (\lambda (t3: T).(sn3 c (THead (Flat Appl) x2 (THead (Flat Cast) t3 x5)))) (let H34 \def (eq_ind_r T x2 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) t (THead (Flat Cast) x0 x5))) \to (\forall (P: Prop).P))) H32 x H31) in (let H35 \def (eq_ind_r T x2 (\lambda (t: T).(pr2 c x t)) H18 x H31) in (eq_ind T x (\lambda (t3: T).(sn3 c (THead (Flat Appl) t3 (THead (Flat Cast) x0 x5)))) (let H_x0 \def (term_dec (THead (Flat Appl) x x1) (THead (Flat Appl) x x5)) in (let H36 \def H_x0 in (or_ind (eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x x5)) ((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x x5)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 x5))) (\lambda (H37: (eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x x5))).(let H38 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) x x1) (THead (Flat Appl) x x5) H37) in (let H39 \def (eq_ind_r T x5 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) x (THead (Flat Cast) x0 t))) \to (\forall (P: Prop).P))) H34 x1 H38) in (let H40 \def (eq_ind_r T x5 (\lambda (t: T).(pr2 c x1 t)) H25 x1 H38) in (eq_ind T x1 (\lambda (t3: T).(sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 t3)))) (H39 (refl_equal T (THead (Flat Appl) x (THead (Flat Cast) x0 x1))) (sn3 c (THead (Flat Appl) x (THead (Flat Cast) x0 x1)))) x5 H38))))) (\lambda (H37: (((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x x5)) \to (\forall (P: Prop).P)))).(H9 (THead (Flat Appl) x x5) H37 (pr3_pr2 c (THead (Flat Appl) x x1) (THead (Flat Appl) x x5) (pr2_thin_dx c x1 x5 H25 x Appl)) x5 (refl_equal T (THead (Flat Appl) x x5)))) H36))) x2 H31))) x4 H30))))) H29))) (\lambda (H28: (((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x2 x4)) \to (\forall (P: Prop).P)))).(let H_x0 \def (term_dec (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5)) in (let H29 \def H_x0 in (or_ind (eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5)) ((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x2 (THead (Flat Cast) x4 x5))) (\lambda (H30: (eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5))).(let H31 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5) H30) in ((let H32 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5) H30) in (\lambda (H33: (eq T x x2)).(let H34 \def (eq_ind_r T x5 (\lambda (t: T).(pr2 c x1 t)) H25 x1 H32) in (eq_ind T x1 (\lambda (t3: T).(sn3 c (THead (Flat Appl) x2 (THead (Flat Cast) x4 t3)))) (let H35 \def (eq_ind_r T x2 (\lambda (t: T).((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) t x4)) \to (\forall (P: Prop).P))) H28 x H33) in (let H36 \def (eq_ind_r T x2 (\lambda (t: T).(pr2 c x t)) H18 x H33) in (eq_ind T x (\lambda (t3: T).(sn3 c (THead (Flat Appl) t3 (THead (Flat Cast) x4 x1)))) (H11 (THead (Flat Appl) x x4) H35 (pr3_pr2 c (THead (Flat Appl) x x0) (THead (Flat Appl) x x4) (pr2_thin_dx c x0 x4 H24 x Appl)) x x4 (refl_equal T (THead (Flat Appl) x x4)) x1 (sn3_sing c (THead (Flat Appl) x x1) H10)) x2 H33))) x5 H32)))) H31))) (\lambda (H30: (((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x5)) \to (\forall (P: Prop).P)))).(H11 (THead (Flat Appl) x2 x4) H28 (pr3_head_12 c x x2 (pr3_pr2 c x x2 H18) (Flat Appl) x0 x4 (pr3_pr2 (CHead c (Flat Appl) x2) x0 x4 (pr2_cflat c x0 x4 H24 Appl x2))) x2 x4 (refl_equal T (THead (Flat Appl) x2 x4)) x5 (H10 (THead (Flat Appl) x2 x5) H30 (pr3_head_12 c x x2 (pr3_pr2 c x x2 H18) (Flat Appl) x1 x5 (pr3_pr2 (CHead c (Flat Appl) x2) x1 x5 (pr2_cflat c x1 x5 H25 Appl x2)))))) H29)))) H27))) x3 H23))))))) H22)) (\lambda (H22: (pr2 c x1 x3)).(let H_x \def (term_dec (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3)) in (let H23 \def H_x in (or_ind (eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3)) ((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x2 x3)) (\lambda (H24: (eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3))).(let H25 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3) H24) in ((let H26 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow x1 | (TLRef _) \Rightarrow x1 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3) H24) in (\lambda (H27: (eq T x x2)).(let H28 \def (eq_ind_r T x3 (\lambda (t: T).(pr2 c x1 t)) H22 x1 H26) in (let H29 \def (eq_ind_r T x3 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) x2 t)) \to (\forall (P: Prop).P))) H20 x1 H26) in (eq_ind T x1 (\lambda (t3: T).(sn3 c (THead (Flat Appl) x2 t3))) (let H30 \def (eq_ind_r T x2 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) (THead (Flat Appl) t x1)) \to (\forall (P: Prop).P))) H29 x H27) in (let H31 \def (eq_ind_r T x2 (\lambda (t: T).(pr2 c x t)) H18 x H27) in (eq_ind T x (\lambda (t3: T).(sn3 c (THead (Flat Appl) t3 x1))) (sn3_sing c (THead (Flat Appl) x x1) H10) x2 H27))) x3 H26))))) H25))) (\lambda (H24: (((eq T (THead (Flat Appl) x x1) (THead (Flat Appl) x2 x3)) \to (\forall (P: Prop).P)))).(H10 (THead (Flat Appl) x2 x3) H24 (pr3_head_12 c x x2 (pr3_pr2 c x x2 H18) (Flat Appl) x1 x3 (pr3_pr2 (CHead c (Flat Appl) x2) x1 x3 (pr2_cflat c x1 x3 H22 Appl x2))))) H23)))) H21)) t2 H17))))))) H16)) (\lambda (H16: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead (Bind Abbr) u2 t3)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u0: T).(pr2 (CHead c (Bind b) u0) z1 t3))))))) (sn3 c t2) (\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H17: (eq T (THead (Flat Cast) x0 x1) (THead (Bind Abst) x2 x3))).(\lambda (H18: (eq T t2 (THead (Bind Abbr) x4 x5))).(\lambda (_: (pr2 c x x4)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x3 x5))))).(let H21 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t) \to (\forall (P: Prop).P))) H13 (THead (Bind Abbr) x4 x5) H18) in (eq_ind_r T (THead (Bind Abbr) x4 x5) (\lambda (t3: T).(sn3 c t3)) (let H22 \def (eq_ind T (THead (Flat Cast) x0 x1) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) x2 x3) H17) in (False_ind (sn3 c (THead (Bind Abbr) x4 x5)) H22)) t2 H18)))))))))) H16)) (\lambda (H16: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Cast) x0 x1) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c t2) (\lambda (x2: B).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (x6: T).(\lambda (x7: T).(\lambda (_: (not (eq B x2 Abst))).(\lambda (H18: (eq T (THead (Flat Cast) x0 x1) (THead (Bind x2) x3 x4))).(\lambda (H19: (eq T t2 (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5)))).(\lambda (_: (pr2 c x x6)).(\lambda (_: (pr2 c x3 x7)).(\lambda (_: (pr2 (CHead c (Bind x2) x7) x4 x5)).(let H23 \def (eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Appl) x (THead (Flat Cast) x0 x1)) t) \to (\forall (P: Prop).P))) H13 (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5)) H19) in (eq_ind_r T (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5)) (\lambda (t3: T).(sn3 c t3)) (let H24 \def (eq_ind T (THead (Flat Cast) x0 x1) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind x2) x3 x4) H18) in (False_ind (sn3 c (THead (Bind x2) x7 (THead (Flat Appl) (lift (S O) O x6) x5))) H24)) t2 H19)))))))))))))) H16)) H15))))))))))))))) y0 H5)))) H4))))))))) y H0))))) H)))). theorem sn3_appl_appl: \forall (v1: T).(\forall (t1: T).(let u1 \def (THead (Flat Appl) v1 t1) in (\forall (c: C).((sn3 c u1) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 u1))))))))) \def - \lambda (v1: T).(\lambda (t1: T).(let u1 \def (THead (Flat Appl) v1 t1) in (\lambda (c: C).(\lambda (H: (sn3 c (THead (Flat Appl) v1 t1))).(insert_eq T (THead (Flat Appl) v1 t1) (\lambda (t: T).(sn3 c t)) (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) v1 t1) u2) \to ((((iso (THead (Flat Appl) v1 t1) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) v1 t1)))))) (\lambda (y: T).(\lambda (H0: (sn3 c y)).(unintro T t1 (\lambda (t: T).((eq T y (THead (Flat Appl) v1 t)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) v1 t) u2) \to ((((iso (THead (Flat Appl) v1 t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) v1 t)))))))) (unintro T v1 (\lambda (t: T).(\forall (x: T).((eq T y (THead (Flat Appl) t x)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) t x) u2) \to ((((iso (THead (Flat Appl) t x) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) t x))))))))) (sn3_ind c (\lambda (t: T).(\forall (x: T).(\forall (x0: T).((eq T t (THead (Flat Appl) x x0)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) x x0)))))))))) (\lambda (t2: T).(\lambda (H1: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t2 t3) \to (sn3 c t3)))))).(\lambda (H2: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t2 t3) \to (\forall (x: T).(\forall (x0: T).((eq T t3 (THead (Flat Appl) x x0)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) x x0)))))))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T t2 (THead (Flat Appl) x x0))).(\lambda (v2: T).(\lambda (H4: (sn3 c v2)).(sn3_ind c (\lambda (t: T).(((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t u2)))))) \to (sn3 c (THead (Flat Appl) t (THead (Flat Appl) x x0))))) (\lambda (t0: T).(\lambda (H5: ((\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (sn3 c t2)))))).(\lambda (H6: ((\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t2 u2)))))) \to (sn3 c (THead (Flat Appl) t2 (THead (Flat Appl) x x0))))))))).(\lambda (H7: ((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t0 u2))))))).(let H8 \def (eq_ind T t2 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat Appl) x x0)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) x x0))))))))))))) H2 (THead (Flat Appl) x x0) H3) in (let H9 \def (eq_ind T t2 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (sn3 c t2))))) H1 (THead (Flat Appl) x x0) H3) in (sn3_pr2_intro c (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (\lambda (t3: T).(\lambda (H10: (((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t3) \to (\forall (P: Prop).P)))).(\lambda (H11: (pr2 c (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t3)).(let H12 \def (pr2_gen_appl c t0 (THead (Flat Appl) x x0) t3 H11) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Flat Appl) x x0) t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) x x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) x x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (sn3 c t3) (\lambda (H13: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t3 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c (THead (Flat Appl) x x0) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Flat Appl) x x0) t4))) (sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (H14: (eq T t3 (THead (Flat Appl) x1 x2))).(\lambda (H15: (pr2 c t0 x1)).(\lambda (H16: (pr2 c (THead (Flat Appl) x x0) x2)).(let H17 \def (eq_ind T t3 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t) \to (\forall (P: Prop).P))) H10 (THead (Flat Appl) x1 x2) H14) in (eq_ind_r T (THead (Flat Appl) x1 x2) (\lambda (t: T).(sn3 c t)) (let H18 \def (pr2_gen_appl c x x0 x2 H16) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c x0 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda (H19: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x2 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c x0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c x0 t4))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda (x3: T).(\lambda (x4: T).(\lambda (H20: (eq T x2 (THead (Flat Appl) x3 x4))).(\lambda (H21: (pr2 c x x3)).(\lambda (H22: (pr2 c x0 x4)).(let H23 \def (eq_ind T x2 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 t)) \to (\forall (P: Prop).P))) H17 (THead (Flat Appl) x3 x4) H20) in (eq_ind_r T (THead (Flat Appl) x3 x4) (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 t))) (let H_x \def (term_dec (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) in (let H24 \def H_x in (or_ind (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) ((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Flat Appl) x3 x4))) (\lambda (H25: (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4))).(let H26 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4) H25) in ((let H27 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4) H25) in (\lambda (H28: (eq T x x3)).(let H29 \def (eq_ind_r T x4 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 (THead (Flat Appl) x3 t))) \to (\forall (P: Prop).P))) H23 x0 H27) in (let H30 \def (eq_ind_r T x4 (\lambda (t: T).(pr2 c x0 t)) H22 x0 H27) in (eq_ind T x0 (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 (THead (Flat Appl) x3 t)))) (let H31 \def (eq_ind_r T x3 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 (THead (Flat Appl) t x0))) \to (\forall (P: Prop).P))) H29 x H28) in (let H32 \def (eq_ind_r T x3 (\lambda (t: T).(pr2 c x t)) H21 x H28) in (eq_ind T x (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 (THead (Flat Appl) t x0)))) (let H_x0 \def (term_dec t0 x1) in (let H33 \def H_x0 in (or_ind (eq T t0 x1) ((eq T t0 x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Flat Appl) x x0))) (\lambda (H34: (eq T t0 x1)).(let H35 \def (eq_ind_r T x1 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) t (THead (Flat Appl) x x0))) \to (\forall (P: Prop).P))) H31 t0 H34) in (let H36 \def (eq_ind_r T x1 (\lambda (t: T).(pr2 c t0 t)) H15 t0 H34) in (eq_ind T t0 (\lambda (t: T).(sn3 c (THead (Flat Appl) t (THead (Flat Appl) x x0)))) (H35 (refl_equal T (THead (Flat Appl) t0 (THead (Flat Appl) x x0))) (sn3 c (THead (Flat Appl) t0 (THead (Flat Appl) x x0)))) x1 H34)))) (\lambda (H34: (((eq T t0 x1) \to (\forall (P: Prop).P)))).(H6 x1 H34 (pr3_pr2 c t0 x1 H15) (\lambda (u2: T).(\lambda (H35: (pr3 c (THead (Flat Appl) x x0) u2)).(\lambda (H36: (((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) t0 u2) (H7 u2 H35 H36) (THead (Flat Appl) x1 u2) (pr3_pr2 c (THead (Flat Appl) t0 u2) (THead (Flat Appl) x1 u2) (pr2_head_1 c t0 x1 H15 (Flat Appl) u2)))))))) H33))) x3 H28))) x4 H27))))) H26))) (\lambda (H25: (((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) \to (\forall (P: Prop).P)))).(H8 (THead (Flat Appl) x3 x4) H25 (pr3_head_12 c x x3 (pr3_pr2 c x x3 H21) (Flat Appl) x0 x4 (pr3_pr2 (CHead c (Flat Appl) x3) x0 x4 (pr2_cflat c x0 x4 H22 Appl x3))) x3 x4 (refl_equal T (THead (Flat Appl) x3 x4)) x1 (sn3_pr3_trans c t0 (sn3_sing c t0 H5) x1 (pr3_pr2 c t0 x1 H15)) (\lambda (u2: T).(\lambda (H26: (pr3 c (THead (Flat Appl) x3 x4) u2)).(\lambda (H27: (((iso (THead (Flat Appl) x3 x4) u2) \to (\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) t0 u2) (H7 u2 (pr3_sing c (THead (Flat Appl) x x4) (THead (Flat Appl) x x0) (pr2_thin_dx c x0 x4 H22 x Appl) u2 (pr3_sing c (THead (Flat Appl) x3 x4) (THead (Flat Appl) x x4) (pr2_head_1 c x x3 H21 (Flat Appl) x4) u2 H26)) (\lambda (H28: (iso (THead (Flat Appl) x x0) u2)).(\lambda (P: Prop).(H27 (iso_trans (THead (Flat Appl) x3 x4) (THead (Flat Appl) x x0) (iso_head (Flat Appl) x3 x x4 x0) u2 H28) P)))) (THead (Flat Appl) x1 u2) (pr3_pr2 c (THead (Flat Appl) t0 u2) (THead (Flat Appl) x1 u2) (pr2_head_1 c t0 x1 H15 (Flat Appl) u2)))))))) H24))) x2 H20))))))) H19)) (\lambda (H19: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T x2 (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (x6: T).(\lambda (H20: (eq T x0 (THead (Bind Abst) x3 x4))).(\lambda (H21: (eq T x2 (THead (Bind Abbr) x5 x6))).(\lambda (H22: (pr2 c x x5)).(\lambda (H23: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x4 x6))))).(let H24 \def (eq_ind T x2 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 t)) \to (\forall (P: Prop).P))) H17 (THead (Bind Abbr) x5 x6) H21) in (eq_ind_r T (THead (Bind Abbr) x5 x6) (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 t))) (let H25 \def (eq_ind T x0 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x t)) (THead (Flat Appl) x1 (THead (Bind Abbr) x5 x6))) \to (\forall (P: Prop).P))) H24 (THead (Bind Abst) x3 x4) H20) in (let H26 \def (eq_ind T x0 (\lambda (t: T).(\forall (t2: T).((((eq T (THead (Flat Appl) x t) t2) \to (\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x t) t2) \to (sn3 c t2))))) H9 (THead (Bind Abst) x3 x4) H20) in (let H27 \def (eq_ind T x0 (\lambda (t: T).(\forall (t2: T).((((eq T (THead (Flat Appl) x t) t2) \to (\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x t) t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat Appl) x x0)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) x x0))))))))))))) H8 (THead (Bind Abst) x3 x4) H20) in (let H28 \def (eq_ind T x0 (\lambda (t: T).(\forall (u2: T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso (THead (Flat Appl) x t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t0 u2)))))) H7 (THead (Bind Abst) x3 x4) H20) in (let H29 \def (eq_ind T x0 (\lambda (t: T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso (THead (Flat Appl) x t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t2 u2)))))) \to (sn3 c (THead (Flat Appl) t2 (THead (Flat Appl) x t)))))))) H6 (THead (Bind Abst) x3 x4) H20) in (sn3_pr3_trans c (THead (Flat Appl) t0 (THead (Bind Abbr) x5 x6)) (H28 (THead (Bind Abbr) x5 x6) (pr3_sing c (THead (Bind Abbr) x x4) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) (pr2_free c (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) (THead (Bind Abbr) x x4) (pr0_beta x3 x x (pr0_refl x) x4 x4 (pr0_refl x4))) (THead (Bind Abbr) x5 x6) (pr3_head_12 c x x5 (pr3_pr2 c x x5 H22) (Bind Abbr) x4 x6 (pr3_pr2 (CHead c (Bind Abbr) x5) x4 x6 (H23 Abbr x5)))) (\lambda (H30: (iso (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) (THead (Bind Abbr) x5 x6))).(\lambda (P: Prop).(let H31 \def (match H30 return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Appl) x (THead (Bind Abst) x3 x4))) \to ((eq T t0 (THead (Bind Abbr) x5 x6)) \to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq T (TSort n1) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)))).(\lambda (H1: (eq T (TSort n2) (THead (Bind Abbr) x5 x6))).((let H2 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H0) in (False_ind ((eq T (TSort n2) (THead (Bind Abbr) x5 x6)) \to P) H2)) H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: (eq T (TLRef i1) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)))).(\lambda (H1: (eq T (TLRef i2) (THead (Bind Abbr) x5 x6))).((let H2 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H0) in (False_ind ((eq T (TLRef i2) (THead (Bind Abbr) x5 x6)) \to P) H2)) H1))) | (iso_head k v4 v5 t1 t2) \Rightarrow (\lambda (H0: (eq T (THead k v4 t1) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)))).(\lambda (H1: (eq T (THead k v5 t2) (THead (Bind Abbr) x5 x6))).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k v4 t1) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H0) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v4 | (TLRef _) \Rightarrow v4 | (THead _ t _) \Rightarrow t])) (THead k v4 t1) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H0) in ((let H4 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v4 t1) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H0) in (eq_ind K (Flat Appl) (\lambda (k0: K).((eq T v4 x) \to ((eq T t1 (THead (Bind Abst) x3 x4)) \to ((eq T (THead k0 v5 t2) (THead (Bind Abbr) x5 x6)) \to P)))) (\lambda (H5: (eq T v4 x)).(eq_ind T x (\lambda (_: T).((eq T t1 (THead (Bind Abst) x3 x4)) \to ((eq T (THead (Flat Appl) v5 t2) (THead (Bind Abbr) x5 x6)) \to P))) (\lambda (H6: (eq T t1 (THead (Bind Abst) x3 x4))).(eq_ind T (THead (Bind Abst) x3 x4) (\lambda (_: T).((eq T (THead (Flat Appl) v5 t2) (THead (Bind Abbr) x5 x6)) \to P)) (\lambda (H7: (eq T (THead (Flat Appl) v5 t2) (THead (Bind Abbr) x5 x6))).(let H8 \def (eq_ind T (THead (Flat Appl) v5 t2) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) x5 x6) H7) in (False_ind P H8))) t1 (sym_eq T t1 (THead (Bind Abst) x3 x4) H6))) v4 (sym_eq T v4 x H5))) k (sym_eq K k (Flat Appl) H4))) H3)) H2)) H1)))]) in (H31 (refl_equal T (THead (Flat Appl) x (THead (Bind Abst) x3 x4))) (refl_equal T (THead (Bind Abbr) x5 x6))))))) (THead (Flat Appl) x1 (THead (Bind Abbr) x5 x6)) (pr3_pr2 c (THead (Flat Appl) t0 (THead (Bind Abbr) x5 x6)) (THead (Flat Appl) x1 (THead (Bind Abbr) x5 x6)) (pr2_head_1 c t0 x1 H15 (Flat Appl) (THead (Bind Abbr) x5 x6))))))))) x2 H21)))))))))) H19)) (\lambda (H19: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda (x3: B).(\lambda (x4: T).(\lambda (x5: T).(\lambda (x6: T).(\lambda (x7: T).(\lambda (x8: T).(\lambda (H20: (not (eq B x3 Abst))).(\lambda (H21: (eq T x0 (THead (Bind x3) x4 x5))).(\lambda (H22: (eq T x2 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).(\lambda (H23: (pr2 c x x7)).(\lambda (H24: (pr2 c x4 x8)).(\lambda (H25: (pr2 (CHead c (Bind x3) x8) x5 x6)).(let H26 \def (eq_ind T x2 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 t)) \to (\forall (P: Prop).P))) H17 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) H22) in (eq_ind_r T (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 t))) (let H27 \def (eq_ind T x0 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x t)) (THead (Flat Appl) x1 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))) \to (\forall (P: Prop).P))) H26 (THead (Bind x3) x4 x5) H21) in (let H28 \def (eq_ind T x0 (\lambda (t: T).(\forall (t2: T).((((eq T (THead (Flat Appl) x t) t2) \to (\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x t) t2) \to (sn3 c t2))))) H9 (THead (Bind x3) x4 x5) H21) in (let H29 \def (eq_ind T x0 (\lambda (t: T).(\forall (t2: T).((((eq T (THead (Flat Appl) x t) t2) \to (\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x t) t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat Appl) x x0)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) x x0))))))))))))) H8 (THead (Bind x3) x4 x5) H21) in (let H30 \def (eq_ind T x0 (\lambda (t: T).(\forall (u2: T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso (THead (Flat Appl) x t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t0 u2)))))) H7 (THead (Bind x3) x4 x5) H21) in (let H31 \def (eq_ind T x0 (\lambda (t: T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso (THead (Flat Appl) x t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t2 u2)))))) \to (sn3 c (THead (Flat Appl) t2 (THead (Flat Appl) x t)))))))) H6 (THead (Bind x3) x4 x5) H21) in (sn3_pr3_trans c (THead (Flat Appl) t0 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) (H30 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) (pr3_sing c (THead (Bind x3) x4 (THead (Flat Appl) (lift (S O) O x) x5)) (THead (Flat Appl) x (THead (Bind x3) x4 x5)) (pr2_free c (THead (Flat Appl) x (THead (Bind x3) x4 x5)) (THead (Bind x3) x4 (THead (Flat Appl) (lift (S O) O x) x5)) (pr0_upsilon x3 H20 x x (pr0_refl x) x4 x4 (pr0_refl x4) x5 x5 (pr0_refl x5))) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) (pr3_head_12 c x4 x8 (pr3_pr2 c x4 x8 H24) (Bind x3) (THead (Flat Appl) (lift (S O) O x) x5) (THead (Flat Appl) (lift (S O) O x7) x6) (pr3_head_12 (CHead c (Bind x3) x8) (lift (S O) O x) (lift (S O) O x7) (pr3_lift (CHead c (Bind x3) x8) c (S O) O (drop_drop (Bind x3) O c c (drop_refl c) x8) x x7 (pr3_pr2 c x x7 H23)) (Flat Appl) x5 x6 (pr3_pr2 (CHead (CHead c (Bind x3) x8) (Flat Appl) (lift (S O) O x7)) x5 x6 (pr2_cflat (CHead c (Bind x3) x8) x5 x6 H25 Appl (lift (S O) O x7)))))) (\lambda (H32: (iso (THead (Flat Appl) x (THead (Bind x3) x4 x5)) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).(\lambda (P: Prop).(let H33 \def (match H32 return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Appl) x (THead (Bind x3) x4 x5))) \to ((eq T t0 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq T (TSort n1) (THead (Flat Appl) x (THead (Bind x3) x4 x5)))).(\lambda (H1: (eq T (TSort n2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).((let H2 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) x (THead (Bind x3) x4 x5)) H0) in (False_ind ((eq T (TSort n2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P) H2)) H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: (eq T (TLRef i1) (THead (Flat Appl) x (THead (Bind x3) x4 x5)))).(\lambda (H1: (eq T (TLRef i2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).((let H2 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) x (THead (Bind x3) x4 x5)) H0) in (False_ind ((eq T (TLRef i2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P) H2)) H1))) | (iso_head k v4 v5 t1 t2) \Rightarrow (\lambda (H0: (eq T (THead k v4 t1) (THead (Flat Appl) x (THead (Bind x3) x4 x5)))).(\lambda (H1: (eq T (THead k v5 t2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k v4 t1) (THead (Flat Appl) x (THead (Bind x3) x4 x5)) H0) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v4 | (TLRef _) \Rightarrow v4 | (THead _ t _) \Rightarrow t])) (THead k v4 t1) (THead (Flat Appl) x (THead (Bind x3) x4 x5)) H0) in ((let H4 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v4 t1) (THead (Flat Appl) x (THead (Bind x3) x4 x5)) H0) in (eq_ind K (Flat Appl) (\lambda (k0: K).((eq T v4 x) \to ((eq T t1 (THead (Bind x3) x4 x5)) \to ((eq T (THead k0 v5 t2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P)))) (\lambda (H5: (eq T v4 x)).(eq_ind T x (\lambda (_: T).((eq T t1 (THead (Bind x3) x4 x5)) \to ((eq T (THead (Flat Appl) v5 t2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P))) (\lambda (H6: (eq T t1 (THead (Bind x3) x4 x5))).(eq_ind T (THead (Bind x3) x4 x5) (\lambda (_: T).((eq T (THead (Flat Appl) v5 t2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P)) (\lambda (H7: (eq T (THead (Flat Appl) v5 t2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).(let H8 \def (eq_ind T (THead (Flat Appl) v5 t2) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) H7) in (False_ind P H8))) t1 (sym_eq T t1 (THead (Bind x3) x4 x5) H6))) v4 (sym_eq T v4 x H5))) k (sym_eq K k (Flat Appl) H4))) H3)) H2)) H1)))]) in (H33 (refl_equal T (THead (Flat Appl) x (THead (Bind x3) x4 x5))) (refl_equal T (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))))))) (THead (Flat Appl) x1 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) (pr3_pr2 c (THead (Flat Appl) t0 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) (THead (Flat Appl) x1 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) (pr2_head_1 c t0 x1 H15 (Flat Appl) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))))))))) x2 H22)))))))))))))) H19)) H18)) t3 H14))))))) H13)) (\lambda (H13: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) x x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T t3 (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) x x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))) (sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H14: (eq T (THead (Flat Appl) x x0) (THead (Bind Abst) x1 x2))).(\lambda (H15: (eq T t3 (THead (Bind Abbr) x3 x4))).(\lambda (_: (pr2 c t0 x3)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x2 x4))))).(let H18 \def (eq_ind T t3 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t) \to (\forall (P: Prop).P))) H10 (THead (Bind Abbr) x3 x4) H15) in (eq_ind_r T (THead (Bind Abbr) x3 x4) (\lambda (t: T).(sn3 c t)) (let H19 \def (eq_ind T (THead (Flat Appl) x x0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) x1 x2) H14) in (False_ind (sn3 c (THead (Bind Abbr) x3 x4)) H19)) t3 H15)))))))))) H13)) (\lambda (H13: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) x x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) x x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c t3) (\lambda (x1: B).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (x6: T).(\lambda (_: (not (eq B x1 Abst))).(\lambda (H15: (eq T (THead (Flat Appl) x x0) (THead (Bind x1) x2 x3))).(\lambda (H16: (eq T t3 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))).(\lambda (_: (pr2 c t0 x5)).(\lambda (_: (pr2 c x2 x6)).(\lambda (_: (pr2 (CHead c (Bind x1) x6) x3 x4)).(let H20 \def (eq_ind T t3 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t) \to (\forall (P: Prop).P))) H10 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) H16) in (eq_ind_r T (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) (\lambda (t: T).(sn3 c t)) (let H21 \def (eq_ind T (THead (Flat Appl) x x0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind x1) x2 x3) H15) in (False_ind (sn3 c (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4))) H21)) t3 H16)))))))))))))) H13)) H12)))))))))))) v2 H4))))))))) y H0))))) H))))). + \lambda (v1: T).(\lambda (t1: T).(let u1 \def (THead (Flat Appl) v1 t1) in (\lambda (c: C).(\lambda (H: (sn3 c (THead (Flat Appl) v1 t1))).(insert_eq T (THead (Flat Appl) v1 t1) (\lambda (t: T).(sn3 c t)) (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) v1 t1) u2) \to ((((iso (THead (Flat Appl) v1 t1) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) v1 t1)))))) (\lambda (y: T).(\lambda (H0: (sn3 c y)).(unintro T t1 (\lambda (t: T).((eq T y (THead (Flat Appl) v1 t)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) v1 t) u2) \to ((((iso (THead (Flat Appl) v1 t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) v1 t)))))))) (unintro T v1 (\lambda (t: T).(\forall (x: T).((eq T y (THead (Flat Appl) t x)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) t x) u2) \to ((((iso (THead (Flat Appl) t x) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) t x))))))))) (sn3_ind c (\lambda (t: T).(\forall (x: T).(\forall (x0: T).((eq T t (THead (Flat Appl) x x0)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) x x0)))))))))) (\lambda (t2: T).(\lambda (H1: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t2 t3) \to (sn3 c t3)))))).(\lambda (H2: ((\forall (t3: T).((((eq T t2 t3) \to (\forall (P: Prop).P))) \to ((pr3 c t2 t3) \to (\forall (x: T).(\forall (x0: T).((eq T t3 (THead (Flat Appl) x x0)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) x x0)))))))))))))).(\lambda (x: T).(\lambda (x0: T).(\lambda (H3: (eq T t2 (THead (Flat Appl) x x0))).(\lambda (v2: T).(\lambda (H4: (sn3 c v2)).(sn3_ind c (\lambda (t: T).(((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t u2)))))) \to (sn3 c (THead (Flat Appl) t (THead (Flat Appl) x x0))))) (\lambda (t0: T).(\lambda (H5: ((\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (sn3 c t2)))))).(\lambda (H6: ((\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t2 u2)))))) \to (sn3 c (THead (Flat Appl) t2 (THead (Flat Appl) x x0))))))))).(\lambda (H7: ((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t0 u2))))))).(let H8 \def (eq_ind T t2 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat Appl) x x0)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) x x0))))))))))))) H2 (THead (Flat Appl) x x0) H3) in (let H9 \def (eq_ind T t2 (\lambda (t: T).(\forall (t2: T).((((eq T t t2) \to (\forall (P: Prop).P))) \to ((pr3 c t t2) \to (sn3 c t2))))) H1 (THead (Flat Appl) x x0) H3) in (sn3_pr2_intro c (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (\lambda (t3: T).(\lambda (H10: (((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t3) \to (\forall (P: Prop).P)))).(\lambda (H11: (pr2 c (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t3)).(let H12 \def (pr2_gen_appl c t0 (THead (Flat Appl) x x0) t3 H11) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Flat Appl) x x0) t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) x x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) x x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (sn3 c t3) (\lambda (H13: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t3 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c (THead (Flat Appl) x x0) t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c (THead (Flat Appl) x x0) t4))) (sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (H14: (eq T t3 (THead (Flat Appl) x1 x2))).(\lambda (H15: (pr2 c t0 x1)).(\lambda (H16: (pr2 c (THead (Flat Appl) x x0) x2)).(let H17 \def (eq_ind T t3 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t) \to (\forall (P: Prop).P))) H10 (THead (Flat Appl) x1 x2) H14) in (eq_ind_r T (THead (Flat Appl) x1 x2) (\lambda (t: T).(sn3 c t)) (let H18 \def (pr2_gen_appl c x x0 x2 H16) in (or3_ind (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c x0 t4)))) (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4)))))))) (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2)))))))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda (H19: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x2 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t2: T).(pr2 c x0 t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))) (\lambda (_: T).(\lambda (t4: T).(pr2 c x0 t4))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda (x3: T).(\lambda (x4: T).(\lambda (H20: (eq T x2 (THead (Flat Appl) x3 x4))).(\lambda (H21: (pr2 c x x3)).(\lambda (H22: (pr2 c x0 x4)).(let H23 \def (eq_ind T x2 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 t)) \to (\forall (P: Prop).P))) H17 (THead (Flat Appl) x3 x4) H20) in (eq_ind_r T (THead (Flat Appl) x3 x4) (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 t))) (let H_x \def (term_dec (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) in (let H24 \def H_x in (or_ind (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) ((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Flat Appl) x3 x4))) (\lambda (H25: (eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4))).(let H26 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow x | (TLRef _) \Rightarrow x | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4) H25) in ((let H27 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow x0 | (TLRef _) \Rightarrow x0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4) H25) in (\lambda (H28: (eq T x x3)).(let H29 \def (eq_ind_r T x4 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 (THead (Flat Appl) x3 t))) \to (\forall (P: Prop).P))) H23 x0 H27) in (let H30 \def (eq_ind_r T x4 (\lambda (t: T).(pr2 c x0 t)) H22 x0 H27) in (eq_ind T x0 (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 (THead (Flat Appl) x3 t)))) (let H31 \def (eq_ind_r T x3 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 (THead (Flat Appl) t x0))) \to (\forall (P: Prop).P))) H29 x H28) in (let H32 \def (eq_ind_r T x3 (\lambda (t: T).(pr2 c x t)) H21 x H28) in (eq_ind T x (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 (THead (Flat Appl) t x0)))) (let H_x0 \def (term_dec t0 x1) in (let H33 \def H_x0 in (or_ind (eq T t0 x1) ((eq T t0 x1) \to (\forall (P: Prop).P)) (sn3 c (THead (Flat Appl) x1 (THead (Flat Appl) x x0))) (\lambda (H34: (eq T t0 x1)).(let H35 \def (eq_ind_r T x1 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) t (THead (Flat Appl) x x0))) \to (\forall (P: Prop).P))) H31 t0 H34) in (let H36 \def (eq_ind_r T x1 (\lambda (t: T).(pr2 c t0 t)) H15 t0 H34) in (eq_ind T t0 (\lambda (t: T).(sn3 c (THead (Flat Appl) t (THead (Flat Appl) x x0)))) (H35 (refl_equal T (THead (Flat Appl) t0 (THead (Flat Appl) x x0))) (sn3 c (THead (Flat Appl) t0 (THead (Flat Appl) x x0)))) x1 H34)))) (\lambda (H34: (((eq T t0 x1) \to (\forall (P: Prop).P)))).(H6 x1 H34 (pr3_pr2 c t0 x1 H15) (\lambda (u2: T).(\lambda (H35: (pr3 c (THead (Flat Appl) x x0) u2)).(\lambda (H36: (((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) t0 u2) (H7 u2 H35 H36) (THead (Flat Appl) x1 u2) (pr3_pr2 c (THead (Flat Appl) t0 u2) (THead (Flat Appl) x1 u2) (pr2_head_1 c t0 x1 H15 (Flat Appl) u2)))))))) H33))) x3 H28))) x4 H27))))) H26))) (\lambda (H25: (((eq T (THead (Flat Appl) x x0) (THead (Flat Appl) x3 x4)) \to (\forall (P: Prop).P)))).(H8 (THead (Flat Appl) x3 x4) H25 (pr3_head_12 c x x3 (pr3_pr2 c x x3 H21) (Flat Appl) x0 x4 (pr3_pr2 (CHead c (Flat Appl) x3) x0 x4 (pr2_cflat c x0 x4 H22 Appl x3))) x3 x4 (refl_equal T (THead (Flat Appl) x3 x4)) x1 (sn3_pr3_trans c t0 (sn3_sing c t0 H5) x1 (pr3_pr2 c t0 x1 H15)) (\lambda (u2: T).(\lambda (H26: (pr3 c (THead (Flat Appl) x3 x4) u2)).(\lambda (H27: (((iso (THead (Flat Appl) x3 x4) u2) \to (\forall (P: Prop).P)))).(sn3_pr3_trans c (THead (Flat Appl) t0 u2) (H7 u2 (pr3_sing c (THead (Flat Appl) x x4) (THead (Flat Appl) x x0) (pr2_thin_dx c x0 x4 H22 x Appl) u2 (pr3_sing c (THead (Flat Appl) x3 x4) (THead (Flat Appl) x x4) (pr2_head_1 c x x3 H21 (Flat Appl) x4) u2 H26)) (\lambda (H28: (iso (THead (Flat Appl) x x0) u2)).(\lambda (P: Prop).(H27 (iso_trans (THead (Flat Appl) x3 x4) (THead (Flat Appl) x x0) (iso_head (Flat Appl) x3 x x4 x0) u2 H28) P)))) (THead (Flat Appl) x1 u2) (pr3_pr2 c (THead (Flat Appl) t0 u2) (THead (Flat Appl) x1 u2) (pr2_head_1 c t0 x1 H15 (Flat Appl) u2)))))))) H24))) x2 H20))))))) H19)) (\lambda (H19: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T x2 (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T x2 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (x6: T).(\lambda (H20: (eq T x0 (THead (Bind Abst) x3 x4))).(\lambda (H21: (eq T x2 (THead (Bind Abbr) x5 x6))).(\lambda (H22: (pr2 c x x5)).(\lambda (H23: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x4 x6))))).(let H24 \def (eq_ind T x2 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 t)) \to (\forall (P: Prop).P))) H17 (THead (Bind Abbr) x5 x6) H21) in (eq_ind_r T (THead (Bind Abbr) x5 x6) (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 t))) (let H25 \def (eq_ind T x0 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x t)) (THead (Flat Appl) x1 (THead (Bind Abbr) x5 x6))) \to (\forall (P: Prop).P))) H24 (THead (Bind Abst) x3 x4) H20) in (let H26 \def (eq_ind T x0 (\lambda (t: T).(\forall (t2: T).((((eq T (THead (Flat Appl) x t) t2) \to (\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x t) t2) \to (sn3 c t2))))) H9 (THead (Bind Abst) x3 x4) H20) in (let H27 \def (eq_ind T x0 (\lambda (t: T).(\forall (t2: T).((((eq T (THead (Flat Appl) x t) t2) \to (\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x t) t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat Appl) x x0)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) x x0))))))))))))) H8 (THead (Bind Abst) x3 x4) H20) in (let H28 \def (eq_ind T x0 (\lambda (t: T).(\forall (u2: T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso (THead (Flat Appl) x t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t0 u2)))))) H7 (THead (Bind Abst) x3 x4) H20) in (let H29 \def (eq_ind T x0 (\lambda (t: T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso (THead (Flat Appl) x t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t2 u2)))))) \to (sn3 c (THead (Flat Appl) t2 (THead (Flat Appl) x t)))))))) H6 (THead (Bind Abst) x3 x4) H20) in (sn3_pr3_trans c (THead (Flat Appl) t0 (THead (Bind Abbr) x5 x6)) (H28 (THead (Bind Abbr) x5 x6) (pr3_sing c (THead (Bind Abbr) x x4) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) (pr2_free c (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) (THead (Bind Abbr) x x4) (pr0_beta x3 x x (pr0_refl x) x4 x4 (pr0_refl x4))) (THead (Bind Abbr) x5 x6) (pr3_head_12 c x x5 (pr3_pr2 c x x5 H22) (Bind Abbr) x4 x6 (pr3_pr2 (CHead c (Bind Abbr) x5) x4 x6 (H23 Abbr x5)))) (\lambda (H30: (iso (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) (THead (Bind Abbr) x5 x6))).(\lambda (P: Prop).(let H31 \def (match H30 return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (iso t t0)).((eq T t (THead (Flat Appl) x (THead (Bind Abst) x3 x4))) \to ((eq T t0 (THead (Bind Abbr) x5 x6)) \to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq T (TSort n1) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)))).(\lambda (H1: (eq T (TSort n2) (THead (Bind Abbr) x5 x6))).((let H2 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H0) in (False_ind ((eq T (TSort n2) (THead (Bind Abbr) x5 x6)) \to P) H2)) H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: (eq T (TLRef i1) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)))).(\lambda (H1: (eq T (TLRef i2) (THead (Bind Abbr) x5 x6))).((let H2 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H0) in (False_ind ((eq T (TLRef i2) (THead (Bind Abbr) x5 x6)) \to P) H2)) H1))) | (iso_head k v4 v5 t1 t2) \Rightarrow (\lambda (H0: (eq T (THead k v4 t1) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)))).(\lambda (H1: (eq T (THead k v5 t2) (THead (Bind Abbr) x5 x6))).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k v4 t1) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H0) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v4 | (TLRef _) \Rightarrow v4 | (THead _ t _) \Rightarrow t])) (THead k v4 t1) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H0) in ((let H4 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v4 t1) (THead (Flat Appl) x (THead (Bind Abst) x3 x4)) H0) in (eq_ind K (Flat Appl) (\lambda (k0: K).((eq T v4 x) \to ((eq T t1 (THead (Bind Abst) x3 x4)) \to ((eq T (THead k0 v5 t2) (THead (Bind Abbr) x5 x6)) \to P)))) (\lambda (H5: (eq T v4 x)).(eq_ind T x (\lambda (_: T).((eq T t1 (THead (Bind Abst) x3 x4)) \to ((eq T (THead (Flat Appl) v5 t2) (THead (Bind Abbr) x5 x6)) \to P))) (\lambda (H6: (eq T t1 (THead (Bind Abst) x3 x4))).(eq_ind T (THead (Bind Abst) x3 x4) (\lambda (_: T).((eq T (THead (Flat Appl) v5 t2) (THead (Bind Abbr) x5 x6)) \to P)) (\lambda (H7: (eq T (THead (Flat Appl) v5 t2) (THead (Bind Abbr) x5 x6))).(let H8 \def (eq_ind T (THead (Flat Appl) v5 t2) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abbr) x5 x6) H7) in (False_ind P H8))) t1 (sym_eq T t1 (THead (Bind Abst) x3 x4) H6))) v4 (sym_eq T v4 x H5))) k (sym_eq K k (Flat Appl) H4))) H3)) H2)) H1)))]) in (H31 (refl_equal T (THead (Flat Appl) x (THead (Bind Abst) x3 x4))) (refl_equal T (THead (Bind Abbr) x5 x6))))))) (THead (Flat Appl) x1 (THead (Bind Abbr) x5 x6)) (pr3_pr2 c (THead (Flat Appl) t0 (THead (Bind Abbr) x5 x6)) (THead (Flat Appl) x1 (THead (Bind Abbr) x5 x6)) (pr2_head_1 c t0 x1 H15 (Flat Appl) (THead (Bind Abbr) x5 x6))))))))) x2 H21)))))))))) H19)) (\lambda (H19: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T x0 (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T x2 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c x u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c (THead (Flat Appl) x1 x2)) (\lambda (x3: B).(\lambda (x4: T).(\lambda (x5: T).(\lambda (x6: T).(\lambda (x7: T).(\lambda (x8: T).(\lambda (H20: (not (eq B x3 Abst))).(\lambda (H21: (eq T x0 (THead (Bind x3) x4 x5))).(\lambda (H22: (eq T x2 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).(\lambda (H23: (pr2 c x x7)).(\lambda (H24: (pr2 c x4 x8)).(\lambda (H25: (pr2 (CHead c (Bind x3) x8) x5 x6)).(let H26 \def (eq_ind T x2 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) (THead (Flat Appl) x1 t)) \to (\forall (P: Prop).P))) H17 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) H22) in (eq_ind_r T (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) (\lambda (t: T).(sn3 c (THead (Flat Appl) x1 t))) (let H27 \def (eq_ind T x0 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x t)) (THead (Flat Appl) x1 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))) \to (\forall (P: Prop).P))) H26 (THead (Bind x3) x4 x5) H21) in (let H28 \def (eq_ind T x0 (\lambda (t: T).(\forall (t2: T).((((eq T (THead (Flat Appl) x t) t2) \to (\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x t) t2) \to (sn3 c t2))))) H9 (THead (Bind x3) x4 x5) H21) in (let H29 \def (eq_ind T x0 (\lambda (t: T).(\forall (t2: T).((((eq T (THead (Flat Appl) x t) t2) \to (\forall (P: Prop).P))) \to ((pr3 c (THead (Flat Appl) x t) t2) \to (\forall (x: T).(\forall (x0: T).((eq T t2 (THead (Flat Appl) x x0)) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x x0) u2) \to ((((iso (THead (Flat Appl) x x0) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 (THead (Flat Appl) x x0))))))))))))) H8 (THead (Bind x3) x4 x5) H21) in (let H30 \def (eq_ind T x0 (\lambda (t: T).(\forall (u2: T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso (THead (Flat Appl) x t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t0 u2)))))) H7 (THead (Bind x3) x4 x5) H21) in (let H31 \def (eq_ind T x0 (\lambda (t: T).(\forall (t2: T).((((eq T t0 t2) \to (\forall (P: Prop).P))) \to ((pr3 c t0 t2) \to (((\forall (u2: T).((pr3 c (THead (Flat Appl) x t) u2) \to ((((iso (THead (Flat Appl) x t) u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) t2 u2)))))) \to (sn3 c (THead (Flat Appl) t2 (THead (Flat Appl) x t)))))))) H6 (THead (Bind x3) x4 x5) H21) in (sn3_pr3_trans c (THead (Flat Appl) t0 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) (H30 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) (pr3_sing c (THead (Bind x3) x4 (THead (Flat Appl) (lift (S O) O x) x5)) (THead (Flat Appl) x (THead (Bind x3) x4 x5)) (pr2_free c (THead (Flat Appl) x (THead (Bind x3) x4 x5)) (THead (Bind x3) x4 (THead (Flat Appl) (lift (S O) O x) x5)) (pr0_upsilon x3 H20 x x (pr0_refl x) x4 x4 (pr0_refl x4) x5 x5 (pr0_refl x5))) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) (pr3_head_12 c x4 x8 (pr3_pr2 c x4 x8 H24) (Bind x3) (THead (Flat Appl) (lift (S O) O x) x5) (THead (Flat Appl) (lift (S O) O x7) x6) (pr3_head_12 (CHead c (Bind x3) x8) (lift (S O) O x) (lift (S O) O x7) (pr3_lift (CHead c (Bind x3) x8) c (S O) O (drop_drop (Bind x3) O c c (drop_refl c) x8) x x7 (pr3_pr2 c x x7 H23)) (Flat Appl) x5 x6 (pr3_pr2 (CHead (CHead c (Bind x3) x8) (Flat Appl) (lift (S O) O x7)) x5 x6 (pr2_cflat (CHead c (Bind x3) x8) x5 x6 H25 Appl (lift (S O) O x7)))))) (\lambda (H32: (iso (THead (Flat Appl) x (THead (Bind x3) x4 x5)) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).(\lambda (P: Prop).(let H33 \def (match H32 return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (iso t t0)).((eq T t (THead (Flat Appl) x (THead (Bind x3) x4 x5))) \to ((eq T t0 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P))))) with [(iso_sort n1 n2) \Rightarrow (\lambda (H0: (eq T (TSort n1) (THead (Flat Appl) x (THead (Bind x3) x4 x5)))).(\lambda (H1: (eq T (TSort n2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).((let H2 \def (eq_ind T (TSort n1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) x (THead (Bind x3) x4 x5)) H0) in (False_ind ((eq T (TSort n2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P) H2)) H1))) | (iso_lref i1 i2) \Rightarrow (\lambda (H0: (eq T (TLRef i1) (THead (Flat Appl) x (THead (Bind x3) x4 x5)))).(\lambda (H1: (eq T (TLRef i2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).((let H2 \def (eq_ind T (TLRef i1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) x (THead (Bind x3) x4 x5)) H0) in (False_ind ((eq T (TLRef i2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P) H2)) H1))) | (iso_head k v4 v5 t1 t2) \Rightarrow (\lambda (H0: (eq T (THead k v4 t1) (THead (Flat Appl) x (THead (Bind x3) x4 x5)))).(\lambda (H1: (eq T (THead k v5 t2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).((let H2 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k v4 t1) (THead (Flat Appl) x (THead (Bind x3) x4 x5)) H0) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v4 | (TLRef _) \Rightarrow v4 | (THead _ t _) \Rightarrow t])) (THead k v4 t1) (THead (Flat Appl) x (THead (Bind x3) x4 x5)) H0) in ((let H4 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k v4 t1) (THead (Flat Appl) x (THead (Bind x3) x4 x5)) H0) in (eq_ind K (Flat Appl) (\lambda (k0: K).((eq T v4 x) \to ((eq T t1 (THead (Bind x3) x4 x5)) \to ((eq T (THead k0 v5 t2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P)))) (\lambda (H5: (eq T v4 x)).(eq_ind T x (\lambda (_: T).((eq T t1 (THead (Bind x3) x4 x5)) \to ((eq T (THead (Flat Appl) v5 t2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P))) (\lambda (H6: (eq T t1 (THead (Bind x3) x4 x5))).(eq_ind T (THead (Bind x3) x4 x5) (\lambda (_: T).((eq T (THead (Flat Appl) v5 t2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) \to P)) (\lambda (H7: (eq T (THead (Flat Appl) v5 t2) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))).(let H8 \def (eq_ind T (THead (Flat Appl) v5 t2) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)) H7) in (False_ind P H8))) t1 (sym_eq T t1 (THead (Bind x3) x4 x5) H6))) v4 (sym_eq T v4 x H5))) k (sym_eq K k (Flat Appl) H4))) H3)) H2)) H1)))]) in (H33 (refl_equal T (THead (Flat Appl) x (THead (Bind x3) x4 x5))) (refl_equal T (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))))))) (THead (Flat Appl) x1 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) (pr3_pr2 c (THead (Flat Appl) t0 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) (THead (Flat Appl) x1 (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6))) (pr2_head_1 c t0 x1 H15 (Flat Appl) (THead (Bind x3) x8 (THead (Flat Appl) (lift (S O) O x7) x6)))))))))) x2 H22)))))))))))))) H19)) H18)) t3 H14))))))) H13)) (\lambda (H13: (ex4_4 T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) x x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t2: T).(eq T t3 (THead (Bind Abbr) u2 t2)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t2))))))))).(ex4_4_ind T T T T (\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) x x0) (THead (Bind Abst) y1 z1)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind Abbr) u2 t4)))))) (\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))) (\lambda (_: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (t4: T).(\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) z1 t4))))))) (sn3 c t3) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H14: (eq T (THead (Flat Appl) x x0) (THead (Bind Abst) x1 x2))).(\lambda (H15: (eq T t3 (THead (Bind Abbr) x3 x4))).(\lambda (_: (pr2 c t0 x3)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr2 (CHead c (Bind b) u) x2 x4))))).(let H18 \def (eq_ind T t3 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t) \to (\forall (P: Prop).P))) H10 (THead (Bind Abbr) x3 x4) H15) in (eq_ind_r T (THead (Bind Abbr) x3 x4) (\lambda (t: T).(sn3 c t)) (let H19 \def (eq_ind T (THead (Flat Appl) x x0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind Abst) x1 x2) H14) in (False_ind (sn3 c (THead (Bind Abbr) x3 x4)) H19)) t3 H15)))))))))) H13)) (\lambda (H13: (ex6_6 B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) x x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))))).(ex6_6_ind B T T T T T (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(not (eq B b Abst)))))))) (\lambda (b: B).(\lambda (y1: T).(\lambda (z1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(eq T (THead (Flat Appl) x x0) (THead (Bind b) y1 z1)))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (_: T).(\lambda (z2: T).(\lambda (u2: T).(\lambda (y2: T).(eq T t3 (THead (Bind b) y2 (THead (Flat Appl) (lift (S O) O u2) z2))))))))) (\lambda (_: B).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (u2: T).(\lambda (_: T).(pr2 c t0 u2))))))) (\lambda (_: B).(\lambda (y1: T).(\lambda (_: T).(\lambda (_: T).(\lambda (_: T).(\lambda (y2: T).(pr2 c y1 y2))))))) (\lambda (b: B).(\lambda (_: T).(\lambda (z1: T).(\lambda (z2: T).(\lambda (_: T).(\lambda (y2: T).(pr2 (CHead c (Bind b) y2) z1 z2))))))) (sn3 c t3) (\lambda (x1: B).(\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (x6: T).(\lambda (_: (not (eq B x1 Abst))).(\lambda (H15: (eq T (THead (Flat Appl) x x0) (THead (Bind x1) x2 x3))).(\lambda (H16: (eq T t3 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)))).(\lambda (_: (pr2 c t0 x5)).(\lambda (_: (pr2 c x2 x6)).(\lambda (_: (pr2 (CHead c (Bind x1) x6) x3 x4)).(let H20 \def (eq_ind T t3 (\lambda (t: T).((eq T (THead (Flat Appl) t0 (THead (Flat Appl) x x0)) t) \to (\forall (P: Prop).P))) H10 (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) H16) in (eq_ind_r T (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4)) (\lambda (t: T).(sn3 c t)) (let H21 \def (eq_ind T (THead (Flat Appl) x x0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind x1) x2 x3) H15) in (False_ind (sn3 c (THead (Bind x1) x6 (THead (Flat Appl) (lift (S O) O x5) x4))) H21)) t3 H16)))))))))))))) H13)) H12)))))))))))) v2 H4))))))))) y H0))))) H))))). theorem sn3_appl_appls: \forall (v1: T).(\forall (t1: T).(\forall (vs: TList).(let u1 \def (THeads (Flat Appl) (TCons v1 vs) t1) in (\forall (c: C).((sn3 c u1) \to (\forall (v2: T).((sn3 c v2) \to (((\forall (u2: T).((pr3 c u1 u2) \to ((((iso u1 u2) \to (\forall (P: Prop).P))) \to (sn3 c (THead (Flat Appl) v2 u2)))))) \to (sn3 c (THead (Flat Appl) v2 u1)))))))))) @@ -2520,7 +2520,7 @@ theorem sn3_lift: theorem sn3_abbr: \forall (c: C).(\forall (d: C).(\forall (v: T).(\forall (i: nat).((getl i c (CHead d (Bind Abbr) v)) \to ((sn3 d v) \to (sn3 c (TLRef i))))))) \def - \lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H: (getl i c (CHead d (Bind Abbr) v))).(\lambda (H0: (sn3 d v)).(sn3_pr2_intro c (TLRef i) (\lambda (t2: T).(\lambda (H1: (((eq T (TLRef i) t2) \to (\forall (P: Prop).P)))).(\lambda (H2: (pr2 c (TLRef i) t2)).(let H3 \def (pr2_gen_lref c t2 i H2) in (or_ind (eq T t2 (TLRef i)) (ex2_2 C T (\lambda (d0: C).(\lambda (u: T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S i) O u))))) (sn3 c t2) (\lambda (H4: (eq T t2 (TLRef i))).(let H5 \def (eq_ind T t2 (\lambda (t: T).((eq T (TLRef i) t) \to (\forall (P: Prop).P))) H1 (TLRef i) H4) in (eq_ind_r T (TLRef i) (\lambda (t: T).(sn3 c t)) (H5 (refl_equal T (TLRef i)) (sn3 c (TLRef i))) t2 H4))) (\lambda (H4: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S i) O u)))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u: T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S i) O u)))) (sn3 c t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (getl i c (CHead x0 (Bind Abbr) x1))).(\lambda (H6: (eq T t2 (lift (S i) O x1))).(let H7 \def (eq_ind T t2 (\lambda (t: T).((eq T (TLRef i) t) \to (\forall (P: Prop).P))) H1 (lift (S i) O x1) H6) in (eq_ind_r T (lift (S i) O x1) (\lambda (t: T).(sn3 c t)) (let H8 \def (eq_ind C (CHead d (Bind Abbr) v) (\lambda (c0: C).(getl i c c0)) H (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) v) i H (CHead x0 (Bind Abbr) x1) H5)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) v) (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) v) i H (CHead x0 (Bind Abbr) x1) H5)) in ((let H10 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) v) (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) v) i H (CHead x0 (Bind Abbr) x1) H5)) in (\lambda (H11: (eq C d x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t: T).(getl i c (CHead x0 (Bind Abbr) t))) H8 v H10) in (eq_ind T v (\lambda (t: T).(sn3 c (lift (S i) O t))) (let H13 \def (eq_ind_r C x0 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) v))) H12 d H11) in (sn3_lift d v H0 c (S i) O (getl_drop Abbr c d v i H13))) x1 H10)))) H9))) t2 H6)))))) H4)) H3))))))))))). + \lambda (c: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H: (getl i c (CHead d (Bind Abbr) v))).(\lambda (H0: (sn3 d v)).(sn3_pr2_intro c (TLRef i) (\lambda (t2: T).(\lambda (H1: (((eq T (TLRef i) t2) \to (\forall (P: Prop).P)))).(\lambda (H2: (pr2 c (TLRef i) t2)).(let H3 \def (pr2_gen_lref c t2 i H2) in (or_ind (eq T t2 (TLRef i)) (ex2_2 C T (\lambda (d0: C).(\lambda (u: T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S i) O u))))) (sn3 c t2) (\lambda (H4: (eq T t2 (TLRef i))).(let H5 \def (eq_ind T t2 (\lambda (t: T).((eq T (TLRef i) t) \to (\forall (P: Prop).P))) H1 (TLRef i) H4) in (eq_ind_r T (TLRef i) (\lambda (t: T).(sn3 c t)) (H5 (refl_equal T (TLRef i)) (sn3 c (TLRef i))) t2 H4))) (\lambda (H4: (ex2_2 C T (\lambda (d: C).(\lambda (u: T).(getl i c (CHead d (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S i) O u)))))).(ex2_2_ind C T (\lambda (d0: C).(\lambda (u: T).(getl i c (CHead d0 (Bind Abbr) u)))) (\lambda (_: C).(\lambda (u: T).(eq T t2 (lift (S i) O u)))) (sn3 c t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (getl i c (CHead x0 (Bind Abbr) x1))).(\lambda (H6: (eq T t2 (lift (S i) O x1))).(let H7 \def (eq_ind T t2 (\lambda (t: T).((eq T (TLRef i) t) \to (\forall (P: Prop).P))) H1 (lift (S i) O x1) H6) in (eq_ind_r T (lift (S i) O x1) (\lambda (t: T).(sn3 c t)) (let H8 \def (eq_ind C (CHead d (Bind Abbr) v) (\lambda (c0: C).(getl i c c0)) H (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) v) i H (CHead x0 (Bind Abbr) x1) H5)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) v) (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) v) i H (CHead x0 (Bind Abbr) x1) H5)) in ((let H10 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) v) (CHead x0 (Bind Abbr) x1) (getl_mono c (CHead d (Bind Abbr) v) i H (CHead x0 (Bind Abbr) x1) H5)) in (\lambda (H11: (eq C d x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t: T).(getl i c (CHead x0 (Bind Abbr) t))) H8 v H10) in (eq_ind T v (\lambda (t: T).(sn3 c (lift (S i) O t))) (let H13 \def (eq_ind_r C x0 (\lambda (c0: C).(getl i c (CHead c0 (Bind Abbr) v))) H12 d H11) in (sn3_lift d v H0 c (S i) O (getl_drop Abbr c d v i H13))) x1 H10)))) H9))) t2 H6)))))) H4)) H3))))))))))). theorem sns3_lifts: \forall (c: C).(\forall (d: C).(\forall (h: nat).(\forall (i: nat).((drop h i c d) \to (\forall (ts: TList).((sns3 d ts) \to (sns3 c (lifts h i ts)))))))) @@ -2530,7 +2530,7 @@ theorem sns3_lifts: theorem sns3_lifts1: \forall (e: C).(\forall (hds: PList).(\forall (c: C).((drop1 hds c e) \to (\forall (ts: TList).((sns3 e ts) \to (sns3 c (lifts1 hds ts))))))) \def - \lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c: C).((drop1 p c e) \to (\forall (ts: TList).((sns3 e ts) \to (sns3 c (lifts1 p ts))))))) (\lambda (c: C).(\lambda (H: (drop1 PNil c e)).(\lambda (ts: TList).(\lambda (H0: (sns3 e ts)).(let H1 \def (match H return (\lambda (_: ?).(\lambda (p: PList).(\lambda (c0: C).(\lambda (c1: C).((eq PList p PNil) \to ((eq C c0 c) \to ((eq C c1 e) \to (sns3 c (lifts1 PNil ts))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq C c0 e)).(eq_ind C c (\lambda (c1: C).((eq C c1 e) \to (sns3 c (lifts1 PNil ts)))) (\lambda (H4: (eq C c e)).(eq_ind C e (\lambda (c: C).(sns3 c (lifts1 PNil ts))) (eq_ind_r TList ts (\lambda (t: TList).(sns3 e t)) H0 (lifts1 PNil ts) (lifts1_nil ts)) c (sym_eq C c e H4))) c0 (sym_eq C c0 c H2) H3)))) | (drop1_cons c1 c2 h d H1 c3 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: (eq C c1 c)).(\lambda (H5: (eq C c3 e)).((let H6 \def (eq_ind PList (PCons h d hds) (\lambda (e0: PList).(match e0 return (\lambda (_: ?).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c1 c) \to ((eq C c3 e) \to ((drop h d c1 c2) \to ((drop1 hds c2 c3) \to (sns3 c (lifts1 PNil ts)))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c) (refl_equal C e))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: C).((drop1 p c e) \to (\forall (ts: TList).((sns3 e ts) \to (sns3 c (lifts1 p ts)))))))).(\lambda (c: C).(\lambda (H0: (drop1 (PCons n n0 p) c e)).(\lambda (ts: TList).(\lambda (H1: (sns3 e ts)).(let H2 \def (match H0 return (\lambda (_: ?).(\lambda (p0: PList).(\lambda (c0: C).(\lambda (c1: C).((eq PList p0 (PCons n n0 p)) \to ((eq C c0 c) \to ((eq C c1 e) \to (sns3 c (lifts1 (PCons n n0 p) ts))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq C c0 e)).((let H5 \def (eq_ind PList PNil (\lambda (e0: PList).(match e0 return (\lambda (_: ?).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c0 c) \to ((eq C c0 e) \to (sns3 c (lifts1 (PCons n n0 p) ts)))) H5)) H3 H4)))) | (drop1_cons c1 c2 h d H2 c3 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c1 c)).(\lambda (H6: (eq C c3 e)).((let H7 \def (f_equal PList PList (\lambda (e0: PList).(match e0 return (\lambda (_: ?).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: ?).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: ?).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n1 d c1 c2) \to ((drop1 hds c2 c3) \to (sns3 c (lifts1 (PCons n n0 p) ts))))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n n1 c1 c2) \to ((drop1 hds c2 c3) \to (sns3 c (lifts1 (PCons n n0 p) ts)))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c1 c) \to ((eq C c3 e) \to ((drop n n0 c1 c2) \to ((drop1 p0 c2 c3) \to (sns3 c (lifts1 (PCons n n0 p) ts))))))) (\lambda (H12: (eq C c1 c)).(eq_ind C c (\lambda (c0: C).((eq C c3 e) \to ((drop n n0 c0 c2) \to ((drop1 p c2 c3) \to (sns3 c (lifts1 (PCons n n0 p) ts)))))) (\lambda (H13: (eq C c3 e)).(eq_ind C e (\lambda (c0: C).((drop n n0 c c2) \to ((drop1 p c2 c0) \to (sns3 c (lifts1 (PCons n n0 p) ts))))) (\lambda (H14: (drop n n0 c c2)).(\lambda (H15: (drop1 p c2 e)).(eq_ind_r TList (lifts n n0 (lifts1 p ts)) (\lambda (t: TList).(sns3 c t)) (sns3_lifts c c2 n n0 H14 (lifts1 p ts) (H c2 H15 ts H1)) (lifts1 (PCons n n0 p) ts) (lifts1_cons n n0 p ts)))) c3 (sym_eq C c3 e H13))) c1 (sym_eq C c1 c H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c) (refl_equal C e))))))))))) hds)). + \lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c: C).((drop1 p c e) \to (\forall (ts: TList).((sns3 e ts) \to (sns3 c (lifts1 p ts))))))) (\lambda (c: C).(\lambda (H: (drop1 PNil c e)).(\lambda (ts: TList).(\lambda (H0: (sns3 e ts)).(let H1 \def (match H return (\lambda (p: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p c0 c1)).((eq PList p PNil) \to ((eq C c0 c) \to ((eq C c1 e) \to (sns3 c (lifts1 PNil ts))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq C c0 e)).(eq_ind C c (\lambda (c1: C).((eq C c1 e) \to (sns3 c (lifts1 PNil ts)))) (\lambda (H4: (eq C c e)).(eq_ind C e (\lambda (c: C).(sns3 c (lifts1 PNil ts))) (eq_ind_r TList ts (\lambda (t: TList).(sns3 e t)) H0 (lifts1 PNil ts) (lifts1_nil ts)) c (sym_eq C c e H4))) c0 (sym_eq C c0 c H2) H3)))) | (drop1_cons c1 c2 h d H1 c3 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: (eq C c1 c)).(\lambda (H5: (eq C c3 e)).((let H6 \def (eq_ind PList (PCons h d hds) (\lambda (e0: PList).(match e0 return (\lambda (_: PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c1 c) \to ((eq C c3 e) \to ((drop h d c1 c2) \to ((drop1 hds c2 c3) \to (sns3 c (lifts1 PNil ts)))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c) (refl_equal C e))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: C).((drop1 p c e) \to (\forall (ts: TList).((sns3 e ts) \to (sns3 c (lifts1 p ts)))))))).(\lambda (c: C).(\lambda (H0: (drop1 (PCons n n0 p) c e)).(\lambda (ts: TList).(\lambda (H1: (sns3 e ts)).(let H2 \def (match H0 return (\lambda (p0: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p0 c0 c1)).((eq PList p0 (PCons n n0 p)) \to ((eq C c0 c) \to ((eq C c1 e) \to (sns3 c (lifts1 (PCons n n0 p) ts))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq C c0 e)).((let H5 \def (eq_ind PList PNil (\lambda (e0: PList).(match e0 return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c0 c) \to ((eq C c0 e) \to (sns3 c (lifts1 (PCons n n0 p) ts)))) H5)) H3 H4)))) | (drop1_cons c1 c2 h d H2 c3 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c1 c)).(\lambda (H6: (eq C c3 e)).((let H7 \def (f_equal PList PList (\lambda (e0: PList).(match e0 return (\lambda (_: PList).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: PList).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: PList).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n1 d c1 c2) \to ((drop1 hds c2 c3) \to (sns3 c (lifts1 (PCons n n0 p) ts))))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n n1 c1 c2) \to ((drop1 hds c2 c3) \to (sns3 c (lifts1 (PCons n n0 p) ts)))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c1 c) \to ((eq C c3 e) \to ((drop n n0 c1 c2) \to ((drop1 p0 c2 c3) \to (sns3 c (lifts1 (PCons n n0 p) ts))))))) (\lambda (H12: (eq C c1 c)).(eq_ind C c (\lambda (c0: C).((eq C c3 e) \to ((drop n n0 c0 c2) \to ((drop1 p c2 c3) \to (sns3 c (lifts1 (PCons n n0 p) ts)))))) (\lambda (H13: (eq C c3 e)).(eq_ind C e (\lambda (c0: C).((drop n n0 c c2) \to ((drop1 p c2 c0) \to (sns3 c (lifts1 (PCons n n0 p) ts))))) (\lambda (H14: (drop n n0 c c2)).(\lambda (H15: (drop1 p c2 e)).(eq_ind_r TList (lifts n n0 (lifts1 p ts)) (\lambda (t: TList).(sns3 c t)) (sns3_lifts c c2 n n0 H14 (lifts1 p ts) (H c2 H15 ts H1)) (lifts1 (PCons n n0 p) ts) (lifts1_cons n n0 p ts)))) c3 (sym_eq C c3 e H13))) c1 (sym_eq C c1 c H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c) (refl_equal C e))))))))))) hds)). theorem sn3_gen_lift: \forall (c1: C).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).((sn3 c1 (lift h d t)) \to (\forall (c2: C).((drop h d c1 c2) \to (sn3 c2 t))))))) @@ -2560,7 +2560,7 @@ theorem sc3_lift: theorem sc3_lift1: \forall (g: G).(\forall (e: C).(\forall (a: A).(\forall (hds: PList).(\forall (c: C).(\forall (t: T).((sc3 g a e t) \to ((drop1 hds c e) \to (sc3 g a c (lift1 hds t))))))))) \def - \lambda (g: G).(\lambda (e: C).(\lambda (a: A).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c: C).(\forall (t: T).((sc3 g a e t) \to ((drop1 p c e) \to (sc3 g a c (lift1 p t))))))) (\lambda (c: C).(\lambda (t: T).(\lambda (H: (sc3 g a e t)).(\lambda (H0: (drop1 PNil c e)).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (p: PList).(\lambda (c0: C).(\lambda (c1: C).((eq PList p PNil) \to ((eq C c0 c) \to ((eq C c1 e) \to (sc3 g a c t)))))))) with [(drop1_nil c0) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq C c0 e)).(eq_ind C c (\lambda (c1: C).((eq C c1 e) \to (sc3 g a c t))) (\lambda (H4: (eq C c e)).(eq_ind C e (\lambda (c: C).(sc3 g a c t)) H c (sym_eq C c e H4))) c0 (sym_eq C c0 c H2) H3)))) | (drop1_cons c1 c2 h d H1 c3 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: (eq C c1 c)).(\lambda (H5: (eq C c3 e)).((let H6 \def (eq_ind PList (PCons h d hds) (\lambda (e0: PList).(match e0 return (\lambda (_: ?).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c1 c) \to ((eq C c3 e) \to ((drop h d c1 c2) \to ((drop1 hds c2 c3) \to (sc3 g a c t))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c) (refl_equal C e))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: C).(\forall (t: T).((sc3 g a e t) \to ((drop1 p c e) \to (sc3 g a c (lift1 p t)))))))).(\lambda (c: C).(\lambda (t: T).(\lambda (H0: (sc3 g a e t)).(\lambda (H1: (drop1 (PCons n n0 p) c e)).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (p0: PList).(\lambda (c0: C).(\lambda (c1: C).((eq PList p0 (PCons n n0 p)) \to ((eq C c0 c) \to ((eq C c1 e) \to (sc3 g a c (lift n n0 (lift1 p t)))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq C c0 e)).((let H5 \def (eq_ind PList PNil (\lambda (e0: PList).(match e0 return (\lambda (_: ?).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c0 c) \to ((eq C c0 e) \to (sc3 g a c (lift n n0 (lift1 p t))))) H5)) H3 H4)))) | (drop1_cons c1 c2 h d H2 c3 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c1 c)).(\lambda (H6: (eq C c3 e)).((let H7 \def (f_equal PList PList (\lambda (e0: PList).(match e0 return (\lambda (_: ?).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: ?).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: ?).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n1 d c1 c2) \to ((drop1 hds c2 c3) \to (sc3 g a c (lift n n0 (lift1 p t)))))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n n1 c1 c2) \to ((drop1 hds c2 c3) \to (sc3 g a c (lift n n0 (lift1 p t))))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c1 c) \to ((eq C c3 e) \to ((drop n n0 c1 c2) \to ((drop1 p0 c2 c3) \to (sc3 g a c (lift n n0 (lift1 p t)))))))) (\lambda (H12: (eq C c1 c)).(eq_ind C c (\lambda (c0: C).((eq C c3 e) \to ((drop n n0 c0 c2) \to ((drop1 p c2 c3) \to (sc3 g a c (lift n n0 (lift1 p t))))))) (\lambda (H13: (eq C c3 e)).(eq_ind C e (\lambda (c0: C).((drop n n0 c c2) \to ((drop1 p c2 c0) \to (sc3 g a c (lift n n0 (lift1 p t)))))) (\lambda (H14: (drop n n0 c c2)).(\lambda (H15: (drop1 p c2 e)).(sc3_lift g a c2 (lift1 p t) (H c2 t H0 H15) c n n0 H14))) c3 (sym_eq C c3 e H13))) c1 (sym_eq C c1 c H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c) (refl_equal C e))))))))))) hds)))). + \lambda (g: G).(\lambda (e: C).(\lambda (a: A).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c: C).(\forall (t: T).((sc3 g a e t) \to ((drop1 p c e) \to (sc3 g a c (lift1 p t))))))) (\lambda (c: C).(\lambda (t: T).(\lambda (H: (sc3 g a e t)).(\lambda (H0: (drop1 PNil c e)).(let H1 \def (match H0 return (\lambda (p: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p c0 c1)).((eq PList p PNil) \to ((eq C c0 c) \to ((eq C c1 e) \to (sc3 g a c t)))))))) with [(drop1_nil c0) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq C c0 e)).(eq_ind C c (\lambda (c1: C).((eq C c1 e) \to (sc3 g a c t))) (\lambda (H4: (eq C c e)).(eq_ind C e (\lambda (c: C).(sc3 g a c t)) H c (sym_eq C c e H4))) c0 (sym_eq C c0 c H2) H3)))) | (drop1_cons c1 c2 h d H1 c3 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: (eq C c1 c)).(\lambda (H5: (eq C c3 e)).((let H6 \def (eq_ind PList (PCons h d hds) (\lambda (e0: PList).(match e0 return (\lambda (_: PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c1 c) \to ((eq C c3 e) \to ((drop h d c1 c2) \to ((drop1 hds c2 c3) \to (sc3 g a c t))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c) (refl_equal C e))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c: C).(\forall (t: T).((sc3 g a e t) \to ((drop1 p c e) \to (sc3 g a c (lift1 p t)))))))).(\lambda (c: C).(\lambda (t: T).(\lambda (H0: (sc3 g a e t)).(\lambda (H1: (drop1 (PCons n n0 p) c e)).(let H2 \def (match H1 return (\lambda (p0: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p0 c0 c1)).((eq PList p0 (PCons n n0 p)) \to ((eq C c0 c) \to ((eq C c1 e) \to (sc3 g a c (lift n n0 (lift1 p t)))))))))) with [(drop1_nil c0) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq C c0 e)).((let H5 \def (eq_ind PList PNil (\lambda (e0: PList).(match e0 return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c0 c) \to ((eq C c0 e) \to (sc3 g a c (lift n n0 (lift1 p t))))) H5)) H3 H4)))) | (drop1_cons c1 c2 h d H2 c3 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c1 c)).(\lambda (H6: (eq C c3 e)).((let H7 \def (f_equal PList PList (\lambda (e0: PList).(match e0 return (\lambda (_: PList).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: PList).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e0: PList).(match e0 return (\lambda (_: PList).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n1 d c1 c2) \to ((drop1 hds c2 c3) \to (sc3 g a c (lift n n0 (lift1 p t)))))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n n1 c1 c2) \to ((drop1 hds c2 c3) \to (sc3 g a c (lift n n0 (lift1 p t))))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c1 c) \to ((eq C c3 e) \to ((drop n n0 c1 c2) \to ((drop1 p0 c2 c3) \to (sc3 g a c (lift n n0 (lift1 p t)))))))) (\lambda (H12: (eq C c1 c)).(eq_ind C c (\lambda (c0: C).((eq C c3 e) \to ((drop n n0 c0 c2) \to ((drop1 p c2 c3) \to (sc3 g a c (lift n n0 (lift1 p t))))))) (\lambda (H13: (eq C c3 e)).(eq_ind C e (\lambda (c0: C).((drop n n0 c c2) \to ((drop1 p c2 c0) \to (sc3 g a c (lift n n0 (lift1 p t)))))) (\lambda (H14: (drop n n0 c c2)).(\lambda (H15: (drop1 p c2 e)).(sc3_lift g a c2 (lift1 p t) (H c2 t H0 H15) c n n0 H14))) c3 (sym_eq C c3 e H13))) c1 (sym_eq C c1 c H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c) (refl_equal C e))))))))))) hds)))). axiom sc3_abbr: \forall (g: G).(\forall (a: A).(\forall (vs: TList).(\forall (i: nat).(\forall (d: C).(\forall (v: T).(\forall (c: C).((sc3 g a c (THeads (Flat Appl) vs (lift (S i) O v))) \to ((getl i c (CHead d (Bind Abbr) v)) \to (sc3 g a c (THeads (Flat Appl) vs (TLRef i))))))))))) @@ -2569,7 +2569,7 @@ axiom sc3_abbr: theorem sc3_cast: \forall (g: G).(\forall (a: A).(\forall (vs: TList).(\forall (c: C).(\forall (u: T).((sc3 g (asucc g a) c (THeads (Flat Appl) vs u)) \to (\forall (t: T).((sc3 g a c (THeads (Flat Appl) vs t)) \to (sc3 g a c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))))))))) \def - \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(\forall (vs: TList).(\forall (c: C).(\forall (u: T).((sc3 g (asucc g a0) c (THeads (Flat Appl) vs u)) \to (\forall (t: T).((sc3 g a0 c (THeads (Flat Appl) vs t)) \to (sc3 g a0 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (vs: TList).(\lambda (c: C).(\lambda (u: T).(\lambda (H: (sc3 g (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) c (THeads (Flat Appl) vs u))).(\lambda (t: T).(\lambda (H0: (land (arity g c (THeads (Flat Appl) vs t) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs t)))).((match n return (\lambda (_: ?).(\lambda (n1: nat).((sc3 g (match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) c (THeads (Flat Appl) vs u)) \to ((land (arity g c (THeads (Flat Appl) vs t) (ASort n1 n0)) (sn3 c (THeads (Flat Appl) vs t))) \to (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort n1 n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))))))) with [O \Rightarrow (\lambda (H1: (sc3 g (ASort O (next g n0)) c (THeads (Flat Appl) vs u))).(\lambda (H2: (land (arity g c (THeads (Flat Appl) vs t) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs t)))).(let H3 \def H1 in (and_ind (arity g c (THeads (Flat Appl) vs u) (ASort O (next g n0))) (sn3 c (THeads (Flat Appl) vs u)) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))) (\lambda (H4: (arity g c (THeads (Flat Appl) vs u) (ASort O (next g n0)))).(\lambda (H5: (sn3 c (THeads (Flat Appl) vs u))).(let H6 \def H2 in (and_ind (arity g c (THeads (Flat Appl) vs t) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs t)) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))) (\lambda (H7: (arity g c (THeads (Flat Appl) vs t) (ASort O n0))).(\lambda (H8: (sn3 c (THeads (Flat Appl) vs t))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))) (arity_appls_cast g c u t vs (ASort O n0) H4 H7) (sn3_appls_cast c vs u H5 t H8)))) H6)))) H3)))) | (S n1) \Rightarrow (\lambda (H1: (sc3 g (ASort n1 n0) c (THeads (Flat Appl) vs u))).(\lambda (H2: (land (arity g c (THeads (Flat Appl) vs t) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs t)))).(let H3 \def H1 in (and_ind (arity g c (THeads (Flat Appl) vs u) (ASort n1 n0)) (sn3 c (THeads (Flat Appl) vs u)) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))) (\lambda (H4: (arity g c (THeads (Flat Appl) vs u) (ASort n1 n0))).(\lambda (H5: (sn3 c (THeads (Flat Appl) vs u))).(let H6 \def H2 in (and_ind (arity g c (THeads (Flat Appl) vs t) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs t)) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))) (\lambda (H7: (arity g c (THeads (Flat Appl) vs t) (ASort (S n1) n0))).(\lambda (H8: (sn3 c (THeads (Flat Appl) vs t))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))) (arity_appls_cast g c u t vs (ASort (S n1) n0) H4 H7) (sn3_appls_cast c vs u H5 t H8)))) H6)))) H3))))]) H H0))))))))) (\lambda (a0: A).(\lambda (_: ((\forall (vs: TList).(\forall (c: C).(\forall (u: T).((sc3 g (asucc g a0) c (THeads (Flat Appl) vs u)) \to (\forall (t: T).((sc3 g a0 c (THeads (Flat Appl) vs t)) \to (sc3 g a0 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))))))))))).(\lambda (a1: A).(\lambda (H0: ((\forall (vs: TList).(\forall (c: C).(\forall (u: T).((sc3 g (asucc g a1) c (THeads (Flat Appl) vs u)) \to (\forall (t: T).((sc3 g a1 c (THeads (Flat Appl) vs t)) \to (sc3 g a1 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))))))))))).(\lambda (vs: TList).(\lambda (c: C).(\lambda (u: T).(\lambda (H1: (land (arity g c (THeads (Flat Appl) vs u) (AHead a0 (asucc g a1))) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g (asucc g a1) d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs u))))))))))).(\lambda (t: T).(\lambda (H2: (land (arity g c (THeads (Flat Appl) vs t) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs t))))))))))).(let H3 \def H1 in (and_ind (arity g c (THeads (Flat Appl) vs u) (AHead a0 (asucc g a1))) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g (asucc g a1) d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs u))))))))) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (THead (Flat Cast) u t))))))))))) (\lambda (H4: (arity g c (THeads (Flat Appl) vs u) (AHead a0 (asucc g a1)))).(\lambda (H5: ((\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g (asucc g a1) d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs u))))))))))).(let H6 \def H2 in (and_ind (arity g c (THeads (Flat Appl) vs t) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs t))))))))) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (THead (Flat Cast) u t))))))))))) (\lambda (H7: (arity g c (THeads (Flat Appl) vs t) (AHead a0 a1))).(\lambda (H8: ((\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs t))))))))))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (THead (Flat Cast) u t)))))))))) (arity_appls_cast g c u t vs (AHead a0 a1) H4 H7) (\lambda (d: C).(\lambda (w: T).(\lambda (H9: (sc3 g a0 d w)).(\lambda (is: PList).(\lambda (H10: (drop1 is d c)).(let H_y \def (H0 (TCons w (lifts1 is vs))) in (eq_ind_r T (THeads (Flat Appl) (lifts1 is vs) (lift1 is (THead (Flat Cast) u t))) (\lambda (t0: T).(sc3 g a1 d (THead (Flat Appl) w t0))) (eq_ind_r T (THead (Flat Cast) (lift1 is u) (lift1 is t)) (\lambda (t0: T).(sc3 g a1 d (THead (Flat Appl) w (THeads (Flat Appl) (lifts1 is vs) t0)))) (H_y d (lift1 is u) (eq_ind T (lift1 is (THeads (Flat Appl) vs u)) (\lambda (t0: T).(sc3 g (asucc g a1) d (THead (Flat Appl) w t0))) (H5 d w H9 is H10) (THeads (Flat Appl) (lifts1 is vs) (lift1 is u)) (lifts1_flat Appl is u vs)) (lift1 is t) (eq_ind T (lift1 is (THeads (Flat Appl) vs t)) (\lambda (t0: T).(sc3 g a1 d (THead (Flat Appl) w t0))) (H8 d w H9 is H10) (THeads (Flat Appl) (lifts1 is vs) (lift1 is t)) (lifts1_flat Appl is t vs))) (lift1 is (THead (Flat Cast) u t)) (lift1_flat Cast is u t)) (lift1 is (THeads (Flat Appl) vs (THead (Flat Cast) u t))) (lifts1_flat Appl is (THead (Flat Cast) u t) vs))))))))))) H6)))) H3)))))))))))) a)). + \lambda (g: G).(\lambda (a: A).(A_ind (\lambda (a0: A).(\forall (vs: TList).(\forall (c: C).(\forall (u: T).((sc3 g (asucc g a0) c (THeads (Flat Appl) vs u)) \to (\forall (t: T).((sc3 g a0 c (THeads (Flat Appl) vs t)) \to (sc3 g a0 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (vs: TList).(\lambda (c: C).(\lambda (u: T).(\lambda (H: (sc3 g (match n with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) c (THeads (Flat Appl) vs u))).(\lambda (t: T).(\lambda (H0: (land (arity g c (THeads (Flat Appl) vs t) (ASort n n0)) (sn3 c (THeads (Flat Appl) vs t)))).((match n return (\lambda (n1: nat).((sc3 g (match n1 with [O \Rightarrow (ASort O (next g n0)) | (S h) \Rightarrow (ASort h n0)]) c (THeads (Flat Appl) vs u)) \to ((land (arity g c (THeads (Flat Appl) vs t) (ASort n1 n0)) (sn3 c (THeads (Flat Appl) vs t))) \to (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort n1 n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))))))) with [O \Rightarrow (\lambda (H1: (sc3 g (ASort O (next g n0)) c (THeads (Flat Appl) vs u))).(\lambda (H2: (land (arity g c (THeads (Flat Appl) vs t) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs t)))).(let H3 \def H1 in (and_ind (arity g c (THeads (Flat Appl) vs u) (ASort O (next g n0))) (sn3 c (THeads (Flat Appl) vs u)) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))) (\lambda (H4: (arity g c (THeads (Flat Appl) vs u) (ASort O (next g n0)))).(\lambda (H5: (sn3 c (THeads (Flat Appl) vs u))).(let H6 \def H2 in (and_ind (arity g c (THeads (Flat Appl) vs t) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs t)) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))) (\lambda (H7: (arity g c (THeads (Flat Appl) vs t) (ASort O n0))).(\lambda (H8: (sn3 c (THeads (Flat Appl) vs t))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort O n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))) (arity_appls_cast g c u t vs (ASort O n0) H4 H7) (sn3_appls_cast c vs u H5 t H8)))) H6)))) H3)))) | (S n1) \Rightarrow (\lambda (H1: (sc3 g (ASort n1 n0) c (THeads (Flat Appl) vs u))).(\lambda (H2: (land (arity g c (THeads (Flat Appl) vs t) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs t)))).(let H3 \def H1 in (and_ind (arity g c (THeads (Flat Appl) vs u) (ASort n1 n0)) (sn3 c (THeads (Flat Appl) vs u)) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))) (\lambda (H4: (arity g c (THeads (Flat Appl) vs u) (ASort n1 n0))).(\lambda (H5: (sn3 c (THeads (Flat Appl) vs u))).(let H6 \def H2 in (and_ind (arity g c (THeads (Flat Appl) vs t) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs t)) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t)))) (\lambda (H7: (arity g c (THeads (Flat Appl) vs t) (ASort (S n1) n0))).(\lambda (H8: (sn3 c (THeads (Flat Appl) vs t))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (ASort (S n1) n0)) (sn3 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))) (arity_appls_cast g c u t vs (ASort (S n1) n0) H4 H7) (sn3_appls_cast c vs u H5 t H8)))) H6)))) H3))))]) H H0))))))))) (\lambda (a0: A).(\lambda (_: ((\forall (vs: TList).(\forall (c: C).(\forall (u: T).((sc3 g (asucc g a0) c (THeads (Flat Appl) vs u)) \to (\forall (t: T).((sc3 g a0 c (THeads (Flat Appl) vs t)) \to (sc3 g a0 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))))))))))).(\lambda (a1: A).(\lambda (H0: ((\forall (vs: TList).(\forall (c: C).(\forall (u: T).((sc3 g (asucc g a1) c (THeads (Flat Appl) vs u)) \to (\forall (t: T).((sc3 g a1 c (THeads (Flat Appl) vs t)) \to (sc3 g a1 c (THeads (Flat Appl) vs (THead (Flat Cast) u t))))))))))).(\lambda (vs: TList).(\lambda (c: C).(\lambda (u: T).(\lambda (H1: (land (arity g c (THeads (Flat Appl) vs u) (AHead a0 (asucc g a1))) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g (asucc g a1) d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs u))))))))))).(\lambda (t: T).(\lambda (H2: (land (arity g c (THeads (Flat Appl) vs t) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs t))))))))))).(let H3 \def H1 in (and_ind (arity g c (THeads (Flat Appl) vs u) (AHead a0 (asucc g a1))) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g (asucc g a1) d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs u))))))))) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (THead (Flat Cast) u t))))))))))) (\lambda (H4: (arity g c (THeads (Flat Appl) vs u) (AHead a0 (asucc g a1)))).(\lambda (H5: ((\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g (asucc g a1) d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs u))))))))))).(let H6 \def H2 in (and_ind (arity g c (THeads (Flat Appl) vs t) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs t))))))))) (land (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (THead (Flat Cast) u t))))))))))) (\lambda (H7: (arity g c (THeads (Flat Appl) vs t) (AHead a0 a1))).(\lambda (H8: ((\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs t))))))))))).(conj (arity g c (THeads (Flat Appl) vs (THead (Flat Cast) u t)) (AHead a0 a1)) (\forall (d: C).(\forall (w: T).((sc3 g a0 d w) \to (\forall (is: PList).((drop1 is d c) \to (sc3 g a1 d (THead (Flat Appl) w (lift1 is (THeads (Flat Appl) vs (THead (Flat Cast) u t)))))))))) (arity_appls_cast g c u t vs (AHead a0 a1) H4 H7) (\lambda (d: C).(\lambda (w: T).(\lambda (H9: (sc3 g a0 d w)).(\lambda (is: PList).(\lambda (H10: (drop1 is d c)).(let H_y \def (H0 (TCons w (lifts1 is vs))) in (eq_ind_r T (THeads (Flat Appl) (lifts1 is vs) (lift1 is (THead (Flat Cast) u t))) (\lambda (t0: T).(sc3 g a1 d (THead (Flat Appl) w t0))) (eq_ind_r T (THead (Flat Cast) (lift1 is u) (lift1 is t)) (\lambda (t0: T).(sc3 g a1 d (THead (Flat Appl) w (THeads (Flat Appl) (lifts1 is vs) t0)))) (H_y d (lift1 is u) (eq_ind T (lift1 is (THeads (Flat Appl) vs u)) (\lambda (t0: T).(sc3 g (asucc g a1) d (THead (Flat Appl) w t0))) (H5 d w H9 is H10) (THeads (Flat Appl) (lifts1 is vs) (lift1 is u)) (lifts1_flat Appl is u vs)) (lift1 is t) (eq_ind T (lift1 is (THeads (Flat Appl) vs t)) (\lambda (t0: T).(sc3 g a1 d (THead (Flat Appl) w t0))) (H8 d w H9 is H10) (THeads (Flat Appl) (lifts1 is vs) (lift1 is t)) (lifts1_flat Appl is t vs))) (lift1 is (THead (Flat Cast) u t)) (lift1_flat Cast is u t)) (lift1 is (THeads (Flat Appl) vs (THead (Flat Cast) u t))) (lifts1_flat Appl is (THead (Flat Cast) u t) vs))))))))))) H6)))) H3)))))))))))) a)). axiom sc3_bind: \forall (g: G).(\forall (b: B).((not (eq B b Abst)) \to (\forall (a1: A).(\forall (a2: A).(\forall (vs: TList).(\forall (c: C).(\forall (v: T).(\forall (t: T).((sc3 g a2 (CHead c (Bind b) v) (THeads (Flat Appl) (lifts (S O) O vs) t)) \to ((sc3 g a1 c v) \to (sc3 g a2 c (THeads (Flat Appl) vs (THead (Bind b) v t))))))))))))) @@ -2617,22 +2617,22 @@ theorem ceqc_sym: theorem drop_csubc_trans: \forall (g: G).(\forall (c2: C).(\forall (e2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c2 e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c2 c1)))))))))) \def - \lambda (g: G).(\lambda (c2: C).(C_ind (\lambda (c: C).(\forall (e2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c c1)))))))))) (\lambda (n: nat).(\lambda (e2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e2 e1)).(and3_ind (eq C e2 (CSort n)) (eq nat h O) (eq nat d O) (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g (CSort n) c1))) (\lambda (H1: (eq C e2 (CSort n))).(\lambda (H2: (eq nat h O)).(\lambda (H3: (eq nat d O)).(eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (c1: C).(drop n0 d c1 e1)) (\lambda (c1: C).(csubc g (CSort n) c1)))) (eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (c1: C).(drop O n0 c1 e1)) (\lambda (c1: C).(csubc g (CSort n) c1)))) (let H4 \def (eq_ind C e2 (\lambda (c: C).(csubc g c e1)) H0 (CSort n) H1) in (ex_intro2 C (\lambda (c1: C).(drop O O c1 e1)) (\lambda (c1: C).(csubc g (CSort n) c1)) e1 (drop_refl e1) H4)) d H3) h H2)))) (drop_gen_sort n h d e2 H))))))))) (\lambda (c: C).(\lambda (H: ((\forall (e2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c c1))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e2: C).(\lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c k t) e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)))))))) (\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c k t) e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop n O c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1))))))) (\lambda (H0: (drop O O (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e2 e1)).(let H2 \def (eq_ind_r C e2 (\lambda (c: C).(csubc g c e1)) H1 (CHead c k t) (drop_gen_refl (CHead c k t) e2 H0)) in (ex_intro2 C (\lambda (c1: C).(drop O O c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)) e1 (drop_refl e1) H2))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c k t) e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop n O c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)))))))).(\lambda (H1: (drop (S n) O (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e2 e1)).(let H_x \def (H e2 O (r k n) (drop_gen_drop k c e2 t n H1) e1 H2) in (let H3 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (r k n) O c1 e1)) (\lambda (c1: C).(csubc g c c1)) (ex2 C (\lambda (c1: C).(drop (S n) O c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1))) (\lambda (x: C).(\lambda (H4: (drop (r k n) O x e1)).(\lambda (H5: (csubc g c x)).(ex_intro2 C (\lambda (c1: C).(drop (S n) O c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)) (CHead x k t) (drop_drop k n x e1 H4 t) (csubc_head g c x H5 k t))))) H3)))))))) h)) (\lambda (n: nat).(\lambda (H0: ((\forall (h: nat).((drop h n (CHead c k t) e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1))))))))).(\lambda (h: nat).(\lambda (H1: (drop h (S n) (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e2 e1)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C e2 (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k n) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k n) c e))) (ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: (eq C e2 (CHead x0 k x1))).(\lambda (H4: (eq T t (lift h (r k n) x1))).(\lambda (H5: (drop h (r k n) c x0)).(let H6 \def (eq_ind C e2 (\lambda (c: C).(csubc g c e1)) H2 (CHead x0 k x1) H3) in (let H7 \def (eq_ind C e2 (\lambda (c0: C).(\forall (h: nat).((drop h n (CHead c k t) c0) \to (\forall (e1: C).((csubc g c0 e1) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)))))))) H0 (CHead x0 k x1) H3) in (let H8 \def (eq_ind T t (\lambda (t: T).(\forall (h: nat).((drop h n (CHead c k t) (CHead x0 k x1)) \to (\forall (e1: C).((csubc g (CHead x0 k x1) e1) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)))))))) H7 (lift h (r k n) x1) H4) in (eq_ind_r T (lift h (r k n) x1) (\lambda (t0: T).(ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t0) c1)))) (let H9 \def (match H6 return (\lambda (_: ?).(\lambda (c0: C).(\lambda (c1: C).((eq C c0 (CHead x0 k x1)) \to ((eq C c1 e1) \to (ex2 C (\lambda (c2: C).(drop h (S n) c2 e1)) (\lambda (c2: C).(csubc g (CHead c k (lift h (r k n) x1)) c2)))))))) with [(csubc_sort n0) \Rightarrow (\lambda (H1: (eq C (CSort n0) (CHead x0 k x1))).(\lambda (H3: (eq C (CSort n0) e1)).((let H4 \def (eq_ind C (CSort n0) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead x0 k x1) H1) in (False_ind ((eq C (CSort n0) e1) \to (ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r k n) x1)) c1)))) H4)) H3))) | (csubc_head c1 c2 H1 k0 v) \Rightarrow (\lambda (H3: (eq C (CHead c1 k0 v) (CHead x0 k x1))).(\lambda (H6: (eq C (CHead c2 k0 v) e1)).((let H2 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead c1 k0 v) (CHead x0 k x1) H3) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c1 k0 v) (CHead x0 k x1) H3) in ((let H7 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k0 v) (CHead x0 k x1) H3) in (eq_ind C x0 (\lambda (c0: C).((eq K k0 k) \to ((eq T v x1) \to ((eq C (CHead c2 k0 v) e1) \to ((csubc g c0 c2) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 e1)) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3)))))))) (\lambda (H8: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T v x1) \to ((eq C (CHead c2 k1 v) e1) \to ((csubc g x0 c2) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 e1)) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3))))))) (\lambda (H9: (eq T v x1)).(eq_ind T x1 (\lambda (t: T).((eq C (CHead c2 k t) e1) \to ((csubc g x0 c2) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 e1)) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3)))))) (\lambda (H10: (eq C (CHead c2 k x1) e1)).(eq_ind C (CHead c2 k x1) (\lambda (c0: C).((csubc g x0 c2) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 c0)) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3))))) (\lambda (H11: (csubc g x0 c2)).(let H_x \def (H x0 (r k n) h H5 c2 H11) in (let H5 \def H_x in (ex2_ind C (\lambda (c3: C).(drop h (r k n) c3 c2)) (\lambda (c3: C).(csubc g c c3)) (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c2 k x1))) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3))) (\lambda (x: C).(\lambda (H12: (drop h (r k n) x c2)).(\lambda (H13: (csubc g c x)).(ex_intro2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c2 k x1))) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3)) (CHead x k (lift h (r k n) x1)) (drop_skip k h n x c2 H12 x1) (csubc_head g c x H13 k (lift h (r k n) x1)))))) H5)))) e1 H10)) v (sym_eq T v x1 H9))) k0 (sym_eq K k0 k H8))) c1 (sym_eq C c1 x0 H7))) H4)) H2)) H6 H1))) | (csubc_abst c1 c2 H1 v a H3 w H5) \Rightarrow (\lambda (H6: (eq C (CHead c1 (Bind Abst) v) (CHead x0 k x1))).(\lambda (H7: (eq C (CHead c2 (Bind Abbr) w) e1)).((let H2 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind Abst) v) (CHead x0 k x1) H6) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow (Bind Abst) | (CHead _ k _) \Rightarrow k])) (CHead c1 (Bind Abst) v) (CHead x0 k x1) H6) in ((let H9 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Abst) v) (CHead x0 k x1) H6) in (eq_ind C x0 (\lambda (c0: C).((eq K (Bind Abst) k) \to ((eq T v x1) \to ((eq C (CHead c2 (Bind Abbr) w) e1) \to ((csubc g c0 c2) \to ((sc3 g (asucc g a) c0 v) \to ((sc3 g a c2 w) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 e1)) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3)))))))))) (\lambda (H10: (eq K (Bind Abst) k)).(eq_ind K (Bind Abst) (\lambda (k: K).((eq T v x1) \to ((eq C (CHead c2 (Bind Abbr) w) e1) \to ((csubc g x0 c2) \to ((sc3 g (asucc g a) x0 v) \to ((sc3 g a c2 w) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 e1)) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3))))))))) (\lambda (H11: (eq T v x1)).(eq_ind T x1 (\lambda (t: T).((eq C (CHead c2 (Bind Abbr) w) e1) \to ((csubc g x0 c2) \to ((sc3 g (asucc g a) x0 t) \to ((sc3 g a c2 w) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 e1)) (\lambda (c3: C).(csubc g (CHead c (Bind Abst) (lift h (r (Bind Abst) n) x1)) c3)))))))) (\lambda (H12: (eq C (CHead c2 (Bind Abbr) w) e1)).(eq_ind C (CHead c2 (Bind Abbr) w) (\lambda (c0: C).((csubc g x0 c2) \to ((sc3 g (asucc g a) x0 x1) \to ((sc3 g a c2 w) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 c0)) (\lambda (c3: C).(csubc g (CHead c (Bind Abst) (lift h (r (Bind Abst) n) x1)) c3))))))) (\lambda (H13: (csubc g x0 c2)).(\lambda (H14: (sc3 g (asucc g a) x0 x1)).(\lambda (H15: (sc3 g a c2 w)).(let H8 \def (eq_ind_r K k (\lambda (k: K).(\forall (h0: nat).((drop h0 n (CHead c k (lift h (r k n) x1)) (CHead x0 k x1)) \to (\forall (e1: C).((csubc g (CHead x0 k x1) e1) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 e1)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r k n) x1)) c1)))))))) H8 (Bind Abst) H10) in (let H16 \def (eq_ind_r K k (\lambda (k: K).(drop h (r k n) c x0)) H5 (Bind Abst) H10) in (let H_x \def (H x0 (r (Bind Abst) n) h H16 c2 H13) in (let H17 \def H_x in (ex2_ind C (\lambda (c3: C).(drop h (r (Bind Abst) n) c3 c2)) (\lambda (c3: C).(csubc g c c3)) (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c2 (Bind Abbr) w))) (\lambda (c3: C).(csubc g (CHead c (Bind Abst) (lift h (r (Bind Abst) n) x1)) c3))) (\lambda (x: C).(\lambda (H18: (drop h (r (Bind Abst) n) x c2)).(\lambda (H19: (csubc g c x)).(ex_intro2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c2 (Bind Abbr) w))) (\lambda (c3: C).(csubc g (CHead c (Bind Abst) (lift h (r (Bind Abst) n) x1)) c3)) (CHead x (Bind Abbr) (lift h n w)) (drop_skip_bind h n x c2 H18 Abbr w) (csubc_abst g c x H19 (lift h (r (Bind Abst) n) x1) a (sc3_lift g (asucc g a) x0 x1 H14 c h (r (Bind Abst) n) H16) (lift h n w) (sc3_lift g a c2 w H15 x h n H18)))))) H17)))))))) e1 H12)) v (sym_eq T v x1 H11))) k H10)) c1 (sym_eq C c1 x0 H9))) H4)) H2)) H7 H1 H3 H5)))]) in (H9 (refl_equal C (CHead x0 k x1)) (refl_equal C e1))) t H4))))))))) (drop_gen_skip_l c e2 t h n k H1)))))))) d))))))) c2)). + \lambda (g: G).(\lambda (c2: C).(C_ind (\lambda (c: C).(\forall (e2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c c1)))))))))) (\lambda (n: nat).(\lambda (e2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e2 e1)).(and3_ind (eq C e2 (CSort n)) (eq nat h O) (eq nat d O) (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g (CSort n) c1))) (\lambda (H1: (eq C e2 (CSort n))).(\lambda (H2: (eq nat h O)).(\lambda (H3: (eq nat d O)).(eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (c1: C).(drop n0 d c1 e1)) (\lambda (c1: C).(csubc g (CSort n) c1)))) (eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (c1: C).(drop O n0 c1 e1)) (\lambda (c1: C).(csubc g (CSort n) c1)))) (let H4 \def (eq_ind C e2 (\lambda (c: C).(csubc g c e1)) H0 (CSort n) H1) in (ex_intro2 C (\lambda (c1: C).(drop O O c1 e1)) (\lambda (c1: C).(csubc g (CSort n) c1)) e1 (drop_refl e1) H4)) d H3) h H2)))) (drop_gen_sort n h d e2 H))))))))) (\lambda (c: C).(\lambda (H: ((\forall (e2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c c1))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e2: C).(\lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c k t) e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)))))))) (\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c k t) e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop n O c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1))))))) (\lambda (H0: (drop O O (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e2 e1)).(let H2 \def (eq_ind_r C e2 (\lambda (c: C).(csubc g c e1)) H1 (CHead c k t) (drop_gen_refl (CHead c k t) e2 H0)) in (ex_intro2 C (\lambda (c1: C).(drop O O c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)) e1 (drop_refl e1) H2))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c k t) e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop n O c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)))))))).(\lambda (H1: (drop (S n) O (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e2 e1)).(let H_x \def (H e2 O (r k n) (drop_gen_drop k c e2 t n H1) e1 H2) in (let H3 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (r k n) O c1 e1)) (\lambda (c1: C).(csubc g c c1)) (ex2 C (\lambda (c1: C).(drop (S n) O c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1))) (\lambda (x: C).(\lambda (H4: (drop (r k n) O x e1)).(\lambda (H5: (csubc g c x)).(ex_intro2 C (\lambda (c1: C).(drop (S n) O c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)) (CHead x k t) (drop_drop k n x e1 H4 t) (csubc_head g c x H5 k t))))) H3)))))))) h)) (\lambda (n: nat).(\lambda (H0: ((\forall (h: nat).((drop h n (CHead c k t) e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1))))))))).(\lambda (h: nat).(\lambda (H1: (drop h (S n) (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e2 e1)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C e2 (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k n) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k n) c e))) (ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: (eq C e2 (CHead x0 k x1))).(\lambda (H4: (eq T t (lift h (r k n) x1))).(\lambda (H5: (drop h (r k n) c x0)).(let H6 \def (eq_ind C e2 (\lambda (c: C).(csubc g c e1)) H2 (CHead x0 k x1) H3) in (let H7 \def (eq_ind C e2 (\lambda (c0: C).(\forall (h: nat).((drop h n (CHead c k t) c0) \to (\forall (e1: C).((csubc g c0 e1) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)))))))) H0 (CHead x0 k x1) H3) in (let H8 \def (eq_ind T t (\lambda (t: T).(\forall (h: nat).((drop h n (CHead c k t) (CHead x0 k x1)) \to (\forall (e1: C).((csubc g (CHead x0 k x1) e1) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t) c1)))))))) H7 (lift h (r k n) x1) H4) in (eq_ind_r T (lift h (r k n) x1) (\lambda (t0: T).(ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g (CHead c k t0) c1)))) (let H9 \def (match H6 return (\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csubc ? c0 c1)).((eq C c0 (CHead x0 k x1)) \to ((eq C c1 e1) \to (ex2 C (\lambda (c2: C).(drop h (S n) c2 e1)) (\lambda (c2: C).(csubc g (CHead c k (lift h (r k n) x1)) c2)))))))) with [(csubc_sort n0) \Rightarrow (\lambda (H1: (eq C (CSort n0) (CHead x0 k x1))).(\lambda (H3: (eq C (CSort n0) e1)).((let H4 \def (eq_ind C (CSort n0) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead x0 k x1) H1) in (False_ind ((eq C (CSort n0) e1) \to (ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r k n) x1)) c1)))) H4)) H3))) | (csubc_head c1 c2 H1 k0 v) \Rightarrow (\lambda (H3: (eq C (CHead c1 k0 v) (CHead x0 k x1))).(\lambda (H6: (eq C (CHead c2 k0 v) e1)).((let H2 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead c1 k0 v) (CHead x0 k x1) H3) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c1 k0 v) (CHead x0 k x1) H3) in ((let H7 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k0 v) (CHead x0 k x1) H3) in (eq_ind C x0 (\lambda (c0: C).((eq K k0 k) \to ((eq T v x1) \to ((eq C (CHead c2 k0 v) e1) \to ((csubc g c0 c2) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 e1)) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3)))))))) (\lambda (H8: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T v x1) \to ((eq C (CHead c2 k1 v) e1) \to ((csubc g x0 c2) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 e1)) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3))))))) (\lambda (H9: (eq T v x1)).(eq_ind T x1 (\lambda (t: T).((eq C (CHead c2 k t) e1) \to ((csubc g x0 c2) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 e1)) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3)))))) (\lambda (H10: (eq C (CHead c2 k x1) e1)).(eq_ind C (CHead c2 k x1) (\lambda (c0: C).((csubc g x0 c2) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 c0)) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3))))) (\lambda (H11: (csubc g x0 c2)).(let H_x \def (H x0 (r k n) h H5 c2 H11) in (let H5 \def H_x in (ex2_ind C (\lambda (c3: C).(drop h (r k n) c3 c2)) (\lambda (c3: C).(csubc g c c3)) (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c2 k x1))) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3))) (\lambda (x: C).(\lambda (H12: (drop h (r k n) x c2)).(\lambda (H13: (csubc g c x)).(ex_intro2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c2 k x1))) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3)) (CHead x k (lift h (r k n) x1)) (drop_skip k h n x c2 H12 x1) (csubc_head g c x H13 k (lift h (r k n) x1)))))) H5)))) e1 H10)) v (sym_eq T v x1 H9))) k0 (sym_eq K k0 k H8))) c1 (sym_eq C c1 x0 H7))) H4)) H2)) H6 H1))) | (csubc_abst c1 c2 H1 v a H3 w H5) \Rightarrow (\lambda (H6: (eq C (CHead c1 (Bind Abst) v) (CHead x0 k x1))).(\lambda (H7: (eq C (CHead c2 (Bind Abbr) w) e1)).((let H2 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind Abst) v) (CHead x0 k x1) H6) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow (Bind Abst) | (CHead _ k _) \Rightarrow k])) (CHead c1 (Bind Abst) v) (CHead x0 k x1) H6) in ((let H9 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Abst) v) (CHead x0 k x1) H6) in (eq_ind C x0 (\lambda (c0: C).((eq K (Bind Abst) k) \to ((eq T v x1) \to ((eq C (CHead c2 (Bind Abbr) w) e1) \to ((csubc g c0 c2) \to ((sc3 g (asucc g a) c0 v) \to ((sc3 g a c2 w) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 e1)) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3)))))))))) (\lambda (H10: (eq K (Bind Abst) k)).(eq_ind K (Bind Abst) (\lambda (k: K).((eq T v x1) \to ((eq C (CHead c2 (Bind Abbr) w) e1) \to ((csubc g x0 c2) \to ((sc3 g (asucc g a) x0 v) \to ((sc3 g a c2 w) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 e1)) (\lambda (c3: C).(csubc g (CHead c k (lift h (r k n) x1)) c3))))))))) (\lambda (H11: (eq T v x1)).(eq_ind T x1 (\lambda (t: T).((eq C (CHead c2 (Bind Abbr) w) e1) \to ((csubc g x0 c2) \to ((sc3 g (asucc g a) x0 t) \to ((sc3 g a c2 w) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 e1)) (\lambda (c3: C).(csubc g (CHead c (Bind Abst) (lift h (r (Bind Abst) n) x1)) c3)))))))) (\lambda (H12: (eq C (CHead c2 (Bind Abbr) w) e1)).(eq_ind C (CHead c2 (Bind Abbr) w) (\lambda (c0: C).((csubc g x0 c2) \to ((sc3 g (asucc g a) x0 x1) \to ((sc3 g a c2 w) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 c0)) (\lambda (c3: C).(csubc g (CHead c (Bind Abst) (lift h (r (Bind Abst) n) x1)) c3))))))) (\lambda (H13: (csubc g x0 c2)).(\lambda (H14: (sc3 g (asucc g a) x0 x1)).(\lambda (H15: (sc3 g a c2 w)).(let H8 \def (eq_ind_r K k (\lambda (k: K).(\forall (h0: nat).((drop h0 n (CHead c k (lift h (r k n) x1)) (CHead x0 k x1)) \to (\forall (e1: C).((csubc g (CHead x0 k x1) e1) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 e1)) (\lambda (c1: C).(csubc g (CHead c k (lift h (r k n) x1)) c1)))))))) H8 (Bind Abst) H10) in (let H16 \def (eq_ind_r K k (\lambda (k: K).(drop h (r k n) c x0)) H5 (Bind Abst) H10) in (let H_x \def (H x0 (r (Bind Abst) n) h H16 c2 H13) in (let H17 \def H_x in (ex2_ind C (\lambda (c3: C).(drop h (r (Bind Abst) n) c3 c2)) (\lambda (c3: C).(csubc g c c3)) (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c2 (Bind Abbr) w))) (\lambda (c3: C).(csubc g (CHead c (Bind Abst) (lift h (r (Bind Abst) n) x1)) c3))) (\lambda (x: C).(\lambda (H18: (drop h (r (Bind Abst) n) x c2)).(\lambda (H19: (csubc g c x)).(ex_intro2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c2 (Bind Abbr) w))) (\lambda (c3: C).(csubc g (CHead c (Bind Abst) (lift h (r (Bind Abst) n) x1)) c3)) (CHead x (Bind Abbr) (lift h n w)) (drop_skip_bind h n x c2 H18 Abbr w) (csubc_abst g c x H19 (lift h (r (Bind Abst) n) x1) a (sc3_lift g (asucc g a) x0 x1 H14 c h (r (Bind Abst) n) H16) (lift h n w) (sc3_lift g a c2 w H15 x h n H18)))))) H17)))))))) e1 H12)) v (sym_eq T v x1 H11))) k H10)) c1 (sym_eq C c1 x0 H9))) H4)) H2)) H7 H1 H3 H5)))]) in (H9 (refl_equal C (CHead x0 k x1)) (refl_equal C e1))) t H4))))))))) (drop_gen_skip_l c e2 t h n k H1)))))))) d))))))) c2)). theorem csubc_drop_conf_rev: \forall (g: G).(\forall (c2: C).(\forall (e2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c2 e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c1 c2)))))))))) \def - \lambda (g: G).(\lambda (c2: C).(C_ind (\lambda (c: C).(\forall (e2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c1 c)))))))))) (\lambda (n: nat).(\lambda (e2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e1 e2)).(and3_ind (eq C e2 (CSort n)) (eq nat h O) (eq nat d O) (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c1 (CSort n)))) (\lambda (H1: (eq C e2 (CSort n))).(\lambda (H2: (eq nat h O)).(\lambda (H3: (eq nat d O)).(eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (c1: C).(drop n0 d c1 e1)) (\lambda (c1: C).(csubc g c1 (CSort n))))) (eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (c1: C).(drop O n0 c1 e1)) (\lambda (c1: C).(csubc g c1 (CSort n))))) (let H4 \def (eq_ind C e2 (\lambda (c: C).(csubc g e1 c)) H0 (CSort n) H1) in (ex_intro2 C (\lambda (c1: C).(drop O O c1 e1)) (\lambda (c1: C).(csubc g c1 (CSort n))) e1 (drop_refl e1) H4)) d H3) h H2)))) (drop_gen_sort n h d e2 H))))))))) (\lambda (c: C).(\lambda (H: ((\forall (e2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c1 c))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e2: C).(\lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c k t) e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))))))))) (\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c k t) e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop n O c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t)))))))) (\lambda (H0: (drop O O (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e1 e2)).(let H2 \def (eq_ind_r C e2 (\lambda (c: C).(csubc g e1 c)) H1 (CHead c k t) (drop_gen_refl (CHead c k t) e2 H0)) in (ex_intro2 C (\lambda (c1: C).(drop O O c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))) e1 (drop_refl e1) H2))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c k t) e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop n O c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))))))))).(\lambda (H1: (drop (S n) O (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e1 e2)).(let H_x \def (H e2 O (r k n) (drop_gen_drop k c e2 t n H1) e1 H2) in (let H3 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (r k n) O c1 e1)) (\lambda (c1: C).(csubc g c1 c)) (ex2 C (\lambda (c1: C).(drop (S n) O c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t)))) (\lambda (x: C).(\lambda (H4: (drop (r k n) O x e1)).(\lambda (H5: (csubc g x c)).(ex_intro2 C (\lambda (c1: C).(drop (S n) O c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))) (CHead x k t) (drop_drop k n x e1 H4 t) (csubc_head g x c H5 k t))))) H3)))))))) h)) (\lambda (n: nat).(\lambda (H0: ((\forall (h: nat).((drop h n (CHead c k t) e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t)))))))))).(\lambda (h: nat).(\lambda (H1: (drop h (S n) (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e1 e2)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C e2 (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k n) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k n) c e))) (ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: (eq C e2 (CHead x0 k x1))).(\lambda (H4: (eq T t (lift h (r k n) x1))).(\lambda (H5: (drop h (r k n) c x0)).(let H6 \def (eq_ind C e2 (\lambda (c: C).(csubc g e1 c)) H2 (CHead x0 k x1) H3) in (let H7 \def (eq_ind C e2 (\lambda (c0: C).(\forall (h: nat).((drop h n (CHead c k t) c0) \to (\forall (e1: C).((csubc g e1 c0) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))))))))) H0 (CHead x0 k x1) H3) in (let H8 \def (eq_ind T t (\lambda (t: T).(\forall (h: nat).((drop h n (CHead c k t) (CHead x0 k x1)) \to (\forall (e1: C).((csubc g e1 (CHead x0 k x1)) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))))))))) H7 (lift h (r k n) x1) H4) in (eq_ind_r T (lift h (r k n) x1) (\lambda (t0: T).(ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t0))))) (let H9 \def (match H6 return (\lambda (_: ?).(\lambda (c0: C).(\lambda (c1: C).((eq C c0 e1) \to ((eq C c1 (CHead x0 k x1)) \to (ex2 C (\lambda (c2: C).(drop h (S n) c2 e1)) (\lambda (c2: C).(csubc g c2 (CHead c k (lift h (r k n) x1)))))))))) with [(csubc_sort n0) \Rightarrow (\lambda (H1: (eq C (CSort n0) e1)).(\lambda (H3: (eq C (CSort n0) (CHead x0 k x1))).(eq_ind C (CSort n0) (\lambda (c0: C).((eq C (CSort n0) (CHead x0 k x1)) \to (ex2 C (\lambda (c1: C).(drop h (S n) c1 c0)) (\lambda (c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1))))))) (\lambda (H4: (eq C (CSort n0) (CHead x0 k x1))).(let H5 \def (eq_ind C (CSort n0) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead x0 k x1) H4) in (False_ind (ex2 C (\lambda (c1: C).(drop h (S n) c1 (CSort n0))) (\lambda (c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1))))) H5))) e1 H1 H3))) | (csubc_head c1 c2 H1 k0 v) \Rightarrow (\lambda (H3: (eq C (CHead c1 k0 v) e1)).(\lambda (H6: (eq C (CHead c2 k0 v) (CHead x0 k x1))).(eq_ind C (CHead c1 k0 v) (\lambda (c0: C).((eq C (CHead c2 k0 v) (CHead x0 k x1)) \to ((csubc g c1 c2) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 c0)) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1)))))))) (\lambda (H7: (eq C (CHead c2 k0 v) (CHead x0 k x1))).(let H2 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead c2 k0 v) (CHead x0 k x1) H7) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c2 k0 v) (CHead x0 k x1) H7) in ((let H8 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 k0 v) (CHead x0 k x1) H7) in (eq_ind C x0 (\lambda (c0: C).((eq K k0 k) \to ((eq T v x1) \to ((csubc g c1 c0) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 k0 v))) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1))))))))) (\lambda (H9: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T v x1) \to ((csubc g c1 x0) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 k1 v))) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1)))))))) (\lambda (H10: (eq T v x1)).(eq_ind T x1 (\lambda (t: T).((csubc g c1 x0) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 k t))) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1))))))) (\lambda (H11: (csubc g c1 x0)).(let H12 \def (eq_ind T v (\lambda (t: T).(eq C (CHead c1 k0 t) e1)) H3 x1 H10) in (let H13 \def (eq_ind K k0 (\lambda (k: K).(eq C (CHead c1 k x1) e1)) H12 k H9) in (let H_x \def (H x0 (r k n) h H5 c1 H11) in (let H5 \def H_x in (ex2_ind C (\lambda (c3: C).(drop h (r k n) c3 c1)) (\lambda (c3: C).(csubc g c3 c)) (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 k x1))) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1))))) (\lambda (x: C).(\lambda (H14: (drop h (r k n) x c1)).(\lambda (H15: (csubc g x c)).(ex_intro2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 k x1))) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1)))) (CHead x k (lift h (r k n) x1)) (drop_skip k h n x c1 H14 x1) (csubc_head g x c H15 k (lift h (r k n) x1)))))) H5)))))) v (sym_eq T v x1 H10))) k0 (sym_eq K k0 k H9))) c2 (sym_eq C c2 x0 H8))) H4)) H2))) e1 H3 H6 H1))) | (csubc_abst c1 c2 H1 v a H3 w H5) \Rightarrow (\lambda (H6: (eq C (CHead c1 (Bind Abst) v) e1)).(\lambda (H7: (eq C (CHead c2 (Bind Abbr) w) (CHead x0 k x1))).(eq_ind C (CHead c1 (Bind Abst) v) (\lambda (c0: C).((eq C (CHead c2 (Bind Abbr) w) (CHead x0 k x1)) \to ((csubc g c1 c2) \to ((sc3 g (asucc g a) c1 v) \to ((sc3 g a c2 w) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 c0)) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1)))))))))) (\lambda (H9: (eq C (CHead c2 (Bind Abbr) w) (CHead x0 k x1))).(let H2 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind Abbr) w) (CHead x0 k x1) H9) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow (Bind Abbr) | (CHead _ k _) \Rightarrow k])) (CHead c2 (Bind Abbr) w) (CHead x0 k x1) H9) in ((let H10 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind Abbr) w) (CHead x0 k x1) H9) in (eq_ind C x0 (\lambda (c0: C).((eq K (Bind Abbr) k) \to ((eq T w x1) \to ((csubc g c1 c0) \to ((sc3 g (asucc g a) c1 v) \to ((sc3 g a c0 w) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 (Bind Abst) v))) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1))))))))))) (\lambda (H11: (eq K (Bind Abbr) k)).(eq_ind K (Bind Abbr) (\lambda (k: K).((eq T w x1) \to ((csubc g c1 x0) \to ((sc3 g (asucc g a) c1 v) \to ((sc3 g a x0 w) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 (Bind Abst) v))) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1)))))))))) (\lambda (H12: (eq T w x1)).(eq_ind T x1 (\lambda (t: T).((csubc g c1 x0) \to ((sc3 g (asucc g a) c1 v) \to ((sc3 g a x0 t) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 (Bind Abst) v))) (\lambda (c3: C).(csubc g c3 (CHead c (Bind Abbr) (lift h (r (Bind Abbr) n) x1))))))))) (\lambda (H13: (csubc g c1 x0)).(\lambda (H14: (sc3 g (asucc g a) c1 v)).(\lambda (H15: (sc3 g a x0 x1)).(let H8 \def (eq_ind_r K k (\lambda (k: K).(\forall (h0: nat).((drop h0 n (CHead c k (lift h (r k n) x1)) (CHead x0 k x1)) \to (\forall (e1: C).((csubc g e1 (CHead x0 k x1)) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1)))))))))) H8 (Bind Abbr) H11) in (let H16 \def (eq_ind_r K k (\lambda (k: K).(drop h (r k n) c x0)) H5 (Bind Abbr) H11) in (let H_x \def (H x0 (r (Bind Abbr) n) h H16 c1 H13) in (let H17 \def H_x in (ex2_ind C (\lambda (c3: C).(drop h (r (Bind Abbr) n) c3 c1)) (\lambda (c3: C).(csubc g c3 c)) (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 (Bind Abst) v))) (\lambda (c3: C).(csubc g c3 (CHead c (Bind Abbr) (lift h (r (Bind Abbr) n) x1))))) (\lambda (x: C).(\lambda (H18: (drop h (r (Bind Abbr) n) x c1)).(\lambda (H19: (csubc g x c)).(ex_intro2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 (Bind Abst) v))) (\lambda (c3: C).(csubc g c3 (CHead c (Bind Abbr) (lift h (r (Bind Abbr) n) x1)))) (CHead x (Bind Abst) (lift h n v)) (drop_skip_bind h n x c1 H18 Abst v) (csubc_abst g x c H19 (lift h n v) a (sc3_lift g (asucc g a) c1 v H14 x h n H18) (lift h (r (Bind Abbr) n) x1) (sc3_lift g a x0 x1 H15 c h (r (Bind Abbr) n) H16)))))) H17)))))))) w (sym_eq T w x1 H12))) k H11)) c2 (sym_eq C c2 x0 H10))) H4)) H2))) e1 H6 H7 H1 H3 H5)))]) in (H9 (refl_equal C e1) (refl_equal C (CHead x0 k x1)))) t H4))))))))) (drop_gen_skip_l c e2 t h n k H1)))))))) d))))))) c2)). + \lambda (g: G).(\lambda (c2: C).(C_ind (\lambda (c: C).(\forall (e2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c1 c)))))))))) (\lambda (n: nat).(\lambda (e2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e1 e2)).(and3_ind (eq C e2 (CSort n)) (eq nat h O) (eq nat d O) (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c1 (CSort n)))) (\lambda (H1: (eq C e2 (CSort n))).(\lambda (H2: (eq nat h O)).(\lambda (H3: (eq nat d O)).(eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (c1: C).(drop n0 d c1 e1)) (\lambda (c1: C).(csubc g c1 (CSort n))))) (eq_ind_r nat O (\lambda (n0: nat).(ex2 C (\lambda (c1: C).(drop O n0 c1 e1)) (\lambda (c1: C).(csubc g c1 (CSort n))))) (let H4 \def (eq_ind C e2 (\lambda (c: C).(csubc g e1 c)) H0 (CSort n) H1) in (ex_intro2 C (\lambda (c1: C).(drop O O c1 e1)) (\lambda (c1: C).(csubc g c1 (CSort n))) e1 (drop_refl e1) H4)) d H3) h H2)))) (drop_gen_sort n h d e2 H))))))))) (\lambda (c: C).(\lambda (H: ((\forall (e2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop h d c1 e1)) (\lambda (c1: C).(csubc g c1 c))))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e2: C).(\lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c k t) e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))))))))) (\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c k t) e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop n O c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t)))))))) (\lambda (H0: (drop O O (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e1 e2)).(let H2 \def (eq_ind_r C e2 (\lambda (c: C).(csubc g e1 c)) H1 (CHead c k t) (drop_gen_refl (CHead c k t) e2 H0)) in (ex_intro2 C (\lambda (c1: C).(drop O O c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))) e1 (drop_refl e1) H2))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c k t) e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop n O c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))))))))).(\lambda (H1: (drop (S n) O (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e1 e2)).(let H_x \def (H e2 O (r k n) (drop_gen_drop k c e2 t n H1) e1 H2) in (let H3 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (r k n) O c1 e1)) (\lambda (c1: C).(csubc g c1 c)) (ex2 C (\lambda (c1: C).(drop (S n) O c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t)))) (\lambda (x: C).(\lambda (H4: (drop (r k n) O x e1)).(\lambda (H5: (csubc g x c)).(ex_intro2 C (\lambda (c1: C).(drop (S n) O c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))) (CHead x k t) (drop_drop k n x e1 H4 t) (csubc_head g x c H5 k t))))) H3)))))))) h)) (\lambda (n: nat).(\lambda (H0: ((\forall (h: nat).((drop h n (CHead c k t) e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t)))))))))).(\lambda (h: nat).(\lambda (H1: (drop h (S n) (CHead c k t) e2)).(\lambda (e1: C).(\lambda (H2: (csubc g e1 e2)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C e2 (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k n) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k n) c e))) (ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: (eq C e2 (CHead x0 k x1))).(\lambda (H4: (eq T t (lift h (r k n) x1))).(\lambda (H5: (drop h (r k n) c x0)).(let H6 \def (eq_ind C e2 (\lambda (c: C).(csubc g e1 c)) H2 (CHead x0 k x1) H3) in (let H7 \def (eq_ind C e2 (\lambda (c0: C).(\forall (h: nat).((drop h n (CHead c k t) c0) \to (\forall (e1: C).((csubc g e1 c0) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))))))))) H0 (CHead x0 k x1) H3) in (let H8 \def (eq_ind T t (\lambda (t: T).(\forall (h: nat).((drop h n (CHead c k t) (CHead x0 k x1)) \to (\forall (e1: C).((csubc g e1 (CHead x0 k x1)) \to (ex2 C (\lambda (c1: C).(drop h n c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t))))))))) H7 (lift h (r k n) x1) H4) in (eq_ind_r T (lift h (r k n) x1) (\lambda (t0: T).(ex2 C (\lambda (c1: C).(drop h (S n) c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k t0))))) (let H9 \def (match H6 return (\lambda (c0: C).(\lambda (c1: C).(\lambda (_: (csubc ? c0 c1)).((eq C c0 e1) \to ((eq C c1 (CHead x0 k x1)) \to (ex2 C (\lambda (c2: C).(drop h (S n) c2 e1)) (\lambda (c2: C).(csubc g c2 (CHead c k (lift h (r k n) x1)))))))))) with [(csubc_sort n0) \Rightarrow (\lambda (H1: (eq C (CSort n0) e1)).(\lambda (H3: (eq C (CSort n0) (CHead x0 k x1))).(eq_ind C (CSort n0) (\lambda (c0: C).((eq C (CSort n0) (CHead x0 k x1)) \to (ex2 C (\lambda (c1: C).(drop h (S n) c1 c0)) (\lambda (c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1))))))) (\lambda (H4: (eq C (CSort n0) (CHead x0 k x1))).(let H5 \def (eq_ind C (CSort n0) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead x0 k x1) H4) in (False_ind (ex2 C (\lambda (c1: C).(drop h (S n) c1 (CSort n0))) (\lambda (c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1))))) H5))) e1 H1 H3))) | (csubc_head c1 c2 H1 k0 v) \Rightarrow (\lambda (H3: (eq C (CHead c1 k0 v) e1)).(\lambda (H6: (eq C (CHead c2 k0 v) (CHead x0 k x1))).(eq_ind C (CHead c1 k0 v) (\lambda (c0: C).((eq C (CHead c2 k0 v) (CHead x0 k x1)) \to ((csubc g c1 c2) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 c0)) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1)))))))) (\lambda (H7: (eq C (CHead c2 k0 v) (CHead x0 k x1))).(let H2 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow v | (CHead _ _ t) \Rightarrow t])) (CHead c2 k0 v) (CHead x0 k x1) H7) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c2 k0 v) (CHead x0 k x1) H7) in ((let H8 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 k0 v) (CHead x0 k x1) H7) in (eq_ind C x0 (\lambda (c0: C).((eq K k0 k) \to ((eq T v x1) \to ((csubc g c1 c0) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 k0 v))) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1))))))))) (\lambda (H9: (eq K k0 k)).(eq_ind K k (\lambda (k1: K).((eq T v x1) \to ((csubc g c1 x0) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 k1 v))) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1)))))))) (\lambda (H10: (eq T v x1)).(eq_ind T x1 (\lambda (t: T).((csubc g c1 x0) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 k t))) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1))))))) (\lambda (H11: (csubc g c1 x0)).(let H12 \def (eq_ind T v (\lambda (t: T).(eq C (CHead c1 k0 t) e1)) H3 x1 H10) in (let H13 \def (eq_ind K k0 (\lambda (k: K).(eq C (CHead c1 k x1) e1)) H12 k H9) in (let H_x \def (H x0 (r k n) h H5 c1 H11) in (let H5 \def H_x in (ex2_ind C (\lambda (c3: C).(drop h (r k n) c3 c1)) (\lambda (c3: C).(csubc g c3 c)) (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 k x1))) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1))))) (\lambda (x: C).(\lambda (H14: (drop h (r k n) x c1)).(\lambda (H15: (csubc g x c)).(ex_intro2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 k x1))) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1)))) (CHead x k (lift h (r k n) x1)) (drop_skip k h n x c1 H14 x1) (csubc_head g x c H15 k (lift h (r k n) x1)))))) H5)))))) v (sym_eq T v x1 H10))) k0 (sym_eq K k0 k H9))) c2 (sym_eq C c2 x0 H8))) H4)) H2))) e1 H3 H6 H1))) | (csubc_abst c1 c2 H1 v a H3 w H5) \Rightarrow (\lambda (H6: (eq C (CHead c1 (Bind Abst) v) e1)).(\lambda (H7: (eq C (CHead c2 (Bind Abbr) w) (CHead x0 k x1))).(eq_ind C (CHead c1 (Bind Abst) v) (\lambda (c0: C).((eq C (CHead c2 (Bind Abbr) w) (CHead x0 k x1)) \to ((csubc g c1 c2) \to ((sc3 g (asucc g a) c1 v) \to ((sc3 g a c2 w) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 c0)) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1)))))))))) (\lambda (H9: (eq C (CHead c2 (Bind Abbr) w) (CHead x0 k x1))).(let H2 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow w | (CHead _ _ t) \Rightarrow t])) (CHead c2 (Bind Abbr) w) (CHead x0 k x1) H9) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow (Bind Abbr) | (CHead _ k _) \Rightarrow k])) (CHead c2 (Bind Abbr) w) (CHead x0 k x1) H9) in ((let H10 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c _ _) \Rightarrow c])) (CHead c2 (Bind Abbr) w) (CHead x0 k x1) H9) in (eq_ind C x0 (\lambda (c0: C).((eq K (Bind Abbr) k) \to ((eq T w x1) \to ((csubc g c1 c0) \to ((sc3 g (asucc g a) c1 v) \to ((sc3 g a c0 w) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 (Bind Abst) v))) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1))))))))))) (\lambda (H11: (eq K (Bind Abbr) k)).(eq_ind K (Bind Abbr) (\lambda (k: K).((eq T w x1) \to ((csubc g c1 x0) \to ((sc3 g (asucc g a) c1 v) \to ((sc3 g a x0 w) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 (Bind Abst) v))) (\lambda (c3: C).(csubc g c3 (CHead c k (lift h (r k n) x1)))))))))) (\lambda (H12: (eq T w x1)).(eq_ind T x1 (\lambda (t: T).((csubc g c1 x0) \to ((sc3 g (asucc g a) c1 v) \to ((sc3 g a x0 t) \to (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 (Bind Abst) v))) (\lambda (c3: C).(csubc g c3 (CHead c (Bind Abbr) (lift h (r (Bind Abbr) n) x1))))))))) (\lambda (H13: (csubc g c1 x0)).(\lambda (H14: (sc3 g (asucc g a) c1 v)).(\lambda (H15: (sc3 g a x0 x1)).(let H8 \def (eq_ind_r K k (\lambda (k: K).(\forall (h0: nat).((drop h0 n (CHead c k (lift h (r k n) x1)) (CHead x0 k x1)) \to (\forall (e1: C).((csubc g e1 (CHead x0 k x1)) \to (ex2 C (\lambda (c1: C).(drop h0 n c1 e1)) (\lambda (c1: C).(csubc g c1 (CHead c k (lift h (r k n) x1)))))))))) H8 (Bind Abbr) H11) in (let H16 \def (eq_ind_r K k (\lambda (k: K).(drop h (r k n) c x0)) H5 (Bind Abbr) H11) in (let H_x \def (H x0 (r (Bind Abbr) n) h H16 c1 H13) in (let H17 \def H_x in (ex2_ind C (\lambda (c3: C).(drop h (r (Bind Abbr) n) c3 c1)) (\lambda (c3: C).(csubc g c3 c)) (ex2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 (Bind Abst) v))) (\lambda (c3: C).(csubc g c3 (CHead c (Bind Abbr) (lift h (r (Bind Abbr) n) x1))))) (\lambda (x: C).(\lambda (H18: (drop h (r (Bind Abbr) n) x c1)).(\lambda (H19: (csubc g x c)).(ex_intro2 C (\lambda (c3: C).(drop h (S n) c3 (CHead c1 (Bind Abst) v))) (\lambda (c3: C).(csubc g c3 (CHead c (Bind Abbr) (lift h (r (Bind Abbr) n) x1)))) (CHead x (Bind Abst) (lift h n v)) (drop_skip_bind h n x c1 H18 Abst v) (csubc_abst g x c H19 (lift h n v) a (sc3_lift g (asucc g a) c1 v H14 x h n H18) (lift h (r (Bind Abbr) n) x1) (sc3_lift g a x0 x1 H15 c h (r (Bind Abbr) n) H16)))))) H17)))))))) w (sym_eq T w x1 H12))) k H11)) c2 (sym_eq C c2 x0 H10))) H4)) H2))) e1 H6 H7 H1 H3 H5)))]) in (H9 (refl_equal C e1) (refl_equal C (CHead x0 k x1)))) t H4))))))))) (drop_gen_skip_l c e2 t h n k H1)))))))) d))))))) c2)). theorem drop1_csubc_trans: \forall (g: G).(\forall (hds: PList).(\forall (c2: C).(\forall (e2: C).((drop1 hds c2 e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(csubc g c2 c1))))))))) \def - \lambda (g: G).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c2 c1))))))))) (\lambda (c2: C).(\lambda (e2: C).(\lambda (H: (drop1 PNil c2 e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e2 e1)).(let H1 \def (match H return (\lambda (_: ?).(\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p PNil) \to ((eq C c c2) \to ((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c2 c1)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c c2)).(\lambda (H3: (eq C c e2)).(eq_ind C c2 (\lambda (c0: C).((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c2 c1))))) (\lambda (H4: (eq C c2 e2)).(eq_ind C e2 (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c0 c1)))) (let H \def (eq_ind_r C e2 (\lambda (c: C).(csubc g c e1)) H0 c2 H4) in (eq_ind C c2 (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c0 c1)))) (ex_intro2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c2 c1)) e1 (drop1_nil e1) H) e2 H4)) c2 (sym_eq C c2 e2 H4))) c (sym_eq C c c2 H2) H3)))) | (drop1_cons c1 c0 h d H1 c3 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: (eq C c1 c2)).(\lambda (H5: (eq C c3 e2)).((let H6 \def (eq_ind PList (PCons h d hds) (\lambda (e: PList).(match e return (\lambda (_: ?).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop h d c1 c0) \to ((drop1 hds c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 PNil c2 e1)) (\lambda (c4: C).(csubc g c2 c4))))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c2) (refl_equal C e2)))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c2 c1)))))))))).(\lambda (c2: C).(\lambda (e2: C).(\lambda (H0: (drop1 (PCons n n0 p) c2 e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e2 e1)).(let H2 \def (match H0 return (\lambda (_: ?).(\lambda (p0: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p0 (PCons n n0 p)) \to ((eq C c c2) \to ((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c2 c1)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c c2)).(\lambda (H4: (eq C c e2)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e return (\lambda (_: ?).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c2) \to ((eq C c e2) \to (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c2 c1))))) H5)) H3 H4)))) | (drop1_cons c1 c0 h d H2 c3 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c1 c2)).(\lambda (H6: (eq C c3 e2)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e return (\lambda (_: ?).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: ?).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: ?).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n1 d c1 c0) \to ((drop1 hds c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4)))))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n n1 c1 c0) \to ((drop1 hds c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4))))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n n0 c1 c0) \to ((drop1 p0 c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4)))))))) (\lambda (H12: (eq C c1 c2)).(eq_ind C c2 (\lambda (c: C).((eq C c3 e2) \to ((drop n n0 c c0) \to ((drop1 p c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4))))))) (\lambda (H13: (eq C c3 e2)).(eq_ind C e2 (\lambda (c: C).((drop n n0 c2 c0) \to ((drop1 p c0 c) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4)))))) (\lambda (H14: (drop n n0 c2 c0)).(\lambda (H15: (drop1 p c0 e2)).(let H_x \def (H c0 e2 H15 e1 H1) in (let H0 \def H_x in (ex2_ind C (\lambda (c2: C).(drop1 p c2 e1)) (\lambda (c2: C).(csubc g c0 c2)) (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4))) (\lambda (x: C).(\lambda (H1: (drop1 p x e1)).(\lambda (H16: (csubc g c0 x)).(let H_x0 \def (drop_csubc_trans g c2 c0 n0 n H14 x H16) in (let H \def H_x0 in (ex2_ind C (\lambda (c2: C).(drop n n0 c2 x)) (\lambda (c4: C).(csubc g c2 c4)) (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4))) (\lambda (x0: C).(\lambda (H17: (drop n n0 x0 x)).(\lambda (H18: (csubc g c2 x0)).(ex_intro2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4)) x0 (drop1_cons x0 x n n0 H17 e1 p H1) H18)))) H)))))) H0))))) c3 (sym_eq C c3 e2 H13))) c1 (sym_eq C c1 c2 H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c2) (refl_equal C e2)))))))))))) hds)). + \lambda (g: G).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c2 c1))))))))) (\lambda (c2: C).(\lambda (e2: C).(\lambda (H: (drop1 PNil c2 e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e2 e1)).(let H1 \def (match H return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p c c0)).((eq PList p PNil) \to ((eq C c c2) \to ((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c2 c1)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c c2)).(\lambda (H3: (eq C c e2)).(eq_ind C c2 (\lambda (c0: C).((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c2 c1))))) (\lambda (H4: (eq C c2 e2)).(eq_ind C e2 (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c0 c1)))) (let H \def (eq_ind_r C e2 (\lambda (c: C).(csubc g c e1)) H0 c2 H4) in (eq_ind C c2 (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c0 c1)))) (ex_intro2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c2 c1)) e1 (drop1_nil e1) H) e2 H4)) c2 (sym_eq C c2 e2 H4))) c (sym_eq C c c2 H2) H3)))) | (drop1_cons c1 c0 h d H1 c3 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: (eq C c1 c2)).(\lambda (H5: (eq C c3 e2)).((let H6 \def (eq_ind PList (PCons h d hds) (\lambda (e: PList).(match e return (\lambda (_: PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop h d c1 c0) \to ((drop1 hds c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 PNil c2 e1)) (\lambda (c4: C).(csubc g c2 c4))))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c2) (refl_equal C e2)))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c2 c1)))))))))).(\lambda (c2: C).(\lambda (e2: C).(\lambda (H0: (drop1 (PCons n n0 p) c2 e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e2 e1)).(let H2 \def (match H0 return (\lambda (p0: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p0 c c0)).((eq PList p0 (PCons n n0 p)) \to ((eq C c c2) \to ((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c2 c1)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c c2)).(\lambda (H4: (eq C c e2)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c2) \to ((eq C c e2) \to (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c2 c1))))) H5)) H3 H4)))) | (drop1_cons c1 c0 h d H2 c3 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c1 c2)).(\lambda (H6: (eq C c3 e2)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e return (\lambda (_: PList).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: PList).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: PList).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n1 d c1 c0) \to ((drop1 hds c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4)))))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n n1 c1 c0) \to ((drop1 hds c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4))))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n n0 c1 c0) \to ((drop1 p0 c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4)))))))) (\lambda (H12: (eq C c1 c2)).(eq_ind C c2 (\lambda (c: C).((eq C c3 e2) \to ((drop n n0 c c0) \to ((drop1 p c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4))))))) (\lambda (H13: (eq C c3 e2)).(eq_ind C e2 (\lambda (c: C).((drop n n0 c2 c0) \to ((drop1 p c0 c) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4)))))) (\lambda (H14: (drop n n0 c2 c0)).(\lambda (H15: (drop1 p c0 e2)).(let H_x \def (H c0 e2 H15 e1 H1) in (let H0 \def H_x in (ex2_ind C (\lambda (c2: C).(drop1 p c2 e1)) (\lambda (c2: C).(csubc g c0 c2)) (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4))) (\lambda (x: C).(\lambda (H1: (drop1 p x e1)).(\lambda (H16: (csubc g c0 x)).(let H_x0 \def (drop_csubc_trans g c2 c0 n0 n H14 x H16) in (let H \def H_x0 in (ex2_ind C (\lambda (c2: C).(drop n n0 c2 x)) (\lambda (c4: C).(csubc g c2 c4)) (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4))) (\lambda (x0: C).(\lambda (H17: (drop n n0 x0 x)).(\lambda (H18: (csubc g c2 x0)).(ex_intro2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c2 c4)) x0 (drop1_cons x0 x n n0 H17 e1 p H1) H18)))) H)))))) H0))))) c3 (sym_eq C c3 e2 H13))) c1 (sym_eq C c1 c2 H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c2) (refl_equal C e2)))))))))))) hds)). theorem csubc_drop1_conf_rev: \forall (g: G).(\forall (hds: PList).(\forall (c2: C).(\forall (e2: C).((drop1 hds c2 e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(csubc g c1 c2))))))))) \def - \lambda (g: G).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c1 c2))))))))) (\lambda (c2: C).(\lambda (e2: C).(\lambda (H: (drop1 PNil c2 e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e1 e2)).(let H1 \def (match H return (\lambda (_: ?).(\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p PNil) \to ((eq C c c2) \to ((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c1 c2)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c c2)).(\lambda (H3: (eq C c e2)).(eq_ind C c2 (\lambda (c0: C).((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c1 c2))))) (\lambda (H4: (eq C c2 e2)).(eq_ind C e2 (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c1 c0)))) (let H \def (eq_ind_r C e2 (\lambda (c: C).(csubc g e1 c)) H0 c2 H4) in (eq_ind C c2 (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c1 c0)))) (ex_intro2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c1 c2)) e1 (drop1_nil e1) H) e2 H4)) c2 (sym_eq C c2 e2 H4))) c (sym_eq C c c2 H2) H3)))) | (drop1_cons c1 c0 h d H1 c3 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: (eq C c1 c2)).(\lambda (H5: (eq C c3 e2)).((let H6 \def (eq_ind PList (PCons h d hds) (\lambda (e: PList).(match e return (\lambda (_: ?).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop h d c1 c0) \to ((drop1 hds c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 PNil c2 e1)) (\lambda (c4: C).(csubc g c4 c2))))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c2) (refl_equal C e2)))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c1 c2)))))))))).(\lambda (c2: C).(\lambda (e2: C).(\lambda (H0: (drop1 (PCons n n0 p) c2 e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e1 e2)).(let H2 \def (match H0 return (\lambda (_: ?).(\lambda (p0: PList).(\lambda (c: C).(\lambda (c0: C).((eq PList p0 (PCons n n0 p)) \to ((eq C c c2) \to ((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c1 c2)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c c2)).(\lambda (H4: (eq C c e2)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e return (\lambda (_: ?).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c2) \to ((eq C c e2) \to (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c1 c2))))) H5)) H3 H4)))) | (drop1_cons c1 c0 h d H2 c3 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c1 c2)).(\lambda (H6: (eq C c3 e2)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e return (\lambda (_: ?).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: ?).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: ?).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n1 d c1 c0) \to ((drop1 hds c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2)))))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n n1 c1 c0) \to ((drop1 hds c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2))))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n n0 c1 c0) \to ((drop1 p0 c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2)))))))) (\lambda (H12: (eq C c1 c2)).(eq_ind C c2 (\lambda (c: C).((eq C c3 e2) \to ((drop n n0 c c0) \to ((drop1 p c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2))))))) (\lambda (H13: (eq C c3 e2)).(eq_ind C e2 (\lambda (c: C).((drop n n0 c2 c0) \to ((drop1 p c0 c) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2)))))) (\lambda (H14: (drop n n0 c2 c0)).(\lambda (H15: (drop1 p c0 e2)).(let H_x \def (H c0 e2 H15 e1 H1) in (let H0 \def H_x in (ex2_ind C (\lambda (c2: C).(drop1 p c2 e1)) (\lambda (c2: C).(csubc g c2 c0)) (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2))) (\lambda (x: C).(\lambda (H1: (drop1 p x e1)).(\lambda (H16: (csubc g x c0)).(let H_x0 \def (csubc_drop_conf_rev g c2 c0 n0 n H14 x H16) in (let H \def H_x0 in (ex2_ind C (\lambda (c2: C).(drop n n0 c2 x)) (\lambda (c4: C).(csubc g c4 c2)) (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2))) (\lambda (x0: C).(\lambda (H17: (drop n n0 x0 x)).(\lambda (H18: (csubc g x0 c2)).(ex_intro2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2)) x0 (drop1_cons x0 x n n0 H17 e1 p H1) H18)))) H)))))) H0))))) c3 (sym_eq C c3 e2 H13))) c1 (sym_eq C c1 c2 H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c2) (refl_equal C e2)))))))))))) hds)). + \lambda (g: G).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c1 c2))))))))) (\lambda (c2: C).(\lambda (e2: C).(\lambda (H: (drop1 PNil c2 e2)).(\lambda (e1: C).(\lambda (H0: (csubc g e1 e2)).(let H1 \def (match H return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p c c0)).((eq PList p PNil) \to ((eq C c c2) \to ((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c1 c2)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c c2)).(\lambda (H3: (eq C c e2)).(eq_ind C c2 (\lambda (c0: C).((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c1 c2))))) (\lambda (H4: (eq C c2 e2)).(eq_ind C e2 (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c1 c0)))) (let H \def (eq_ind_r C e2 (\lambda (c: C).(csubc g e1 c)) H0 c2 H4) in (eq_ind C c2 (\lambda (c0: C).(ex2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c1 c0)))) (ex_intro2 C (\lambda (c1: C).(drop1 PNil c1 e1)) (\lambda (c1: C).(csubc g c1 c2)) e1 (drop1_nil e1) H) e2 H4)) c2 (sym_eq C c2 e2 H4))) c (sym_eq C c c2 H2) H3)))) | (drop1_cons c1 c0 h d H1 c3 hds H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4: (eq C c1 c2)).(\lambda (H5: (eq C c3 e2)).((let H6 \def (eq_ind PList (PCons h d hds) (\lambda (e: PList).(match e return (\lambda (_: PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in (False_ind ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop h d c1 c0) \to ((drop1 hds c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 PNil c2 e1)) (\lambda (c4: C).(csubc g c4 c2))))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c2) (refl_equal C e2)))))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: ((\forall (c2: C).(\forall (e2: C).((drop1 p c2 e2) \to (\forall (e1: C).((csubc g e1 e2) \to (ex2 C (\lambda (c1: C).(drop1 p c1 e1)) (\lambda (c1: C).(csubc g c1 c2)))))))))).(\lambda (c2: C).(\lambda (e2: C).(\lambda (H0: (drop1 (PCons n n0 p) c2 e2)).(\lambda (e1: C).(\lambda (H1: (csubc g e1 e2)).(let H2 \def (match H0 return (\lambda (p0: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p0 c c0)).((eq PList p0 (PCons n n0 p)) \to ((eq C c c2) \to ((eq C c0 e2) \to (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c1 c2)))))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil (PCons n n0 p))).(\lambda (H3: (eq C c c2)).(\lambda (H4: (eq C c e2)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c2) \to ((eq C c e2) \to (ex2 C (\lambda (c1: C).(drop1 (PCons n n0 p) c1 e1)) (\lambda (c1: C).(csubc g c1 c2))))) H5)) H3 H4)))) | (drop1_cons c1 c0 h d H2 c3 hds H3) \Rightarrow (\lambda (H4: (eq PList (PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c1 c2)).(\lambda (H6: (eq C c3 e2)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e return (\lambda (_: PList).PList) with [PNil \Rightarrow hds | (PCons _ _ p) \Rightarrow p])) (PCons h d hds) (PCons n n0 p) H4) in ((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: PList).nat) with [PNil \Rightarrow d | (PCons _ n _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in ((let H9 \def (f_equal PList nat (\lambda (e: PList).(match e return (\lambda (_: PList).nat) with [PNil \Rightarrow h | (PCons n _ _) \Rightarrow n])) (PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds p) \to ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n1 d c1 c0) \to ((drop1 hds c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2)))))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda (n1: nat).((eq PList hds p) \to ((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n n1 c1 c0) \to ((drop1 hds c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2))))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0: PList).((eq C c1 c2) \to ((eq C c3 e2) \to ((drop n n0 c1 c0) \to ((drop1 p0 c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2)))))))) (\lambda (H12: (eq C c1 c2)).(eq_ind C c2 (\lambda (c: C).((eq C c3 e2) \to ((drop n n0 c c0) \to ((drop1 p c0 c3) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2))))))) (\lambda (H13: (eq C c3 e2)).(eq_ind C e2 (\lambda (c: C).((drop n n0 c2 c0) \to ((drop1 p c0 c) \to (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2)))))) (\lambda (H14: (drop n n0 c2 c0)).(\lambda (H15: (drop1 p c0 e2)).(let H_x \def (H c0 e2 H15 e1 H1) in (let H0 \def H_x in (ex2_ind C (\lambda (c2: C).(drop1 p c2 e1)) (\lambda (c2: C).(csubc g c2 c0)) (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2))) (\lambda (x: C).(\lambda (H1: (drop1 p x e1)).(\lambda (H16: (csubc g x c0)).(let H_x0 \def (csubc_drop_conf_rev g c2 c0 n0 n H14 x H16) in (let H \def H_x0 in (ex2_ind C (\lambda (c2: C).(drop n n0 c2 x)) (\lambda (c4: C).(csubc g c4 c2)) (ex2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2))) (\lambda (x0: C).(\lambda (H17: (drop n n0 x0 x)).(\lambda (H18: (csubc g x0 c2)).(ex_intro2 C (\lambda (c2: C).(drop1 (PCons n n0 p) c2 e1)) (\lambda (c4: C).(csubc g c4 c2)) x0 (drop1_cons x0 x n n0 H17 e1 p H1) H18)))) H)))))) H0))))) c3 (sym_eq C c3 e2 H13))) c1 (sym_eq C c1 c2 H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p)) (refl_equal C c2) (refl_equal C e2)))))))))))) hds)). theorem drop1_ceqc_trans: \forall (g: G).(\forall (hds: PList).(\forall (c2: C).(\forall (e2: C).((drop1 hds c2 e2) \to (\forall (e1: C).((ceqc g e2 e1) \to (ex2 C (\lambda (c1: C).(drop1 hds c1 e1)) (\lambda (c1: C).(ceqc g c2 c1))))))))) @@ -2796,12 +2796,12 @@ theorem pc3_head_21: theorem pc3_pr0_pr2_t: \forall (u1: T).(\forall (u2: T).((pr0 u2 u1) \to (\forall (c: C).(\forall (t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pc3 (CHead c k u1) t1 t2)))))))) \def - \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr0 u2 u1)).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: K).(\lambda (H0: (pr2 (CHead c k u2) t1 t2)).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 (CHead c k u2)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pc3 (CHead c k u1) t1 t2)))))))) with [(pr2_free c0 t0 t3 H1) \Rightarrow (\lambda (H2: (eq C c0 (CHead c k u2))).(\lambda (H3: (eq T t0 t1)).(\lambda (H4: (eq T t3 t2)).(eq_ind C (CHead c k u2) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pc3 (CHead c k u1) t1 t2))))) (\lambda (H5: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pc3 (CHead c k u1) t1 t2)))) (\lambda (H6: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pc3 (CHead c k u1) t1 t2))) (\lambda (H7: (pr0 t1 t2)).(pc3_pr2_r (CHead c k u1) t1 t2 (pr2_free (CHead c k u1) t1 t2 H7))) t3 (sym_eq T t3 t2 H6))) t0 (sym_eq T t0 t1 H5))) c0 (sym_eq C c0 (CHead c k u2) H2) H3 H4 H1)))) | (pr2_delta c0 d u i H1 t0 t3 H2 t H3) \Rightarrow (\lambda (H4: (eq C c0 (CHead c k u2))).(\lambda (H5: (eq T t0 t1)).(\lambda (H6: (eq T t t2)).(eq_ind C (CHead c k u2) (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t) \to (pc3 (CHead c k u1) t1 t2))))))) (\lambda (H7: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i u t3 t) \to (pc3 (CHead c k u1) t1 t2)))))) (\lambda (H8: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i u t3 t4) \to (pc3 (CHead c k u1) t1 t2))))) (\lambda (H9: (getl i (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H10: (pr0 t1 t3)).(\lambda (H11: (subst0 i u t3 t2)).(nat_ind (\lambda (n: nat).((getl n (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((subst0 n u t3 t2) \to (pc3 (CHead c k u1) t1 t2)))) (\lambda (H12: (getl O (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H13: (subst0 O u t3 t2)).(K_ind (\lambda (k: K).((clear (CHead c k u2) (CHead d (Bind Abbr) u)) \to (pc3 (CHead c k u1) t1 t2))) (\lambda (b: B).(\lambda (H14: (clear (CHead c (Bind b) u2) (CHead d (Bind Abbr) u))).(let H0 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 H14)) in ((let H15 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 H14)) in ((let H16 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 H14)) in (\lambda (H17: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H19 \def (eq_ind T u (\lambda (t: T).(subst0 O t t3 t2)) H13 u2 H16) in (eq_ind B Abbr (\lambda (b0: B).(pc3 (CHead c (Bind b0) u1) t1 t2)) (ex2_ind T (\lambda (t1: T).(subst0 O u1 t3 t1)) (\lambda (t1: T).(pr0 t2 t1)) (pc3 (CHead c (Bind Abbr) u1) t1 t2) (\lambda (x: T).(\lambda (H: (subst0 O u1 t3 x)).(\lambda (H20: (pr0 t2 x)).(pc3_pr3_t (CHead c (Bind Abbr) u1) t1 x (pr3_pr2 (CHead c (Bind Abbr) u1) t1 x (pr2_delta (CHead c (Bind Abbr) u1) c u1 O (getl_refl Abbr c u1) t1 t3 H10 x H)) t2 (pr3_pr2 (CHead c (Bind Abbr) u1) t2 x (pr2_free (CHead c (Bind Abbr) u1) t2 x H20)))))) (pr0_subst0_fwd u2 t3 t2 O H19 u1 H)) b H17))))) H15)) H0)))) (\lambda (f: F).(\lambda (H14: (clear (CHead c (Flat f) u2) (CHead d (Bind Abbr) u))).(clear_pc3_trans (CHead d (Bind Abbr) u) t1 t2 (pc3_pr2_r (CHead d (Bind Abbr) u) t1 t2 (pr2_delta (CHead d (Bind Abbr) u) d u O (getl_refl Abbr d u) t1 t3 H10 t2 H13)) (CHead c (Flat f) u1) (clear_flat c (CHead d (Bind Abbr) u) (clear_gen_flat f c (CHead d (Bind Abbr) u) u2 H14) f u1)))) k (getl_gen_O (CHead c k u2) (CHead d (Bind Abbr) u) H12)))) (\lambda (i0: nat).(\lambda (IHi: (((getl i0 (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pc3 (CHead c k u1) t1 t2))))).(\lambda (H12: (getl (S i0) (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H13: (subst0 (S i0) u t3 t2)).(K_ind (\lambda (k: K).((((getl i0 (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pc3 (CHead c k u1) t1 t2)))) \to ((getl (r k i0) c (CHead d (Bind Abbr) u)) \to (pc3 (CHead c k u1) t1 t2)))) (\lambda (b: B).(\lambda (_: (((getl i0 (CHead c (Bind b) u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pc3 (CHead c (Bind b) u1) t1 t2))))).(\lambda (H0: (getl (r (Bind b) i0) c (CHead d (Bind Abbr) u))).(pc3_pr2_r (CHead c (Bind b) u1) t1 t2 (pr2_delta (CHead c (Bind b) u1) d u (S i0) (getl_head (Bind b) i0 c (CHead d (Bind Abbr) u) H0 u1) t1 t3 H10 t2 H13))))) (\lambda (f: F).(\lambda (_: (((getl i0 (CHead c (Flat f) u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pc3 (CHead c (Flat f) u1) t1 t2))))).(\lambda (H0: (getl (r (Flat f) i0) c (CHead d (Bind Abbr) u))).(pc3_pr2_r (CHead c (Flat f) u1) t1 t2 (pr2_cflat c t1 t2 (pr2_delta c d u (r (Flat f) i0) H0 t1 t3 H10 t2 H13) f u1))))) k IHi (getl_gen_S k c (CHead d (Bind Abbr) u) u2 i0 H12)))))) i H9 H11)))) t (sym_eq T t t2 H8))) t0 (sym_eq T t0 t1 H7))) c0 (sym_eq C c0 (CHead c k u2) H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C (CHead c k u2)) (refl_equal T t1) (refl_equal T t2)))))))))). + \lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr0 u2 u1)).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k: K).(\lambda (H0: (pr2 (CHead c k u2) t1 t2)).(let H1 \def (match H0 return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 (CHead c k u2)) \to ((eq T t t1) \to ((eq T t0 t2) \to (pc3 (CHead c k u1) t1 t2)))))))) with [(pr2_free c0 t0 t3 H1) \Rightarrow (\lambda (H2: (eq C c0 (CHead c k u2))).(\lambda (H3: (eq T t0 t1)).(\lambda (H4: (eq T t3 t2)).(eq_ind C (CHead c k u2) (\lambda (_: C).((eq T t0 t1) \to ((eq T t3 t2) \to ((pr0 t0 t3) \to (pc3 (CHead c k u1) t1 t2))))) (\lambda (H5: (eq T t0 t1)).(eq_ind T t1 (\lambda (t: T).((eq T t3 t2) \to ((pr0 t t3) \to (pc3 (CHead c k u1) t1 t2)))) (\lambda (H6: (eq T t3 t2)).(eq_ind T t2 (\lambda (t: T).((pr0 t1 t) \to (pc3 (CHead c k u1) t1 t2))) (\lambda (H7: (pr0 t1 t2)).(pc3_pr2_r (CHead c k u1) t1 t2 (pr2_free (CHead c k u1) t1 t2 H7))) t3 (sym_eq T t3 t2 H6))) t0 (sym_eq T t0 t1 H5))) c0 (sym_eq C c0 (CHead c k u2) H2) H3 H4 H1)))) | (pr2_delta c0 d u i H1 t0 t3 H2 t H3) \Rightarrow (\lambda (H4: (eq C c0 (CHead c k u2))).(\lambda (H5: (eq T t0 t1)).(\lambda (H6: (eq T t t2)).(eq_ind C (CHead c k u2) (\lambda (c1: C).((eq T t0 t1) \to ((eq T t t2) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t0 t3) \to ((subst0 i u t3 t) \to (pc3 (CHead c k u1) t1 t2))))))) (\lambda (H7: (eq T t0 t1)).(eq_ind T t1 (\lambda (t4: T).((eq T t t2) \to ((getl i (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((pr0 t4 t3) \to ((subst0 i u t3 t) \to (pc3 (CHead c k u1) t1 t2)))))) (\lambda (H8: (eq T t t2)).(eq_ind T t2 (\lambda (t4: T).((getl i (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((pr0 t1 t3) \to ((subst0 i u t3 t4) \to (pc3 (CHead c k u1) t1 t2))))) (\lambda (H9: (getl i (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H10: (pr0 t1 t3)).(\lambda (H11: (subst0 i u t3 t2)).(nat_ind (\lambda (n: nat).((getl n (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((subst0 n u t3 t2) \to (pc3 (CHead c k u1) t1 t2)))) (\lambda (H12: (getl O (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H13: (subst0 O u t3 t2)).(K_ind (\lambda (k: K).((clear (CHead c k u2) (CHead d (Bind Abbr) u)) \to (pc3 (CHead c k u1) t1 t2))) (\lambda (b: B).(\lambda (H14: (clear (CHead c (Bind b) u2) (CHead d (Bind Abbr) u))).(let H0 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 H14)) in ((let H15 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 H14)) in ((let H16 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d (Bind Abbr) u) u2 H14)) in (\lambda (H17: (eq B Abbr b)).(\lambda (_: (eq C d c)).(let H19 \def (eq_ind T u (\lambda (t: T).(subst0 O t t3 t2)) H13 u2 H16) in (eq_ind B Abbr (\lambda (b0: B).(pc3 (CHead c (Bind b0) u1) t1 t2)) (ex2_ind T (\lambda (t1: T).(subst0 O u1 t3 t1)) (\lambda (t1: T).(pr0 t2 t1)) (pc3 (CHead c (Bind Abbr) u1) t1 t2) (\lambda (x: T).(\lambda (H: (subst0 O u1 t3 x)).(\lambda (H20: (pr0 t2 x)).(pc3_pr3_t (CHead c (Bind Abbr) u1) t1 x (pr3_pr2 (CHead c (Bind Abbr) u1) t1 x (pr2_delta (CHead c (Bind Abbr) u1) c u1 O (getl_refl Abbr c u1) t1 t3 H10 x H)) t2 (pr3_pr2 (CHead c (Bind Abbr) u1) t2 x (pr2_free (CHead c (Bind Abbr) u1) t2 x H20)))))) (pr0_subst0_fwd u2 t3 t2 O H19 u1 H)) b H17))))) H15)) H0)))) (\lambda (f: F).(\lambda (H14: (clear (CHead c (Flat f) u2) (CHead d (Bind Abbr) u))).(clear_pc3_trans (CHead d (Bind Abbr) u) t1 t2 (pc3_pr2_r (CHead d (Bind Abbr) u) t1 t2 (pr2_delta (CHead d (Bind Abbr) u) d u O (getl_refl Abbr d u) t1 t3 H10 t2 H13)) (CHead c (Flat f) u1) (clear_flat c (CHead d (Bind Abbr) u) (clear_gen_flat f c (CHead d (Bind Abbr) u) u2 H14) f u1)))) k (getl_gen_O (CHead c k u2) (CHead d (Bind Abbr) u) H12)))) (\lambda (i0: nat).(\lambda (IHi: (((getl i0 (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pc3 (CHead c k u1) t1 t2))))).(\lambda (H12: (getl (S i0) (CHead c k u2) (CHead d (Bind Abbr) u))).(\lambda (H13: (subst0 (S i0) u t3 t2)).(K_ind (\lambda (k: K).((((getl i0 (CHead c k u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pc3 (CHead c k u1) t1 t2)))) \to ((getl (r k i0) c (CHead d (Bind Abbr) u)) \to (pc3 (CHead c k u1) t1 t2)))) (\lambda (b: B).(\lambda (_: (((getl i0 (CHead c (Bind b) u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pc3 (CHead c (Bind b) u1) t1 t2))))).(\lambda (H0: (getl (r (Bind b) i0) c (CHead d (Bind Abbr) u))).(pc3_pr2_r (CHead c (Bind b) u1) t1 t2 (pr2_delta (CHead c (Bind b) u1) d u (S i0) (getl_head (Bind b) i0 c (CHead d (Bind Abbr) u) H0 u1) t1 t3 H10 t2 H13))))) (\lambda (f: F).(\lambda (_: (((getl i0 (CHead c (Flat f) u2) (CHead d (Bind Abbr) u)) \to ((subst0 i0 u t3 t2) \to (pc3 (CHead c (Flat f) u1) t1 t2))))).(\lambda (H0: (getl (r (Flat f) i0) c (CHead d (Bind Abbr) u))).(pc3_pr2_r (CHead c (Flat f) u1) t1 t2 (pr2_cflat c t1 t2 (pr2_delta c d u (r (Flat f) i0) H0 t1 t3 H10 t2 H13) f u1))))) k IHi (getl_gen_S k c (CHead d (Bind Abbr) u) u2 i0 H12)))))) i H9 H11)))) t (sym_eq T t t2 H8))) t0 (sym_eq T t0 t1 H7))) c0 (sym_eq C c0 (CHead c k u2) H4) H5 H6 H1 H2 H3))))]) in (H1 (refl_equal C (CHead c k u2)) (refl_equal T t1) (refl_equal T t2)))))))))). theorem pc3_pr2_pr2_t: \forall (c: C).(\forall (u1: T).(\forall (u2: T).((pr2 c u2 u1) \to (\forall (t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pc3 (CHead c k u1) t1 t2)))))))) \def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr2 c u2 u1)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq C c0 c) \to ((eq T t u2) \to ((eq T t0 u1) \to (\forall (t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pc3 (CHead c k u1) t1 t2)))))))))))) with [(pr2_free c0 t1 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t1 u2)).(\lambda (H3: (eq T t2 u1)).(eq_ind C c (\lambda (_: C).((eq T t1 u2) \to ((eq T t2 u1) \to ((pr0 t1 t2) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pc3 (CHead c k u1) t3 t4))))))))) (\lambda (H4: (eq T t1 u2)).(eq_ind T u2 (\lambda (t: T).((eq T t2 u1) \to ((pr0 t t2) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pc3 (CHead c k u1) t3 t4)))))))) (\lambda (H5: (eq T t2 u1)).(eq_ind T u1 (\lambda (t: T).((pr0 u2 t) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pc3 (CHead c k u1) t3 t4))))))) (\lambda (H6: (pr0 u2 u1)).(\lambda (t0: T).(\lambda (t3: T).(\lambda (k: K).(\lambda (H: (pr2 (CHead c k u2) t0 t3)).(pc3_pr0_pr2_t u1 u2 H6 c t0 t3 k H)))))) t2 (sym_eq T t2 u1 H5))) t1 (sym_eq T t1 u2 H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t1 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t1 u2)).(\lambda (H5: (eq T t u1)).(eq_ind C c (\lambda (c1: C).((eq T t1 u2) \to ((eq T t u1) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t1 t2) \to ((subst0 i u t2 t) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pc3 (CHead c k u1) t3 t4))))))))))) (\lambda (H6: (eq T t1 u2)).(eq_ind T u2 (\lambda (t0: T).((eq T t u1) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pc3 (CHead c k u1) t3 t4)))))))))) (\lambda (H7: (eq T t u1)).(eq_ind T u1 (\lambda (t0: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 u2 t2) \to ((subst0 i u t2 t0) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pc3 (CHead c k u1) t3 t4))))))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 u2 t2)).(\lambda (H10: (subst0 i u t2 u1)).(\lambda (t0: T).(\lambda (t3: T).(\lambda (k: K).(\lambda (H: (pr2 (CHead c k u2) t0 t3)).(let H11 \def (match H return (\lambda (_: ?).(\lambda (c0: C).(\lambda (t: T).(\lambda (t1: T).((eq C c0 (CHead c k u2)) \to ((eq T t t0) \to ((eq T t1 t3) \to (pc3 (CHead c k u1) t0 t3)))))))) with [(pr2_free c0 t1 t4 H3) \Rightarrow (\lambda (H4: (eq C c0 (CHead c k u2))).(\lambda (H5: (eq T t1 t0)).(\lambda (H6: (eq T t4 t3)).(eq_ind C (CHead c k u2) (\lambda (_: C).((eq T t1 t0) \to ((eq T t4 t3) \to ((pr0 t1 t4) \to (pc3 (CHead c k u1) t0 t3))))) (\lambda (H7: (eq T t1 t0)).(eq_ind T t0 (\lambda (t: T).((eq T t4 t3) \to ((pr0 t t4) \to (pc3 (CHead c k u1) t0 t3)))) (\lambda (H8: (eq T t4 t3)).(eq_ind T t3 (\lambda (t: T).((pr0 t0 t) \to (pc3 (CHead c k u1) t0 t3))) (\lambda (H9: (pr0 t0 t3)).(pc3_pr2_r (CHead c k u1) t0 t3 (pr2_free (CHead c k u1) t0 t3 H9))) t4 (sym_eq T t4 t3 H8))) t1 (sym_eq T t1 t0 H7))) c0 (sym_eq C c0 (CHead c k u2) H4) H5 H6 H3)))) | (pr2_delta c0 d0 u0 i0 H3 t1 t4 H4 t H5) \Rightarrow (\lambda (H6: (eq C c0 (CHead c k u2))).(\lambda (H7: (eq T t1 t0)).(\lambda (H11: (eq T t t3)).(eq_ind C (CHead c k u2) (\lambda (c1: C).((eq T t1 t0) \to ((eq T t t3) \to ((getl i0 c1 (CHead d0 (Bind Abbr) u0)) \to ((pr0 t1 t4) \to ((subst0 i0 u0 t4 t) \to (pc3 (CHead c k u1) t0 t3))))))) (\lambda (H12: (eq T t1 t0)).(eq_ind T t0 (\lambda (t2: T).((eq T t t3) \to ((getl i0 (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((pr0 t2 t4) \to ((subst0 i0 u0 t4 t) \to (pc3 (CHead c k u1) t0 t3)))))) (\lambda (H13: (eq T t t3)).(eq_ind T t3 (\lambda (t2: T).((getl i0 (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((pr0 t0 t4) \to ((subst0 i0 u0 t4 t2) \to (pc3 (CHead c k u1) t0 t3))))) (\lambda (H14: (getl i0 (CHead c k u2) (CHead d0 (Bind Abbr) u0))).(\lambda (H15: (pr0 t0 t4)).(\lambda (H16: (subst0 i0 u0 t4 t3)).(nat_ind (\lambda (n: nat).((getl n (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((subst0 n u0 t4 t3) \to (pc3 (CHead c k u1) t0 t3)))) (\lambda (H17: (getl O (CHead c k u2) (CHead d0 (Bind Abbr) u0))).(\lambda (H18: (subst0 O u0 t4 t3)).((match k return (\lambda (_: ?).(\lambda (k: K).((clear (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to (pc3 (CHead c k u1) t0 t3)))) with [(Bind b) \Rightarrow (\lambda (H19: (clear (CHead c (Bind b) u2) (CHead d0 (Bind Abbr) u0))).(let H \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d0 | (CHead c _ _) \Rightarrow c])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H19)) in ((let H0 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H19)) in ((let H1 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H19)) in (\lambda (H20: (eq B Abbr b)).(\lambda (_: (eq C d0 c)).(let H22 \def (eq_ind T u0 (\lambda (t: T).(subst0 O t t4 t3)) H18 u2 H1) in (eq_ind B Abbr (\lambda (b0: B).(pc3 (CHead c (Bind b0) u1) t0 t3)) (ex2_ind T (\lambda (t0: T).(subst0 O t2 t4 t0)) (\lambda (t0: T).(pr0 t3 t0)) (pc3 (CHead c (Bind Abbr) u1) t0 t3) (\lambda (x: T).(\lambda (H2: (subst0 O t2 t4 x)).(\lambda (H9: (pr0 t3 x)).(ex2_ind T (\lambda (t0: T).(subst0 O u1 t4 t0)) (\lambda (t0: T).(subst0 (S (plus i O)) u x t0)) (pc3 (CHead c (Bind Abbr) u1) t0 t3) (\lambda (x0: T).(\lambda (H10: (subst0 O u1 t4 x0)).(\lambda (H23: (subst0 (S (plus i O)) u x x0)).(let H24 \def (f_equal nat nat S (plus i O) i (sym_eq nat i (plus i O) (plus_n_O i))) in (let H25 \def (eq_ind nat (S (plus i O)) (\lambda (n: nat).(subst0 n u x x0)) H23 (S i) H24) in (pc3_pr2_u (CHead c (Bind Abbr) u1) x0 t0 (pr2_delta (CHead c (Bind Abbr) u1) c u1 O (getl_refl Abbr c u1) t0 t4 H15 x0 H10) t3 (pc3_pr2_x (CHead c (Bind Abbr) u1) x0 t3 (pr2_delta (CHead c (Bind Abbr) u1) d u (S i) (getl_head (Bind Abbr) i c (CHead d (Bind Abbr) u) H8 u1) t3 x H9 x0 H25)))))))) (subst0_subst0_back t4 x t2 O H2 u1 u i H10))))) (pr0_subst0_fwd u2 t4 t3 O H22 t2 H9)) b H20))))) H0)) H))) | (Flat f) \Rightarrow (\lambda (H8: (clear (CHead c (Flat f) u2) (CHead d0 (Bind Abbr) u0))).(clear_pc3_trans (CHead d0 (Bind Abbr) u0) t0 t3 (pc3_pr2_r (CHead d0 (Bind Abbr) u0) t0 t3 (pr2_delta (CHead d0 (Bind Abbr) u0) d0 u0 O (getl_refl Abbr d0 u0) t0 t4 H15 t3 H18)) (CHead c (Flat f) u1) (clear_flat c (CHead d0 (Bind Abbr) u0) (clear_gen_flat f c (CHead d0 (Bind Abbr) u0) u2 H8) f u1)))]) (getl_gen_O (CHead c k u2) (CHead d0 (Bind Abbr) u0) H17)))) (\lambda (i1: nat).(\lambda (_: (((getl i1 (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((subst0 i1 u0 t4 t3) \to (pc3 (CHead c k u1) t0 t3))))).(\lambda (H8: (getl (S i1) (CHead c k u2) (CHead d0 (Bind Abbr) u0))).(\lambda (H9: (subst0 (S i1) u0 t4 t3)).(K_ind (\lambda (k: K).((getl (r k i1) c (CHead d0 (Bind Abbr) u0)) \to (pc3 (CHead c k u1) t0 t3))) (\lambda (b: B).(\lambda (H: (getl (r (Bind b) i1) c (CHead d0 (Bind Abbr) u0))).(pc3_pr2_r (CHead c (Bind b) u1) t0 t3 (pr2_delta (CHead c (Bind b) u1) d0 u0 (S i1) (getl_head (Bind b) i1 c (CHead d0 (Bind Abbr) u0) H u1) t0 t4 H15 t3 H9)))) (\lambda (f: F).(\lambda (H: (getl (r (Flat f) i1) c (CHead d0 (Bind Abbr) u0))).(pc3_pr2_r (CHead c (Flat f) u1) t0 t3 (pr2_cflat c t0 t3 (pr2_delta c d0 u0 (r (Flat f) i1) H t0 t4 H15 t3 H9) f u1)))) k (getl_gen_S k c (CHead d0 (Bind Abbr) u0) u2 i1 H8)))))) i0 H14 H16)))) t (sym_eq T t t3 H13))) t1 (sym_eq T t1 t0 H12))) c0 (sym_eq C c0 (CHead c k u2) H6) H7 H11 H3 H4 H5))))]) in (H11 (refl_equal C (CHead c k u2)) (refl_equal T t0) (refl_equal T t3)))))))))) t (sym_eq T t u1 H7))) t1 (sym_eq T t1 u2 H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T u2) (refl_equal T u1)))))). + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H: (pr2 c u2 u1)).(let H0 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr2 c0 t t0)).((eq C c0 c) \to ((eq T t u2) \to ((eq T t0 u1) \to (\forall (t1: T).(\forall (t2: T).(\forall (k: K).((pr2 (CHead c k u2) t1 t2) \to (pc3 (CHead c k u1) t1 t2)))))))))))) with [(pr2_free c0 t1 t2 H0) \Rightarrow (\lambda (H1: (eq C c0 c)).(\lambda (H2: (eq T t1 u2)).(\lambda (H3: (eq T t2 u1)).(eq_ind C c (\lambda (_: C).((eq T t1 u2) \to ((eq T t2 u1) \to ((pr0 t1 t2) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pc3 (CHead c k u1) t3 t4))))))))) (\lambda (H4: (eq T t1 u2)).(eq_ind T u2 (\lambda (t: T).((eq T t2 u1) \to ((pr0 t t2) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pc3 (CHead c k u1) t3 t4)))))))) (\lambda (H5: (eq T t2 u1)).(eq_ind T u1 (\lambda (t: T).((pr0 u2 t) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pc3 (CHead c k u1) t3 t4))))))) (\lambda (H6: (pr0 u2 u1)).(\lambda (t0: T).(\lambda (t3: T).(\lambda (k: K).(\lambda (H: (pr2 (CHead c k u2) t0 t3)).(pc3_pr0_pr2_t u1 u2 H6 c t0 t3 k H)))))) t2 (sym_eq T t2 u1 H5))) t1 (sym_eq T t1 u2 H4))) c0 (sym_eq C c0 c H1) H2 H3 H0)))) | (pr2_delta c0 d u i H0 t1 t2 H1 t H2) \Rightarrow (\lambda (H3: (eq C c0 c)).(\lambda (H4: (eq T t1 u2)).(\lambda (H5: (eq T t u1)).(eq_ind C c (\lambda (c1: C).((eq T t1 u2) \to ((eq T t u1) \to ((getl i c1 (CHead d (Bind Abbr) u)) \to ((pr0 t1 t2) \to ((subst0 i u t2 t) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pc3 (CHead c k u1) t3 t4))))))))))) (\lambda (H6: (eq T t1 u2)).(eq_ind T u2 (\lambda (t0: T).((eq T t u1) \to ((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 t0 t2) \to ((subst0 i u t2 t) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pc3 (CHead c k u1) t3 t4)))))))))) (\lambda (H7: (eq T t u1)).(eq_ind T u1 (\lambda (t0: T).((getl i c (CHead d (Bind Abbr) u)) \to ((pr0 u2 t2) \to ((subst0 i u t2 t0) \to (\forall (t3: T).(\forall (t4: T).(\forall (k: K).((pr2 (CHead c k u2) t3 t4) \to (pc3 (CHead c k u1) t3 t4))))))))) (\lambda (H8: (getl i c (CHead d (Bind Abbr) u))).(\lambda (H9: (pr0 u2 t2)).(\lambda (H10: (subst0 i u t2 u1)).(\lambda (t0: T).(\lambda (t3: T).(\lambda (k: K).(\lambda (H: (pr2 (CHead c k u2) t0 t3)).(let H11 \def (match H return (\lambda (c0: C).(\lambda (t: T).(\lambda (t1: T).(\lambda (_: (pr2 c0 t t1)).((eq C c0 (CHead c k u2)) \to ((eq T t t0) \to ((eq T t1 t3) \to (pc3 (CHead c k u1) t0 t3)))))))) with [(pr2_free c0 t1 t4 H3) \Rightarrow (\lambda (H4: (eq C c0 (CHead c k u2))).(\lambda (H5: (eq T t1 t0)).(\lambda (H6: (eq T t4 t3)).(eq_ind C (CHead c k u2) (\lambda (_: C).((eq T t1 t0) \to ((eq T t4 t3) \to ((pr0 t1 t4) \to (pc3 (CHead c k u1) t0 t3))))) (\lambda (H7: (eq T t1 t0)).(eq_ind T t0 (\lambda (t: T).((eq T t4 t3) \to ((pr0 t t4) \to (pc3 (CHead c k u1) t0 t3)))) (\lambda (H8: (eq T t4 t3)).(eq_ind T t3 (\lambda (t: T).((pr0 t0 t) \to (pc3 (CHead c k u1) t0 t3))) (\lambda (H9: (pr0 t0 t3)).(pc3_pr2_r (CHead c k u1) t0 t3 (pr2_free (CHead c k u1) t0 t3 H9))) t4 (sym_eq T t4 t3 H8))) t1 (sym_eq T t1 t0 H7))) c0 (sym_eq C c0 (CHead c k u2) H4) H5 H6 H3)))) | (pr2_delta c0 d0 u0 i0 H3 t1 t4 H4 t H5) \Rightarrow (\lambda (H6: (eq C c0 (CHead c k u2))).(\lambda (H7: (eq T t1 t0)).(\lambda (H11: (eq T t t3)).(eq_ind C (CHead c k u2) (\lambda (c1: C).((eq T t1 t0) \to ((eq T t t3) \to ((getl i0 c1 (CHead d0 (Bind Abbr) u0)) \to ((pr0 t1 t4) \to ((subst0 i0 u0 t4 t) \to (pc3 (CHead c k u1) t0 t3))))))) (\lambda (H12: (eq T t1 t0)).(eq_ind T t0 (\lambda (t2: T).((eq T t t3) \to ((getl i0 (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((pr0 t2 t4) \to ((subst0 i0 u0 t4 t) \to (pc3 (CHead c k u1) t0 t3)))))) (\lambda (H13: (eq T t t3)).(eq_ind T t3 (\lambda (t2: T).((getl i0 (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((pr0 t0 t4) \to ((subst0 i0 u0 t4 t2) \to (pc3 (CHead c k u1) t0 t3))))) (\lambda (H14: (getl i0 (CHead c k u2) (CHead d0 (Bind Abbr) u0))).(\lambda (H15: (pr0 t0 t4)).(\lambda (H16: (subst0 i0 u0 t4 t3)).(nat_ind (\lambda (n: nat).((getl n (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((subst0 n u0 t4 t3) \to (pc3 (CHead c k u1) t0 t3)))) (\lambda (H17: (getl O (CHead c k u2) (CHead d0 (Bind Abbr) u0))).(\lambda (H18: (subst0 O u0 t4 t3)).((match k return (\lambda (k: K).((clear (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to (pc3 (CHead c k u1) t0 t3))) with [(Bind b) \Rightarrow (\lambda (H19: (clear (CHead c (Bind b) u2) (CHead d0 (Bind Abbr) u0))).(let H \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d0 | (CHead c _ _) \Rightarrow c])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H19)) in ((let H0 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H19)) in ((let H1 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead d0 (Bind Abbr) u0) (CHead c (Bind b) u2) (clear_gen_bind b c (CHead d0 (Bind Abbr) u0) u2 H19)) in (\lambda (H20: (eq B Abbr b)).(\lambda (_: (eq C d0 c)).(let H22 \def (eq_ind T u0 (\lambda (t: T).(subst0 O t t4 t3)) H18 u2 H1) in (eq_ind B Abbr (\lambda (b0: B).(pc3 (CHead c (Bind b0) u1) t0 t3)) (ex2_ind T (\lambda (t0: T).(subst0 O t2 t4 t0)) (\lambda (t0: T).(pr0 t3 t0)) (pc3 (CHead c (Bind Abbr) u1) t0 t3) (\lambda (x: T).(\lambda (H2: (subst0 O t2 t4 x)).(\lambda (H9: (pr0 t3 x)).(ex2_ind T (\lambda (t0: T).(subst0 O u1 t4 t0)) (\lambda (t0: T).(subst0 (S (plus i O)) u x t0)) (pc3 (CHead c (Bind Abbr) u1) t0 t3) (\lambda (x0: T).(\lambda (H10: (subst0 O u1 t4 x0)).(\lambda (H23: (subst0 (S (plus i O)) u x x0)).(let H24 \def (f_equal nat nat S (plus i O) i (sym_eq nat i (plus i O) (plus_n_O i))) in (let H25 \def (eq_ind nat (S (plus i O)) (\lambda (n: nat).(subst0 n u x x0)) H23 (S i) H24) in (pc3_pr2_u (CHead c (Bind Abbr) u1) x0 t0 (pr2_delta (CHead c (Bind Abbr) u1) c u1 O (getl_refl Abbr c u1) t0 t4 H15 x0 H10) t3 (pc3_pr2_x (CHead c (Bind Abbr) u1) x0 t3 (pr2_delta (CHead c (Bind Abbr) u1) d u (S i) (getl_head (Bind Abbr) i c (CHead d (Bind Abbr) u) H8 u1) t3 x H9 x0 H25)))))))) (subst0_subst0_back t4 x t2 O H2 u1 u i H10))))) (pr0_subst0_fwd u2 t4 t3 O H22 t2 H9)) b H20))))) H0)) H))) | (Flat f) \Rightarrow (\lambda (H8: (clear (CHead c (Flat f) u2) (CHead d0 (Bind Abbr) u0))).(clear_pc3_trans (CHead d0 (Bind Abbr) u0) t0 t3 (pc3_pr2_r (CHead d0 (Bind Abbr) u0) t0 t3 (pr2_delta (CHead d0 (Bind Abbr) u0) d0 u0 O (getl_refl Abbr d0 u0) t0 t4 H15 t3 H18)) (CHead c (Flat f) u1) (clear_flat c (CHead d0 (Bind Abbr) u0) (clear_gen_flat f c (CHead d0 (Bind Abbr) u0) u2 H8) f u1)))]) (getl_gen_O (CHead c k u2) (CHead d0 (Bind Abbr) u0) H17)))) (\lambda (i1: nat).(\lambda (_: (((getl i1 (CHead c k u2) (CHead d0 (Bind Abbr) u0)) \to ((subst0 i1 u0 t4 t3) \to (pc3 (CHead c k u1) t0 t3))))).(\lambda (H8: (getl (S i1) (CHead c k u2) (CHead d0 (Bind Abbr) u0))).(\lambda (H9: (subst0 (S i1) u0 t4 t3)).(K_ind (\lambda (k: K).((getl (r k i1) c (CHead d0 (Bind Abbr) u0)) \to (pc3 (CHead c k u1) t0 t3))) (\lambda (b: B).(\lambda (H: (getl (r (Bind b) i1) c (CHead d0 (Bind Abbr) u0))).(pc3_pr2_r (CHead c (Bind b) u1) t0 t3 (pr2_delta (CHead c (Bind b) u1) d0 u0 (S i1) (getl_head (Bind b) i1 c (CHead d0 (Bind Abbr) u0) H u1) t0 t4 H15 t3 H9)))) (\lambda (f: F).(\lambda (H: (getl (r (Flat f) i1) c (CHead d0 (Bind Abbr) u0))).(pc3_pr2_r (CHead c (Flat f) u1) t0 t3 (pr2_cflat c t0 t3 (pr2_delta c d0 u0 (r (Flat f) i1) H t0 t4 H15 t3 H9) f u1)))) k (getl_gen_S k c (CHead d0 (Bind Abbr) u0) u2 i1 H8)))))) i0 H14 H16)))) t (sym_eq T t t3 H13))) t1 (sym_eq T t1 t0 H12))) c0 (sym_eq C c0 (CHead c k u2) H6) H7 H11 H3 H4 H5))))]) in (H11 (refl_equal C (CHead c k u2)) (refl_equal T t0) (refl_equal T t3)))))))))) t (sym_eq T t u1 H7))) t1 (sym_eq T t1 u2 H6))) c0 (sym_eq C c0 c H3) H4 H5 H0 H1 H2))))]) in (H0 (refl_equal C c) (refl_equal T u2) (refl_equal T u1)))))). theorem pc3_pr2_pr3_t: \forall (c: C).(\forall (u2: T).(\forall (t1: T).(\forall (t2: T).(\forall (k: K).((pr3 (CHead c k u2) t1 t2) \to (\forall (u1: T).((pr2 c u2 u1) \to (pc3 (CHead c k u1) t1 t2)))))))) @@ -2821,7 +2821,7 @@ theorem pc3_lift: theorem pc3_wcpr0__pc3_wcpr0_t_aux: \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (k: K).(\forall (u: T).(\forall (t1: T).(\forall (t2: T).((pr3 (CHead c1 k u) t1 t2) \to (pc3 (CHead c2 k u) t1 t2)))))))) \def - \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(\lambda (k: K).(\lambda (u: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr3 (CHead c1 k u) t1 t2)).(pr3_ind (CHead c1 k u) (\lambda (t: T).(\lambda (t0: T).(pc3 (CHead c2 k u) t t0))) (\lambda (t: T).(pc3_refl (CHead c2 k u) t)) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H1: (pr2 (CHead c1 k u) t3 t0)).(\lambda (t4: T).(\lambda (_: (pr3 (CHead c1 k u) t0 t4)).(\lambda (H3: (pc3 (CHead c2 k u) t0 t4)).(pc3_t t0 (CHead c2 k u) t3 (let H4 \def (match H1 return (\lambda (_: ?).(\lambda (c: C).(\lambda (t: T).(\lambda (t1: T).((eq C c (CHead c1 k u)) \to ((eq T t t3) \to ((eq T t1 t0) \to (pc3 (CHead c2 k u) t3 t0)))))))) with [(pr2_free c t1 t2 H2) \Rightarrow (\lambda (H3: (eq C c (CHead c1 k u))).(\lambda (H4: (eq T t1 t3)).(\lambda (H5: (eq T t2 t0)).(eq_ind C (CHead c1 k u) (\lambda (_: C).((eq T t1 t3) \to ((eq T t2 t0) \to ((pr0 t1 t2) \to (pc3 (CHead c2 k u) t3 t0))))) (\lambda (H6: (eq T t1 t3)).(eq_ind T t3 (\lambda (t: T).((eq T t2 t0) \to ((pr0 t t2) \to (pc3 (CHead c2 k u) t3 t0)))) (\lambda (H7: (eq T t2 t0)).(eq_ind T t0 (\lambda (t: T).((pr0 t3 t) \to (pc3 (CHead c2 k u) t3 t0))) (\lambda (H8: (pr0 t3 t0)).(pc3_pr2_r (CHead c2 k u) t3 t0 (pr2_free (CHead c2 k u) t3 t0 H8))) t2 (sym_eq T t2 t0 H7))) t1 (sym_eq T t1 t3 H6))) c (sym_eq C c (CHead c1 k u) H3) H4 H5 H2)))) | (pr2_delta c d u0 i H2 t1 t2 H3 t H4) \Rightarrow (\lambda (H5: (eq C c (CHead c1 k u))).(\lambda (H6: (eq T t1 t3)).(\lambda (H7: (eq T t t0)).(eq_ind C (CHead c1 k u) (\lambda (c0: C).((eq T t1 t3) \to ((eq T t t0) \to ((getl i c0 (CHead d (Bind Abbr) u0)) \to ((pr0 t1 t2) \to ((subst0 i u0 t2 t) \to (pc3 (CHead c2 k u) t3 t0))))))) (\lambda (H8: (eq T t1 t3)).(eq_ind T t3 (\lambda (t4: T).((eq T t t0) \to ((getl i (CHead c1 k u) (CHead d (Bind Abbr) u0)) \to ((pr0 t4 t2) \to ((subst0 i u0 t2 t) \to (pc3 (CHead c2 k u) t3 t0)))))) (\lambda (H9: (eq T t t0)).(eq_ind T t0 (\lambda (t4: T).((getl i (CHead c1 k u) (CHead d (Bind Abbr) u0)) \to ((pr0 t3 t2) \to ((subst0 i u0 t2 t4) \to (pc3 (CHead c2 k u) t3 t0))))) (\lambda (H10: (getl i (CHead c1 k u) (CHead d (Bind Abbr) u0))).(\lambda (H11: (pr0 t3 t2)).(\lambda (H12: (subst0 i u0 t2 t0)).(ex3_2_ind C T (\lambda (e2: C).(\lambda (u2: T).(getl i (CHead c2 k u) (CHead e2 (Bind Abbr) u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u0 u2))) (pc3 (CHead c2 k u) t3 t0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H0: (getl i (CHead c2 k u) (CHead x0 (Bind Abbr) x1))).(\lambda (_: (wcpr0 d x0)).(\lambda (H14: (pr0 u0 x1)).(ex2_ind T (\lambda (t0: T).(subst0 i x1 t2 t0)) (\lambda (t3: T).(pr0 t0 t3)) (pc3 (CHead c2 k u) t3 t0) (\lambda (x: T).(\lambda (H15: (subst0 i x1 t2 x)).(\lambda (H16: (pr0 t0 x)).(pc3_pr2_u (CHead c2 k u) x t3 (pr2_delta (CHead c2 k u) x0 x1 i H0 t3 t2 H11 x H15) t0 (pc3_pr2_x (CHead c2 k u) x t0 (pr2_free (CHead c2 k u) t0 x H16)))))) (pr0_subst0_fwd u0 t2 t0 i H12 x1 H14))))))) (wcpr0_getl (CHead c1 k u) (CHead c2 k u) (wcpr0_comp c1 c2 H u u (pr0_refl u) k) i d u0 (Bind Abbr) H10))))) t (sym_eq T t t0 H9))) t1 (sym_eq T t1 t3 H8))) c (sym_eq C c (CHead c1 k u) H5) H6 H7 H2 H3 H4))))]) in (H4 (refl_equal C (CHead c1 k u)) (refl_equal T t3) (refl_equal T t0))) t4 H3))))))) t1 t2 H0)))))))). + \lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wcpr0 c1 c2)).(\lambda (k: K).(\lambda (u: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H0: (pr3 (CHead c1 k u) t1 t2)).(pr3_ind (CHead c1 k u) (\lambda (t: T).(\lambda (t0: T).(pc3 (CHead c2 k u) t t0))) (\lambda (t: T).(pc3_refl (CHead c2 k u) t)) (\lambda (t0: T).(\lambda (t3: T).(\lambda (H1: (pr2 (CHead c1 k u) t3 t0)).(\lambda (t4: T).(\lambda (_: (pr3 (CHead c1 k u) t0 t4)).(\lambda (H3: (pc3 (CHead c2 k u) t0 t4)).(pc3_t t0 (CHead c2 k u) t3 (let H4 \def (match H1 return (\lambda (c: C).(\lambda (t: T).(\lambda (t1: T).(\lambda (_: (pr2 c t t1)).((eq C c (CHead c1 k u)) \to ((eq T t t3) \to ((eq T t1 t0) \to (pc3 (CHead c2 k u) t3 t0)))))))) with [(pr2_free c t1 t2 H2) \Rightarrow (\lambda (H3: (eq C c (CHead c1 k u))).(\lambda (H4: (eq T t1 t3)).(\lambda (H5: (eq T t2 t0)).(eq_ind C (CHead c1 k u) (\lambda (_: C).((eq T t1 t3) \to ((eq T t2 t0) \to ((pr0 t1 t2) \to (pc3 (CHead c2 k u) t3 t0))))) (\lambda (H6: (eq T t1 t3)).(eq_ind T t3 (\lambda (t: T).((eq T t2 t0) \to ((pr0 t t2) \to (pc3 (CHead c2 k u) t3 t0)))) (\lambda (H7: (eq T t2 t0)).(eq_ind T t0 (\lambda (t: T).((pr0 t3 t) \to (pc3 (CHead c2 k u) t3 t0))) (\lambda (H8: (pr0 t3 t0)).(pc3_pr2_r (CHead c2 k u) t3 t0 (pr2_free (CHead c2 k u) t3 t0 H8))) t2 (sym_eq T t2 t0 H7))) t1 (sym_eq T t1 t3 H6))) c (sym_eq C c (CHead c1 k u) H3) H4 H5 H2)))) | (pr2_delta c d u0 i H2 t1 t2 H3 t H4) \Rightarrow (\lambda (H5: (eq C c (CHead c1 k u))).(\lambda (H6: (eq T t1 t3)).(\lambda (H7: (eq T t t0)).(eq_ind C (CHead c1 k u) (\lambda (c0: C).((eq T t1 t3) \to ((eq T t t0) \to ((getl i c0 (CHead d (Bind Abbr) u0)) \to ((pr0 t1 t2) \to ((subst0 i u0 t2 t) \to (pc3 (CHead c2 k u) t3 t0))))))) (\lambda (H8: (eq T t1 t3)).(eq_ind T t3 (\lambda (t4: T).((eq T t t0) \to ((getl i (CHead c1 k u) (CHead d (Bind Abbr) u0)) \to ((pr0 t4 t2) \to ((subst0 i u0 t2 t) \to (pc3 (CHead c2 k u) t3 t0)))))) (\lambda (H9: (eq T t t0)).(eq_ind T t0 (\lambda (t4: T).((getl i (CHead c1 k u) (CHead d (Bind Abbr) u0)) \to ((pr0 t3 t2) \to ((subst0 i u0 t2 t4) \to (pc3 (CHead c2 k u) t3 t0))))) (\lambda (H10: (getl i (CHead c1 k u) (CHead d (Bind Abbr) u0))).(\lambda (H11: (pr0 t3 t2)).(\lambda (H12: (subst0 i u0 t2 t0)).(ex3_2_ind C T (\lambda (e2: C).(\lambda (u2: T).(getl i (CHead c2 k u) (CHead e2 (Bind Abbr) u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u0 u2))) (pc3 (CHead c2 k u) t3 t0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H0: (getl i (CHead c2 k u) (CHead x0 (Bind Abbr) x1))).(\lambda (_: (wcpr0 d x0)).(\lambda (H14: (pr0 u0 x1)).(ex2_ind T (\lambda (t0: T).(subst0 i x1 t2 t0)) (\lambda (t3: T).(pr0 t0 t3)) (pc3 (CHead c2 k u) t3 t0) (\lambda (x: T).(\lambda (H15: (subst0 i x1 t2 x)).(\lambda (H16: (pr0 t0 x)).(pc3_pr2_u (CHead c2 k u) x t3 (pr2_delta (CHead c2 k u) x0 x1 i H0 t3 t2 H11 x H15) t0 (pc3_pr2_x (CHead c2 k u) x t0 (pr2_free (CHead c2 k u) t0 x H16)))))) (pr0_subst0_fwd u0 t2 t0 i H12 x1 H14))))))) (wcpr0_getl (CHead c1 k u) (CHead c2 k u) (wcpr0_comp c1 c2 H u u (pr0_refl u) k) i d u0 (Bind Abbr) H10))))) t (sym_eq T t t0 H9))) t1 (sym_eq T t1 t3 H8))) c (sym_eq C c (CHead c1 k u) H5) H6 H7 H2 H3 H4))))]) in (H4 (refl_equal C (CHead c1 k u)) (refl_equal T t3) (refl_equal T t0))) t4 H3))))))) t1 t2 H0)))))))). theorem pc3_wcpr0_t: \forall (c1: C).(\forall (c2: C).((wcpr0 c1 c2) \to (\forall (t1: T).(\forall (t2: T).((pr3 c1 t1 t2) \to (pc3 c2 t1 t2)))))) @@ -2871,12 +2871,12 @@ theorem pc3_ind_left: theorem pc3_gen_sort: \forall (c: C).(\forall (m: nat).(\forall (n: nat).((pc3 c (TSort m) (TSort n)) \to (eq nat m n)))) \def - \lambda (c: C).(\lambda (m: nat).(\lambda (n: nat).(\lambda (H: (pc3 c (TSort m) (TSort n))).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr3 c (TSort m) t)) (\lambda (t: T).(pr3 c (TSort n) t)) (eq nat m n) (\lambda (x: T).(\lambda (H1: (pr3 c (TSort m) x)).(\lambda (H2: (pr3 c (TSort n) x)).(let H3 \def (eq_ind T x (\lambda (t: T).(eq T t (TSort n))) (pr3_gen_sort c x n H2) (TSort m) (pr3_gen_sort c x m H1)) in (let H4 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort n) \Rightarrow n | (TLRef _) \Rightarrow m | (THead _ _ _) \Rightarrow m])) (TSort m) (TSort n) H3) in H4))))) H0))))). + \lambda (c: C).(\lambda (m: nat).(\lambda (n: nat).(\lambda (H: (pc3 c (TSort m) (TSort n))).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr3 c (TSort m) t)) (\lambda (t: T).(pr3 c (TSort n) t)) (eq nat m n) (\lambda (x: T).(\lambda (H1: (pr3 c (TSort m) x)).(\lambda (H2: (pr3 c (TSort n) x)).(let H3 \def (eq_ind T x (\lambda (t: T).(eq T t (TSort n))) (pr3_gen_sort c x n H2) (TSort m) (pr3_gen_sort c x m H1)) in (let H4 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort n) \Rightarrow n | (TLRef _) \Rightarrow m | (THead _ _ _) \Rightarrow m])) (TSort m) (TSort n) H3) in H4))))) H0))))). theorem pc3_gen_abst: \forall (c: C).(\forall (u1: T).(\forall (u2: T).(\forall (t1: T).(\forall (t2: T).((pc3 c (THead (Bind Abst) u1 t1) (THead (Bind Abst) u2 t2)) \to (land (pc3 c u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) t1 t2))))))))) \def - \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c (THead (Bind Abst) u1 t1) (THead (Bind Abst) u2 t2))).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr3 c (THead (Bind Abst) u1 t1) t)) (\lambda (t: T).(pr3 c (THead (Bind Abst) u2 t2) t)) (land (pc3 c u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) t1 t2)))) (\lambda (x: T).(\lambda (H1: (pr3 c (THead (Bind Abst) u1 t1) x)).(\lambda (H2: (pr3 c (THead (Bind Abst) u2 t2) x)).(let H3 \def (pr3_gen_abst c u2 t2 x H2) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 t3))))) (land (pc3 c u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) t1 t2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T x (THead (Bind Abst) x0 x1))).(\lambda (H5: (pr3 c u2 x0)).(\lambda (H6: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 x1))))).(let H7 \def (pr3_gen_abst c u1 t1 x H1) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 t3))))) (land (pc3 c u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) t1 t2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H8: (eq T x (THead (Bind Abst) x2 x3))).(\lambda (H9: (pr3 c u1 x2)).(\lambda (H10: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 x3))))).(let H11 \def (eq_ind T x (\lambda (t: T).(eq T t (THead (Bind Abst) x0 x1))) H4 (THead (Bind Abst) x2 x3) H8) in (let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow x2 | (TLRef _) \Rightarrow x2 | (THead _ t _) \Rightarrow t])) (THead (Bind Abst) x2 x3) (THead (Bind Abst) x0 x1) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow x3 | (TLRef _) \Rightarrow x3 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abst) x2 x3) (THead (Bind Abst) x0 x1) H11) in (\lambda (H14: (eq T x2 x0)).(let H15 \def (eq_ind T x3 (\lambda (t: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 t)))) H10 x1 H13) in (let H16 \def (eq_ind T x2 (\lambda (t: T).(pr3 c u1 t)) H9 x0 H14) in (conj (pc3 c u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) t1 t2))) (pc3_pr3_t c u1 x0 H16 u2 H5) (\lambda (b: B).(\lambda (u: T).(pc3_pr3_t (CHead c (Bind b) u) t1 x1 (H15 b u) t2 (H6 b u))))))))) H12)))))))) H7))))))) H3))))) H0))))))). + \lambda (c: C).(\lambda (u1: T).(\lambda (u2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (pc3 c (THead (Bind Abst) u1 t1) (THead (Bind Abst) u2 t2))).(let H0 \def H in (ex2_ind T (\lambda (t: T).(pr3 c (THead (Bind Abst) u1 t1) t)) (\lambda (t: T).(pr3 c (THead (Bind Abst) u2 t2) t)) (land (pc3 c u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) t1 t2)))) (\lambda (x: T).(\lambda (H1: (pr3 c (THead (Bind Abst) u1 t1) x)).(\lambda (H2: (pr3 c (THead (Bind Abst) u2 t2) x)).(let H3 \def (pr3_gen_abst c u2 t2 x H2) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 t3))))) (land (pc3 c u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) t1 t2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H4: (eq T x (THead (Bind Abst) x0 x1))).(\lambda (H5: (pr3 c u2 x0)).(\lambda (H6: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 x1))))).(let H7 \def (pr3_gen_abst c u1 t1 x H1) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 t3))))) (land (pc3 c u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) t1 t2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H8: (eq T x (THead (Bind Abst) x2 x3))).(\lambda (H9: (pr3 c u1 x2)).(\lambda (H10: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 x3))))).(let H11 \def (eq_ind T x (\lambda (t: T).(eq T t (THead (Bind Abst) x0 x1))) H4 (THead (Bind Abst) x2 x3) H8) in (let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow x2 | (TLRef _) \Rightarrow x2 | (THead _ t _) \Rightarrow t])) (THead (Bind Abst) x2 x3) (THead (Bind Abst) x0 x1) H11) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow x3 | (TLRef _) \Rightarrow x3 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abst) x2 x3) (THead (Bind Abst) x0 x1) H11) in (\lambda (H14: (eq T x2 x0)).(let H15 \def (eq_ind T x3 (\lambda (t: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 t)))) H10 x1 H13) in (let H16 \def (eq_ind T x2 (\lambda (t: T).(pr3 c u1 t)) H9 x0 H14) in (conj (pc3 c u1 u2) (\forall (b: B).(\forall (u: T).(pc3 (CHead c (Bind b) u) t1 t2))) (pc3_pr3_t c u1 x0 H16 u2 H5) (\lambda (b: B).(\lambda (u: T).(pc3_pr3_t (CHead c (Bind b) u) t1 x1 (H15 b u) t2 (H6 b u))))))))) H12)))))))) H7))))))) H3))))) H0))))))). theorem pc3_gen_lift: \forall (c: C).(\forall (t1: T).(\forall (t2: T).(\forall (h: nat).(\forall (d: nat).((pc3 c (lift h d t1) (lift h d t2)) \to (\forall (e: C).((drop h d c e) \to (pc3 e t1 t2)))))))) @@ -2886,7 +2886,7 @@ theorem pc3_gen_lift: theorem pc3_gen_not_abst: \forall (b: B).((not (eq B b Abst)) \to (\forall (c: C).(\forall (t1: T).(\forall (t2: T).(\forall (u1: T).(\forall (u2: T).((pc3 c (THead (Bind b) u1 t1) (THead (Bind Abst) u2 t2)) \to (pc3 (CHead c (Bind b) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2)))))))))) \def - \lambda (b: B).(B_ind (\lambda (b0: B).((not (eq B b0 Abst)) \to (\forall (c: C).(\forall (t1: T).(\forall (t2: T).(\forall (u1: T).(\forall (u2: T).((pc3 c (THead (Bind b0) u1 t1) (THead (Bind Abst) u2 t2)) \to (pc3 (CHead c (Bind b0) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))))))))))) (\lambda (_: (not (eq B Abbr Abst))).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H0: (pc3 c (THead (Bind Abbr) u1 t1) (THead (Bind Abst) u2 t2))).(let H1 \def H0 in (ex2_ind T (\lambda (t: T).(pr3 c (THead (Bind Abbr) u1 t1) t)) (\lambda (t: T).(pr3 c (THead (Bind Abst) u2 t2) t)) (pc3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x: T).(\lambda (H2: (pr3 c (THead (Bind Abbr) u1 t1) x)).(\lambda (H3: (pr3 c (THead (Bind Abst) u2 t2) x)).(let H4 \def (pr3_gen_abbr c u1 t1 x H2) in (or_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr3 (CHead c (Bind Abbr) u1) t1 t3)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) (pc3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (H5: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr3 (CHead c (Bind Abbr) u1) t1 t3))) (pc3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T x (THead (Bind Abbr) x0 x1))).(\lambda (_: (pr3 c u1 x0)).(\lambda (_: (pr3 (CHead c (Bind Abbr) u1) t1 x1)).(let H9 \def (pr3_gen_abst c u2 t2 x H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t2 t3))))) (pc3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq T x (THead (Bind Abst) x2 x3))).(\lambda (_: (pr3 c u2 x2)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 x3))))).(let H13 \def (eq_ind T x (\lambda (t: T).(eq T t (THead (Bind Abbr) x0 x1))) H6 (THead (Bind Abst) x2 x3) H10) in (let H14 \def (eq_ind T (THead (Bind Abst) x2 x3) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Abbr) x0 x1) H13) in (False_ind (pc3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) H14)))))))) H9))))))) H5)) (\lambda (H5: (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x))).(let H6 \def (pr3_gen_abst c u2 t2 x H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t2 t3))))) (pc3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T x (THead (Bind Abst) x0 x1))).(\lambda (H8: (pr3 c u2 x0)).(\lambda (H9: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 x1))))).(let H10 \def (eq_ind T x (\lambda (t: T).(pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O t))) H5 (THead (Bind Abst) x0 x1) H7) in (pc3_pr3_t (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) x0 x1)) H10 (lift (S O) O (THead (Bind Abst) u2 t2)) (pr3_lift (CHead c (Bind Abbr) u1) c (S O) O (drop_drop (Bind Abbr) O c c (drop_refl c) u1) (THead (Bind Abst) u2 t2) (THead (Bind Abst) x0 x1) (pr3_head_12 c u2 x0 H8 (Bind Abst) t2 x1 (H9 Abst x0)))))))))) H6))) H4))))) H1))))))))) (\lambda (H: (not (eq B Abst Abst))).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pc3 c (THead (Bind Abst) u1 t1) (THead (Bind Abst) u2 t2))).(let H1 \def (match (H (refl_equal B Abst)) return (\lambda (_: ?).(pc3 (CHead c (Bind Abst) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2)))) with []) in H1)))))))) (\lambda (_: (not (eq B Void Abst))).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H0: (pc3 c (THead (Bind Void) u1 t1) (THead (Bind Abst) u2 t2))).(let H1 \def H0 in (ex2_ind T (\lambda (t: T).(pr3 c (THead (Bind Void) u1 t1) t)) (\lambda (t: T).(pr3 c (THead (Bind Abst) u2 t2) t)) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x: T).(\lambda (H2: (pr3 c (THead (Bind Void) u1 t1) x)).(\lambda (H3: (pr3 c (THead (Bind Abst) u2 t2) x)).(let H4 \def (pr3_gen_void c u1 t1 x H2) in (or_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t1 t3)))))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x)) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (H5: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 t2))))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t1 t3))))) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T x (THead (Bind Void) x0 x1))).(\lambda (_: (pr3 c u1 x0)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 x1))))).(let H9 \def (pr3_gen_abst c u2 t2 x H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t2 t3))))) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq T x (THead (Bind Abst) x2 x3))).(\lambda (_: (pr3 c u2 x2)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 x3))))).(let H13 \def (eq_ind T x (\lambda (t: T).(eq T t (THead (Bind Void) x0 x1))) H6 (THead (Bind Abst) x2 x3) H10) in (let H14 \def (eq_ind T (THead (Bind Abst) x2 x3) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Void) x0 x1) H13) in (False_ind (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) H14)))))))) H9))))))) H5)) (\lambda (H5: (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x))).(let H6 \def (pr3_gen_abst c u2 t2 x H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t2 t3))))) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T x (THead (Bind Abst) x0 x1))).(\lambda (H8: (pr3 c u2 x0)).(\lambda (H9: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 x1))))).(let H10 \def (eq_ind T x (\lambda (t: T).(pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O t))) H5 (THead (Bind Abst) x0 x1) H7) in (pc3_pr3_t (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) x0 x1)) H10 (lift (S O) O (THead (Bind Abst) u2 t2)) (pr3_lift (CHead c (Bind Void) u1) c (S O) O (drop_drop (Bind Void) O c c (drop_refl c) u1) (THead (Bind Abst) u2 t2) (THead (Bind Abst) x0 x1) (pr3_head_12 c u2 x0 H8 (Bind Abst) t2 x1 (H9 Abst x0)))))))))) H6))) H4))))) H1))))))))) b). + \lambda (b: B).(B_ind (\lambda (b0: B).((not (eq B b0 Abst)) \to (\forall (c: C).(\forall (t1: T).(\forall (t2: T).(\forall (u1: T).(\forall (u2: T).((pc3 c (THead (Bind b0) u1 t1) (THead (Bind Abst) u2 t2)) \to (pc3 (CHead c (Bind b0) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))))))))))) (\lambda (_: (not (eq B Abbr Abst))).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H0: (pc3 c (THead (Bind Abbr) u1 t1) (THead (Bind Abst) u2 t2))).(let H1 \def H0 in (ex2_ind T (\lambda (t: T).(pr3 c (THead (Bind Abbr) u1 t1) t)) (\lambda (t: T).(pr3 c (THead (Bind Abst) u2 t2) t)) (pc3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x: T).(\lambda (H2: (pr3 c (THead (Bind Abbr) u1 t1) x)).(\lambda (H3: (pr3 c (THead (Bind Abst) u2 t2) x)).(let H4 \def (pr3_gen_abbr c u1 t1 x H2) in (or_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr3 (CHead c (Bind Abbr) u1) t1 t3)))) (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x)) (pc3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (H5: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Abbr) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(pr3 (CHead c (Bind Abbr) u1) t1 t2))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abbr) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(pr3 (CHead c (Bind Abbr) u1) t1 t3))) (pc3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T x (THead (Bind Abbr) x0 x1))).(\lambda (_: (pr3 c u1 x0)).(\lambda (_: (pr3 (CHead c (Bind Abbr) u1) t1 x1)).(let H9 \def (pr3_gen_abst c u2 t2 x H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t2 t3))))) (pc3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq T x (THead (Bind Abst) x2 x3))).(\lambda (_: (pr3 c u2 x2)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 x3))))).(let H13 \def (eq_ind T x (\lambda (t: T).(eq T t (THead (Bind Abbr) x0 x1))) H6 (THead (Bind Abst) x2 x3) H10) in (let H14 \def (eq_ind T (THead (Bind Abst) x2 x3) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Abbr) x0 x1) H13) in (False_ind (pc3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) H14)))))))) H9))))))) H5)) (\lambda (H5: (pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O x))).(let H6 \def (pr3_gen_abst c u2 t2 x H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t2 t3))))) (pc3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T x (THead (Bind Abst) x0 x1))).(\lambda (H8: (pr3 c u2 x0)).(\lambda (H9: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 x1))))).(let H10 \def (eq_ind T x (\lambda (t: T).(pr3 (CHead c (Bind Abbr) u1) t1 (lift (S O) O t))) H5 (THead (Bind Abst) x0 x1) H7) in (pc3_pr3_t (CHead c (Bind Abbr) u1) t1 (lift (S O) O (THead (Bind Abst) x0 x1)) H10 (lift (S O) O (THead (Bind Abst) u2 t2)) (pr3_lift (CHead c (Bind Abbr) u1) c (S O) O (drop_drop (Bind Abbr) O c c (drop_refl c) u1) (THead (Bind Abst) u2 t2) (THead (Bind Abst) x0 x1) (pr3_head_12 c u2 x0 H8 (Bind Abst) t2 x1 (H9 Abst x0)))))))))) H6))) H4))))) H1))))))))) (\lambda (H: (not (eq B Abst Abst))).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (_: (pc3 c (THead (Bind Abst) u1 t1) (THead (Bind Abst) u2 t2))).(let H1 \def (match (H (refl_equal B Abst)) return (\lambda (_: False).(pc3 (CHead c (Bind Abst) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2)))) with []) in H1)))))))) (\lambda (_: (not (eq B Void Abst))).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (H0: (pc3 c (THead (Bind Void) u1 t1) (THead (Bind Abst) u2 t2))).(let H1 \def H0 in (ex2_ind T (\lambda (t: T).(pr3 c (THead (Bind Void) u1 t1) t)) (\lambda (t: T).(pr3 c (THead (Bind Abst) u2 t2) t)) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x: T).(\lambda (H2: (pr3 c (THead (Bind Void) u1 t1) x)).(\lambda (H3: (pr3 c (THead (Bind Abst) u2 t2) x)).(let H4 \def (pr3_gen_void c u1 t1 x H2) in (or_ind (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t1 t3)))))) (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x)) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (H5: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead (Bind Void) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(pr3 c u1 u2))) (\lambda (_: T).(\lambda (t2: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 t2))))))).(ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Void) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u1 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t1 t3))))) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H6: (eq T x (THead (Bind Void) x0 x1))).(\lambda (_: (pr3 c u1 x0)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t1 x1))))).(let H9 \def (pr3_gen_abst c u2 t2 x H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t2 t3))))) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq T x (THead (Bind Abst) x2 x3))).(\lambda (_: (pr3 c u2 x2)).(\lambda (_: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 x3))))).(let H13 \def (eq_ind T x (\lambda (t: T).(eq T t (THead (Bind Void) x0 x1))) H6 (THead (Bind Abst) x2 x3) H10) in (let H14 \def (eq_ind T (THead (Bind Abst) x2 x3) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (THead (Bind Void) x0 x1) H13) in (False_ind (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) H14)))))))) H9))))))) H5)) (\lambda (H5: (pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O x))).(let H6 \def (pr3_gen_abst c u2 t2 x H3) in (ex3_2_ind T T (\lambda (u3: T).(\lambda (t3: T).(eq T x (THead (Bind Abst) u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(pr3 c u2 u3))) (\lambda (_: T).(\lambda (t3: T).(\forall (b0: B).(\forall (u: T).(pr3 (CHead c (Bind b0) u) t2 t3))))) (pc3 (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) u2 t2))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T x (THead (Bind Abst) x0 x1))).(\lambda (H8: (pr3 c u2 x0)).(\lambda (H9: ((\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 x1))))).(let H10 \def (eq_ind T x (\lambda (t: T).(pr3 (CHead c (Bind Void) u1) t1 (lift (S O) O t))) H5 (THead (Bind Abst) x0 x1) H7) in (pc3_pr3_t (CHead c (Bind Void) u1) t1 (lift (S O) O (THead (Bind Abst) x0 x1)) H10 (lift (S O) O (THead (Bind Abst) u2 t2)) (pr3_lift (CHead c (Bind Void) u1) c (S O) O (drop_drop (Bind Void) O c c (drop_refl c) u1) (THead (Bind Abst) u2 t2) (THead (Bind Abst) x0 x1) (pr3_head_12 c u2 x0 H8 (Bind Abst) t2 x1 (H9 Abst x0)))))))))) H6))) H4))))) H1))))))))) b). theorem pc3_gen_lift_abst: \forall (c: C).(\forall (t: T).(\forall (t2: T).(\forall (u2: T).(\forall (h: nat).(\forall (d: nat).((pc3 c (lift h d t) (THead (Bind Abst) u2 t2)) \to (\forall (e: C).((drop h d c e) \to (ex3_2 T T (\lambda (u1: T).(\lambda (t1: T).(pr3 e t (THead (Bind Abst) u1 t1)))) (\lambda (u1: T).(\lambda (_: T).(pr3 c u2 (lift h d u1)))) (\lambda (_: T).(\lambda (t1: T).(\forall (b: B).(\forall (u: T).(pr3 (CHead c (Bind b) u) t2 (lift h (S d) t1))))))))))))))) @@ -2896,12 +2896,12 @@ theorem pc3_gen_lift_abst: theorem pc3_pr2_fsubst0: \forall (c1: C).(\forall (t1: T).(\forall (t: T).((pr2 c1 t1 t) \to (\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u c1 t1 c2 t2) \to (\forall (e: C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 c2 t2 t))))))))))) \def - \lambda (c1: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: (pr2 c1 t1 t)).(pr2_ind (\lambda (c: C).(\lambda (t0: T).(\lambda (t2: T).(\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c t0 c2 t3) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (pc3 c2 t3 t2))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: (pr0 t2 t3)).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t0: T).(\lambda (H1: (fsubst0 i u c t2 c2 t0)).(fsubst0_ind i u c t2 (\lambda (c0: C).(\lambda (t4: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (pc3 c0 t4 t3))))) (\lambda (t4: T).(\lambda (H2: (subst0 i u t2 t4)).(\lambda (e: C).(\lambda (H3: (getl i c (CHead e (Bind Abbr) u))).(or_ind (pr0 t4 t3) (ex2 T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2))) (pc3 c t4 t3) (\lambda (H4: (pr0 t4 t3)).(pc3_pr2_r c t4 t3 (pr2_free c t4 t3 H4))) (\lambda (H4: (ex2 T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2)) (pc3 c t4 t3) (\lambda (x: T).(\lambda (H5: (pr0 t4 x)).(\lambda (H6: (subst0 i u t3 x)).(pc3_pr2_u c x t4 (pr2_free c t4 x H5) t3 (pc3_pr2_x c x t3 (pr2_delta c e u i H3 t3 t3 (pr0_refl t3) x H6)))))) H4)) (pr0_subst0 t2 t3 H0 u t4 i H2 u (pr0_refl u))))))) (\lambda (c0: C).(\lambda (_: (csubst0 i u c c0)).(\lambda (e: C).(\lambda (_: (getl i c (CHead e (Bind Abbr) u))).(pc3_pr2_r c0 t2 t3 (pr2_free c0 t2 t3 H0)))))) (\lambda (t4: T).(\lambda (H2: (subst0 i u t2 t4)).(\lambda (c0: C).(\lambda (H3: (csubst0 i u c c0)).(\lambda (e: C).(\lambda (H4: (getl i c (CHead e (Bind Abbr) u))).(or_ind (pr0 t4 t3) (ex2 T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2))) (pc3 c0 t4 t3) (\lambda (H5: (pr0 t4 t3)).(pc3_pr2_r c0 t4 t3 (pr2_free c0 t4 t3 H5))) (\lambda (H5: (ex2 T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2)) (pc3 c0 t4 t3) (\lambda (x: T).(\lambda (H6: (pr0 t4 x)).(\lambda (H7: (subst0 i u t3 x)).(pc3_pr2_u c0 x t4 (pr2_free c0 t4 x H6) t3 (pc3_pr2_x c0 x t3 (pr2_delta c0 e u i (csubst0_getl_ge i i (le_n i) c c0 u H3 (CHead e (Bind Abbr) u) H4) t3 t3 (pr0_refl t3) x H7)))))) H5)) (pr0_subst0 t2 t3 H0 u t4 i H2 u (pr0_refl u))))))))) c2 t0 H1)))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H1: (pr0 t2 t3)).(\lambda (t0: T).(\lambda (H2: (subst0 i u t3 t0)).(\lambda (i0: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t4: T).(\lambda (H3: (fsubst0 i0 u0 c t2 c2 t4)).(fsubst0_ind i0 u0 c t2 (\lambda (c0: C).(\lambda (t5: T).(\forall (e: C).((getl i0 c (CHead e (Bind Abbr) u0)) \to (pc3 c0 t5 t0))))) (\lambda (t5: T).(\lambda (H4: (subst0 i0 u0 t2 t5)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) u0))).(pc3_t t2 c t5 (pc3_s c t5 t2 (pc3_pr2_r c t2 t5 (pr2_delta c e u0 i0 H5 t2 t2 (pr0_refl t2) t5 H4))) t0 (pc3_pr2_r c t2 t0 (pr2_delta c d u i H0 t2 t3 H1 t0 H2))))))) (\lambda (c0: C).(\lambda (H4: (csubst0 i0 u0 c c0)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) u0))).(lt_le_e i i0 (pc3 c0 t2 t0) (\lambda (H6: (lt i i0)).(let H7 \def (csubst0_getl_lt i0 i H6 c c0 u0 H4 (CHead d (Bind Abbr) u) H0) in (or4_ind (getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (pc3 c0 t2 t0) (\lambda (H8: (getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i H8 t2 t3 H1 t0 H2))) (\lambda (H8: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u0)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H10: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda (H11: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H11 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(getl i c0 (CHead c (Bind x0) x3))) H10 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H18 Abbr H15) in (ex2_ind T (\lambda (t5: T).(subst0 i x3 t3 t5)) (\lambda (t5: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda (H20: (subst0 i x3 t3 x)).(\lambda (H21: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H22 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H21 i0 (lt_plus_minus_r i i0 H6)) in (pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H19 t2 t3 H1 x H20) t0 (pc3_pr2_x c0 x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead e (Bind Abbr) u0) H5) t0 t0 (pr0_refl t0) x H22))))))) (subst0_subst0_back t3 t0 u i H2 x3 u0 (minus i0 (S i)) H17)))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl i c0 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) x3))).(\lambda (H11: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c0 (CHead x2 (Bind x0) t))) H10 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H11 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) u))) H17 Abbr H15) in (pc3_pr2_r c0 t2 t0 (pr2_delta c0 x2 u i H19 t2 t3 H1 t0 H2)))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 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 (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) x4))).(\lambda (H11: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x4)) H11 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) x4))) H10 Abbr H16) in (ex2_ind T (\lambda (t5: T).(subst0 i x4 t3 t5)) (\lambda (t5: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda (H21: (subst0 i x4 t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H6)) in (pc3_pr2_u c0 x t2 (pr2_delta c0 x2 x4 i H20 t2 t3 H1 x H21) t0 (pc3_pr2_x c0 x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead e (Bind Abbr) u0) H5) t0 t0 (pr0_refl t0) x H23))))))) (subst0_subst0_back t3 t0 u i H2 x4 u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))))) H8)) H7))) (\lambda (H6: (le i0 i)).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i (csubst0_getl_ge i0 i H6 c c0 u0 H4 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 H2)))))))) (\lambda (t5: T).(\lambda (H4: (subst0 i0 u0 t2 t5)).(\lambda (c0: C).(\lambda (H5: (csubst0 i0 u0 c c0)).(\lambda (e: C).(\lambda (H6: (getl i0 c (CHead e (Bind Abbr) u0))).(lt_le_e i i0 (pc3 c0 t5 t0) (\lambda (H7: (lt i i0)).(let H8 \def (csubst0_getl_lt i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) in (or4_ind (getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (pc3 c0 t5 t0) (\lambda (H9: (getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i H9 t2 t3 H1 t0 H2)))) (\lambda (H9: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u0)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) (pc3 c0 t5 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H11: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda (H12: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H12 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(getl i c0 (CHead c (Bind x0) x3))) H11 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H19 Abbr H16) in (ex2_ind T (\lambda (t6: T).(subst0 i x3 t3 t6)) (\lambda (t6: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t6)) (pc3 c0 t5 t0) (\lambda (x: T).(\lambda (H21: (subst0 i x3 t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H7)) in (pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H20 t2 t3 H1 x H21) t0 (pc3_pr2_x c0 x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H23)))))))) (subst0_subst0_back t3 t0 u i H2 x3 u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))) H9)) (\lambda (H9: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl i c0 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (pc3 c0 t5 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H11: (getl i c0 (CHead x2 (Bind x0) x3))).(\lambda (H12: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c0 (CHead x2 (Bind x0) t))) H11 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) u))) H18 Abbr H16) in (pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_r c0 t2 t0 (pr2_delta c0 x2 u i H20 t2 t3 H1 t0 H2))))))))) H14)) H13))))))))) H9)) (\lambda (H9: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 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 (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (pc3 c0 t5 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H11: (getl i c0 (CHead x2 (Bind x0) x4))).(\lambda (H12: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H13: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H14 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H15 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H16 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in (\lambda (H17: (eq B Abbr x0)).(\lambda (H18: (eq C d x1)).(let H19 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x4)) H12 u H16) in (let H20 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H13 d H18) in (let H21 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) x4))) H11 Abbr H17) in (ex2_ind T (\lambda (t6: T).(subst0 i x4 t3 t6)) (\lambda (t6: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t6)) (pc3 c0 t5 t0) (\lambda (x: T).(\lambda (H22: (subst0 i x4 t3 x)).(\lambda (H23: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H24 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H23 i0 (lt_plus_minus_r i i0 H7)) in (pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_u c0 x t2 (pr2_delta c0 x2 x4 i H21 t2 t3 H1 x H22) t0 (pc3_pr2_x c0 x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H24)))))))) (subst0_subst0_back t3 t0 u i H2 x4 u0 (minus i0 (S i)) H19)))))))) H15)) H14))))))))))) H9)) H8))) (\lambda (H7: (le i0 i)).(pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i (csubst0_getl_ge i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 H2))))))))))) c2 t4 H3)))))))))))))))) c1 t1 t H)))). + \lambda (c1: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: (pr2 c1 t1 t)).(pr2_ind (\lambda (c: C).(\lambda (t0: T).(\lambda (t2: T).(\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c t0 c2 t3) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (pc3 c2 t3 t2))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: (pr0 t2 t3)).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t0: T).(\lambda (H1: (fsubst0 i u c t2 c2 t0)).(fsubst0_ind i u c t2 (\lambda (c0: C).(\lambda (t4: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (pc3 c0 t4 t3))))) (\lambda (t4: T).(\lambda (H2: (subst0 i u t2 t4)).(\lambda (e: C).(\lambda (H3: (getl i c (CHead e (Bind Abbr) u))).(or_ind (pr0 t4 t3) (ex2 T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2))) (pc3 c t4 t3) (\lambda (H4: (pr0 t4 t3)).(pc3_pr2_r c t4 t3 (pr2_free c t4 t3 H4))) (\lambda (H4: (ex2 T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2)) (pc3 c t4 t3) (\lambda (x: T).(\lambda (H5: (pr0 t4 x)).(\lambda (H6: (subst0 i u t3 x)).(pc3_pr2_u c x t4 (pr2_free c t4 x H5) t3 (pc3_pr2_x c x t3 (pr2_delta c e u i H3 t3 t3 (pr0_refl t3) x H6)))))) H4)) (pr0_subst0 t2 t3 H0 u t4 i H2 u (pr0_refl u))))))) (\lambda (c0: C).(\lambda (_: (csubst0 i u c c0)).(\lambda (e: C).(\lambda (_: (getl i c (CHead e (Bind Abbr) u))).(pc3_pr2_r c0 t2 t3 (pr2_free c0 t2 t3 H0)))))) (\lambda (t4: T).(\lambda (H2: (subst0 i u t2 t4)).(\lambda (c0: C).(\lambda (H3: (csubst0 i u c c0)).(\lambda (e: C).(\lambda (H4: (getl i c (CHead e (Bind Abbr) u))).(or_ind (pr0 t4 t3) (ex2 T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2))) (pc3 c0 t4 t3) (\lambda (H5: (pr0 t4 t3)).(pc3_pr2_r c0 t4 t3 (pr2_free c0 t4 t3 H5))) (\lambda (H5: (ex2 T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2)))).(ex2_ind T (\lambda (w2: T).(pr0 t4 w2)) (\lambda (w2: T).(subst0 i u t3 w2)) (pc3 c0 t4 t3) (\lambda (x: T).(\lambda (H6: (pr0 t4 x)).(\lambda (H7: (subst0 i u t3 x)).(pc3_pr2_u c0 x t4 (pr2_free c0 t4 x H6) t3 (pc3_pr2_x c0 x t3 (pr2_delta c0 e u i (csubst0_getl_ge i i (le_n i) c c0 u H3 (CHead e (Bind Abbr) u) H4) t3 t3 (pr0_refl t3) x H7)))))) H5)) (pr0_subst0 t2 t3 H0 u t4 i H2 u (pr0_refl u))))))))) c2 t0 H1)))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H1: (pr0 t2 t3)).(\lambda (t0: T).(\lambda (H2: (subst0 i u t3 t0)).(\lambda (i0: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t4: T).(\lambda (H3: (fsubst0 i0 u0 c t2 c2 t4)).(fsubst0_ind i0 u0 c t2 (\lambda (c0: C).(\lambda (t5: T).(\forall (e: C).((getl i0 c (CHead e (Bind Abbr) u0)) \to (pc3 c0 t5 t0))))) (\lambda (t5: T).(\lambda (H4: (subst0 i0 u0 t2 t5)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) u0))).(pc3_t t2 c t5 (pc3_s c t5 t2 (pc3_pr2_r c t2 t5 (pr2_delta c e u0 i0 H5 t2 t2 (pr0_refl t2) t5 H4))) t0 (pc3_pr2_r c t2 t0 (pr2_delta c d u i H0 t2 t3 H1 t0 H2))))))) (\lambda (c0: C).(\lambda (H4: (csubst0 i0 u0 c c0)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) u0))).(lt_le_e i i0 (pc3 c0 t2 t0) (\lambda (H6: (lt i i0)).(let H7 \def (csubst0_getl_lt i0 i H6 c c0 u0 H4 (CHead d (Bind Abbr) u) H0) in (or4_ind (getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (pc3 c0 t2 t0) (\lambda (H8: (getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i H8 t2 t3 H1 t0 H2))) (\lambda (H8: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u0)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H10: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda (H11: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H11 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(getl i c0 (CHead c (Bind x0) x3))) H10 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H18 Abbr H15) in (ex2_ind T (\lambda (t5: T).(subst0 i x3 t3 t5)) (\lambda (t5: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda (H20: (subst0 i x3 t3 x)).(\lambda (H21: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H22 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H21 i0 (lt_plus_minus_r i i0 H6)) in (pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H19 t2 t3 H1 x H20) t0 (pc3_pr2_x c0 x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead e (Bind Abbr) u0) H5) t0 t0 (pr0_refl t0) x H22))))))) (subst0_subst0_back t3 t0 u i H2 x3 u0 (minus i0 (S i)) H17)))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl i c0 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) x3))).(\lambda (H11: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c0 (CHead x2 (Bind x0) t))) H10 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H11 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) u))) H17 Abbr H15) in (pc3_pr2_r c0 t2 t0 (pr2_delta c0 x2 u i H19 t2 t3 H1 t0 H2)))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 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 (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) x4))).(\lambda (H11: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x4)) H11 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) x4))) H10 Abbr H16) in (ex2_ind T (\lambda (t5: T).(subst0 i x4 t3 t5)) (\lambda (t5: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda (H21: (subst0 i x4 t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H6)) in (pc3_pr2_u c0 x t2 (pr2_delta c0 x2 x4 i H20 t2 t3 H1 x H21) t0 (pc3_pr2_x c0 x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead e (Bind Abbr) u0) H5) t0 t0 (pr0_refl t0) x H23))))))) (subst0_subst0_back t3 t0 u i H2 x4 u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))))) H8)) H7))) (\lambda (H6: (le i0 i)).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i (csubst0_getl_ge i0 i H6 c c0 u0 H4 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 H2)))))))) (\lambda (t5: T).(\lambda (H4: (subst0 i0 u0 t2 t5)).(\lambda (c0: C).(\lambda (H5: (csubst0 i0 u0 c c0)).(\lambda (e: C).(\lambda (H6: (getl i0 c (CHead e (Bind Abbr) u0))).(lt_le_e i i0 (pc3 c0 t5 t0) (\lambda (H7: (lt i i0)).(let H8 \def (csubst0_getl_lt i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) in (or4_ind (getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (pc3 c0 t5 t0) (\lambda (H9: (getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i H9 t2 t3 H1 t0 H2)))) (\lambda (H9: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u0)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) (pc3 c0 t5 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H11: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda (H12: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H12 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(getl i c0 (CHead c (Bind x0) x3))) H11 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H19 Abbr H16) in (ex2_ind T (\lambda (t6: T).(subst0 i x3 t3 t6)) (\lambda (t6: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t6)) (pc3 c0 t5 t0) (\lambda (x: T).(\lambda (H21: (subst0 i x3 t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H7)) in (pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H20 t2 t3 H1 x H21) t0 (pc3_pr2_x c0 x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H23)))))))) (subst0_subst0_back t3 t0 u i H2 x3 u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))) H9)) (\lambda (H9: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl i c0 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (pc3 c0 t5 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H11: (getl i c0 (CHead x2 (Bind x0) x3))).(\lambda (H12: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c0 (CHead x2 (Bind x0) t))) H11 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) u))) H18 Abbr H16) in (pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_r c0 t2 t0 (pr2_delta c0 x2 u i H20 t2 t3 H1 t0 H2))))))))) H14)) H13))))))))) H9)) (\lambda (H9: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 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 (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (pc3 c0 t5 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H11: (getl i c0 (CHead x2 (Bind x0) x4))).(\lambda (H12: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H13: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H14 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H15 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H16 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in (\lambda (H17: (eq B Abbr x0)).(\lambda (H18: (eq C d x1)).(let H19 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x4)) H12 u H16) in (let H20 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H13 d H18) in (let H21 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) x4))) H11 Abbr H17) in (ex2_ind T (\lambda (t6: T).(subst0 i x4 t3 t6)) (\lambda (t6: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t6)) (pc3 c0 t5 t0) (\lambda (x: T).(\lambda (H22: (subst0 i x4 t3 x)).(\lambda (H23: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H24 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H23 i0 (lt_plus_minus_r i i0 H7)) in (pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_u c0 x t2 (pr2_delta c0 x2 x4 i H21 t2 t3 H1 x H22) t0 (pc3_pr2_x c0 x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H24)))))))) (subst0_subst0_back t3 t0 u i H2 x4 u0 (minus i0 (S i)) H19)))))))) H15)) H14))))))))))) H9)) H8))) (\lambda (H7: (le i0 i)).(pc3_pr2_u2 c0 t2 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t2 t2 (pr0_refl t2) t5 H4) t0 (pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i (csubst0_getl_ge i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 H2))))))))))) c2 t4 H3)))))))))))))))) c1 t1 t H)))). theorem pc3_pr2_fsubst0_back: \forall (c1: C).(\forall (t: T).(\forall (t1: T).((pr2 c1 t t1) \to (\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u c1 t1 c2 t2) \to (\forall (e: C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 c2 t t2))))))))))) \def - \lambda (c1: C).(\lambda (t: T).(\lambda (t1: T).(\lambda (H: (pr2 c1 t t1)).(pr2_ind (\lambda (c: C).(\lambda (t0: T).(\lambda (t2: T).(\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c t2 c2 t3) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (pc3 c2 t0 t3))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: (pr0 t2 t3)).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t0: T).(\lambda (H1: (fsubst0 i u c t3 c2 t0)).(fsubst0_ind i u c t3 (\lambda (c0: C).(\lambda (t4: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (pc3 c0 t2 t4))))) (\lambda (t4: T).(\lambda (H2: (subst0 i u t3 t4)).(\lambda (e: C).(\lambda (H3: (getl i c (CHead e (Bind Abbr) u))).(pc3_pr2_u c t3 t2 (pr2_free c t2 t3 H0) t4 (pc3_pr2_r c t3 t4 (pr2_delta c e u i H3 t3 t3 (pr0_refl t3) t4 H2))))))) (\lambda (c0: C).(\lambda (_: (csubst0 i u c c0)).(\lambda (e: C).(\lambda (_: (getl i c (CHead e (Bind Abbr) u))).(pc3_pr2_r c0 t2 t3 (pr2_free c0 t2 t3 H0)))))) (\lambda (t4: T).(\lambda (H2: (subst0 i u t3 t4)).(\lambda (c0: C).(\lambda (H3: (csubst0 i u c c0)).(\lambda (e: C).(\lambda (H4: (getl i c (CHead e (Bind Abbr) u))).(pc3_pr2_u c0 t3 t2 (pr2_free c0 t2 t3 H0) t4 (pc3_pr2_r c0 t3 t4 (pr2_delta c0 e u i (csubst0_getl_ge i i (le_n i) c c0 u H3 (CHead e (Bind Abbr) u) H4) t3 t3 (pr0_refl t3) t4 H2))))))))) c2 t0 H1)))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H1: (pr0 t2 t3)).(\lambda (t0: T).(\lambda (H2: (subst0 i u t3 t0)).(\lambda (i0: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t4: T).(\lambda (H3: (fsubst0 i0 u0 c t0 c2 t4)).(fsubst0_ind i0 u0 c t0 (\lambda (c0: C).(\lambda (t5: T).(\forall (e: C).((getl i0 c (CHead e (Bind Abbr) u0)) \to (pc3 c0 t2 t5))))) (\lambda (t5: T).(\lambda (H4: (subst0 i0 u0 t0 t5)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) u0))).(pc3_t t3 c t2 (pc3_pr3_r c t2 t3 (pr3_pr2 c t2 t3 (pr2_free c t2 t3 H1))) t5 (pc3_pr3_r c t3 t5 (pr3_sing c t0 t3 (pr2_delta c d u i H0 t3 t3 (pr0_refl t3) t0 H2) t5 (pr3_pr2 c t0 t5 (pr2_delta c e u0 i0 H5 t0 t0 (pr0_refl t0) t5 H4))))))))) (\lambda (c0: C).(\lambda (H4: (csubst0 i0 u0 c c0)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) u0))).(lt_le_e i i0 (pc3 c0 t2 t0) (\lambda (H6: (lt i i0)).(let H7 \def (csubst0_getl_lt i0 i H6 c c0 u0 H4 (CHead d (Bind Abbr) u) H0) in (or4_ind (getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (pc3 c0 t2 t0) (\lambda (H8: (getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i H8 t2 t3 H1 t0 H2))) (\lambda (H8: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u0)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H10: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda (H11: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H11 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(getl i c0 (CHead c (Bind x0) x3))) H10 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H18 Abbr H15) in (ex2_ind T (\lambda (t5: T).(subst0 i x3 t3 t5)) (\lambda (t5: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda (H20: (subst0 i x3 t3 x)).(\lambda (H21: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H22 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H21 i0 (lt_plus_minus_r i i0 H6)) in (pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H19 t2 t3 H1 x H20) t0 (pc3_pr2_x c0 x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead e (Bind Abbr) u0) H5) t0 t0 (pr0_refl t0) x H22))))))) (subst0_subst0_back t3 t0 u i H2 x3 u0 (minus i0 (S i)) H17)))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl i c0 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) x3))).(\lambda (H11: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c0 (CHead x2 (Bind x0) t))) H10 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H11 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) u))) H17 Abbr H15) in (pc3_pr2_r c0 t2 t0 (pr2_delta c0 x2 u i H19 t2 t3 H1 t0 H2)))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 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 (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) x4))).(\lambda (H11: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x4)) H11 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) x4))) H10 Abbr H16) in (ex2_ind T (\lambda (t5: T).(subst0 i x4 t3 t5)) (\lambda (t5: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda (H21: (subst0 i x4 t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H6)) in (pc3_pr2_u c0 x t2 (pr2_delta c0 x2 x4 i H20 t2 t3 H1 x H21) t0 (pc3_pr2_x c0 x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead e (Bind Abbr) u0) H5) t0 t0 (pr0_refl t0) x H23))))))) (subst0_subst0_back t3 t0 u i H2 x4 u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))))) H8)) H7))) (\lambda (H6: (le i0 i)).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i (csubst0_getl_ge i0 i H6 c c0 u0 H4 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 H2)))))))) (\lambda (t5: T).(\lambda (H4: (subst0 i0 u0 t0 t5)).(\lambda (c0: C).(\lambda (H5: (csubst0 i0 u0 c c0)).(\lambda (e: C).(\lambda (H6: (getl i0 c (CHead e (Bind Abbr) u0))).(lt_le_e i i0 (pc3 c0 t2 t5) (\lambda (H7: (lt i i0)).(let H8 \def (csubst0_getl_lt i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) in (or4_ind (getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (pc3 c0 t2 t5) (\lambda (H9: (getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_u c0 t3 t2 (pr2_free c0 t2 t3 H1) t5 (pc3_pr3_r c0 t3 t5 (pr3_sing c0 t0 t3 (pr2_delta c0 d u i H9 t3 t3 (pr0_refl t3) t0 H2) t5 (pr3_pr2 c0 t0 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4)))))) (\lambda (H9: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u0)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) (pc3 c0 t2 t5) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H11: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda (H12: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H12 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(getl i c0 (CHead c (Bind x0) x3))) H11 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H19 Abbr H16) in (ex2_ind T (\lambda (t6: T).(subst0 i x3 t3 t6)) (\lambda (t6: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t6)) (pc3 c0 t2 t5) (\lambda (x: T).(\lambda (H21: (subst0 i x3 t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H7)) in (pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H20 t2 t3 H1 x H21) t5 (pc3_pr2_u2 c0 t0 x (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H23) t5 (pc3_pr2_r c0 t0 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4)))))))) (subst0_subst0_back t3 t0 u i H2 x3 u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))) H9)) (\lambda (H9: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl i c0 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (pc3 c0 t2 t5) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H11: (getl i c0 (CHead x2 (Bind x0) x3))).(\lambda (H12: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c0 (CHead x2 (Bind x0) t))) H11 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) u))) H18 Abbr H16) in (pc3_pr2_u c0 t0 t2 (pr2_delta c0 x2 u i H20 t2 t3 H1 t0 H2) t5 (pc3_pr2_r c0 t0 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4))))))))) H14)) H13))))))))) H9)) (\lambda (H9: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 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 (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (pc3 c0 t2 t5) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H11: (getl i c0 (CHead x2 (Bind x0) x4))).(\lambda (H12: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H13: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H14 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H15 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H16 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in (\lambda (H17: (eq B Abbr x0)).(\lambda (H18: (eq C d x1)).(let H19 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x4)) H12 u H16) in (let H20 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H13 d H18) in (let H21 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) x4))) H11 Abbr H17) in (ex2_ind T (\lambda (t6: T).(subst0 i x4 t3 t6)) (\lambda (t6: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t6)) (pc3 c0 t2 t5) (\lambda (x: T).(\lambda (H22: (subst0 i x4 t3 x)).(\lambda (H23: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H24 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H23 i0 (lt_plus_minus_r i i0 H7)) in (pc3_pr2_u c0 x t2 (pr2_delta c0 x2 x4 i H21 t2 t3 H1 x H22) t5 (pc3_pr2_u2 c0 t0 x (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H24) t5 (pc3_pr2_r c0 t0 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4)))))))) (subst0_subst0_back t3 t0 u i H2 x4 u0 (minus i0 (S i)) H19)))))))) H15)) H14))))))))))) H9)) H8))) (\lambda (H7: (le i0 i)).(pc3_pr2_u c0 t0 t2 (pr2_delta c0 d u i (csubst0_getl_ge i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 H2) t5 (pc3_pr2_r c0 t0 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4))))))))))) c2 t4 H3)))))))))))))))) c1 t t1 H)))). + \lambda (c1: C).(\lambda (t: T).(\lambda (t1: T).(\lambda (H: (pr2 c1 t t1)).(pr2_ind (\lambda (c: C).(\lambda (t0: T).(\lambda (t2: T).(\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c t2 c2 t3) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (pc3 c2 t0 t3))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: (pr0 t2 t3)).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t0: T).(\lambda (H1: (fsubst0 i u c t3 c2 t0)).(fsubst0_ind i u c t3 (\lambda (c0: C).(\lambda (t4: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (pc3 c0 t2 t4))))) (\lambda (t4: T).(\lambda (H2: (subst0 i u t3 t4)).(\lambda (e: C).(\lambda (H3: (getl i c (CHead e (Bind Abbr) u))).(pc3_pr2_u c t3 t2 (pr2_free c t2 t3 H0) t4 (pc3_pr2_r c t3 t4 (pr2_delta c e u i H3 t3 t3 (pr0_refl t3) t4 H2))))))) (\lambda (c0: C).(\lambda (_: (csubst0 i u c c0)).(\lambda (e: C).(\lambda (_: (getl i c (CHead e (Bind Abbr) u))).(pc3_pr2_r c0 t2 t3 (pr2_free c0 t2 t3 H0)))))) (\lambda (t4: T).(\lambda (H2: (subst0 i u t3 t4)).(\lambda (c0: C).(\lambda (H3: (csubst0 i u c c0)).(\lambda (e: C).(\lambda (H4: (getl i c (CHead e (Bind Abbr) u))).(pc3_pr2_u c0 t3 t2 (pr2_free c0 t2 t3 H0) t4 (pc3_pr2_r c0 t3 t4 (pr2_delta c0 e u i (csubst0_getl_ge i i (le_n i) c c0 u H3 (CHead e (Bind Abbr) u) H4) t3 t3 (pr0_refl t3) t4 H2))))))))) c2 t0 H1)))))))))) (\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c (CHead d (Bind Abbr) u))).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H1: (pr0 t2 t3)).(\lambda (t0: T).(\lambda (H2: (subst0 i u t3 t0)).(\lambda (i0: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t4: T).(\lambda (H3: (fsubst0 i0 u0 c t0 c2 t4)).(fsubst0_ind i0 u0 c t0 (\lambda (c0: C).(\lambda (t5: T).(\forall (e: C).((getl i0 c (CHead e (Bind Abbr) u0)) \to (pc3 c0 t2 t5))))) (\lambda (t5: T).(\lambda (H4: (subst0 i0 u0 t0 t5)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) u0))).(pc3_t t3 c t2 (pc3_pr3_r c t2 t3 (pr3_pr2 c t2 t3 (pr2_free c t2 t3 H1))) t5 (pc3_pr3_r c t3 t5 (pr3_sing c t0 t3 (pr2_delta c d u i H0 t3 t3 (pr0_refl t3) t0 H2) t5 (pr3_pr2 c t0 t5 (pr2_delta c e u0 i0 H5 t0 t0 (pr0_refl t0) t5 H4))))))))) (\lambda (c0: C).(\lambda (H4: (csubst0 i0 u0 c c0)).(\lambda (e: C).(\lambda (H5: (getl i0 c (CHead e (Bind Abbr) u0))).(lt_le_e i i0 (pc3 c0 t2 t0) (\lambda (H6: (lt i i0)).(let H7 \def (csubst0_getl_lt i0 i H6 c c0 u0 H4 (CHead d (Bind Abbr) u) H0) in (or4_ind (getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (pc3 c0 t2 t0) (\lambda (H8: (getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i H8 t2 t3 H1 t0 H2))) (\lambda (H8: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u0)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H10: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda (H11: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H11 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(getl i c0 (CHead c (Bind x0) x3))) H10 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H18 Abbr H15) in (ex2_ind T (\lambda (t5: T).(subst0 i x3 t3 t5)) (\lambda (t5: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda (H20: (subst0 i x3 t3 x)).(\lambda (H21: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H22 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H21 i0 (lt_plus_minus_r i i0 H6)) in (pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H19 t2 t3 H1 x H20) t0 (pc3_pr2_x c0 x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead e (Bind Abbr) u0) H5) t0 t0 (pr0_refl t0) x H22))))))) (subst0_subst0_back t3 t0 u i H2 x3 u0 (minus i0 (S i)) H17)))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl i c0 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) x3))).(\lambda (H11: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c0 (CHead x2 (Bind x0) t))) H10 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H11 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) u))) H17 Abbr H15) in (pc3_pr2_r c0 t2 t0 (pr2_delta c0 x2 u i H19 t2 t3 H1 t0 H2)))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 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 (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (pc3 c0 t2 t0) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl i c0 (CHead x2 (Bind x0) x4))).(\lambda (H11: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x4)) H11 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) x4))) H10 Abbr H16) in (ex2_ind T (\lambda (t5: T).(subst0 i x4 t3 t5)) (\lambda (t5: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t5)) (pc3 c0 t2 t0) (\lambda (x: T).(\lambda (H21: (subst0 i x4 t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H6)) in (pc3_pr2_u c0 x t2 (pr2_delta c0 x2 x4 i H20 t2 t3 H1 x H21) t0 (pc3_pr2_x c0 x t0 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H4 (CHead e (Bind Abbr) u0) H5) t0 t0 (pr0_refl t0) x H23))))))) (subst0_subst0_back t3 t0 u i H2 x4 u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))))) H8)) H7))) (\lambda (H6: (le i0 i)).(pc3_pr2_r c0 t2 t0 (pr2_delta c0 d u i (csubst0_getl_ge i0 i H6 c c0 u0 H4 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 H2)))))))) (\lambda (t5: T).(\lambda (H4: (subst0 i0 u0 t0 t5)).(\lambda (c0: C).(\lambda (H5: (csubst0 i0 u0 c c0)).(\lambda (e: C).(\lambda (H6: (getl i0 c (CHead e (Bind Abbr) u0))).(lt_le_e i i0 (pc3 c0 t2 t5) (\lambda (H7: (lt i i0)).(let H8 \def (csubst0_getl_lt i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) in (or4_ind (getl i c0 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))) (pc3 c0 t2 t5) (\lambda (H9: (getl i c0 (CHead d (Bind Abbr) u))).(pc3_pr2_u c0 t3 t2 (pr2_free c0 t2 t3 H1) t5 (pc3_pr3_r c0 t3 t5 (pr3_sing c0 t0 t3 (pr2_delta c0 d u i H9 t3 t3 (pr0_refl t3) t0 H2) t5 (pr3_pr2 c0 t0 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4)))))) (\lambda (H9: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u0)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w))))) (pc3 c0 t2 t5) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H11: (getl i c0 (CHead x1 (Bind x0) x3))).(\lambda (H12: (subst0 (minus i0 (S i)) u0 x2 x3)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H10) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x3)) H12 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(getl i c0 (CHead c (Bind x0) x3))) H11 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead d (Bind b) x3))) H19 Abbr H16) in (ex2_ind T (\lambda (t6: T).(subst0 i x3 t3 t6)) (\lambda (t6: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t6)) (pc3 c0 t2 t5) (\lambda (x: T).(\lambda (H21: (subst0 i x3 t3 x)).(\lambda (H22: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H23 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H22 i0 (lt_plus_minus_r i i0 H7)) in (pc3_pr2_u c0 x t2 (pr2_delta c0 d x3 i H20 t2 t3 H1 x H21) t5 (pc3_pr2_u2 c0 t0 x (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H23) t5 (pc3_pr2_r c0 t0 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4)))))))) (subst0_subst0_back t3 t0 u i H2 x3 u0 (minus i0 (S i)) H18)))))))) H14)) H13))))))))) H9)) (\lambda (H9: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u: T).(getl i c0 (CHead e2 (Bind b) u)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl i c0 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2))))) (pc3 c0 t2 t5) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H11: (getl i c0 (CHead x2 (Bind x0) x3))).(\lambda (H12: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x3 (\lambda (t: T).(getl i c0 (CHead x2 (Bind x0) t))) H11 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) u))) H18 Abbr H16) in (pc3_pr2_u c0 t0 t2 (pr2_delta c0 x2 u i H20 t2 t3 H1 t0 H2) t5 (pc3_pr2_r c0 t0 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4))))))))) H14)) H13))))))))) H9)) (\lambda (H9: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 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 (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl i c0 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i0 (S i)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i0 (S i)) u0 e1 e2)))))) (pc3 c0 t2 t5) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H10: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H11: (getl i c0 (CHead x2 (Bind x0) x4))).(\lambda (H12: (subst0 (minus i0 (S i)) u0 x3 x4)).(\lambda (H13: (csubst0 (minus i0 (S i)) u0 x1 x2)).(let H14 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H15 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in ((let H16 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H10) in (\lambda (H17: (eq B Abbr x0)).(\lambda (H18: (eq C d x1)).(let H19 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i0 (S i)) u0 t x4)) H12 u H16) in (let H20 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i0 (S i)) u0 c x2)) H13 d H18) in (let H21 \def (eq_ind_r B x0 (\lambda (b: B).(getl i c0 (CHead x2 (Bind b) x4))) H11 Abbr H17) in (ex2_ind T (\lambda (t6: T).(subst0 i x4 t3 t6)) (\lambda (t6: T).(subst0 (S (plus (minus i0 (S i)) i)) u0 t0 t6)) (pc3 c0 t2 t5) (\lambda (x: T).(\lambda (H22: (subst0 i x4 t3 x)).(\lambda (H23: (subst0 (S (plus (minus i0 (S i)) i)) u0 t0 x)).(let H24 \def (eq_ind_r nat (S (plus (minus i0 (S i)) i)) (\lambda (n: nat).(subst0 n u0 t0 x)) H23 i0 (lt_plus_minus_r i i0 H7)) in (pc3_pr2_u c0 x t2 (pr2_delta c0 x2 x4 i H21 t2 t3 H1 x H22) t5 (pc3_pr2_u2 c0 t0 x (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) x H24) t5 (pc3_pr2_r c0 t0 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4)))))))) (subst0_subst0_back t3 t0 u i H2 x4 u0 (minus i0 (S i)) H19)))))))) H15)) H14))))))))))) H9)) H8))) (\lambda (H7: (le i0 i)).(pc3_pr2_u c0 t0 t2 (pr2_delta c0 d u i (csubst0_getl_ge i0 i H7 c c0 u0 H5 (CHead d (Bind Abbr) u) H0) t2 t3 H1 t0 H2) t5 (pc3_pr2_r c0 t0 t5 (pr2_delta c0 e u0 i0 (csubst0_getl_ge i0 i0 (le_n i0) c c0 u0 H5 (CHead e (Bind Abbr) u0) H6) t0 t0 (pr0_refl t0) t5 H4))))))))))) c2 t4 H3)))))))))))))))) c1 t t1 H)))). theorem pc3_fsubst0: \forall (c1: C).(\forall (t1: T).(\forall (t: T).((pc3 c1 t1 t) \to (\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u c1 t1 c2 t2) \to (\forall (e: C).((getl i c1 (CHead e (Bind Abbr) u)) \to (pc3 c2 t2 t))))))))))) @@ -2925,27 +2925,27 @@ inductive ty3 (g:G): C \to (T \to (T \to Prop)) \def theorem ty3_gen_sort: \forall (g: G).(\forall (c: C).(\forall (x: T).(\forall (n: nat).((ty3 g c (TSort n) x) \to (pc3 c (TSort (next g n)) x))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (ty3 g c (TSort n) x)).(insert_eq T (TSort n) (\lambda (t: T).(ty3 g c t x)) (pc3 c (TSort (next g n)) x) (\lambda (y: T).(\lambda (H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (TSort n)) \to (pc3 c0 (TSort (next g n)) t0))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: (((eq T t2 (TSort n)) \to (pc3 c0 (TSort (next g n)) t)))).(\lambda (u: T).(\lambda (t1: T).(\lambda (H3: (ty3 g c0 u t1)).(\lambda (H4: (((eq T u (TSort n)) \to (pc3 c0 (TSort (next g n)) t1)))).(\lambda (H5: (pc3 c0 t1 t2)).(\lambda (H6: (eq T u (TSort n))).(let H7 \def (f_equal T T (\lambda (e: T).e) u (TSort n) H6) in (let H8 \def (eq_ind T u (\lambda (t: T).((eq T t (TSort n)) \to (pc3 c0 (TSort (next g n)) t1))) H4 (TSort n) H7) in (let H9 \def (eq_ind T u (\lambda (t: T).(ty3 g c0 t t1)) H3 (TSort n) H7) in (pc3_t t1 c0 (TSort (next g n)) (H8 (refl_equal T (TSort n))) t2 H5))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T (TSort m) (TSort n))).(let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort n) \Rightarrow n | (TLRef _) \Rightarrow m | (THead _ _ _) \Rightarrow m])) (TSort m) (TSort n) H1) in (eq_ind_r nat n (\lambda (n0: nat).(pc3 c0 (TSort (next g n)) (TSort (next g n0)))) (pc3_refl c0 (TSort (next g n))) m H2))))) (\lambda (n0: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (_: (getl n0 c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u (TSort n)) \to (pc3 d (TSort (next g n)) t)))).(\lambda (H4: (eq T (TLRef n0) (TSort n))).(let H5 \def (eq_ind T (TLRef n0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H4) in (False_ind (pc3 c0 (TSort (next g n)) (lift (S n0) O t)) H5))))))))))) (\lambda (n0: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (_: (getl n0 c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u (TSort n)) \to (pc3 d (TSort (next g n)) t)))).(\lambda (H4: (eq T (TLRef n0) (TSort n))).(let H5 \def (eq_ind T (TLRef n0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H4) in (False_ind (pc3 c0 (TSort (next g n)) (lift (S n0) O u)) H5))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (_: (((eq T u (TSort n)) \to (pc3 c0 (TSort (next g n)) t)))).(\lambda (b: B).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (pc3 (CHead c0 (Bind b) u) (TSort (next g n)) t2)))).(\lambda (t0: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t2 t0)).(\lambda (_: (((eq T t2 (TSort n)) \to (pc3 (CHead c0 (Bind b) u) (TSort (next g n)) t0)))).(\lambda (H7: (eq T (THead (Bind b) u t1) (TSort n))).(let H8 \def (eq_ind T (THead (Bind b) u t1) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H7) in (False_ind (pc3 c0 (TSort (next g n)) (THead (Bind b) u t2)) H8)))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (_: (((eq T w (TSort n)) \to (pc3 c0 (TSort (next g n)) u)))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (_: (((eq T v (TSort n)) \to (pc3 c0 (TSort (next g n)) (THead (Bind Abst) u t))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (TSort n))).(let H6 \def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in (False_ind (pc3 c0 (TSort (next g n)) (THead (Flat Appl) w (THead (Bind Abst) u t))) H6)))))))))))) (\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (pc3 c0 (TSort (next g n)) t2)))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda (_: (((eq T t2 (TSort n)) \to (pc3 c0 (TSort (next g n)) t0)))).(\lambda (H5: (eq T (THead (Flat Cast) t2 t1) (TSort n))).(let H6 \def (eq_ind T (THead (Flat Cast) t2 t1) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in (False_ind (pc3 c0 (TSort (next g n)) t2) H6))))))))))) c y x H0))) H))))). + \lambda (g: G).(\lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (ty3 g c (TSort n) x)).(insert_eq T (TSort n) (\lambda (t: T).(ty3 g c t x)) (pc3 c (TSort (next g n)) x) (\lambda (y: T).(\lambda (H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (TSort n)) \to (pc3 c0 (TSort (next g n)) t0))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: (((eq T t2 (TSort n)) \to (pc3 c0 (TSort (next g n)) t)))).(\lambda (u: T).(\lambda (t1: T).(\lambda (H3: (ty3 g c0 u t1)).(\lambda (H4: (((eq T u (TSort n)) \to (pc3 c0 (TSort (next g n)) t1)))).(\lambda (H5: (pc3 c0 t1 t2)).(\lambda (H6: (eq T u (TSort n))).(let H7 \def (f_equal T T (\lambda (e: T).e) u (TSort n) H6) in (let H8 \def (eq_ind T u (\lambda (t: T).((eq T t (TSort n)) \to (pc3 c0 (TSort (next g n)) t1))) H4 (TSort n) H7) in (let H9 \def (eq_ind T u (\lambda (t: T).(ty3 g c0 t t1)) H3 (TSort n) H7) in (pc3_t t1 c0 (TSort (next g n)) (H8 (refl_equal T (TSort n))) t2 H5))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T (TSort m) (TSort n))).(let H2 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort n) \Rightarrow n | (TLRef _) \Rightarrow m | (THead _ _ _) \Rightarrow m])) (TSort m) (TSort n) H1) in (eq_ind_r nat n (\lambda (n0: nat).(pc3 c0 (TSort (next g n)) (TSort (next g n0)))) (pc3_refl c0 (TSort (next g n))) m H2))))) (\lambda (n0: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (_: (getl n0 c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u (TSort n)) \to (pc3 d (TSort (next g n)) t)))).(\lambda (H4: (eq T (TLRef n0) (TSort n))).(let H5 \def (eq_ind T (TLRef n0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H4) in (False_ind (pc3 c0 (TSort (next g n)) (lift (S n0) O t)) H5))))))))))) (\lambda (n0: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (_: (getl n0 c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u (TSort n)) \to (pc3 d (TSort (next g n)) t)))).(\lambda (H4: (eq T (TLRef n0) (TSort n))).(let H5 \def (eq_ind T (TLRef n0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H4) in (False_ind (pc3 c0 (TSort (next g n)) (lift (S n0) O u)) H5))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (_: (((eq T u (TSort n)) \to (pc3 c0 (TSort (next g n)) t)))).(\lambda (b: B).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (pc3 (CHead c0 (Bind b) u) (TSort (next g n)) t2)))).(\lambda (t0: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t2 t0)).(\lambda (_: (((eq T t2 (TSort n)) \to (pc3 (CHead c0 (Bind b) u) (TSort (next g n)) t0)))).(\lambda (H7: (eq T (THead (Bind b) u t1) (TSort n))).(let H8 \def (eq_ind T (THead (Bind b) u t1) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H7) in (False_ind (pc3 c0 (TSort (next g n)) (THead (Bind b) u t2)) H8)))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (_: (((eq T w (TSort n)) \to (pc3 c0 (TSort (next g n)) u)))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (_: (((eq T v (TSort n)) \to (pc3 c0 (TSort (next g n)) (THead (Bind Abst) u t))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (TSort n))).(let H6 \def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in (False_ind (pc3 c0 (TSort (next g n)) (THead (Flat Appl) w (THead (Bind Abst) u t))) H6)))))))))))) (\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (pc3 c0 (TSort (next g n)) t2)))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda (_: (((eq T t2 (TSort n)) \to (pc3 c0 (TSort (next g n)) t0)))).(\lambda (H5: (eq T (THead (Flat Cast) t2 t1) (TSort n))).(let H6 \def (eq_ind T (THead (Flat Cast) t2 t1) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in (False_ind (pc3 c0 (TSort (next g n)) t2) H6))))))))))) c y x H0))) H))))). theorem ty3_gen_lref: \forall (g: G).(\forall (c: C).(\forall (x: T).(\forall (n: nat).((ty3 g c (TLRef n) x) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c (lift (S n) O t) x)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c (lift (S n) O u) x)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (ty3 g c (TLRef n) x)).(insert_eq T (TLRef n) (\lambda (t: T).(ty3 g c t x)) (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c (lift (S n) O t) x)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c (lift (S n) O u) x)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))) (\lambda (y: T).(\lambda (H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t1: T).(pc3 c0 (lift (S n) O t1) t0)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t1: T).(ty3 g e u t1))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t0)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t1: T).(ty3 g e u t1)))))))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: (((eq T t2 (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (u: T).(\lambda (t1: T).(\lambda (H3: (ty3 g c0 u t1)).(\lambda (H4: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t1)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t1)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (H5: (pc3 c0 t1 t2)).(\lambda (H6: (eq T u (TLRef n))).(let H7 \def (f_equal T T (\lambda (e: T).e) u (TLRef n) H6) in (let H8 \def (eq_ind T u (\lambda (t: T).((eq T t (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t1)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t0: T).(ty3 g e u t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t1)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t0: T).(ty3 g e u t0)))))))) H4 (TLRef n) H7) in (let H9 \def (eq_ind T u (\lambda (t: T).(ty3 g c0 t t1)) H3 (TLRef n) H7) in (let H10 \def (H8 (refl_equal T (TLRef n))) in (or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))) (\lambda (H11: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t1)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))) (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H12: (pc3 c0 (lift (S n) O x2) t1)).(\lambda (H13: (getl n c0 (CHead x0 (Bind Abbr) x1))).(\lambda (H14: (ty3 g x0 x1 x2)).(or_introl (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))) x0 x1 x2 (pc3_t t1 c0 (lift (S n) O x2) H12 t2 H5) H13 H14)))))))) H11)) (\lambda (H11: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t1)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))) (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H12: (pc3 c0 (lift (S n) O x1) t1)).(\lambda (H13: (getl n c0 (CHead x0 (Bind Abst) x1))).(\lambda (H14: (ty3 g x0 x1 x2)).(or_intror (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))) x0 x1 x2 (pc3_t t1 c0 (lift (S n) O x1) H12 t2 H5) H13 H14)))))))) H11)) H10)))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T (TSort m) (TLRef n))).(let H2 \def (eq_ind T (TSort m) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef n) H1) in (False_ind (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) (TSort (next g m)))))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) (TSort (next g m)))))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))) H2))))) (\lambda (n0: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H1: (getl n0 c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (H2: (ty3 g d u t)).(\lambda (_: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 d (lift (S n) O t0) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n d (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 d (lift (S n) O u) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n d (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (H4: (eq T (TLRef n0) (TLRef n))).(let H5 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow n0 | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n0])) (TLRef n0) (TLRef n) H4) in (let H6 \def (eq_ind nat n0 (\lambda (n: nat).(getl n c0 (CHead d (Bind Abbr) u))) H1 n H5) in (eq_ind_r nat n (\lambda (n1: nat).(or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n1) O t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n1) O t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))))) (or_introl (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n) O t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n) O t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n) O t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))) d u t (pc3_refl c0 (lift (S n) O t)) H6 H2)) n0 H5)))))))))))) (\lambda (n0: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H1: (getl n0 c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H2: (ty3 g d u t)).(\lambda (_: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 d (lift (S n) O t0) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n d (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 d (lift (S n) O u) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n d (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (H4: (eq T (TLRef n0) (TLRef n))).(let H5 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow n0 | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n0])) (TLRef n0) (TLRef n) H4) in (let H6 \def (eq_ind nat n0 (\lambda (n: nat).(getl n c0 (CHead d (Bind Abst) u))) H1 n H5) in (eq_ind_r nat n (\lambda (n1: nat).(or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n1) O u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n1) O u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))))) (or_intror (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n) O u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n) O u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n) O u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))) d u t (pc3_refl c0 (lift (S n) O u)) H6 H2)) n0 H5)))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (_: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (b: B).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t1 t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead c0 (Bind b) u) (lift (S n) O t) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) u) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b) u) (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) u) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t2 t0)).(\lambda (_: (((eq T t2 (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead c0 (Bind b) u) (lift (S n) O t) t0)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) u) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b) u) (lift (S n) O u0) t0)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) u) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (H7: (eq T (THead (Bind b) u t1) (TLRef n))).(let H8 \def (eq_ind T (THead (Bind b) u t1) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H7) in (False_ind (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t3: T).(pc3 c0 (lift (S n) O t3) (THead (Bind b) u t2))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t3: T).(ty3 g e u0 t3))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (THead (Bind b) u t2))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t3: T).(ty3 g e u0 t3)))))) H8)))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (_: (((eq T w (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) u)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) u)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (_: (((eq T v (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (THead (Bind Abst) u t))))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (THead (Bind Abst) u t))))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (TLRef n))).(let H6 \def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H5) in (False_ind (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (THead (Flat Appl) w (THead (Bind Abst) u t)))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (THead (Flat Appl) w (THead (Bind Abst) u t)))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))) H6)))))))))))) (\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda (_: (((eq T t2 (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t0)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t0)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (H5: (eq T (THead (Flat Cast) t2 t1) (TLRef n))).(let H6 \def (eq_ind T (THead (Flat Cast) t2 t1) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H5) in (False_ind (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))) H6))))))))))) c y x H0))) H))))). + \lambda (g: G).(\lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda (H: (ty3 g c (TLRef n) x)).(insert_eq T (TLRef n) (\lambda (t: T).(ty3 g c t x)) (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c (lift (S n) O t) x)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c (lift (S n) O u) x)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))) (\lambda (y: T).(\lambda (H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t1: T).(pc3 c0 (lift (S n) O t1) t0)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t1: T).(ty3 g e u t1))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t0)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t1: T).(ty3 g e u t1)))))))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: (((eq T t2 (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (u: T).(\lambda (t1: T).(\lambda (H3: (ty3 g c0 u t1)).(\lambda (H4: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t1)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t1)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (H5: (pc3 c0 t1 t2)).(\lambda (H6: (eq T u (TLRef n))).(let H7 \def (f_equal T T (\lambda (e: T).e) u (TLRef n) H6) in (let H8 \def (eq_ind T u (\lambda (t: T).((eq T t (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t1)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t0: T).(ty3 g e u t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t1)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t0: T).(ty3 g e u t0)))))))) H4 (TLRef n) H7) in (let H9 \def (eq_ind T u (\lambda (t: T).(ty3 g c0 t t1)) H3 (TLRef n) H7) in (let H10 \def (H8 (refl_equal T (TLRef n))) in (or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))) (\lambda (H11: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t1)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))) (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H12: (pc3 c0 (lift (S n) O x2) t1)).(\lambda (H13: (getl n c0 (CHead x0 (Bind Abbr) x1))).(\lambda (H14: (ty3 g x0 x1 x2)).(or_introl (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))) x0 x1 x2 (pc3_t t1 c0 (lift (S n) O x2) H12 t2 H5) H13 H14)))))))) H11)) (\lambda (H11: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t1)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t1)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))) (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H12: (pc3 c0 (lift (S n) O x1) t1)).(\lambda (H13: (getl n c0 (CHead x0 (Bind Abst) x1))).(\lambda (H14: (ty3 g x0 x1 x2)).(or_intror (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))) x0 x1 x2 (pc3_t t1 c0 (lift (S n) O x1) H12 t2 H5) H13 H14)))))))) H11)) H10)))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T (TSort m) (TLRef n))).(let H2 \def (eq_ind T (TSort m) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef n) H1) in (False_ind (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) (TSort (next g m)))))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) (TSort (next g m)))))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))) H2))))) (\lambda (n0: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H1: (getl n0 c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (H2: (ty3 g d u t)).(\lambda (_: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 d (lift (S n) O t0) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n d (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 d (lift (S n) O u) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n d (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (H4: (eq T (TLRef n0) (TLRef n))).(let H5 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow n0 | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n0])) (TLRef n0) (TLRef n) H4) in (let H6 \def (eq_ind nat n0 (\lambda (n: nat).(getl n c0 (CHead d (Bind Abbr) u))) H1 n H5) in (eq_ind_r nat n (\lambda (n1: nat).(or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n1) O t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n1) O t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))))) (or_introl (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n) O t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n) O t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n) O t))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))) d u t (pc3_refl c0 (lift (S n) O t)) H6 H2)) n0 H5)))))))))))) (\lambda (n0: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H1: (getl n0 c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H2: (ty3 g d u t)).(\lambda (_: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 d (lift (S n) O t0) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n d (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 d (lift (S n) O u) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n d (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (H4: (eq T (TLRef n0) (TLRef n))).(let H5 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow n0 | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n0])) (TLRef n0) (TLRef n) H4) in (let H6 \def (eq_ind nat n0 (\lambda (n: nat).(getl n c0 (CHead d (Bind Abst) u))) H1 n H5) in (eq_ind_r nat n (\lambda (n1: nat).(or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n1) O u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n1) O u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))))) (or_intror (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (lift (S n) O u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n) O u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3_intro C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (lift (S n) O u))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))) d u t (pc3_refl c0 (lift (S n) O u)) H6 H2)) n0 H5)))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (_: (((eq T u (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (b: B).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t1 t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead c0 (Bind b) u) (lift (S n) O t) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) u) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b) u) (lift (S n) O u0) t2)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) u) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t2 t0)).(\lambda (_: (((eq T t2 (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 (CHead c0 (Bind b) u) (lift (S n) O t) t0)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) u) (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b) u) (lift (S n) O u0) t0)))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) u) (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (H7: (eq T (THead (Bind b) u t1) (TLRef n))).(let H8 \def (eq_ind T (THead (Bind b) u t1) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H7) in (False_ind (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t3: T).(pc3 c0 (lift (S n) O t3) (THead (Bind b) u t2))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t3: T).(ty3 g e u0 t3))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (THead (Bind b) u t2))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t3: T).(ty3 g e u0 t3)))))) H8)))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (_: (((eq T w (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) u)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) u)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (_: (((eq T v (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (THead (Bind Abst) u t))))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (THead (Bind Abst) u t))))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (TLRef n))).(let H6 \def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H5) in (False_ind (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) (THead (Flat Appl) w (THead (Bind Abst) u t)))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u0) (THead (Flat Appl) w (THead (Bind Abst) u t)))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u0))))) (\lambda (e: C).(\lambda (u0: T).(\lambda (t0: T).(ty3 g e u0 t0)))))) H6)))))))))))) (\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda (_: (((eq T t2 (TLRef n)) \to (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t0)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t0)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))))))).(\lambda (H5: (eq T (THead (Flat Cast) t2 t1) (TLRef n))).(let H6 \def (eq_ind T (THead (Flat Cast) t2 t1) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H5) in (False_ind (or (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))) H6))))))))))) c y x H0))) H))))). theorem ty3_gen_bind: \forall (g: G).(\forall (b: B).(\forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall (x: T).((ty3 g c (THead (Bind b) u t1) x) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c (THead (Bind b) u t2) x)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c (Bind b) u) t2 t0))))))))))) \def - \lambda (g: G).(\lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (ty3 g c (THead (Bind b) u t1) x)).(insert_eq T (THead (Bind b) u t1) (\lambda (t: T).(ty3 g c t x)) (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c (THead (Bind b) u t2) x)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c (Bind b) u) t2 t0))))) (\lambda (y: T).(\lambda (H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t0)))) (\lambda (_: T).(\lambda (t3: T).(\lambda (_: T).(ty3 g c0 u t3)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t4: T).(ty3 g (CHead c0 (Bind b) u) t2 t4))))))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: (((eq T t2 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0)))))))).(\lambda (u0: T).(\lambda (t0: T).(\lambda (H3: (ty3 g c0 u0 t0)).(\lambda (H4: (((eq T u0 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t0)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0)))))))).(\lambda (H5: (pc3 c0 t0 t2)).(\lambda (H6: (eq T u0 (THead (Bind b) u t1))).(let H7 \def (f_equal T T (\lambda (e: T).e) u0 (THead (Bind b) u t1) H6) in (let H8 \def (eq_ind T u0 (\lambda (t: T).((eq T t (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t0)))) (\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).(ty3 g c0 u t0)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t1: T).(ty3 g (CHead c0 (Bind b) u) t2 t1))))))) H4 (THead (Bind b) u t1) H7) in (let H9 \def (eq_ind T u0 (\lambda (t: T).(ty3 g c0 t t0)) H3 (THead (Bind b) u t1) H7) in (let H10 \def (H8 (refl_equal T (THead (Bind b) u t1))) in (ex4_3_ind T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t3) t0)))) (\lambda (_: T).(\lambda (t4: T).(\lambda (_: T).(ty3 g c0 u t4)))) (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3)))) (\lambda (t3: T).(\lambda (_: T).(\lambda (t5: T).(ty3 g (CHead c0 (Bind b) u) t3 t5)))) (ex4_3 T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t3) t2)))) (\lambda (_: T).(\lambda (t4: T).(\lambda (_: T).(ty3 g c0 u t4)))) (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3)))) (\lambda (t3: T).(\lambda (_: T).(\lambda (t5: T).(ty3 g (CHead c0 (Bind b) u) t3 t5))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H11: (pc3 c0 (THead (Bind b) u x0) t0)).(\lambda (H12: (ty3 g c0 u x1)).(\lambda (H13: (ty3 g (CHead c0 (Bind b) u) t1 x0)).(\lambda (H14: (ty3 g (CHead c0 (Bind b) u) x0 x2)).(ex4_3_intro T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t3) t2)))) (\lambda (_: T).(\lambda (t4: T).(\lambda (_: T).(ty3 g c0 u t4)))) (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3)))) (\lambda (t3: T).(\lambda (_: T).(\lambda (t5: T).(ty3 g (CHead c0 (Bind b) u) t3 t5)))) x0 x1 x2 (pc3_t t0 c0 (THead (Bind b) u x0) H11 t2 H5) H12 H13 H14)))))))) H10)))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T (TSort m) (THead (Bind b) u t1))).(let H2 \def (eq_ind T (TSort m) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) H1) in (False_ind (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) (TSort (next g m)))))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0))))) H2))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (_: (getl n c0 (CHead d (Bind Abbr) u0))).(\lambda (t: T).(\lambda (_: (ty3 g d u0 t)).(\lambda (_: (((eq T u0 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 d (THead (Bind b) u t2) t)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g d u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead d (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead d (Bind b) u) t2 t0)))))))).(\lambda (H4: (eq T (TLRef n) (THead (Bind b) u t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) H4) in (False_ind (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) (lift (S n) O t))))) (\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).(ty3 g c0 u t0)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c0 (Bind b) u) t2 t3))))) H5))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (_: (getl n c0 (CHead d (Bind Abst) u0))).(\lambda (t: T).(\lambda (_: (ty3 g d u0 t)).(\lambda (_: (((eq T u0 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 d (THead (Bind b) u t2) t)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g d u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead d (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead d (Bind b) u) t2 t0)))))))).(\lambda (H4: (eq T (TLRef n) (THead (Bind b) u t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) H4) in (False_ind (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) (lift (S n) O u0))))) (\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).(ty3 g c0 u t0)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c0 (Bind b) u) t2 t3))))) H5))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (t: T).(\lambda (H1: (ty3 g c0 u0 t)).(\lambda (H2: (((eq T u0 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0)))))))).(\lambda (b0: B).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H3: (ty3 g (CHead c0 (Bind b0) u0) t0 t2)).(\lambda (H4: (((eq T t0 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b0) u0) (THead (Bind b) u t3) t2)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b0) u0) u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t2 t0)))))))).(\lambda (t3: T).(\lambda (H5: (ty3 g (CHead c0 (Bind b0) u0) t2 t3)).(\lambda (H6: (((eq T t2 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b0) u0) (THead (Bind b) u t2) t3)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b0) u0) u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t2 t0)))))))).(\lambda (H7: (eq T (THead (Bind b0) u0 t0) (THead (Bind b) u t1))).(let H8 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u0 t0) (THead (Bind b) u t1) H7) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b0) u0 t0) (THead (Bind b) u t1) H7) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) u0 t0) (THead (Bind b) u t1) H7) in (\lambda (H11: (eq T u0 u)).(\lambda (H12: (eq B b0 b)).(let H13 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b0) u0) (THead (Bind b) u t3) t2)))) (\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b0) u0) u t0)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t1: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t2 t1))))))) H4 t1 H10) in (let H14 \def (eq_ind T t0 (\lambda (t: T).(ty3 g (CHead c0 (Bind b0) u0) t t2)) H3 t1 H10) in (let H15 \def (eq_ind B b0 (\lambda (b0: B).((eq T t2 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b0) u0) (THead (Bind b) u t2) t3)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b0) u0) u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t2 t0))))))) H6 b H12) in (let H16 \def (eq_ind B b0 (\lambda (b: B).(ty3 g (CHead c0 (Bind b) u0) t2 t3)) H5 b H12) in (let H17 \def (eq_ind B b0 (\lambda (b0: B).((eq T t1 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b0) u0) (THead (Bind b) u t3) t2)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b0) u0) u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t2 t0))))))) H13 b H12) in (let H18 \def (eq_ind B b0 (\lambda (b: B).(ty3 g (CHead c0 (Bind b) u0) t1 t2)) H14 b H12) in (eq_ind_r B b (\lambda (b1: B).(ex4_3 T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t4) (THead (Bind b1) u0 t2))))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c0 u t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c0 (Bind b) u) t4 t6)))))) (let H19 \def (eq_ind T u0 (\lambda (t: T).((eq T t2 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b) t) (THead (Bind b) u t2) t3)))) (\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) t) u t0)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b) t) (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t1: T).(ty3 g (CHead (CHead c0 (Bind b) t) (Bind b) u) t2 t1))))))) H15 u H11) in (let H20 \def (eq_ind T u0 (\lambda (t: T).(ty3 g (CHead c0 (Bind b) t) t2 t3)) H16 u H11) in (let H21 \def (eq_ind T u0 (\lambda (t: T).((eq T t1 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b) t) (THead (Bind b) u t3) t2)))) (\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) t) u t0)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b) t) (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t1: T).(ty3 g (CHead (CHead c0 (Bind b) t) (Bind b) u) t2 t1))))))) H17 u H11) in (let H22 \def (eq_ind T u0 (\lambda (t: T).(ty3 g (CHead c0 (Bind b) t) t1 t2)) H18 u H11) in (let H23 \def (eq_ind T u0 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t1: T).(ty3 g (CHead c0 (Bind b) u) t2 t1))))))) H2 u H11) in (let H24 \def (eq_ind T u0 (\lambda (t0: T).(ty3 g c0 t0 t)) H1 u H11) in (eq_ind_r T u (\lambda (t4: T).(ex4_3 T T T (\lambda (t5: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t5) (THead (Bind b) t4 t2))))) (\lambda (_: T).(\lambda (t6: T).(\lambda (_: T).(ty3 g c0 u t6)))) (\lambda (t5: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t5)))) (\lambda (t5: T).(\lambda (_: T).(\lambda (t7: T).(ty3 g (CHead c0 (Bind b) u) t5 t7)))))) (ex4_3_intro T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t4) (THead (Bind b) u t2))))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c0 u t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c0 (Bind b) u) t4 t6)))) t2 t t3 (pc3_refl c0 (THead (Bind b) u t2)) H24 H22 H20) u0 H11))))))) b0 H12)))))))))) H9)) H8)))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u0: T).(\lambda (_: (ty3 g c0 w u0)).(\lambda (_: (((eq T w (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) u0)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0)))))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u0 t))).(\lambda (_: (((eq T v (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) (THead (Bind Abst) u0 t))))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0)))))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (THead (Bind b) u t1))).(let H6 \def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t1) H5) in (False_ind (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) (THead (Flat Appl) w (THead (Bind Abst) u0 t)))))) (\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).(ty3 g c0 u t0)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c0 (Bind b) u) t2 t3))))) H6)))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t3) t2)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0)))))))).(\lambda (t3: T).(\lambda (_: (ty3 g c0 t2 t3)).(\lambda (_: (((eq T t2 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t3)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0)))))))).(\lambda (H5: (eq T (THead (Flat Cast) t2 t0) (THead (Bind b) u t1))).(let H6 \def (eq_ind T (THead (Flat Cast) t2 t0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t1) H5) in (False_ind (ex4_3 T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t4) t2)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t5: T).(ty3 g (CHead c0 (Bind b) u) t4 t5))))) H6))))))))))) c y x H0))) H))))))). + \lambda (g: G).(\lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (x: T).(\lambda (H: (ty3 g c (THead (Bind b) u t1) x)).(insert_eq T (THead (Bind b) u t1) (\lambda (t: T).(ty3 g c t x)) (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c (THead (Bind b) u t2) x)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c (Bind b) u) t2 t0))))) (\lambda (y: T).(\lambda (H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t0)))) (\lambda (_: T).(\lambda (t3: T).(\lambda (_: T).(ty3 g c0 u t3)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t4: T).(ty3 g (CHead c0 (Bind b) u) t2 t4))))))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: (((eq T t2 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0)))))))).(\lambda (u0: T).(\lambda (t0: T).(\lambda (H3: (ty3 g c0 u0 t0)).(\lambda (H4: (((eq T u0 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t0)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0)))))))).(\lambda (H5: (pc3 c0 t0 t2)).(\lambda (H6: (eq T u0 (THead (Bind b) u t1))).(let H7 \def (f_equal T T (\lambda (e: T).e) u0 (THead (Bind b) u t1) H6) in (let H8 \def (eq_ind T u0 (\lambda (t: T).((eq T t (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t0)))) (\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).(ty3 g c0 u t0)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t1: T).(ty3 g (CHead c0 (Bind b) u) t2 t1))))))) H4 (THead (Bind b) u t1) H7) in (let H9 \def (eq_ind T u0 (\lambda (t: T).(ty3 g c0 t t0)) H3 (THead (Bind b) u t1) H7) in (let H10 \def (H8 (refl_equal T (THead (Bind b) u t1))) in (ex4_3_ind T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t3) t0)))) (\lambda (_: T).(\lambda (t4: T).(\lambda (_: T).(ty3 g c0 u t4)))) (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3)))) (\lambda (t3: T).(\lambda (_: T).(\lambda (t5: T).(ty3 g (CHead c0 (Bind b) u) t3 t5)))) (ex4_3 T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t3) t2)))) (\lambda (_: T).(\lambda (t4: T).(\lambda (_: T).(ty3 g c0 u t4)))) (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3)))) (\lambda (t3: T).(\lambda (_: T).(\lambda (t5: T).(ty3 g (CHead c0 (Bind b) u) t3 t5))))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H11: (pc3 c0 (THead (Bind b) u x0) t0)).(\lambda (H12: (ty3 g c0 u x1)).(\lambda (H13: (ty3 g (CHead c0 (Bind b) u) t1 x0)).(\lambda (H14: (ty3 g (CHead c0 (Bind b) u) x0 x2)).(ex4_3_intro T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t3) t2)))) (\lambda (_: T).(\lambda (t4: T).(\lambda (_: T).(ty3 g c0 u t4)))) (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t3)))) (\lambda (t3: T).(\lambda (_: T).(\lambda (t5: T).(ty3 g (CHead c0 (Bind b) u) t3 t5)))) x0 x1 x2 (pc3_t t0 c0 (THead (Bind b) u x0) H11 t2 H5) H12 H13 H14)))))))) H10)))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T (TSort m) (THead (Bind b) u t1))).(let H2 \def (eq_ind T (TSort m) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) H1) in (False_ind (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) (TSort (next g m)))))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0))))) H2))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (_: (getl n c0 (CHead d (Bind Abbr) u0))).(\lambda (t: T).(\lambda (_: (ty3 g d u0 t)).(\lambda (_: (((eq T u0 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 d (THead (Bind b) u t2) t)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g d u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead d (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead d (Bind b) u) t2 t0)))))))).(\lambda (H4: (eq T (TLRef n) (THead (Bind b) u t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) H4) in (False_ind (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) (lift (S n) O t))))) (\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).(ty3 g c0 u t0)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c0 (Bind b) u) t2 t3))))) H5))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (_: (getl n c0 (CHead d (Bind Abst) u0))).(\lambda (t: T).(\lambda (_: (ty3 g d u0 t)).(\lambda (_: (((eq T u0 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 d (THead (Bind b) u t2) t)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g d u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead d (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead d (Bind b) u) t2 t0)))))))).(\lambda (H4: (eq T (TLRef n) (THead (Bind b) u t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u t1) H4) in (False_ind (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) (lift (S n) O u0))))) (\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).(ty3 g c0 u t0)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c0 (Bind b) u) t2 t3))))) H5))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (t: T).(\lambda (H1: (ty3 g c0 u0 t)).(\lambda (H2: (((eq T u0 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0)))))))).(\lambda (b0: B).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H3: (ty3 g (CHead c0 (Bind b0) u0) t0 t2)).(\lambda (H4: (((eq T t0 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b0) u0) (THead (Bind b) u t3) t2)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b0) u0) u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t2 t0)))))))).(\lambda (t3: T).(\lambda (H5: (ty3 g (CHead c0 (Bind b0) u0) t2 t3)).(\lambda (H6: (((eq T t2 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b0) u0) (THead (Bind b) u t2) t3)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b0) u0) u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t2 t0)))))))).(\lambda (H7: (eq T (THead (Bind b0) u0 t0) (THead (Bind b) u t1))).(let H8 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u0 t0) (THead (Bind b) u t1) H7) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b0) u0 t0) (THead (Bind b) u t1) H7) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) u0 t0) (THead (Bind b) u t1) H7) in (\lambda (H11: (eq T u0 u)).(\lambda (H12: (eq B b0 b)).(let H13 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b0) u0) (THead (Bind b) u t3) t2)))) (\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b0) u0) u t0)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t1: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t2 t1))))))) H4 t1 H10) in (let H14 \def (eq_ind T t0 (\lambda (t: T).(ty3 g (CHead c0 (Bind b0) u0) t t2)) H3 t1 H10) in (let H15 \def (eq_ind B b0 (\lambda (b0: B).((eq T t2 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b0) u0) (THead (Bind b) u t2) t3)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b0) u0) u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t2 t0))))))) H6 b H12) in (let H16 \def (eq_ind B b0 (\lambda (b: B).(ty3 g (CHead c0 (Bind b) u0) t2 t3)) H5 b H12) in (let H17 \def (eq_ind B b0 (\lambda (b0: B).((eq T t1 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b0) u0) (THead (Bind b) u t3) t2)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b0) u0) u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead (CHead c0 (Bind b0) u0) (Bind b) u) t2 t0))))))) H13 b H12) in (let H18 \def (eq_ind B b0 (\lambda (b: B).(ty3 g (CHead c0 (Bind b) u0) t1 t2)) H14 b H12) in (eq_ind_r B b (\lambda (b1: B).(ex4_3 T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t4) (THead (Bind b1) u0 t2))))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c0 u t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c0 (Bind b) u) t4 t6)))))) (let H19 \def (eq_ind T u0 (\lambda (t: T).((eq T t2 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b) t) (THead (Bind b) u t2) t3)))) (\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) t) u t0)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b) t) (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t1: T).(ty3 g (CHead (CHead c0 (Bind b) t) (Bind b) u) t2 t1))))))) H15 u H11) in (let H20 \def (eq_ind T u0 (\lambda (t: T).(ty3 g (CHead c0 (Bind b) t) t2 t3)) H16 u H11) in (let H21 \def (eq_ind T u0 (\lambda (t: T).((eq T t1 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c0 (Bind b) t) (THead (Bind b) u t3) t2)))) (\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) t) u t0)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c0 (Bind b) t) (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t1: T).(ty3 g (CHead (CHead c0 (Bind b) t) (Bind b) u) t2 t1))))))) H17 u H11) in (let H22 \def (eq_ind T u0 (\lambda (t: T).(ty3 g (CHead c0 (Bind b) t) t1 t2)) H18 u H11) in (let H23 \def (eq_ind T u0 (\lambda (t0: T).((eq T t0 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t1: T).(ty3 g (CHead c0 (Bind b) u) t2 t1))))))) H2 u H11) in (let H24 \def (eq_ind T u0 (\lambda (t0: T).(ty3 g c0 t0 t)) H1 u H11) in (eq_ind_r T u (\lambda (t4: T).(ex4_3 T T T (\lambda (t5: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t5) (THead (Bind b) t4 t2))))) (\lambda (_: T).(\lambda (t6: T).(\lambda (_: T).(ty3 g c0 u t6)))) (\lambda (t5: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t5)))) (\lambda (t5: T).(\lambda (_: T).(\lambda (t7: T).(ty3 g (CHead c0 (Bind b) u) t5 t7)))))) (ex4_3_intro T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t4) (THead (Bind b) u t2))))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c0 u t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c0 (Bind b) u) t4 t6)))) t2 t t3 (pc3_refl c0 (THead (Bind b) u t2)) H24 H22 H20) u0 H11))))))) b0 H12)))))))))) H9)) H8)))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u0: T).(\lambda (_: (ty3 g c0 w u0)).(\lambda (_: (((eq T w (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) u0)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0)))))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u0 t))).(\lambda (_: (((eq T v (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) (THead (Bind Abst) u0 t))))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0)))))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (THead (Bind b) u t1))).(let H6 \def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t1) H5) in (False_ind (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) (THead (Flat Appl) w (THead (Bind Abst) u0 t)))))) (\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).(ty3 g c0 u t0)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c0 (Bind b) u) t2 t3))))) H6)))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t3: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t3) t2)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0)))))))).(\lambda (t3: T).(\lambda (_: (ty3 g c0 t2 t3)).(\lambda (_: (((eq T t2 (THead (Bind b) u t1)) \to (ex4_3 T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t2) t3)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t0: T).(ty3 g (CHead c0 (Bind b) u) t2 t0)))))))).(\lambda (H5: (eq T (THead (Flat Cast) t2 t0) (THead (Bind b) u t1))).(let H6 \def (eq_ind T (THead (Flat Cast) t2 t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t1) H5) in (False_ind (ex4_3 T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u t4) t2)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u t)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) t1 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t5: T).(ty3 g (CHead c0 (Bind b) u) t4 t5))))) H6))))))))))) c y x H0))) H))))))). theorem ty3_gen_appl: \forall (g: G).(\forall (c: C).(\forall (w: T).(\forall (v: T).(\forall (x: T).((ty3 g c (THead (Flat Appl) w v) x) \to (ex3_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) x))) (\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c w u))))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (w: T).(\lambda (v: T).(\lambda (x: T).(\lambda (H: (ty3 g c (THead (Flat Appl) w v) x)).(insert_eq T (THead (Flat Appl) w v) (\lambda (t: T).(ty3 g c t x)) (ex3_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) x))) (\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c w u)))) (\lambda (y: T).(\lambda (H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t1: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t1)) t0))) (\lambda (u: T).(\lambda (t1: T).(ty3 g c0 v (THead (Bind Abst) u t1)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: (((eq T t2 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t0)) t))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (u: T).(\lambda (t1: T).(\lambda (H3: (ty3 g c0 u t1)).(\lambda (H4: (((eq T u (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) t1))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (H5: (pc3 c0 t1 t2)).(\lambda (H6: (eq T u (THead (Flat Appl) w v))).(let H7 \def (f_equal T T (\lambda (e: T).e) u (THead (Flat Appl) w v) H6) in (let H8 \def (eq_ind T u (\lambda (t: T).((eq T t (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t0)) t1))) (\lambda (u: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u t0)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))))) H4 (THead (Flat Appl) w v) H7) in (let H9 \def (eq_ind T u (\lambda (t: T).(ty3 g c0 t t1)) H3 (THead (Flat Appl) w v) H7) in (let H10 \def (H8 (refl_equal T (THead (Flat Appl) w v))) in (ex3_2_ind T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) t1))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0))) (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) t2))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) t1)).(\lambda (H12: (ty3 g c0 v (THead (Bind Abst) x0 x1))).(\lambda (H13: (ty3 g c0 w x0)).(ex3_2_intro T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) t2))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0))) x0 x1 (pc3_t t1 c0 (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) H11 t2 H5) H12 H13)))))) H10)))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T (TSort m) (THead (Flat Appl) w v))).(let H2 \def (eq_ind T (TSort m) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) w v) H1) in (False_ind (ex3_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (TSort (next g m))))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))) H2))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (_: (getl n c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t0: T).(pc3 d (THead (Flat Appl) w (THead (Bind Abst) u t0)) t))) (\lambda (u: T).(\lambda (t: T).(ty3 g d v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g d w u))))))).(\lambda (H4: (eq T (TLRef n) (THead (Flat Appl) w v))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) w v) H4) in (False_ind (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) (lift (S n) O t)))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0)))) H5))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (_: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t0: T).(pc3 d (THead (Flat Appl) w (THead (Bind Abst) u t0)) t))) (\lambda (u: T).(\lambda (t: T).(ty3 g d v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g d w u))))))).(\lambda (H4: (eq T (TLRef n) (THead (Flat Appl) w v))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) w v) H4) in (False_ind (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) (lift (S n) O u)))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0)))) H5))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (_: (((eq T u (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t0)) t))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (b: B).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t1 t2)).(\lambda (_: (((eq T t1 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t: T).(pc3 (CHead c0 (Bind b) u) (THead (Flat Appl) w (THead (Bind Abst) u0 t)) t2))) (\lambda (u0: T).(\lambda (t: T).(ty3 g (CHead c0 (Bind b) u) v (THead (Bind Abst) u0 t)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) w u0))))))).(\lambda (t0: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t2 t0)).(\lambda (_: (((eq T t2 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t: T).(pc3 (CHead c0 (Bind b) u) (THead (Flat Appl) w (THead (Bind Abst) u0 t)) t0))) (\lambda (u0: T).(\lambda (t: T).(ty3 g (CHead c0 (Bind b) u) v (THead (Bind Abst) u0 t)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) w u0))))))).(\lambda (H7: (eq T (THead (Bind b) u t1) (THead (Flat Appl) w v))).(let H8 \def (eq_ind T (THead (Bind b) u t1) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) w v) H7) in (False_ind (ex3_2 T T (\lambda (u0: T).(\lambda (t3: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t3)) (THead (Bind b) u t2)))) (\lambda (u0: T).(\lambda (t3: T).(ty3 g c0 v (THead (Bind Abst) u0 t3)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0)))) H8)))))))))))))))) (\lambda (c0: C).(\lambda (w0: T).(\lambda (u: T).(\lambda (H1: (ty3 g c0 w0 u)).(\lambda (H2: (((eq T w0 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t)) u))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (v0: T).(\lambda (t: T).(\lambda (H3: (ty3 g c0 v0 (THead (Bind Abst) u t))).(\lambda (H4: (((eq T v0 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (H5: (eq T (THead (Flat Appl) w0 v0) (THead (Flat Appl) w v))).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow w0 | (TLRef _) \Rightarrow w0 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) w0 v0) (THead (Flat Appl) w v) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) w0 v0) (THead (Flat Appl) w v) H5) in (\lambda (H8: (eq T w0 w)).(let H9 \def (eq_ind T v0 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t1: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t1)) (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))))) H4 v H7) in (let H10 \def (eq_ind T v0 (\lambda (t0: T).(ty3 g c0 t0 (THead (Bind Abst) u t))) H3 v H7) in (let H11 \def (eq_ind T w0 (\lambda (t: T).((eq T t (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) u))) (\lambda (u: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u t0)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))))) H2 w H8) in (let H12 \def (eq_ind T w0 (\lambda (t: T).(ty3 g c0 t u)) H1 w H8) in (eq_ind_r T w (\lambda (t0: T).(ex3_2 T T (\lambda (u0: T).(\lambda (t1: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t1)) (THead (Flat Appl) t0 (THead (Bind Abst) u t))))) (\lambda (u0: T).(\lambda (t1: T).(ty3 g c0 v (THead (Bind Abst) u0 t1)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0))))) (ex3_2_intro T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) (THead (Flat Appl) w (THead (Bind Abst) u t))))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0))) u t (pc3_refl c0 (THead (Flat Appl) w (THead (Bind Abst) u t))) H10 H12) w0 H8))))))) H6)))))))))))) (\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 t2)).(\lambda (_: (((eq T t1 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) t2))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda (_: (((eq T t2 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) t0))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (H5: (eq T (THead (Flat Cast) t2 t1) (THead (Flat Appl) w v))).(let H6 \def (eq_ind T (THead (Flat Cast) t2 t1) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) w v) H5) in (False_ind (ex3_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) t2))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))) H6))))))))))) c y x H0))) H)))))). + \lambda (g: G).(\lambda (c: C).(\lambda (w: T).(\lambda (v: T).(\lambda (x: T).(\lambda (H: (ty3 g c (THead (Flat Appl) w v) x)).(insert_eq T (THead (Flat Appl) w v) (\lambda (t: T).(ty3 g c t x)) (ex3_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c (THead (Flat Appl) w (THead (Bind Abst) u t)) x))) (\lambda (u: T).(\lambda (t: T).(ty3 g c v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c w u)))) (\lambda (y: T).(\lambda (H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t1: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t1)) t0))) (\lambda (u: T).(\lambda (t1: T).(ty3 g c0 v (THead (Bind Abst) u t1)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: (((eq T t2 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t0)) t))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (u: T).(\lambda (t1: T).(\lambda (H3: (ty3 g c0 u t1)).(\lambda (H4: (((eq T u (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) t1))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (H5: (pc3 c0 t1 t2)).(\lambda (H6: (eq T u (THead (Flat Appl) w v))).(let H7 \def (f_equal T T (\lambda (e: T).e) u (THead (Flat Appl) w v) H6) in (let H8 \def (eq_ind T u (\lambda (t: T).((eq T t (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t0)) t1))) (\lambda (u: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u t0)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))))) H4 (THead (Flat Appl) w v) H7) in (let H9 \def (eq_ind T u (\lambda (t: T).(ty3 g c0 t t1)) H3 (THead (Flat Appl) w v) H7) in (let H10 \def (H8 (refl_equal T (THead (Flat Appl) w v))) in (ex3_2_ind T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) t1))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0))) (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) t2))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) t1)).(\lambda (H12: (ty3 g c0 v (THead (Bind Abst) x0 x1))).(\lambda (H13: (ty3 g c0 w x0)).(ex3_2_intro T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) t2))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0))) x0 x1 (pc3_t t1 c0 (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) H11 t2 H5) H12 H13)))))) H10)))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T (TSort m) (THead (Flat Appl) w v))).(let H2 \def (eq_ind T (TSort m) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) w v) H1) in (False_ind (ex3_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (TSort (next g m))))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))) H2))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (_: (getl n c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t0: T).(pc3 d (THead (Flat Appl) w (THead (Bind Abst) u t0)) t))) (\lambda (u: T).(\lambda (t: T).(ty3 g d v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g d w u))))))).(\lambda (H4: (eq T (TLRef n) (THead (Flat Appl) w v))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) w v) H4) in (False_ind (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) (lift (S n) O t)))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0)))) H5))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (_: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t0: T).(pc3 d (THead (Flat Appl) w (THead (Bind Abst) u t0)) t))) (\lambda (u: T).(\lambda (t: T).(ty3 g d v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g d w u))))))).(\lambda (H4: (eq T (TLRef n) (THead (Flat Appl) w v))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) w v) H4) in (False_ind (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) (lift (S n) O u)))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0)))) H5))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (_: (((eq T u (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t0)) t))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (b: B).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t1 t2)).(\lambda (_: (((eq T t1 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t: T).(pc3 (CHead c0 (Bind b) u) (THead (Flat Appl) w (THead (Bind Abst) u0 t)) t2))) (\lambda (u0: T).(\lambda (t: T).(ty3 g (CHead c0 (Bind b) u) v (THead (Bind Abst) u0 t)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) w u0))))))).(\lambda (t0: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t2 t0)).(\lambda (_: (((eq T t2 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t: T).(pc3 (CHead c0 (Bind b) u) (THead (Flat Appl) w (THead (Bind Abst) u0 t)) t0))) (\lambda (u0: T).(\lambda (t: T).(ty3 g (CHead c0 (Bind b) u) v (THead (Bind Abst) u0 t)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u) w u0))))))).(\lambda (H7: (eq T (THead (Bind b) u t1) (THead (Flat Appl) w v))).(let H8 \def (eq_ind T (THead (Bind b) u t1) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) w v) H7) in (False_ind (ex3_2 T T (\lambda (u0: T).(\lambda (t3: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t3)) (THead (Bind b) u t2)))) (\lambda (u0: T).(\lambda (t3: T).(ty3 g c0 v (THead (Bind Abst) u0 t3)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0)))) H8)))))))))))))))) (\lambda (c0: C).(\lambda (w0: T).(\lambda (u: T).(\lambda (H1: (ty3 g c0 w0 u)).(\lambda (H2: (((eq T w0 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t)) u))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (v0: T).(\lambda (t: T).(\lambda (H3: (ty3 g c0 v0 (THead (Bind Abst) u t))).(\lambda (H4: (((eq T v0 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (H5: (eq T (THead (Flat Appl) w0 v0) (THead (Flat Appl) w v))).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow w0 | (TLRef _) \Rightarrow w0 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) w0 v0) (THead (Flat Appl) w v) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) w0 v0) (THead (Flat Appl) w v) H5) in (\lambda (H8: (eq T w0 w)).(let H9 \def (eq_ind T v0 (\lambda (t0: T).((eq T t0 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t1: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t1)) (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))))) H4 v H7) in (let H10 \def (eq_ind T v0 (\lambda (t0: T).(ty3 g c0 t0 (THead (Bind Abst) u t))) H3 v H7) in (let H11 \def (eq_ind T w0 (\lambda (t: T).((eq T t (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) u))) (\lambda (u: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u t0)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))))) H2 w H8) in (let H12 \def (eq_ind T w0 (\lambda (t: T).(ty3 g c0 t u)) H1 w H8) in (eq_ind_r T w (\lambda (t0: T).(ex3_2 T T (\lambda (u0: T).(\lambda (t1: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t1)) (THead (Flat Appl) t0 (THead (Bind Abst) u t))))) (\lambda (u0: T).(\lambda (t1: T).(ty3 g c0 v (THead (Bind Abst) u0 t1)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0))))) (ex3_2_intro T T (\lambda (u0: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t0)) (THead (Flat Appl) w (THead (Bind Abst) u t))))) (\lambda (u0: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u0 t0)))) (\lambda (u0: T).(\lambda (_: T).(ty3 g c0 w u0))) u t (pc3_refl c0 (THead (Flat Appl) w (THead (Bind Abst) u t))) H10 H12) w0 H8))))))) H6)))))))))))) (\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1 t2)).(\lambda (_: (((eq T t1 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) t2))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda (_: (((eq T t2 (THead (Flat Appl) w v)) \to (ex3_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) t0))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u))))))).(\lambda (H5: (eq T (THead (Flat Cast) t2 t1) (THead (Flat Appl) w v))).(let H6 \def (eq_ind T (THead (Flat Cast) t2 t1) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) w v) H5) in (False_ind (ex3_2 T T (\lambda (u: T).(\lambda (t: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) t2))) (\lambda (u: T).(\lambda (t: T).(ty3 g c0 v (THead (Bind Abst) u t)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c0 w u)))) H6))))))))))) c y x H0))) H)))))). theorem ty3_gen_cast: \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).(\forall (x: T).((ty3 g c (THead (Flat Cast) t2 t1) x) \to (land (pc3 c t2 x) (ty3 g c t1 t2))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (x: T).(\lambda (H: (ty3 g c (THead (Flat Cast) t2 t1) x)).(insert_eq T (THead (Flat Cast) t2 t1) (\lambda (t: T).(ty3 g c t x)) (land (pc3 c t2 x) (ty3 g c t1 t2)) (\lambda (y: T).(\lambda (H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t0) (ty3 g c0 t1 t2)))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t0 t)).(\lambda (_: (((eq T t0 (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t) (ty3 g c0 t1 t2))))).(\lambda (u: T).(\lambda (t3: T).(\lambda (H3: (ty3 g c0 u t3)).(\lambda (H4: (((eq T u (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t3) (ty3 g c0 t1 t2))))).(\lambda (H5: (pc3 c0 t3 t0)).(\lambda (H6: (eq T u (THead (Flat Cast) t2 t1))).(let H7 \def (f_equal T T (\lambda (e: T).e) u (THead (Flat Cast) t2 t1) H6) in (let H8 \def (eq_ind T u (\lambda (t: T).((eq T t (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t3) (ty3 g c0 t1 t2)))) H4 (THead (Flat Cast) t2 t1) H7) in (let H9 \def (eq_ind T u (\lambda (t: T).(ty3 g c0 t t3)) H3 (THead (Flat Cast) t2 t1) H7) in (let H10 \def (H8 (refl_equal T (THead (Flat Cast) t2 t1))) in (and_ind (pc3 c0 t2 t3) (ty3 g c0 t1 t2) (land (pc3 c0 t2 t0) (ty3 g c0 t1 t2)) (\lambda (H11: (pc3 c0 t2 t3)).(\lambda (H12: (ty3 g c0 t1 t2)).(conj (pc3 c0 t2 t0) (ty3 g c0 t1 t2) (pc3_t t3 c0 t2 H11 t0 H5) H12))) H10)))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T (TSort m) (THead (Flat Cast) t2 t1))).(let H2 \def (eq_ind T (TSort m) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t2 t1) H1) in (False_ind (land (pc3 c0 t2 (TSort (next g m))) (ty3 g c0 t1 t2)) H2))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (_: (getl n c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u (THead (Flat Cast) t2 t1)) \to (land (pc3 d t2 t) (ty3 g d t1 t2))))).(\lambda (H4: (eq T (TLRef n) (THead (Flat Cast) t2 t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t2 t1) H4) in (False_ind (land (pc3 c0 t2 (lift (S n) O t)) (ty3 g c0 t1 t2)) H5))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (_: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u (THead (Flat Cast) t2 t1)) \to (land (pc3 d t2 t) (ty3 g d t1 t2))))).(\lambda (H4: (eq T (TLRef n) (THead (Flat Cast) t2 t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t2 t1) H4) in (False_ind (land (pc3 c0 t2 (lift (S n) O u)) (ty3 g c0 t1 t2)) H5))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (_: (((eq T u (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t) (ty3 g c0 t1 t2))))).(\lambda (b: B).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t0 t3)).(\lambda (_: (((eq T t0 (THead (Flat Cast) t2 t1)) \to (land (pc3 (CHead c0 (Bind b) u) t2 t3) (ty3 g (CHead c0 (Bind b) u) t1 t2))))).(\lambda (t4: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) t2 t1)) \to (land (pc3 (CHead c0 (Bind b) u) t2 t4) (ty3 g (CHead c0 (Bind b) u) t1 t2))))).(\lambda (H7: (eq T (THead (Bind b) u t0) (THead (Flat Cast) t2 t1))).(let H8 \def (eq_ind T (THead (Bind b) u t0) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) t2 t1) H7) in (False_ind (land (pc3 c0 t2 (THead (Bind b) u t3)) (ty3 g c0 t1 t2)) H8)))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (_: (((eq T w (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 u) (ty3 g c0 t1 t2))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (_: (((eq T v (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 (THead (Bind Abst) u t)) (ty3 g c0 t1 t2))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (THead (Flat Cast) t2 t1))).(let H6 \def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: T).(match ee return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) t2 t1) H5) in (False_ind (land (pc3 c0 t2 (THead (Flat Appl) w (THead (Bind Abst) u t))) (ty3 g c0 t1 t2)) H6)))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t3: T).(\lambda (H1: (ty3 g c0 t0 t3)).(\lambda (H2: (((eq T t0 (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t3) (ty3 g c0 t1 t2))))).(\lambda (t4: T).(\lambda (H3: (ty3 g c0 t3 t4)).(\lambda (H4: (((eq T t3 (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t4) (ty3 g c0 t1 t2))))).(\lambda (H5: (eq T (THead (Flat Cast) t3 t0) (THead (Flat Cast) t2 t1))).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) t3 t0) (THead (Flat Cast) t2 t1) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) t3 t0) (THead (Flat Cast) t2 t1) H5) in (\lambda (H8: (eq T t3 t2)).(let H9 \def (eq_ind T t3 (\lambda (t: T).((eq T t (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t4) (ty3 g c0 t1 t2)))) H4 t2 H8) in (let H10 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t t4)) H3 t2 H8) in (let H11 \def (eq_ind T t3 (\lambda (t: T).((eq T t0 (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t) (ty3 g c0 t1 t2)))) H2 t2 H8) in (let H12 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t0 t)) H1 t2 H8) in (eq_ind_r T t2 (\lambda (t: T).(land (pc3 c0 t2 t) (ty3 g c0 t1 t2))) (let H13 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t2) (ty3 g c0 t1 t2)))) H11 t1 H7) in (let H14 \def (eq_ind T t0 (\lambda (t: T).(ty3 g c0 t t2)) H12 t1 H7) in (conj (pc3 c0 t2 t2) (ty3 g c0 t1 t2) (pc3_refl c0 t2) H14))) t3 H8))))))) H6))))))))))) c y x H0))) H)))))). + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (x: T).(\lambda (H: (ty3 g c (THead (Flat Cast) t2 t1) x)).(insert_eq T (THead (Flat Cast) t2 t1) (\lambda (t: T).(ty3 g c t x)) (land (pc3 c t2 x) (ty3 g c t1 t2)) (\lambda (y: T).(\lambda (H0: (ty3 g c y x)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t0) (ty3 g c0 t1 t2)))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t0 t)).(\lambda (_: (((eq T t0 (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t) (ty3 g c0 t1 t2))))).(\lambda (u: T).(\lambda (t3: T).(\lambda (H3: (ty3 g c0 u t3)).(\lambda (H4: (((eq T u (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t3) (ty3 g c0 t1 t2))))).(\lambda (H5: (pc3 c0 t3 t0)).(\lambda (H6: (eq T u (THead (Flat Cast) t2 t1))).(let H7 \def (f_equal T T (\lambda (e: T).e) u (THead (Flat Cast) t2 t1) H6) in (let H8 \def (eq_ind T u (\lambda (t: T).((eq T t (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t3) (ty3 g c0 t1 t2)))) H4 (THead (Flat Cast) t2 t1) H7) in (let H9 \def (eq_ind T u (\lambda (t: T).(ty3 g c0 t t3)) H3 (THead (Flat Cast) t2 t1) H7) in (let H10 \def (H8 (refl_equal T (THead (Flat Cast) t2 t1))) in (and_ind (pc3 c0 t2 t3) (ty3 g c0 t1 t2) (land (pc3 c0 t2 t0) (ty3 g c0 t1 t2)) (\lambda (H11: (pc3 c0 t2 t3)).(\lambda (H12: (ty3 g c0 t1 t2)).(conj (pc3 c0 t2 t0) (ty3 g c0 t1 t2) (pc3_t t3 c0 t2 H11 t0 H5) H12))) H10)))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (H1: (eq T (TSort m) (THead (Flat Cast) t2 t1))).(let H2 \def (eq_ind T (TSort m) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t2 t1) H1) in (False_ind (land (pc3 c0 t2 (TSort (next g m))) (ty3 g c0 t1 t2)) H2))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (_: (getl n c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u (THead (Flat Cast) t2 t1)) \to (land (pc3 d t2 t) (ty3 g d t1 t2))))).(\lambda (H4: (eq T (TLRef n) (THead (Flat Cast) t2 t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t2 t1) H4) in (False_ind (land (pc3 c0 t2 (lift (S n) O t)) (ty3 g c0 t1 t2)) H5))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (_: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (_: (((eq T u (THead (Flat Cast) t2 t1)) \to (land (pc3 d t2 t) (ty3 g d t1 t2))))).(\lambda (H4: (eq T (TLRef n) (THead (Flat Cast) t2 t1))).(let H5 \def (eq_ind T (TLRef n) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t2 t1) H4) in (False_ind (land (pc3 c0 t2 (lift (S n) O u)) (ty3 g c0 t1 t2)) H5))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (_: (((eq T u (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t) (ty3 g c0 t1 t2))))).(\lambda (b: B).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t0 t3)).(\lambda (_: (((eq T t0 (THead (Flat Cast) t2 t1)) \to (land (pc3 (CHead c0 (Bind b) u) t2 t3) (ty3 g (CHead c0 (Bind b) u) t1 t2))))).(\lambda (t4: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t3 t4)).(\lambda (_: (((eq T t3 (THead (Flat Cast) t2 t1)) \to (land (pc3 (CHead c0 (Bind b) u) t2 t4) (ty3 g (CHead c0 (Bind b) u) t1 t2))))).(\lambda (H7: (eq T (THead (Bind b) u t0) (THead (Flat Cast) t2 t1))).(let H8 \def (eq_ind T (THead (Bind b) u t0) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) t2 t1) H7) in (False_ind (land (pc3 c0 t2 (THead (Bind b) u t3)) (ty3 g c0 t1 t2)) H8)))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (_: (((eq T w (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 u) (ty3 g c0 t1 t2))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (_: (((eq T v (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 (THead (Bind Abst) u t)) (ty3 g c0 t1 t2))))).(\lambda (H5: (eq T (THead (Flat Appl) w v) (THead (Flat Cast) t2 t1))).(let H6 \def (eq_ind T (THead (Flat Appl) w v) (\lambda (ee: T).(match ee return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) t2 t1) H5) in (False_ind (land (pc3 c0 t2 (THead (Flat Appl) w (THead (Bind Abst) u t))) (ty3 g c0 t1 t2)) H6)))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t3: T).(\lambda (H1: (ty3 g c0 t0 t3)).(\lambda (H2: (((eq T t0 (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t3) (ty3 g c0 t1 t2))))).(\lambda (t4: T).(\lambda (H3: (ty3 g c0 t3 t4)).(\lambda (H4: (((eq T t3 (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t4) (ty3 g c0 t1 t2))))).(\lambda (H5: (eq T (THead (Flat Cast) t3 t0) (THead (Flat Cast) t2 t1))).(let H6 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t3 | (TLRef _) \Rightarrow t3 | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) t3 t0) (THead (Flat Cast) t2 t1) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) t3 t0) (THead (Flat Cast) t2 t1) H5) in (\lambda (H8: (eq T t3 t2)).(let H9 \def (eq_ind T t3 (\lambda (t: T).((eq T t (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t4) (ty3 g c0 t1 t2)))) H4 t2 H8) in (let H10 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t t4)) H3 t2 H8) in (let H11 \def (eq_ind T t3 (\lambda (t: T).((eq T t0 (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t) (ty3 g c0 t1 t2)))) H2 t2 H8) in (let H12 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t0 t)) H1 t2 H8) in (eq_ind_r T t2 (\lambda (t: T).(land (pc3 c0 t2 t) (ty3 g c0 t1 t2))) (let H13 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead (Flat Cast) t2 t1)) \to (land (pc3 c0 t2 t2) (ty3 g c0 t1 t2)))) H11 t1 H7) in (let H14 \def (eq_ind T t0 (\lambda (t: T).(ty3 g c0 t t2)) H12 t1 H7) in (conj (pc3 c0 t2 t2) (ty3 g c0 t1 t2) (pc3_refl c0 t2) H14))) t3 H8))))))) H6))))))))))) c y x H0))) H)))))). theorem ty3_lift: \forall (g: G).(\forall (e: C).(\forall (t1: T).(\forall (t2: T).((ty3 g e t1 t2) \to (\forall (c: C).(\forall (d: nat).(\forall (h: nat).((drop h d c e) \to (ty3 g c (lift h d t1) (lift h d t2)))))))))) @@ -2960,12 +2960,12 @@ theorem ty3_correct: theorem ty3_unique: \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).((ty3 g c u t1) \to (\forall (t2: T).((ty3 g c u t2) \to (pc3 c t1 t2))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (H: (ty3 g c u t1)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (t2: T).((ty3 g c0 t t2) \to (pc3 c0 t0 t2)))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: ((\forall (t3: T).((ty3 g c0 t2 t3) \to (pc3 c0 t t3))))).(\lambda (u0: T).(\lambda (t0: T).(\lambda (_: (ty3 g c0 u0 t0)).(\lambda (H3: ((\forall (t2: T).((ty3 g c0 u0 t2) \to (pc3 c0 t0 t2))))).(\lambda (H4: (pc3 c0 t0 t2)).(\lambda (t3: T).(\lambda (H5: (ty3 g c0 u0 t3)).(pc3_t t0 c0 t2 (pc3_s c0 t2 t0 H4) t3 (H3 t3 H5)))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (t2: T).(\lambda (H0: (ty3 g c0 (TSort m) t2)).(ty3_gen_sort g c0 t2 m H0))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) u0))).(\lambda (t: T).(\lambda (_: (ty3 g d u0 t)).(\lambda (H2: ((\forall (t2: T).((ty3 g d u0 t2) \to (pc3 d t t2))))).(\lambda (t2: T).(\lambda (H3: (ty3 g c0 (TLRef n) t2)).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0))))) (pc3 c0 (lift (S n) O t) t2) (\lambda (H4: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0)))) (pc3 c0 (lift (S n) O t) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H5: (pc3 c0 (lift (S n) O x2) t2)).(\lambda (H6: (getl n c0 (CHead x0 (Bind Abbr) x1))).(\lambda (H7: (ty3 g x0 x1 x2)).(let H8 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u0) (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in ((let H10 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u0) (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (\lambda (H11: (eq C d x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t: T).(getl n c0 (CHead x0 (Bind Abbr) t))) H8 u0 H10) in (let H13 \def (eq_ind_r T x1 (\lambda (t: T).(ty3 g x0 t x2)) H7 u0 H10) in (let H14 \def (eq_ind_r C x0 (\lambda (c: C).(getl n c0 (CHead c (Bind Abbr) u0))) H12 d H11) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(ty3 g c u0 x2)) H13 d H11) in (pc3_t (lift (S n) O x2) c0 (lift (S n) O t) (pc3_lift c0 d (S n) O (getl_drop Abbr c0 d u0 n H14) t x2 (H2 x2 H15)) t2 H5))))))) H9))))))))) H4)) (\lambda (H4: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0)))) (pc3 c0 (lift (S n) O t) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c0 (lift (S n) O x1) t2)).(\lambda (H6: (getl n c0 (CHead x0 (Bind Abst) x1))).(\lambda (_: (ty3 g x0 x1 x2)).(let H8 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (False_ind (pc3 c0 (lift (S n) O t) t2) H9))))))))) H4)) (ty3_gen_lref g c0 t2 n H3)))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abst) u0))).(\lambda (t: T).(\lambda (_: (ty3 g d u0 t)).(\lambda (_: ((\forall (t2: T).((ty3 g d u0 t2) \to (pc3 d t t2))))).(\lambda (t2: T).(\lambda (H3: (ty3 g c0 (TLRef n) t2)).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0))))) (pc3 c0 (lift (S n) O u0) t2) (\lambda (H4: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0)))) (pc3 c0 (lift (S n) O u0) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c0 (lift (S n) O x2) t2)).(\lambda (H6: (getl n c0 (CHead x0 (Bind Abbr) x1))).(\lambda (_: (ty3 g x0 x1 x2)).(let H8 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (False_ind (pc3 c0 (lift (S n) O u0) t2) H9))))))))) H4)) (\lambda (H4: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0)))) (pc3 c0 (lift (S n) O u0) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H5: (pc3 c0 (lift (S n) O x1) t2)).(\lambda (H6: (getl n c0 (CHead x0 (Bind Abst) x1))).(\lambda (H7: (ty3 g x0 x1 x2)).(let H8 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u0) (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in ((let H10 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u0) (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (\lambda (H11: (eq C d x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t: T).(getl n c0 (CHead x0 (Bind Abst) t))) H8 u0 H10) in (let H13 \def (eq_ind_r T x1 (\lambda (t: T).(ty3 g x0 t x2)) H7 u0 H10) in (let H14 \def (eq_ind_r T x1 (\lambda (t: T).(pc3 c0 (lift (S n) O t) t2)) H5 u0 H10) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(getl n c0 (CHead c (Bind Abst) u0))) H12 d H11) in (let H16 \def (eq_ind_r C x0 (\lambda (c: C).(ty3 g c u0 x2)) H13 d H11) in H14))))))) H9))))))))) H4)) (ty3_gen_lref g c0 t2 n H3)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u0 t)).(\lambda (_: ((\forall (t2: T).((ty3 g c0 u0 t2) \to (pc3 c0 t t2))))).(\lambda (b: B).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) t0 t2)).(\lambda (H3: ((\forall (t3: T).((ty3 g (CHead c0 (Bind b) u0) t0 t3) \to (pc3 (CHead c0 (Bind b) u0) t2 t3))))).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) t2 t3)).(\lambda (_: ((\forall (t4: T).((ty3 g (CHead c0 (Bind b) u0) t2 t4) \to (pc3 (CHead c0 (Bind b) u0) t3 t4))))).(\lambda (t4: T).(\lambda (H6: (ty3 g c0 (THead (Bind b) u0 t0) t4)).(ex4_3_ind T T T (\lambda (t5: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u0 t5) t4)))) (\lambda (_: T).(\lambda (t6: T).(\lambda (_: T).(ty3 g c0 u0 t6)))) (\lambda (t5: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u0) t0 t5)))) (\lambda (t5: T).(\lambda (_: T).(\lambda (t7: T).(ty3 g (CHead c0 (Bind b) u0) t5 t7)))) (pc3 c0 (THead (Bind b) u0 t2) t4) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H7: (pc3 c0 (THead (Bind b) u0 x0) t4)).(\lambda (_: (ty3 g c0 u0 x1)).(\lambda (H9: (ty3 g (CHead c0 (Bind b) u0) t0 x0)).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) x0 x2)).(pc3_t (THead (Bind b) u0 x0) c0 (THead (Bind b) u0 t2) (pc3_head_2 c0 u0 t2 x0 (Bind b) (H3 x0 H9)) t4 H7)))))))) (ty3_gen_bind g b c0 u0 t0 t4 H6))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u0: T).(\lambda (_: (ty3 g c0 w u0)).(\lambda (_: ((\forall (t2: T).((ty3 g c0 w t2) \to (pc3 c0 u0 t2))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u0 t))).(\lambda (H3: ((\forall (t2: T).((ty3 g c0 v t2) \to (pc3 c0 (THead (Bind Abst) u0 t) t2))))).(\lambda (t2: T).(\lambda (H4: (ty3 g c0 (THead (Flat Appl) w v) t2)).(ex3_2_ind T T (\lambda (u1: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u1 t0)) t2))) (\lambda (u1: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u1 t0)))) (\lambda (u1: T).(\lambda (_: T).(ty3 g c0 w u1))) (pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t)) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) t2)).(\lambda (H6: (ty3 g c0 v (THead (Bind Abst) x0 x1))).(\lambda (_: (ty3 g c0 w x0)).(pc3_t (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t)) (pc3_thin_dx c0 (THead (Bind Abst) u0 t) (THead (Bind Abst) x0 x1) (H3 (THead (Bind Abst) x0 x1) H6) w Appl) t2 H5)))))) (ty3_gen_appl g c0 w v t2 H4))))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t0 t2)).(\lambda (_: ((\forall (t3: T).((ty3 g c0 t0 t3) \to (pc3 c0 t2 t3))))).(\lambda (t3: T).(\lambda (_: (ty3 g c0 t2 t3)).(\lambda (_: ((\forall (t4: T).((ty3 g c0 t2 t4) \to (pc3 c0 t3 t4))))).(\lambda (t4: T).(\lambda (H4: (ty3 g c0 (THead (Flat Cast) t2 t0) t4)).(and_ind (pc3 c0 t2 t4) (ty3 g c0 t0 t2) (pc3 c0 t2 t4) (\lambda (H5: (pc3 c0 t2 t4)).(\lambda (_: (ty3 g c0 t0 t2)).H5)) (ty3_gen_cast g c0 t0 t2 t4 H4)))))))))))) c u t1 H))))). + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (H: (ty3 g c u t1)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (t2: T).((ty3 g c0 t t2) \to (pc3 c0 t0 t2)))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: ((\forall (t3: T).((ty3 g c0 t2 t3) \to (pc3 c0 t t3))))).(\lambda (u0: T).(\lambda (t0: T).(\lambda (_: (ty3 g c0 u0 t0)).(\lambda (H3: ((\forall (t2: T).((ty3 g c0 u0 t2) \to (pc3 c0 t0 t2))))).(\lambda (H4: (pc3 c0 t0 t2)).(\lambda (t3: T).(\lambda (H5: (ty3 g c0 u0 t3)).(pc3_t t0 c0 t2 (pc3_s c0 t2 t0 H4) t3 (H3 t3 H5)))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (t2: T).(\lambda (H0: (ty3 g c0 (TSort m) t2)).(ty3_gen_sort g c0 t2 m H0))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) u0))).(\lambda (t: T).(\lambda (_: (ty3 g d u0 t)).(\lambda (H2: ((\forall (t2: T).((ty3 g d u0 t2) \to (pc3 d t t2))))).(\lambda (t2: T).(\lambda (H3: (ty3 g c0 (TLRef n) t2)).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0))))) (pc3 c0 (lift (S n) O t) t2) (\lambda (H4: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0)))) (pc3 c0 (lift (S n) O t) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H5: (pc3 c0 (lift (S n) O x2) t2)).(\lambda (H6: (getl n c0 (CHead x0 (Bind Abbr) x1))).(\lambda (H7: (ty3 g x0 x1 x2)).(let H8 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u0) (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in ((let H10 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u0) (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (\lambda (H11: (eq C d x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t: T).(getl n c0 (CHead x0 (Bind Abbr) t))) H8 u0 H10) in (let H13 \def (eq_ind_r T x1 (\lambda (t: T).(ty3 g x0 t x2)) H7 u0 H10) in (let H14 \def (eq_ind_r C x0 (\lambda (c: C).(getl n c0 (CHead c (Bind Abbr) u0))) H12 d H11) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(ty3 g c u0 x2)) H13 d H11) in (pc3_t (lift (S n) O x2) c0 (lift (S n) O t) (pc3_lift c0 d (S n) O (getl_drop Abbr c0 d u0 n H14) t x2 (H2 x2 H15)) t2 H5))))))) H9))))))))) H4)) (\lambda (H4: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0)))) (pc3 c0 (lift (S n) O t) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c0 (lift (S n) O x1) t2)).(\lambda (H6: (getl n c0 (CHead x0 (Bind Abst) x1))).(\lambda (_: (ty3 g x0 x1 x2)).(let H8 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (False_ind (pc3 c0 (lift (S n) O t) t2) H9))))))))) H4)) (ty3_gen_lref g c0 t2 n H3)))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abst) u0))).(\lambda (t: T).(\lambda (_: (ty3 g d u0 t)).(\lambda (_: ((\forall (t2: T).((ty3 g d u0 t2) \to (pc3 d t t2))))).(\lambda (t2: T).(\lambda (H3: (ty3 g c0 (TLRef n) t2)).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0))))) (pc3 c0 (lift (S n) O u0) t2) (\lambda (H4: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c0 (lift (S n) O t) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(pc3 c0 (lift (S n) O t0) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abbr) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0)))) (pc3 c0 (lift (S n) O u0) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c0 (lift (S n) O x2) t2)).(\lambda (H6: (getl n c0 (CHead x0 (Bind Abbr) x1))).(\lambda (_: (ty3 g x0 x1 x2)).(let H8 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (False_ind (pc3 c0 (lift (S n) O u0) t2) H9))))))))) H4)) (\lambda (H4: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u) t2)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(pc3 c0 (lift (S n) O u1) t2)))) (\lambda (e: C).(\lambda (u1: T).(\lambda (_: T).(getl n c0 (CHead e (Bind Abst) u1))))) (\lambda (e: C).(\lambda (u1: T).(\lambda (t0: T).(ty3 g e u1 t0)))) (pc3 c0 (lift (S n) O u0) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H5: (pc3 c0 (lift (S n) O x1) t2)).(\lambda (H6: (getl n c0 (CHead x0 (Bind Abst) x1))).(\lambda (H7: (ty3 g x0 x1 x2)).(let H8 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (let H9 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u0) (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in ((let H10 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u0) (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (\lambda (H11: (eq C d x0)).(let H12 \def (eq_ind_r T x1 (\lambda (t: T).(getl n c0 (CHead x0 (Bind Abst) t))) H8 u0 H10) in (let H13 \def (eq_ind_r T x1 (\lambda (t: T).(ty3 g x0 t x2)) H7 u0 H10) in (let H14 \def (eq_ind_r T x1 (\lambda (t: T).(pc3 c0 (lift (S n) O t) t2)) H5 u0 H10) in (let H15 \def (eq_ind_r C x0 (\lambda (c: C).(getl n c0 (CHead c (Bind Abst) u0))) H12 d H11) in (let H16 \def (eq_ind_r C x0 (\lambda (c: C).(ty3 g c u0 x2)) H13 d H11) in H14))))))) H9))))))))) H4)) (ty3_gen_lref g c0 t2 n H3)))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u0 t)).(\lambda (_: ((\forall (t2: T).((ty3 g c0 u0 t2) \to (pc3 c0 t t2))))).(\lambda (b: B).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) t0 t2)).(\lambda (H3: ((\forall (t3: T).((ty3 g (CHead c0 (Bind b) u0) t0 t3) \to (pc3 (CHead c0 (Bind b) u0) t2 t3))))).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) t2 t3)).(\lambda (_: ((\forall (t4: T).((ty3 g (CHead c0 (Bind b) u0) t2 t4) \to (pc3 (CHead c0 (Bind b) u0) t3 t4))))).(\lambda (t4: T).(\lambda (H6: (ty3 g c0 (THead (Bind b) u0 t0) t4)).(ex4_3_ind T T T (\lambda (t5: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind b) u0 t5) t4)))) (\lambda (_: T).(\lambda (t6: T).(\lambda (_: T).(ty3 g c0 u0 t6)))) (\lambda (t5: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind b) u0) t0 t5)))) (\lambda (t5: T).(\lambda (_: T).(\lambda (t7: T).(ty3 g (CHead c0 (Bind b) u0) t5 t7)))) (pc3 c0 (THead (Bind b) u0 t2) t4) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H7: (pc3 c0 (THead (Bind b) u0 x0) t4)).(\lambda (_: (ty3 g c0 u0 x1)).(\lambda (H9: (ty3 g (CHead c0 (Bind b) u0) t0 x0)).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) x0 x2)).(pc3_t (THead (Bind b) u0 x0) c0 (THead (Bind b) u0 t2) (pc3_head_2 c0 u0 t2 x0 (Bind b) (H3 x0 H9)) t4 H7)))))))) (ty3_gen_bind g b c0 u0 t0 t4 H6))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u0: T).(\lambda (_: (ty3 g c0 w u0)).(\lambda (_: ((\forall (t2: T).((ty3 g c0 w t2) \to (pc3 c0 u0 t2))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u0 t))).(\lambda (H3: ((\forall (t2: T).((ty3 g c0 v t2) \to (pc3 c0 (THead (Bind Abst) u0 t) t2))))).(\lambda (t2: T).(\lambda (H4: (ty3 g c0 (THead (Flat Appl) w v) t2)).(ex3_2_ind T T (\lambda (u1: T).(\lambda (t0: T).(pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u1 t0)) t2))) (\lambda (u1: T).(\lambda (t0: T).(ty3 g c0 v (THead (Bind Abst) u1 t0)))) (\lambda (u1: T).(\lambda (_: T).(ty3 g c0 w u1))) (pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t)) t2) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (pc3 c0 (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) t2)).(\lambda (H6: (ty3 g c0 v (THead (Bind Abst) x0 x1))).(\lambda (_: (ty3 g c0 w x0)).(pc3_t (THead (Flat Appl) w (THead (Bind Abst) x0 x1)) c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t)) (pc3_thin_dx c0 (THead (Bind Abst) u0 t) (THead (Bind Abst) x0 x1) (H3 (THead (Bind Abst) x0 x1) H6) w Appl) t2 H5)))))) (ty3_gen_appl g c0 w v t2 H4))))))))))))) (\lambda (c0: C).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t0 t2)).(\lambda (_: ((\forall (t3: T).((ty3 g c0 t0 t3) \to (pc3 c0 t2 t3))))).(\lambda (t3: T).(\lambda (_: (ty3 g c0 t2 t3)).(\lambda (_: ((\forall (t4: T).((ty3 g c0 t2 t4) \to (pc3 c0 t3 t4))))).(\lambda (t4: T).(\lambda (H4: (ty3 g c0 (THead (Flat Cast) t2 t0) t4)).(and_ind (pc3 c0 t2 t4) (ty3 g c0 t0 t2) (pc3 c0 t2 t4) (\lambda (H5: (pc3 c0 t2 t4)).(\lambda (_: (ty3 g c0 t0 t2)).H5)) (ty3_gen_cast g c0 t0 t2 t4 H4)))))))))))) c u t1 H))))). theorem ty3_fsubst0: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t: T).((ty3 g c1 t1 t) \to (\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u c1 t1 c2 t2) \to (\forall (e: C).((getl i c1 (CHead e (Bind Abbr) u)) \to (ty3 g c2 t2 t)))))))))))) \def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: (ty3 g c1 t1 t)).(ty3_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (t2: T).(\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c t0 c2 t3) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c2 t3 t2))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t0: T).(\lambda (H0: (ty3 g c t2 t0)).(\lambda (H1: ((\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c t2 c2 t3) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c2 t3 t0)))))))))).(\lambda (u: T).(\lambda (t3: T).(\lambda (_: (ty3 g c u t3)).(\lambda (H3: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 t2) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 t3)))))))))).(\lambda (H4: (pc3 c t3 t2)).(\lambda (i: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t4: T).(\lambda (H5: (fsubst0 i u0 c u c2 t4)).(fsubst0_ind i u0 c u (\lambda (c0: C).(\lambda (t5: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c0 t5 t2))))) (\lambda (t5: T).(\lambda (H6: (subst0 i u0 u t5)).(\lambda (e: C).(\lambda (H7: (getl i c (CHead e (Bind Abbr) u0))).(ty3_conv g c t2 t0 H0 t5 t3 (H3 i u0 c t5 (fsubst0_snd i u0 c u t5 H6) e H7) H4))))) (\lambda (c3: C).(\lambda (H6: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H7: (getl i c (CHead e (Bind Abbr) u0))).(ty3_conv g c3 t2 t0 (H1 i u0 c3 t2 (fsubst0_fst i u0 c t2 c3 H6) e H7) u t3 (H3 i u0 c3 u (fsubst0_fst i u0 c u c3 H6) e H7) (pc3_fsubst0 c t3 t2 H4 i u0 c3 t3 (fsubst0_fst i u0 c t3 c3 H6) e H7)))))) (\lambda (t5: T).(\lambda (H6: (subst0 i u0 u t5)).(\lambda (c3: C).(\lambda (H7: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H8: (getl i c (CHead e (Bind Abbr) u0))).(ty3_conv g c3 t2 t0 (H1 i u0 c3 t2 (fsubst0_fst i u0 c t2 c3 H7) e H8) t5 t3 (H3 i u0 c3 t5 (fsubst0_both i u0 c u t5 H6 c3 H7) e H8) (pc3_fsubst0 c t3 t2 H4 i u0 c3 t3 (fsubst0_fst i u0 c t3 c3 H7) e H8)))))))) c2 t4 H5)))))))))))))))) (\lambda (c: C).(\lambda (m: nat).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H0: (fsubst0 i u c (TSort m) c2 t2)).(fsubst0_ind i u c (TSort m) (\lambda (c0: C).(\lambda (t0: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c0 t0 (TSort (next g m))))))) (\lambda (t3: T).(\lambda (H1: (subst0 i u (TSort m) t3)).(\lambda (e: C).(\lambda (_: (getl i c (CHead e (Bind Abbr) u))).(subst0_gen_sort u t3 i m H1 (ty3 g c t3 (TSort (next g m)))))))) (\lambda (c3: C).(\lambda (_: (csubst0 i u c c3)).(\lambda (e: C).(\lambda (_: (getl i c (CHead e (Bind Abbr) u))).(ty3_sort g c3 m))))) (\lambda (t3: T).(\lambda (H1: (subst0 i u (TSort m) t3)).(\lambda (c3: C).(\lambda (_: (csubst0 i u c c3)).(\lambda (e: C).(\lambda (_: (getl i c (CHead e (Bind Abbr) u))).(subst0_gen_sort u t3 i m H1 (ty3 g c3 t3 (TSort (next g m)))))))))) c2 t2 H0)))))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind Abbr) u))).(\lambda (t0: T).(\lambda (H1: (ty3 g d u t0)).(\lambda (H2: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 d u c2 t2) \to (\forall (e: C).((getl i d (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 t0)))))))))).(\lambda (i: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H3: (fsubst0 i u0 c (TLRef n) c2 t2)).(fsubst0_ind i u0 c (TLRef n) (\lambda (c0: C).(\lambda (t3: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c0 t3 (lift (S n) O t0)))))) (\lambda (t3: T).(\lambda (H4: (subst0 i u0 (TLRef n) t3)).(\lambda (e: C).(\lambda (H5: (getl i c (CHead e (Bind Abbr) u0))).(and_ind (eq nat n i) (eq T t3 (lift (S n) O u0)) (ty3 g c t3 (lift (S n) O t0)) (\lambda (H6: (eq nat n i)).(\lambda (H7: (eq T t3 (lift (S n) O u0))).(eq_ind_r T (lift (S n) O u0) (\lambda (t4: T).(ty3 g c t4 (lift (S n) O t0))) (let H8 \def (eq_ind_r nat i (\lambda (n: nat).(getl n c (CHead e (Bind Abbr) u0))) H5 n H6) in (let H9 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl n c c0)) H0 (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H8)) in (let H10 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H8)) in ((let H11 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H8)) in (\lambda (H12: (eq C d e)).(let H13 \def (eq_ind_r C e (\lambda (c0: C).(getl n c (CHead c0 (Bind Abbr) u0))) H9 d H12) in (let H14 \def (eq_ind_r T u0 (\lambda (t: T).(getl n c (CHead d (Bind Abbr) t))) H13 u H11) in (eq_ind T u (\lambda (t4: T).(ty3 g c (lift (S n) O t4) (lift (S n) O t0))) (ty3_lift g d u t0 H1 c O (S n) (getl_drop Abbr c d u n H14)) u0 H11))))) H10)))) t3 H7))) (subst0_gen_lref u0 t3 i n H4)))))) (\lambda (c3: C).(\lambda (H4: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H5: (getl i c (CHead e (Bind Abbr) u0))).(lt_le_e n i (ty3 g c3 (TLRef n) (lift (S n) O t0)) (\lambda (H6: (lt n i)).(let H7 \def (csubst0_getl_lt i n H6 c c3 u0 H4 (CHead d (Bind Abbr) u) H0) in (or4_ind (getl n c3 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl n c3 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2))))))) (ty3 g c3 (TLRef n) (lift (S n) O t0)) (\lambda (H8: (getl n c3 (CHead d (Bind Abbr) u))).(ty3_abbr g n c3 d u H8 t0 H1)) (\lambda (H8: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u0)))))) (\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)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w))))) (ty3 g c3 (TLRef n) (lift (S n) O t0)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H10: (getl n c3 (CHead x1 (Bind x0) x3))).(\lambda (H11: (subst0 (minus i (S n)) u0 x2 x3)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i (S n)) u0 t x3)) H11 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(getl n c3 (CHead c (Bind x0) x3))) H10 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 (CHead d (Bind b) x3))) H18 Abbr H15) in (let H20 \def (eq_ind nat (minus i n) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) x3) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead d (Bind Abbr) x3) n H19 (le_S_n n i (le_S (S n) i H6))) (S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_abbr g n c3 d x3 H19 t0 (H2 (minus i (S n)) u0 d x3 (fsubst0_snd (minus i (S n)) u0 d u x3 H17) e (getl_gen_S (Bind Abbr) d (CHead e (Bind Abbr) u0) x3 (minus i (S n)) H20)))))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0)))))) (\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)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl n c3 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2))))) (ty3 g c3 (TLRef n) (lift (S n) O t0)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl n c3 (CHead x2 (Bind x0) x3))).(\lambda (H11: (csubst0 (minus i (S n)) u0 x1 x2)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x3 (\lambda (t: T).(getl n c3 (CHead x2 (Bind x0) t))) H10 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i (S n)) u0 c x2)) H11 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 (CHead x2 (Bind b) u))) H17 Abbr H15) in (let H20 \def (eq_ind nat (minus i n) (\lambda (n: nat).(getl n (CHead x2 (Bind Abbr) u) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead x2 (Bind Abbr) u) n H19 (le_S_n n i (le_S (S n) i H6))) (S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_abbr g n c3 x2 u H19 t0 (H2 (minus i (S n)) u0 x2 u (fsubst0_fst (minus i (S n)) u0 d u x2 H18) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H18 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abbr) x2 (CHead e (Bind Abbr) u0) u (minus i (S n)) H20))))))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0))))))) (\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)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) u0 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 (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\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 (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2)))))) (ty3 g c3 (TLRef n) (lift (S n) O t0)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl n c3 (CHead x2 (Bind x0) x4))).(\lambda (H11: (subst0 (minus i (S n)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i (S n)) u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i (S n)) u0 t x4)) H11 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i (S n)) u0 c x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 (CHead x2 (Bind b) x4))) H10 Abbr H16) in (let H21 \def (eq_ind nat (minus i n) (\lambda (n: nat).(getl n (CHead x2 (Bind Abbr) x4) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead x2 (Bind Abbr) x4) n H20 (le_S_n n i (le_S (S n) i H6))) (S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_abbr g n c3 x2 x4 H20 t0 (H2 (minus i (S n)) u0 x2 x4 (fsubst0_both (minus i (S n)) u0 d u x4 H18 x2 H19) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H19 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abbr) x2 (CHead e (Bind Abbr) u0) x4 (minus i (S n)) H21))))))))))) H14)) H13))))))))))) H8)) H7))) (\lambda (H6: (le i n)).(ty3_abbr g n c3 d u (csubst0_getl_ge i n H6 c c3 u0 H4 (CHead d (Bind Abbr) u) H0) t0 H1))))))) (\lambda (t3: T).(\lambda (H4: (subst0 i u0 (TLRef n) t3)).(\lambda (c3: C).(\lambda (H5: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u0))).(and_ind (eq nat n i) (eq T t3 (lift (S n) O u0)) (ty3 g c3 t3 (lift (S n) O t0)) (\lambda (H7: (eq nat n i)).(\lambda (H8: (eq T t3 (lift (S n) O u0))).(eq_ind_r T (lift (S n) O u0) (\lambda (t4: T).(ty3 g c3 t4 (lift (S n) O t0))) (let H9 \def (eq_ind_r nat i (\lambda (n: nat).(getl n c (CHead e (Bind Abbr) u0))) H6 n H7) in (let H10 \def (eq_ind_r nat i (\lambda (n: nat).(csubst0 n u0 c c3)) H5 n H7) in (let H11 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl n c c0)) H0 (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in ((let H13 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (\lambda (H14: (eq C d e)).(let H15 \def (eq_ind_r C e (\lambda (c0: C).(getl n c (CHead c0 (Bind Abbr) u0))) H11 d H14) in (let H16 \def (eq_ind_r T u0 (\lambda (t: T).(getl n c (CHead d (Bind Abbr) t))) H15 u H13) in (let H17 \def (eq_ind_r T u0 (\lambda (t: T).(csubst0 n t c c3)) H10 u H13) in (eq_ind T u (\lambda (t4: T).(ty3 g c3 (lift (S n) O t4) (lift (S n) O t0))) (ty3_lift g d u t0 H1 c3 O (S n) (getl_drop Abbr c3 d u n (csubst0_getl_ge n n (le_n n) c c3 u H17 (CHead d (Bind Abbr) u) H16))) u0 H13)))))) H12))))) t3 H8))) (subst0_gen_lref u0 t3 i n H4)))))))) c2 t2 H3)))))))))))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind Abst) u))).(\lambda (t0: T).(\lambda (H1: (ty3 g d u t0)).(\lambda (H2: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 d u c2 t2) \to (\forall (e: C).((getl i d (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 t0)))))))))).(\lambda (i: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H3: (fsubst0 i u0 c (TLRef n) c2 t2)).(fsubst0_ind i u0 c (TLRef n) (\lambda (c0: C).(\lambda (t3: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c0 t3 (lift (S n) O u)))))) (\lambda (t3: T).(\lambda (H4: (subst0 i u0 (TLRef n) t3)).(\lambda (e: C).(\lambda (H5: (getl i c (CHead e (Bind Abbr) u0))).(and_ind (eq nat n i) (eq T t3 (lift (S n) O u0)) (ty3 g c t3 (lift (S n) O u)) (\lambda (H6: (eq nat n i)).(\lambda (H7: (eq T t3 (lift (S n) O u0))).(eq_ind_r T (lift (S n) O u0) (\lambda (t4: T).(ty3 g c t4 (lift (S n) O u))) (let H8 \def (eq_ind_r nat i (\lambda (n: nat).(getl n c (CHead e (Bind Abbr) u0))) H5 n H6) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl n c c0)) H0 (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H8)) in (let H10 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H8)) in (False_ind (ty3 g c (lift (S n) O u0) (lift (S n) O u)) H10)))) t3 H7))) (subst0_gen_lref u0 t3 i n H4)))))) (\lambda (c3: C).(\lambda (H4: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H5: (getl i c (CHead e (Bind Abbr) u0))).(lt_le_e n i (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (H6: (lt n i)).(let H7 \def (csubst0_getl_lt i n H6 c c3 u0 H4 (CHead d (Bind Abst) u) H0) in (or4_ind (getl n c3 (CHead d (Bind Abst) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl n c3 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1))))))) (\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 (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2))))))) (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (H8: (getl n c3 (CHead d (Bind Abst) u))).(ty3_abst g n c3 d u H8 t0 H1)) (\lambda (H8: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e0 (Bind b) u0)))))) (\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)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w))))) (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2))).(\lambda (H10: (getl n c3 (CHead x1 (Bind x0) x3))).(\lambda (H11: (subst0 (minus i (S n)) u0 x2 x3)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B Abst x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i (S n)) u0 t x3)) H11 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(getl n c3 (CHead c (Bind x0) x3))) H10 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 (CHead d (Bind b) x3))) H18 Abst H15) in (let H20 \def (eq_ind nat (minus i n) (\lambda (n: nat).(getl n (CHead d (Bind Abst) x3) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead d (Bind Abst) x3) n H19 (le_S_n n i (le_S (S n) i H6))) (S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_conv g c3 (lift (S n) O u) (lift (S n) O t0) (ty3_lift g d u t0 H1 c3 O (S n) (getl_drop Abst c3 d x3 n H19)) (TLRef n) (lift (S n) O x3) (ty3_abst g n c3 d x3 H19 t0 (H2 (minus i (S n)) u0 d x3 (fsubst0_snd (minus i (S n)) u0 d u x3 H17) e (getl_gen_S (Bind Abst) d (CHead e (Bind Abbr) u0) x3 (minus i (S n)) H20))) (pc3_lift c3 d (S n) O (getl_drop Abst c3 d x3 n H19) x3 u (pc3_pr2_x d x3 u (pr2_delta d e u0 (r (Bind Abst) (minus i (S n))) (getl_gen_S (Bind Abst) d (CHead e (Bind Abbr) u0) x3 (minus i (S n)) H20) u u (pr0_refl u) x3 H17))))))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u0)))))) (\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)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl n c3 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2))))) (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl n c3 (CHead x2 (Bind x0) x3))).(\lambda (H11: (csubst0 (minus i (S n)) u0 x1 x2)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H15: (eq B Abst x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x3 (\lambda (t: T).(getl n c3 (CHead x2 (Bind x0) t))) H10 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i (S n)) u0 c x2)) H11 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 (CHead x2 (Bind b) u))) H17 Abst H15) in (let H20 \def (eq_ind nat (minus i n) (\lambda (n: nat).(getl n (CHead x2 (Bind Abst) u) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead x2 (Bind Abst) u) n H19 (le_S_n n i (le_S (S n) i H6))) (S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_abst g n c3 x2 u H19 t0 (H2 (minus i (S n)) u0 x2 u (fsubst0_fst (minus i (S n)) u0 d u x2 H18) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H18 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abst) x2 (CHead e (Bind Abbr) u0) u (minus i (S n)) H20))))))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u0))))))) (\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)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) u0 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 (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1))))))) (\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 (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2)))))) (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H9: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl n c3 (CHead x2 (Bind x0) x4))).(\lambda (H11: (subst0 (minus i (S n)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i (S n)) u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H16: (eq B Abst x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i (S n)) u0 t x4)) H11 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i (S n)) u0 c x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 (CHead x2 (Bind b) x4))) H10 Abst H16) in (let H21 \def (eq_ind nat (minus i n) (\lambda (n: nat).(getl n (CHead x2 (Bind Abst) x4) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead x2 (Bind Abst) x4) n H20 (le_S_n n i (le_S (S n) i H6))) (S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_conv g c3 (lift (S n) O u) (lift (S n) O t0) (ty3_lift g x2 u t0 (H2 (minus i (S n)) u0 x2 u (fsubst0_fst (minus i (S n)) u0 d u x2 H19) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H19 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abst) x2 (CHead e (Bind Abbr) u0) x4 (minus i (S n)) H21))) c3 O (S n) (getl_drop Abst c3 x2 x4 n H20)) (TLRef n) (lift (S n) O x4) (ty3_abst g n c3 x2 x4 H20 t0 (H2 (minus i (S n)) u0 x2 x4 (fsubst0_both (minus i (S n)) u0 d u x4 H18 x2 H19) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H19 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abst) x2 (CHead e (Bind Abbr) u0) x4 (minus i (S n)) H21)))) (pc3_lift c3 x2 (S n) O (getl_drop Abst c3 x2 x4 n H20) x4 u (pc3_fsubst0 d u u (pc3_refl d u) (minus i (S n)) u0 x2 x4 (fsubst0_both (minus i (S n)) u0 d u x4 H18 x2 H19) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H19 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abst) x2 (CHead e (Bind Abbr) u0) x4 (minus i (S n)) H21)))))))))))) H14)) H13))))))))))) H8)) H7))) (\lambda (H6: (le i n)).(ty3_abst g n c3 d u (csubst0_getl_ge i n H6 c c3 u0 H4 (CHead d (Bind Abst) u) H0) t0 H1))))))) (\lambda (t3: T).(\lambda (H4: (subst0 i u0 (TLRef n) t3)).(\lambda (c3: C).(\lambda (H5: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u0))).(and_ind (eq nat n i) (eq T t3 (lift (S n) O u0)) (ty3 g c3 t3 (lift (S n) O u)) (\lambda (H7: (eq nat n i)).(\lambda (H8: (eq T t3 (lift (S n) O u0))).(eq_ind_r T (lift (S n) O u0) (\lambda (t4: T).(ty3 g c3 t4 (lift (S n) O u))) (let H9 \def (eq_ind_r nat i (\lambda (n: nat).(getl n c (CHead e (Bind Abbr) u0))) H6 n H7) in (let H10 \def (eq_ind_r nat i (\lambda (n: nat).(csubst0 n u0 c c3)) H5 n H7) in (let H11 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl n c c0)) H0 (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (let H12 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (False_ind (ty3 g c3 (lift (S n) O u0) (lift (S n) O u)) H12))))) t3 H8))) (subst0_gen_lref u0 t3 i n H4)))))))) c2 t2 H3)))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (t0: T).(\lambda (H0: (ty3 g c u t0)).(\lambda (H1: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 t2) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 t0)))))))))).(\lambda (b: B).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c (Bind b) u) t2 t3)).(\lambda (H3: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t4: T).((fsubst0 i u0 (CHead c (Bind b) u) t2 c2 t4) \to (\forall (e: C).((getl i (CHead c (Bind b) u) (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t4 t3)))))))))).(\lambda (t4: T).(\lambda (H4: (ty3 g (CHead c (Bind b) u) t3 t4)).(\lambda (_: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 (CHead c (Bind b) u) t3 c2 t2) \to (\forall (e: C).((getl i (CHead c (Bind b) u) (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 t4)))))))))).(\lambda (i: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t5: T).(\lambda (H6: (fsubst0 i u0 c (THead (Bind b) u t2) c2 t5)).(fsubst0_ind i u0 c (THead (Bind b) u t2) (\lambda (c0: C).(\lambda (t6: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c0 t6 (THead (Bind b) u t3)))))) (\lambda (t6: T).(\lambda (H7: (subst0 i u0 (THead (Bind b) u t2) t6)).(\lambda (e: C).(\lambda (H8: (getl i c (CHead e (Bind Abbr) u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t6 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t7: T).(eq T t6 (THead (Bind b) u t7))) (\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7))) (ex3_2 T T (\lambda (u2: T).(\lambda (t7: T).(eq T t6 (THead (Bind b) u2 t7)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7)))) (ty3 g c t6 (THead (Bind b) u t3)) (\lambda (H9: (ex2 T (\lambda (u2: T).(eq T t6 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t6 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2)) (ty3 g c t6 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H10: (eq T t6 (THead (Bind b) x t2))).(\lambda (H11: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind b) x t2) (\lambda (t7: T).(ty3 g c t7 (THead (Bind b) u t3))) (ex_ind T (\lambda (t7: T).(ty3 g (CHead c (Bind b) u) t4 t7)) (ty3 g c (THead (Bind b) x t2) (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (H12: (ty3 g (CHead c (Bind b) u) t4 x0)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c (Bind b) x) t3 t7)) (ty3 g c (THead (Bind b) x t2) (THead (Bind b) u t3)) (\lambda (x1: T).(\lambda (H13: (ty3 g (CHead c (Bind b) x) t3 x1)).(ty3_conv g c (THead (Bind b) u t3) (THead (Bind b) u t4) (ty3_bind g c u t0 H0 b t3 t4 H4 x0 H12) (THead (Bind b) x t2) (THead (Bind b) x t3) (ty3_bind g c x t0 (H1 i u0 c x (fsubst0_snd i u0 c u x H11) e H8) b t2 t3 (H3 (S i) u0 (CHead c (Bind b) x) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c (Bind b) x) (csubst0_snd_bind b i u0 u x H11 c)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)) x1 H13) (pc3_fsubst0 c (THead (Bind b) u t3) (THead (Bind b) u t3) (pc3_refl c (THead (Bind b) u t3)) i u0 c (THead (Bind b) x t3) (fsubst0_snd i u0 c (THead (Bind b) u t3) (THead (Bind b) x t3) (subst0_fst u0 x u i H11 t3 (Bind b))) e H8)))) (ty3_correct g (CHead c (Bind b) x) t2 t3 (H3 (S i) u0 (CHead c (Bind b) x) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c (Bind b) x) (csubst0_snd_bind b i u0 u x H11 c)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)))))) (ty3_correct g (CHead c (Bind b) u) t3 t4 H4)) t6 H10)))) H9)) (\lambda (H9: (ex2 T (\lambda (t2: T).(eq T t6 (THead (Bind b) u t2))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t2 t3)))).(ex2_ind T (\lambda (t7: T).(eq T t6 (THead (Bind b) u t7))) (\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7)) (ty3 g c t6 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H10: (eq T t6 (THead (Bind b) u x))).(\lambda (H11: (subst0 (s (Bind b) i) u0 t2 x)).(eq_ind_r T (THead (Bind b) u x) (\lambda (t7: T).(ty3 g c t7 (THead (Bind b) u t3))) (ex_ind T (\lambda (t7: T).(ty3 g (CHead c (Bind b) u) t3 t7)) (ty3 g c (THead (Bind b) u x) (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (H12: (ty3 g (CHead c (Bind b) u) t3 x0)).(ty3_bind g c u t0 H0 b x t3 (H3 (S i) u0 (CHead c (Bind b) u) x (fsubst0_snd (S i) u0 (CHead c (Bind b) u) t2 x H11) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)) x0 H12))) (ty3_correct g (CHead c (Bind b) u) x t3 (H3 (S i) u0 (CHead c (Bind b) u) x (fsubst0_snd (S i) u0 (CHead c (Bind b) u) t2 x H11) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)))) t6 H10)))) H9)) (\lambda (H9: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t6 (THead (Bind b) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t2 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t7: T).(eq T t6 (THead (Bind b) u2 t7)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7))) (ty3 g c t6 (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H10: (eq T t6 (THead (Bind b) x0 x1))).(\lambda (H11: (subst0 i u0 u x0)).(\lambda (H12: (subst0 (s (Bind b) i) u0 t2 x1)).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t7: T).(ty3 g c t7 (THead (Bind b) u t3))) (ex_ind T (\lambda (t7: T).(ty3 g (CHead c (Bind b) u) t4 t7)) (ty3 g c (THead (Bind b) x0 x1) (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H13: (ty3 g (CHead c (Bind b) u) t4 x)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c (Bind b) x0) t3 t7)) (ty3 g c (THead (Bind b) x0 x1) (THead (Bind b) u t3)) (\lambda (x2: T).(\lambda (H14: (ty3 g (CHead c (Bind b) x0) t3 x2)).(ty3_conv g c (THead (Bind b) u t3) (THead (Bind b) u t4) (ty3_bind g c u t0 H0 b t3 t4 H4 x H13) (THead (Bind b) x0 x1) (THead (Bind b) x0 t3) (ty3_bind g c x0 t0 (H1 i u0 c x0 (fsubst0_snd i u0 c u x0 H11) e H8) b x1 t3 (H3 (S i) u0 (CHead c (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x1 H12 (CHead c (Bind b) x0) (csubst0_snd_bind b i u0 u x0 H11 c)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)) x2 H14) (pc3_fsubst0 c (THead (Bind b) u t3) (THead (Bind b) u t3) (pc3_refl c (THead (Bind b) u t3)) i u0 c (THead (Bind b) x0 t3) (fsubst0_snd i u0 c (THead (Bind b) u t3) (THead (Bind b) x0 t3) (subst0_fst u0 x0 u i H11 t3 (Bind b))) e H8)))) (ty3_correct g (CHead c (Bind b) x0) x1 t3 (H3 (S i) u0 (CHead c (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x1 H12 (CHead c (Bind b) x0) (csubst0_snd_bind b i u0 u x0 H11 c)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)))))) (ty3_correct g (CHead c (Bind b) u) t3 t4 H4)) t6 H10)))))) H9)) (subst0_gen_head (Bind b) u0 u t2 t6 i H7)))))) (\lambda (c3: C).(\lambda (H7: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H8: (getl i c (CHead e (Bind Abbr) u0))).(ex_ind T (\lambda (t6: T).(ty3 g (CHead c3 (Bind b) u) t3 t6)) (ty3 g c3 (THead (Bind b) u t2) (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H9: (ty3 g (CHead c3 (Bind b) u) t3 x)).(ty3_bind g c3 u t0 (H1 i u0 c3 u (fsubst0_fst i u0 c u c3 H7) e H8) b t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) u) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H7 u)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)) x H9))) (ty3_correct g (CHead c3 (Bind b) u) t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) u) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H7 u)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)))))))) (\lambda (t6: T).(\lambda (H7: (subst0 i u0 (THead (Bind b) u t2) t6)).(\lambda (c3: C).(\lambda (H8: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H9: (getl i c (CHead e (Bind Abbr) u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t6 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t7: T).(eq T t6 (THead (Bind b) u t7))) (\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7))) (ex3_2 T T (\lambda (u2: T).(\lambda (t7: T).(eq T t6 (THead (Bind b) u2 t7)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7)))) (ty3 g c3 t6 (THead (Bind b) u t3)) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t6 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t6 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2)) (ty3 g c3 t6 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H11: (eq T t6 (THead (Bind b) x t2))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind b) x t2) (\lambda (t7: T).(ty3 g c3 t7 (THead (Bind b) u t3))) (ex_ind T (\lambda (t7: T).(ty3 g (CHead c3 (Bind b) u) t3 t7)) (ty3 g c3 (THead (Bind b) x t2) (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (H13: (ty3 g (CHead c3 (Bind b) u) t3 x0)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c3 (Bind b) u) x0 t7)) (ty3 g c3 (THead (Bind b) x t2) (THead (Bind b) u t3)) (\lambda (x1: T).(\lambda (H14: (ty3 g (CHead c3 (Bind b) u) x0 x1)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c3 (Bind b) x) t3 t7)) (ty3 g c3 (THead (Bind b) x t2) (THead (Bind b) u t3)) (\lambda (x2: T).(\lambda (H15: (ty3 g (CHead c3 (Bind b) x) t3 x2)).(ty3_conv g c3 (THead (Bind b) u t3) (THead (Bind b) u x0) (ty3_bind g c3 u t0 (H1 i u0 c3 u (fsubst0_fst i u0 c u c3 H8) e H9) b t3 x0 H13 x1 H14) (THead (Bind b) x t2) (THead (Bind b) x t3) (ty3_bind g c3 x t0 (H1 i u0 c3 x (fsubst0_both i u0 c u x H12 c3 H8) e H9) b t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) x) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) x) (csubst0_both_bind b i u0 u x H12 c c3 H8)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)) x2 H15) (pc3_fsubst0 c (THead (Bind b) u t3) (THead (Bind b) u t3) (pc3_refl c (THead (Bind b) u t3)) i u0 c3 (THead (Bind b) x t3) (fsubst0_both i u0 c (THead (Bind b) u t3) (THead (Bind b) x t3) (subst0_fst u0 x u i H12 t3 (Bind b)) c3 H8) e H9)))) (ty3_correct g (CHead c3 (Bind b) x) t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) x) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) x) (csubst0_both_bind b i u0 u x H12 c c3 H8)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)))))) (ty3_correct g (CHead c3 (Bind b) u) t3 x0 H13)))) (ty3_correct g (CHead c3 (Bind b) u) t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) u) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H8 u)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)))) t6 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t2: T).(eq T t6 (THead (Bind b) u t2))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t2 t3)))).(ex2_ind T (\lambda (t7: T).(eq T t6 (THead (Bind b) u t7))) (\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7)) (ty3 g c3 t6 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H11: (eq T t6 (THead (Bind b) u x))).(\lambda (H12: (subst0 (s (Bind b) i) u0 t2 x)).(eq_ind_r T (THead (Bind b) u x) (\lambda (t7: T).(ty3 g c3 t7 (THead (Bind b) u t3))) (ex_ind T (\lambda (t7: T).(ty3 g (CHead c3 (Bind b) u) t3 t7)) (ty3 g c3 (THead (Bind b) u x) (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (H13: (ty3 g (CHead c3 (Bind b) u) t3 x0)).(ty3_bind g c3 u t0 (H1 i u0 c3 u (fsubst0_fst i u0 c u c3 H8) e H9) b x t3 (H3 (S i) u0 (CHead c3 (Bind b) u) x (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x H12 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H8 u)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)) x0 H13))) (ty3_correct g (CHead c3 (Bind b) u) x t3 (H3 (S i) u0 (CHead c3 (Bind b) u) x (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x H12 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H8 u)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)))) t6 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t6 (THead (Bind b) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t2 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t7: T).(eq T t6 (THead (Bind b) u2 t7)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7))) (ty3 g c3 t6 (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t6 (THead (Bind b) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Bind b) i) u0 t2 x1)).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t7: T).(ty3 g c3 t7 (THead (Bind b) u t3))) (ex_ind T (\lambda (t7: T).(ty3 g (CHead c3 (Bind b) u) t3 t7)) (ty3 g c3 (THead (Bind b) x0 x1) (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H14: (ty3 g (CHead c3 (Bind b) u) t3 x)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c3 (Bind b) u) x t7)) (ty3 g c3 (THead (Bind b) x0 x1) (THead (Bind b) u t3)) (\lambda (x2: T).(\lambda (H15: (ty3 g (CHead c3 (Bind b) u) x x2)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c3 (Bind b) x0) t3 t7)) (ty3 g c3 (THead (Bind b) x0 x1) (THead (Bind b) u t3)) (\lambda (x3: T).(\lambda (H16: (ty3 g (CHead c3 (Bind b) x0) t3 x3)).(ty3_conv g c3 (THead (Bind b) u t3) (THead (Bind b) u x) (ty3_bind g c3 u t0 (H1 i u0 c3 u (fsubst0_fst i u0 c u c3 H8) e H9) b t3 x H14 x2 H15) (THead (Bind b) x0 x1) (THead (Bind b) x0 t3) (ty3_bind g c3 x0 t0 (H1 i u0 c3 x0 (fsubst0_both i u0 c u x0 H12 c3 H8) e H9) b x1 t3 (H3 (S i) u0 (CHead c3 (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x1 H13 (CHead c3 (Bind b) x0) (csubst0_both_bind b i u0 u x0 H12 c c3 H8)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)) x3 H16) (pc3_fsubst0 c (THead (Bind b) u t3) (THead (Bind b) u t3) (pc3_refl c (THead (Bind b) u t3)) i u0 c3 (THead (Bind b) x0 t3) (fsubst0_both i u0 c (THead (Bind b) u t3) (THead (Bind b) x0 t3) (subst0_fst u0 x0 u i H12 t3 (Bind b)) c3 H8) e H9)))) (ty3_correct g (CHead c3 (Bind b) x0) x1 t3 (H3 (S i) u0 (CHead c3 (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x1 H13 (CHead c3 (Bind b) x0) (csubst0_both_bind b i u0 u x0 H12 c c3 H8)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)))))) (ty3_correct g (CHead c3 (Bind b) u) t3 x H14)))) (ty3_correct g (CHead c3 (Bind b) u) t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) u) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H8 u)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)))) t6 H11)))))) H10)) (subst0_gen_head (Bind b) u0 u t2 t6 i H7)))))))) c2 t5 H6))))))))))))))))))) (\lambda (c: C).(\lambda (w: T).(\lambda (u: T).(\lambda (H0: (ty3 g c w u)).(\lambda (H1: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c w c2 t2) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 u)))))))))).(\lambda (v: T).(\lambda (t0: T).(\lambda (H2: (ty3 g c v (THead (Bind Abst) u t0))).(\lambda (H3: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c v c2 t2) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 (THead (Bind Abst) u t0))))))))))).(\lambda (i: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i u0 c (THead (Flat Appl) w v) c2 t2)).(fsubst0_ind i u0 c (THead (Flat Appl) w v) (\lambda (c0: C).(\lambda (t3: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c0 t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))))))) (\lambda (t3: T).(\lambda (H5: (subst0 i u0 (THead (Flat Appl) w v) t3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2))) (ex2 T (\lambda (t4: T).(eq T t3 (THead (Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))) (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)))) (ty3 g c t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (H7: (ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2)) (ty3 g c t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H8: (eq T t3 (THead (Flat Appl) x v))).(\lambda (H9: (subst0 i u0 w x)).(eq_ind_r T (THead (Flat Appl) x v) (\lambda (t4: T).(ty3 g c t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ex_ind T (\lambda (t4: T).(ty3 g c (THead (Bind Abst) u t0) t4)) (ty3 g c (THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (H10: (ty3 g c (THead (Bind Abst) u t0) x0)).(ex4_3_ind T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c (THead (Bind Abst) u t4) x0)))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c u t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) t0 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c (Bind Abst) u) t4 t6)))) (ty3 g c (THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (_: (pc3 c (THead (Bind Abst) u x1) x0)).(\lambda (_: (ty3 g c u x2)).(\lambda (H13: (ty3 g (CHead c (Bind Abst) u) t0 x1)).(\lambda (H14: (ty3 g (CHead c (Bind Abst) u) x1 x3)).(ex_ind T (\lambda (t4: T).(ty3 g c u t4)) (ty3 g c (THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x4: T).(\lambda (H15: (ty3 g c u x4)).(ty3_conv g c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x1)) (ty3_appl g c w u H0 (THead (Bind Abst) u t0) x1 (ty3_bind g c u x4 H15 Abst t0 x1 H13 x3 H14)) (THead (Flat Appl) x v) (THead (Flat Appl) x (THead (Bind Abst) u t0)) (ty3_appl g c x u (H1 i u0 c x (fsubst0_snd i u0 c w x H9) e H6) v t0 H2) (pc3_fsubst0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_refl c (THead (Flat Appl) w (THead (Bind Abst) u t0))) i u0 c (THead (Flat Appl) x (THead (Bind Abst) u t0)) (fsubst0_snd i u0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) x (THead (Bind Abst) u t0)) (subst0_fst u0 x w i H9 (THead (Bind Abst) u t0) (Flat Appl))) e H6)))) (ty3_correct g c x u (H1 i u0 c x (fsubst0_snd i u0 c w x H9) e H6)))))))))) (ty3_gen_bind g Abst c u t0 x0 H10)))) (ty3_correct g c v (THead (Bind Abst) u t0) H2)) t3 H8)))) H7)) (\lambda (H7: (ex2 T (\lambda (t2: T).(eq T t3 (THead (Flat Appl) w t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 v t2)))).(ex2_ind T (\lambda (t4: T).(eq T t3 (THead (Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)) (ty3 g c t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H8: (eq T t3 (THead (Flat Appl) w x))).(\lambda (H9: (subst0 (s (Flat Appl) i) u0 v x)).(eq_ind_r T (THead (Flat Appl) w x) (\lambda (t4: T).(ty3 g c t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ty3_appl g c w u H0 x t0 (H3 (s (Flat Appl) i) u0 c x (fsubst0_snd (s (Flat Appl) i) u0 c v x H9) e H6)) t3 H8)))) H7)) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t3 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 v t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))) (ty3 g c t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq T t3 (THead (Flat Appl) x0 x1))).(\lambda (H9: (subst0 i u0 w x0)).(\lambda (H10: (subst0 (s (Flat Appl) i) u0 v x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t4: T).(ty3 g c t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ex_ind T (\lambda (t4: T).(ty3 g c (THead (Bind Abst) u t0) t4)) (ty3 g c (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H11: (ty3 g c (THead (Bind Abst) u t0) x)).(ex4_3_ind T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c (THead (Bind Abst) u t4) x)))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c u t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) t0 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c (Bind Abst) u) t4 t6)))) (ty3 g c (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (_: (pc3 c (THead (Bind Abst) u x2) x)).(\lambda (_: (ty3 g c u x3)).(\lambda (H14: (ty3 g (CHead c (Bind Abst) u) t0 x2)).(\lambda (H15: (ty3 g (CHead c (Bind Abst) u) x2 x4)).(ex_ind T (\lambda (t4: T).(ty3 g c u t4)) (ty3 g c (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x5: T).(\lambda (H16: (ty3 g c u x5)).(ty3_conv g c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x2)) (ty3_appl g c w u H0 (THead (Bind Abst) u t0) x2 (ty3_bind g c u x5 H16 Abst t0 x2 H14 x4 H15)) (THead (Flat Appl) x0 x1) (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) (ty3_appl g c x0 u (H1 i u0 c x0 (fsubst0_snd i u0 c w x0 H9) e H6) x1 t0 (H3 (s (Flat Appl) i) u0 c x1 (fsubst0_snd (s (Flat Appl) i) u0 c v x1 H10) e H6)) (pc3_fsubst0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_refl c (THead (Flat Appl) w (THead (Bind Abst) u t0))) i u0 c (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) (fsubst0_snd i u0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) (subst0_fst u0 x0 w i H9 (THead (Bind Abst) u t0) (Flat Appl))) e H6)))) (ty3_correct g c w u H0))))))))) (ty3_gen_bind g Abst c u t0 x H11)))) (ty3_correct g c v (THead (Bind Abst) u t0) H2)) t3 H8)))))) H7)) (subst0_gen_head (Flat Appl) u0 w v t3 i H5)))))) (\lambda (c3: C).(\lambda (H5: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u0))).(ty3_appl g c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H5) e H6) v t0 (H3 i u0 c3 v (fsubst0_fst i u0 c v c3 H5) e H6)))))) (\lambda (t3: T).(\lambda (H5: (subst0 i u0 (THead (Flat Appl) w v) t3)).(\lambda (c3: C).(\lambda (H6: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H7: (getl i c (CHead e (Bind Abbr) u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2))) (ex2 T (\lambda (t4: T).(eq T t3 (THead (Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))) (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)))) (ty3 g c3 t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (H8: (ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2)) (ty3 g c3 t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H9: (eq T t3 (THead (Flat Appl) x v))).(\lambda (H10: (subst0 i u0 w x)).(eq_ind_r T (THead (Flat Appl) x v) (\lambda (t4: T).(ty3 g c3 t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ex_ind T (\lambda (t4: T).(ty3 g c3 (THead (Bind Abst) u t0) t4)) (ty3 g c3 (THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (H11: (ty3 g c3 (THead (Bind Abst) u t0) x0)).(ex4_3_ind T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c3 (THead (Bind Abst) u t4) x0)))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c3 u t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c3 (Bind Abst) u) t0 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c3 (Bind Abst) u) t4 t6)))) (ty3 g c3 (THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (_: (pc3 c3 (THead (Bind Abst) u x1) x0)).(\lambda (H13: (ty3 g c3 u x2)).(\lambda (H14: (ty3 g (CHead c3 (Bind Abst) u) t0 x1)).(\lambda (H15: (ty3 g (CHead c3 (Bind Abst) u) x1 x3)).(ty3_conv g c3 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x1)) (ty3_appl g c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H6) e H7) (THead (Bind Abst) u t0) x1 (ty3_bind g c3 u x2 H13 Abst t0 x1 H14 x3 H15)) (THead (Flat Appl) x v) (THead (Flat Appl) x (THead (Bind Abst) u t0)) (ty3_appl g c3 x u (H1 i u0 c3 x (fsubst0_both i u0 c w x H10 c3 H6) e H7) v t0 (H3 i u0 c3 v (fsubst0_fst i u0 c v c3 H6) e H7)) (pc3_fsubst0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_refl c (THead (Flat Appl) w (THead (Bind Abst) u t0))) i u0 c3 (THead (Flat Appl) x (THead (Bind Abst) u t0)) (fsubst0_both i u0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) x (THead (Bind Abst) u t0)) (subst0_fst u0 x w i H10 (THead (Bind Abst) u t0) (Flat Appl)) c3 H6) e H7))))))))) (ty3_gen_bind g Abst c3 u t0 x0 H11)))) (ty3_correct g c3 v (THead (Bind Abst) u t0) (H3 i u0 c3 v (fsubst0_fst i u0 c v c3 H6) e H7))) t3 H9)))) H8)) (\lambda (H8: (ex2 T (\lambda (t2: T).(eq T t3 (THead (Flat Appl) w t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 v t2)))).(ex2_ind T (\lambda (t4: T).(eq T t3 (THead (Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)) (ty3 g c3 t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H9: (eq T t3 (THead (Flat Appl) w x))).(\lambda (H10: (subst0 (s (Flat Appl) i) u0 v x)).(eq_ind_r T (THead (Flat Appl) w x) (\lambda (t4: T).(ty3 g c3 t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ty3_appl g c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H6) e H7) x t0 (H3 i u0 c3 x (fsubst0_both i u0 c v x H10 c3 H6) e H7)) t3 H9)))) H8)) (\lambda (H8: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t3 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 v t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))) (ty3 g c3 t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H9: (eq T t3 (THead (Flat Appl) x0 x1))).(\lambda (H10: (subst0 i u0 w x0)).(\lambda (H11: (subst0 (s (Flat Appl) i) u0 v x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t4: T).(ty3 g c3 t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ex_ind T (\lambda (t4: T).(ty3 g c3 (THead (Bind Abst) u t0) t4)) (ty3 g c3 (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H12: (ty3 g c3 (THead (Bind Abst) u t0) x)).(ex4_3_ind T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c3 (THead (Bind Abst) u t4) x)))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c3 u t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c3 (Bind Abst) u) t0 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c3 (Bind Abst) u) t4 t6)))) (ty3 g c3 (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (_: (pc3 c3 (THead (Bind Abst) u x2) x)).(\lambda (_: (ty3 g c3 u x3)).(\lambda (H15: (ty3 g (CHead c3 (Bind Abst) u) t0 x2)).(\lambda (H16: (ty3 g (CHead c3 (Bind Abst) u) x2 x4)).(ex_ind T (\lambda (t4: T).(ty3 g c3 u t4)) (ty3 g c3 (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x5: T).(\lambda (H17: (ty3 g c3 u x5)).(ty3_conv g c3 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x2)) (ty3_appl g c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H6) e H7) (THead (Bind Abst) u t0) x2 (ty3_bind g c3 u x5 H17 Abst t0 x2 H15 x4 H16)) (THead (Flat Appl) x0 x1) (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) (ty3_appl g c3 x0 u (H1 i u0 c3 x0 (fsubst0_both i u0 c w x0 H10 c3 H6) e H7) x1 t0 (H3 i u0 c3 x1 (fsubst0_both i u0 c v x1 H11 c3 H6) e H7)) (pc3_fsubst0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_refl c (THead (Flat Appl) w (THead (Bind Abst) u t0))) i u0 c3 (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) (fsubst0_both i u0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) (subst0_fst u0 x0 w i H10 (THead (Bind Abst) u t0) (Flat Appl)) c3 H6) e H7)))) (ty3_correct g c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H6) e H7)))))))))) (ty3_gen_bind g Abst c3 u t0 x H12)))) (ty3_correct g c3 v (THead (Bind Abst) u t0) (H3 i u0 c3 v (fsubst0_fst i u0 c v c3 H6) e H7))) t3 H9)))))) H8)) (subst0_gen_head (Flat Appl) u0 w v t3 i H5)))))))) c2 t2 H4))))))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: (ty3 g c t2 t3)).(\lambda (H1: ((\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t4: T).((fsubst0 i u c t2 c2 t4) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c2 t4 t3)))))))))).(\lambda (t0: T).(\lambda (H2: (ty3 g c t3 t0)).(\lambda (H3: ((\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t3 c2 t2) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c2 t2 t0)))))))))).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t4: T).(\lambda (H4: (fsubst0 i u c (THead (Flat Cast) t3 t2) c2 t4)).(fsubst0_ind i u c (THead (Flat Cast) t3 t2) (\lambda (c0: C).(\lambda (t5: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c0 t5 t3))))) (\lambda (t5: T).(\lambda (H5: (subst0 i u (THead (Flat Cast) t3 t2) t5)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2))) (ex2 T (\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) (\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6))) (ex3_2 T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead (Flat Cast) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6)))) (ty3 g c t5 t3) (\lambda (H7: (ex2 T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2)) (ty3 g c t5 t3) (\lambda (x: T).(\lambda (H8: (eq T t5 (THead (Flat Cast) x t2))).(\lambda (H9: (subst0 i u t3 x)).(eq_ind_r T (THead (Flat Cast) x t2) (\lambda (t6: T).(ty3 g c t6 t3)) (ty3_conv g c t3 t0 H2 (THead (Flat Cast) x t2) x (ty3_cast g c t2 x (ty3_conv g c x t0 (H3 i u c x (fsubst0_snd i u c t3 x H9) e H6) t2 t3 H0 (pc3_s c t3 x (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c x (fsubst0_snd i u c t3 x H9) e H6))) t0 (H3 i u c x (fsubst0_snd i u c t3 x H9) e H6)) (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c x (fsubst0_snd i u c t3 x H9) e H6)) t5 H8)))) H7)) (\lambda (H7: (ex2 T (\lambda (t2: T).(eq T t5 (THead (Flat Cast) t3 t2))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u t2 t3)))).(ex2_ind T (\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) (\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6)) (ty3 g c t5 t3) (\lambda (x: T).(\lambda (H8: (eq T t5 (THead (Flat Cast) t3 x))).(\lambda (H9: (subst0 (s (Flat Cast) i) u t2 x)).(eq_ind_r T (THead (Flat Cast) t3 x) (\lambda (t6: T).(ty3 g c t6 t3)) (ty3_cast g c x t3 (H1 (s (Flat Cast) i) u c x (fsubst0_snd (s (Flat Cast) i) u c t2 x H9) e H6) t0 H2) t5 H8)))) H7)) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t5 (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u t2 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead (Flat Cast) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6))) (ty3 g c t5 t3) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq T t5 (THead (Flat Cast) x0 x1))).(\lambda (H9: (subst0 i u t3 x0)).(\lambda (H10: (subst0 (s (Flat Cast) i) u t2 x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t6: T).(ty3 g c t6 t3)) (ty3_conv g c t3 t0 H2 (THead (Flat Cast) x0 x1) x0 (ty3_cast g c x1 x0 (ty3_conv g c x0 t0 (H3 i u c x0 (fsubst0_snd i u c t3 x0 H9) e H6) x1 t3 (H1 (s (Flat Cast) i) u c x1 (fsubst0_snd (s (Flat Cast) i) u c t2 x1 H10) e H6) (pc3_s c t3 x0 (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c x0 (fsubst0_snd i u c t3 x0 H9) e H6))) t0 (H3 i u c x0 (fsubst0_snd i u c t3 x0 H9) e H6)) (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c x0 (fsubst0_snd i u c t3 x0 H9) e H6)) t5 H8)))))) H7)) (subst0_gen_head (Flat Cast) u t3 t2 t5 i H5)))))) (\lambda (c3: C).(\lambda (H5: (csubst0 i u c c3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u))).(ty3_cast g c3 t2 t3 (H1 i u c3 t2 (fsubst0_fst i u c t2 c3 H5) e H6) t0 (H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H5) e H6)))))) (\lambda (t5: T).(\lambda (H5: (subst0 i u (THead (Flat Cast) t3 t2) t5)).(\lambda (c3: C).(\lambda (H6: (csubst0 i u c c3)).(\lambda (e: C).(\lambda (H7: (getl i c (CHead e (Bind Abbr) u))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2))) (ex2 T (\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) (\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6))) (ex3_2 T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead (Flat Cast) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6)))) (ty3 g c3 t5 t3) (\lambda (H8: (ex2 T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2)) (ty3 g c3 t5 t3) (\lambda (x: T).(\lambda (H9: (eq T t5 (THead (Flat Cast) x t2))).(\lambda (H10: (subst0 i u t3 x)).(eq_ind_r T (THead (Flat Cast) x t2) (\lambda (t6: T).(ty3 g c3 t6 t3)) (ty3_conv g c3 t3 t0 (H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H6) e H7) (THead (Flat Cast) x t2) x (ty3_cast g c3 t2 x (ty3_conv g c3 x t0 (H3 i u c3 x (fsubst0_both i u c t3 x H10 c3 H6) e H7) t2 t3 (H1 i u c3 t2 (fsubst0_fst i u c t2 c3 H6) e H7) (pc3_s c3 t3 x (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c3 x (fsubst0_both i u c t3 x H10 c3 H6) e H7))) t0 (H3 i u c3 x (fsubst0_both i u c t3 x H10 c3 H6) e H7)) (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c3 x (fsubst0_both i u c t3 x H10 c3 H6) e H7)) t5 H9)))) H8)) (\lambda (H8: (ex2 T (\lambda (t2: T).(eq T t5 (THead (Flat Cast) t3 t2))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u t2 t3)))).(ex2_ind T (\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) (\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6)) (ty3 g c3 t5 t3) (\lambda (x: T).(\lambda (H9: (eq T t5 (THead (Flat Cast) t3 x))).(\lambda (H10: (subst0 (s (Flat Cast) i) u t2 x)).(eq_ind_r T (THead (Flat Cast) t3 x) (\lambda (t6: T).(ty3 g c3 t6 t3)) (ty3_cast g c3 x t3 (H1 i u c3 x (fsubst0_both i u c t2 x H10 c3 H6) e H7) t0 (H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H6) e H7)) t5 H9)))) H8)) (\lambda (H8: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t5 (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u t2 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead (Flat Cast) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6))) (ty3 g c3 t5 t3) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H9: (eq T t5 (THead (Flat Cast) x0 x1))).(\lambda (H10: (subst0 i u t3 x0)).(\lambda (H11: (subst0 (s (Flat Cast) i) u t2 x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t6: T).(ty3 g c3 t6 t3)) (ty3_conv g c3 t3 t0 (H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H6) e H7) (THead (Flat Cast) x0 x1) x0 (ty3_cast g c3 x1 x0 (ty3_conv g c3 x0 t0 (H3 i u c3 x0 (fsubst0_both i u c t3 x0 H10 c3 H6) e H7) x1 t3 (H1 i u c3 x1 (fsubst0_both i u c t2 x1 H11 c3 H6) e H7) (pc3_s c3 t3 x0 (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c3 x0 (fsubst0_both i u c t3 x0 H10 c3 H6) e H7))) t0 (H3 i u c3 x0 (fsubst0_both i u c t3 x0 H10 c3 H6) e H7)) (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c3 x0 (fsubst0_both i u c t3 x0 H10 c3 H6) e H7)) t5 H9)))))) H8)) (subst0_gen_head (Flat Cast) u t3 t2 t5 i H5)))))))) c2 t4 H4)))))))))))))) c1 t1 t H))))). + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: (ty3 g c1 t1 t)).(ty3_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (t2: T).(\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c t0 c2 t3) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c2 t3 t2))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t0: T).(\lambda (H0: (ty3 g c t2 t0)).(\lambda (H1: ((\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t3: T).((fsubst0 i u c t2 c2 t3) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c2 t3 t0)))))))))).(\lambda (u: T).(\lambda (t3: T).(\lambda (_: (ty3 g c u t3)).(\lambda (H3: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 t2) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 t3)))))))))).(\lambda (H4: (pc3 c t3 t2)).(\lambda (i: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t4: T).(\lambda (H5: (fsubst0 i u0 c u c2 t4)).(fsubst0_ind i u0 c u (\lambda (c0: C).(\lambda (t5: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c0 t5 t2))))) (\lambda (t5: T).(\lambda (H6: (subst0 i u0 u t5)).(\lambda (e: C).(\lambda (H7: (getl i c (CHead e (Bind Abbr) u0))).(ty3_conv g c t2 t0 H0 t5 t3 (H3 i u0 c t5 (fsubst0_snd i u0 c u t5 H6) e H7) H4))))) (\lambda (c3: C).(\lambda (H6: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H7: (getl i c (CHead e (Bind Abbr) u0))).(ty3_conv g c3 t2 t0 (H1 i u0 c3 t2 (fsubst0_fst i u0 c t2 c3 H6) e H7) u t3 (H3 i u0 c3 u (fsubst0_fst i u0 c u c3 H6) e H7) (pc3_fsubst0 c t3 t2 H4 i u0 c3 t3 (fsubst0_fst i u0 c t3 c3 H6) e H7)))))) (\lambda (t5: T).(\lambda (H6: (subst0 i u0 u t5)).(\lambda (c3: C).(\lambda (H7: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H8: (getl i c (CHead e (Bind Abbr) u0))).(ty3_conv g c3 t2 t0 (H1 i u0 c3 t2 (fsubst0_fst i u0 c t2 c3 H7) e H8) t5 t3 (H3 i u0 c3 t5 (fsubst0_both i u0 c u t5 H6 c3 H7) e H8) (pc3_fsubst0 c t3 t2 H4 i u0 c3 t3 (fsubst0_fst i u0 c t3 c3 H7) e H8)))))))) c2 t4 H5)))))))))))))))) (\lambda (c: C).(\lambda (m: nat).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H0: (fsubst0 i u c (TSort m) c2 t2)).(fsubst0_ind i u c (TSort m) (\lambda (c0: C).(\lambda (t0: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c0 t0 (TSort (next g m))))))) (\lambda (t3: T).(\lambda (H1: (subst0 i u (TSort m) t3)).(\lambda (e: C).(\lambda (_: (getl i c (CHead e (Bind Abbr) u))).(subst0_gen_sort u t3 i m H1 (ty3 g c t3 (TSort (next g m)))))))) (\lambda (c3: C).(\lambda (_: (csubst0 i u c c3)).(\lambda (e: C).(\lambda (_: (getl i c (CHead e (Bind Abbr) u))).(ty3_sort g c3 m))))) (\lambda (t3: T).(\lambda (H1: (subst0 i u (TSort m) t3)).(\lambda (c3: C).(\lambda (_: (csubst0 i u c c3)).(\lambda (e: C).(\lambda (_: (getl i c (CHead e (Bind Abbr) u))).(subst0_gen_sort u t3 i m H1 (ty3 g c3 t3 (TSort (next g m)))))))))) c2 t2 H0)))))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind Abbr) u))).(\lambda (t0: T).(\lambda (H1: (ty3 g d u t0)).(\lambda (H2: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 d u c2 t2) \to (\forall (e: C).((getl i d (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 t0)))))))))).(\lambda (i: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H3: (fsubst0 i u0 c (TLRef n) c2 t2)).(fsubst0_ind i u0 c (TLRef n) (\lambda (c0: C).(\lambda (t3: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c0 t3 (lift (S n) O t0)))))) (\lambda (t3: T).(\lambda (H4: (subst0 i u0 (TLRef n) t3)).(\lambda (e: C).(\lambda (H5: (getl i c (CHead e (Bind Abbr) u0))).(and_ind (eq nat n i) (eq T t3 (lift (S n) O u0)) (ty3 g c t3 (lift (S n) O t0)) (\lambda (H6: (eq nat n i)).(\lambda (H7: (eq T t3 (lift (S n) O u0))).(eq_ind_r T (lift (S n) O u0) (\lambda (t4: T).(ty3 g c t4 (lift (S n) O t0))) (let H8 \def (eq_ind_r nat i (\lambda (n: nat).(getl n c (CHead e (Bind Abbr) u0))) H5 n H6) in (let H9 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl n c c0)) H0 (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H8)) in (let H10 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H8)) in ((let H11 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H8)) in (\lambda (H12: (eq C d e)).(let H13 \def (eq_ind_r C e (\lambda (c0: C).(getl n c (CHead c0 (Bind Abbr) u0))) H9 d H12) in (let H14 \def (eq_ind_r T u0 (\lambda (t: T).(getl n c (CHead d (Bind Abbr) t))) H13 u H11) in (eq_ind T u (\lambda (t4: T).(ty3 g c (lift (S n) O t4) (lift (S n) O t0))) (ty3_lift g d u t0 H1 c O (S n) (getl_drop Abbr c d u n H14)) u0 H11))))) H10)))) t3 H7))) (subst0_gen_lref u0 t3 i n H4)))))) (\lambda (c3: C).(\lambda (H4: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H5: (getl i c (CHead e (Bind Abbr) u0))).(lt_le_e n i (ty3 g c3 (TLRef n) (lift (S n) O t0)) (\lambda (H6: (lt n i)).(let H7 \def (csubst0_getl_lt i n H6 c c3 u0 H4 (CHead d (Bind Abbr) u) H0) in (or4_ind (getl n c3 (CHead d (Bind Abbr) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl n c3 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e2 (Bind b) w))))))) (\lambda (_: B).(\lambda (_: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2))))))) (ty3 g c3 (TLRef n) (lift (S n) O t0)) (\lambda (H8: (getl n c3 (CHead d (Bind Abbr) u))).(ty3_abbr g n c3 d u H8 t0 H1)) (\lambda (H8: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u0)))))) (\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)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w))))) (ty3 g c3 (TLRef n) (lift (S n) O t0)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2))).(\lambda (H10: (getl n c3 (CHead x1 (Bind x0) x3))).(\lambda (H11: (subst0 (minus i (S n)) u0 x2 x3)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i (S n)) u0 t x3)) H11 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(getl n c3 (CHead c (Bind x0) x3))) H10 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 (CHead d (Bind b) x3))) H18 Abbr H15) in (let H20 \def (eq_ind nat (minus i n) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) x3) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead d (Bind Abbr) x3) n H19 (le_S_n n i (le_S (S n) i H6))) (S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_abbr g n c3 d x3 H19 t0 (H2 (minus i (S n)) u0 d x3 (fsubst0_snd (minus i (S n)) u0 d u x3 H17) e (getl_gen_S (Bind Abbr) d (CHead e (Bind Abbr) u0) x3 (minus i (S n)) H20)))))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0)))))) (\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)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl n c3 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2))))) (ty3 g c3 (TLRef n) (lift (S n) O t0)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl n c3 (CHead x2 (Bind x0) x3))).(\lambda (H11: (csubst0 (minus i (S n)) u0 x1 x2)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H15: (eq B Abbr x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x3 (\lambda (t: T).(getl n c3 (CHead x2 (Bind x0) t))) H10 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i (S n)) u0 c x2)) H11 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 (CHead x2 (Bind b) u))) H17 Abbr H15) in (let H20 \def (eq_ind nat (minus i n) (\lambda (n: nat).(getl n (CHead x2 (Bind Abbr) u) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead x2 (Bind Abbr) u) n H19 (le_S_n n i (le_S (S n) i H6))) (S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_abbr g n c3 x2 u H19 t0 (H2 (minus i (S n)) u0 x2 u (fsubst0_fst (minus i (S n)) u0 d u x2 H18) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H18 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abbr) x2 (CHead e (Bind Abbr) u0) u (minus i (S n)) H20))))))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u0))))))) (\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)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) u0 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 (CHead d (Bind Abbr) u) (CHead e1 (Bind b) u1))))))) (\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 (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2)))))) (ty3 g c3 (TLRef n) (lift (S n) O t0)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H9: (eq C (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl n c3 (CHead x2 (Bind x0) x4))).(\lambda (H11: (subst0 (minus i (S n)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i (S n)) u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H16: (eq B Abbr x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i (S n)) u0 t x4)) H11 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i (S n)) u0 c x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 (CHead x2 (Bind b) x4))) H10 Abbr H16) in (let H21 \def (eq_ind nat (minus i n) (\lambda (n: nat).(getl n (CHead x2 (Bind Abbr) x4) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead x2 (Bind Abbr) x4) n H20 (le_S_n n i (le_S (S n) i H6))) (S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_abbr g n c3 x2 x4 H20 t0 (H2 (minus i (S n)) u0 x2 x4 (fsubst0_both (minus i (S n)) u0 d u x4 H18 x2 H19) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H19 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abbr) x2 (CHead e (Bind Abbr) u0) x4 (minus i (S n)) H21))))))))))) H14)) H13))))))))))) H8)) H7))) (\lambda (H6: (le i n)).(ty3_abbr g n c3 d u (csubst0_getl_ge i n H6 c c3 u0 H4 (CHead d (Bind Abbr) u) H0) t0 H1))))))) (\lambda (t3: T).(\lambda (H4: (subst0 i u0 (TLRef n) t3)).(\lambda (c3: C).(\lambda (H5: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u0))).(and_ind (eq nat n i) (eq T t3 (lift (S n) O u0)) (ty3 g c3 t3 (lift (S n) O t0)) (\lambda (H7: (eq nat n i)).(\lambda (H8: (eq T t3 (lift (S n) O u0))).(eq_ind_r T (lift (S n) O u0) (\lambda (t4: T).(ty3 g c3 t4 (lift (S n) O t0))) (let H9 \def (eq_ind_r nat i (\lambda (n: nat).(getl n c (CHead e (Bind Abbr) u0))) H6 n H7) in (let H10 \def (eq_ind_r nat i (\lambda (n: nat).(csubst0 n u0 c c3)) H5 n H7) in (let H11 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c0: C).(getl n c c0)) H0 (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in ((let H13 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (\lambda (H14: (eq C d e)).(let H15 \def (eq_ind_r C e (\lambda (c0: C).(getl n c (CHead c0 (Bind Abbr) u0))) H11 d H14) in (let H16 \def (eq_ind_r T u0 (\lambda (t: T).(getl n c (CHead d (Bind Abbr) t))) H15 u H13) in (let H17 \def (eq_ind_r T u0 (\lambda (t: T).(csubst0 n t c c3)) H10 u H13) in (eq_ind T u (\lambda (t4: T).(ty3 g c3 (lift (S n) O t4) (lift (S n) O t0))) (ty3_lift g d u t0 H1 c3 O (S n) (getl_drop Abbr c3 d u n (csubst0_getl_ge n n (le_n n) c c3 u H17 (CHead d (Bind Abbr) u) H16))) u0 H13)))))) H12))))) t3 H8))) (subst0_gen_lref u0 t3 i n H4)))))))) c2 t2 H3)))))))))))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind Abst) u))).(\lambda (t0: T).(\lambda (H1: (ty3 g d u t0)).(\lambda (H2: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 d u c2 t2) \to (\forall (e: C).((getl i d (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 t0)))))))))).(\lambda (i: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H3: (fsubst0 i u0 c (TLRef n) c2 t2)).(fsubst0_ind i u0 c (TLRef n) (\lambda (c0: C).(\lambda (t3: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c0 t3 (lift (S n) O u)))))) (\lambda (t3: T).(\lambda (H4: (subst0 i u0 (TLRef n) t3)).(\lambda (e: C).(\lambda (H5: (getl i c (CHead e (Bind Abbr) u0))).(and_ind (eq nat n i) (eq T t3 (lift (S n) O u0)) (ty3 g c t3 (lift (S n) O u)) (\lambda (H6: (eq nat n i)).(\lambda (H7: (eq T t3 (lift (S n) O u0))).(eq_ind_r T (lift (S n) O u0) (\lambda (t4: T).(ty3 g c t4 (lift (S n) O u))) (let H8 \def (eq_ind_r nat i (\lambda (n: nat).(getl n c (CHead e (Bind Abbr) u0))) H5 n H6) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl n c c0)) H0 (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H8)) in (let H10 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H8)) in (False_ind (ty3 g c (lift (S n) O u0) (lift (S n) O u)) H10)))) t3 H7))) (subst0_gen_lref u0 t3 i n H4)))))) (\lambda (c3: C).(\lambda (H4: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H5: (getl i c (CHead e (Bind Abbr) u0))).(lt_le_e n i (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (H6: (lt n i)).(let H7 \def (csubst0_getl_lt i n H6 c c3 u0 H4 (CHead d (Bind Abst) u) H0) in (or4_ind (getl n c3 (CHead d (Bind Abst) u)) (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl n c3 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2)))))) (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1))))))) (\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 (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2))))))) (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (H8: (getl n c3 (CHead d (Bind Abst) u))).(ty3_abst g n c3 d u H8 t0 H1)) (\lambda (H8: (ex3_4 B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e0 (Bind b) u0)))))) (\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)) u0 u w))))))).(ex3_4_ind B C T T (\lambda (b: B).(\lambda (e0: C).(\lambda (u1: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e0 (Bind b) u1)))))) (\lambda (b: B).(\lambda (e0: C).(\lambda (_: T).(\lambda (w: T).(getl n c3 (CHead e0 (Bind b) w)))))) (\lambda (_: B).(\lambda (_: C).(\lambda (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w))))) (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: T).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2))).(\lambda (H10: (getl n c3 (CHead x1 (Bind x0) x3))).(\lambda (H11: (subst0 (minus i (S n)) u0 x2 x3)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x2) H9) in (\lambda (H15: (eq B Abst x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x2 (\lambda (t: T).(subst0 (minus i (S n)) u0 t x3)) H11 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(getl n c3 (CHead c (Bind x0) x3))) H10 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 (CHead d (Bind b) x3))) H18 Abst H15) in (let H20 \def (eq_ind nat (minus i n) (\lambda (n: nat).(getl n (CHead d (Bind Abst) x3) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead d (Bind Abst) x3) n H19 (le_S_n n i (le_S (S n) i H6))) (S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_conv g c3 (lift (S n) O u) (lift (S n) O t0) (ty3_lift g d u t0 H1 c3 O (S n) (getl_drop Abst c3 d x3 n H19)) (TLRef n) (lift (S n) O x3) (ty3_abst g n c3 d x3 H19 t0 (H2 (minus i (S n)) u0 d x3 (fsubst0_snd (minus i (S n)) u0 d u x3 H17) e (getl_gen_S (Bind Abst) d (CHead e (Bind Abbr) u0) x3 (minus i (S n)) H20))) (pc3_lift c3 d (S n) O (getl_drop Abst c3 d x3 n H19) x3 u (pc3_pr2_x d x3 u (pr2_delta d e u0 (r (Bind Abst) (minus i (S n))) (getl_gen_S (Bind Abst) d (CHead e (Bind Abbr) u0) x3 (minus i (S n)) H20) u u (pr0_refl u) x3 H17))))))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex3_4 B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u0)))))) (\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)) u0 e1 e2))))))).(ex3_4_ind B C C T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u1: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1)))))) (\lambda (b: B).(\lambda (_: C).(\lambda (e2: C).(\lambda (u1: T).(getl n c3 (CHead e2 (Bind b) u1)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2))))) (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H9: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl n c3 (CHead x2 (Bind x0) x3))).(\lambda (H11: (csubst0 (minus i (S n)) u0 x1 x2)).(let H12 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in ((let H13 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H15: (eq B Abst x0)).(\lambda (H16: (eq C d x1)).(let H17 \def (eq_ind_r T x3 (\lambda (t: T).(getl n c3 (CHead x2 (Bind x0) t))) H10 u H14) in (let H18 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i (S n)) u0 c x2)) H11 d H16) in (let H19 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 (CHead x2 (Bind b) u))) H17 Abst H15) in (let H20 \def (eq_ind nat (minus i n) (\lambda (n: nat).(getl n (CHead x2 (Bind Abst) u) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead x2 (Bind Abst) u) n H19 (le_S_n n i (le_S (S n) i H6))) (S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_abst g n c3 x2 u H19 t0 (H2 (minus i (S n)) u0 x2 u (fsubst0_fst (minus i (S n)) u0 d u x2 H18) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H18 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abst) x2 (CHead e (Bind Abbr) u0) u (minus i (S n)) H20))))))))))) H13)) H12))))))))) H8)) (\lambda (H8: (ex4_5 B C C T T (\lambda (b: B).(\lambda (e1: C).(\lambda (_: C).(\lambda (u0: T).(\lambda (_: T).(eq C (CHead d (Bind Abst) u) (CHead e1 (Bind b) u0))))))) (\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)) u0 u w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) u0 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 (CHead d (Bind Abst) u) (CHead e1 (Bind b) u1))))))) (\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 (u1: T).(\lambda (w: T).(subst0 (minus i (S n)) u0 u1 w)))))) (\lambda (_: B).(\lambda (e1: C).(\lambda (e2: C).(\lambda (_: T).(\lambda (_: T).(csubst0 (minus i (S n)) u0 e1 e2)))))) (ty3 g c3 (TLRef n) (lift (S n) O u)) (\lambda (x0: B).(\lambda (x1: C).(\lambda (x2: C).(\lambda (x3: T).(\lambda (x4: T).(\lambda (H9: (eq C (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3))).(\lambda (H10: (getl n c3 (CHead x2 (Bind x0) x4))).(\lambda (H11: (subst0 (minus i (S n)) u0 x3 x4)).(\lambda (H12: (csubst0 (minus i (S n)) u0 x1 x2)).(let H13 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in ((let H14 \def (f_equal C B (\lambda (e0: C).(match e0 return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in ((let H15 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u) (CHead x1 (Bind x0) x3) H9) in (\lambda (H16: (eq B Abst x0)).(\lambda (H17: (eq C d x1)).(let H18 \def (eq_ind_r T x3 (\lambda (t: T).(subst0 (minus i (S n)) u0 t x4)) H11 u H15) in (let H19 \def (eq_ind_r C x1 (\lambda (c: C).(csubst0 (minus i (S n)) u0 c x2)) H12 d H17) in (let H20 \def (eq_ind_r B x0 (\lambda (b: B).(getl n c3 (CHead x2 (Bind b) x4))) H10 Abst H16) in (let H21 \def (eq_ind nat (minus i n) (\lambda (n: nat).(getl n (CHead x2 (Bind Abst) x4) (CHead e (Bind Abbr) u0))) (getl_conf_le i (CHead e (Bind Abbr) u0) c3 (csubst0_getl_ge i i (le_n i) c c3 u0 H4 (CHead e (Bind Abbr) u0) H5) (CHead x2 (Bind Abst) x4) n H20 (le_S_n n i (le_S (S n) i H6))) (S (minus i (S n))) (minus_x_Sy i n H6)) in (ty3_conv g c3 (lift (S n) O u) (lift (S n) O t0) (ty3_lift g x2 u t0 (H2 (minus i (S n)) u0 x2 u (fsubst0_fst (minus i (S n)) u0 d u x2 H19) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H19 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abst) x2 (CHead e (Bind Abbr) u0) x4 (minus i (S n)) H21))) c3 O (S n) (getl_drop Abst c3 x2 x4 n H20)) (TLRef n) (lift (S n) O x4) (ty3_abst g n c3 x2 x4 H20 t0 (H2 (minus i (S n)) u0 x2 x4 (fsubst0_both (minus i (S n)) u0 d u x4 H18 x2 H19) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H19 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abst) x2 (CHead e (Bind Abbr) u0) x4 (minus i (S n)) H21)))) (pc3_lift c3 x2 (S n) O (getl_drop Abst c3 x2 x4 n H20) x4 u (pc3_fsubst0 d u u (pc3_refl d u) (minus i (S n)) u0 x2 x4 (fsubst0_both (minus i (S n)) u0 d u x4 H18 x2 H19) e (csubst0_getl_ge_back (minus i (S n)) (minus i (S n)) (le_n (minus i (S n))) d x2 u0 H19 (CHead e (Bind Abbr) u0) (getl_gen_S (Bind Abst) x2 (CHead e (Bind Abbr) u0) x4 (minus i (S n)) H21)))))))))))) H14)) H13))))))))))) H8)) H7))) (\lambda (H6: (le i n)).(ty3_abst g n c3 d u (csubst0_getl_ge i n H6 c c3 u0 H4 (CHead d (Bind Abst) u) H0) t0 H1))))))) (\lambda (t3: T).(\lambda (H4: (subst0 i u0 (TLRef n) t3)).(\lambda (c3: C).(\lambda (H5: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u0))).(and_ind (eq nat n i) (eq T t3 (lift (S n) O u0)) (ty3 g c3 t3 (lift (S n) O u)) (\lambda (H7: (eq nat n i)).(\lambda (H8: (eq T t3 (lift (S n) O u0))).(eq_ind_r T (lift (S n) O u0) (\lambda (t4: T).(ty3 g c3 t4 (lift (S n) O u))) (let H9 \def (eq_ind_r nat i (\lambda (n: nat).(getl n c (CHead e (Bind Abbr) u0))) H6 n H7) in (let H10 \def (eq_ind_r nat i (\lambda (n: nat).(csubst0 n u0 c c3)) H5 n H7) in (let H11 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c0: C).(getl n c c0)) H0 (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (let H12 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind Abbr) u0) (getl_mono c (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (False_ind (ty3 g c3 (lift (S n) O u0) (lift (S n) O u)) H12))))) t3 H8))) (subst0_gen_lref u0 t3 i n H4)))))))) c2 t2 H3)))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (t0: T).(\lambda (H0: (ty3 g c u t0)).(\lambda (H1: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c u c2 t2) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 t0)))))))))).(\lambda (b: B).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c (Bind b) u) t2 t3)).(\lambda (H3: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t4: T).((fsubst0 i u0 (CHead c (Bind b) u) t2 c2 t4) \to (\forall (e: C).((getl i (CHead c (Bind b) u) (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t4 t3)))))))))).(\lambda (t4: T).(\lambda (H4: (ty3 g (CHead c (Bind b) u) t3 t4)).(\lambda (_: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 (CHead c (Bind b) u) t3 c2 t2) \to (\forall (e: C).((getl i (CHead c (Bind b) u) (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 t4)))))))))).(\lambda (i: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t5: T).(\lambda (H6: (fsubst0 i u0 c (THead (Bind b) u t2) c2 t5)).(fsubst0_ind i u0 c (THead (Bind b) u t2) (\lambda (c0: C).(\lambda (t6: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c0 t6 (THead (Bind b) u t3)))))) (\lambda (t6: T).(\lambda (H7: (subst0 i u0 (THead (Bind b) u t2) t6)).(\lambda (e: C).(\lambda (H8: (getl i c (CHead e (Bind Abbr) u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t6 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t7: T).(eq T t6 (THead (Bind b) u t7))) (\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7))) (ex3_2 T T (\lambda (u2: T).(\lambda (t7: T).(eq T t6 (THead (Bind b) u2 t7)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7)))) (ty3 g c t6 (THead (Bind b) u t3)) (\lambda (H9: (ex2 T (\lambda (u2: T).(eq T t6 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t6 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2)) (ty3 g c t6 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H10: (eq T t6 (THead (Bind b) x t2))).(\lambda (H11: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind b) x t2) (\lambda (t7: T).(ty3 g c t7 (THead (Bind b) u t3))) (ex_ind T (\lambda (t7: T).(ty3 g (CHead c (Bind b) u) t4 t7)) (ty3 g c (THead (Bind b) x t2) (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (H12: (ty3 g (CHead c (Bind b) u) t4 x0)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c (Bind b) x) t3 t7)) (ty3 g c (THead (Bind b) x t2) (THead (Bind b) u t3)) (\lambda (x1: T).(\lambda (H13: (ty3 g (CHead c (Bind b) x) t3 x1)).(ty3_conv g c (THead (Bind b) u t3) (THead (Bind b) u t4) (ty3_bind g c u t0 H0 b t3 t4 H4 x0 H12) (THead (Bind b) x t2) (THead (Bind b) x t3) (ty3_bind g c x t0 (H1 i u0 c x (fsubst0_snd i u0 c u x H11) e H8) b t2 t3 (H3 (S i) u0 (CHead c (Bind b) x) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c (Bind b) x) (csubst0_snd_bind b i u0 u x H11 c)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)) x1 H13) (pc3_fsubst0 c (THead (Bind b) u t3) (THead (Bind b) u t3) (pc3_refl c (THead (Bind b) u t3)) i u0 c (THead (Bind b) x t3) (fsubst0_snd i u0 c (THead (Bind b) u t3) (THead (Bind b) x t3) (subst0_fst u0 x u i H11 t3 (Bind b))) e H8)))) (ty3_correct g (CHead c (Bind b) x) t2 t3 (H3 (S i) u0 (CHead c (Bind b) x) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c (Bind b) x) (csubst0_snd_bind b i u0 u x H11 c)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)))))) (ty3_correct g (CHead c (Bind b) u) t3 t4 H4)) t6 H10)))) H9)) (\lambda (H9: (ex2 T (\lambda (t2: T).(eq T t6 (THead (Bind b) u t2))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t2 t3)))).(ex2_ind T (\lambda (t7: T).(eq T t6 (THead (Bind b) u t7))) (\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7)) (ty3 g c t6 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H10: (eq T t6 (THead (Bind b) u x))).(\lambda (H11: (subst0 (s (Bind b) i) u0 t2 x)).(eq_ind_r T (THead (Bind b) u x) (\lambda (t7: T).(ty3 g c t7 (THead (Bind b) u t3))) (ex_ind T (\lambda (t7: T).(ty3 g (CHead c (Bind b) u) t3 t7)) (ty3 g c (THead (Bind b) u x) (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (H12: (ty3 g (CHead c (Bind b) u) t3 x0)).(ty3_bind g c u t0 H0 b x t3 (H3 (S i) u0 (CHead c (Bind b) u) x (fsubst0_snd (S i) u0 (CHead c (Bind b) u) t2 x H11) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)) x0 H12))) (ty3_correct g (CHead c (Bind b) u) x t3 (H3 (S i) u0 (CHead c (Bind b) u) x (fsubst0_snd (S i) u0 (CHead c (Bind b) u) t2 x H11) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)))) t6 H10)))) H9)) (\lambda (H9: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t6 (THead (Bind b) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t2 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t7: T).(eq T t6 (THead (Bind b) u2 t7)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7))) (ty3 g c t6 (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H10: (eq T t6 (THead (Bind b) x0 x1))).(\lambda (H11: (subst0 i u0 u x0)).(\lambda (H12: (subst0 (s (Bind b) i) u0 t2 x1)).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t7: T).(ty3 g c t7 (THead (Bind b) u t3))) (ex_ind T (\lambda (t7: T).(ty3 g (CHead c (Bind b) u) t4 t7)) (ty3 g c (THead (Bind b) x0 x1) (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H13: (ty3 g (CHead c (Bind b) u) t4 x)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c (Bind b) x0) t3 t7)) (ty3 g c (THead (Bind b) x0 x1) (THead (Bind b) u t3)) (\lambda (x2: T).(\lambda (H14: (ty3 g (CHead c (Bind b) x0) t3 x2)).(ty3_conv g c (THead (Bind b) u t3) (THead (Bind b) u t4) (ty3_bind g c u t0 H0 b t3 t4 H4 x H13) (THead (Bind b) x0 x1) (THead (Bind b) x0 t3) (ty3_bind g c x0 t0 (H1 i u0 c x0 (fsubst0_snd i u0 c u x0 H11) e H8) b x1 t3 (H3 (S i) u0 (CHead c (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x1 H12 (CHead c (Bind b) x0) (csubst0_snd_bind b i u0 u x0 H11 c)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)) x2 H14) (pc3_fsubst0 c (THead (Bind b) u t3) (THead (Bind b) u t3) (pc3_refl c (THead (Bind b) u t3)) i u0 c (THead (Bind b) x0 t3) (fsubst0_snd i u0 c (THead (Bind b) u t3) (THead (Bind b) x0 t3) (subst0_fst u0 x0 u i H11 t3 (Bind b))) e H8)))) (ty3_correct g (CHead c (Bind b) x0) x1 t3 (H3 (S i) u0 (CHead c (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x1 H12 (CHead c (Bind b) x0) (csubst0_snd_bind b i u0 u x0 H11 c)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)))))) (ty3_correct g (CHead c (Bind b) u) t3 t4 H4)) t6 H10)))))) H9)) (subst0_gen_head (Bind b) u0 u t2 t6 i H7)))))) (\lambda (c3: C).(\lambda (H7: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H8: (getl i c (CHead e (Bind Abbr) u0))).(ex_ind T (\lambda (t6: T).(ty3 g (CHead c3 (Bind b) u) t3 t6)) (ty3 g c3 (THead (Bind b) u t2) (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H9: (ty3 g (CHead c3 (Bind b) u) t3 x)).(ty3_bind g c3 u t0 (H1 i u0 c3 u (fsubst0_fst i u0 c u c3 H7) e H8) b t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) u) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H7 u)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)) x H9))) (ty3_correct g (CHead c3 (Bind b) u) t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) u) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H7 u)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H8 u)))))))) (\lambda (t6: T).(\lambda (H7: (subst0 i u0 (THead (Bind b) u t2) t6)).(\lambda (c3: C).(\lambda (H8: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H9: (getl i c (CHead e (Bind Abbr) u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t6 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2))) (ex2 T (\lambda (t7: T).(eq T t6 (THead (Bind b) u t7))) (\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7))) (ex3_2 T T (\lambda (u2: T).(\lambda (t7: T).(eq T t6 (THead (Bind b) u2 t7)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7)))) (ty3 g c3 t6 (THead (Bind b) u t3)) (\lambda (H10: (ex2 T (\lambda (u2: T).(eq T t6 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2)))).(ex2_ind T (\lambda (u2: T).(eq T t6 (THead (Bind b) u2 t2))) (\lambda (u2: T).(subst0 i u0 u u2)) (ty3 g c3 t6 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H11: (eq T t6 (THead (Bind b) x t2))).(\lambda (H12: (subst0 i u0 u x)).(eq_ind_r T (THead (Bind b) x t2) (\lambda (t7: T).(ty3 g c3 t7 (THead (Bind b) u t3))) (ex_ind T (\lambda (t7: T).(ty3 g (CHead c3 (Bind b) u) t3 t7)) (ty3 g c3 (THead (Bind b) x t2) (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (H13: (ty3 g (CHead c3 (Bind b) u) t3 x0)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c3 (Bind b) u) x0 t7)) (ty3 g c3 (THead (Bind b) x t2) (THead (Bind b) u t3)) (\lambda (x1: T).(\lambda (H14: (ty3 g (CHead c3 (Bind b) u) x0 x1)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c3 (Bind b) x) t3 t7)) (ty3 g c3 (THead (Bind b) x t2) (THead (Bind b) u t3)) (\lambda (x2: T).(\lambda (H15: (ty3 g (CHead c3 (Bind b) x) t3 x2)).(ty3_conv g c3 (THead (Bind b) u t3) (THead (Bind b) u x0) (ty3_bind g c3 u t0 (H1 i u0 c3 u (fsubst0_fst i u0 c u c3 H8) e H9) b t3 x0 H13 x1 H14) (THead (Bind b) x t2) (THead (Bind b) x t3) (ty3_bind g c3 x t0 (H1 i u0 c3 x (fsubst0_both i u0 c u x H12 c3 H8) e H9) b t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) x) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) x) (csubst0_both_bind b i u0 u x H12 c c3 H8)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)) x2 H15) (pc3_fsubst0 c (THead (Bind b) u t3) (THead (Bind b) u t3) (pc3_refl c (THead (Bind b) u t3)) i u0 c3 (THead (Bind b) x t3) (fsubst0_both i u0 c (THead (Bind b) u t3) (THead (Bind b) x t3) (subst0_fst u0 x u i H12 t3 (Bind b)) c3 H8) e H9)))) (ty3_correct g (CHead c3 (Bind b) x) t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) x) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) x) (csubst0_both_bind b i u0 u x H12 c c3 H8)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)))))) (ty3_correct g (CHead c3 (Bind b) u) t3 x0 H13)))) (ty3_correct g (CHead c3 (Bind b) u) t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) u) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H8 u)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)))) t6 H11)))) H10)) (\lambda (H10: (ex2 T (\lambda (t2: T).(eq T t6 (THead (Bind b) u t2))) (\lambda (t3: T).(subst0 (s (Bind b) i) u0 t2 t3)))).(ex2_ind T (\lambda (t7: T).(eq T t6 (THead (Bind b) u t7))) (\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7)) (ty3 g c3 t6 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H11: (eq T t6 (THead (Bind b) u x))).(\lambda (H12: (subst0 (s (Bind b) i) u0 t2 x)).(eq_ind_r T (THead (Bind b) u x) (\lambda (t7: T).(ty3 g c3 t7 (THead (Bind b) u t3))) (ex_ind T (\lambda (t7: T).(ty3 g (CHead c3 (Bind b) u) t3 t7)) (ty3 g c3 (THead (Bind b) u x) (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (H13: (ty3 g (CHead c3 (Bind b) u) t3 x0)).(ty3_bind g c3 u t0 (H1 i u0 c3 u (fsubst0_fst i u0 c u c3 H8) e H9) b x t3 (H3 (S i) u0 (CHead c3 (Bind b) u) x (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x H12 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H8 u)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)) x0 H13))) (ty3_correct g (CHead c3 (Bind b) u) x t3 (H3 (S i) u0 (CHead c3 (Bind b) u) x (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x H12 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H8 u)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)))) t6 H11)))) H10)) (\lambda (H10: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t6 (THead (Bind b) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Bind b) i) u0 t2 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t7: T).(eq T t6 (THead (Bind b) u2 t7)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 u u2))) (\lambda (_: T).(\lambda (t7: T).(subst0 (s (Bind b) i) u0 t2 t7))) (ty3 g c3 t6 (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H11: (eq T t6 (THead (Bind b) x0 x1))).(\lambda (H12: (subst0 i u0 u x0)).(\lambda (H13: (subst0 (s (Bind b) i) u0 t2 x1)).(eq_ind_r T (THead (Bind b) x0 x1) (\lambda (t7: T).(ty3 g c3 t7 (THead (Bind b) u t3))) (ex_ind T (\lambda (t7: T).(ty3 g (CHead c3 (Bind b) u) t3 t7)) (ty3 g c3 (THead (Bind b) x0 x1) (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H14: (ty3 g (CHead c3 (Bind b) u) t3 x)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c3 (Bind b) u) x t7)) (ty3 g c3 (THead (Bind b) x0 x1) (THead (Bind b) u t3)) (\lambda (x2: T).(\lambda (H15: (ty3 g (CHead c3 (Bind b) u) x x2)).(ex_ind T (\lambda (t7: T).(ty3 g (CHead c3 (Bind b) x0) t3 t7)) (ty3 g c3 (THead (Bind b) x0 x1) (THead (Bind b) u t3)) (\lambda (x3: T).(\lambda (H16: (ty3 g (CHead c3 (Bind b) x0) t3 x3)).(ty3_conv g c3 (THead (Bind b) u t3) (THead (Bind b) u x) (ty3_bind g c3 u t0 (H1 i u0 c3 u (fsubst0_fst i u0 c u c3 H8) e H9) b t3 x H14 x2 H15) (THead (Bind b) x0 x1) (THead (Bind b) x0 t3) (ty3_bind g c3 x0 t0 (H1 i u0 c3 x0 (fsubst0_both i u0 c u x0 H12 c3 H8) e H9) b x1 t3 (H3 (S i) u0 (CHead c3 (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x1 H13 (CHead c3 (Bind b) x0) (csubst0_both_bind b i u0 u x0 H12 c c3 H8)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)) x3 H16) (pc3_fsubst0 c (THead (Bind b) u t3) (THead (Bind b) u t3) (pc3_refl c (THead (Bind b) u t3)) i u0 c3 (THead (Bind b) x0 t3) (fsubst0_both i u0 c (THead (Bind b) u t3) (THead (Bind b) x0 t3) (subst0_fst u0 x0 u i H12 t3 (Bind b)) c3 H8) e H9)))) (ty3_correct g (CHead c3 (Bind b) x0) x1 t3 (H3 (S i) u0 (CHead c3 (Bind b) x0) x1 (fsubst0_both (S i) u0 (CHead c (Bind b) u) t2 x1 H13 (CHead c3 (Bind b) x0) (csubst0_both_bind b i u0 u x0 H12 c c3 H8)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)))))) (ty3_correct g (CHead c3 (Bind b) u) t3 x H14)))) (ty3_correct g (CHead c3 (Bind b) u) t2 t3 (H3 (S i) u0 (CHead c3 (Bind b) u) t2 (fsubst0_fst (S i) u0 (CHead c (Bind b) u) t2 (CHead c3 (Bind b) u) (csubst0_fst_bind b i c c3 u0 H8 u)) e (getl_head (Bind b) i c (CHead e (Bind Abbr) u0) H9 u)))) t6 H11)))))) H10)) (subst0_gen_head (Bind b) u0 u t2 t6 i H7)))))))) c2 t5 H6))))))))))))))))))) (\lambda (c: C).(\lambda (w: T).(\lambda (u: T).(\lambda (H0: (ty3 g c w u)).(\lambda (H1: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c w c2 t2) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 u)))))))))).(\lambda (v: T).(\lambda (t0: T).(\lambda (H2: (ty3 g c v (THead (Bind Abst) u t0))).(\lambda (H3: ((\forall (i: nat).(\forall (u0: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u0 c v c2 t2) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c2 t2 (THead (Bind Abst) u t0))))))))))).(\lambda (i: nat).(\lambda (u0: T).(\lambda (c2: C).(\lambda (t2: T).(\lambda (H4: (fsubst0 i u0 c (THead (Flat Appl) w v) c2 t2)).(fsubst0_ind i u0 c (THead (Flat Appl) w v) (\lambda (c0: C).(\lambda (t3: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u0)) \to (ty3 g c0 t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))))))) (\lambda (t3: T).(\lambda (H5: (subst0 i u0 (THead (Flat Appl) w v) t3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2))) (ex2 T (\lambda (t4: T).(eq T t3 (THead (Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))) (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)))) (ty3 g c t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (H7: (ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2)) (ty3 g c t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H8: (eq T t3 (THead (Flat Appl) x v))).(\lambda (H9: (subst0 i u0 w x)).(eq_ind_r T (THead (Flat Appl) x v) (\lambda (t4: T).(ty3 g c t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ex_ind T (\lambda (t4: T).(ty3 g c (THead (Bind Abst) u t0) t4)) (ty3 g c (THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (H10: (ty3 g c (THead (Bind Abst) u t0) x0)).(ex4_3_ind T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c (THead (Bind Abst) u t4) x0)))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c u t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) t0 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c (Bind Abst) u) t4 t6)))) (ty3 g c (THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (_: (pc3 c (THead (Bind Abst) u x1) x0)).(\lambda (_: (ty3 g c u x2)).(\lambda (H13: (ty3 g (CHead c (Bind Abst) u) t0 x1)).(\lambda (H14: (ty3 g (CHead c (Bind Abst) u) x1 x3)).(ex_ind T (\lambda (t4: T).(ty3 g c u t4)) (ty3 g c (THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x4: T).(\lambda (H15: (ty3 g c u x4)).(ty3_conv g c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x1)) (ty3_appl g c w u H0 (THead (Bind Abst) u t0) x1 (ty3_bind g c u x4 H15 Abst t0 x1 H13 x3 H14)) (THead (Flat Appl) x v) (THead (Flat Appl) x (THead (Bind Abst) u t0)) (ty3_appl g c x u (H1 i u0 c x (fsubst0_snd i u0 c w x H9) e H6) v t0 H2) (pc3_fsubst0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_refl c (THead (Flat Appl) w (THead (Bind Abst) u t0))) i u0 c (THead (Flat Appl) x (THead (Bind Abst) u t0)) (fsubst0_snd i u0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) x (THead (Bind Abst) u t0)) (subst0_fst u0 x w i H9 (THead (Bind Abst) u t0) (Flat Appl))) e H6)))) (ty3_correct g c x u (H1 i u0 c x (fsubst0_snd i u0 c w x H9) e H6)))))))))) (ty3_gen_bind g Abst c u t0 x0 H10)))) (ty3_correct g c v (THead (Bind Abst) u t0) H2)) t3 H8)))) H7)) (\lambda (H7: (ex2 T (\lambda (t2: T).(eq T t3 (THead (Flat Appl) w t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 v t2)))).(ex2_ind T (\lambda (t4: T).(eq T t3 (THead (Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)) (ty3 g c t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H8: (eq T t3 (THead (Flat Appl) w x))).(\lambda (H9: (subst0 (s (Flat Appl) i) u0 v x)).(eq_ind_r T (THead (Flat Appl) w x) (\lambda (t4: T).(ty3 g c t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ty3_appl g c w u H0 x t0 (H3 (s (Flat Appl) i) u0 c x (fsubst0_snd (s (Flat Appl) i) u0 c v x H9) e H6)) t3 H8)))) H7)) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t3 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 v t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))) (ty3 g c t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq T t3 (THead (Flat Appl) x0 x1))).(\lambda (H9: (subst0 i u0 w x0)).(\lambda (H10: (subst0 (s (Flat Appl) i) u0 v x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t4: T).(ty3 g c t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ex_ind T (\lambda (t4: T).(ty3 g c (THead (Bind Abst) u t0) t4)) (ty3 g c (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H11: (ty3 g c (THead (Bind Abst) u t0) x)).(ex4_3_ind T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c (THead (Bind Abst) u t4) x)))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c u t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c (Bind Abst) u) t0 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c (Bind Abst) u) t4 t6)))) (ty3 g c (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (_: (pc3 c (THead (Bind Abst) u x2) x)).(\lambda (_: (ty3 g c u x3)).(\lambda (H14: (ty3 g (CHead c (Bind Abst) u) t0 x2)).(\lambda (H15: (ty3 g (CHead c (Bind Abst) u) x2 x4)).(ex_ind T (\lambda (t4: T).(ty3 g c u t4)) (ty3 g c (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x5: T).(\lambda (H16: (ty3 g c u x5)).(ty3_conv g c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x2)) (ty3_appl g c w u H0 (THead (Bind Abst) u t0) x2 (ty3_bind g c u x5 H16 Abst t0 x2 H14 x4 H15)) (THead (Flat Appl) x0 x1) (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) (ty3_appl g c x0 u (H1 i u0 c x0 (fsubst0_snd i u0 c w x0 H9) e H6) x1 t0 (H3 (s (Flat Appl) i) u0 c x1 (fsubst0_snd (s (Flat Appl) i) u0 c v x1 H10) e H6)) (pc3_fsubst0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_refl c (THead (Flat Appl) w (THead (Bind Abst) u t0))) i u0 c (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) (fsubst0_snd i u0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) (subst0_fst u0 x0 w i H9 (THead (Bind Abst) u t0) (Flat Appl))) e H6)))) (ty3_correct g c w u H0))))))))) (ty3_gen_bind g Abst c u t0 x H11)))) (ty3_correct g c v (THead (Bind Abst) u t0) H2)) t3 H8)))))) H7)) (subst0_gen_head (Flat Appl) u0 w v t3 i H5)))))) (\lambda (c3: C).(\lambda (H5: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u0))).(ty3_appl g c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H5) e H6) v t0 (H3 i u0 c3 v (fsubst0_fst i u0 c v c3 H5) e H6)))))) (\lambda (t3: T).(\lambda (H5: (subst0 i u0 (THead (Flat Appl) w v) t3)).(\lambda (c3: C).(\lambda (H6: (csubst0 i u0 c c3)).(\lambda (e: C).(\lambda (H7: (getl i c (CHead e (Bind Abbr) u0))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2))) (ex2 T (\lambda (t4: T).(eq T t3 (THead (Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))) (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)))) (ty3 g c3 t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (H8: (ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i u0 w u2)) (ty3 g c3 t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H9: (eq T t3 (THead (Flat Appl) x v))).(\lambda (H10: (subst0 i u0 w x)).(eq_ind_r T (THead (Flat Appl) x v) (\lambda (t4: T).(ty3 g c3 t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ex_ind T (\lambda (t4: T).(ty3 g c3 (THead (Bind Abst) u t0) t4)) (ty3 g c3 (THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (H11: (ty3 g c3 (THead (Bind Abst) u t0) x0)).(ex4_3_ind T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c3 (THead (Bind Abst) u t4) x0)))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c3 u t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c3 (Bind Abst) u) t0 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c3 (Bind Abst) u) t4 t6)))) (ty3 g c3 (THead (Flat Appl) x v) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x1: T).(\lambda (x2: T).(\lambda (x3: T).(\lambda (_: (pc3 c3 (THead (Bind Abst) u x1) x0)).(\lambda (H13: (ty3 g c3 u x2)).(\lambda (H14: (ty3 g (CHead c3 (Bind Abst) u) t0 x1)).(\lambda (H15: (ty3 g (CHead c3 (Bind Abst) u) x1 x3)).(ty3_conv g c3 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x1)) (ty3_appl g c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H6) e H7) (THead (Bind Abst) u t0) x1 (ty3_bind g c3 u x2 H13 Abst t0 x1 H14 x3 H15)) (THead (Flat Appl) x v) (THead (Flat Appl) x (THead (Bind Abst) u t0)) (ty3_appl g c3 x u (H1 i u0 c3 x (fsubst0_both i u0 c w x H10 c3 H6) e H7) v t0 (H3 i u0 c3 v (fsubst0_fst i u0 c v c3 H6) e H7)) (pc3_fsubst0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_refl c (THead (Flat Appl) w (THead (Bind Abst) u t0))) i u0 c3 (THead (Flat Appl) x (THead (Bind Abst) u t0)) (fsubst0_both i u0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) x (THead (Bind Abst) u t0)) (subst0_fst u0 x w i H10 (THead (Bind Abst) u t0) (Flat Appl)) c3 H6) e H7))))))))) (ty3_gen_bind g Abst c3 u t0 x0 H11)))) (ty3_correct g c3 v (THead (Bind Abst) u t0) (H3 i u0 c3 v (fsubst0_fst i u0 c v c3 H6) e H7))) t3 H9)))) H8)) (\lambda (H8: (ex2 T (\lambda (t2: T).(eq T t3 (THead (Flat Appl) w t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 v t2)))).(ex2_ind T (\lambda (t4: T).(eq T t3 (THead (Flat Appl) w t4))) (\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4)) (ty3 g c3 t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H9: (eq T t3 (THead (Flat Appl) w x))).(\lambda (H10: (subst0 (s (Flat Appl) i) u0 v x)).(eq_ind_r T (THead (Flat Appl) w x) (\lambda (t4: T).(ty3 g c3 t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ty3_appl g c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H6) e H7) x t0 (H3 i u0 c3 x (fsubst0_both i u0 c v x H10 c3 H6) e H7)) t3 H9)))) H8)) (\lambda (H8: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t3 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) u0 v t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Flat Appl) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u0 w u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Appl) i) u0 v t4))) (ty3 g c3 t3 (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H9: (eq T t3 (THead (Flat Appl) x0 x1))).(\lambda (H10: (subst0 i u0 w x0)).(\lambda (H11: (subst0 (s (Flat Appl) i) u0 v x1)).(eq_ind_r T (THead (Flat Appl) x0 x1) (\lambda (t4: T).(ty3 g c3 t4 (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ex_ind T (\lambda (t4: T).(ty3 g c3 (THead (Bind Abst) u t0) t4)) (ty3 g c3 (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H12: (ty3 g c3 (THead (Bind Abst) u t0) x)).(ex4_3_ind T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c3 (THead (Bind Abst) u t4) x)))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c3 u t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c3 (Bind Abst) u) t0 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c3 (Bind Abst) u) t4 t6)))) (ty3 g c3 (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (_: (pc3 c3 (THead (Bind Abst) u x2) x)).(\lambda (_: (ty3 g c3 u x3)).(\lambda (H15: (ty3 g (CHead c3 (Bind Abst) u) t0 x2)).(\lambda (H16: (ty3 g (CHead c3 (Bind Abst) u) x2 x4)).(ex_ind T (\lambda (t4: T).(ty3 g c3 u t4)) (ty3 g c3 (THead (Flat Appl) x0 x1) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x5: T).(\lambda (H17: (ty3 g c3 u x5)).(ty3_conv g c3 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x2)) (ty3_appl g c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H6) e H7) (THead (Bind Abst) u t0) x2 (ty3_bind g c3 u x5 H17 Abst t0 x2 H15 x4 H16)) (THead (Flat Appl) x0 x1) (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) (ty3_appl g c3 x0 u (H1 i u0 c3 x0 (fsubst0_both i u0 c w x0 H10 c3 H6) e H7) x1 t0 (H3 i u0 c3 x1 (fsubst0_both i u0 c v x1 H11 c3 H6) e H7)) (pc3_fsubst0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_refl c (THead (Flat Appl) w (THead (Bind Abst) u t0))) i u0 c3 (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) (fsubst0_both i u0 c (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) x0 (THead (Bind Abst) u t0)) (subst0_fst u0 x0 w i H10 (THead (Bind Abst) u t0) (Flat Appl)) c3 H6) e H7)))) (ty3_correct g c3 w u (H1 i u0 c3 w (fsubst0_fst i u0 c w c3 H6) e H7)))))))))) (ty3_gen_bind g Abst c3 u t0 x H12)))) (ty3_correct g c3 v (THead (Bind Abst) u t0) (H3 i u0 c3 v (fsubst0_fst i u0 c v c3 H6) e H7))) t3 H9)))))) H8)) (subst0_gen_head (Flat Appl) u0 w v t3 i H5)))))))) c2 t2 H4))))))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: (ty3 g c t2 t3)).(\lambda (H1: ((\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t4: T).((fsubst0 i u c t2 c2 t4) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c2 t4 t3)))))))))).(\lambda (t0: T).(\lambda (H2: (ty3 g c t3 t0)).(\lambda (H3: ((\forall (i: nat).(\forall (u: T).(\forall (c2: C).(\forall (t2: T).((fsubst0 i u c t3 c2 t2) \to (\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c2 t2 t0)))))))))).(\lambda (i: nat).(\lambda (u: T).(\lambda (c2: C).(\lambda (t4: T).(\lambda (H4: (fsubst0 i u c (THead (Flat Cast) t3 t2) c2 t4)).(fsubst0_ind i u c (THead (Flat Cast) t3 t2) (\lambda (c0: C).(\lambda (t5: T).(\forall (e: C).((getl i c (CHead e (Bind Abbr) u)) \to (ty3 g c0 t5 t3))))) (\lambda (t5: T).(\lambda (H5: (subst0 i u (THead (Flat Cast) t3 t2) t5)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2))) (ex2 T (\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) (\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6))) (ex3_2 T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead (Flat Cast) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6)))) (ty3 g c t5 t3) (\lambda (H7: (ex2 T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2)) (ty3 g c t5 t3) (\lambda (x: T).(\lambda (H8: (eq T t5 (THead (Flat Cast) x t2))).(\lambda (H9: (subst0 i u t3 x)).(eq_ind_r T (THead (Flat Cast) x t2) (\lambda (t6: T).(ty3 g c t6 t3)) (ty3_conv g c t3 t0 H2 (THead (Flat Cast) x t2) x (ty3_cast g c t2 x (ty3_conv g c x t0 (H3 i u c x (fsubst0_snd i u c t3 x H9) e H6) t2 t3 H0 (pc3_s c t3 x (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c x (fsubst0_snd i u c t3 x H9) e H6))) t0 (H3 i u c x (fsubst0_snd i u c t3 x H9) e H6)) (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c x (fsubst0_snd i u c t3 x H9) e H6)) t5 H8)))) H7)) (\lambda (H7: (ex2 T (\lambda (t2: T).(eq T t5 (THead (Flat Cast) t3 t2))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u t2 t3)))).(ex2_ind T (\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) (\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6)) (ty3 g c t5 t3) (\lambda (x: T).(\lambda (H8: (eq T t5 (THead (Flat Cast) t3 x))).(\lambda (H9: (subst0 (s (Flat Cast) i) u t2 x)).(eq_ind_r T (THead (Flat Cast) t3 x) (\lambda (t6: T).(ty3 g c t6 t3)) (ty3_cast g c x t3 (H1 (s (Flat Cast) i) u c x (fsubst0_snd (s (Flat Cast) i) u c t2 x H9) e H6) t0 H2) t5 H8)))) H7)) (\lambda (H7: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t5 (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u t2 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead (Flat Cast) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6))) (ty3 g c t5 t3) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq T t5 (THead (Flat Cast) x0 x1))).(\lambda (H9: (subst0 i u t3 x0)).(\lambda (H10: (subst0 (s (Flat Cast) i) u t2 x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t6: T).(ty3 g c t6 t3)) (ty3_conv g c t3 t0 H2 (THead (Flat Cast) x0 x1) x0 (ty3_cast g c x1 x0 (ty3_conv g c x0 t0 (H3 i u c x0 (fsubst0_snd i u c t3 x0 H9) e H6) x1 t3 (H1 (s (Flat Cast) i) u c x1 (fsubst0_snd (s (Flat Cast) i) u c t2 x1 H10) e H6) (pc3_s c t3 x0 (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c x0 (fsubst0_snd i u c t3 x0 H9) e H6))) t0 (H3 i u c x0 (fsubst0_snd i u c t3 x0 H9) e H6)) (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c x0 (fsubst0_snd i u c t3 x0 H9) e H6)) t5 H8)))))) H7)) (subst0_gen_head (Flat Cast) u t3 t2 t5 i H5)))))) (\lambda (c3: C).(\lambda (H5: (csubst0 i u c c3)).(\lambda (e: C).(\lambda (H6: (getl i c (CHead e (Bind Abbr) u))).(ty3_cast g c3 t2 t3 (H1 i u c3 t2 (fsubst0_fst i u c t2 c3 H5) e H6) t0 (H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H5) e H6)))))) (\lambda (t5: T).(\lambda (H5: (subst0 i u (THead (Flat Cast) t3 t2) t5)).(\lambda (c3: C).(\lambda (H6: (csubst0 i u c c3)).(\lambda (e: C).(\lambda (H7: (getl i c (CHead e (Bind Abbr) u))).(or3_ind (ex2 T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2))) (ex2 T (\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) (\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6))) (ex3_2 T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead (Flat Cast) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6)))) (ty3 g c3 t5 t3) (\lambda (H8: (ex2 T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t5 (THead (Flat Cast) u2 t2))) (\lambda (u2: T).(subst0 i u t3 u2)) (ty3 g c3 t5 t3) (\lambda (x: T).(\lambda (H9: (eq T t5 (THead (Flat Cast) x t2))).(\lambda (H10: (subst0 i u t3 x)).(eq_ind_r T (THead (Flat Cast) x t2) (\lambda (t6: T).(ty3 g c3 t6 t3)) (ty3_conv g c3 t3 t0 (H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H6) e H7) (THead (Flat Cast) x t2) x (ty3_cast g c3 t2 x (ty3_conv g c3 x t0 (H3 i u c3 x (fsubst0_both i u c t3 x H10 c3 H6) e H7) t2 t3 (H1 i u c3 t2 (fsubst0_fst i u c t2 c3 H6) e H7) (pc3_s c3 t3 x (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c3 x (fsubst0_both i u c t3 x H10 c3 H6) e H7))) t0 (H3 i u c3 x (fsubst0_both i u c t3 x H10 c3 H6) e H7)) (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c3 x (fsubst0_both i u c t3 x H10 c3 H6) e H7)) t5 H9)))) H8)) (\lambda (H8: (ex2 T (\lambda (t2: T).(eq T t5 (THead (Flat Cast) t3 t2))) (\lambda (t3: T).(subst0 (s (Flat Cast) i) u t2 t3)))).(ex2_ind T (\lambda (t6: T).(eq T t5 (THead (Flat Cast) t3 t6))) (\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6)) (ty3 g c3 t5 t3) (\lambda (x: T).(\lambda (H9: (eq T t5 (THead (Flat Cast) t3 x))).(\lambda (H10: (subst0 (s (Flat Cast) i) u t2 x)).(eq_ind_r T (THead (Flat Cast) t3 x) (\lambda (t6: T).(ty3 g c3 t6 t3)) (ty3_cast g c3 x t3 (H1 i u c3 x (fsubst0_both i u c t2 x H10 c3 H6) e H7) t0 (H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H6) e H7)) t5 H9)))) H8)) (\lambda (H8: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T t5 (THead (Flat Cast) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s (Flat Cast) i) u t2 t3))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t6: T).(eq T t5 (THead (Flat Cast) u2 t6)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i u t3 u2))) (\lambda (_: T).(\lambda (t6: T).(subst0 (s (Flat Cast) i) u t2 t6))) (ty3 g c3 t5 t3) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H9: (eq T t5 (THead (Flat Cast) x0 x1))).(\lambda (H10: (subst0 i u t3 x0)).(\lambda (H11: (subst0 (s (Flat Cast) i) u t2 x1)).(eq_ind_r T (THead (Flat Cast) x0 x1) (\lambda (t6: T).(ty3 g c3 t6 t3)) (ty3_conv g c3 t3 t0 (H3 i u c3 t3 (fsubst0_fst i u c t3 c3 H6) e H7) (THead (Flat Cast) x0 x1) x0 (ty3_cast g c3 x1 x0 (ty3_conv g c3 x0 t0 (H3 i u c3 x0 (fsubst0_both i u c t3 x0 H10 c3 H6) e H7) x1 t3 (H1 i u c3 x1 (fsubst0_both i u c t2 x1 H11 c3 H6) e H7) (pc3_s c3 t3 x0 (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c3 x0 (fsubst0_both i u c t3 x0 H10 c3 H6) e H7))) t0 (H3 i u c3 x0 (fsubst0_both i u c t3 x0 H10 c3 H6) e H7)) (pc3_fsubst0 c t3 t3 (pc3_refl c t3) i u c3 x0 (fsubst0_both i u c t3 x0 H10 c3 H6) e H7)) t5 H9)))))) H8)) (subst0_gen_head (Flat Cast) u t3 t2 t5 i H5)))))))) c2 t4 H4)))))))))))))) c1 t1 t H))))). theorem ty3_csubst0: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (e: C).(\forall (u: T).(\forall (i: nat).((getl i c1 (CHead e (Bind Abbr) u)) \to (\forall (c2: C).((csubst0 i u c1 c2) \to (ty3 g c2 t1 t2))))))))))) @@ -2980,12 +2980,12 @@ theorem ty3_subst0: theorem ty3_gen_cabbr: \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c t1 t2) \to (\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c (CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t1 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t2 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (ty3 g c t1 t2)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t3 t)).(\lambda (H1: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (u: T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 u t4)).(\lambda (H3: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (H4: (pc3 c0 t4 t3)).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H5: (getl d c0 (CHead e (Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H6: (csubst1 d u0 c0 a0)).(\lambda (a: C).(\lambda (H7: (drop (S O) d a0 a)).(let H8 \def (H3 e u0 d H5 a0 H6 a H7) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t3 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H9: (subst1 d u0 u (lift (S O) d x0))).(\lambda (H10: (subst1 d u0 t4 (lift (S O) d x1))).(\lambda (H11: (ty3 g a x0 x1)).(let H12 \def (H1 e u0 d H5 a0 H6 a H7) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t3 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H13: (subst1 d u0 t3 (lift (S O) d x2))).(\lambda (_: (subst1 d u0 t (lift (S O) d x3))).(\lambda (H15: (ty3 g a x2 x3)).(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t3 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) x0 x2 H9 H13 (ty3_conv g a x2 x3 H15 x0 x1 H11 (pc3_gen_cabbr c0 t4 t3 H4 e u0 d H5 a0 H6 a H7 x1 H10 x2 H13)))))))) H12))))))) H8)))))))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda (_: (getl d c0 (CHead e (Bind Abbr) u))).(\lambda (a0: C).(\lambda (_: (csubst1 d u c0 a0)).(\lambda (a: C).(\lambda (_: (drop (S O) d a0 a)).(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u (TSort m) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u (TSort (next g m)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TSort m) (TSort (next g m)) (eq_ind_r T (TSort m) (\lambda (t: T).(subst1 d u (TSort m) t)) (subst1_refl d u (TSort m)) (lift (S O) d (TSort m)) (lift_sort m (S O) d)) (eq_ind_r T (TSort (next g m)) (\lambda (t: T).(subst1 d u (TSort (next g m)) t)) (subst1_refl d u (TSort (next g m))) (lift (S O) d (TSort (next g m))) (lift_sort (next g m) (S O) d)) (ty3_sort g a m)))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: T).(\forall (d0: nat).((getl d0 d (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d0 u0 d a0) \to (\forall (a: C).((drop (S O) d0 a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 u (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 t (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H4: (csubst1 d0 u0 c0 a0)).(\lambda (a: C).(\lambda (H5: (drop (S O) d0 a0 a)).(lt_eq_gt_e n d0 (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (H6: (lt n d0)).(let H7 \def (eq_ind nat (minus d0 n) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0))) (getl_conf_le d0 (CHead e (Bind Abbr) u0) c0 H3 (CHead d (Bind Abbr) u) n H0 (le_S_n n d0 (le_S (S n) d0 H6))) (S (minus d0 (S n))) (minus_x_Sy d0 n H6)) in (ex2_ind C (\lambda (e2: C).(csubst1 (minus d0 n) u0 (CHead d (Bind Abbr) u) e2)) (\lambda (e2: C).(getl n a0 e2)) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x: C).(\lambda (H8: (csubst1 (minus d0 n) u0 (CHead d (Bind Abbr) u) x)).(\lambda (H9: (getl n a0 x)).(let H10 \def (eq_ind nat (minus d0 n) (\lambda (n: nat).(csubst1 n u0 (CHead d (Bind Abbr) u) x)) H8 (S (minus d0 (S n))) (minus_x_Sy d0 n H6)) in (let H11 \def (csubst1_gen_head (Bind Abbr) d x u u0 (minus d0 (S n)) H10) in (ex3_2_ind T C (\lambda (u2: T).(\lambda (c2: C).(eq C x (CHead c2 (Bind Abbr) u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 (minus d0 (S n)) u0 u u2))) (\lambda (_: T).(\lambda (c2: C).(csubst1 (minus d0 (S n)) u0 d c2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (H12: (eq C x (CHead x1 (Bind Abbr) x0))).(\lambda (H13: (subst1 (minus d0 (S n)) u0 u x0)).(\lambda (H14: (csubst1 (minus d0 (S n)) u0 d x1)).(let H15 \def (eq_ind C x (\lambda (c: C).(getl n a0 c)) H9 (CHead x1 (Bind Abbr) x0) H12) in (let H16 \def (eq_ind nat d0 (\lambda (n: nat).(drop (S O) n a0 a)) H5 (S (plus n (minus d0 (S n)))) (lt_plus_minus n d0 H6)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T x0 (lift (S O) (minus d0 (S n)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl n a (CHead e0 (Bind Abbr) v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S n)) x1 e0))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H17: (eq T x0 (lift (S O) (minus d0 (S n)) x2))).(\lambda (H18: (getl n a (CHead x3 (Bind Abbr) x2))).(\lambda (H19: (drop (S O) (minus d0 (S n)) x1 x3)).(let H20 \def (eq_ind T x0 (\lambda (t: T).(subst1 (minus d0 (S n)) u0 u t)) H13 (lift (S O) (minus d0 (S n)) x2) H17) in (let H21 \def (H2 e u0 (minus d0 (S n)) (getl_gen_S (Bind Abbr) d (CHead e (Bind Abbr) u0) u (minus d0 (S n)) H7) x1 H14 x3 H19) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 (minus d0 (S n)) u0 u (lift (S O) (minus d0 (S n)) y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (minus d0 (S n)) u0 t (lift (S O) (minus d0 (S n)) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g x3 y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H22: (subst1 (minus d0 (S n)) u0 u (lift (S O) (minus d0 (S n)) x4))).(\lambda (H23: (subst1 (minus d0 (S n)) u0 t (lift (S O) (minus d0 (S n)) x5))).(\lambda (H24: (ty3 g x3 x4 x5)).(let H25 \def (eq_ind T x4 (\lambda (t: T).(ty3 g x3 t x5)) H24 x2 (subst1_confluence_lift u x4 u0 (minus d0 (S n)) H22 x2 H20)) in (eq_ind_r nat (plus (minus d0 (S n)) (S n)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (S n) (minus d0 (S n))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O t) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O t) (lift (S O) (plus (S n) (minus d0 (S n))) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef n) (lift (S n) O x5) (eq_ind_r T (TLRef n) (\lambda (t0: T).(subst1 d0 u0 (TLRef n) t0)) (subst1_refl d0 u0 (TLRef n)) (lift (S O) d0 (TLRef n)) (lift_lref_lt n (S O) d0 H6)) (eq_ind_r T (lift (S n) O (lift (S O) (minus d0 (S n)) x5)) (\lambda (t0: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O t) t0)) (subst1_lift_ge t (lift (S O) (minus d0 (S n)) x5) u0 (minus d0 (S n)) (S n) H23 O (le_O_n (minus d0 (S n)))) (lift (S O) (plus (S n) (minus d0 (S n))) (lift (S n) O x5)) (lift_d x5 (S O) (S n) (minus d0 (S n)) O (le_O_n (minus d0 (S n))))) (ty3_abbr g n a x3 x2 H18 x5 H25)) d0 (le_plus_minus (S n) d0 H6)) d0 (le_plus_minus_sym (S n) d0 H6)))))))) H21)))))))) (getl_drop_conf_lt Abbr a0 x1 x0 n H15 a (S O) (minus d0 (S n)) H16))))))))) H11)))))) (csubst1_getl_lt d0 n H6 c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0)))) (\lambda (H6: (eq nat n d0)).(let H7 \def (eq_ind_r nat d0 (\lambda (n: nat).(drop (S O) n a0 a)) H5 n H6) in (let H8 \def (eq_ind_r nat d0 (\lambda (n: nat).(csubst1 n u0 c0 a0)) H4 n H6) in (let H9 \def (eq_ind_r nat d0 (\lambda (n: nat).(getl n c0 (CHead e (Bind Abbr) u0))) H3 n H6) in (eq_ind nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 n0 u0 (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n0 u0 (lift (S n) O t) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H10 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c: C).(getl n c0 c)) H0 (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (let H11 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in ((let H12 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (\lambda (H13: (eq C d e)).(let H14 \def (eq_ind_r T u0 (\lambda (t: T).(getl n c0 (CHead e (Bind Abbr) t))) H10 u H12) in (let H15 \def (eq_ind_r T u0 (\lambda (t: T).(csubst1 n t c0 a0)) H8 u H12) in (eq_ind T u (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 n t0 (TLRef n) (lift (S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n t0 (lift (S n) O t) (lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H16 \def (eq_ind_r C e (\lambda (c: C).(getl n c0 (CHead c (Bind Abbr) u))) H14 d H13) in (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 n u (TLRef n) (lift (S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n u (lift (S n) O t) (lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (lift n O u) (lift n O t) (subst1_single n u (TLRef n) (lift (S O) n (lift n O u)) (eq_ind_r T (lift (plus (S O) n) O u) (\lambda (t0: T).(subst0 n u (TLRef n) t0)) (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)))) (eq_ind_r T (lift (plus (S O) n) O t) (\lambda (t0: T).(subst1 n u (lift (S n) O t) t0)) (subst1_refl n u (lift (S n) O t)) (lift (S O) n (lift n O t)) (lift_free t n (S O) O n (le_n (plus O n)) (le_O_n n))) (ty3_lift g d u t H1 a O n (getl_conf_ge_drop Abbr a0 d u n (csubst1_getl_ge n n (le_n n) c0 a0 u H15 (CHead d (Bind Abbr) u) H16) a H7)))) u0 H12))))) H11))) d0 H6))))) (\lambda (H6: (lt d0 n)).(eq_ind_r nat (S (plus O (minus n (S O)))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind nat (plus (S O) (minus n (S O))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (minus n (S O)) (S O)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef (plus (minus n (S O)) (S O))) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef (minus n (S O))) (lift n O t) (eq_ind_r T (TLRef (plus (minus n (S O)) (S O))) (\lambda (t0: T).(subst1 d0 u0 (TLRef (plus (minus n (S O)) (S O))) t0)) (subst1_refl d0 u0 (TLRef (plus (minus n (S O)) (S O)))) (lift (S O) d0 (TLRef (minus n (S O)))) (lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus d0 n H6))) (eq_ind_r T (lift (plus (S O) n) O t) (\lambda (t0: T).(subst1 d0 u0 (lift (S n) O t) t0)) (subst1_refl d0 u0 (lift (S n) O t)) (lift (S O) d0 (lift n O t)) (lift_free t n (S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) (plus O n) H6)) (le_O_n d0))) (eq_ind_r nat (S (minus n (S O))) (\lambda (n0: nat).(ty3 g a (TLRef (minus n (S O))) (lift n0 O t))) (ty3_abbr g (minus n (S O)) a d u (getl_drop_conf_ge n (CHead d (Bind Abbr) u) a0 (csubst1_getl_ge d0 n (le_S_n d0 n (le_S (S d0) n H6)) c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0) a (S O) d0 H5 (eq_ind_r nat (plus (S O) d0) (\lambda (n0: nat).(le n0 n)) H6 (plus d0 (S O)) (plus_comm d0 (S O)))) t H1) n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H6)))) (plus (S O) (minus n (S O))) (plus_comm (S O) (minus n (S O)))) (S (plus O (minus n (S O)))) (refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n (le_lt_trans O d0 n (le_O_n d0) H6))))))))))))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: T).(\forall (d0: nat).((getl d0 d (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d0 u0 d a0) \to (\forall (a: C).((drop (S O) d0 a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 u (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 t (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H4: (csubst1 d0 u0 c0 a0)).(\lambda (a: C).(\lambda (H5: (drop (S O) d0 a0 a)).(lt_eq_gt_e n d0 (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (H6: (lt n d0)).(let H7 \def (eq_ind nat (minus d0 n) (\lambda (n: nat).(getl n (CHead d (Bind Abst) u) (CHead e (Bind Abbr) u0))) (getl_conf_le d0 (CHead e (Bind Abbr) u0) c0 H3 (CHead d (Bind Abst) u) n H0 (le_S_n n d0 (le_S (S n) d0 H6))) (S (minus d0 (S n))) (minus_x_Sy d0 n H6)) in (ex2_ind C (\lambda (e2: C).(csubst1 (minus d0 n) u0 (CHead d (Bind Abst) u) e2)) (\lambda (e2: C).(getl n a0 e2)) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x: C).(\lambda (H8: (csubst1 (minus d0 n) u0 (CHead d (Bind Abst) u) x)).(\lambda (H9: (getl n a0 x)).(let H10 \def (eq_ind nat (minus d0 n) (\lambda (n: nat).(csubst1 n u0 (CHead d (Bind Abst) u) x)) H8 (S (minus d0 (S n))) (minus_x_Sy d0 n H6)) in (let H11 \def (csubst1_gen_head (Bind Abst) d x u u0 (minus d0 (S n)) H10) in (ex3_2_ind T C (\lambda (u2: T).(\lambda (c2: C).(eq C x (CHead c2 (Bind Abst) u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 (minus d0 (S n)) u0 u u2))) (\lambda (_: T).(\lambda (c2: C).(csubst1 (minus d0 (S n)) u0 d c2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (H12: (eq C x (CHead x1 (Bind Abst) x0))).(\lambda (H13: (subst1 (minus d0 (S n)) u0 u x0)).(\lambda (H14: (csubst1 (minus d0 (S n)) u0 d x1)).(let H15 \def (eq_ind C x (\lambda (c: C).(getl n a0 c)) H9 (CHead x1 (Bind Abst) x0) H12) in (let H16 \def (eq_ind nat d0 (\lambda (n: nat).(drop (S O) n a0 a)) H5 (S (plus n (minus d0 (S n)))) (lt_plus_minus n d0 H6)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T x0 (lift (S O) (minus d0 (S n)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl n a (CHead e0 (Bind Abst) v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S n)) x1 e0))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H17: (eq T x0 (lift (S O) (minus d0 (S n)) x2))).(\lambda (H18: (getl n a (CHead x3 (Bind Abst) x2))).(\lambda (H19: (drop (S O) (minus d0 (S n)) x1 x3)).(let H20 \def (eq_ind T x0 (\lambda (t: T).(subst1 (minus d0 (S n)) u0 u t)) H13 (lift (S O) (minus d0 (S n)) x2) H17) in (let H21 \def (H2 e u0 (minus d0 (S n)) (getl_gen_S (Bind Abst) d (CHead e (Bind Abbr) u0) u (minus d0 (S n)) H7) x1 H14 x3 H19) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 (minus d0 (S n)) u0 u (lift (S O) (minus d0 (S n)) y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (minus d0 (S n)) u0 t (lift (S O) (minus d0 (S n)) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g x3 y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H22: (subst1 (minus d0 (S n)) u0 u (lift (S O) (minus d0 (S n)) x4))).(\lambda (_: (subst1 (minus d0 (S n)) u0 t (lift (S O) (minus d0 (S n)) x5))).(\lambda (H24: (ty3 g x3 x4 x5)).(let H25 \def (eq_ind T x4 (\lambda (t: T).(ty3 g x3 t x5)) H24 x2 (subst1_confluence_lift u x4 u0 (minus d0 (S n)) H22 x2 H20)) in (eq_ind_r nat (plus (minus d0 (S n)) (S n)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (S n) (minus d0 (S n))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O u) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O u) (lift (S O) (plus (S n) (minus d0 (S n))) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef n) (lift (S n) O x2) (eq_ind_r T (TLRef n) (\lambda (t0: T).(subst1 d0 u0 (TLRef n) t0)) (subst1_refl d0 u0 (TLRef n)) (lift (S O) d0 (TLRef n)) (lift_lref_lt n (S O) d0 H6)) (eq_ind_r T (lift (S n) O (lift (S O) (minus d0 (S n)) x2)) (\lambda (t0: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O u) t0)) (subst1_lift_ge u (lift (S O) (minus d0 (S n)) x2) u0 (minus d0 (S n)) (S n) H20 O (le_O_n (minus d0 (S n)))) (lift (S O) (plus (S n) (minus d0 (S n))) (lift (S n) O x2)) (lift_d x2 (S O) (S n) (minus d0 (S n)) O (le_O_n (minus d0 (S n))))) (ty3_abst g n a x3 x2 H18 x5 H25)) d0 (le_plus_minus (S n) d0 H6)) d0 (le_plus_minus_sym (S n) d0 H6)))))))) H21)))))))) (getl_drop_conf_lt Abst a0 x1 x0 n H15 a (S O) (minus d0 (S n)) H16))))))))) H11)))))) (csubst1_getl_lt d0 n H6 c0 a0 u0 H4 (CHead d (Bind Abst) u) H0)))) (\lambda (H6: (eq nat n d0)).(let H7 \def (eq_ind_r nat d0 (\lambda (n: nat).(drop (S O) n a0 a)) H5 n H6) in (let H8 \def (eq_ind_r nat d0 (\lambda (n: nat).(csubst1 n u0 c0 a0)) H4 n H6) in (let H9 \def (eq_ind_r nat d0 (\lambda (n: nat).(getl n c0 (CHead e (Bind Abbr) u0))) H3 n H6) in (eq_ind nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 n0 u0 (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n0 u0 (lift (S n) O u) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H10 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c: C).(getl n c0 c)) H0 (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (let H11 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (False_ind (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 n u0 (TLRef n) (lift (S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n u0 (lift (S n) O u) (lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) H11))) d0 H6))))) (\lambda (H6: (lt d0 n)).(eq_ind_r nat (S (plus O (minus n (S O)))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind nat (plus (S O) (minus n (S O))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (minus n (S O)) (S O)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef (plus (minus n (S O)) (S O))) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef (minus n (S O))) (lift n O u) (eq_ind_r T (TLRef (plus (minus n (S O)) (S O))) (\lambda (t0: T).(subst1 d0 u0 (TLRef (plus (minus n (S O)) (S O))) t0)) (subst1_refl d0 u0 (TLRef (plus (minus n (S O)) (S O)))) (lift (S O) d0 (TLRef (minus n (S O)))) (lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus d0 n H6))) (eq_ind_r T (lift (plus (S O) n) O u) (\lambda (t0: T).(subst1 d0 u0 (lift (S n) O u) t0)) (subst1_refl d0 u0 (lift (S n) O u)) (lift (S O) d0 (lift n O u)) (lift_free u n (S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) (plus O n) H6)) (le_O_n d0))) (eq_ind_r nat (S (minus n (S O))) (\lambda (n0: nat).(ty3 g a (TLRef (minus n (S O))) (lift n0 O u))) (ty3_abst g (minus n (S O)) a d u (getl_drop_conf_ge n (CHead d (Bind Abst) u) a0 (csubst1_getl_ge d0 n (le_S_n d0 n (le_S (S d0) n H6)) c0 a0 u0 H4 (CHead d (Bind Abst) u) H0) a (S O) d0 H5 (eq_ind_r nat (plus (S O) d0) (\lambda (n0: nat).(le n0 n)) H6 (plus d0 (S O)) (plus_comm d0 (S O)))) t H1) n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H6)))) (plus (S O) (minus n (S O))) (plus_comm (S O) (minus n (S O)))) (S (plus O (minus n (S O)))) (refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n (le_lt_trans O d0 n (le_O_n d0) H6))))))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (H1: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (b: B).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t3 t4)).(\lambda (H3: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d (CHead c0 (Bind b) u) (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 (CHead c0 (Bind b) u) a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t4 t0)).(\lambda (H5: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d (CHead c0 (Bind b) u) (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 (CHead c0 (Bind b) u) a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H6: (getl d c0 (CHead e (Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H7: (csubst1 d u0 c0 a0)).(\lambda (a: C).(\lambda (H8: (drop (S O) d a0 a)).(let H9 \def (H1 e u0 d H6 a0 H7 a H8) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Bind b) u t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind b) u t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H10: (subst1 d u0 u (lift (S O) d x0))).(\lambda (_: (subst1 d u0 t (lift (S O) d x1))).(\lambda (H12: (ty3 g a x0 x1)).(let H13 \def (H5 e u0 (S d) (getl_head (Bind b) d c0 (CHead e (Bind Abbr) u0) H6 u) (CHead a0 (Bind b) (lift (S O) d x0)) (csubst1_bind b d u0 u (lift (S O) d x0) H10 c0 a0 H7) (CHead a (Bind b) x0) (drop_skip_bind (S O) d a0 a H8 b x0)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 (S d) u0 t4 (lift (S O) (S d) y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (S d) u0 t0 (lift (S O) (S d) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g (CHead a (Bind b) x0) y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Bind b) u t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind b) u t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H14: (subst1 (S d) u0 t4 (lift (S O) (S d) x2))).(\lambda (_: (subst1 (S d) u0 t0 (lift (S O) (S d) x3))).(\lambda (H16: (ty3 g (CHead a (Bind b) x0) x2 x3)).(let H17 \def (H3 e u0 (S d) (getl_head (Bind b) d c0 (CHead e (Bind Abbr) u0) H6 u) (CHead a0 (Bind b) (lift (S O) d x0)) (csubst1_bind b d u0 u (lift (S O) d x0) H10 c0 a0 H7) (CHead a (Bind b) x0) (drop_skip_bind (S O) d a0 a H8 b x0)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 (S d) u0 t3 (lift (S O) (S d) y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (S d) u0 t4 (lift (S O) (S d) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g (CHead a (Bind b) x0) y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Bind b) u t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind b) u t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H18: (subst1 (S d) u0 t3 (lift (S O) (S d) x4))).(\lambda (H19: (subst1 (S d) u0 t4 (lift (S O) (S d) x5))).(\lambda (H20: (ty3 g (CHead a (Bind b) x0) x4 x5)).(let H21 \def (eq_ind T x5 (\lambda (t: T).(ty3 g (CHead a (Bind b) x0) x4 t)) H20 x2 (subst1_confluence_lift t4 x5 u0 (S d) H19 x2 H14)) in (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Bind b) u t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind b) u t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Bind b) x0 x4) (THead (Bind b) x0 x2) (eq_ind_r T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x4)) (\lambda (t5: T).(subst1 d u0 (THead (Bind b) u t3) t5)) (subst1_head u0 u (lift (S O) d x0) d H10 (Bind b) t3 (lift (S O) (S d) x4) H18) (lift (S O) d (THead (Bind b) x0 x4)) (lift_bind b x0 x4 (S O) d)) (eq_ind_r T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x2)) (\lambda (t5: T).(subst1 d u0 (THead (Bind b) u t4) t5)) (subst1_head u0 u (lift (S O) d x0) d H10 (Bind b) t4 (lift (S O) (S d) x2) H14) (lift (S O) d (THead (Bind b) x0 x2)) (lift_bind b x0 x2 (S O) d)) (ty3_bind g a x0 x1 H12 b x4 x2 H21 x3 H16)))))))) H17))))))) H13))))))) H9))))))))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (H1: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 w (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 u (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (H3: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 v (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind Abst) u t) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H4: (getl d c0 (CHead e (Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H5: (csubst1 d u0 c0 a0)).(\lambda (a: C).(\lambda (H6: (drop (S O) d a0 a)).(let H7 \def (H3 e u0 d H4 a0 H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 v (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind Abst) u t) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (subst1 d u0 v (lift (S O) d x0))).(\lambda (H9: (subst1 d u0 (THead (Bind Abst) u t) (lift (S O) d x1))).(\lambda (H10: (ty3 g a x0 x1)).(let H11 \def (H1 e u0 d H4 a0 H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 w (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 u (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (subst1 d u0 w (lift (S O) d x2))).(\lambda (H13: (subst1 d u0 u (lift (S O) d x3))).(\lambda (H14: (ty3 g a x2 x3)).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T (lift (S O) d x1) (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 d u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst1 (s (Bind Abst) d) u0 t t3))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H15: (eq T (lift (S O) d x1) (THead (Bind Abst) x4 x5))).(\lambda (H16: (subst1 d u0 u x4)).(\lambda (H17: (subst1 (s (Bind Abst) d) u0 t x5)).(let H18 \def (sym_equal T (lift (S O) d x1) (THead (Bind Abst) x4 x5) H15) in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x1 (THead (Bind Abst) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T x4 (lift (S O) d y)))) (\lambda (_: T).(\lambda (z: T).(eq T x5 (lift (S O) (S d) z)))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x6: T).(\lambda (x7: T).(\lambda (H19: (eq T x1 (THead (Bind Abst) x6 x7))).(\lambda (H20: (eq T x4 (lift (S O) d x6))).(\lambda (H21: (eq T x5 (lift (S O) (S d) x7))).(let H22 \def (eq_ind T x5 (\lambda (t0: T).(subst1 (s (Bind Abst) d) u0 t t0)) H17 (lift (S O) (S d) x7) H21) in (let H23 \def (eq_ind T x4 (\lambda (t: T).(subst1 d u0 u t)) H16 (lift (S O) d x6) H20) in (let H24 \def (eq_ind T x1 (\lambda (t: T).(ty3 g a x0 t)) H10 (THead (Bind Abst) x6 x7) H19) in (let H25 \def (eq_ind T x6 (\lambda (t: T).(ty3 g a x0 (THead (Bind Abst) t x7))) H24 x3 (subst1_confluence_lift u x6 u0 d H23 x3 H13)) in (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Flat Appl) x2 x0) (THead (Flat Appl) x2 (THead (Bind Abst) x3 x7)) (eq_ind_r T (THead (Flat Appl) (lift (S O) d x2) (lift (S O) d x0)) (\lambda (t0: T).(subst1 d u0 (THead (Flat Appl) w v) t0)) (subst1_head u0 w (lift (S O) d x2) d H12 (Flat Appl) v (lift (S O) d x0) H8) (lift (S O) d (THead (Flat Appl) x2 x0)) (lift_flat Appl x2 x0 (S O) d)) (eq_ind_r T (THead (Flat Appl) (lift (S O) d x2) (lift (S O) d (THead (Bind Abst) x3 x7))) (\lambda (t0: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u t)) t0)) (subst1_head u0 w (lift (S O) d x2) d H12 (Flat Appl) (THead (Bind Abst) u t) (lift (S O) d (THead (Bind Abst) x3 x7)) (eq_ind_r T (THead (Bind Abst) (lift (S O) d x3) (lift (S O) (S d) x7)) (\lambda (t0: T).(subst1 (s (Flat Appl) d) u0 (THead (Bind Abst) u t) t0)) (subst1_head u0 u (lift (S O) d x3) (s (Flat Appl) d) H13 (Bind Abst) t (lift (S O) (S d) x7) H22) (lift (S O) d (THead (Bind Abst) x3 x7)) (lift_bind Abst x3 x7 (S O) d))) (lift (S O) d (THead (Flat Appl) x2 (THead (Bind Abst) x3 x7))) (lift_flat Appl x2 (THead (Bind Abst) x3 x7) (S O) d)) (ty3_appl g a x2 x3 H14 x0 x7 H25))))))))))) (lift_gen_bind Abst x4 x5 x1 (S O) d H18)))))))) (subst1_gen_head (Bind Abst) u0 u t (lift (S O) d x1) d H9))))))) H11))))))) H7))))))))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 t3 t4)).(\lambda (H1: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t4 t0)).(\lambda (H3: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda (H4: (getl d c0 (CHead e (Bind Abbr) u))).(\lambda (a0: C).(\lambda (H5: (csubst1 d u c0 a0)).(\lambda (a: C).(\lambda (H6: (drop (S O) d a0 a)).(let H7 \def (H3 e u d H4 a0 H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (subst1 d u t4 (lift (S O) d x0))).(\lambda (_: (subst1 d u t0 (lift (S O) d x1))).(\lambda (H10: (ty3 g a x0 x1)).(let H11 \def (H1 e u d H4 a0 H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (subst1 d u t3 (lift (S O) d x2))).(\lambda (H13: (subst1 d u t4 (lift (S O) d x3))).(\lambda (H14: (ty3 g a x2 x3)).(let H15 \def (eq_ind T x3 (\lambda (t: T).(ty3 g a x2 t)) H14 x0 (subst1_confluence_lift t4 x3 u d H13 x0 H8)) in (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Flat Cast) x0 x2) x0 (eq_ind_r T (THead (Flat Cast) (lift (S O) d x0) (lift (S O) d x2)) (\lambda (t: T).(subst1 d u (THead (Flat Cast) t4 t3) t)) (subst1_head u t4 (lift (S O) d x0) d H8 (Flat Cast) t3 (lift (S O) d x2) H12) (lift (S O) d (THead (Flat Cast) x0 x2)) (lift_flat Cast x0 x2 (S O) d)) H8 (ty3_cast g a x2 x0 H15 x1 H10)))))))) H11))))))) H7)))))))))))))))))) c t1 t2 H))))). + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (ty3 g c t1 t2)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t3 t)).(\lambda (H1: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (u: T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 u t4)).(\lambda (H3: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (H4: (pc3 c0 t4 t3)).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H5: (getl d c0 (CHead e (Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H6: (csubst1 d u0 c0 a0)).(\lambda (a: C).(\lambda (H7: (drop (S O) d a0 a)).(let H8 \def (H3 e u0 d H5 a0 H6 a H7) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t3 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H9: (subst1 d u0 u (lift (S O) d x0))).(\lambda (H10: (subst1 d u0 t4 (lift (S O) d x1))).(\lambda (H11: (ty3 g a x0 x1)).(let H12 \def (H1 e u0 d H5 a0 H6 a H7) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t3 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H13: (subst1 d u0 t3 (lift (S O) d x2))).(\lambda (_: (subst1 d u0 t (lift (S O) d x3))).(\lambda (H15: (ty3 g a x2 x3)).(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t3 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) x0 x2 H9 H13 (ty3_conv g a x2 x3 H15 x0 x1 H11 (pc3_gen_cabbr c0 t4 t3 H4 e u0 d H5 a0 H6 a H7 x1 H10 x2 H13)))))))) H12))))))) H8)))))))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda (_: (getl d c0 (CHead e (Bind Abbr) u))).(\lambda (a0: C).(\lambda (_: (csubst1 d u c0 a0)).(\lambda (a: C).(\lambda (_: (drop (S O) d a0 a)).(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u (TSort m) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u (TSort (next g m)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TSort m) (TSort (next g m)) (eq_ind_r T (TSort m) (\lambda (t: T).(subst1 d u (TSort m) t)) (subst1_refl d u (TSort m)) (lift (S O) d (TSort m)) (lift_sort m (S O) d)) (eq_ind_r T (TSort (next g m)) (\lambda (t: T).(subst1 d u (TSort (next g m)) t)) (subst1_refl d u (TSort (next g m))) (lift (S O) d (TSort (next g m))) (lift_sort (next g m) (S O) d)) (ty3_sort g a m)))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: T).(\forall (d0: nat).((getl d0 d (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d0 u0 d a0) \to (\forall (a: C).((drop (S O) d0 a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 u (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 t (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H4: (csubst1 d0 u0 c0 a0)).(\lambda (a: C).(\lambda (H5: (drop (S O) d0 a0 a)).(lt_eq_gt_e n d0 (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (H6: (lt n d0)).(let H7 \def (eq_ind nat (minus d0 n) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0))) (getl_conf_le d0 (CHead e (Bind Abbr) u0) c0 H3 (CHead d (Bind Abbr) u) n H0 (le_S_n n d0 (le_S (S n) d0 H6))) (S (minus d0 (S n))) (minus_x_Sy d0 n H6)) in (ex2_ind C (\lambda (e2: C).(csubst1 (minus d0 n) u0 (CHead d (Bind Abbr) u) e2)) (\lambda (e2: C).(getl n a0 e2)) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x: C).(\lambda (H8: (csubst1 (minus d0 n) u0 (CHead d (Bind Abbr) u) x)).(\lambda (H9: (getl n a0 x)).(let H10 \def (eq_ind nat (minus d0 n) (\lambda (n: nat).(csubst1 n u0 (CHead d (Bind Abbr) u) x)) H8 (S (minus d0 (S n))) (minus_x_Sy d0 n H6)) in (let H11 \def (csubst1_gen_head (Bind Abbr) d x u u0 (minus d0 (S n)) H10) in (ex3_2_ind T C (\lambda (u2: T).(\lambda (c2: C).(eq C x (CHead c2 (Bind Abbr) u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 (minus d0 (S n)) u0 u u2))) (\lambda (_: T).(\lambda (c2: C).(csubst1 (minus d0 (S n)) u0 d c2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (H12: (eq C x (CHead x1 (Bind Abbr) x0))).(\lambda (H13: (subst1 (minus d0 (S n)) u0 u x0)).(\lambda (H14: (csubst1 (minus d0 (S n)) u0 d x1)).(let H15 \def (eq_ind C x (\lambda (c: C).(getl n a0 c)) H9 (CHead x1 (Bind Abbr) x0) H12) in (let H16 \def (eq_ind nat d0 (\lambda (n: nat).(drop (S O) n a0 a)) H5 (S (plus n (minus d0 (S n)))) (lt_plus_minus n d0 H6)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T x0 (lift (S O) (minus d0 (S n)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl n a (CHead e0 (Bind Abbr) v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S n)) x1 e0))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H17: (eq T x0 (lift (S O) (minus d0 (S n)) x2))).(\lambda (H18: (getl n a (CHead x3 (Bind Abbr) x2))).(\lambda (H19: (drop (S O) (minus d0 (S n)) x1 x3)).(let H20 \def (eq_ind T x0 (\lambda (t: T).(subst1 (minus d0 (S n)) u0 u t)) H13 (lift (S O) (minus d0 (S n)) x2) H17) in (let H21 \def (H2 e u0 (minus d0 (S n)) (getl_gen_S (Bind Abbr) d (CHead e (Bind Abbr) u0) u (minus d0 (S n)) H7) x1 H14 x3 H19) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 (minus d0 (S n)) u0 u (lift (S O) (minus d0 (S n)) y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (minus d0 (S n)) u0 t (lift (S O) (minus d0 (S n)) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g x3 y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H22: (subst1 (minus d0 (S n)) u0 u (lift (S O) (minus d0 (S n)) x4))).(\lambda (H23: (subst1 (minus d0 (S n)) u0 t (lift (S O) (minus d0 (S n)) x5))).(\lambda (H24: (ty3 g x3 x4 x5)).(let H25 \def (eq_ind T x4 (\lambda (t: T).(ty3 g x3 t x5)) H24 x2 (subst1_confluence_lift u x4 u0 (minus d0 (S n)) H22 x2 H20)) in (eq_ind_r nat (plus (minus d0 (S n)) (S n)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (S n) (minus d0 (S n))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O t) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O t) (lift (S O) (plus (S n) (minus d0 (S n))) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef n) (lift (S n) O x5) (eq_ind_r T (TLRef n) (\lambda (t0: T).(subst1 d0 u0 (TLRef n) t0)) (subst1_refl d0 u0 (TLRef n)) (lift (S O) d0 (TLRef n)) (lift_lref_lt n (S O) d0 H6)) (eq_ind_r T (lift (S n) O (lift (S O) (minus d0 (S n)) x5)) (\lambda (t0: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O t) t0)) (subst1_lift_ge t (lift (S O) (minus d0 (S n)) x5) u0 (minus d0 (S n)) (S n) H23 O (le_O_n (minus d0 (S n)))) (lift (S O) (plus (S n) (minus d0 (S n))) (lift (S n) O x5)) (lift_d x5 (S O) (S n) (minus d0 (S n)) O (le_O_n (minus d0 (S n))))) (ty3_abbr g n a x3 x2 H18 x5 H25)) d0 (le_plus_minus (S n) d0 H6)) d0 (le_plus_minus_sym (S n) d0 H6)))))))) H21)))))))) (getl_drop_conf_lt Abbr a0 x1 x0 n H15 a (S O) (minus d0 (S n)) H16))))))))) H11)))))) (csubst1_getl_lt d0 n H6 c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0)))) (\lambda (H6: (eq nat n d0)).(let H7 \def (eq_ind_r nat d0 (\lambda (n: nat).(drop (S O) n a0 a)) H5 n H6) in (let H8 \def (eq_ind_r nat d0 (\lambda (n: nat).(csubst1 n u0 c0 a0)) H4 n H6) in (let H9 \def (eq_ind_r nat d0 (\lambda (n: nat).(getl n c0 (CHead e (Bind Abbr) u0))) H3 n H6) in (eq_ind nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 n0 u0 (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n0 u0 (lift (S n) O t) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H10 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c: C).(getl n c0 c)) H0 (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (let H11 \def (f_equal C C (\lambda (e0: C).(match e0 return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in ((let H12 \def (f_equal C T (\lambda (e0: C).(match e0 return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u) (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (\lambda (H13: (eq C d e)).(let H14 \def (eq_ind_r T u0 (\lambda (t: T).(getl n c0 (CHead e (Bind Abbr) t))) H10 u H12) in (let H15 \def (eq_ind_r T u0 (\lambda (t: T).(csubst1 n t c0 a0)) H8 u H12) in (eq_ind T u (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 n t0 (TLRef n) (lift (S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n t0 (lift (S n) O t) (lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H16 \def (eq_ind_r C e (\lambda (c: C).(getl n c0 (CHead c (Bind Abbr) u))) H14 d H13) in (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 n u (TLRef n) (lift (S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n u (lift (S n) O t) (lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (lift n O u) (lift n O t) (subst1_single n u (TLRef n) (lift (S O) n (lift n O u)) (eq_ind_r T (lift (plus (S O) n) O u) (\lambda (t0: T).(subst0 n u (TLRef n) t0)) (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)))) (eq_ind_r T (lift (plus (S O) n) O t) (\lambda (t0: T).(subst1 n u (lift (S n) O t) t0)) (subst1_refl n u (lift (S n) O t)) (lift (S O) n (lift n O t)) (lift_free t n (S O) O n (le_n (plus O n)) (le_O_n n))) (ty3_lift g d u t H1 a O n (getl_conf_ge_drop Abbr a0 d u n (csubst1_getl_ge n n (le_n n) c0 a0 u H15 (CHead d (Bind Abbr) u) H16) a H7)))) u0 H12))))) H11))) d0 H6))))) (\lambda (H6: (lt d0 n)).(eq_ind_r nat (S (plus O (minus n (S O)))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind nat (plus (S O) (minus n (S O))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (minus n (S O)) (S O)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef (plus (minus n (S O)) (S O))) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef (minus n (S O))) (lift n O t) (eq_ind_r T (TLRef (plus (minus n (S O)) (S O))) (\lambda (t0: T).(subst1 d0 u0 (TLRef (plus (minus n (S O)) (S O))) t0)) (subst1_refl d0 u0 (TLRef (plus (minus n (S O)) (S O)))) (lift (S O) d0 (TLRef (minus n (S O)))) (lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus d0 n H6))) (eq_ind_r T (lift (plus (S O) n) O t) (\lambda (t0: T).(subst1 d0 u0 (lift (S n) O t) t0)) (subst1_refl d0 u0 (lift (S n) O t)) (lift (S O) d0 (lift n O t)) (lift_free t n (S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) (plus O n) H6)) (le_O_n d0))) (eq_ind_r nat (S (minus n (S O))) (\lambda (n0: nat).(ty3 g a (TLRef (minus n (S O))) (lift n0 O t))) (ty3_abbr g (minus n (S O)) a d u (getl_drop_conf_ge n (CHead d (Bind Abbr) u) a0 (csubst1_getl_ge d0 n (le_S_n d0 n (le_S (S d0) n H6)) c0 a0 u0 H4 (CHead d (Bind Abbr) u) H0) a (S O) d0 H5 (eq_ind_r nat (plus (S O) d0) (\lambda (n0: nat).(le n0 n)) H6 (plus d0 (S O)) (plus_comm d0 (S O)))) t H1) n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H6)))) (plus (S O) (minus n (S O))) (plus_comm (S O) (minus n (S O)))) (S (plus O (minus n (S O)))) (refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n (le_lt_trans O d0 n (le_O_n d0) H6))))))))))))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: T).(\forall (d0: nat).((getl d0 d (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d0 u0 d a0) \to (\forall (a: C).((drop (S O) d0 a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 u (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 t (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H4: (csubst1 d0 u0 c0 a0)).(\lambda (a: C).(\lambda (H5: (drop (S O) d0 a0 a)).(lt_eq_gt_e n d0 (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (H6: (lt n d0)).(let H7 \def (eq_ind nat (minus d0 n) (\lambda (n: nat).(getl n (CHead d (Bind Abst) u) (CHead e (Bind Abbr) u0))) (getl_conf_le d0 (CHead e (Bind Abbr) u0) c0 H3 (CHead d (Bind Abst) u) n H0 (le_S_n n d0 (le_S (S n) d0 H6))) (S (minus d0 (S n))) (minus_x_Sy d0 n H6)) in (ex2_ind C (\lambda (e2: C).(csubst1 (minus d0 n) u0 (CHead d (Bind Abst) u) e2)) (\lambda (e2: C).(getl n a0 e2)) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x: C).(\lambda (H8: (csubst1 (minus d0 n) u0 (CHead d (Bind Abst) u) x)).(\lambda (H9: (getl n a0 x)).(let H10 \def (eq_ind nat (minus d0 n) (\lambda (n: nat).(csubst1 n u0 (CHead d (Bind Abst) u) x)) H8 (S (minus d0 (S n))) (minus_x_Sy d0 n H6)) in (let H11 \def (csubst1_gen_head (Bind Abst) d x u u0 (minus d0 (S n)) H10) in (ex3_2_ind T C (\lambda (u2: T).(\lambda (c2: C).(eq C x (CHead c2 (Bind Abst) u2)))) (\lambda (u2: T).(\lambda (_: C).(subst1 (minus d0 (S n)) u0 u u2))) (\lambda (_: T).(\lambda (c2: C).(csubst1 (minus d0 (S n)) u0 d c2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (H12: (eq C x (CHead x1 (Bind Abst) x0))).(\lambda (H13: (subst1 (minus d0 (S n)) u0 u x0)).(\lambda (H14: (csubst1 (minus d0 (S n)) u0 d x1)).(let H15 \def (eq_ind C x (\lambda (c: C).(getl n a0 c)) H9 (CHead x1 (Bind Abst) x0) H12) in (let H16 \def (eq_ind nat d0 (\lambda (n: nat).(drop (S O) n a0 a)) H5 (S (plus n (minus d0 (S n)))) (lt_plus_minus n d0 H6)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T x0 (lift (S O) (minus d0 (S n)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl n a (CHead e0 (Bind Abst) v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S n)) x1 e0))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H17: (eq T x0 (lift (S O) (minus d0 (S n)) x2))).(\lambda (H18: (getl n a (CHead x3 (Bind Abst) x2))).(\lambda (H19: (drop (S O) (minus d0 (S n)) x1 x3)).(let H20 \def (eq_ind T x0 (\lambda (t: T).(subst1 (minus d0 (S n)) u0 u t)) H13 (lift (S O) (minus d0 (S n)) x2) H17) in (let H21 \def (H2 e u0 (minus d0 (S n)) (getl_gen_S (Bind Abst) d (CHead e (Bind Abbr) u0) u (minus d0 (S n)) H7) x1 H14 x3 H19) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 (minus d0 (S n)) u0 u (lift (S O) (minus d0 (S n)) y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (minus d0 (S n)) u0 t (lift (S O) (minus d0 (S n)) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g x3 y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H22: (subst1 (minus d0 (S n)) u0 u (lift (S O) (minus d0 (S n)) x4))).(\lambda (_: (subst1 (minus d0 (S n)) u0 t (lift (S O) (minus d0 (S n)) x5))).(\lambda (H24: (ty3 g x3 x4 x5)).(let H25 \def (eq_ind T x4 (\lambda (t: T).(ty3 g x3 t x5)) H24 x2 (subst1_confluence_lift u x4 u0 (minus d0 (S n)) H22 x2 H20)) in (eq_ind_r nat (plus (minus d0 (S n)) (S n)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (S n) (minus d0 (S n))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O u) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O u) (lift (S O) (plus (S n) (minus d0 (S n))) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef n) (lift (S n) O x2) (eq_ind_r T (TLRef n) (\lambda (t0: T).(subst1 d0 u0 (TLRef n) t0)) (subst1_refl d0 u0 (TLRef n)) (lift (S O) d0 (TLRef n)) (lift_lref_lt n (S O) d0 H6)) (eq_ind_r T (lift (S n) O (lift (S O) (minus d0 (S n)) x2)) (\lambda (t0: T).(subst1 (plus (minus d0 (S n)) (S n)) u0 (lift (S n) O u) t0)) (subst1_lift_ge u (lift (S O) (minus d0 (S n)) x2) u0 (minus d0 (S n)) (S n) H20 O (le_O_n (minus d0 (S n)))) (lift (S O) (plus (S n) (minus d0 (S n))) (lift (S n) O x2)) (lift_d x2 (S O) (S n) (minus d0 (S n)) O (le_O_n (minus d0 (S n))))) (ty3_abst g n a x3 x2 H18 x5 H25)) d0 (le_plus_minus (S n) d0 H6)) d0 (le_plus_minus_sym (S n) d0 H6)))))))) H21)))))))) (getl_drop_conf_lt Abst a0 x1 x0 n H15 a (S O) (minus d0 (S n)) H16))))))))) H11)))))) (csubst1_getl_lt d0 n H6 c0 a0 u0 H4 (CHead d (Bind Abst) u) H0)))) (\lambda (H6: (eq nat n d0)).(let H7 \def (eq_ind_r nat d0 (\lambda (n: nat).(drop (S O) n a0 a)) H5 n H6) in (let H8 \def (eq_ind_r nat d0 (\lambda (n: nat).(csubst1 n u0 c0 a0)) H4 n H6) in (let H9 \def (eq_ind_r nat d0 (\lambda (n: nat).(getl n c0 (CHead e (Bind Abbr) u0))) H3 n H6) in (eq_ind nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 n0 u0 (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n0 u0 (lift (S n) O u) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H10 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c: C).(getl n c0 c)) H0 (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (let H11 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind Abbr) u0) (getl_mono c0 (CHead d (Bind Abst) u) n H0 (CHead e (Bind Abbr) u0) H9)) in (False_ind (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 n u0 (TLRef n) (lift (S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 n u0 (lift (S n) O u) (lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) H11))) d0 H6))))) (\lambda (H6: (lt d0 n)).(eq_ind_r nat (S (plus O (minus n (S O)))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind nat (plus (S O) (minus n (S O))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (minus n (S O)) (S O)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d0 u0 (TLRef (plus (minus n (S O)) (S O))) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d0 u0 (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef (minus n (S O))) (lift n O u) (eq_ind_r T (TLRef (plus (minus n (S O)) (S O))) (\lambda (t0: T).(subst1 d0 u0 (TLRef (plus (minus n (S O)) (S O))) t0)) (subst1_refl d0 u0 (TLRef (plus (minus n (S O)) (S O)))) (lift (S O) d0 (TLRef (minus n (S O)))) (lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus d0 n H6))) (eq_ind_r T (lift (plus (S O) n) O u) (\lambda (t0: T).(subst1 d0 u0 (lift (S n) O u) t0)) (subst1_refl d0 u0 (lift (S n) O u)) (lift (S O) d0 (lift n O u)) (lift_free u n (S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) (plus O n) H6)) (le_O_n d0))) (eq_ind_r nat (S (minus n (S O))) (\lambda (n0: nat).(ty3 g a (TLRef (minus n (S O))) (lift n0 O u))) (ty3_abst g (minus n (S O)) a d u (getl_drop_conf_ge n (CHead d (Bind Abst) u) a0 (csubst1_getl_ge d0 n (le_S_n d0 n (le_S (S d0) n H6)) c0 a0 u0 H4 (CHead d (Bind Abst) u) H0) a (S O) d0 H5 (eq_ind_r nat (plus (S O) d0) (\lambda (n0: nat).(le n0 n)) H6 (plus d0 (S O)) (plus_comm d0 (S O)))) t H1) n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H6)))) (plus (S O) (minus n (S O))) (plus_comm (S O) (minus n (S O)))) (S (plus O (minus n (S O)))) (refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n (le_lt_trans O d0 n (le_O_n d0) H6))))))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (H1: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (b: B).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t3 t4)).(\lambda (H3: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d (CHead c0 (Bind b) u) (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 (CHead c0 (Bind b) u) a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t4 t0)).(\lambda (H5: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d (CHead c0 (Bind b) u) (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 (CHead c0 (Bind b) u) a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H6: (getl d c0 (CHead e (Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H7: (csubst1 d u0 c0 a0)).(\lambda (a: C).(\lambda (H8: (drop (S O) d a0 a)).(let H9 \def (H1 e u0 d H6 a0 H7 a H8) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Bind b) u t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind b) u t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H10: (subst1 d u0 u (lift (S O) d x0))).(\lambda (_: (subst1 d u0 t (lift (S O) d x1))).(\lambda (H12: (ty3 g a x0 x1)).(let H13 \def (H5 e u0 (S d) (getl_head (Bind b) d c0 (CHead e (Bind Abbr) u0) H6 u) (CHead a0 (Bind b) (lift (S O) d x0)) (csubst1_bind b d u0 u (lift (S O) d x0) H10 c0 a0 H7) (CHead a (Bind b) x0) (drop_skip_bind (S O) d a0 a H8 b x0)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 (S d) u0 t4 (lift (S O) (S d) y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (S d) u0 t0 (lift (S O) (S d) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g (CHead a (Bind b) x0) y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Bind b) u t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind b) u t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H14: (subst1 (S d) u0 t4 (lift (S O) (S d) x2))).(\lambda (_: (subst1 (S d) u0 t0 (lift (S O) (S d) x3))).(\lambda (H16: (ty3 g (CHead a (Bind b) x0) x2 x3)).(let H17 \def (H3 e u0 (S d) (getl_head (Bind b) d c0 (CHead e (Bind Abbr) u0) H6 u) (CHead a0 (Bind b) (lift (S O) d x0)) (csubst1_bind b d u0 u (lift (S O) d x0) H10 c0 a0 H7) (CHead a (Bind b) x0) (drop_skip_bind (S O) d a0 a H8 b x0)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 (S d) u0 t3 (lift (S O) (S d) y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 (S d) u0 t4 (lift (S O) (S d) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g (CHead a (Bind b) x0) y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Bind b) u t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind b) u t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H18: (subst1 (S d) u0 t3 (lift (S O) (S d) x4))).(\lambda (H19: (subst1 (S d) u0 t4 (lift (S O) (S d) x5))).(\lambda (H20: (ty3 g (CHead a (Bind b) x0) x4 x5)).(let H21 \def (eq_ind T x5 (\lambda (t: T).(ty3 g (CHead a (Bind b) x0) x4 t)) H20 x2 (subst1_confluence_lift t4 x5 u0 (S d) H19 x2 H14)) in (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Bind b) u t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind b) u t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Bind b) x0 x4) (THead (Bind b) x0 x2) (eq_ind_r T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x4)) (\lambda (t5: T).(subst1 d u0 (THead (Bind b) u t3) t5)) (subst1_head u0 u (lift (S O) d x0) d H10 (Bind b) t3 (lift (S O) (S d) x4) H18) (lift (S O) d (THead (Bind b) x0 x4)) (lift_bind b x0 x4 (S O) d)) (eq_ind_r T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x2)) (\lambda (t5: T).(subst1 d u0 (THead (Bind b) u t4) t5)) (subst1_head u0 u (lift (S O) d x0) d H10 (Bind b) t4 (lift (S O) (S d) x2) H14) (lift (S O) d (THead (Bind b) x0 x2)) (lift_bind b x0 x2 (S O) d)) (ty3_bind g a x0 x1 H12 b x4 x2 H21 x3 H16)))))))) H17))))))) H13))))))) H9))))))))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (H1: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 w (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 u (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (H3: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u0)) \to (\forall (a0: C).((csubst1 d u0 c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 v (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind Abst) u t) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H4: (getl d c0 (CHead e (Bind Abbr) u0))).(\lambda (a0: C).(\lambda (H5: (csubst1 d u0 c0 a0)).(\lambda (a: C).(\lambda (H6: (drop (S O) d a0 a)).(let H7 \def (H3 e u0 d H4 a0 H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 v (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Bind Abst) u t) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (subst1 d u0 v (lift (S O) d x0))).(\lambda (H9: (subst1 d u0 (THead (Bind Abst) u t) (lift (S O) d x1))).(\lambda (H10: (ty3 g a x0 x1)).(let H11 \def (H1 e u0 d H4 a0 H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 w (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 u (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (subst1 d u0 w (lift (S O) d x2))).(\lambda (H13: (subst1 d u0 u (lift (S O) d x3))).(\lambda (H14: (ty3 g a x2 x3)).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t3: T).(eq T (lift (S O) d x1) (THead (Bind Abst) u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst1 d u0 u u2))) (\lambda (_: T).(\lambda (t3: T).(subst1 (s (Bind Abst) d) u0 t t3))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H15: (eq T (lift (S O) d x1) (THead (Bind Abst) x4 x5))).(\lambda (H16: (subst1 d u0 u x4)).(\lambda (H17: (subst1 (s (Bind Abst) d) u0 t x5)).(let H18 \def (sym_equal T (lift (S O) d x1) (THead (Bind Abst) x4 x5) H15) in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x1 (THead (Bind Abst) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T x4 (lift (S O) d y)))) (\lambda (_: T).(\lambda (z: T).(eq T x5 (lift (S O) (S d) z)))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x6: T).(\lambda (x7: T).(\lambda (H19: (eq T x1 (THead (Bind Abst) x6 x7))).(\lambda (H20: (eq T x4 (lift (S O) d x6))).(\lambda (H21: (eq T x5 (lift (S O) (S d) x7))).(let H22 \def (eq_ind T x5 (\lambda (t0: T).(subst1 (s (Bind Abst) d) u0 t t0)) H17 (lift (S O) (S d) x7) H21) in (let H23 \def (eq_ind T x4 (\lambda (t: T).(subst1 d u0 u t)) H16 (lift (S O) d x6) H20) in (let H24 \def (eq_ind T x1 (\lambda (t: T).(ty3 g a x0 t)) H10 (THead (Bind Abst) x6 x7) H19) in (let H25 \def (eq_ind T x6 (\lambda (t: T).(ty3 g a x0 (THead (Bind Abst) t x7))) H24 x3 (subst1_confluence_lift u x6 u0 d H23 x3 H13)) in (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u0 (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Flat Appl) x2 x0) (THead (Flat Appl) x2 (THead (Bind Abst) x3 x7)) (eq_ind_r T (THead (Flat Appl) (lift (S O) d x2) (lift (S O) d x0)) (\lambda (t0: T).(subst1 d u0 (THead (Flat Appl) w v) t0)) (subst1_head u0 w (lift (S O) d x2) d H12 (Flat Appl) v (lift (S O) d x0) H8) (lift (S O) d (THead (Flat Appl) x2 x0)) (lift_flat Appl x2 x0 (S O) d)) (eq_ind_r T (THead (Flat Appl) (lift (S O) d x2) (lift (S O) d (THead (Bind Abst) x3 x7))) (\lambda (t0: T).(subst1 d u0 (THead (Flat Appl) w (THead (Bind Abst) u t)) t0)) (subst1_head u0 w (lift (S O) d x2) d H12 (Flat Appl) (THead (Bind Abst) u t) (lift (S O) d (THead (Bind Abst) x3 x7)) (eq_ind_r T (THead (Bind Abst) (lift (S O) d x3) (lift (S O) (S d) x7)) (\lambda (t0: T).(subst1 (s (Flat Appl) d) u0 (THead (Bind Abst) u t) t0)) (subst1_head u0 u (lift (S O) d x3) (s (Flat Appl) d) H13 (Bind Abst) t (lift (S O) (S d) x7) H22) (lift (S O) d (THead (Bind Abst) x3 x7)) (lift_bind Abst x3 x7 (S O) d))) (lift (S O) d (THead (Flat Appl) x2 (THead (Bind Abst) x3 x7))) (lift_flat Appl x2 (THead (Bind Abst) x3 x7) (S O) d)) (ty3_appl g a x2 x3 H14 x0 x7 H25))))))))))) (lift_gen_bind Abst x4 x5 x1 (S O) d H18)))))))) (subst1_gen_head (Bind Abst) u0 u t (lift (S O) d x1) d H9))))))) H11))))))) H7))))))))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 t3 t4)).(\lambda (H1: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t4 t0)).(\lambda (H3: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Abbr) u)) \to (\forall (a0: C).((csubst1 d u c0 a0) \to (\forall (a: C).((drop (S O) d a0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda (H4: (getl d c0 (CHead e (Bind Abbr) u))).(\lambda (a0: C).(\lambda (H5: (csubst1 d u c0 a0)).(\lambda (a: C).(\lambda (H6: (drop (S O) d a0 a)).(let H7 \def (H3 e u d H4 a0 H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (subst1 d u t4 (lift (S O) d x0))).(\lambda (_: (subst1 d u t0 (lift (S O) d x1))).(\lambda (H10: (ty3 g a x0 x1)).(let H11 \def (H1 e u d H4 a0 H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H12: (subst1 d u t3 (lift (S O) d x2))).(\lambda (H13: (subst1 d u t4 (lift (S O) d x3))).(\lambda (H14: (ty3 g a x2 x3)).(let H15 \def (eq_ind T x3 (\lambda (t: T).(ty3 g a x2 t)) H14 x0 (subst1_confluence_lift t4 x3 u d H13 x0 H8)) in (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(subst1 d u (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 d u t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Flat Cast) x0 x2) x0 (eq_ind_r T (THead (Flat Cast) (lift (S O) d x0) (lift (S O) d x2)) (\lambda (t: T).(subst1 d u (THead (Flat Cast) t4 t3) t)) (subst1_head u t4 (lift (S O) d x0) d H8 (Flat Cast) t3 (lift (S O) d x2) H12) (lift (S O) d (THead (Flat Cast) x0 x2)) (lift_flat Cast x0 x2 (S O) d)) H8 (ty3_cast g a x2 x0 H15 x1 H10)))))))) H11))))))) H7)))))))))))))))))) c t1 t2 H))))). theorem ty3_gen_cvoid: \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c t1 t2) \to (\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t1 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t2 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (ty3 g c t1 t2)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 t3 t)).(\lambda (H1: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (u: T).(\lambda (t4: T).(\lambda (H2: (ty3 g c0 u t4)).(\lambda (H3: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (H4: (pc3 c0 t4 t3)).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H5: (getl d c0 (CHead e (Bind Void) u0))).(\lambda (a: C).(\lambda (H6: (drop (S O) d c0 a)).(let H7 \def (H3 e u0 d H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t3 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq T u (lift (S O) d x0))).(\lambda (H9: (eq T t4 (lift (S O) d x1))).(\lambda (H10: (ty3 g a x0 x1)).(let H11 \def (eq_ind T t4 (\lambda (t: T).(pc3 c0 t t3)) H4 (lift (S O) d x1) H9) in (let H12 \def (eq_ind T t4 (\lambda (t: T).(ty3 g c0 u t)) H2 (lift (S O) d x1) H9) in (let H13 \def (eq_ind T u (\lambda (t: T).(ty3 g c0 t (lift (S O) d x1))) H12 (lift (S O) d x0) H8) in (eq_ind_r T (lift (S O) d x0) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t0 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t3 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H14 \def (H1 e u0 d H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d x0) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t3 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H15: (eq T t3 (lift (S O) d x2))).(\lambda (H16: (eq T t (lift (S O) d x3))).(\lambda (H17: (ty3 g a x2 x3)).(let H18 \def (eq_ind T t (\lambda (t: T).(ty3 g c0 t3 t)) H0 (lift (S O) d x3) H16) in (let H19 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t (lift (S O) d x3))) H18 (lift (S O) d x2) H15) in (let H20 \def (eq_ind T t3 (\lambda (t: T).(pc3 c0 (lift (S O) d x1) t)) H11 (lift (S O) d x2) H15) in (eq_ind_r T (lift (S O) d x2) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d x0) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d x0) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x2) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) x0 x2 (refl_equal T (lift (S O) d x0)) (refl_equal T (lift (S O) d x2)) (ty3_conv g a x2 x3 H17 x0 x1 H10 (pc3_gen_lift c0 x1 x2 (S O) d H20 a H6))) t3 H15))))))))) H14)) u H8))))))))) H7)))))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda (_: (getl d c0 (CHead e (Bind Void) u))).(\lambda (a: C).(\lambda (_: (drop (S O) d c0 a)).(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (TSort m) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (TSort (next g m)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TSort m) (TSort (next g m)) (eq_ind_r T (TSort m) (\lambda (t: T).(eq T (TSort m) t)) (refl_equal T (TSort m)) (lift (S O) d (TSort m)) (lift_sort m (S O) d)) (eq_ind_r T (TSort (next g m)) (\lambda (t: T).(eq T (TSort (next g m)) t)) (refl_equal T (TSort (next g m))) (lift (S O) d (TSort (next g m))) (lift_sort (next g m) (S O) d)) (ty3_sort g a m)))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: T).(\forall (d0: nat).((getl d0 d (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d0 d a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Void) u0))).(\lambda (a: C).(\lambda (H4: (drop (S O) d0 c0 a)).(lt_eq_gt_e n d0 (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (H5: (lt n d0)).(let H6 \def (eq_ind nat (minus d0 n) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead e (Bind Void) u0))) (getl_conf_le d0 (CHead e (Bind Void) u0) c0 H3 (CHead d (Bind Abbr) u) n H0 (le_S_n n d0 (le_S (S n) d0 H5))) (S (minus d0 (S n))) (minus_x_Sy d0 n H5)) in (let H7 \def (eq_ind nat d0 (\lambda (n: nat).(drop (S O) n c0 a)) H4 (S (plus n (minus d0 (S n)))) (lt_plus_minus n d0 H5)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift (S O) (minus d0 (S n)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl n a (CHead e0 (Bind Abbr) v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S n)) d e0))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (H8: (eq T u (lift (S O) (minus d0 (S n)) x0))).(\lambda (H9: (getl n a (CHead x1 (Bind Abbr) x0))).(\lambda (H10: (drop (S O) (minus d0 (S n)) d x1)).(let H11 \def (eq_ind T u (\lambda (t0: T).(\forall (e: C).(\forall (u: T).(\forall (d0: nat).((getl d0 d (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d0 d a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t0 (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))) H2 (lift (S O) (minus d0 (S n)) x0) H8) in (let H12 \def (eq_ind T u (\lambda (t0: T).(ty3 g d t0 t)) H1 (lift (S O) (minus d0 (S n)) x0) H8) in (let H13 \def (H11 e u0 (minus d0 (S n)) (getl_gen_S (Bind Abbr) d (CHead e (Bind Void) u0) u (minus d0 (S n)) H6) x1 H10) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) (minus d0 (S n)) x0) (lift (S O) (minus d0 (S n)) y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) (minus d0 (S n)) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g x1 y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H14: (eq T (lift (S O) (minus d0 (S n)) x0) (lift (S O) (minus d0 (S n)) x2))).(\lambda (H15: (eq T t (lift (S O) (minus d0 (S n)) x3))).(\lambda (H16: (ty3 g x1 x2 x3)).(let H17 \def (eq_ind T t (\lambda (t: T).(ty3 g d (lift (S O) (minus d0 (S n)) x0) t)) H12 (lift (S O) (minus d0 (S n)) x3) H15) in (eq_ind_r T (lift (S O) (minus d0 (S n)) x3) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t0) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H18 \def (eq_ind_r T x2 (\lambda (t: T).(ty3 g x1 t x3)) H16 x0 (lift_inj x0 x2 (S O) (minus d0 (S n)) H14)) in (eq_ind T (lift (S O) (plus (S n) (minus d0 (S n))) (lift (S n) O x3)) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind nat d0 (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) n0 (lift (S n) O x3)) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d0 (lift (S n) O x3)) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef n) (lift (S n) O x3) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d0 (TLRef n)) (lift_lref_lt n (S O) d0 H5)) (refl_equal T (lift (S O) d0 (lift (S n) O x3))) (ty3_abbr g n a x1 x0 H9 x3 H18)) (plus (S n) (minus d0 (S n))) (le_plus_minus (S n) d0 H5)) (lift (S n) O (lift (S O) (minus d0 (S n)) x3)) (lift_d x3 (S O) (S n) (minus d0 (S n)) O (le_O_n (minus d0 (S n)))))) t H15))))))) H13))))))))) (getl_drop_conf_lt Abbr c0 d u n H0 a (S O) (minus d0 (S n)) H7))))) (\lambda (H5: (eq nat n d0)).(let H6 \def (eq_ind_r nat d0 (\lambda (n: nat).(drop (S O) n c0 a)) H4 n H5) in (let H7 \def (eq_ind_r nat d0 (\lambda (n: nat).(getl n c0 (CHead e (Bind Void) u0))) H3 n H5) in (eq_ind nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H8 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c: C).(getl n c0 c)) H0 (CHead e (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Void) u0) H7)) in (let H9 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Void) u0) H7)) in (False_ind (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) H9))) d0 H5)))) (\lambda (H5: (lt d0 n)).(eq_ind_r nat (S (plus O (minus n (S O)))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind nat (plus (S O) (minus n (S O))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (minus n (S O)) (S O)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef (plus (minus n (S O)) (S O))) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef (minus n (S O))) (lift n O t) (eq_ind_r T (TLRef (plus (minus n (S O)) (S O))) (\lambda (t0: T).(eq T (TLRef (plus (minus n (S O)) (S O))) t0)) (refl_equal T (TLRef (plus (minus n (S O)) (S O)))) (lift (S O) d0 (TLRef (minus n (S O)))) (lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus d0 n H5))) (eq_ind_r T (lift (plus (S O) n) O t) (\lambda (t0: T).(eq T (lift (S n) O t) t0)) (refl_equal T (lift (S n) O t)) (lift (S O) d0 (lift n O t)) (lift_free t n (S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) (plus O n) H5)) (le_O_n d0))) (eq_ind_r nat (S (minus n (S O))) (\lambda (n0: nat).(ty3 g a (TLRef (minus n (S O))) (lift n0 O t))) (ty3_abbr g (minus n (S O)) a d u (getl_drop_conf_ge n (CHead d (Bind Abbr) u) c0 H0 a (S O) d0 H4 (eq_ind_r nat (plus (S O) d0) (\lambda (n0: nat).(le n0 n)) H5 (plus d0 (S O)) (plus_comm d0 (S O)))) t H1) n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H5)))) (plus (S O) (minus n (S O))) (plus_comm (S O) (minus n (S O)))) (S (plus O (minus n (S O)))) (refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n (le_lt_trans O d0 n (le_O_n d0) H5))))))))))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: T).(\forall (d0: nat).((getl d0 d (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d0 d a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Void) u0))).(\lambda (a: C).(\lambda (H4: (drop (S O) d0 c0 a)).(lt_eq_gt_e n d0 (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (H5: (lt n d0)).(let H6 \def (eq_ind nat (minus d0 n) (\lambda (n: nat).(getl n (CHead d (Bind Abst) u) (CHead e (Bind Void) u0))) (getl_conf_le d0 (CHead e (Bind Void) u0) c0 H3 (CHead d (Bind Abst) u) n H0 (le_S_n n d0 (le_S (S n) d0 H5))) (S (minus d0 (S n))) (minus_x_Sy d0 n H5)) in (let H7 \def (eq_ind nat d0 (\lambda (n: nat).(drop (S O) n c0 a)) H4 (S (plus n (minus d0 (S n)))) (lt_plus_minus n d0 H5)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift (S O) (minus d0 (S n)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl n a (CHead e0 (Bind Abst) v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S n)) d e0))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (H8: (eq T u (lift (S O) (minus d0 (S n)) x0))).(\lambda (H9: (getl n a (CHead x1 (Bind Abst) x0))).(\lambda (H10: (drop (S O) (minus d0 (S n)) d x1)).(let H11 \def (eq_ind T u (\lambda (t0: T).(\forall (e: C).(\forall (u: T).(\forall (d0: nat).((getl d0 d (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d0 d a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t0 (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))) H2 (lift (S O) (minus d0 (S n)) x0) H8) in (let H12 \def (eq_ind T u (\lambda (t0: T).(ty3 g d t0 t)) H1 (lift (S O) (minus d0 (S n)) x0) H8) in (eq_ind_r T (lift (S O) (minus d0 (S n)) x0) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t0) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H13 \def (H11 e u0 (minus d0 (S n)) (getl_gen_S (Bind Abst) d (CHead e (Bind Void) u0) u (minus d0 (S n)) H6) x1 H10) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) (minus d0 (S n)) x0) (lift (S O) (minus d0 (S n)) y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) (minus d0 (S n)) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g x1 y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O (lift (S O) (minus d0 (S n)) x0)) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H14: (eq T (lift (S O) (minus d0 (S n)) x0) (lift (S O) (minus d0 (S n)) x2))).(\lambda (H15: (eq T t (lift (S O) (minus d0 (S n)) x3))).(\lambda (H16: (ty3 g x1 x2 x3)).(let H17 \def (eq_ind T t (\lambda (t: T).(ty3 g d (lift (S O) (minus d0 (S n)) x0) t)) H12 (lift (S O) (minus d0 (S n)) x3) H15) in (let H18 \def (eq_ind_r T x2 (\lambda (t: T).(ty3 g x1 t x3)) H16 x0 (lift_inj x0 x2 (S O) (minus d0 (S n)) H14)) in (eq_ind T (lift (S O) (plus (S n) (minus d0 (S n))) (lift (S n) O x0)) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind nat d0 (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) n0 (lift (S n) O x0)) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d0 (lift (S n) O x0)) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef n) (lift (S n) O x0) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d0 (TLRef n)) (lift_lref_lt n (S O) d0 H5)) (refl_equal T (lift (S O) d0 (lift (S n) O x0))) (ty3_abst g n a x1 x0 H9 x3 H18)) (plus (S n) (minus d0 (S n))) (le_plus_minus (S n) d0 H5)) (lift (S n) O (lift (S O) (minus d0 (S n)) x0)) (lift_d x0 (S O) (S n) (minus d0 (S n)) O (le_O_n (minus d0 (S n)))))))))))) H13)) u H8)))))))) (getl_drop_conf_lt Abst c0 d u n H0 a (S O) (minus d0 (S n)) H7))))) (\lambda (H5: (eq nat n d0)).(let H6 \def (eq_ind_r nat d0 (\lambda (n: nat).(drop (S O) n c0 a)) H4 n H5) in (let H7 \def (eq_ind_r nat d0 (\lambda (n: nat).(getl n c0 (CHead e (Bind Void) u0))) H3 n H5) in (eq_ind nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H8 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c: C).(getl n c0 c)) H0 (CHead e (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abst) u) n H0 (CHead e (Bind Void) u0) H7)) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abst) u) n H0 (CHead e (Bind Void) u0) H7)) in (False_ind (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) H9))) d0 H5)))) (\lambda (H5: (lt d0 n)).(eq_ind_r nat (S (plus O (minus n (S O)))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind nat (plus (S O) (minus n (S O))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (minus n (S O)) (S O)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef (plus (minus n (S O)) (S O))) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef (minus n (S O))) (lift n O u) (eq_ind_r T (TLRef (plus (minus n (S O)) (S O))) (\lambda (t0: T).(eq T (TLRef (plus (minus n (S O)) (S O))) t0)) (refl_equal T (TLRef (plus (minus n (S O)) (S O)))) (lift (S O) d0 (TLRef (minus n (S O)))) (lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus d0 n H5))) (eq_ind_r T (lift (plus (S O) n) O u) (\lambda (t0: T).(eq T (lift (S n) O u) t0)) (refl_equal T (lift (S n) O u)) (lift (S O) d0 (lift n O u)) (lift_free u n (S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) (plus O n) H5)) (le_O_n d0))) (eq_ind_r nat (S (minus n (S O))) (\lambda (n0: nat).(ty3 g a (TLRef (minus n (S O))) (lift n0 O u))) (ty3_abst g (minus n (S O)) a d u (getl_drop_conf_ge n (CHead d (Bind Abst) u) c0 H0 a (S O) d0 H4 (eq_ind_r nat (plus (S O) d0) (\lambda (n0: nat).(le n0 n)) H5 (plus d0 (S O)) (plus_comm d0 (S O)))) t H1) n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H5)))) (plus (S O) (minus n (S O))) (plus_comm (S O) (minus n (S O)))) (S (plus O (minus n (S O)))) (refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n (le_lt_trans O d0 n (le_O_n d0) H5))))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 u t)).(\lambda (H1: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (b: B).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H2: (ty3 g (CHead c0 (Bind b) u) t3 t4)).(\lambda (H3: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d (CHead c0 (Bind b) u) (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d (CHead c0 (Bind b) u) a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (t0: T).(\lambda (H4: (ty3 g (CHead c0 (Bind b) u) t4 t0)).(\lambda (H5: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d (CHead c0 (Bind b) u) (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d (CHead c0 (Bind b) u) a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H6: (getl d c0 (CHead e (Bind Void) u0))).(\lambda (a: C).(\lambda (H7: (drop (S O) d c0 a)).(let H8 \def (H1 e u0 d H6 a H7) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind b) u t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) u t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H9: (eq T u (lift (S O) d x0))).(\lambda (H10: (eq T t (lift (S O) d x1))).(\lambda (H11: (ty3 g a x0 x1)).(let H12 \def (eq_ind T t (\lambda (t: T).(ty3 g c0 u t)) H0 (lift (S O) d x1) H10) in (let H13 \def (eq_ind T u (\lambda (t: T).(ty3 g c0 t (lift (S O) d x1))) H12 (lift (S O) d x0) H9) in (let H14 \def (eq_ind T u (\lambda (t: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d (CHead c0 (Bind b) t) (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d (CHead c0 (Bind b) t) a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))) H5 (lift (S O) d x0) H9) in (let H15 \def (eq_ind T u (\lambda (t: T).(ty3 g (CHead c0 (Bind b) t) t4 t0)) H4 (lift (S O) d x0) H9) in (let H16 \def (eq_ind T u (\lambda (t: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d (CHead c0 (Bind b) t) (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d (CHead c0 (Bind b) t) a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))) H3 (lift (S O) d x0) H9) in (let H17 \def (eq_ind T u (\lambda (t: T).(ty3 g (CHead c0 (Bind b) t) t3 t4)) H2 (lift (S O) d x0) H9) in (eq_ind_r T (lift (S O) d x0) (\lambda (t5: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind b) t5 t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) t5 t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H18 \def (H16 e u0 (S d) (getl_head (Bind b) d c0 (CHead e (Bind Void) u0) H6 (lift (S O) d x0)) (CHead a (Bind b) x0) (drop_skip_bind (S O) d c0 a H7 b x0)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) (S d) y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) (S d) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g (CHead a (Bind b) x0) y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind b) (lift (S O) d x0) t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S O) d x0) t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H19: (eq T t3 (lift (S O) (S d) x2))).(\lambda (H20: (eq T t4 (lift (S O) (S d) x3))).(\lambda (H21: (ty3 g (CHead a (Bind b) x0) x2 x3)).(let H22 \def (eq_ind T t4 (\lambda (t: T).(\forall (e: C).(\forall (u: T).(\forall (d0: nat).((getl d0 (CHead c0 (Bind b) (lift (S O) d x0)) (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d0 (CHead c0 (Bind b) (lift (S O) d x0)) a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))) H14 (lift (S O) (S d) x3) H20) in (eq_ind_r T (lift (S O) (S d) x3) (\lambda (t5: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind b) (lift (S O) d x0) t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S O) d x0) t5) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r T (lift (S O) (S d) x2) (\lambda (t5: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind b) (lift (S O) d x0) t5) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x3)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H23 \def (H22 e u0 (S d) (getl_head (Bind b) d c0 (CHead e (Bind Void) u0) H6 (lift (S O) d x0)) (CHead a (Bind b) x0) (drop_skip_bind (S O) d c0 a H7 b x0)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) (S d) x3) (lift (S O) (S d) y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) (S d) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g (CHead a (Bind b) x0) y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x2)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x3)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H24: (eq T (lift (S O) (S d) x3) (lift (S O) (S d) x4))).(\lambda (_: (eq T t0 (lift (S O) (S d) x5))).(\lambda (H26: (ty3 g (CHead a (Bind b) x0) x4 x5)).(let H27 \def (eq_ind_r T x4 (\lambda (t: T).(ty3 g (CHead a (Bind b) x0) t x5)) H26 x3 (lift_inj x3 x4 (S O) (S d) H24)) in (eq_ind T (lift (S O) d (THead (Bind b) x0 x2)) (\lambda (t5: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t5 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x3)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind T (lift (S O) d (THead (Bind b) x0 x3)) (\lambda (t5: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d (THead (Bind b) x0 x2)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t5 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d (THead (Bind b) x0 x2)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d (THead (Bind b) x0 x3)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Bind b) x0 x2) (THead (Bind b) x0 x3) (refl_equal T (lift (S O) d (THead (Bind b) x0 x2))) (refl_equal T (lift (S O) d (THead (Bind b) x0 x3))) (ty3_bind g a x0 x1 H11 b x2 x3 H21 x5 H27)) (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x3)) (lift_bind b x0 x3 (S O) d)) (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x2)) (lift_bind b x0 x2 (S O) d)))))))) H23)) t3 H19) t4 H20))))))) H18)) u H9)))))))))))) H8))))))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (H1: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T w (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T u (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (v: T).(\lambda (t: T).(\lambda (H2: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (H3: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T v (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind Abst) u t) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H4: (getl d c0 (CHead e (Bind Void) u0))).(\lambda (a: C).(\lambda (H5: (drop (S O) d c0 a)).(let H6 \def (H3 e u0 d H4 a H5) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T v (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind Abst) u t) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T v (lift (S O) d x0))).(\lambda (H8: (eq T (THead (Bind Abst) u t) (lift (S O) d x1))).(\lambda (H9: (ty3 g a x0 x1)).(let H10 \def (eq_ind T v (\lambda (t0: T).(ty3 g c0 t0 (THead (Bind Abst) u t))) H2 (lift (S O) d x0) H7) in (eq_ind_r T (lift (S O) d x0) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w t0) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x1 (THead (Bind Abst) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift (S O) d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift (S O) (S d) z)))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H11: (eq T x1 (THead (Bind Abst) x2 x3))).(\lambda (H12: (eq T u (lift (S O) d x2))).(\lambda (H13: (eq T t (lift (S O) (S d) x3))).(let H14 \def (eq_ind T x1 (\lambda (t: T).(ty3 g a x0 t)) H9 (THead (Bind Abst) x2 x3) H11) in (eq_ind_r T (lift (S O) (S d) x3) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind Abst) u t0)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H15 \def (eq_ind T u (\lambda (t: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T w (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))) H1 (lift (S O) d x2) H12) in (eq_ind_r T (lift (S O) d x2) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind Abst) t0 (lift (S O) (S d) x3))) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H16 \def (H15 e u0 d H4 a H5) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T w (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x2) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind Abst) (lift (S O) d x2) (lift (S O) (S d) x3))) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H17: (eq T w (lift (S O) d x4))).(\lambda (H18: (eq T (lift (S O) d x2) (lift (S O) d x5))).(\lambda (H19: (ty3 g a x4 x5)).(eq_ind_r T (lift (S O) d x4) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) t0 (lift (S O) d x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) t0 (THead (Bind Abst) (lift (S O) d x2) (lift (S O) (S d) x3))) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H20 \def (eq_ind_r T x5 (\lambda (t: T).(ty3 g a x4 t)) H19 x2 (lift_inj x2 x5 (S O) d H18)) in (eq_ind T (lift (S O) d (THead (Bind Abst) x2 x3)) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) (lift (S O) d x4) (lift (S O) d x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) (lift (S O) d x4) t0) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind T (lift (S O) d (THead (Flat Appl) x4 x0)) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t0 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) (lift (S O) d x4) (lift (S O) d (THead (Bind Abst) x2 x3))) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind T (lift (S O) d (THead (Flat Appl) x4 (THead (Bind Abst) x2 x3))) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d (THead (Flat Appl) x4 x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d (THead (Flat Appl) x4 x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d (THead (Flat Appl) x4 (THead (Bind Abst) x2 x3))) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Flat Appl) x4 x0) (THead (Flat Appl) x4 (THead (Bind Abst) x2 x3)) (refl_equal T (lift (S O) d (THead (Flat Appl) x4 x0))) (refl_equal T (lift (S O) d (THead (Flat Appl) x4 (THead (Bind Abst) x2 x3)))) (ty3_appl g a x4 x2 H20 x0 x3 H14)) (THead (Flat Appl) (lift (S O) d x4) (lift (S O) d (THead (Bind Abst) x2 x3))) (lift_flat Appl x4 (THead (Bind Abst) x2 x3) (S O) d)) (THead (Flat Appl) (lift (S O) d x4) (lift (S O) d x0)) (lift_flat Appl x4 x0 (S O) d)) (THead (Bind Abst) (lift (S O) d x2) (lift (S O) (S d) x3)) (lift_bind Abst x2 x3 (S O) d))) w H17)))))) H16)) u H12)) t H13))))))) (lift_gen_bind Abst u t x1 (S O) d H8)) v H7))))))) H6))))))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (ty3 g c0 t3 t4)).(\lambda (H1: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (t0: T).(\lambda (H2: (ty3 g c0 t4 t0)).(\lambda (H3: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda (H4: (getl d c0 (CHead e (Bind Void) u))).(\lambda (a: C).(\lambda (H5: (drop (S O) d c0 a)).(let H6 \def (H3 e u d H4 a H5) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T t4 (lift (S O) d x0))).(\lambda (H8: (eq T t0 (lift (S O) d x1))).(\lambda (H9: (ty3 g a x0 x1)).(let H10 \def (eq_ind T t0 (\lambda (t: T).(ty3 g c0 t4 t)) H2 (lift (S O) d x1) H8) in (let H11 \def (eq_ind T t4 (\lambda (t: T).(ty3 g c0 t (lift (S O) d x1))) H10 (lift (S O) d x0) H7) in (let H12 \def (eq_ind T t4 (\lambda (t: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))) H1 (lift (S O) d x0) H7) in (let H13 \def (eq_ind T t4 (\lambda (t: T).(ty3 g c0 t3 t)) H0 (lift (S O) d x0) H7) in (eq_ind_r T (lift (S O) d x0) (\lambda (t: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Cast) t t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H14 \def (H12 e u d H4 a H5) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x0) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Cast) (lift (S O) d x0) t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x0) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H15: (eq T t3 (lift (S O) d x2))).(\lambda (H16: (eq T (lift (S O) d x0) (lift (S O) d x3))).(\lambda (H17: (ty3 g a x2 x3)).(let H18 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t (lift (S O) d x0))) H13 (lift (S O) d x2) H15) in (eq_ind_r T (lift (S O) d x2) (\lambda (t: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Cast) (lift (S O) d x0) t) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x0) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H19 \def (eq_ind_r T x3 (\lambda (t: T).(ty3 g a x2 t)) H17 x0 (lift_inj x0 x3 (S O) d H16)) in (eq_ind T (lift (S O) d (THead (Flat Cast) x0 x2)) (\lambda (t: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x0) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d (THead (Flat Cast) x0 x2)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x0) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Flat Cast) x0 x2) x0 (refl_equal T (lift (S O) d (THead (Flat Cast) x0 x2))) (refl_equal T (lift (S O) d x0)) (ty3_cast g a x2 x0 H19 x1 H9)) (THead (Flat Cast) (lift (S O) d x0) (lift (S O) d x2)) (lift_flat Cast x0 x2 (S O) d))) t3 H15))))))) H14)) t4 H7)))))))))) H6)))))))))))))))) c t1 t2 H))))). + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (ty3 g c t1 t2)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 t3 t)).(\lambda (H1: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (u: T).(\lambda (t4: T).(\lambda (H2: (ty3 g c0 u t4)).(\lambda (H3: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (H4: (pc3 c0 t4 t3)).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H5: (getl d c0 (CHead e (Bind Void) u0))).(\lambda (a: C).(\lambda (H6: (drop (S O) d c0 a)).(let H7 \def (H3 e u0 d H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t3 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq T u (lift (S O) d x0))).(\lambda (H9: (eq T t4 (lift (S O) d x1))).(\lambda (H10: (ty3 g a x0 x1)).(let H11 \def (eq_ind T t4 (\lambda (t: T).(pc3 c0 t t3)) H4 (lift (S O) d x1) H9) in (let H12 \def (eq_ind T t4 (\lambda (t: T).(ty3 g c0 u t)) H2 (lift (S O) d x1) H9) in (let H13 \def (eq_ind T u (\lambda (t: T).(ty3 g c0 t (lift (S O) d x1))) H12 (lift (S O) d x0) H8) in (eq_ind_r T (lift (S O) d x0) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t0 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t3 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H14 \def (H1 e u0 d H5 a H6) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d x0) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t3 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H15: (eq T t3 (lift (S O) d x2))).(\lambda (H16: (eq T t (lift (S O) d x3))).(\lambda (H17: (ty3 g a x2 x3)).(let H18 \def (eq_ind T t (\lambda (t: T).(ty3 g c0 t3 t)) H0 (lift (S O) d x3) H16) in (let H19 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t (lift (S O) d x3))) H18 (lift (S O) d x2) H15) in (let H20 \def (eq_ind T t3 (\lambda (t: T).(pc3 c0 (lift (S O) d x1) t)) H11 (lift (S O) d x2) H15) in (eq_ind_r T (lift (S O) d x2) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d x0) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d x0) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x2) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) x0 x2 (refl_equal T (lift (S O) d x0)) (refl_equal T (lift (S O) d x2)) (ty3_conv g a x2 x3 H17 x0 x1 H10 (pc3_gen_lift c0 x1 x2 (S O) d H20 a H6))) t3 H15))))))))) H14)) u H8))))))))) H7)))))))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda (_: (getl d c0 (CHead e (Bind Void) u))).(\lambda (a: C).(\lambda (_: (drop (S O) d c0 a)).(ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (TSort m) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (TSort (next g m)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TSort m) (TSort (next g m)) (eq_ind_r T (TSort m) (\lambda (t: T).(eq T (TSort m) t)) (refl_equal T (TSort m)) (lift (S O) d (TSort m)) (lift_sort m (S O) d)) (eq_ind_r T (TSort (next g m)) (\lambda (t: T).(eq T (TSort (next g m)) t)) (refl_equal T (TSort (next g m))) (lift (S O) d (TSort (next g m))) (lift_sort (next g m) (S O) d)) (ty3_sort g a m)))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: T).(\forall (d0: nat).((getl d0 d (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d0 d a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Void) u0))).(\lambda (a: C).(\lambda (H4: (drop (S O) d0 c0 a)).(lt_eq_gt_e n d0 (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (H5: (lt n d0)).(let H6 \def (eq_ind nat (minus d0 n) (\lambda (n: nat).(getl n (CHead d (Bind Abbr) u) (CHead e (Bind Void) u0))) (getl_conf_le d0 (CHead e (Bind Void) u0) c0 H3 (CHead d (Bind Abbr) u) n H0 (le_S_n n d0 (le_S (S n) d0 H5))) (S (minus d0 (S n))) (minus_x_Sy d0 n H5)) in (let H7 \def (eq_ind nat d0 (\lambda (n: nat).(drop (S O) n c0 a)) H4 (S (plus n (minus d0 (S n)))) (lt_plus_minus n d0 H5)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift (S O) (minus d0 (S n)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl n a (CHead e0 (Bind Abbr) v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S n)) d e0))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (H8: (eq T u (lift (S O) (minus d0 (S n)) x0))).(\lambda (H9: (getl n a (CHead x1 (Bind Abbr) x0))).(\lambda (H10: (drop (S O) (minus d0 (S n)) d x1)).(let H11 \def (eq_ind T u (\lambda (t0: T).(\forall (e: C).(\forall (u: T).(\forall (d0: nat).((getl d0 d (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d0 d a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t0 (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))) H2 (lift (S O) (minus d0 (S n)) x0) H8) in (let H12 \def (eq_ind T u (\lambda (t0: T).(ty3 g d t0 t)) H1 (lift (S O) (minus d0 (S n)) x0) H8) in (let H13 \def (H11 e u0 (minus d0 (S n)) (getl_gen_S (Bind Abbr) d (CHead e (Bind Void) u0) u (minus d0 (S n)) H6) x1 H10) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) (minus d0 (S n)) x0) (lift (S O) (minus d0 (S n)) y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) (minus d0 (S n)) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g x1 y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H14: (eq T (lift (S O) (minus d0 (S n)) x0) (lift (S O) (minus d0 (S n)) x2))).(\lambda (H15: (eq T t (lift (S O) (minus d0 (S n)) x3))).(\lambda (H16: (ty3 g x1 x2 x3)).(let H17 \def (eq_ind T t (\lambda (t: T).(ty3 g d (lift (S O) (minus d0 (S n)) x0) t)) H12 (lift (S O) (minus d0 (S n)) x3) H15) in (eq_ind_r T (lift (S O) (minus d0 (S n)) x3) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t0) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H18 \def (eq_ind_r T x2 (\lambda (t: T).(ty3 g x1 t x3)) H16 x0 (lift_inj x0 x2 (S O) (minus d0 (S n)) H14)) in (eq_ind T (lift (S O) (plus (S n) (minus d0 (S n))) (lift (S n) O x3)) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind nat d0 (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) n0 (lift (S n) O x3)) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d0 (lift (S n) O x3)) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef n) (lift (S n) O x3) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d0 (TLRef n)) (lift_lref_lt n (S O) d0 H5)) (refl_equal T (lift (S O) d0 (lift (S n) O x3))) (ty3_abbr g n a x1 x0 H9 x3 H18)) (plus (S n) (minus d0 (S n))) (le_plus_minus (S n) d0 H5)) (lift (S n) O (lift (S O) (minus d0 (S n)) x3)) (lift_d x3 (S O) (S n) (minus d0 (S n)) O (le_O_n (minus d0 (S n)))))) t H15))))))) H13))))))))) (getl_drop_conf_lt Abbr c0 d u n H0 a (S O) (minus d0 (S n)) H7))))) (\lambda (H5: (eq nat n d0)).(let H6 \def (eq_ind_r nat d0 (\lambda (n: nat).(drop (S O) n c0 a)) H4 n H5) in (let H7 \def (eq_ind_r nat d0 (\lambda (n: nat).(getl n c0 (CHead e (Bind Void) u0))) H3 n H5) in (eq_ind nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H8 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (c: C).(getl n c0 c)) H0 (CHead e (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Void) u0) H7)) in (let H9 \def (eq_ind C (CHead d (Bind Abbr) u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abbr) u) n H0 (CHead e (Bind Void) u0) H7)) in (False_ind (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) H9))) d0 H5)))) (\lambda (H5: (lt d0 n)).(eq_ind_r nat (S (plus O (minus n (S O)))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind nat (plus (S O) (minus n (S O))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (minus n (S O)) (S O)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef (plus (minus n (S O)) (S O))) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef (minus n (S O))) (lift n O t) (eq_ind_r T (TLRef (plus (minus n (S O)) (S O))) (\lambda (t0: T).(eq T (TLRef (plus (minus n (S O)) (S O))) t0)) (refl_equal T (TLRef (plus (minus n (S O)) (S O)))) (lift (S O) d0 (TLRef (minus n (S O)))) (lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus d0 n H5))) (eq_ind_r T (lift (plus (S O) n) O t) (\lambda (t0: T).(eq T (lift (S n) O t) t0)) (refl_equal T (lift (S n) O t)) (lift (S O) d0 (lift n O t)) (lift_free t n (S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) (plus O n) H5)) (le_O_n d0))) (eq_ind_r nat (S (minus n (S O))) (\lambda (n0: nat).(ty3 g a (TLRef (minus n (S O))) (lift n0 O t))) (ty3_abbr g (minus n (S O)) a d u (getl_drop_conf_ge n (CHead d (Bind Abbr) u) c0 H0 a (S O) d0 H4 (eq_ind_r nat (plus (S O) d0) (\lambda (n0: nat).(le n0 n)) H5 (plus d0 (S O)) (plus_comm d0 (S O)))) t H1) n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H5)))) (plus (S O) (minus n (S O))) (plus_comm (S O) (minus n (S O)))) (S (plus O (minus n (S O)))) (refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n (le_lt_trans O d0 n (le_O_n d0) H5))))))))))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u t)).(\lambda (H2: ((\forall (e: C).(\forall (u0: T).(\forall (d0: nat).((getl d0 d (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d0 d a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d0: nat).(\lambda (H3: (getl d0 c0 (CHead e (Bind Void) u0))).(\lambda (a: C).(\lambda (H4: (drop (S O) d0 c0 a)).(lt_eq_gt_e n d0 (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (H5: (lt n d0)).(let H6 \def (eq_ind nat (minus d0 n) (\lambda (n: nat).(getl n (CHead d (Bind Abst) u) (CHead e (Bind Void) u0))) (getl_conf_le d0 (CHead e (Bind Void) u0) c0 H3 (CHead d (Bind Abst) u) n H0 (le_S_n n d0 (le_S (S n) d0 H5))) (S (minus d0 (S n))) (minus_x_Sy d0 n H5)) in (let H7 \def (eq_ind nat d0 (\lambda (n: nat).(drop (S O) n c0 a)) H4 (S (plus n (minus d0 (S n)))) (lt_plus_minus n d0 H5)) in (ex3_2_ind T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift (S O) (minus d0 (S n)) v)))) (\lambda (v: T).(\lambda (e0: C).(getl n a (CHead e0 (Bind Abst) v)))) (\lambda (_: T).(\lambda (e0: C).(drop (S O) (minus d0 (S n)) d e0))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: C).(\lambda (H8: (eq T u (lift (S O) (minus d0 (S n)) x0))).(\lambda (H9: (getl n a (CHead x1 (Bind Abst) x0))).(\lambda (H10: (drop (S O) (minus d0 (S n)) d x1)).(let H11 \def (eq_ind T u (\lambda (t0: T).(\forall (e: C).(\forall (u: T).(\forall (d0: nat).((getl d0 d (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d0 d a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t0 (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))) H2 (lift (S O) (minus d0 (S n)) x0) H8) in (let H12 \def (eq_ind T u (\lambda (t0: T).(ty3 g d t0 t)) H1 (lift (S O) (minus d0 (S n)) x0) H8) in (eq_ind_r T (lift (S O) (minus d0 (S n)) x0) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O t0) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H13 \def (H11 e u0 (minus d0 (S n)) (getl_gen_S (Bind Abst) d (CHead e (Bind Void) u0) u (minus d0 (S n)) H6) x1 H10) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) (minus d0 (S n)) x0) (lift (S O) (minus d0 (S n)) y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) (minus d0 (S n)) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g x1 y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O (lift (S O) (minus d0 (S n)) x0)) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H14: (eq T (lift (S O) (minus d0 (S n)) x0) (lift (S O) (minus d0 (S n)) x2))).(\lambda (H15: (eq T t (lift (S O) (minus d0 (S n)) x3))).(\lambda (H16: (ty3 g x1 x2 x3)).(let H17 \def (eq_ind T t (\lambda (t: T).(ty3 g d (lift (S O) (minus d0 (S n)) x0) t)) H12 (lift (S O) (minus d0 (S n)) x3) H15) in (let H18 \def (eq_ind_r T x2 (\lambda (t: T).(ty3 g x1 t x3)) H16 x0 (lift_inj x0 x2 (S O) (minus d0 (S n)) H14)) in (eq_ind T (lift (S O) (plus (S n) (minus d0 (S n))) (lift (S n) O x0)) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind nat d0 (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) n0 (lift (S n) O x0)) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d0 (lift (S n) O x0)) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef n) (lift (S n) O x0) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d0 (TLRef n)) (lift_lref_lt n (S O) d0 H5)) (refl_equal T (lift (S O) d0 (lift (S n) O x0))) (ty3_abst g n a x1 x0 H9 x3 H18)) (plus (S n) (minus d0 (S n))) (le_plus_minus (S n) d0 H5)) (lift (S n) O (lift (S O) (minus d0 (S n)) x0)) (lift_d x0 (S O) (S n) (minus d0 (S n)) O (le_O_n (minus d0 (S n)))))))))))) H13)) u H8)))))))) (getl_drop_conf_lt Abst c0 d u n H0 a (S O) (minus d0 (S n)) H7))))) (\lambda (H5: (eq nat n d0)).(let H6 \def (eq_ind_r nat d0 (\lambda (n: nat).(drop (S O) n c0 a)) H4 n H5) in (let H7 \def (eq_ind_r nat d0 (\lambda (n: nat).(getl n c0 (CHead e (Bind Void) u0))) H3 n H5) in (eq_ind nat n (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) n0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) n0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H8 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (c: C).(getl n c0 c)) H0 (CHead e (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abst) u) n H0 (CHead e (Bind Void) u0) H7)) in (let H9 \def (eq_ind C (CHead d (Bind Abst) u) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e (Bind Void) u0) (getl_mono c0 (CHead d (Bind Abst) u) n H0 (CHead e (Bind Void) u0) H7)) in (False_ind (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n) (lift (S O) n y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) n y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) H9))) d0 H5)))) (\lambda (H5: (lt d0 n)).(eq_ind_r nat (S (plus O (minus n (S O)))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind nat (plus (S O) (minus n (S O))) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r nat (plus (minus n (S O)) (S O)) (\lambda (n0: nat).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef n0) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (TLRef (plus (minus n (S O)) (S O))) (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S n) O u) (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (TLRef (minus n (S O))) (lift n O u) (eq_ind_r T (TLRef (plus (minus n (S O)) (S O))) (\lambda (t0: T).(eq T (TLRef (plus (minus n (S O)) (S O))) t0)) (refl_equal T (TLRef (plus (minus n (S O)) (S O)))) (lift (S O) d0 (TLRef (minus n (S O)))) (lift_lref_ge (minus n (S O)) (S O) d0 (lt_le_minus d0 n H5))) (eq_ind_r T (lift (plus (S O) n) O u) (\lambda (t0: T).(eq T (lift (S n) O u) t0)) (refl_equal T (lift (S n) O u)) (lift (S O) d0 (lift n O u)) (lift_free u n (S O) O d0 (le_S_n d0 (plus O n) (le_S (S d0) (plus O n) H5)) (le_O_n d0))) (eq_ind_r nat (S (minus n (S O))) (\lambda (n0: nat).(ty3 g a (TLRef (minus n (S O))) (lift n0 O u))) (ty3_abst g (minus n (S O)) a d u (getl_drop_conf_ge n (CHead d (Bind Abst) u) c0 H0 a (S O) d0 H4 (eq_ind_r nat (plus (S O) d0) (\lambda (n0: nat).(le n0 n)) H5 (plus d0 (S O)) (plus_comm d0 (S O)))) t H1) n (minus_x_SO n (le_lt_trans O d0 n (le_O_n d0) H5)))) (plus (S O) (minus n (S O))) (plus_comm (S O) (minus n (S O)))) (S (plus O (minus n (S O)))) (refl_equal nat (S (plus O (minus n (S O)))))) n (lt_plus_minus O n (le_lt_trans O d0 n (le_O_n d0) H5))))))))))))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 u t)).(\lambda (H1: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (b: B).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H2: (ty3 g (CHead c0 (Bind b) u) t3 t4)).(\lambda (H3: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d (CHead c0 (Bind b) u) (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d (CHead c0 (Bind b) u) a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (t0: T).(\lambda (H4: (ty3 g (CHead c0 (Bind b) u) t4 t0)).(\lambda (H5: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d (CHead c0 (Bind b) u) (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d (CHead c0 (Bind b) u) a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H6: (getl d c0 (CHead e (Bind Void) u0))).(\lambda (a: C).(\lambda (H7: (drop (S O) d c0 a)).(let H8 \def (H1 e u0 d H6 a H7) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T u (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind b) u t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) u t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H9: (eq T u (lift (S O) d x0))).(\lambda (H10: (eq T t (lift (S O) d x1))).(\lambda (H11: (ty3 g a x0 x1)).(let H12 \def (eq_ind T t (\lambda (t: T).(ty3 g c0 u t)) H0 (lift (S O) d x1) H10) in (let H13 \def (eq_ind T u (\lambda (t: T).(ty3 g c0 t (lift (S O) d x1))) H12 (lift (S O) d x0) H9) in (let H14 \def (eq_ind T u (\lambda (t: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d (CHead c0 (Bind b) t) (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d (CHead c0 (Bind b) t) a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))) H5 (lift (S O) d x0) H9) in (let H15 \def (eq_ind T u (\lambda (t: T).(ty3 g (CHead c0 (Bind b) t) t4 t0)) H4 (lift (S O) d x0) H9) in (let H16 \def (eq_ind T u (\lambda (t: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d (CHead c0 (Bind b) t) (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d (CHead c0 (Bind b) t) a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))) H3 (lift (S O) d x0) H9) in (let H17 \def (eq_ind T u (\lambda (t: T).(ty3 g (CHead c0 (Bind b) t) t3 t4)) H2 (lift (S O) d x0) H9) in (eq_ind_r T (lift (S O) d x0) (\lambda (t5: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind b) t5 t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) t5 t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H18 \def (H16 e u0 (S d) (getl_head (Bind b) d c0 (CHead e (Bind Void) u0) H6 (lift (S O) d x0)) (CHead a (Bind b) x0) (drop_skip_bind (S O) d c0 a H7 b x0)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) (S d) y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) (S d) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g (CHead a (Bind b) x0) y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind b) (lift (S O) d x0) t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S O) d x0) t4) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H19: (eq T t3 (lift (S O) (S d) x2))).(\lambda (H20: (eq T t4 (lift (S O) (S d) x3))).(\lambda (H21: (ty3 g (CHead a (Bind b) x0) x2 x3)).(let H22 \def (eq_ind T t4 (\lambda (t: T).(\forall (e: C).(\forall (u: T).(\forall (d0: nat).((getl d0 (CHead c0 (Bind b) (lift (S O) d x0)) (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d0 (CHead c0 (Bind b) (lift (S O) d x0)) a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t (lift (S O) d0 y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d0 y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))) H14 (lift (S O) (S d) x3) H20) in (eq_ind_r T (lift (S O) (S d) x3) (\lambda (t5: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind b) (lift (S O) d x0) t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S O) d x0) t5) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind_r T (lift (S O) (S d) x2) (\lambda (t5: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind b) (lift (S O) d x0) t5) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x3)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H23 \def (H22 e u0 (S d) (getl_head (Bind b) d c0 (CHead e (Bind Void) u0) H6 (lift (S O) d x0)) (CHead a (Bind b) x0) (drop_skip_bind (S O) d c0 a H7 b x0)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) (S d) x3) (lift (S O) (S d) y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) (S d) y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g (CHead a (Bind b) x0) y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x2)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x3)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H24: (eq T (lift (S O) (S d) x3) (lift (S O) (S d) x4))).(\lambda (_: (eq T t0 (lift (S O) (S d) x5))).(\lambda (H26: (ty3 g (CHead a (Bind b) x0) x4 x5)).(let H27 \def (eq_ind_r T x4 (\lambda (t: T).(ty3 g (CHead a (Bind b) x0) t x5)) H26 x3 (lift_inj x3 x4 (S O) (S d) H24)) in (eq_ind T (lift (S O) d (THead (Bind b) x0 x2)) (\lambda (t5: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t5 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x3)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind T (lift (S O) d (THead (Bind b) x0 x3)) (\lambda (t5: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d (THead (Bind b) x0 x2)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t5 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d (THead (Bind b) x0 x2)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d (THead (Bind b) x0 x3)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Bind b) x0 x2) (THead (Bind b) x0 x3) (refl_equal T (lift (S O) d (THead (Bind b) x0 x2))) (refl_equal T (lift (S O) d (THead (Bind b) x0 x3))) (ty3_bind g a x0 x1 H11 b x2 x3 H21 x5 H27)) (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x3)) (lift_bind b x0 x3 (S O) d)) (THead (Bind b) (lift (S O) d x0) (lift (S O) (S d) x2)) (lift_bind b x0 x2 (S O) d)))))))) H23)) t3 H19) t4 H20))))))) H18)) u H9)))))))))))) H8))))))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (H1: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T w (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T u (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (v: T).(\lambda (t: T).(\lambda (H2: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (H3: ((\forall (e: C).(\forall (u0: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u0)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T v (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind Abst) u t) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H4: (getl d c0 (CHead e (Bind Void) u0))).(\lambda (a: C).(\lambda (H5: (drop (S O) d c0 a)).(let H6 \def (H3 e u0 d H4 a H5) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T v (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Bind Abst) u t) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w v) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T v (lift (S O) d x0))).(\lambda (H8: (eq T (THead (Bind Abst) u t) (lift (S O) d x1))).(\lambda (H9: (ty3 g a x0 x1)).(let H10 \def (eq_ind T v (\lambda (t0: T).(ty3 g c0 t0 (THead (Bind Abst) u t))) H2 (lift (S O) d x0) H7) in (eq_ind_r T (lift (S O) d x0) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w t0) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x1 (THead (Bind Abst) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift (S O) d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift (S O) (S d) z)))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind Abst) u t)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H11: (eq T x1 (THead (Bind Abst) x2 x3))).(\lambda (H12: (eq T u (lift (S O) d x2))).(\lambda (H13: (eq T t (lift (S O) (S d) x3))).(let H14 \def (eq_ind T x1 (\lambda (t: T).(ty3 g a x0 t)) H9 (THead (Bind Abst) x2 x3) H11) in (eq_ind_r T (lift (S O) (S d) x3) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind Abst) u t0)) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H15 \def (eq_ind T u (\lambda (t: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T w (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))) H1 (lift (S O) d x2) H12) in (eq_ind_r T (lift (S O) d x2) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind Abst) t0 (lift (S O) (S d) x3))) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H16 \def (H15 e u0 d H4 a H5) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T w (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x2) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) w (lift (S O) d x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) w (THead (Bind Abst) (lift (S O) d x2) (lift (S O) (S d) x3))) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H17: (eq T w (lift (S O) d x4))).(\lambda (H18: (eq T (lift (S O) d x2) (lift (S O) d x5))).(\lambda (H19: (ty3 g a x4 x5)).(eq_ind_r T (lift (S O) d x4) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) t0 (lift (S O) d x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) t0 (THead (Bind Abst) (lift (S O) d x2) (lift (S O) (S d) x3))) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H20 \def (eq_ind_r T x5 (\lambda (t: T).(ty3 g a x4 t)) H19 x2 (lift_inj x2 x5 (S O) d H18)) in (eq_ind T (lift (S O) d (THead (Bind Abst) x2 x3)) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Appl) (lift (S O) d x4) (lift (S O) d x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) (lift (S O) d x4) t0) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind T (lift (S O) d (THead (Flat Appl) x4 x0)) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t0 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (THead (Flat Appl) (lift (S O) d x4) (lift (S O) d (THead (Bind Abst) x2 x3))) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (eq_ind T (lift (S O) d (THead (Flat Appl) x4 (THead (Bind Abst) x2 x3))) (\lambda (t0: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d (THead (Flat Appl) x4 x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d (THead (Flat Appl) x4 x0)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d (THead (Flat Appl) x4 (THead (Bind Abst) x2 x3))) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Flat Appl) x4 x0) (THead (Flat Appl) x4 (THead (Bind Abst) x2 x3)) (refl_equal T (lift (S O) d (THead (Flat Appl) x4 x0))) (refl_equal T (lift (S O) d (THead (Flat Appl) x4 (THead (Bind Abst) x2 x3)))) (ty3_appl g a x4 x2 H20 x0 x3 H14)) (THead (Flat Appl) (lift (S O) d x4) (lift (S O) d (THead (Bind Abst) x2 x3))) (lift_flat Appl x4 (THead (Bind Abst) x2 x3) (S O) d)) (THead (Flat Appl) (lift (S O) d x4) (lift (S O) d x0)) (lift_flat Appl x4 x0 (S O) d)) (THead (Bind Abst) (lift (S O) d x2) (lift (S O) (S d) x3)) (lift_bind Abst x2 x3 (S O) d))) w H17)))))) H16)) u H12)) t H13))))))) (lift_gen_bind Abst u t x1 (S O) d H8)) v H7))))))) H6))))))))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (ty3 g c0 t3 t4)).(\lambda (H1: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (t0: T).(\lambda (H2: (ty3 g c0 t4 t0)).(\lambda (H3: ((\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))))))))))).(\lambda (e: C).(\lambda (u: T).(\lambda (d: nat).(\lambda (H4: (getl d c0 (CHead e (Bind Void) u))).(\lambda (a: C).(\lambda (H5: (drop (S O) d c0 a)).(let H6 \def (H3 e u d H4 a H5) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T t4 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t0 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Cast) t4 t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t4 (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H7: (eq T t4 (lift (S O) d x0))).(\lambda (H8: (eq T t0 (lift (S O) d x1))).(\lambda (H9: (ty3 g a x0 x1)).(let H10 \def (eq_ind T t0 (\lambda (t: T).(ty3 g c0 t4 t)) H2 (lift (S O) d x1) H8) in (let H11 \def (eq_ind T t4 (\lambda (t: T).(ty3 g c0 t (lift (S O) d x1))) H10 (lift (S O) d x0) H7) in (let H12 \def (eq_ind T t4 (\lambda (t: T).(\forall (e: C).(\forall (u: T).(\forall (d: nat).((getl d c0 (CHead e (Bind Void) u)) \to (\forall (a: C).((drop (S O) d c0 a) \to (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))))))))) H1 (lift (S O) d x0) H7) in (let H13 \def (eq_ind T t4 (\lambda (t: T).(ty3 g c0 t3 t)) H0 (lift (S O) d x0) H7) in (eq_ind_r T (lift (S O) d x0) (\lambda (t: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Cast) t t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H14 \def (H12 e u d H4 a H5) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T t3 (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x0) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Cast) (lift (S O) d x0) t3) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x0) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2)))) (\lambda (x2: T).(\lambda (x3: T).(\lambda (H15: (eq T t3 (lift (S O) d x2))).(\lambda (H16: (eq T (lift (S O) d x0) (lift (S O) d x3))).(\lambda (H17: (ty3 g a x2 x3)).(let H18 \def (eq_ind T t3 (\lambda (t: T).(ty3 g c0 t (lift (S O) d x0))) H13 (lift (S O) d x2) H15) in (eq_ind_r T (lift (S O) d x2) (\lambda (t: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T (THead (Flat Cast) (lift (S O) d x0) t) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x0) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (let H19 \def (eq_ind_r T x3 (\lambda (t: T).(ty3 g a x2 t)) H17 x0 (lift_inj x0 x3 (S O) d H16)) in (eq_ind T (lift (S O) d (THead (Flat Cast) x0 x2)) (\lambda (t: T).(ex3_2 T T (\lambda (y1: T).(\lambda (_: T).(eq T t (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x0) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))))) (ex3_2_intro T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) d (THead (Flat Cast) x0 x2)) (lift (S O) d y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T (lift (S O) d x0) (lift (S O) d y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g a y1 y2))) (THead (Flat Cast) x0 x2) x0 (refl_equal T (lift (S O) d (THead (Flat Cast) x0 x2))) (refl_equal T (lift (S O) d x0)) (ty3_cast g a x2 x0 H19 x1 H9)) (THead (Flat Cast) (lift (S O) d x0) (lift (S O) d x2)) (lift_flat Cast x0 x2 (S O) d))) t3 H15))))))) H14)) t4 H7)))))))))) H6)))))))))))))))) c t1 t2 H))))). inductive csub3 (g:G): C \to (C \to Prop) \def | csub3_sort: \forall (n: nat).(csub3 g (CSort n) (CSort n)) @@ -2996,17 +2996,17 @@ inductive csub3 (g:G): C \to (C \to Prop) \def theorem csub3_gen_abbr: \forall (g: G).(\forall (e1: C).(\forall (c2: C).(\forall (v: T).((csub3 g (CHead e1 (Bind Abbr) v) c2) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2))))))) \def - \lambda (g: G).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H: (csub3 g (CHead e1 (Bind Abbr) v) c2)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e1 (Bind Abbr) v)) \to ((eq C c0 c2) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))))))) with [(csub3_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead e1 (Bind Abbr) v))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e1 (Bind Abbr) v) H0) in (False_ind ((eq C (CSort n) c2) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))) H2)) H1))) | (csub3_head c1 c0 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) (CHead e1 (Bind Abbr) v))).(\lambda (H2: (eq C (CHead c0 k u) c2)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind Abbr) v) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u) (CHead e1 (Bind Abbr) v) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead e1 (Bind Abbr) v) H1) in (eq_ind C e1 (\lambda (c: C).((eq K k (Bind Abbr)) \to ((eq T u v) \to ((eq C (CHead c0 k u) c2) \to ((csub3 g c c0) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))))))) (\lambda (H6: (eq K k (Bind Abbr))).(eq_ind K (Bind Abbr) (\lambda (k0: K).((eq T u v) \to ((eq C (CHead c0 k0 u) c2) \to ((csub3 g e1 c0) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2))))))) (\lambda (H7: (eq T u v)).(eq_ind T v (\lambda (t: T).((eq C (CHead c0 (Bind Abbr) t) c2) \to ((csub3 g e1 c0) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))))) (\lambda (H8: (eq C (CHead c0 (Bind Abbr) v) c2)).(eq_ind C (CHead c0 (Bind Abbr) v) (\lambda (c: C).((csub3 g e1 c0) \to (ex2 C (\lambda (e2: C).(eq C c (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2))))) (\lambda (H9: (csub3 g e1 c0)).(let H10 \def (eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind Abbr) v) c)) H (CHead c0 (Bind Abbr) v) H8) in (ex_intro2 C (\lambda (e2: C).(eq C (CHead c0 (Bind Abbr) v) (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)) c0 (refl_equal C (CHead c0 (Bind Abbr) v)) H9))) c2 H8)) u (sym_eq T u v H7))) k (sym_eq K k (Bind Abbr) H6))) c1 (sym_eq C c1 e1 H5))) H4)) H3)) H2 H0))) | (csub3_void c1 c0 H0 b H1 u1 u2) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Void) u1) (CHead e1 (Bind Abbr) v))).(\lambda (H3: (eq C (CHead c0 (Bind b) u2) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Void) u1) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead e1 (Bind Abbr) v) H2) in (False_ind ((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g c1 c0) \to ((not (eq B b Void)) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))))) H4)) H3 H0 H1))) | (csub3_abst c1 c0 H0 u t H1) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abbr) v))).(\lambda (H3: (eq C (CHead c0 (Bind Abbr) u) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e1 (Bind Abbr) v) H2) in (False_ind ((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g c1 c0) \to ((ty3 g c0 u t) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))))) H4)) H3 H0 H1)))]) in (H0 (refl_equal C (CHead e1 (Bind Abbr) v)) (refl_equal C c2))))))). + \lambda (g: G).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v: T).(\lambda (H: (csub3 g (CHead e1 (Bind Abbr) v) c2)).(let H0 \def (match H return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csub3 ? c c0)).((eq C c (CHead e1 (Bind Abbr) v)) \to ((eq C c0 c2) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))))))) with [(csub3_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead e1 (Bind Abbr) v))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e1 (Bind Abbr) v) H0) in (False_ind ((eq C (CSort n) c2) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))) H2)) H1))) | (csub3_head c1 c0 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) (CHead e1 (Bind Abbr) v))).(\lambda (H2: (eq C (CHead c0 k u) c2)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind Abbr) v) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u) (CHead e1 (Bind Abbr) v) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead e1 (Bind Abbr) v) H1) in (eq_ind C e1 (\lambda (c: C).((eq K k (Bind Abbr)) \to ((eq T u v) \to ((eq C (CHead c0 k u) c2) \to ((csub3 g c c0) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))))))) (\lambda (H6: (eq K k (Bind Abbr))).(eq_ind K (Bind Abbr) (\lambda (k0: K).((eq T u v) \to ((eq C (CHead c0 k0 u) c2) \to ((csub3 g e1 c0) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2))))))) (\lambda (H7: (eq T u v)).(eq_ind T v (\lambda (t: T).((eq C (CHead c0 (Bind Abbr) t) c2) \to ((csub3 g e1 c0) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))))) (\lambda (H8: (eq C (CHead c0 (Bind Abbr) v) c2)).(eq_ind C (CHead c0 (Bind Abbr) v) (\lambda (c: C).((csub3 g e1 c0) \to (ex2 C (\lambda (e2: C).(eq C c (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2))))) (\lambda (H9: (csub3 g e1 c0)).(let H10 \def (eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind Abbr) v) c)) H (CHead c0 (Bind Abbr) v) H8) in (ex_intro2 C (\lambda (e2: C).(eq C (CHead c0 (Bind Abbr) v) (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)) c0 (refl_equal C (CHead c0 (Bind Abbr) v)) H9))) c2 H8)) u (sym_eq T u v H7))) k (sym_eq K k (Bind Abbr) H6))) c1 (sym_eq C c1 e1 H5))) H4)) H3)) H2 H0))) | (csub3_void c1 c0 H0 b H1 u1 u2) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Void) u1) (CHead e1 (Bind Abbr) v))).(\lambda (H3: (eq C (CHead c0 (Bind b) u2) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Void) u1) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead e1 (Bind Abbr) v) H2) in (False_ind ((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g c1 c0) \to ((not (eq B b Void)) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))))) H4)) H3 H0 H1))) | (csub3_abst c1 c0 H0 u t H1) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abbr) v))).(\lambda (H3: (eq C (CHead c0 (Bind Abbr) u) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead e1 (Bind Abbr) v) H2) in (False_ind ((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g c1 c0) \to ((ty3 g c0 u t) \to (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abbr) v))) (\lambda (e2: C).(csub3 g e1 e2)))))) H4)) H3 H0 H1)))]) in (H0 (refl_equal C (CHead e1 (Bind Abbr) v)) (refl_equal C c2))))))). theorem csub3_gen_abst: \forall (g: G).(\forall (e1: C).(\forall (c2: C).(\forall (v1: T).((csub3 g (CHead e1 (Bind Abst) v1) c2) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))))))))) \def - \lambda (g: G).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v1: T).(\lambda (H: (csub3 g (CHead e1 (Bind Abst) v1) c2)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e1 (Bind Abst) v1)) \to ((eq C c0 c2) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))))) with [(csub3_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead e1 (Bind Abst) v1))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e1 (Bind Abst) v1) H0) in (False_ind ((eq C (CSort n) c2) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))) H2)) H1))) | (csub3_head c1 c0 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) (CHead e1 (Bind Abst) v1))).(\lambda (H2: (eq C (CHead c0 k u) c2)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind Abst) v1) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u) (CHead e1 (Bind Abst) v1) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead e1 (Bind Abst) v1) H1) in (eq_ind C e1 (\lambda (c: C).((eq K k (Bind Abst)) \to ((eq T u v1) \to ((eq C (CHead c0 k u) c2) \to ((csub3 g c c0) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))))) (\lambda (H6: (eq K k (Bind Abst))).(eq_ind K (Bind Abst) (\lambda (k0: K).((eq T u v1) \to ((eq C (CHead c0 k0 u) c2) \to ((csub3 g e1 c0) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))))))))) (\lambda (H7: (eq T u v1)).(eq_ind T v1 (\lambda (t: T).((eq C (CHead c0 (Bind Abst) t) c2) \to ((csub3 g e1 c0) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))) (\lambda (H8: (eq C (CHead c0 (Bind Abst) v1) c2)).(eq_ind C (CHead c0 (Bind Abst) v1) (\lambda (c: C).((csub3 g e1 c0) \to (or (ex2 C (\lambda (e2: C).(eq C c (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))))))) (\lambda (H9: (csub3 g e1 c0)).(let H10 \def (eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind Abst) v1) c)) H (CHead c0 (Bind Abst) v1) H8) in (or_introl (ex2 C (\lambda (e2: C).(eq C (CHead c0 (Bind Abst) v1) (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind Abst) v1) (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))) (ex_intro2 C (\lambda (e2: C).(eq C (CHead c0 (Bind Abst) v1) (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2)) c0 (refl_equal C (CHead c0 (Bind Abst) v1)) H9)))) c2 H8)) u (sym_eq T u v1 H7))) k (sym_eq K k (Bind Abst) H6))) c1 (sym_eq C c1 e1 H5))) H4)) H3)) H2 H0))) | (csub3_void c1 c0 H0 b H1 u1 u2) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Void) u1) (CHead e1 (Bind Abst) v1))).(\lambda (H3: (eq C (CHead c0 (Bind b) u2) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Void) u1) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead e1 (Bind Abst) v1) H2) in (False_ind ((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g c1 c0) \to ((not (eq B b Void)) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))) H4)) H3 H0 H1))) | (csub3_abst c1 c0 H0 u t H1) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abst) v1))).(\lambda (H3: (eq C (CHead c0 (Bind Abbr) u) c2)).((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abst) v1) H2) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abst) v1) H2) in (eq_ind C e1 (\lambda (c: C).((eq T t v1) \to ((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g c c0) \to ((ty3 g c0 u t) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))))) (\lambda (H6: (eq T t v1)).(eq_ind T v1 (\lambda (t0: T).((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g e1 c0) \to ((ty3 g c0 u t0) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))))))))) (\lambda (H7: (eq C (CHead c0 (Bind Abbr) u) c2)).(eq_ind C (CHead c0 (Bind Abbr) u) (\lambda (c: C).((csub3 g e1 c0) \to ((ty3 g c0 u v1) \to (or (ex2 C (\lambda (e2: C).(eq C c (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))) (\lambda (H8: (csub3 g e1 c0)).(\lambda (H9: (ty3 g c0 u v1)).(let H10 \def (eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind Abst) v1) c)) H (CHead c0 (Bind Abbr) u) H7) in (or_intror (ex2 C (\lambda (e2: C).(eq C (CHead c0 (Bind Abbr) u) (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind Abbr) u) (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))) (ex3_2_intro C T (\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind Abbr) u) (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))) c0 u (refl_equal C (CHead c0 (Bind Abbr) u)) H8 H9))))) c2 H7)) t (sym_eq T t v1 H6))) c1 (sym_eq C c1 e1 H5))) H4)) H3 H0 H1)))]) in (H0 (refl_equal C (CHead e1 (Bind Abst) v1)) (refl_equal C c2))))))). + \lambda (g: G).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v1: T).(\lambda (H: (csub3 g (CHead e1 (Bind Abst) v1) c2)).(let H0 \def (match H return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csub3 ? c c0)).((eq C c (CHead e1 (Bind Abst) v1)) \to ((eq C c0 c2) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))))) with [(csub3_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead e1 (Bind Abst) v1))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e1 (Bind Abst) v1) H0) in (False_ind ((eq C (CSort n) c2) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))) H2)) H1))) | (csub3_head c1 c0 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) (CHead e1 (Bind Abst) v1))).(\lambda (H2: (eq C (CHead c0 k u) c2)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind Abst) v1) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u) (CHead e1 (Bind Abst) v1) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead e1 (Bind Abst) v1) H1) in (eq_ind C e1 (\lambda (c: C).((eq K k (Bind Abst)) \to ((eq T u v1) \to ((eq C (CHead c0 k u) c2) \to ((csub3 g c c0) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))))) (\lambda (H6: (eq K k (Bind Abst))).(eq_ind K (Bind Abst) (\lambda (k0: K).((eq T u v1) \to ((eq C (CHead c0 k0 u) c2) \to ((csub3 g e1 c0) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))))))))) (\lambda (H7: (eq T u v1)).(eq_ind T v1 (\lambda (t: T).((eq C (CHead c0 (Bind Abst) t) c2) \to ((csub3 g e1 c0) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))) (\lambda (H8: (eq C (CHead c0 (Bind Abst) v1) c2)).(eq_ind C (CHead c0 (Bind Abst) v1) (\lambda (c: C).((csub3 g e1 c0) \to (or (ex2 C (\lambda (e2: C).(eq C c (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))))))) (\lambda (H9: (csub3 g e1 c0)).(let H10 \def (eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind Abst) v1) c)) H (CHead c0 (Bind Abst) v1) H8) in (or_introl (ex2 C (\lambda (e2: C).(eq C (CHead c0 (Bind Abst) v1) (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind Abst) v1) (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))) (ex_intro2 C (\lambda (e2: C).(eq C (CHead c0 (Bind Abst) v1) (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2)) c0 (refl_equal C (CHead c0 (Bind Abst) v1)) H9)))) c2 H8)) u (sym_eq T u v1 H7))) k (sym_eq K k (Bind Abst) H6))) c1 (sym_eq C c1 e1 H5))) H4)) H3)) H2 H0))) | (csub3_void c1 c0 H0 b H1 u1 u2) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Void) u1) (CHead e1 (Bind Abst) v1))).(\lambda (H3: (eq C (CHead c0 (Bind b) u2) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Void) u1) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead e1 (Bind Abst) v1) H2) in (False_ind ((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g c1 c0) \to ((not (eq B b Void)) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))) H4)) H3 H0 H1))) | (csub3_abst c1 c0 H0 u t H1) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abst) v1))).(\lambda (H3: (eq C (CHead c0 (Bind Abbr) u) c2)).((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abst) v1) H2) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind Abst) v1) H2) in (eq_ind C e1 (\lambda (c: C).((eq T t v1) \to ((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g c c0) \to ((ty3 g c0 u t) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))))) (\lambda (H6: (eq T t v1)).(eq_ind T v1 (\lambda (t0: T).((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g e1 c0) \to ((ty3 g c0 u t0) \to (or (ex2 C (\lambda (e2: C).(eq C c2 (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))))))))) (\lambda (H7: (eq C (CHead c0 (Bind Abbr) u) c2)).(eq_ind C (CHead c0 (Bind Abbr) u) (\lambda (c: C).((csub3 g e1 c0) \to ((ty3 g c0 u v1) \to (or (ex2 C (\lambda (e2: C).(eq C c (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))))))) (\lambda (H8: (csub3 g e1 c0)).(\lambda (H9: (ty3 g c0 u v1)).(let H10 \def (eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind Abst) v1) c)) H (CHead c0 (Bind Abbr) u) H7) in (or_intror (ex2 C (\lambda (e2: C).(eq C (CHead c0 (Bind Abbr) u) (CHead e2 (Bind Abst) v1))) (\lambda (e2: C).(csub3 g e1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind Abbr) u) (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1)))) (ex3_2_intro C T (\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind Abbr) u) (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 v1))) c0 u (refl_equal C (CHead c0 (Bind Abbr) u)) H8 H9))))) c2 H7)) t (sym_eq T t v1 H6))) c1 (sym_eq C c1 e1 H5))) H4)) H3 H0 H1)))]) in (H0 (refl_equal C (CHead e1 (Bind Abst) v1)) (refl_equal C c2))))))). theorem csub3_gen_bind: \forall (g: G).(\forall (b1: B).(\forall (e1: C).(\forall (c2: C).(\forall (v1: T).((csub3 g (CHead e1 (Bind b1) v1) c2) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))))) \def - \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v1: T).(\lambda (H: (csub3 g (CHead e1 (Bind b1) v1) c2)).(let H0 \def (match H return (\lambda (_: ?).(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead e1 (Bind b1) v1)) \to ((eq C c0 c2) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))))) with [(csub3_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead e1 (Bind b1) v1))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e1 (Bind b1) v1) H0) in (False_ind ((eq C (CSort n) c2) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))) H2)) H1))) | (csub3_head c1 c0 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) (CHead e1 (Bind b1) v1))).(\lambda (H2: (eq C (CHead c0 k u) c2)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H1) in (eq_ind C e1 (\lambda (c: C).((eq K k (Bind b1)) \to ((eq T u v1) \to ((eq C (CHead c0 k u) c2) \to ((csub3 g c c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))))) (\lambda (H6: (eq K k (Bind b1))).(eq_ind K (Bind b1) (\lambda (k0: K).((eq T u v1) \to ((eq C (CHead c0 k0 u) c2) \to ((csub3 g e1 c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))))))))) (\lambda (H7: (eq T u v1)).(eq_ind T v1 (\lambda (t: T).((eq C (CHead c0 (Bind b1) t) c2) \to ((csub3 g e1 c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))) (\lambda (H8: (eq C (CHead c0 (Bind b1) v1) c2)).(eq_ind C (CHead c0 (Bind b1) v1) (\lambda (c: C).((csub3 g e1 c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))))))) (\lambda (H9: (csub3 g e1 c0)).(let H10 \def (eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind b1) v1) c)) H (CHead c0 (Bind b1) v1) H8) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))) b1 c0 v1 (refl_equal C (CHead c0 (Bind b1) v1)) H9))) c2 H8)) u (sym_eq T u v1 H7))) k (sym_eq K k (Bind b1) H6))) c1 (sym_eq C c1 e1 H5))) H4)) H3)) H2 H0))) | (csub3_void c1 c0 H0 b H1 u1 u2) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1))).(\lambda (H3: (eq C (CHead c0 (Bind b) u2) c2)).((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H2) in ((let H5 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Void | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Void])])) (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H2) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H2) in (eq_ind C e1 (\lambda (c: C).((eq B Void b1) \to ((eq T u1 v1) \to ((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g c c0) \to ((not (eq B b Void)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))))))))))) (\lambda (H7: (eq B Void b1)).(eq_ind B Void (\lambda (_: B).((eq T u1 v1) \to ((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g e1 c0) \to ((not (eq B b Void)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))))) (\lambda (H8: (eq T u1 v1)).(eq_ind T v1 (\lambda (_: T).((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g e1 c0) \to ((not (eq B b Void)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))))))))) (\lambda (H9: (eq C (CHead c0 (Bind b) u2) c2)).(eq_ind C (CHead c0 (Bind b) u2) (\lambda (c: C).((csub3 g e1 c0) \to ((not (eq B b Void)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))) (\lambda (H10: (csub3 g e1 c0)).(\lambda (_: (not (eq B b Void))).(let H12 \def (eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind b1) v1) c)) H (CHead c0 (Bind b) u2) H9) in (let H13 \def (eq_ind_r B b1 (\lambda (b0: B).(csub3 g (CHead e1 (Bind b0) v1) (CHead c0 (Bind b) u2))) H12 Void H7) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind b) u2) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))) b c0 u2 (refl_equal C (CHead c0 (Bind b) u2)) H10))))) c2 H9)) u1 (sym_eq T u1 v1 H8))) b1 H7)) c1 (sym_eq C c1 e1 H6))) H5)) H4)) H3 H0 H1))) | (csub3_abst c1 c0 H0 u t H1) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1))).(\lambda (H3: (eq C (CHead c0 (Bind Abbr) u) c2)).((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H2) in ((let H5 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H2) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H2) in (eq_ind C e1 (\lambda (c: C).((eq B Abst b1) \to ((eq T t v1) \to ((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g c c0) \to ((ty3 g c0 u t) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))))))))))) (\lambda (H7: (eq B Abst b1)).(eq_ind B Abst (\lambda (_: B).((eq T t v1) \to ((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g e1 c0) \to ((ty3 g c0 u t) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))))) (\lambda (H8: (eq T t v1)).(eq_ind T v1 (\lambda (t0: T).((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g e1 c0) \to ((ty3 g c0 u t0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))))))))) (\lambda (H9: (eq C (CHead c0 (Bind Abbr) u) c2)).(eq_ind C (CHead c0 (Bind Abbr) u) (\lambda (c: C).((csub3 g e1 c0) \to ((ty3 g c0 u v1) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))) (\lambda (H10: (csub3 g e1 c0)).(\lambda (_: (ty3 g c0 u v1)).(let H12 \def (eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind b1) v1) c)) H (CHead c0 (Bind Abbr) u) H9) in (let H13 \def (eq_ind_r B b1 (\lambda (b: B).(csub3 g (CHead e1 (Bind b) v1) (CHead c0 (Bind Abbr) u))) H12 Abst H7) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind Abbr) u) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))) Abbr c0 u (refl_equal C (CHead c0 (Bind Abbr) u)) H10))))) c2 H9)) t (sym_eq T t v1 H8))) b1 H7)) c1 (sym_eq C c1 e1 H6))) H5)) H4)) H3 H0 H1)))]) in (H0 (refl_equal C (CHead e1 (Bind b1) v1)) (refl_equal C c2)))))))). + \lambda (g: G).(\lambda (b1: B).(\lambda (e1: C).(\lambda (c2: C).(\lambda (v1: T).(\lambda (H: (csub3 g (CHead e1 (Bind b1) v1) c2)).(let H0 \def (match H return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csub3 ? c c0)).((eq C c (CHead e1 (Bind b1) v1)) \to ((eq C c0 c2) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))))) with [(csub3_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead e1 (Bind b1) v1))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead e1 (Bind b1) v1) H0) in (False_ind ((eq C (CSort n) c2) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))) H2)) H1))) | (csub3_head c1 c0 H0 k u) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u) (CHead e1 (Bind b1) v1))).(\lambda (H2: (eq C (CHead c0 k u) c2)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u) (CHead e1 (Bind b1) v1) H1) in (eq_ind C e1 (\lambda (c: C).((eq K k (Bind b1)) \to ((eq T u v1) \to ((eq C (CHead c0 k u) c2) \to ((csub3 g c c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))))) (\lambda (H6: (eq K k (Bind b1))).(eq_ind K (Bind b1) (\lambda (k0: K).((eq T u v1) \to ((eq C (CHead c0 k0 u) c2) \to ((csub3 g e1 c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))))))))) (\lambda (H7: (eq T u v1)).(eq_ind T v1 (\lambda (t: T).((eq C (CHead c0 (Bind b1) t) c2) \to ((csub3 g e1 c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))) (\lambda (H8: (eq C (CHead c0 (Bind b1) v1) c2)).(eq_ind C (CHead c0 (Bind b1) v1) (\lambda (c: C).((csub3 g e1 c0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))))))) (\lambda (H9: (csub3 g e1 c0)).(let H10 \def (eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind b1) v1) c)) H (CHead c0 (Bind b1) v1) H8) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind b1) v1) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))) b1 c0 v1 (refl_equal C (CHead c0 (Bind b1) v1)) H9))) c2 H8)) u (sym_eq T u v1 H7))) k (sym_eq K k (Bind b1) H6))) c1 (sym_eq C c1 e1 H5))) H4)) H3)) H2 H0))) | (csub3_void c1 c0 H0 b H1 u1 u2) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1))).(\lambda (H3: (eq C (CHead c0 (Bind b) u2) c2)).((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u1 | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H2) in ((let H5 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Void | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Void])])) (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H2) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Void) u1) (CHead e1 (Bind b1) v1) H2) in (eq_ind C e1 (\lambda (c: C).((eq B Void b1) \to ((eq T u1 v1) \to ((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g c c0) \to ((not (eq B b Void)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))))))))))) (\lambda (H7: (eq B Void b1)).(eq_ind B Void (\lambda (_: B).((eq T u1 v1) \to ((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g e1 c0) \to ((not (eq B b Void)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))))) (\lambda (H8: (eq T u1 v1)).(eq_ind T v1 (\lambda (_: T).((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g e1 c0) \to ((not (eq B b Void)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))))))))) (\lambda (H9: (eq C (CHead c0 (Bind b) u2) c2)).(eq_ind C (CHead c0 (Bind b) u2) (\lambda (c: C).((csub3 g e1 c0) \to ((not (eq B b Void)) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))) (\lambda (H10: (csub3 g e1 c0)).(\lambda (_: (not (eq B b Void))).(let H12 \def (eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind b1) v1) c)) H (CHead c0 (Bind b) u2) H9) in (let H13 \def (eq_ind_r B b1 (\lambda (b0: B).(csub3 g (CHead e1 (Bind b0) v1) (CHead c0 (Bind b) u2))) H12 Void H7) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind b) u2) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))) b c0 u2 (refl_equal C (CHead c0 (Bind b) u2)) H10))))) c2 H9)) u1 (sym_eq T u1 v1 H8))) b1 H7)) c1 (sym_eq C c1 e1 H6))) H5)) H4)) H3 H0 H1))) | (csub3_abst c1 c0 H0 u t H1) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1))).(\lambda (H3: (eq C (CHead c0 (Bind Abbr) u) c2)).((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H2) in ((let H5 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H2) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 (Bind Abst) t) (CHead e1 (Bind b1) v1) H2) in (eq_ind C e1 (\lambda (c: C).((eq B Abst b1) \to ((eq T t v1) \to ((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g c c0) \to ((ty3 g c0 u t) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))))))))))) (\lambda (H7: (eq B Abst b1)).(eq_ind B Abst (\lambda (_: B).((eq T t v1) \to ((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g e1 c0) \to ((ty3 g c0 u t) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))))) (\lambda (H8: (eq T t v1)).(eq_ind T v1 (\lambda (t0: T).((eq C (CHead c0 (Bind Abbr) u) c2) \to ((csub3 g e1 c0) \to ((ty3 g c0 u t0) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c2 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2))))))))) (\lambda (H9: (eq C (CHead c0 (Bind Abbr) u) c2)).(eq_ind C (CHead c0 (Bind Abbr) u) (\lambda (c: C).((csub3 g e1 c0) \to ((ty3 g c0 u v1) \to (ex2_3 B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C c (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))))))) (\lambda (H10: (csub3 g e1 c0)).(\lambda (_: (ty3 g c0 u v1)).(let H12 \def (eq_ind_r C c2 (\lambda (c: C).(csub3 g (CHead e1 (Bind b1) v1) c)) H (CHead c0 (Bind Abbr) u) H9) in (let H13 \def (eq_ind_r B b1 (\lambda (b: B).(csub3 g (CHead e1 (Bind b) v1) (CHead c0 (Bind Abbr) u))) H12 Abst H7) in (ex2_3_intro B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C (CHead c0 (Bind Abbr) u) (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g e1 e2)))) Abbr c0 u (refl_equal C (CHead c0 (Bind Abbr) u)) H10))))) c2 H9)) t (sym_eq T t v1 H8))) b1 H7)) c1 (sym_eq C c1 e1 H6))) H5)) H4)) H3 H0 H1)))]) in (H0 (refl_equal C (CHead e1 (Bind b1) v1)) (refl_equal C c2)))))))). theorem csub3_refl: \forall (g: G).(\forall (c: C).(csub3 g c c)) @@ -3016,32 +3016,32 @@ theorem csub3_refl: theorem csub3_clear_conf: \forall (g: G).(\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (e1: C).((clear c1 e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c2 e2)))))))) \def - \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csub3 g c1 c2)).(csub3_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).((clear c e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c0 e2))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (H0: (clear (CSort n) e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear (CSort n) e2))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csub3 g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: (clear (CHead c3 k u) e1)).((match k return (\lambda (_: ?).(\lambda (k0: K).((clear (CHead c3 k0 u) e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear (CHead c4 k0 u) e2)))))) with [(Bind b) \Rightarrow (\lambda (H3: (clear (CHead c3 (Bind b) u) e1)).(eq_ind_r C (CHead c3 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csub3 g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)))) (ex_intro2 C (\lambda (e2: C).(csub3 g (CHead c3 (Bind b) u) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)) (CHead c4 (Bind b) u) (csub3_head g c3 c4 H0 (Bind b) u) (clear_bind b c4 u)) e1 (clear_gen_bind b c3 e1 u H3))) | (Flat f) \Rightarrow (\lambda (H3: (clear (CHead c3 (Flat f) u) e1)).(let H4 \def (H1 e1 (clear_gen_flat f c3 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c4 e2)) (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2))) (\lambda (x: C).(\lambda (H5: (csub3 g e1 x)).(\lambda (H6: (clear c4 x)).(ex_intro2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2)) x H5 (clear_flat c4 x H6 f u))))) H4)))]) H2))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csub3 g c3 c4)).(\lambda (_: ((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (b: B).(\lambda (H2: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (e1: C).(\lambda (H3: (clear (CHead c3 (Bind Void) u1) e1)).(eq_ind_r C (CHead c3 (Bind Void) u1) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csub3 g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u2) e2)))) (ex_intro2 C (\lambda (e2: C).(csub3 g (CHead c3 (Bind Void) u1) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u2) e2)) (CHead c4 (Bind b) u2) (csub3_void g c3 c4 H0 b H2 u1 u2) (clear_bind b c4 u2)) e1 (clear_gen_bind Void c3 e1 u1 H3)))))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csub3 g c3 c4)).(\lambda (_: ((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H2: (ty3 g c4 u t)).(\lambda (e1: C).(\lambda (H3: (clear (CHead c3 (Bind Abst) t) e1)).(eq_ind_r C (CHead c3 (Bind Abst) t) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csub3 g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)))) (ex_intro2 C (\lambda (e2: C).(csub3 g (CHead c3 (Bind Abst) t) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)) (CHead c4 (Bind Abbr) u) (csub3_abst g c3 c4 H0 u t H2) (clear_bind Abbr c4 u)) e1 (clear_gen_bind Abst c3 e1 t H3))))))))))) c1 c2 H)))). + \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csub3 g c1 c2)).(csub3_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (e1: C).((clear c e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c0 e2))))))) (\lambda (n: nat).(\lambda (e1: C).(\lambda (H0: (clear (CSort n) e1)).(clear_gen_sort e1 n H0 (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear (CSort n) e2))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csub3 g c3 c4)).(\lambda (H1: ((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (k: K).(\lambda (u: T).(\lambda (e1: C).(\lambda (H2: (clear (CHead c3 k u) e1)).((match k return (\lambda (k0: K).((clear (CHead c3 k0 u) e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear (CHead c4 k0 u) e2))))) with [(Bind b) \Rightarrow (\lambda (H3: (clear (CHead c3 (Bind b) u) e1)).(eq_ind_r C (CHead c3 (Bind b) u) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csub3 g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)))) (ex_intro2 C (\lambda (e2: C).(csub3 g (CHead c3 (Bind b) u) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u) e2)) (CHead c4 (Bind b) u) (csub3_head g c3 c4 H0 (Bind b) u) (clear_bind b c4 u)) e1 (clear_gen_bind b c3 e1 u H3))) | (Flat f) \Rightarrow (\lambda (H3: (clear (CHead c3 (Flat f) u) e1)).(let H4 \def (H1 e1 (clear_gen_flat f c3 e1 u H3)) in (ex2_ind C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c4 e2)) (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2))) (\lambda (x: C).(\lambda (H5: (csub3 g e1 x)).(\lambda (H6: (clear c4 x)).(ex_intro2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear (CHead c4 (Flat f) u) e2)) x H5 (clear_flat c4 x H6 f u))))) H4)))]) H2))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csub3 g c3 c4)).(\lambda (_: ((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (b: B).(\lambda (H2: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (e1: C).(\lambda (H3: (clear (CHead c3 (Bind Void) u1) e1)).(eq_ind_r C (CHead c3 (Bind Void) u1) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csub3 g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u2) e2)))) (ex_intro2 C (\lambda (e2: C).(csub3 g (CHead c3 (Bind Void) u1) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind b) u2) e2)) (CHead c4 (Bind b) u2) (csub3_void g c3 c4 H0 b H2 u1 u2) (clear_bind b c4 u2)) e1 (clear_gen_bind Void c3 e1 u1 H3)))))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (csub3 g c3 c4)).(\lambda (_: ((\forall (e1: C).((clear c3 e1) \to (ex2 C (\lambda (e2: C).(csub3 g e1 e2)) (\lambda (e2: C).(clear c4 e2))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H2: (ty3 g c4 u t)).(\lambda (e1: C).(\lambda (H3: (clear (CHead c3 (Bind Abst) t) e1)).(eq_ind_r C (CHead c3 (Bind Abst) t) (\lambda (c: C).(ex2 C (\lambda (e2: C).(csub3 g c e2)) (\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)))) (ex_intro2 C (\lambda (e2: C).(csub3 g (CHead c3 (Bind Abst) t) e2)) (\lambda (e2: C).(clear (CHead c4 (Bind Abbr) u) e2)) (CHead c4 (Bind Abbr) u) (csub3_abst g c3 c4 H0 u t H2) (clear_bind Abbr c4 u)) e1 (clear_gen_bind Abst c3 e1 t H3))))))))))) c1 c2 H)))). theorem csub3_drop_flat: \forall (g: G).(\forall (f: F).(\forall (n: nat).(\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n O c1 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Flat f) u)))))))))))) \def - \lambda (g: G).(\lambda (f: F).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Flat f) u))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csub3 g c1 c2)).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop O O c1 (CHead d1 (Flat f) u))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csub3 g c c2)) H (CHead d1 (Flat f) u) (drop_gen_refl c1 (CHead d1 (Flat f) u) H0)) in (let H2 \def (match H1 return (\lambda (_: ?).(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead d1 (Flat f) u)) \to ((eq C c0 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))))) with [(csub3_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead d1 (Flat f) u))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Flat f) u) H0) in (False_ind ((eq C (CSort n) c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))) H2)) H1))) | (csub3_head c1 c0 H0 k u0) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u0) (CHead d1 (Flat f) u))).(\lambda (H2: (eq C (CHead c0 k u0) c2)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u0) (CHead d1 (Flat f) u) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u0) (CHead d1 (Flat f) u) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u0) (CHead d1 (Flat f) u) H1) in (eq_ind C d1 (\lambda (c: C).((eq K k (Flat f)) \to ((eq T u0 u) \to ((eq C (CHead c0 k u0) c2) \to ((csub3 g c c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))))) (\lambda (H6: (eq K k (Flat f))).(eq_ind K (Flat f) (\lambda (k0: K).((eq T u0 u) \to ((eq C (CHead c0 k0 u0) c2) \to ((csub3 g d1 c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u)))))))) (\lambda (H7: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C (CHead c0 (Flat f) t) c2) \to ((csub3 g d1 c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))) (\lambda (H8: (eq C (CHead c0 (Flat f) u) c2)).(eq_ind C (CHead c0 (Flat f) u) (\lambda (c: C).((csub3 g d1 c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Flat f) u)))))) (\lambda (H9: (csub3 g d1 c0)).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O (CHead c0 (Flat f) u) (CHead d2 (Flat f) u))) c0 H9 (drop_refl (CHead c0 (Flat f) u)))) c2 H8)) u0 (sym_eq T u0 u H7))) k (sym_eq K k (Flat f) H6))) c1 (sym_eq C c1 d1 H5))) H4)) H3)) H2 H0))) | (csub3_void c1 c0 H0 b H1 u1 u2) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Void) u1) (CHead d1 (Flat f) u))).(\lambda (H3: (eq C (CHead c0 (Bind b) u2) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Void) u1) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u) H2) in (False_ind ((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g c1 c0) \to ((not (eq B b Void)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))) H4)) H3 H0 H1))) | (csub3_abst c1 c0 H0 u0 t H1) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Abst) t) (CHead d1 (Flat f) u))).(\lambda (H3: (eq C (CHead c0 (Bind Abbr) u0) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u) H2) in (False_ind ((eq C (CHead c0 (Bind Abbr) u0) c2) \to ((csub3 g c1 c0) \to ((ty3 g c0 u0 t) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))) H4)) H3 H0 H1)))]) in (H2 (refl_equal C (CHead d1 (Flat f) u)) (refl_equal C c2)))))))))) (\lambda (n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Flat f) u)))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H0: (csub3 g c1 c2)).(csub3_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (u: T).((drop (S n0) O c (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 (CHead d2 (Flat f) u))))))))) (\lambda (n1: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H1: (drop (S n0) O (CSort n1) (CHead d1 (Flat f) u))).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (n: nat).(\lambda (n2: nat).(\lambda (c: C).(\lambda (c0: C).((eq nat n (S n0)) \to ((eq nat n2 O) \to ((eq C c (CSort n1)) \to ((eq C c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))))))))) with [(drop_refl c) \Rightarrow (\lambda (H1: (eq nat O (S n0))).(\lambda (H2: (eq nat O O)).(\lambda (H3: (eq C c (CSort n1))).(\lambda (H4: (eq C c (CHead d1 (Flat f) u))).((let H5 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n0) H1) in (False_ind ((eq nat O O) \to ((eq C c (CSort n1)) \to ((eq C c (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))) H5)) H2 H3 H4))))) | (drop_drop k h c e H1 u0) \Rightarrow (\lambda (H2: (eq nat (S h) (S n0))).(\lambda (H3: (eq nat O O)).(\lambda (H4: (eq C (CHead c k u0) (CSort n1))).(\lambda (H5: (eq C e (CHead d1 (Flat f) u))).((let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: ?).nat) with [O \Rightarrow h | (S n) \Rightarrow n])) (S h) (S n0) H2) in (eq_ind nat n0 (\lambda (n: nat).((eq nat O O) \to ((eq C (CHead c k u0) (CSort n1)) \to ((eq C e (CHead d1 (Flat f) u)) \to ((drop (r k n) O c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))))) (\lambda (_: (eq nat O O)).(\lambda (H8: (eq C (CHead c k u0) (CSort n1))).(let H9 \def (eq_ind C (CHead c k u0) (\lambda (e0: C).(match e0 return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n1) H8) in (False_ind ((eq C e (CHead d1 (Flat f) u)) \to ((drop (r k n0) O c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u)))))) H9)))) h (sym_eq nat h n0 H6))) H3 H4 H5 H1))))) | (drop_skip k h d c e H1 u0) \Rightarrow (\lambda (H2: (eq nat h (S n0))).(\lambda (H3: (eq nat (S d) O)).(\lambda (H4: (eq C (CHead c k (lift h (r k d) u0)) (CSort n1))).(\lambda (H5: (eq C (CHead e k u0) (CHead d1 (Flat f) u))).(eq_ind nat (S n0) (\lambda (n: nat).((eq nat (S d) O) \to ((eq C (CHead c k (lift n (r k d) u0)) (CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 (Flat f) u)) \to ((drop n (r k d) c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))))) (\lambda (H6: (eq nat (S d) O)).(let H7 \def (eq_ind nat (S d) (\lambda (e0: nat).(match e0 return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H6) in (False_ind ((eq C (CHead c k (lift (S n0) (r k d) u0)) (CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 (Flat f) u)) \to ((drop (S n0) (r k d) c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))) H7))) h (sym_eq nat h (S n0) H2) H3 H4 H5 H1)))))]) in (H2 (refl_equal nat (S n0)) (refl_equal nat O) (refl_equal C (CSort n1)) (refl_equal C (CHead d1 (Flat f) u)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (d1: C).(\forall (u0: T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 (Flat f) u0)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Flat f) u0))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) (CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: (csub3 g d1 x)).(\lambda (H5: (drop n0 O c3 (CHead x (Flat f) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Flat f) u0))) x H4 (drop_drop (Bind b) n0 c3 (CHead x (Flat f) u0) H5 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind b) c0 (CHead d1 (Flat f) u0) u n0 H3)))))))) (\lambda (f0: F).(\lambda (u: T).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f0) u) (CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f0) u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: (csub3 g d1 x)).(\lambda (H5: (drop (S n0) O c3 (CHead x (Flat f) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f0) u) (CHead d2 (Flat f) u0))) x H4 (drop_drop (Flat f0) n0 c3 (CHead x (Flat f) u0) H5 u))))) (H2 d1 u0 (drop_gen_drop (Flat f0) c0 (CHead d1 (Flat f) u0) u n0 H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (u: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Void) u1) (CHead d1 (Flat f) u))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) u))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Flat f) u)))) (\lambda (x: C).(\lambda (H5: (csub3 g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Flat f) u))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Flat f) u))) x H5 (drop_drop (Bind b) n0 c3 (CHead x (Flat f) u) H6 u2))))) (H c0 c3 H1 d1 u (drop_gen_drop (Bind Void) c0 (CHead d1 (Flat f) u) u1 n0 H4)))))))))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u))))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Abst) t) (CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H5: (csub3 g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Flat f) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Flat f) u0))) x H5 (drop_drop (Bind Abbr) n0 c3 (CHead x (Flat f) u0) H6 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind Abst) c0 (CHead d1 (Flat f) u0) t n0 H4))))))))))))) c1 c2 H0)))))) n))). + \lambda (g: G).(\lambda (f: F).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Flat f) u))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csub3 g c1 c2)).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop O O c1 (CHead d1 (Flat f) u))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csub3 g c c2)) H (CHead d1 (Flat f) u) (drop_gen_refl c1 (CHead d1 (Flat f) u) H0)) in (let H2 \def (match H1 return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csub3 ? c c0)).((eq C c (CHead d1 (Flat f) u)) \to ((eq C c0 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))))) with [(csub3_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead d1 (Flat f) u))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Flat f) u) H0) in (False_ind ((eq C (CSort n) c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))) H2)) H1))) | (csub3_head c1 c0 H0 k u0) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u0) (CHead d1 (Flat f) u))).(\lambda (H2: (eq C (CHead c0 k u0) c2)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u0) (CHead d1 (Flat f) u) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u0) (CHead d1 (Flat f) u) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u0) (CHead d1 (Flat f) u) H1) in (eq_ind C d1 (\lambda (c: C).((eq K k (Flat f)) \to ((eq T u0 u) \to ((eq C (CHead c0 k u0) c2) \to ((csub3 g c c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))))) (\lambda (H6: (eq K k (Flat f))).(eq_ind K (Flat f) (\lambda (k0: K).((eq T u0 u) \to ((eq C (CHead c0 k0 u0) c2) \to ((csub3 g d1 c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u)))))))) (\lambda (H7: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C (CHead c0 (Flat f) t) c2) \to ((csub3 g d1 c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))) (\lambda (H8: (eq C (CHead c0 (Flat f) u) c2)).(eq_ind C (CHead c0 (Flat f) u) (\lambda (c: C).((csub3 g d1 c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Flat f) u)))))) (\lambda (H9: (csub3 g d1 c0)).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O (CHead c0 (Flat f) u) (CHead d2 (Flat f) u))) c0 H9 (drop_refl (CHead c0 (Flat f) u)))) c2 H8)) u0 (sym_eq T u0 u H7))) k (sym_eq K k (Flat f) H6))) c1 (sym_eq C c1 d1 H5))) H4)) H3)) H2 H0))) | (csub3_void c1 c0 H0 b H1 u1 u2) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Void) u1) (CHead d1 (Flat f) u))).(\lambda (H3: (eq C (CHead c0 (Bind b) u2) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Void) u1) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u) H2) in (False_ind ((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g c1 c0) \to ((not (eq B b Void)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))) H4)) H3 H0 H1))) | (csub3_abst c1 c0 H0 u0 t H1) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Abst) t) (CHead d1 (Flat f) u))).(\lambda (H3: (eq C (CHead c0 (Bind Abbr) u0) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (CHead d1 (Flat f) u) H2) in (False_ind ((eq C (CHead c0 (Bind Abbr) u0) c2) \to ((csub3 g c1 c0) \to ((ty3 g c0 u0 t) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Flat f) u))))))) H4)) H3 H0 H1)))]) in (H2 (refl_equal C (CHead d1 (Flat f) u)) (refl_equal C c2)))))))))) (\lambda (n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Flat f) u)))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H0: (csub3 g c1 c2)).(csub3_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (u: T).((drop (S n0) O c (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 (CHead d2 (Flat f) u))))))))) (\lambda (n1: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H1: (drop (S n0) O (CSort n1) (CHead d1 (Flat f) u))).(let H2 \def (match H1 return (\lambda (n: nat).(\lambda (n2: nat).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop n n2 c c0)).((eq nat n (S n0)) \to ((eq nat n2 O) \to ((eq C c (CSort n1)) \to ((eq C c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))))))))) with [(drop_refl c) \Rightarrow (\lambda (H1: (eq nat O (S n0))).(\lambda (H2: (eq nat O O)).(\lambda (H3: (eq C c (CSort n1))).(\lambda (H4: (eq C c (CHead d1 (Flat f) u))).((let H5 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n0) H1) in (False_ind ((eq nat O O) \to ((eq C c (CSort n1)) \to ((eq C c (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))) H5)) H2 H3 H4))))) | (drop_drop k h c e H1 u0) \Rightarrow (\lambda (H2: (eq nat (S h) (S n0))).(\lambda (H3: (eq nat O O)).(\lambda (H4: (eq C (CHead c k u0) (CSort n1))).(\lambda (H5: (eq C e (CHead d1 (Flat f) u))).((let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: nat).nat) with [O \Rightarrow h | (S n) \Rightarrow n])) (S h) (S n0) H2) in (eq_ind nat n0 (\lambda (n: nat).((eq nat O O) \to ((eq C (CHead c k u0) (CSort n1)) \to ((eq C e (CHead d1 (Flat f) u)) \to ((drop (r k n) O c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))))) (\lambda (_: (eq nat O O)).(\lambda (H8: (eq C (CHead c k u0) (CSort n1))).(let H9 \def (eq_ind C (CHead c k u0) (\lambda (e0: C).(match e0 return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n1) H8) in (False_ind ((eq C e (CHead d1 (Flat f) u)) \to ((drop (r k n0) O c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u)))))) H9)))) h (sym_eq nat h n0 H6))) H3 H4 H5 H1))))) | (drop_skip k h d c e H1 u0) \Rightarrow (\lambda (H2: (eq nat h (S n0))).(\lambda (H3: (eq nat (S d) O)).(\lambda (H4: (eq C (CHead c k (lift h (r k d) u0)) (CSort n1))).(\lambda (H5: (eq C (CHead e k u0) (CHead d1 (Flat f) u))).(eq_ind nat (S n0) (\lambda (n: nat).((eq nat (S d) O) \to ((eq C (CHead c k (lift n (r k d) u0)) (CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 (Flat f) u)) \to ((drop n (r k d) c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))))) (\lambda (H6: (eq nat (S d) O)).(let H7 \def (eq_ind nat (S d) (\lambda (e0: nat).(match e0 return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H6) in (False_ind ((eq C (CHead c k (lift (S n0) (r k d) u0)) (CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 (Flat f) u)) \to ((drop (S n0) (r k d) c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Flat f) u))))))) H7))) h (sym_eq nat h (S n0) H2) H3 H4 H5 H1)))))]) in (H2 (refl_equal nat (S n0)) (refl_equal nat O) (refl_equal C (CSort n1)) (refl_equal C (CHead d1 (Flat f) u)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (d1: C).(\forall (u0: T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 (Flat f) u0)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Flat f) u0))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) (CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: (csub3 g d1 x)).(\lambda (H5: (drop n0 O c3 (CHead x (Flat f) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Flat f) u0))) x H4 (drop_drop (Bind b) n0 c3 (CHead x (Flat f) u0) H5 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind b) c0 (CHead d1 (Flat f) u0) u n0 H3)))))))) (\lambda (f0: F).(\lambda (u: T).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f0) u) (CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f0) u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H4: (csub3 g d1 x)).(\lambda (H5: (drop (S n0) O c3 (CHead x (Flat f) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f0) u) (CHead d2 (Flat f) u0))) x H4 (drop_drop (Flat f0) n0 c3 (CHead x (Flat f) u0) H5 u))))) (H2 d1 u0 (drop_gen_drop (Flat f0) c0 (CHead d1 (Flat f) u0) u n0 H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (u: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Void) u1) (CHead d1 (Flat f) u))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) u))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Flat f) u)))) (\lambda (x: C).(\lambda (H5: (csub3 g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Flat f) u))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Flat f) u))) x H5 (drop_drop (Bind b) n0 c3 (CHead x (Flat f) u) H6 u2))))) (H c0 c3 H1 d1 u (drop_gen_drop (Bind Void) c0 (CHead d1 (Flat f) u) u1 n0 H4)))))))))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Flat f) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Flat f) u))))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Abst) t) (CHead d1 (Flat f) u0))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Flat f) u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Flat f) u0)))) (\lambda (x: C).(\lambda (H5: (csub3 g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Flat f) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Flat f) u0))) x H5 (drop_drop (Bind Abbr) n0 c3 (CHead x (Flat f) u0) H6 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind Abst) c0 (CHead d1 (Flat f) u0) t n0 H4))))))))))))) c1 c2 H0)))))) n))). theorem csub3_drop_abbr: \forall (g: G).(\forall (n: nat).(\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n O c1 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u))))))))))) \def - \lambda (g: G).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abbr) u))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csub3 g c1 c2)).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop O O c1 (CHead d1 (Bind Abbr) u))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csub3 g c c2)) H (CHead d1 (Bind Abbr) u) (drop_gen_refl c1 (CHead d1 (Bind Abbr) u) H0)) in (let H2 \def (match H1 return (\lambda (_: ?).(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead d1 (Bind Abbr) u)) \to ((eq C c0 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))))))) with [(csub3_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead d1 (Bind Abbr) u))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abbr) u) H0) in (False_ind ((eq C (CSort n) c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))) H2)) H1))) | (csub3_head c1 c0 H0 k u0) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u0) (CHead d1 (Bind Abbr) u))).(\lambda (H2: (eq C (CHead c0 k u0) c2)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u0) (CHead d1 (Bind Abbr) u) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u0) (CHead d1 (Bind Abbr) u) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u0) (CHead d1 (Bind Abbr) u) H1) in (eq_ind C d1 (\lambda (c: C).((eq K k (Bind Abbr)) \to ((eq T u0 u) \to ((eq C (CHead c0 k u0) c2) \to ((csub3 g c c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))))))) (\lambda (H6: (eq K k (Bind Abbr))).(eq_ind K (Bind Abbr) (\lambda (k0: K).((eq T u0 u) \to ((eq C (CHead c0 k0 u0) c2) \to ((csub3 g d1 c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u)))))))) (\lambda (H7: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C (CHead c0 (Bind Abbr) t) c2) \to ((csub3 g d1 c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))))) (\lambda (H8: (eq C (CHead c0 (Bind Abbr) u) c2)).(eq_ind C (CHead c0 (Bind Abbr) u) (\lambda (c: C).((csub3 g d1 c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abbr) u)))))) (\lambda (H9: (csub3 g d1 c0)).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O (CHead c0 (Bind Abbr) u) (CHead d2 (Bind Abbr) u))) c0 H9 (drop_refl (CHead c0 (Bind Abbr) u)))) c2 H8)) u0 (sym_eq T u0 u H7))) k (sym_eq K k (Bind Abbr) H6))) c1 (sym_eq C c1 d1 H5))) H4)) H3)) H2 H0))) | (csub3_void c1 c0 H0 b H1 u1 u2) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Void) u1) (CHead d1 (Bind Abbr) u))).(\lambda (H3: (eq C (CHead c0 (Bind b) u2) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Void) u1) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H2) in (False_ind ((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g c1 c0) \to ((not (eq B b Void)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))))) H4)) H3 H0 H1))) | (csub3_abst c1 c0 H0 u0 t H1) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abbr) u))).(\lambda (H3: (eq C (CHead c0 (Bind Abbr) u0) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H2) in (False_ind ((eq C (CHead c0 (Bind Abbr) u0) c2) \to ((csub3 g c1 c0) \to ((ty3 g c0 u0 t) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))))) H4)) H3 H0 H1)))]) in (H2 (refl_equal C (CHead d1 (Bind Abbr) u)) (refl_equal C c2)))))))))) (\lambda (n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H0: (csub3 g c1 c2)).(csub3_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (u: T).((drop (S n0) O c (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 (CHead d2 (Bind Abbr) u))))))))) (\lambda (n1: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H1: (drop (S n0) O (CSort n1) (CHead d1 (Bind Abbr) u))).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (n: nat).(\lambda (n2: nat).(\lambda (c: C).(\lambda (c0: C).((eq nat n (S n0)) \to ((eq nat n2 O) \to ((eq C c (CSort n1)) \to ((eq C c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))))))))) with [(drop_refl c) \Rightarrow (\lambda (H1: (eq nat O (S n0))).(\lambda (H2: (eq nat O O)).(\lambda (H3: (eq C c (CSort n1))).(\lambda (H4: (eq C c (CHead d1 (Bind Abbr) u))).((let H5 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n0) H1) in (False_ind ((eq nat O O) \to ((eq C c (CSort n1)) \to ((eq C c (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))) H5)) H2 H3 H4))))) | (drop_drop k h c e H1 u0) \Rightarrow (\lambda (H2: (eq nat (S h) (S n0))).(\lambda (H3: (eq nat O O)).(\lambda (H4: (eq C (CHead c k u0) (CSort n1))).(\lambda (H5: (eq C e (CHead d1 (Bind Abbr) u))).((let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: ?).nat) with [O \Rightarrow h | (S n) \Rightarrow n])) (S h) (S n0) H2) in (eq_ind nat n0 (\lambda (n: nat).((eq nat O O) \to ((eq C (CHead c k u0) (CSort n1)) \to ((eq C e (CHead d1 (Bind Abbr) u)) \to ((drop (r k n) O c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))))) (\lambda (_: (eq nat O O)).(\lambda (H8: (eq C (CHead c k u0) (CSort n1))).(let H9 \def (eq_ind C (CHead c k u0) (\lambda (e0: C).(match e0 return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n1) H8) in (False_ind ((eq C e (CHead d1 (Bind Abbr) u)) \to ((drop (r k n0) O c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))))) H9)))) h (sym_eq nat h n0 H6))) H3 H4 H5 H1))))) | (drop_skip k h d c e H1 u0) \Rightarrow (\lambda (H2: (eq nat h (S n0))).(\lambda (H3: (eq nat (S d) O)).(\lambda (H4: (eq C (CHead c k (lift h (r k d) u0)) (CSort n1))).(\lambda (H5: (eq C (CHead e k u0) (CHead d1 (Bind Abbr) u))).(eq_ind nat (S n0) (\lambda (n: nat).((eq nat (S d) O) \to ((eq C (CHead c k (lift n (r k d) u0)) (CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 (Bind Abbr) u)) \to ((drop n (r k d) c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))))) (\lambda (H6: (eq nat (S d) O)).(let H7 \def (eq_ind nat (S d) (\lambda (e0: nat).(match e0 return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H6) in (False_ind ((eq C (CHead c k (lift (S n0) (r k d) u0)) (CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 (Bind Abbr) u)) \to ((drop (S n0) (r k d) c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))) H7))) h (sym_eq nat h (S n0) H2) H3 H4 H5 H1)))))]) in (H2 (refl_equal nat (S n0)) (refl_equal nat O) (refl_equal C (CSort n1)) (refl_equal C (CHead d1 (Bind Abbr) u)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (d1: C).(\forall (u0: T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 (Bind Abbr) u0)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind Abbr) u0))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) (CHead d1 (Bind Abbr) u0))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abbr) u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (x: C).(\lambda (H4: (csub3 g d1 x)).(\lambda (H5: (drop n0 O c3 (CHead x (Bind Abbr) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0))) x H4 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abbr) u0) H5 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind b) c0 (CHead d1 (Bind Abbr) u0) u n0 H3)))))))) (\lambda (f: F).(\lambda (u: T).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f) u) (CHead d1 (Bind Abbr) u0))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (x: C).(\lambda (H4: (csub3 g d1 x)).(\lambda (H5: (drop (S n0) O c3 (CHead x (Bind Abbr) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0))) x H4 (drop_drop (Flat f) n0 c3 (CHead x (Bind Abbr) u0) H5 u))))) (H2 d1 u0 (drop_gen_drop (Flat f) c0 (CHead d1 (Bind Abbr) u0) u n0 H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (u: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Void) u1) (CHead d1 (Bind Abbr) u))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (x: C).(\lambda (H5: (csub3 g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u))) x H5 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abbr) u) H6 u2))))) (H c0 c3 H1 d1 u (drop_gen_drop (Bind Void) c0 (CHead d1 (Bind Abbr) u) u1 n0 H4)))))))))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u))))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Abst) t) (CHead d1 (Bind Abbr) u0))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abbr) u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (x: C).(\lambda (H5: (csub3 g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Bind Abbr) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0))) x H5 (drop_drop (Bind Abbr) n0 c3 (CHead x (Bind Abbr) u0) H6 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind Abst) c0 (CHead d1 (Bind Abbr) u0) t n0 H4))))))))))))) c1 c2 H0)))))) n)). + \lambda (g: G).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abbr) u))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csub3 g c1 c2)).(\lambda (d1: C).(\lambda (u: T).(\lambda (H0: (drop O O c1 (CHead d1 (Bind Abbr) u))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csub3 g c c2)) H (CHead d1 (Bind Abbr) u) (drop_gen_refl c1 (CHead d1 (Bind Abbr) u) H0)) in (let H2 \def (match H1 return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csub3 ? c c0)).((eq C c (CHead d1 (Bind Abbr) u)) \to ((eq C c0 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))))))) with [(csub3_sort n) \Rightarrow (\lambda (H0: (eq C (CSort n) (CHead d1 (Bind Abbr) u))).(\lambda (H1: (eq C (CSort n) c2)).((let H2 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abbr) u) H0) in (False_ind ((eq C (CSort n) c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))) H2)) H1))) | (csub3_head c1 c0 H0 k u0) \Rightarrow (\lambda (H1: (eq C (CHead c1 k u0) (CHead d1 (Bind Abbr) u))).(\lambda (H2: (eq C (CHead c0 k u0) c2)).((let H3 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead c1 k u0) (CHead d1 (Bind Abbr) u) H1) in ((let H4 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c1 k u0) (CHead d1 (Bind Abbr) u) H1) in ((let H5 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c _ _) \Rightarrow c])) (CHead c1 k u0) (CHead d1 (Bind Abbr) u) H1) in (eq_ind C d1 (\lambda (c: C).((eq K k (Bind Abbr)) \to ((eq T u0 u) \to ((eq C (CHead c0 k u0) c2) \to ((csub3 g c c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))))))) (\lambda (H6: (eq K k (Bind Abbr))).(eq_ind K (Bind Abbr) (\lambda (k0: K).((eq T u0 u) \to ((eq C (CHead c0 k0 u0) c2) \to ((csub3 g d1 c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u)))))))) (\lambda (H7: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((eq C (CHead c0 (Bind Abbr) t) c2) \to ((csub3 g d1 c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))))) (\lambda (H8: (eq C (CHead c0 (Bind Abbr) u) c2)).(eq_ind C (CHead c0 (Bind Abbr) u) (\lambda (c: C).((csub3 g d1 c0) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abbr) u)))))) (\lambda (H9: (csub3 g d1 c0)).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O (CHead c0 (Bind Abbr) u) (CHead d2 (Bind Abbr) u))) c0 H9 (drop_refl (CHead c0 (Bind Abbr) u)))) c2 H8)) u0 (sym_eq T u0 u H7))) k (sym_eq K k (Bind Abbr) H6))) c1 (sym_eq C c1 d1 H5))) H4)) H3)) H2 H0))) | (csub3_void c1 c0 H0 b H1 u1 u2) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Void) u1) (CHead d1 (Bind Abbr) u))).(\lambda (H3: (eq C (CHead c0 (Bind b) u2) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Void) u1) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H2) in (False_ind ((eq C (CHead c0 (Bind b) u2) c2) \to ((csub3 g c1 c0) \to ((not (eq B b Void)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))))) H4)) H3 H0 H1))) | (csub3_abst c1 c0 H0 u0 t H1) \Rightarrow (\lambda (H2: (eq C (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abbr) u))).(\lambda (H3: (eq C (CHead c0 (Bind Abbr) u0) c2)).((let H4 \def (eq_ind C (CHead c1 (Bind Abst) t) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abbr) u) H2) in (False_ind ((eq C (CHead c0 (Bind Abbr) u0) c2) \to ((csub3 g c1 c0) \to ((ty3 g c0 u0 t) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abbr) u))))))) H4)) H3 H0 H1)))]) in (H2 (refl_equal C (CHead d1 (Bind Abbr) u)) (refl_equal C c2)))))))))) (\lambda (n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (u: T).((drop n0 O c1 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H0: (csub3 g c1 c2)).(csub3_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (u: T).((drop (S n0) O c (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 (CHead d2 (Bind Abbr) u))))))))) (\lambda (n1: nat).(\lambda (d1: C).(\lambda (u: T).(\lambda (H1: (drop (S n0) O (CSort n1) (CHead d1 (Bind Abbr) u))).(let H2 \def (match H1 return (\lambda (n: nat).(\lambda (n2: nat).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop n n2 c c0)).((eq nat n (S n0)) \to ((eq nat n2 O) \to ((eq C c (CSort n1)) \to ((eq C c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))))))))) with [(drop_refl c) \Rightarrow (\lambda (H1: (eq nat O (S n0))).(\lambda (H2: (eq nat O O)).(\lambda (H3: (eq C c (CSort n1))).(\lambda (H4: (eq C c (CHead d1 (Bind Abbr) u))).((let H5 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n0) H1) in (False_ind ((eq nat O O) \to ((eq C c (CSort n1)) \to ((eq C c (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))) H5)) H2 H3 H4))))) | (drop_drop k h c e H1 u0) \Rightarrow (\lambda (H2: (eq nat (S h) (S n0))).(\lambda (H3: (eq nat O O)).(\lambda (H4: (eq C (CHead c k u0) (CSort n1))).(\lambda (H5: (eq C e (CHead d1 (Bind Abbr) u))).((let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: nat).nat) with [O \Rightarrow h | (S n) \Rightarrow n])) (S h) (S n0) H2) in (eq_ind nat n0 (\lambda (n: nat).((eq nat O O) \to ((eq C (CHead c k u0) (CSort n1)) \to ((eq C e (CHead d1 (Bind Abbr) u)) \to ((drop (r k n) O c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))))) (\lambda (_: (eq nat O O)).(\lambda (H8: (eq C (CHead c k u0) (CSort n1))).(let H9 \def (eq_ind C (CHead c k u0) (\lambda (e0: C).(match e0 return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n1) H8) in (False_ind ((eq C e (CHead d1 (Bind Abbr) u)) \to ((drop (r k n0) O c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))))) H9)))) h (sym_eq nat h n0 H6))) H3 H4 H5 H1))))) | (drop_skip k h d c e H1 u0) \Rightarrow (\lambda (H2: (eq nat h (S n0))).(\lambda (H3: (eq nat (S d) O)).(\lambda (H4: (eq C (CHead c k (lift h (r k d) u0)) (CSort n1))).(\lambda (H5: (eq C (CHead e k u0) (CHead d1 (Bind Abbr) u))).(eq_ind nat (S n0) (\lambda (n: nat).((eq nat (S d) O) \to ((eq C (CHead c k (lift n (r k d) u0)) (CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 (Bind Abbr) u)) \to ((drop n (r k d) c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))))) (\lambda (H6: (eq nat (S d) O)).(let H7 \def (eq_ind nat (S d) (\lambda (e0: nat).(match e0 return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H6) in (False_ind ((eq C (CHead c k (lift (S n0) (r k d) u0)) (CSort n1)) \to ((eq C (CHead e k u0) (CHead d1 (Bind Abbr) u)) \to ((drop (S n0) (r k d) c e) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u))))))) H7))) h (sym_eq nat h (S n0) H2) H3 H4 H5 H1)))))]) in (H2 (refl_equal nat (S n0)) (refl_equal nat O) (refl_equal C (CSort n1)) (refl_equal C (CHead d1 (Bind Abbr) u)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (d1: C).(\forall (u0: T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 (Bind Abbr) u0)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind Abbr) u0))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) (CHead d1 (Bind Abbr) u0))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abbr) u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (x: C).(\lambda (H4: (csub3 g d1 x)).(\lambda (H5: (drop n0 O c3 (CHead x (Bind Abbr) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0))) x H4 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abbr) u0) H5 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind b) c0 (CHead d1 (Bind Abbr) u0) u n0 H3)))))))) (\lambda (f: F).(\lambda (u: T).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f) u) (CHead d1 (Bind Abbr) u0))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (x: C).(\lambda (H4: (csub3 g d1 x)).(\lambda (H5: (drop (S n0) O c3 (CHead x (Bind Abbr) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0))) x H4 (drop_drop (Flat f) n0 c3 (CHead x (Bind Abbr) u0) H5 u))))) (H2 d1 u0 (drop_gen_drop (Flat f) c0 (CHead d1 (Bind Abbr) u0) u n0 H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (u: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Void) u1) (CHead d1 (Bind Abbr) u))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (x: C).(\lambda (H5: (csub3 g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u))) x H5 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abbr) u) H6 u2))))) (H c0 c3 H1 d1 u (drop_gen_drop (Bind Void) c0 (CHead d1 (Bind Abbr) u) u1 n0 H4)))))))))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (u: T).((drop (S n0) O c0 (CHead d1 (Bind Abbr) u)) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u))))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: C).(\lambda (u0: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Abst) t) (CHead d1 (Bind Abbr) u0))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abbr) u0))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (x: C).(\lambda (H5: (csub3 g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Bind Abbr) u0))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0))) x H5 (drop_drop (Bind Abbr) n0 c3 (CHead x (Bind Abbr) u0) H6 u))))) (H c0 c3 H1 d1 u0 (drop_gen_drop (Bind Abst) c0 (CHead d1 (Bind Abbr) u0) t n0 H4))))))))))))) c1 c2 H0)))))) n)). theorem csub3_drop_abst: \forall (g: G).(\forall (n: nat).(\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (t: T).((drop n O c1 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))) \def - \lambda (g: G).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (t: T).((drop n0 O c1 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csub3 g c1 c2)).(\lambda (d1: C).(\lambda (t: T).(\lambda (H0: (drop O O c1 (CHead d1 (Bind Abst) t))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csub3 g c c2)) H (CHead d1 (Bind Abst) t) (drop_gen_refl c1 (CHead d1 (Bind Abst) t) H0)) in (let H2 \def (match H1 return (\lambda (_: ?).(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead d1 (Bind Abst) t)) \to ((eq C c0 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) with [(csub3_sort n) \Rightarrow (\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Abst) t))).(\lambda (H2: (eq C (CSort n) c2)).((let H3 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abst) t) H1) in (False_ind ((eq C (CSort n) c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))) H3)) H2))) | (csub3_head c0 c3 H1 k u) \Rightarrow (\lambda (H2: (eq C (CHead c0 k u) (CHead d1 (Bind Abst) t))).(\lambda (H3: (eq C (CHead c3 k u) c2)).((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c0 k u) (CHead d1 (Bind Abst) t) H2) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: ?).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c0 k u) (CHead d1 (Bind Abst) t) H2) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k u) (CHead d1 (Bind Abst) t) H2) in (eq_ind C d1 (\lambda (c: C).((eq K k (Bind Abst)) \to ((eq T u t) \to ((eq C (CHead c3 k u) c2) \to ((csub3 g c c3) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (H7: (eq K k (Bind Abst))).(eq_ind K (Bind Abst) (\lambda (k0: K).((eq T u t) \to ((eq C (CHead c3 k0 u) c2) \to ((csub3 g d1 c3) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))))))) (\lambda (H8: (eq T u t)).(eq_ind T t (\lambda (t0: T).((eq C (CHead c3 (Bind Abst) t0) c2) \to ((csub3 g d1 c3) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))) (\lambda (H9: (eq C (CHead c3 (Bind Abst) t) c2)).(eq_ind C (CHead c3 (Bind Abst) t) (\lambda (c: C).((csub3 g d1 c3) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))))) (\lambda (H10: (csub3 g d1 c3)).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O (CHead c3 (Bind Abst) t) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O (CHead c3 (Bind Abst) t) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O (CHead c3 (Bind Abst) t) (CHead d2 (Bind Abst) t))) c3 H10 (drop_refl (CHead c3 (Bind Abst) t))))) c2 H9)) u (sym_eq T u t H8))) k (sym_eq K k (Bind Abst) H7))) c0 (sym_eq C c0 d1 H6))) H5)) H4)) H3 H1))) | (csub3_void c0 c3 H1 b H2 u1 u2) \Rightarrow (\lambda (H3: (eq C (CHead c0 (Bind Void) u1) (CHead d1 (Bind Abst) t))).(\lambda (H4: (eq C (CHead c3 (Bind b) u2) c2)).((let H5 \def (eq_ind C (CHead c0 (Bind Void) u1) (\lambda (e: C).(match e return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abst) t) H3) in (False_ind ((eq C (CHead c3 (Bind b) u2) c2) \to ((csub3 g c0 c3) \to ((not (eq B b Void)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))) H5)) H4 H1 H2))) | (csub3_abst c0 c3 H1 u t0 H2) \Rightarrow (\lambda (H3: (eq C (CHead c0 (Bind Abst) t0) (CHead d1 (Bind Abst) t))).(\lambda (H4: (eq C (CHead c3 (Bind Abbr) u) c2)).((let H5 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow t0 | (CHead _ _ t) \Rightarrow t])) (CHead c0 (Bind Abst) t0) (CHead d1 (Bind Abst) t) H3) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 (Bind Abst) t0) (CHead d1 (Bind Abst) t) H3) in (eq_ind C d1 (\lambda (c: C).((eq T t0 t) \to ((eq C (CHead c3 (Bind Abbr) u) c2) \to ((csub3 g c c3) \to ((ty3 g c3 u t0) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (H7: (eq T t0 t)).(eq_ind T t (\lambda (t1: T).((eq C (CHead c3 (Bind Abbr) u) c2) \to ((csub3 g d1 c3) \to ((ty3 g c3 u t1) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))))))) (\lambda (H8: (eq C (CHead c3 (Bind Abbr) u) c2)).(eq_ind C (CHead c3 (Bind Abbr) u) (\lambda (c: C).((csub3 g d1 c3) \to ((ty3 g c3 u t) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))) (\lambda (H9: (csub3 g d1 c3)).(\lambda (H10: (ty3 g c3 u t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) c3 u H9 (drop_refl (CHead c3 (Bind Abbr) u)) H10)))) c2 H8)) t0 (sym_eq T t0 t H7))) c0 (sym_eq C c0 d1 H6))) H5)) H4 H1 H2)))]) in (H2 (refl_equal C (CHead d1 (Bind Abst) t)) (refl_equal C c2)))))))))) (\lambda (n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (t: T).((drop n0 O c1 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H0: (csub3 g c1 c2)).(csub3_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (t: T).((drop (S n0) O c (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c0 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (n1: nat).(\lambda (d1: C).(\lambda (t: T).(\lambda (H1: (drop (S n0) O (CSort n1) (CHead d1 (Bind Abst) t))).(let H2 \def (match H1 return (\lambda (_: ?).(\lambda (n: nat).(\lambda (n2: nat).(\lambda (c: C).(\lambda (c0: C).((eq nat n (S n0)) \to ((eq nat n2 O) \to ((eq C c (CSort n1)) \to ((eq C c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))))) with [(drop_refl c) \Rightarrow (\lambda (H1: (eq nat O (S n0))).(\lambda (H2: (eq nat O O)).(\lambda (H3: (eq C c (CSort n1))).(\lambda (H4: (eq C c (CHead d1 (Bind Abst) t))).((let H5 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: ?).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n0) H1) in (False_ind ((eq nat O O) \to ((eq C c (CSort n1)) \to ((eq C c (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))) H5)) H2 H3 H4))))) | (drop_drop k h c e H1 u) \Rightarrow (\lambda (H2: (eq nat (S h) (S n0))).(\lambda (H3: (eq nat O O)).(\lambda (H4: (eq C (CHead c k u) (CSort n1))).(\lambda (H5: (eq C e (CHead d1 (Bind Abst) t))).((let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: ?).nat) with [O \Rightarrow h | (S n) \Rightarrow n])) (S h) (S n0) H2) in (eq_ind nat n0 (\lambda (n: nat).((eq nat O O) \to ((eq C (CHead c k u) (CSort n1)) \to ((eq C e (CHead d1 (Bind Abst) t)) \to ((drop (r k n) O c e) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (_: (eq nat O O)).(\lambda (H8: (eq C (CHead c k u) (CSort n1))).(let H9 \def (eq_ind C (CHead c k u) (\lambda (e0: C).(match e0 return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n1) H8) in (False_ind ((eq C e (CHead d1 (Bind Abst) t)) \to ((drop (r k n0) O c e) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))))) H9)))) h (sym_eq nat h n0 H6))) H3 H4 H5 H1))))) | (drop_skip k h d c e H1 u) \Rightarrow (\lambda (H2: (eq nat h (S n0))).(\lambda (H3: (eq nat (S d) O)).(\lambda (H4: (eq C (CHead c k (lift h (r k d) u)) (CSort n1))).(\lambda (H5: (eq C (CHead e k u) (CHead d1 (Bind Abst) t))).(eq_ind nat (S n0) (\lambda (n: nat).((eq nat (S d) O) \to ((eq C (CHead c k (lift n (r k d) u)) (CSort n1)) \to ((eq C (CHead e k u) (CHead d1 (Bind Abst) t)) \to ((drop n (r k d) c e) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (H6: (eq nat (S d) O)).(let H7 \def (eq_ind nat (S d) (\lambda (e0: nat).(match e0 return (\lambda (_: ?).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H6) in (False_ind ((eq C (CHead c k (lift (S n0) (r k d) u)) (CSort n1)) \to ((eq C (CHead e k u) (CHead d1 (Bind Abst) t)) \to ((drop (S n0) (r k d) c e) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))) H7))) h (sym_eq nat h (S n0) H2) H3 H4 H5 H1)))))]) in (H2 (refl_equal nat (S n0)) (refl_equal nat O) (refl_equal C (CSort n1)) (refl_equal C (CHead d1 (Bind Abst) t)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall (t: T).((drop (S n0) O c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (d1: C).(\forall (t: T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: C).(\lambda (t: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) (CHead d1 (Bind Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (H4: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x: C).(\lambda (H5: (csub3 g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t))) x H5 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abst) t) H6 u)))))) H4)) (\lambda (H4: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (csub3 g d1 x0)).(\lambda (H6: (drop n0 O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H7: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) x0 x1 H5 (drop_drop (Bind b) n0 c3 (CHead x0 (Bind Abbr) x1) H6 u) H7))))))) H4)) (H c0 c3 H1 d1 t (drop_gen_drop (Bind b) c0 (CHead d1 (Bind Abst) t) u n0 H3)))))))) (\lambda (f: F).(\lambda (u: T).(\lambda (d1: C).(\lambda (t: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f) u) (CHead d1 (Bind Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (H4: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x: C).(\lambda (H5: (csub3 g d1 x)).(\lambda (H6: (drop (S n0) O c3 (CHead x (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t))) x H5 (drop_drop (Flat f) n0 c3 (CHead x (Bind Abst) t) H6 u)))))) H4)) (\lambda (H4: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (csub3 g d1 x0)).(\lambda (H6: (drop (S n0) O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H7: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) x0 x1 H5 (drop_drop (Flat f) n0 c3 (CHead x0 (Bind Abbr) x1) H6 u) H7))))))) H4)) (H2 d1 t (drop_gen_drop (Flat f) c0 (CHead d1 (Bind Abst) t) u n0 H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (t: T).((drop (S n0) O c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (t: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Void) u1) (CHead d1 (Bind Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H5: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x: C).(\lambda (H6: (csub3 g d1 x)).(\lambda (H7: (drop n0 O c3 (CHead x (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t))) x H6 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abst) t) H7 u2)))))) H5)) (\lambda (H5: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (csub3 g d1 x0)).(\lambda (H7: (drop n0 O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H8: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x0 x1 H6 (drop_drop (Bind b) n0 c3 (CHead x0 (Bind Abbr) x1) H7 u2) H8))))))) H5)) (H c0 c3 H1 d1 t (drop_gen_drop (Bind Void) c0 (CHead d1 (Bind Abst) t) u1 n0 H4)))))))))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (t: T).((drop (S n0) O c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: C).(\lambda (t0: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Abst) t) (CHead d1 (Bind Abst) t0))).(or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))))) (\lambda (H5: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t0))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t0))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))))) (\lambda (x: C).(\lambda (H6: (csub3 g d1 x)).(\lambda (H7: (drop n0 O c3 (CHead x (Bind Abst) t0))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0))) x H6 (drop_drop (Bind Abbr) n0 c3 (CHead x (Bind Abst) t0) H7 u)))))) H5)) (\lambda (H5: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t0))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (csub3 g d1 x0)).(\lambda (H7: (drop n0 O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H8: (ty3 g x0 x1 t0)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))) x0 x1 H6 (drop_drop (Bind Abbr) n0 c3 (CHead x0 (Bind Abbr) x1) H7 u) H8))))))) H5)) (H c0 c3 H1 d1 t0 (drop_gen_drop (Bind Abst) c0 (CHead d1 (Bind Abst) t0) t n0 H4))))))))))))) c1 c2 H0)))))) n)). + \lambda (g: G).(\lambda (n: nat).(nat_ind (\lambda (n0: nat).(\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (t: T).((drop n0 O c1 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (csub3 g c1 c2)).(\lambda (d1: C).(\lambda (t: T).(\lambda (H0: (drop O O c1 (CHead d1 (Bind Abst) t))).(let H1 \def (eq_ind C c1 (\lambda (c: C).(csub3 g c c2)) H (CHead d1 (Bind Abst) t) (drop_gen_refl c1 (CHead d1 (Bind Abst) t) H0)) in (let H2 \def (match H1 return (\lambda (c: C).(\lambda (c0: C).(\lambda (_: (csub3 ? c c0)).((eq C c (CHead d1 (Bind Abst) t)) \to ((eq C c0 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) with [(csub3_sort n) \Rightarrow (\lambda (H1: (eq C (CSort n) (CHead d1 (Bind Abst) t))).(\lambda (H2: (eq C (CSort n) c2)).((let H3 \def (eq_ind C (CSort n) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead d1 (Bind Abst) t) H1) in (False_ind ((eq C (CSort n) c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))) H3)) H2))) | (csub3_head c0 c3 H1 k u) \Rightarrow (\lambda (H2: (eq C (CHead c0 k u) (CHead d1 (Bind Abst) t))).(\lambda (H3: (eq C (CHead c3 k u) c2)).((let H4 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead c0 k u) (CHead d1 (Bind Abst) t) H2) in ((let H5 \def (f_equal C K (\lambda (e: C).(match e return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) \Rightarrow k])) (CHead c0 k u) (CHead d1 (Bind Abst) t) H2) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 k u) (CHead d1 (Bind Abst) t) H2) in (eq_ind C d1 (\lambda (c: C).((eq K k (Bind Abst)) \to ((eq T u t) \to ((eq C (CHead c3 k u) c2) \to ((csub3 g c c3) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (H7: (eq K k (Bind Abst))).(eq_ind K (Bind Abst) (\lambda (k0: K).((eq T u t) \to ((eq C (CHead c3 k0 u) c2) \to ((csub3 g d1 c3) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))))))) (\lambda (H8: (eq T u t)).(eq_ind T t (\lambda (t0: T).((eq C (CHead c3 (Bind Abst) t0) c2) \to ((csub3 g d1 c3) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))) (\lambda (H9: (eq C (CHead c3 (Bind Abst) t) c2)).(eq_ind C (CHead c3 (Bind Abst) t) (\lambda (c: C).((csub3 g d1 c3) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))))) (\lambda (H10: (csub3 g d1 c3)).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O (CHead c3 (Bind Abst) t) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O (CHead c3 (Bind Abst) t) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O (CHead c3 (Bind Abst) t) (CHead d2 (Bind Abst) t))) c3 H10 (drop_refl (CHead c3 (Bind Abst) t))))) c2 H9)) u (sym_eq T u t H8))) k (sym_eq K k (Bind Abst) H7))) c0 (sym_eq C c0 d1 H6))) H5)) H4)) H3 H1))) | (csub3_void c0 c3 H1 b H2 u1 u2) \Rightarrow (\lambda (H3: (eq C (CHead c0 (Bind Void) u1) (CHead d1 (Bind Abst) t))).(\lambda (H4: (eq C (CHead c3 (Bind b) u2) c2)).((let H5 \def (eq_ind C (CHead c0 (Bind Void) u1) (\lambda (e: C).(match e return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead d1 (Bind Abst) t) H3) in (False_ind ((eq C (CHead c3 (Bind b) u2) c2) \to ((csub3 g c0 c3) \to ((not (eq B b Void)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop O O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))) H5)) H4 H1 H2))) | (csub3_abst c0 c3 H1 u t0 H2) \Rightarrow (\lambda (H3: (eq C (CHead c0 (Bind Abst) t0) (CHead d1 (Bind Abst) t))).(\lambda (H4: (eq C (CHead c3 (Bind Abbr) u) c2)).((let H5 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow t0 | (CHead _ _ t) \Rightarrow t])) (CHead c0 (Bind Abst) t0) (CHead d1 (Bind Abst) t) H3) in ((let H6 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 (Bind Abst) t0) (CHead d1 (Bind Abst) t) H3) in (eq_ind C d1 (\lambda (c: C).((eq T t0 t) \to ((eq C (CHead c3 (Bind Abbr) u) c2) \to ((csub3 g c c3) \to ((ty3 g c3 u t0) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (H7: (eq T t0 t)).(eq_ind T t (\lambda (t1: T).((eq C (CHead c3 (Bind Abbr) u) c2) \to ((csub3 g d1 c3) \to ((ty3 g c3 u t1) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c2 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))))))) (\lambda (H8: (eq C (CHead c3 (Bind Abbr) u) c2)).(eq_ind C (CHead c3 (Bind Abbr) u) (\lambda (c: C).((csub3 g d1 c3) \to ((ty3 g c3 u t) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O c (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O c (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))) (\lambda (H9: (csub3 g d1 c3)).(\lambda (H10: (ty3 g c3 u t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop O O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop O O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) c3 u H9 (drop_refl (CHead c3 (Bind Abbr) u)) H10)))) c2 H8)) t0 (sym_eq T t0 t H7))) c0 (sym_eq C c0 d1 H6))) H5)) H4 H1 H2)))]) in (H2 (refl_equal C (CHead d1 (Bind Abst) t)) (refl_equal C c2)))))))))) (\lambda (n0: nat).(\lambda (H: ((\forall (c1: C).(\forall (c2: C).((csub3 g c1 c2) \to (\forall (d1: C).(\forall (t: T).((drop n0 O c1 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H0: (csub3 g c1 c2)).(csub3_ind g (\lambda (c: C).(\lambda (c0: C).(\forall (d1: C).(\forall (t: T).((drop (S n0) O c (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c0 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c0 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (n1: nat).(\lambda (d1: C).(\lambda (t: T).(\lambda (H1: (drop (S n0) O (CSort n1) (CHead d1 (Bind Abst) t))).(let H2 \def (match H1 return (\lambda (n: nat).(\lambda (n2: nat).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop n n2 c c0)).((eq nat n (S n0)) \to ((eq nat n2 O) \to ((eq C c (CSort n1)) \to ((eq C c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))))) with [(drop_refl c) \Rightarrow (\lambda (H1: (eq nat O (S n0))).(\lambda (H2: (eq nat O O)).(\lambda (H3: (eq C c (CSort n1))).(\lambda (H4: (eq C c (CHead d1 (Bind Abst) t))).((let H5 \def (eq_ind nat O (\lambda (e: nat).(match e return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S n0) H1) in (False_ind ((eq nat O O) \to ((eq C c (CSort n1)) \to ((eq C c (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))) H5)) H2 H3 H4))))) | (drop_drop k h c e H1 u) \Rightarrow (\lambda (H2: (eq nat (S h) (S n0))).(\lambda (H3: (eq nat O O)).(\lambda (H4: (eq C (CHead c k u) (CSort n1))).(\lambda (H5: (eq C e (CHead d1 (Bind Abst) t))).((let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 return (\lambda (_: nat).nat) with [O \Rightarrow h | (S n) \Rightarrow n])) (S h) (S n0) H2) in (eq_ind nat n0 (\lambda (n: nat).((eq nat O O) \to ((eq C (CHead c k u) (CSort n1)) \to ((eq C e (CHead d1 (Bind Abst) t)) \to ((drop (r k n) O c e) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (_: (eq nat O O)).(\lambda (H8: (eq C (CHead c k u) (CSort n1))).(let H9 \def (eq_ind C (CHead c k u) (\lambda (e0: C).(match e0 return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n1) H8) in (False_ind ((eq C e (CHead d1 (Bind Abst) t)) \to ((drop (r k n0) O c e) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))))) H9)))) h (sym_eq nat h n0 H6))) H3 H4 H5 H1))))) | (drop_skip k h d c e H1 u) \Rightarrow (\lambda (H2: (eq nat h (S n0))).(\lambda (H3: (eq nat (S d) O)).(\lambda (H4: (eq C (CHead c k (lift h (r k d) u)) (CSort n1))).(\lambda (H5: (eq C (CHead e k u) (CHead d1 (Bind Abst) t))).(eq_ind nat (S n0) (\lambda (n: nat).((eq nat (S d) O) \to ((eq C (CHead c k (lift n (r k d) u)) (CSort n1)) \to ((eq C (CHead e k u) (CHead d1 (Bind Abst) t)) \to ((drop n (r k d) c e) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (H6: (eq nat (S d) O)).(let H7 \def (eq_ind nat (S d) (\lambda (e0: nat).(match e0 return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H6) in (False_ind ((eq C (CHead c k (lift (S n0) (r k d) u)) (CSort n1)) \to ((eq C (CHead e k u) (CHead d1 (Bind Abst) t)) \to ((drop (S n0) (r k d) c e) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CSort n1) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))) H7))) h (sym_eq nat h (S n0) H2) H3 H4 H5 H1)))))]) in (H2 (refl_equal nat (S n0)) (refl_equal nat O) (refl_equal C (CSort n1)) (refl_equal C (CHead d1 (Bind Abst) t)))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (H2: ((\forall (d1: C).(\forall (t: T).((drop (S n0) O c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (u: T).(\forall (d1: C).(\forall (t: T).((drop (S n0) O (CHead c0 k0 u) (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 k0 u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))))))))) (\lambda (b: B).(\lambda (u: T).(\lambda (d1: C).(\lambda (t: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Bind b) u) (CHead d1 (Bind Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (H4: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x: C).(\lambda (H5: (csub3 g d1 x)).(\lambda (H6: (drop n0 O c3 (CHead x (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t))) x H5 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abst) t) H6 u)))))) H4)) (\lambda (H4: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (csub3 g d1 x0)).(\lambda (H6: (drop n0 O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H7: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind b) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) x0 x1 H5 (drop_drop (Bind b) n0 c3 (CHead x0 (Bind Abbr) x1) H6 u) H7))))))) H4)) (H c0 c3 H1 d1 t (drop_gen_drop (Bind b) c0 (CHead d1 (Bind Abst) t) u n0 H3)))))))) (\lambda (f: F).(\lambda (u: T).(\lambda (d1: C).(\lambda (t: T).(\lambda (H3: (drop (S n0) O (CHead c0 (Flat f) u) (CHead d1 (Bind Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (H4: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x: C).(\lambda (H5: (csub3 g d1 x)).(\lambda (H6: (drop (S n0) O c3 (CHead x (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t))) x H5 (drop_drop (Flat f) n0 c3 (CHead x (Bind Abst) t) H6 u)))))) H4)) (\lambda (H4: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (csub3 g d1 x0)).(\lambda (H6: (drop (S n0) O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H7: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Flat f) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t))) x0 x1 H5 (drop_drop (Flat f) n0 c3 (CHead x0 (Bind Abbr) x1) H6 u) H7))))))) H4)) (H2 d1 t (drop_gen_drop (Flat f) c0 (CHead d1 (Bind Abst) t) u n0 H3)))))))) k)))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (t: T).((drop (S n0) O c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))).(\lambda (b: B).(\lambda (_: (not (eq B b Void))).(\lambda (u1: T).(\lambda (u2: T).(\lambda (d1: C).(\lambda (t: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Void) u1) (CHead d1 (Bind Abst) t))).(or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H5: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x: C).(\lambda (H6: (csub3 g d1 x)).(\lambda (H7: (drop n0 O c3 (CHead x (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t))) x H6 (drop_drop (Bind b) n0 c3 (CHead x (Bind Abst) t) H7 u2)))))) H5)) (\lambda (H5: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (csub3 g d1 x0)).(\lambda (H7: (drop n0 O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H8: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O (CHead c3 (Bind b) u2) (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x0 x1 H6 (drop_drop (Bind b) n0 c3 (CHead x0 (Bind Abbr) x1) H7 u2) H8))))))) H5)) (H c0 c3 H1 d1 t (drop_gen_drop (Bind Void) c0 (CHead d1 (Bind Abst) t) u1 n0 H4)))))))))))))) (\lambda (c0: C).(\lambda (c3: C).(\lambda (H1: (csub3 g c0 c3)).(\lambda (_: ((\forall (d1: C).(\forall (t: T).((drop (S n0) O c0 (CHead d1 (Bind Abst) t)) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O c3 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop (S n0) O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c3 u t)).(\lambda (d1: C).(\lambda (t0: T).(\lambda (H4: (drop (S n0) O (CHead c0 (Bind Abst) t) (CHead d1 (Bind Abst) t0))).(or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))))) (\lambda (H5: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t0))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n0 O c3 (CHead d2 (Bind Abst) t0))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))))) (\lambda (x: C).(\lambda (H6: (csub3 g d1 x)).(\lambda (H7: (drop n0 O c3 (CHead x (Bind Abst) t0))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0))) x H6 (drop_drop (Bind Abbr) n0 c3 (CHead x (Bind Abst) t0) H7 u)))))) H5)) (\lambda (H5: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t0))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop n0 O c3 (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (csub3 g d1 x0)).(\lambda (H7: (drop n0 O c3 (CHead x0 (Bind Abbr) x1))).(\lambda (H8: (ty3 g x0 x1 t0)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abst) t0)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u0: T).(drop (S n0) O (CHead c3 (Bind Abbr) u) (CHead d2 (Bind Abbr) u0)))) (\lambda (d2: C).(\lambda (u0: T).(ty3 g d2 u0 t0))) x0 x1 H6 (drop_drop (Bind Abbr) n0 c3 (CHead x0 (Bind Abbr) x1) H7 u) H8))))))) H5)) (H c0 c3 H1 d1 t0 (drop_gen_drop (Bind Abst) c0 (CHead d1 (Bind Abst) t0) t n0 H4))))))))))))) c1 c2 H0)))))) n)). theorem csub3_getl_abbr: \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (u: T).(\forall (n: nat).((getl n c1 (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))))))))))) \def - \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda (n: nat).(\lambda (H: (getl n c1 (CHead d1 (Bind Abbr) u))).(let H0 \def (getl_gen_all c1 (CHead d1 (Bind Abbr) u) n H) in (ex2_ind C (\lambda (e: C).(drop n O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u))) (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))) (\lambda (x: C).(\lambda (H1: (drop n O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind Abbr) u))).((match x return (\lambda (_: ?).(\lambda (c: C).((drop n O c1 c) \to ((clear c (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))))))) with [(CSort n0) \Rightarrow (\lambda (_: (drop n O c1 (CSort n0))).(\lambda (H4: (clear (CSort n0) (CHead d1 (Bind Abbr) u))).(clear_gen_sort (CHead d1 (Bind Abbr) u) n0 H4 (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))))))))) | (CHead c k t) \Rightarrow (\lambda (H3: (drop n O c1 (CHead c k t))).(\lambda (H4: (clear (CHead c k t) (CHead d1 (Bind Abbr) u))).((match k return (\lambda (_: ?).(\lambda (k0: K).((drop n O c1 (CHead c k0 t)) \to ((clear (CHead c k0 t) (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))))))) with [(Bind b) \Rightarrow (\lambda (H5: (drop n O c1 (CHead c (Bind b) t))).(\lambda (H6: (clear (CHead c (Bind b) t) (CHead d1 (Bind Abbr) u))).(let H7 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t H6)) in (\lambda (H10: (eq B Abbr b)).(\lambda (H11: (eq C d1 c)).(\lambda (c2: C).(\lambda (H12: (csub3 g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda (t: T).(drop n O c1 (CHead c (Bind b) t))) H5 u H9) in (let H14 \def (eq_ind_r B b (\lambda (b: B).(drop n O c1 (CHead c (Bind b) u))) H13 Abbr H10) in (let H15 \def (eq_ind_r C c (\lambda (c: C).(drop n O c1 (CHead c (Bind Abbr) u))) H14 d1 H11) in (ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x0: C).(\lambda (H16: (csub3 g d1 x0)).(\lambda (H17: (drop n O c2 (CHead x0 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) x0 H16 (getl_intro n c2 (CHead x0 (Bind Abbr) u) (CHead x0 (Bind Abbr) u) H17 (clear_bind Abbr x0 u)))))) (csub3_drop_abbr g n c1 c2 H12 d1 u H15)))))))))) H8)) H7)))) | (Flat f) \Rightarrow (\lambda (H5: (drop n O c1 (CHead c (Flat f) t))).(\lambda (H6: (clear (CHead c (Flat f) t) (CHead d1 (Bind Abbr) u))).(let H7 \def H5 in (unintro C c1 (\lambda (c0: C).((drop n O c0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csub3 g c0 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))))) (nat_ind (\lambda (n0: nat).(\forall (x0: C).((drop n0 O x0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csub3 g x0 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abbr) u))))))))) (\lambda (x0: C).(\lambda (H8: (drop O O x0 (CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csub3 g x0 c2)).(let H10 \def (eq_ind C x0 (\lambda (c: C).(csub3 g c c2)) H9 (CHead c (Flat f) t) (drop_gen_refl x0 (CHead c (Flat f) t) H8)) in (let H_y \def (clear_flat c (CHead d1 (Bind Abbr) u) (clear_gen_flat f c (CHead d1 (Bind Abbr) u) t H6) f t) in (let H11 \def (csub3_clear_conf g (CHead c (Flat f) t) c2 H10 (CHead d1 (Bind Abbr) u) H_y) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead d1 (Bind Abbr) u) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x1: C).(\lambda (H12: (csub3 g (CHead d1 (Bind Abbr) u) x1)).(\lambda (H13: (clear c2 x1)).(let H14 \def (csub3_gen_abbr g d1 x1 u H12) in (ex2_ind C (\lambda (e2: C).(eq C x1 (CHead e2 (Bind Abbr) u))) (\lambda (e2: C).(csub3 g d1 e2)) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x2: C).(\lambda (H15: (eq C x1 (CHead x2 (Bind Abbr) u))).(\lambda (H16: (csub3 g d1 x2)).(let H17 \def (eq_ind C x1 (\lambda (c: C).(clear c2 c)) H13 (CHead x2 (Bind Abbr) u) H15) in (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u))) x2 H16 (getl_intro O c2 (CHead x2 (Bind Abbr) u) c2 (drop_refl c2) H17)))))) H14))))) H11)))))))) (\lambda (n0: nat).(\lambda (H8: ((\forall (x: C).((drop n0 O x (CHead c (Flat f) t)) \to (\forall (c2: C).((csub3 g x c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abbr) u)))))))))).(\lambda (x0: C).(\lambda (H9: (drop (S n0) O x0 (CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csub3 g x0 c2)).(let H11 \def (drop_clear x0 (CHead c (Flat f) t) n0 H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x0 (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n0 O e (CHead c (Flat f) t))))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x1: B).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (clear x0 (CHead x2 (Bind x1) x3))).(\lambda (H13: (drop n0 O x2 (CHead c (Flat f) t))).(let H14 \def (csub3_clear_conf g x0 c2 H10 (CHead x2 (Bind x1) x3) H12) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead x2 (Bind x1) x3) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x4: C).(\lambda (H15: (csub3 g (CHead x2 (Bind x1) x3) x4)).(\lambda (H16: (clear c2 x4)).(let H17 \def (csub3_gen_bind g x1 x2 x4 x3 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x4 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g x2 e2)))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x5: B).(\lambda (x6: C).(\lambda (x7: T).(\lambda (H18: (eq C x4 (CHead x6 (Bind x5) x7))).(\lambda (H19: (csub3 g x2 x6)).(let H20 \def (eq_ind C x4 (\lambda (c: C).(clear c2 c)) H16 (CHead x6 (Bind x5) x7) H18) in (let H21 \def (H8 x2 H13 x6 H19) in (ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 x6 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x8: C).(\lambda (H22: (csub3 g d1 x8)).(\lambda (H23: (getl n0 x6 (CHead x8 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u))) x8 H22 (getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abbr) u) n0 H23))))) H21)))))))) H17))))) H14))))))) H11)))))))) n) H7))))]) H3 H4)))]) H1 H2)))) H0))))))). + \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (u: T).(\lambda (n: nat).(\lambda (H: (getl n c1 (CHead d1 (Bind Abbr) u))).(let H0 \def (getl_gen_all c1 (CHead d1 (Bind Abbr) u) n H) in (ex2_ind C (\lambda (e: C).(drop n O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abbr) u))) (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))) (\lambda (x: C).(\lambda (H1: (drop n O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind Abbr) u))).((match x return (\lambda (c: C).((drop n O c1 c) \to ((clear c (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))))))))) with [(CSort n0) \Rightarrow (\lambda (_: (drop n O c1 (CSort n0))).(\lambda (H4: (clear (CSort n0) (CHead d1 (Bind Abbr) u))).(clear_gen_sort (CHead d1 (Bind Abbr) u) n0 H4 (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))))))))) | (CHead c k t) \Rightarrow (\lambda (H3: (drop n O c1 (CHead c k t))).(\lambda (H4: (clear (CHead c k t) (CHead d1 (Bind Abbr) u))).((match k return (\lambda (k0: K).((drop n O c1 (CHead c k0 t)) \to ((clear (CHead c k0 t) (CHead d1 (Bind Abbr) u)) \to (\forall (c2: C).((csub3 g c1 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))))))))) with [(Bind b) \Rightarrow (\lambda (H5: (drop n O c1 (CHead c (Bind b) t))).(\lambda (H6: (clear (CHead c (Bind b) t) (CHead d1 (Bind Abbr) u))).(let H7 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (CHead d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind Abbr) u) (CHead c (Bind b) t) (clear_gen_bind b c (CHead d1 (Bind Abbr) u) t H6)) in (\lambda (H10: (eq B Abbr b)).(\lambda (H11: (eq C d1 c)).(\lambda (c2: C).(\lambda (H12: (csub3 g c1 c2)).(let H13 \def (eq_ind_r T t (\lambda (t: T).(drop n O c1 (CHead c (Bind b) t))) H5 u H9) in (let H14 \def (eq_ind_r B b (\lambda (b: B).(drop n O c1 (CHead c (Bind b) u))) H13 Abbr H10) in (let H15 \def (eq_ind_r C c (\lambda (c: C).(drop n O c1 (CHead c (Bind Abbr) u))) H14 d1 H11) in (ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x0: C).(\lambda (H16: (csub3 g d1 x0)).(\lambda (H17: (drop n O c2 (CHead x0 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) x0 H16 (getl_intro n c2 (CHead x0 (Bind Abbr) u) (CHead x0 (Bind Abbr) u) H17 (clear_bind Abbr x0 u)))))) (csub3_drop_abbr g n c1 c2 H12 d1 u H15)))))))))) H8)) H7)))) | (Flat f) \Rightarrow (\lambda (H5: (drop n O c1 (CHead c (Flat f) t))).(\lambda (H6: (clear (CHead c (Flat f) t) (CHead d1 (Bind Abbr) u))).(let H7 \def H5 in (unintro C c1 (\lambda (c0: C).((drop n O c0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csub3 g c0 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u)))))))) (nat_ind (\lambda (n0: nat).(\forall (x0: C).((drop n0 O x0 (CHead c (Flat f) t)) \to (\forall (c2: C).((csub3 g x0 c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abbr) u))))))))) (\lambda (x0: C).(\lambda (H8: (drop O O x0 (CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H9: (csub3 g x0 c2)).(let H10 \def (eq_ind C x0 (\lambda (c: C).(csub3 g c c2)) H9 (CHead c (Flat f) t) (drop_gen_refl x0 (CHead c (Flat f) t) H8)) in (let H_y \def (clear_flat c (CHead d1 (Bind Abbr) u) (clear_gen_flat f c (CHead d1 (Bind Abbr) u) t H6) f t) in (let H11 \def (csub3_clear_conf g (CHead c (Flat f) t) c2 H10 (CHead d1 (Bind Abbr) u) H_y) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead d1 (Bind Abbr) u) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x1: C).(\lambda (H12: (csub3 g (CHead d1 (Bind Abbr) u) x1)).(\lambda (H13: (clear c2 x1)).(let H14 \def (csub3_gen_abbr g d1 x1 u H12) in (ex2_ind C (\lambda (e2: C).(eq C x1 (CHead e2 (Bind Abbr) u))) (\lambda (e2: C).(csub3 g d1 e2)) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x2: C).(\lambda (H15: (eq C x1 (CHead x2 (Bind Abbr) u))).(\lambda (H16: (csub3 g d1 x2)).(let H17 \def (eq_ind C x1 (\lambda (c: C).(clear c2 c)) H13 (CHead x2 (Bind Abbr) u) H15) in (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abbr) u))) x2 H16 (getl_intro O c2 (CHead x2 (Bind Abbr) u) c2 (drop_refl c2) H17)))))) H14))))) H11)))))))) (\lambda (n0: nat).(\lambda (H8: ((\forall (x: C).((drop n0 O x (CHead c (Flat f) t)) \to (\forall (c2: C).((csub3 g x c2) \to (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abbr) u)))))))))).(\lambda (x0: C).(\lambda (H9: (drop (S n0) O x0 (CHead c (Flat f) t))).(\lambda (c2: C).(\lambda (H10: (csub3 g x0 c2)).(let H11 \def (drop_clear x0 (CHead c (Flat f) t) n0 H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x0 (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n0 O e (CHead c (Flat f) t))))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x1: B).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (clear x0 (CHead x2 (Bind x1) x3))).(\lambda (H13: (drop n0 O x2 (CHead c (Flat f) t))).(let H14 \def (csub3_clear_conf g x0 c2 H10 (CHead x2 (Bind x1) x3) H12) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead x2 (Bind x1) x3) e2)) (\lambda (e2: C).(clear c2 e2)) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x4: C).(\lambda (H15: (csub3 g (CHead x2 (Bind x1) x3) x4)).(\lambda (H16: (clear c2 x4)).(let H17 \def (csub3_gen_bind g x1 x2 x4 x3 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x4 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g x2 e2)))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x5: B).(\lambda (x6: C).(\lambda (x7: T).(\lambda (H18: (eq C x4 (CHead x6 (Bind x5) x7))).(\lambda (H19: (csub3 g x2 x6)).(let H20 \def (eq_ind C x4 (\lambda (c: C).(clear c2 c)) H16 (CHead x6 (Bind x5) x7) H18) in (let H21 \def (H8 x2 H13 x6 H19) in (ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 x6 (CHead d2 (Bind Abbr) u))) (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (x8: C).(\lambda (H22: (csub3 g d1 x8)).(\lambda (H23: (getl n0 x6 (CHead x8 (Bind Abbr) u))).(ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abbr) u))) x8 H22 (getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abbr) u) n0 H23))))) H21)))))))) H17))))) H14))))))) H11)))))))) n) H7))))]) H3 H4)))]) H1 H2)))) H0))))))). theorem csub3_getl_abst: \forall (g: G).(\forall (c1: C).(\forall (d1: C).(\forall (t: T).(\forall (n: nat).((getl n c1 (CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))))) \def - \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (t: T).(\lambda (n: nat).(\lambda (H: (getl n c1 (CHead d1 (Bind Abst) t))).(let H0 \def (getl_gen_all c1 (CHead d1 (Bind Abst) t) n H) in (ex2_ind C (\lambda (e: C).(drop n O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abst) t))) (\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))) (\lambda (x: C).(\lambda (H1: (drop n O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind Abst) t))).((match x return (\lambda (_: ?).(\lambda (c: C).((drop n O c1 c) \to ((clear c (CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))))) with [(CSort n0) \Rightarrow (\lambda (_: (drop n O c1 (CSort n0))).(\lambda (H4: (clear (CSort n0) (CHead d1 (Bind Abst) t))).(clear_gen_sort (CHead d1 (Bind Abst) t) n0 H4 (\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) | (CHead c k t0) \Rightarrow (\lambda (H3: (drop n O c1 (CHead c k t0))).(\lambda (H4: (clear (CHead c k t0) (CHead d1 (Bind Abst) t))).((match k return (\lambda (_: ?).(\lambda (k0: K).((drop n O c1 (CHead c k0 t0)) \to ((clear (CHead c k0 t0) (CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))))) with [(Bind b) \Rightarrow (\lambda (H5: (drop n O c1 (CHead c (Bind b) t0))).(\lambda (H6: (clear (CHead c (Bind b) t0) (CHead d1 (Bind Abst) t))).(let H7 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abst) t) (CHead c (Bind b) t0) (clear_gen_bind b c (CHead d1 (Bind Abst) t) t0 H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d1 (Bind Abst) t) (CHead c (Bind b) t0) (clear_gen_bind b c (CHead d1 (Bind Abst) t) t0 H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind Abst) t) (CHead c (Bind b) t0) (clear_gen_bind b c (CHead d1 (Bind Abst) t) t0 H6)) in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq C d1 c)).(\lambda (c2: C).(\lambda (H12: (csub3 g c1 c2)).(let H13 \def (eq_ind_r T t0 (\lambda (t: T).(drop n O c1 (CHead c (Bind b) t))) H5 t H9) in (let H14 \def (eq_ind_r B b (\lambda (b: B).(drop n O c1 (CHead c (Bind b) t))) H13 Abst H10) in (let H15 \def (eq_ind_r C c (\lambda (c: C).(drop n O c1 (CHead c (Bind Abst) t))) H14 d1 H11) in (or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H16: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x0: C).(\lambda (H17: (csub3 g d1 x0)).(\lambda (H18: (drop n O c2 (CHead x0 (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t))) x0 H17 (getl_intro n c2 (CHead x0 (Bind Abst) t) (CHead x0 (Bind Abst) t) H18 (clear_bind Abst x0 t))))))) H16)) (\lambda (H16: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H17: (csub3 g d1 x0)).(\lambda (H18: (drop n O c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H19: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x0 x1 H17 (getl_intro n c2 (CHead x0 (Bind Abbr) x1) (CHead x0 (Bind Abbr) x1) H18 (clear_bind Abbr x0 x1)) H19))))))) H16)) (csub3_drop_abst g n c1 c2 H12 d1 t H15)))))))))) H8)) H7)))) | (Flat f) \Rightarrow (\lambda (H5: (drop n O c1 (CHead c (Flat f) t0))).(\lambda (H6: (clear (CHead c (Flat f) t0) (CHead d1 (Bind Abst) t))).(let H7 \def H5 in (unintro C c1 (\lambda (c0: C).((drop n O c0 (CHead c (Flat f) t0)) \to (\forall (c2: C).((csub3 g c0 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))) (nat_ind (\lambda (n0: nat).(\forall (x0: C).((drop n0 O x0 (CHead c (Flat f) t0)) \to (\forall (c2: C).((csub3 g x0 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (x0: C).(\lambda (H8: (drop O O x0 (CHead c (Flat f) t0))).(\lambda (c2: C).(\lambda (H9: (csub3 g x0 c2)).(let H10 \def (eq_ind C x0 (\lambda (c: C).(csub3 g c c2)) H9 (CHead c (Flat f) t0) (drop_gen_refl x0 (CHead c (Flat f) t0) H8)) in (let H_y \def (clear_flat c (CHead d1 (Bind Abst) t) (clear_gen_flat f c (CHead d1 (Bind Abst) t) t0 H6) f t0) in (let H11 \def (csub3_clear_conf g (CHead c (Flat f) t0) c2 H10 (CHead d1 (Bind Abst) t) H_y) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead d1 (Bind Abst) t) e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x1: C).(\lambda (H12: (csub3 g (CHead d1 (Bind Abst) t) x1)).(\lambda (H13: (clear c2 x1)).(let H14 \def (csub3_gen_abst g d1 x1 t H12) in (or_ind (ex2 C (\lambda (e2: C).(eq C x1 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csub3 g d1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C x1 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g d1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H15: (ex2 C (\lambda (e2: C).(eq C x1 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csub3 g d1 e2)))).(ex2_ind C (\lambda (e2: C).(eq C x1 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csub3 g d1 e2)) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x2: C).(\lambda (H16: (eq C x1 (CHead x2 (Bind Abst) t))).(\lambda (H17: (csub3 g d1 x2)).(let H18 \def (eq_ind C x1 (\lambda (c: C).(clear c2 c)) H13 (CHead x2 (Bind Abst) t) H16) in (or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t))) x2 H17 (getl_intro O c2 (CHead x2 (Bind Abst) t) c2 (drop_refl c2) H18))))))) H15)) (\lambda (H15: (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C x1 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g d1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 t))))).(ex3_2_ind C T (\lambda (e2: C).(\lambda (v2: T).(eq C x1 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g d1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (H16: (eq C x1 (CHead x2 (Bind Abbr) x3))).(\lambda (H17: (csub3 g d1 x2)).(\lambda (H18: (ty3 g x2 x3 t)).(let H19 \def (eq_ind C x1 (\lambda (c: C).(clear c2 c)) H13 (CHead x2 (Bind Abbr) x3) H16) in (or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x2 x3 H17 (getl_intro O c2 (CHead x2 (Bind Abbr) x3) c2 (drop_refl c2) H19) H18)))))))) H15)) H14))))) H11)))))))) (\lambda (n0: nat).(\lambda (H8: ((\forall (x: C).((drop n0 O x (CHead c (Flat f) t0)) \to (\forall (c2: C).((csub3 g x c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))))).(\lambda (x0: C).(\lambda (H9: (drop (S n0) O x0 (CHead c (Flat f) t0))).(\lambda (c2: C).(\lambda (H10: (csub3 g x0 c2)).(let H11 \def (drop_clear x0 (CHead c (Flat f) t0) n0 H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x0 (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n0 O e (CHead c (Flat f) t0))))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x1: B).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (clear x0 (CHead x2 (Bind x1) x3))).(\lambda (H13: (drop n0 O x2 (CHead c (Flat f) t0))).(let H14 \def (csub3_clear_conf g x0 c2 H10 (CHead x2 (Bind x1) x3) H12) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead x2 (Bind x1) x3) e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x4: C).(\lambda (H15: (csub3 g (CHead x2 (Bind x1) x3) x4)).(\lambda (H16: (clear c2 x4)).(let H17 \def (csub3_gen_bind g x1 x2 x4 x3 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x4 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g x2 e2)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x5: B).(\lambda (x6: C).(\lambda (x7: T).(\lambda (H18: (eq C x4 (CHead x6 (Bind x5) x7))).(\lambda (H19: (csub3 g x2 x6)).(let H20 \def (eq_ind C x4 (\lambda (c: C).(clear c2 c)) H16 (CHead x6 (Bind x5) x7) H18) in (let H21 \def (H8 x2 H13 x6 H19) in (or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 x6 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 x6 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H22: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 x6 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 x6 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x8: C).(\lambda (H23: (csub3 g d1 x8)).(\lambda (H24: (getl n0 x6 (CHead x8 (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t))) x8 H23 (getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abst) t) n0 H24)))))) H22)) (\lambda (H22: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 x6 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 x6 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x8: C).(\lambda (x9: T).(\lambda (H23: (csub3 g d1 x8)).(\lambda (H24: (getl n0 x6 (CHead x8 (Bind Abbr) x9))).(\lambda (H25: (ty3 g x8 x9 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x8 x9 H23 (getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abbr) x9) n0 H24) H25))))))) H22)) H21)))))))) H17))))) H14))))))) H11)))))))) n) H7))))]) H3 H4)))]) H1 H2)))) H0))))))). + \lambda (g: G).(\lambda (c1: C).(\lambda (d1: C).(\lambda (t: T).(\lambda (n: nat).(\lambda (H: (getl n c1 (CHead d1 (Bind Abst) t))).(let H0 \def (getl_gen_all c1 (CHead d1 (Bind Abst) t) n H) in (ex2_ind C (\lambda (e: C).(drop n O c1 e)) (\lambda (e: C).(clear e (CHead d1 (Bind Abst) t))) (\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))) (\lambda (x: C).(\lambda (H1: (drop n O c1 x)).(\lambda (H2: (clear x (CHead d1 (Bind Abst) t))).((match x return (\lambda (c: C).((drop n O c1 c) \to ((clear c (CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) with [(CSort n0) \Rightarrow (\lambda (_: (drop n O c1 (CSort n0))).(\lambda (H4: (clear (CSort n0) (CHead d1 (Bind Abst) t))).(clear_gen_sort (CHead d1 (Bind Abst) t) n0 H4 (\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) | (CHead c k t0) \Rightarrow (\lambda (H3: (drop n O c1 (CHead c k t0))).(\lambda (H4: (clear (CHead c k t0) (CHead d1 (Bind Abst) t))).((match k return (\lambda (k0: K).((drop n O c1 (CHead c k0 t0)) \to ((clear (CHead c k0 t0) (CHead d1 (Bind Abst) t)) \to (\forall (c2: C).((csub3 g c1 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) with [(Bind b) \Rightarrow (\lambda (H5: (drop n O c1 (CHead c (Bind b) t0))).(\lambda (H6: (clear (CHead c (Bind b) t0) (CHead d1 (Bind Abst) t))).(let H7 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d1 | (CHead c _ _) \Rightarrow c])) (CHead d1 (Bind Abst) t) (CHead c (Bind b) t0) (clear_gen_bind b c (CHead d1 (Bind Abst) t) t0 H6)) in ((let H8 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abst])])) (CHead d1 (Bind Abst) t) (CHead c (Bind b) t0) (clear_gen_bind b c (CHead d1 (Bind Abst) t) t0 H6)) in ((let H9 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | (CHead _ _ t) \Rightarrow t])) (CHead d1 (Bind Abst) t) (CHead c (Bind b) t0) (clear_gen_bind b c (CHead d1 (Bind Abst) t) t0 H6)) in (\lambda (H10: (eq B Abst b)).(\lambda (H11: (eq C d1 c)).(\lambda (c2: C).(\lambda (H12: (csub3 g c1 c2)).(let H13 \def (eq_ind_r T t0 (\lambda (t: T).(drop n O c1 (CHead c (Bind b) t))) H5 t H9) in (let H14 \def (eq_ind_r B b (\lambda (b: B).(drop n O c1 (CHead c (Bind b) t))) H13 Abst H10) in (let H15 \def (eq_ind_r C c (\lambda (c: C).(drop n O c1 (CHead c (Bind Abst) t))) H14 d1 H11) in (or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H16: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(drop n O c2 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x0: C).(\lambda (H17: (csub3 g d1 x0)).(\lambda (H18: (drop n O c2 (CHead x0 (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t))) x0 H17 (getl_intro n c2 (CHead x0 (Bind Abst) t) (CHead x0 (Bind Abst) t) H18 (clear_bind Abst x0 t))))))) H16)) (\lambda (H16: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(drop n O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H17: (csub3 g d1 x0)).(\lambda (H18: (drop n O c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H19: (ty3 g x0 x1 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x0 x1 H17 (getl_intro n c2 (CHead x0 (Bind Abbr) x1) (CHead x0 (Bind Abbr) x1) H18 (clear_bind Abbr x0 x1)) H19))))))) H16)) (csub3_drop_abst g n c1 c2 H12 d1 t H15)))))))))) H8)) H7)))) | (Flat f) \Rightarrow (\lambda (H5: (drop n O c1 (CHead c (Flat f) t0))).(\lambda (H6: (clear (CHead c (Flat f) t0) (CHead d1 (Bind Abst) t))).(let H7 \def H5 in (unintro C c1 (\lambda (c0: C).((drop n O c0 (CHead c (Flat f) t0)) \to (\forall (c2: C).((csub3 g c0 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))) (nat_ind (\lambda (n0: nat).(\forall (x0: C).((drop n0 O x0 (CHead c (Flat f) t0)) \to (\forall (c2: C).((csub3 g x0 c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))))))))) (\lambda (x0: C).(\lambda (H8: (drop O O x0 (CHead c (Flat f) t0))).(\lambda (c2: C).(\lambda (H9: (csub3 g x0 c2)).(let H10 \def (eq_ind C x0 (\lambda (c: C).(csub3 g c c2)) H9 (CHead c (Flat f) t0) (drop_gen_refl x0 (CHead c (Flat f) t0) H8)) in (let H_y \def (clear_flat c (CHead d1 (Bind Abst) t) (clear_gen_flat f c (CHead d1 (Bind Abst) t) t0 H6) f t0) in (let H11 \def (csub3_clear_conf g (CHead c (Flat f) t0) c2 H10 (CHead d1 (Bind Abst) t) H_y) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead d1 (Bind Abst) t) e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x1: C).(\lambda (H12: (csub3 g (CHead d1 (Bind Abst) t) x1)).(\lambda (H13: (clear c2 x1)).(let H14 \def (csub3_gen_abst g d1 x1 t H12) in (or_ind (ex2 C (\lambda (e2: C).(eq C x1 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csub3 g d1 e2))) (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C x1 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g d1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H15: (ex2 C (\lambda (e2: C).(eq C x1 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csub3 g d1 e2)))).(ex2_ind C (\lambda (e2: C).(eq C x1 (CHead e2 (Bind Abst) t))) (\lambda (e2: C).(csub3 g d1 e2)) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x2: C).(\lambda (H16: (eq C x1 (CHead x2 (Bind Abst) t))).(\lambda (H17: (csub3 g d1 x2)).(let H18 \def (eq_ind C x1 (\lambda (c: C).(clear c2 c)) H13 (CHead x2 (Bind Abst) t) H16) in (or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t))) x2 H17 (getl_intro O c2 (CHead x2 (Bind Abst) t) c2 (drop_refl c2) H18))))))) H15)) (\lambda (H15: (ex3_2 C T (\lambda (e2: C).(\lambda (v2: T).(eq C x1 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g d1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 t))))).(ex3_2_ind C T (\lambda (e2: C).(\lambda (v2: T).(eq C x1 (CHead e2 (Bind Abbr) v2)))) (\lambda (e2: C).(\lambda (_: T).(csub3 g d1 e2))) (\lambda (e2: C).(\lambda (v2: T).(ty3 g e2 v2 t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x2: C).(\lambda (x3: T).(\lambda (H16: (eq C x1 (CHead x2 (Bind Abbr) x3))).(\lambda (H17: (csub3 g d1 x2)).(\lambda (H18: (ty3 g x2 x3 t)).(let H19 \def (eq_ind C x1 (\lambda (c: C).(clear c2 c)) H13 (CHead x2 (Bind Abbr) x3) H16) in (or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl O c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl O c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x2 x3 H17 (getl_intro O c2 (CHead x2 (Bind Abbr) x3) c2 (drop_refl c2) H19) H18)))))))) H15)) H14))))) H11)))))))) (\lambda (n0: nat).(\lambda (H8: ((\forall (x: C).((drop n0 O x (CHead c (Flat f) t0)) \to (\forall (c2: C).((csub3 g x c2) \to (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))))))))).(\lambda (x0: C).(\lambda (H9: (drop (S n0) O x0 (CHead c (Flat f) t0))).(\lambda (c2: C).(\lambda (H10: (csub3 g x0 c2)).(let H11 \def (drop_clear x0 (CHead c (Flat f) t0) n0 H9) in (ex2_3_ind B C T (\lambda (b: B).(\lambda (e: C).(\lambda (v: T).(clear x0 (CHead e (Bind b) v))))) (\lambda (_: B).(\lambda (e: C).(\lambda (_: T).(drop n0 O e (CHead c (Flat f) t0))))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x1: B).(\lambda (x2: C).(\lambda (x3: T).(\lambda (H12: (clear x0 (CHead x2 (Bind x1) x3))).(\lambda (H13: (drop n0 O x2 (CHead c (Flat f) t0))).(let H14 \def (csub3_clear_conf g x0 c2 H10 (CHead x2 (Bind x1) x3) H12) in (ex2_ind C (\lambda (e2: C).(csub3 g (CHead x2 (Bind x1) x3) e2)) (\lambda (e2: C).(clear c2 e2)) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x4: C).(\lambda (H15: (csub3 g (CHead x2 (Bind x1) x3) x4)).(\lambda (H16: (clear c2 x4)).(let H17 \def (csub3_gen_bind g x1 x2 x4 x3 H15) in (ex2_3_ind B C T (\lambda (b2: B).(\lambda (e2: C).(\lambda (v2: T).(eq C x4 (CHead e2 (Bind b2) v2))))) (\lambda (_: B).(\lambda (e2: C).(\lambda (_: T).(csub3 g x2 e2)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x5: B).(\lambda (x6: C).(\lambda (x7: T).(\lambda (H18: (eq C x4 (CHead x6 (Bind x5) x7))).(\lambda (H19: (csub3 g x2 x6)).(let H20 \def (eq_ind C x4 (\lambda (c: C).(clear c2 c)) H16 (CHead x6 (Bind x5) x7) H18) in (let H21 \def (H8 x2 H13 x6 H19) in (or_ind (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 x6 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 x6 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (H22: (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 x6 (CHead d2 (Bind Abst) t))))).(ex2_ind C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl n0 x6 (CHead d2 (Bind Abst) t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x8: C).(\lambda (H23: (csub3 g d1 x8)).(\lambda (H24: (getl n0 x6 (CHead x8 (Bind Abst) t))).(or_introl (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex_intro2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t))) x8 H23 (getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abst) t) n0 H24)))))) H22)) (\lambda (H22: (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 x6 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))).(ex3_2_ind C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl n0 x6 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) (or (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))))) (\lambda (x8: C).(\lambda (x9: T).(\lambda (H23: (csub3 g d1 x8)).(\lambda (H24: (getl n0 x6 (CHead x8 (Bind Abbr) x9))).(\lambda (H25: (ty3 g x8 x9 t)).(or_intror (ex2 C (\lambda (d2: C).(csub3 g d1 d2)) (\lambda (d2: C).(getl (S n0) c2 (CHead d2 (Bind Abst) t)))) (ex3_2 C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t)))) (ex3_2_intro C T (\lambda (d2: C).(\lambda (_: T).(csub3 g d1 d2))) (\lambda (d2: C).(\lambda (u: T).(getl (S n0) c2 (CHead d2 (Bind Abbr) u)))) (\lambda (d2: C).(\lambda (u: T).(ty3 g d2 u t))) x8 x9 H23 (getl_clear_bind x5 c2 x6 x7 H20 (CHead x8 (Bind Abbr) x9) n0 H24) H25))))))) H22)) H21)))))))) H17))))) H14))))))) H11)))))))) n) H7))))]) H3 H4)))]) H1 H2)))) H0))))))). theorem csub3_pr2: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr2 c1 t1 t2) \to (\forall (c2: C).((csub3 g c1 c2) \to (pr2 c2 t1 t2))))))) @@ -3066,7 +3066,7 @@ theorem csub3_ty3_ld: theorem ty3_sred_wcpr0_pr0: \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t: T).((ty3 g c1 t1 t) \to (\forall (c2: C).((wcpr0 c1 c2) \to (\forall (t2: T).((pr0 t1 t2) \to (ty3 g c2 t2 t))))))))) \def - \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: (ty3 g c1 t1 t)).(ty3_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (t2: T).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t3: T).((pr0 t0 t3) \to (ty3 g c2 t3 t2)))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t0: T).(\lambda (_: (ty3 g c t2 t0)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t3: T).((pr0 t2 t3) \to (ty3 g c2 t3 t0))))))).(\lambda (u: T).(\lambda (t3: T).(\lambda (_: (ty3 g c u t3)).(\lambda (H3: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 u t2) \to (ty3 g c2 t2 t3))))))).(\lambda (H4: (pc3 c t3 t2)).(\lambda (c2: C).(\lambda (H5: (wcpr0 c c2)).(\lambda (t4: T).(\lambda (H6: (pr0 u t4)).(ty3_conv g c2 t2 t0 (H1 c2 H5 t2 (pr0_refl t2)) t4 t3 (H3 c2 H5 t4 H6) (pc3_wcpr0 c c2 H5 t3 t2 H4)))))))))))))))) (\lambda (c: C).(\lambda (m: nat).(\lambda (c2: C).(\lambda (_: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H1: (pr0 (TSort m) t2)).(eq_ind_r T (TSort m) (\lambda (t0: T).(ty3 g c2 t0 (TSort (next g m)))) (ty3_sort g c2 m) t2 (pr0_gen_sort t2 m H1)))))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind Abbr) u))).(\lambda (t0: T).(\lambda (_: (ty3 g d u t0)).(\lambda (H2: ((\forall (c2: C).((wcpr0 d c2) \to (\forall (t2: T).((pr0 u t2) \to (ty3 g c2 t2 t0))))))).(\lambda (c2: C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H4: (pr0 (TLRef n) t2)).(eq_ind_r T (TLRef n) (\lambda (t3: T).(ty3 g c2 t3 (lift (S n) O t0))) (ex3_2_ind C T (\lambda (e2: C).(\lambda (u2: T).(getl n c2 (CHead e2 (Bind Abbr) u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u u2))) (ty3 g c2 (TLRef n) (lift (S n) O t0)) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (getl n c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H6: (wcpr0 d x0)).(\lambda (H7: (pr0 u x1)).(ty3_abbr g n c2 x0 x1 H5 t0 (H2 x0 H6 x1 H7))))))) (wcpr0_getl c c2 H3 n d u (Bind Abbr) H0)) t2 (pr0_gen_lref t2 n H4)))))))))))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind Abst) u))).(\lambda (t0: T).(\lambda (_: (ty3 g d u t0)).(\lambda (H2: ((\forall (c2: C).((wcpr0 d c2) \to (\forall (t2: T).((pr0 u t2) \to (ty3 g c2 t2 t0))))))).(\lambda (c2: C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H4: (pr0 (TLRef n) t2)).(eq_ind_r T (TLRef n) (\lambda (t3: T).(ty3 g c2 t3 (lift (S n) O u))) (ex3_2_ind C T (\lambda (e2: C).(\lambda (u2: T).(getl n c2 (CHead e2 (Bind Abst) u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u u2))) (ty3 g c2 (TLRef n) (lift (S n) O u)) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (getl n c2 (CHead x0 (Bind Abst) x1))).(\lambda (H6: (wcpr0 d x0)).(\lambda (H7: (pr0 u x1)).(ty3_conv g c2 (lift (S n) O u) (lift (S n) O t0) (ty3_lift g x0 u t0 (H2 x0 H6 u (pr0_refl u)) c2 O (S n) (getl_drop Abst c2 x0 x1 n H5)) (TLRef n) (lift (S n) O x1) (ty3_abst g n c2 x0 x1 H5 t0 (H2 x0 H6 x1 H7)) (pc3_lift c2 x0 (S n) O (getl_drop Abst c2 x0 x1 n H5) x1 u (pc3_pr2_x x0 x1 u (pr2_free x0 u x1 H7))))))))) (wcpr0_getl c c2 H3 n d u (Bind Abst) H0)) t2 (pr0_gen_lref t2 n H4)))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (t0: T).(\lambda (_: (ty3 g c u t0)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 u t2) \to (ty3 g c2 t2 t0))))))).(\lambda (b: B).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H2: (ty3 g (CHead c (Bind b) u) t2 t3)).(\lambda (H3: ((\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t4: T).((pr0 t2 t4) \to (ty3 g c2 t4 t3))))))).(\lambda (t4: T).(\lambda (H4: (ty3 g (CHead c (Bind b) u) t3 t4)).(\lambda (H5: ((\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t2: T).((pr0 t3 t2) \to (ty3 g c2 t2 t4))))))).(\lambda (c2: C).(\lambda (H6: (wcpr0 c c2)).(\lambda (t5: T).(\lambda (H7: (pr0 (THead (Bind b) u t2) t5)).(let H8 \def (match H7 return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Bind b) u t2)) \to ((eq T t0 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3))))))) with [(pr0_refl t4) \Rightarrow (\lambda (H7: (eq T t4 (THead (Bind b) u t2))).(\lambda (H8: (eq T t4 t5)).(eq_ind T (THead (Bind b) u t2) (\lambda (t: T).((eq T t t5) \to (ty3 g c2 t5 (THead (Bind b) u t3)))) (\lambda (H9: (eq T (THead (Bind b) u t2) t5)).(eq_ind T (THead (Bind b) u t2) (\lambda (t: T).(ty3 g c2 t (THead (Bind b) u t3))) (ty3_bind g c2 u t0 (H1 c2 H6 u (pr0_refl u)) b t2 t3 (H3 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind b)) t2 (pr0_refl t2)) t4 (H5 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind b)) t3 (pr0_refl t3))) t5 H9)) t4 (sym_eq T t4 (THead (Bind b) u t2) H7) H8))) | (pr0_comp u1 u2 H7 t4 t5 H8 k) \Rightarrow (\lambda (H9: (eq T (THead k u1 t4) (THead (Bind b) u t2))).(\lambda (H10: (eq T (THead k u2 t5) t5)).((let H11 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead k u1 t4) (THead (Bind b) u t2) H9) in ((let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t4) (THead (Bind b) u t2) H9) in ((let H13 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t4) (THead (Bind b) u t2) H9) in (eq_ind K (Bind b) (\lambda (k0: K).((eq T u1 u) \to ((eq T t4 t2) \to ((eq T (THead k0 u2 t5) t5) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3)))))))) (\lambda (H14: (eq T u1 u)).(eq_ind T u (\lambda (t: T).((eq T t4 t2) \to ((eq T (THead (Bind b) u2 t5) t5) \to ((pr0 t u2) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3))))))) (\lambda (H15: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((eq T (THead (Bind b) u2 t5) t5) \to ((pr0 u u2) \to ((pr0 t t5) \to (ty3 g c2 t5 (THead (Bind b) u t3)))))) (\lambda (H16: (eq T (THead (Bind b) u2 t5) t5)).(eq_ind T (THead (Bind b) u2 t5) (\lambda (t: T).((pr0 u u2) \to ((pr0 t2 t5) \to (ty3 g c2 t (THead (Bind b) u t3))))) (\lambda (H17: (pr0 u u2)).(\lambda (H18: (pr0 t2 t5)).(ex_ind T (\lambda (t: T).(ty3 g (CHead c2 (Bind b) u) t4 t)) (ty3 g c2 (THead (Bind b) u2 t5) (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H19: (ty3 g (CHead c2 (Bind b) u) t4 x)).(ex_ind T (\lambda (t: T).(ty3 g (CHead c2 (Bind b) u2) t3 t)) (ty3 g c2 (THead (Bind b) u2 t5) (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (H20: (ty3 g (CHead c2 (Bind b) u2) t3 x0)).(ty3_conv g c2 (THead (Bind b) u t3) (THead (Bind b) u t4) (ty3_bind g c2 u t0 (H1 c2 H6 u (pr0_refl u)) b t3 t4 (H5 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind b)) t3 (pr0_refl t3)) x H19) (THead (Bind b) u2 t5) (THead (Bind b) u2 t3) (ty3_bind g c2 u2 t0 (H1 c2 H6 u2 H17) b t5 t3 (H3 (CHead c2 (Bind b) u2) (wcpr0_comp c c2 H6 u u2 H17 (Bind b)) t5 H18) x0 H20) (pc3_pr2_x c2 (THead (Bind b) u2 t3) (THead (Bind b) u t3) (pr2_head_1 c2 u u2 (pr2_free c2 u u2 H17) (Bind b) t3))))) (ty3_correct g (CHead c2 (Bind b) u2) t5 t3 (H3 (CHead c2 (Bind b) u2) (wcpr0_comp c c2 H6 u u2 H17 (Bind b)) t5 H18))))) (ty3_correct g (CHead c2 (Bind b) u) t3 t4 (H5 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind b)) t3 (pr0_refl t3)))))) t5 H16)) t4 (sym_eq T t4 t2 H15))) u1 (sym_eq T u1 u H14))) k (sym_eq K k (Bind b) H13))) H12)) H11)) H10 H7 H8))) | (pr0_beta u0 v1 v2 H7 t4 t5 H8) \Rightarrow (\lambda (H9: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) (THead (Bind b) u t2))).(\lambda (H10: (eq T (THead (Bind Abbr) v2 t5) t5)).((let H11 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t2) H9) in (False_ind ((eq T (THead (Bind Abbr) v2 t5) t5) \to ((pr0 v1 v2) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3))))) H11)) H10 H7 H8))) | (pr0_upsilon b0 H7 v1 v2 H8 u1 u2 H9 t4 t5 H10) \Rightarrow (\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)) (THead (Bind b) u t2))).(\lambda (H12: (eq T (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t5)).((let H13 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t2) H11) in (False_ind ((eq T (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t5) \to ((not (eq B b0 Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3))))))) H13)) H12 H7 H8 H9 H10))) | (pr0_delta u1 u2 H7 t4 t5 H8 w H9) \Rightarrow (\lambda (H10: (eq T (THead (Bind Abbr) u1 t4) (THead (Bind b) u t2))).(\lambda (H11: (eq T (THead (Bind Abbr) u2 w) t5)).((let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u1 t4) (THead (Bind b) u t2) H10) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u1 t4) (THead (Bind b) u t2) H10) in ((let H14 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (THead (Bind Abbr) u1 t4) (THead (Bind b) u t2) H10) in (eq_ind B Abbr (\lambda (b: B).((eq T u1 u) \to ((eq T t4 t2) \to ((eq T (THead (Bind Abbr) u2 w) t5) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ty3 g c2 t5 (THead (Bind b) u t3))))))))) (\lambda (H15: (eq T u1 u)).(eq_ind T u (\lambda (t: T).((eq T t4 t2) \to ((eq T (THead (Bind Abbr) u2 w) t5) \to ((pr0 t u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ty3 g c2 t5 (THead (Bind Abbr) u t3)))))))) (\lambda (H16: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((eq T (THead (Bind Abbr) u2 w) t5) \to ((pr0 u u2) \to ((pr0 t t5) \to ((subst0 O u2 t5 w) \to (ty3 g c2 t5 (THead (Bind Abbr) u t3))))))) (\lambda (H17: (eq T (THead (Bind Abbr) u2 w) t5)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t: T).((pr0 u u2) \to ((pr0 t2 t5) \to ((subst0 O u2 t5 w) \to (ty3 g c2 t (THead (Bind Abbr) u t3)))))) (\lambda (H18: (pr0 u u2)).(\lambda (H19: (pr0 t2 t5)).(\lambda (H20: (subst0 O u2 t5 w)).(let H21 \def (eq_ind_r B b (\lambda (b: B).(\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t2: T).((pr0 t3 t2) \to (ty3 g c2 t2 t4)))))) H5 Abbr H14) in (let H22 \def (eq_ind_r B b (\lambda (b: B).(ty3 g (CHead c (Bind b) u) t3 t4)) H4 Abbr H14) in (let H23 \def (eq_ind_r B b (\lambda (b: B).(\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t4: T).((pr0 t2 t4) \to (ty3 g c2 t4 t3)))))) H3 Abbr H14) in (let H24 \def (eq_ind_r B b (\lambda (b: B).(ty3 g (CHead c (Bind b) u) t2 t3)) H2 Abbr H14) in (ex_ind T (\lambda (t: T).(ty3 g (CHead c2 (Bind Abbr) u) t4 t)) (ty3 g c2 (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u t3)) (\lambda (x: T).(\lambda (H25: (ty3 g (CHead c2 (Bind Abbr) u) t4 x)).(ex_ind T (\lambda (t: T).(ty3 g (CHead c2 (Bind Abbr) u2) t3 t)) (ty3 g c2 (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u t3)) (\lambda (x0: T).(\lambda (H26: (ty3 g (CHead c2 (Bind Abbr) u2) t3 x0)).(ty3_conv g c2 (THead (Bind Abbr) u t3) (THead (Bind Abbr) u t4) (ty3_bind g c2 u t0 (H1 c2 H6 u (pr0_refl u)) Abbr t3 t4 (H21 (CHead c2 (Bind Abbr) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind Abbr)) t3 (pr0_refl t3)) x H25) (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u2 t3) (ty3_bind g c2 u2 t0 (H1 c2 H6 u2 H18) Abbr w t3 (ty3_subst0 g (CHead c2 (Bind Abbr) u2) t5 t3 (H23 (CHead c2 (Bind Abbr) u2) (wcpr0_comp c c2 H6 u u2 H18 (Bind Abbr)) t5 H19) c2 u2 O (getl_refl Abbr c2 u2) w H20) x0 H26) (pc3_pr2_x c2 (THead (Bind Abbr) u2 t3) (THead (Bind Abbr) u t3) (pr2_head_1 c2 u u2 (pr2_free c2 u u2 H18) (Bind Abbr) t3))))) (ty3_correct g (CHead c2 (Bind Abbr) u2) t5 t3 (H23 (CHead c2 (Bind Abbr) u2) (wcpr0_comp c c2 H6 u u2 H18 (Bind Abbr)) t5 H19))))) (ty3_correct g (CHead c2 (Bind Abbr) u) t3 t4 (H21 (CHead c2 (Bind Abbr) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind Abbr)) t3 (pr0_refl t3))))))))))) t5 H17)) t4 (sym_eq T t4 t2 H16))) u1 (sym_eq T u1 u H15))) b H14)) H13)) H12)) H11 H7 H8 H9))) | (pr0_zeta b0 H7 t4 t5 H8 u0) \Rightarrow (\lambda (H9: (eq T (THead (Bind b0) u0 (lift (S O) O t4)) (THead (Bind b) u t2))).(\lambda (H10: (eq T t5 t5)).((let H11 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t4) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t4) | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) u0 (lift (S O) O t4)) (THead (Bind b) u t2) H9) in ((let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b0) u0 (lift (S O) O t4)) (THead (Bind b) u t2) H9) in ((let H13 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u0 (lift (S O) O t4)) (THead (Bind b) u t2) H9) in (eq_ind B b (\lambda (b1: B).((eq T u0 u) \to ((eq T (lift (S O) O t4) t2) \to ((eq T t5 t5) \to ((not (eq B b1 Abst)) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3)))))))) (\lambda (H14: (eq T u0 u)).(eq_ind T u (\lambda (_: T).((eq T (lift (S O) O t4) t2) \to ((eq T t5 t5) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3))))))) (\lambda (H15: (eq T (lift (S O) O t4) t2)).(eq_ind T (lift (S O) O t4) (\lambda (_: T).((eq T t5 t5) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3)))))) (\lambda (H16: (eq T t5 t5)).(eq_ind T t5 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t4 t) \to (ty3 g c2 t5 (THead (Bind b) u t3))))) (\lambda (H17: (not (eq B b Abst))).(\lambda (H18: (pr0 t4 t5)).(let H19 \def (eq_ind_r T t2 (\lambda (t: T).(\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t2: T).((pr0 t t2) \to (ty3 g c2 t2 t3)))))) H3 (lift (S O) O t4) H15) in (let H20 \def (eq_ind_r T t2 (\lambda (t: T).(ty3 g (CHead c (Bind b) u) t t3)) H2 (lift (S O) O t4) H15) in (ex_ind T (\lambda (t: T).(ty3 g (CHead c2 (Bind b) u) t4 t)) (ty3 g c2 t5 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H4: (ty3 g (CHead c2 (Bind b) u) t4 x)).(B_ind (\lambda (b: B).((not (eq B b Abst)) \to ((ty3 g (CHead c2 (Bind b) u) t3 t4) \to ((ty3 g (CHead c2 (Bind b) u) t4 x) \to ((ty3 g (CHead c2 (Bind b) u) (lift (S O) O t5) t3) \to (ty3 g c2 t5 (THead (Bind b) u t3))))))) (\lambda (H21: (not (eq B Abbr Abst))).(\lambda (H2: (ty3 g (CHead c2 (Bind Abbr) u) t3 t4)).(\lambda (H5: (ty3 g (CHead c2 (Bind Abbr) u) t4 x)).(\lambda (H22: (ty3 g (CHead c2 (Bind Abbr) u) (lift (S O) O t5) t3)).(let H \def (ty3_gen_cabbr g (CHead c2 (Bind Abbr) u) (lift (S O) O t5) t3 H22 c2 u O (getl_refl Abbr c2 u) (CHead c2 (Bind Abbr) u) (csubst1_refl O u (CHead c2 (Bind Abbr) u)) c2 (drop_drop (Bind Abbr) O c2 c2 (drop_refl c2) u)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 O u (lift (S O) O t5) (lift (S O) O y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 O u t3 (lift (S O) O y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g c2 y1 y2))) (ty3 g c2 t5 (THead (Bind Abbr) u t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H0: (subst1 O u (lift (S O) O t5) (lift (S O) O x0))).(\lambda (H3: (subst1 O u t3 (lift (S O) O x1))).(\lambda (H23: (ty3 g c2 x0 x1)).(let H24 \def (eq_ind T x0 (\lambda (t: T).(ty3 g c2 t x1)) H23 t5 (lift_inj x0 t5 (S O) O (subst1_gen_lift_eq t5 u (lift (S O) O x0) (S O) O O (le_n O) (eq_ind_r nat (plus (S O) O) (\lambda (n: nat).(lt O n)) (le_n (plus (S O) O)) (plus O (S O)) (plus_comm O (S O))) H0))) in (ty3_conv g c2 (THead (Bind Abbr) u t3) (THead (Bind Abbr) u t4) (ty3_bind g c2 u t0 (H1 c2 H6 u (pr0_refl u)) Abbr t3 t4 H2 x H5) t5 x1 H24 (pc3_pr3_x c2 x1 (THead (Bind Abbr) u t3) (pr3_t (THead (Bind Abbr) u (lift (S O) O x1)) (THead (Bind Abbr) u t3) c2 (pr3_pr2 c2 (THead (Bind Abbr) u t3) (THead (Bind Abbr) u (lift (S O) O x1)) (pr2_free c2 (THead (Bind Abbr) u t3) (THead (Bind Abbr) u (lift (S O) O x1)) (pr0_delta1 u u (pr0_refl u) t3 t3 (pr0_refl t3) (lift (S O) O x1) H3))) x1 (pr3_pr2 c2 (THead (Bind Abbr) u (lift (S O) O x1)) x1 (pr2_free c2 (THead (Bind Abbr) u (lift (S O) O x1)) x1 (pr0_zeta Abbr H21 x1 x1 (pr0_refl x1) u)))))))))))) H)))))) (\lambda (H21: (not (eq B Abst Abst))).(\lambda (_: (ty3 g (CHead c2 (Bind Abst) u) t3 t4)).(\lambda (_: (ty3 g (CHead c2 (Bind Abst) u) t4 x)).(\lambda (_: (ty3 g (CHead c2 (Bind Abst) u) (lift (S O) O t5) t3)).(let H \def (match (H21 (refl_equal B Abst)) return (\lambda (_: ?).(ty3 g c2 t5 (THead (Bind Abst) u t3))) with []) in H))))) (\lambda (H21: (not (eq B Void Abst))).(\lambda (H2: (ty3 g (CHead c2 (Bind Void) u) t3 t4)).(\lambda (H5: (ty3 g (CHead c2 (Bind Void) u) t4 x)).(\lambda (H22: (ty3 g (CHead c2 (Bind Void) u) (lift (S O) O t5) t3)).(let H \def (ty3_gen_cvoid g (CHead c2 (Bind Void) u) (lift (S O) O t5) t3 H22 c2 u O (getl_refl Void c2 u) c2 (drop_drop (Bind Void) O c2 c2 (drop_refl c2) u)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) O t5) (lift (S O) O y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t3 (lift (S O) O y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g c2 y1 y2))) (ty3 g c2 t5 (THead (Bind Void) u t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H0: (eq T (lift (S O) O t5) (lift (S O) O x0))).(\lambda (H3: (eq T t3 (lift (S O) O x1))).(\lambda (H23: (ty3 g c2 x0 x1)).(let H24 \def (eq_ind T t3 (\lambda (t: T).(ty3 g (CHead c2 (Bind Void) u) t t4)) H2 (lift (S O) O x1) H3) in (eq_ind_r T (lift (S O) O x1) (\lambda (t: T).(ty3 g c2 t5 (THead (Bind Void) u t))) (let H25 \def (eq_ind_r T x0 (\lambda (t: T).(ty3 g c2 t x1)) H23 t5 (lift_inj t5 x0 (S O) O H0)) in (ty3_conv g c2 (THead (Bind Void) u (lift (S O) O x1)) (THead (Bind Void) u t4) (ty3_bind g c2 u t0 (H1 c2 H6 u (pr0_refl u)) Void (lift (S O) O x1) t4 H24 x H5) t5 x1 H25 (pc3_pr2_x c2 x1 (THead (Bind Void) u (lift (S O) O x1)) (pr2_free c2 (THead (Bind Void) u (lift (S O) O x1)) x1 (pr0_zeta Void H21 x1 x1 (pr0_refl x1) u))))) t3 H3))))))) H)))))) b H17 (H5 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind b)) t3 (pr0_refl t3)) H4 (H19 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind b)) (lift (S O) O t5) (pr0_lift t4 t5 H18 (S O) O))))) (ty3_correct g (CHead c2 (Bind b) u) t3 t4 (H5 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind b)) t3 (pr0_refl t3)))))))) t5 (sym_eq T t5 t5 H16))) t2 H15)) u0 (sym_eq T u0 u H14))) b0 (sym_eq B b0 b H13))) H12)) H11)) H10 H7 H8))) | (pr0_epsilon t4 t5 H7 u0) \Rightarrow (\lambda (H8: (eq T (THead (Flat Cast) u0 t4) (THead (Bind b) u t2))).(\lambda (H9: (eq T t5 t5)).((let H10 \def (eq_ind T (THead (Flat Cast) u0 t4) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t2) H8) in (False_ind ((eq T t5 t5) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3)))) H10)) H9 H7)))]) in (H8 (refl_equal T (THead (Bind b) u t2)) (refl_equal T t5)))))))))))))))))))) (\lambda (c: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c w u)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 w t2) \to (ty3 g c2 t2 u))))))).(\lambda (v: T).(\lambda (t0: T).(\lambda (H2: (ty3 g c v (THead (Bind Abst) u t0))).(\lambda (H3: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 v t2) \to (ty3 g c2 t2 (THead (Bind Abst) u t0)))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Flat Appl) w v) t2)).(let H6 \def (match H5 return (\lambda (_: ?).(\lambda (t: T).(\lambda (t1: T).((eq T t (THead (Flat Appl) w v)) \to ((eq T t1 t2) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0)))))))) with [(pr0_refl t0) \Rightarrow (\lambda (H5: (eq T t0 (THead (Flat Appl) w v))).(\lambda (H6: (eq T t0 t2)).(eq_ind T (THead (Flat Appl) w v) (\lambda (t: T).((eq T t t2) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0))))) (\lambda (H7: (eq T (THead (Flat Appl) w v) t2)).(eq_ind T (THead (Flat Appl) w v) (\lambda (t: T).(ty3 g c2 t (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ty3_appl g c2 w u (H1 c2 H4 w (pr0_refl w)) v t0 (H3 c2 H4 v (pr0_refl v))) t2 H7)) t0 (sym_eq T t0 (THead (Flat Appl) w v) H5) H6))) | (pr0_comp u1 u2 H5 t1 t0 H6 k) \Rightarrow (\lambda (H7: (eq T (THead k u1 t1) (THead (Flat Appl) w v))).(\lambda (H8: (eq T (THead k u2 t0) t2)).((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k u1 t1) (THead (Flat Appl) w v) H7) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t1) (THead (Flat Appl) w v) H7) in ((let H11 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t1) (THead (Flat Appl) w v) H7) in (eq_ind K (Flat Appl) (\lambda (k0: K).((eq T u1 w) \to ((eq T t1 v) \to ((eq T (THead k0 u2 t0) t2) \to ((pr0 u1 u2) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0))))))))) (\lambda (H12: (eq T u1 w)).(eq_ind T w (\lambda (t: T).((eq T t1 v) \to ((eq T (THead (Flat Appl) u2 t0) t2) \to ((pr0 t u2) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0)))))))) (\lambda (H13: (eq T t1 v)).(eq_ind T v (\lambda (t: T).((eq T (THead (Flat Appl) u2 t0) t2) \to ((pr0 w u2) \to ((pr0 t t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0))))))) (\lambda (H14: (eq T (THead (Flat Appl) u2 t0) t2)).(eq_ind T (THead (Flat Appl) u2 t0) (\lambda (t: T).((pr0 w u2) \to ((pr0 v t0) \to (ty3 g c2 t (THead (Flat Appl) w (THead (Bind Abst) u t0)))))) (\lambda (H15: (pr0 w u2)).(\lambda (H16: (pr0 v t0)).(ex_ind T (\lambda (t: T).(ty3 g c2 (THead (Bind Abst) u t0) t)) (ty3 g c2 (THead (Flat Appl) u2 t0) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H17: (ty3 g c2 (THead (Bind Abst) u t0) x)).(ex4_3_ind T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind Abst) u t2) x)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c2 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind Abst) u) t0 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c2 (Bind Abst) u) t2 t3)))) (ty3 g c2 (THead (Flat Appl) u2 t0) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (THead (Bind Abst) u x0) x)).(\lambda (H19: (ty3 g c2 u x1)).(\lambda (H20: (ty3 g (CHead c2 (Bind Abst) u) t0 x0)).(\lambda (H21: (ty3 g (CHead c2 (Bind Abst) u) x0 x2)).(ty3_conv g c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x0)) (ty3_appl g c2 w u (H1 c2 H4 w (pr0_refl w)) (THead (Bind Abst) u t0) x0 (ty3_bind g c2 u x1 H19 Abst t0 x0 H20 x2 H21)) (THead (Flat Appl) u2 t0) (THead (Flat Appl) u2 (THead (Bind Abst) u t0)) (ty3_appl g c2 u2 u (H1 c2 H4 u2 H15) t0 t0 (H3 c2 H4 t0 H16)) (pc3_pr2_x c2 (THead (Flat Appl) u2 (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pr2_head_1 c2 w u2 (pr2_free c2 w u2 H15) (Flat Appl) (THead (Bind Abst) u t0))))))))))) (ty3_gen_bind g Abst c2 u t0 x H17)))) (ty3_correct g c2 v (THead (Bind Abst) u t0) (H3 c2 H4 v (pr0_refl v)))))) t2 H14)) t1 (sym_eq T t1 v H13))) u1 (sym_eq T u1 w H12))) k (sym_eq K k (Flat Appl) H11))) H10)) H9)) H8 H5 H6))) | (pr0_beta u0 v1 v2 H5 t1 t0 H6) \Rightarrow (\lambda (H7: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t1)) (THead (Flat Appl) w v))).(\lambda (H8: (eq T (THead (Bind Abbr) v2 t0) t2)).((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow (THead (Bind Abst) u0 t1) | (TLRef _) \Rightarrow (THead (Bind Abst) u0 t1) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t1)) (THead (Flat Appl) w v) H7) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t1)) (THead (Flat Appl) w v) H7) in (eq_ind T w (\lambda (t: T).((eq T (THead (Bind Abst) u0 t1) v) \to ((eq T (THead (Bind Abbr) v2 t0) t2) \to ((pr0 t v2) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0)))))))) (\lambda (H11: (eq T (THead (Bind Abst) u0 t1) v)).(eq_ind T (THead (Bind Abst) u0 t1) (\lambda (_: T).((eq T (THead (Bind Abbr) v2 t0) t2) \to ((pr0 w v2) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0))))))) (\lambda (H12: (eq T (THead (Bind Abbr) v2 t0) t2)).(eq_ind T (THead (Bind Abbr) v2 t0) (\lambda (t: T).((pr0 w v2) \to ((pr0 t1 t0) \to (ty3 g c2 t (THead (Flat Appl) w (THead (Bind Abst) u t0)))))) (\lambda (H13: (pr0 w v2)).(\lambda (H14: (pr0 t1 t0)).(let H15 \def (eq_ind_r T v (\lambda (t: T).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (ty3 g c2 t2 (THead (Bind Abst) u t0))))))) H3 (THead (Bind Abst) u0 t1) H11) in (let H16 \def (eq_ind_r T v (\lambda (t: T).(ty3 g c t (THead (Bind Abst) u t0))) H2 (THead (Bind Abst) u0 t1) H11) in (ex_ind T (\lambda (t: T).(ty3 g c2 (THead (Bind Abst) u t0) t)) (ty3 g c2 (THead (Bind Abbr) v2 t0) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H2: (ty3 g c2 (THead (Bind Abst) u t0) x)).(ex4_3_ind T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind Abst) u t2) x)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c2 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind Abst) u) t0 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c2 (Bind Abst) u) t2 t3)))) (ty3 g c2 (THead (Bind Abbr) v2 t0) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (THead (Bind Abst) u x0) x)).(\lambda (H17: (ty3 g c2 u x1)).(\lambda (H18: (ty3 g (CHead c2 (Bind Abst) u) t0 x0)).(\lambda (H19: (ty3 g (CHead c2 (Bind Abst) u) x0 x2)).(ex4_3_ind T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind Abst) u0 t2) (THead (Bind Abst) u t0))))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c2 u0 t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind Abst) u0) t0 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c2 (Bind Abst) u0) t2 t3)))) (ty3 g c2 (THead (Bind Abbr) v2 t0) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H0: (pc3 c2 (THead (Bind Abst) u0 x3) (THead (Bind Abst) u t0))).(\lambda (H20: (ty3 g c2 u0 x4)).(\lambda (H21: (ty3 g (CHead c2 (Bind Abst) u0) t0 x3)).(\lambda (H22: (ty3 g (CHead c2 (Bind Abst) u0) x3 x5)).(and_ind (pc3 c2 u0 u) (\forall (b: B).(\forall (u: T).(pc3 (CHead c2 (Bind b) u) x3 t0))) (ty3 g c2 (THead (Bind Abbr) v2 t0) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (H23: (pc3 c2 u0 u)).(\lambda (H24: ((\forall (b: B).(\forall (u: T).(pc3 (CHead c2 (Bind b) u) x3 t0))))).(ty3_conv g c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x0)) (ty3_appl g c2 w u (H1 c2 H4 w (pr0_refl w)) (THead (Bind Abst) u t0) x0 (ty3_bind g c2 u x1 H17 Abst t0 x0 H18 x2 H19)) (THead (Bind Abbr) v2 t0) (THead (Bind Abbr) v2 x3) (ty3_bind g c2 v2 u (H1 c2 H4 v2 H13) Abbr t0 x3 (csub3_ty3_ld g c2 v2 u0 (ty3_conv g c2 u0 x4 H20 v2 u (H1 c2 H4 v2 H13) (pc3_s c2 u u0 H23)) t0 x3 H21) x5 (csub3_ty3_ld g c2 v2 u0 (ty3_conv g c2 u0 x4 H20 v2 u (H1 c2 H4 v2 H13) (pc3_s c2 u u0 H23)) x3 x5 H22)) (pc3_t (THead (Bind Abbr) v2 t0) c2 (THead (Bind Abbr) v2 x3) (pc3_head_2 c2 v2 x3 t0 (Bind Abbr) (H24 Abbr v2)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_pr2_x c2 (THead (Bind Abbr) v2 t0) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pr2_free c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Bind Abbr) v2 t0) (pr0_beta u w v2 H13 t0 t0 (pr0_refl t0)))))))) (pc3_gen_abst c2 u0 u x3 t0 H0))))))))) (ty3_gen_bind g Abst c2 u0 t0 (THead (Bind Abst) u t0) (H15 c2 H4 (THead (Bind Abst) u0 t0) (pr0_comp u0 u0 (pr0_refl u0) t1 t0 H14 (Bind Abst)))))))))))) (ty3_gen_bind g Abst c2 u t0 x H2)))) (ty3_correct g c2 (THead (Bind Abst) u0 t1) (THead (Bind Abst) u t0) (H15 c2 H4 (THead (Bind Abst) u0 t1) (pr0_refl (THead (Bind Abst) u0 t1))))))))) t2 H12)) v H11)) v1 (sym_eq T v1 w H10))) H9)) H8 H5 H6))) | (pr0_upsilon b H5 v1 v2 H6 u1 u2 H7 t1 t0 H8) \Rightarrow (\lambda (H9: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (THead (Flat Appl) w v))).(\lambda (H10: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) t2)).((let H11 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow (THead (Bind b) u1 t1) | (TLRef _) \Rightarrow (THead (Bind b) u1 t1) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (THead (Flat Appl) w v) H9) in ((let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (THead (Flat Appl) w v) H9) in (eq_ind T w (\lambda (t: T).((eq T (THead (Bind b) u1 t1) v) \to ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) t2) \to ((not (eq B b Abst)) \to ((pr0 t v2) \to ((pr0 u1 u2) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0)))))))))) (\lambda (H13: (eq T (THead (Bind b) u1 t1) v)).(eq_ind T (THead (Bind b) u1 t1) (\lambda (_: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) t2) \to ((not (eq B b Abst)) \to ((pr0 w v2) \to ((pr0 u1 u2) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0))))))))) (\lambda (H14: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) t2)).(eq_ind T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 w v2) \to ((pr0 u1 u2) \to ((pr0 t1 t0) \to (ty3 g c2 t (THead (Flat Appl) w (THead (Bind Abst) u t0)))))))) (\lambda (H15: (not (eq B b Abst))).(\lambda (H16: (pr0 w v2)).(\lambda (H17: (pr0 u1 u2)).(\lambda (H18: (pr0 t1 t0)).(let H19 \def (eq_ind_r T v (\lambda (t: T).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (ty3 g c2 t2 (THead (Bind Abst) u t0))))))) H3 (THead (Bind b) u1 t1) H13) in (let H20 \def (eq_ind_r T v (\lambda (t: T).(ty3 g c t (THead (Bind Abst) u t0))) H2 (THead (Bind b) u1 t1) H13) in (ex_ind T (\lambda (t: T).(ty3 g c2 (THead (Bind Abst) u t0) t)) (ty3 g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H2: (ty3 g c2 (THead (Bind Abst) u t0) x)).(let H3 \def H2 in (ex4_3_ind T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind Abst) u t2) x)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c2 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind Abst) u) t0 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c2 (Bind Abst) u) t2 t3)))) (ty3 g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (THead (Bind Abst) u x0) x)).(\lambda (H22: (ty3 g c2 u x1)).(\lambda (H23: (ty3 g (CHead c2 (Bind Abst) u) t0 x0)).(\lambda (H24: (ty3 g (CHead c2 (Bind Abst) u) x0 x2)).(ex4_3_ind T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind b) u2 t2) (THead (Bind Abst) u t0))))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c2 u2 t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) u2) t0 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c2 (Bind b) u2) t2 t3)))) (ty3 g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H0: (pc3 c2 (THead (Bind b) u2 x3) (THead (Bind Abst) u t0))).(\lambda (H25: (ty3 g c2 u2 x4)).(\lambda (H26: (ty3 g (CHead c2 (Bind b) u2) t0 x3)).(\lambda (_: (ty3 g (CHead c2 (Bind b) u2) x3 x5)).(let H28 \def (eq_ind T (lift (S O) O (THead (Bind Abst) u t0)) (\lambda (t: T).(pc3 (CHead c2 (Bind b) u2) x3 t)) (pc3_gen_not_abst b H15 c2 x3 t0 u2 u H0) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)) (lift_bind Abst u t0 (S O) O)) in (let H29 \def (eq_ind T (lift (S O) O (THead (Bind Abst) u t0)) (\lambda (t: T).(ty3 g (CHead c2 (Bind b) u2) t (lift (S O) O x))) (ty3_lift g c2 (THead (Bind Abst) u t0) x H2 (CHead c2 (Bind b) u2) O (S O) (drop_drop (Bind b) O c2 c2 (drop_refl c2) u2)) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)) (lift_bind Abst u t0 (S O) O)) in (ex4_3_ind T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c2 (Bind b) u2) (THead (Bind Abst) (lift (S O) O u) t2) (lift (S O) O x))))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) u2) (lift (S O) O u) t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c2 (Bind b) u2) (Bind Abst) (lift (S O) O u)) (lift (S O) (S O) t0) t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead (CHead c2 (Bind b) u2) (Bind Abst) (lift (S O) O u)) t2 t3)))) (ty3 g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x6: T).(\lambda (x7: T).(\lambda (x8: T).(\lambda (_: (pc3 (CHead c2 (Bind b) u2) (THead (Bind Abst) (lift (S O) O u) x6) (lift (S O) O x))).(\lambda (H31: (ty3 g (CHead c2 (Bind b) u2) (lift (S O) O u) x7)).(\lambda (H32: (ty3 g (CHead (CHead c2 (Bind b) u2) (Bind Abst) (lift (S O) O u)) (lift (S O) (S O) t0) x6)).(\lambda (H33: (ty3 g (CHead (CHead c2 (Bind b) u2) (Bind Abst) (lift (S O) O u)) x6 x8)).(ty3_conv g c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x0)) (ty3_appl g c2 w u (H1 c2 H4 w (pr0_refl w)) (THead (Bind Abst) u t0) x0 (ty3_bind g c2 u x1 H22 Abst t0 x0 H23 x2 H24)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)))) (ty3_bind g c2 u2 x4 H25 b (THead (Flat Appl) (lift (S O) O v2) t0) (THead (Flat Appl) (lift (S O) O v2) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0))) (ty3_appl g (CHead c2 (Bind b) u2) (lift (S O) O v2) (lift (S O) O u) (ty3_lift g c2 v2 u (H1 c2 H4 v2 H16) (CHead c2 (Bind b) u2) O (S O) (drop_drop (Bind b) O c2 c2 (drop_refl c2) u2)) t0 (lift (S O) (S O) t0) (ty3_conv g (CHead c2 (Bind b) u2) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)) (THead (Bind Abst) (lift (S O) O u) x6) (ty3_bind g (CHead c2 (Bind b) u2) (lift (S O) O u) x7 H31 Abst (lift (S O) (S O) t0) x6 H32 x8 H33) t0 x3 H26 H28)) (THead (Flat Appl) (lift (S O) O v2) (THead (Bind Abst) (lift (S O) O u) x6)) (ty3_appl g (CHead c2 (Bind b) u2) (lift (S O) O v2) (lift (S O) O u) (ty3_lift g c2 v2 u (H1 c2 H4 v2 H16) (CHead c2 (Bind b) u2) O (S O) (drop_drop (Bind b) O c2 c2 (drop_refl c2) u2)) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)) x6 (ty3_bind g (CHead c2 (Bind b) u2) (lift (S O) O u) x7 H31 Abst (lift (S O) (S O) t0) x6 H32 x8 H33))) (eq_ind T (lift (S O) O (THead (Bind Abst) u t0)) (\lambda (t: T).(pc3 c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t)) (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (pc3_pc1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O (THead (Bind Abst) u t0)))) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc1_pr0_u2 (THead (Flat Appl) v2 (THead (Bind b) u2 (lift (S O) O (THead (Bind Abst) u t0)))) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O (THead (Bind Abst) u t0)))) (pr0_upsilon b H15 v2 v2 (pr0_refl v2) u2 u2 (pr0_refl u2) (lift (S O) O (THead (Bind Abst) u t0)) (lift (S O) O (THead (Bind Abst) u t0)) (pr0_refl (lift (S O) O (THead (Bind Abst) u t0)))) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc1_s (THead (Flat Appl) v2 (THead (Bind b) u2 (lift (S O) O (THead (Bind Abst) u t0)))) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc1_head w v2 (pc1_pr0_r w v2 H16) (THead (Bind Abst) u t0) (THead (Bind b) u2 (lift (S O) O (THead (Bind Abst) u t0))) (pc1_pr0_x (THead (Bind Abst) u t0) (THead (Bind b) u2 (lift (S O) O (THead (Bind Abst) u t0))) (pr0_zeta b H15 (THead (Bind Abst) u t0) (THead (Bind Abst) u t0) (pr0_refl (THead (Bind Abst) u t0)) u2)) (Flat Appl)))) c2) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)) (lift_bind Abst u t0 (S O) O)))))))))) (ty3_gen_bind g Abst (CHead c2 (Bind b) u2) (lift (S O) O u) (lift (S O) (S O) t0) (lift (S O) O x) H29))))))))))) (ty3_gen_bind g b c2 u2 t0 (THead (Bind Abst) u t0) (H19 c2 H4 (THead (Bind b) u2 t0) (pr0_comp u1 u2 H17 t1 t0 H18 (Bind b)))))))))))) (ty3_gen_bind g Abst c2 u t0 x H3))))) (ty3_correct g c2 (THead (Bind b) u2 t0) (THead (Bind Abst) u t0) (H19 c2 H4 (THead (Bind b) u2 t0) (pr0_comp u1 u2 H17 t1 t0 H18 (Bind b))))))))))) t2 H14)) v H13)) v1 (sym_eq T v1 w H12))) H11)) H10 H5 H6 H7 H8))) | (pr0_delta u1 u2 H5 t1 t0 H6 w0 H7) \Rightarrow (\lambda (H8: (eq T (THead (Bind Abbr) u1 t1) (THead (Flat Appl) w v))).(\lambda (H9: (eq T (THead (Bind Abbr) u2 w0) t2)).((let H10 \def (eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) w v) H8) in (False_ind ((eq T (THead (Bind Abbr) u2 w0) t2) \to ((pr0 u1 u2) \to ((pr0 t1 t0) \to ((subst0 O u2 t0 w0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0))))))) H10)) H9 H5 H6 H7))) | (pr0_zeta b H5 t1 t0 H6 u0) \Rightarrow (\lambda (H7: (eq T (THead (Bind b) u0 (lift (S O) O t1)) (THead (Flat Appl) w v))).(\lambda (H8: (eq T t0 t2)).((let H9 \def (eq_ind T (THead (Bind b) u0 (lift (S O) O t1)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) w v) H7) in (False_ind ((eq T t0 t2) \to ((not (eq B b Abst)) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0)))))) H9)) H8 H5 H6))) | (pr0_epsilon t1 t0 H5 u0) \Rightarrow (\lambda (H6: (eq T (THead (Flat Cast) u0 t1) (THead (Flat Appl) w v))).(\lambda (H7: (eq T t0 t2)).((let H8 \def (eq_ind T (THead (Flat Cast) u0 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) w v) H6) in (False_ind ((eq T t0 t2) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0))))) H8)) H7 H5)))]) in (H6 (refl_equal T (THead (Flat Appl) w v)) (refl_equal T t2)))))))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (ty3 g c t2 t3)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t4: T).((pr0 t2 t4) \to (ty3 g c2 t4 t3))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c t3 t0)).(\lambda (H3: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t3 t2) \to (ty3 g c2 t2 t0))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t4: T).(\lambda (H5: (pr0 (THead (Flat Cast) t3 t2) t4)).(let H6 \def (match H5 return (\lambda (_: ?).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Cast) t3 t2)) \to ((eq T t0 t4) \to (ty3 g c2 t4 t3)))))) with [(pr0_refl t) \Rightarrow (\lambda (H5: (eq T t (THead (Flat Cast) t3 t2))).(\lambda (H6: (eq T t t4)).(eq_ind T (THead (Flat Cast) t3 t2) (\lambda (t0: T).((eq T t0 t4) \to (ty3 g c2 t4 t3))) (\lambda (H7: (eq T (THead (Flat Cast) t3 t2) t4)).(eq_ind T (THead (Flat Cast) t3 t2) (\lambda (t0: T).(ty3 g c2 t0 t3)) (ty3_cast g c2 t2 t3 (H1 c2 H4 t2 (pr0_refl t2)) t0 (H3 c2 H4 t3 (pr0_refl t3))) t4 H7)) t (sym_eq T t (THead (Flat Cast) t3 t2) H5) H6))) | (pr0_comp u1 u2 H5 t4 t5 H6 k) \Rightarrow (\lambda (H7: (eq T (THead k u1 t4) (THead (Flat Cast) t3 t2))).(\lambda (H8: (eq T (THead k u2 t5) t4)).((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead k u1 t4) (THead (Flat Cast) t3 t2) H7) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t4) (THead (Flat Cast) t3 t2) H7) in ((let H11 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: ?).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t4) (THead (Flat Cast) t3 t2) H7) in (eq_ind K (Flat Cast) (\lambda (k0: K).((eq T u1 t3) \to ((eq T t4 t2) \to ((eq T (THead k0 u2 t5) t4) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ty3 g c2 t4 t3))))))) (\lambda (H12: (eq T u1 t3)).(eq_ind T t3 (\lambda (t: T).((eq T t4 t2) \to ((eq T (THead (Flat Cast) u2 t5) t4) \to ((pr0 t u2) \to ((pr0 t4 t5) \to (ty3 g c2 t4 t3)))))) (\lambda (H13: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Cast) u2 t5) t4) \to ((pr0 t3 u2) \to ((pr0 t t5) \to (ty3 g c2 t4 t3))))) (\lambda (H14: (eq T (THead (Flat Cast) u2 t5) t4)).(eq_ind T (THead (Flat Cast) u2 t5) (\lambda (t: T).((pr0 t3 u2) \to ((pr0 t2 t5) \to (ty3 g c2 t t3)))) (\lambda (H15: (pr0 t3 u2)).(\lambda (H16: (pr0 t2 t5)).(ty3_conv g c2 t3 t0 (H3 c2 H4 t3 (pr0_refl t3)) (THead (Flat Cast) u2 t5) u2 (ty3_cast g c2 t5 u2 (ty3_conv g c2 u2 t0 (H3 c2 H4 u2 H15) t5 t3 (H1 c2 H4 t5 H16) (pc3_pr2_r c2 t3 u2 (pr2_free c2 t3 u2 H15))) t0 (H3 c2 H4 u2 H15)) (pc3_pr2_x c2 u2 t3 (pr2_free c2 t3 u2 H15))))) t4 H14)) t4 (sym_eq T t4 t2 H13))) u1 (sym_eq T u1 t3 H12))) k (sym_eq K k (Flat Cast) H11))) H10)) H9)) H8 H5 H6))) | (pr0_beta u v1 v2 H5 t4 t5 H6) \Rightarrow (\lambda (H7: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) (THead (Flat Cast) t3 t2))).(\lambda (H8: (eq T (THead (Bind Abbr) v2 t5) t4)).((let H9 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) t3 t2) H7) in (False_ind ((eq T (THead (Bind Abbr) v2 t5) t4) \to ((pr0 v1 v2) \to ((pr0 t4 t5) \to (ty3 g c2 t4 t3)))) H9)) H8 H5 H6))) | (pr0_upsilon b H5 v1 v2 H6 u1 u2 H7 t4 t5 H8) \Rightarrow (\lambda (H9: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) (THead (Flat Cast) t3 t2))).(\lambda (H10: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t4)).((let H11 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) t3 t2) H9) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t4) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ty3 g c2 t4 t3)))))) H11)) H10 H5 H6 H7 H8))) | (pr0_delta u1 u2 H5 t4 t5 H6 w H7) \Rightarrow (\lambda (H8: (eq T (THead (Bind Abbr) u1 t4) (THead (Flat Cast) t3 t2))).(\lambda (H9: (eq T (THead (Bind Abbr) u2 w) t4)).((let H10 \def (eq_ind T (THead (Bind Abbr) u1 t4) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) t3 t2) H8) in (False_ind ((eq T (THead (Bind Abbr) u2 w) t4) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ty3 g c2 t4 t3))))) H10)) H9 H5 H6 H7))) | (pr0_zeta b H5 t4 t5 H6 u) \Rightarrow (\lambda (H7: (eq T (THead (Bind b) u (lift (S O) O t4)) (THead (Flat Cast) t3 t2))).(\lambda (H8: (eq T t5 t4)).((let H9 \def (eq_ind T (THead (Bind b) u (lift (S O) O t4)) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) t3 t2) H7) in (False_ind ((eq T t5 t4) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ty3 g c2 t4 t3)))) H9)) H8 H5 H6))) | (pr0_epsilon t4 t5 H5 u) \Rightarrow (\lambda (H6: (eq T (THead (Flat Cast) u t4) (THead (Flat Cast) t3 t2))).(\lambda (H7: (eq T t5 t4)).((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) u t4) (THead (Flat Cast) t3 t2) H6) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) u t4) (THead (Flat Cast) t3 t2) H6) in (eq_ind T t3 (\lambda (_: T).((eq T t4 t2) \to ((eq T t5 t4) \to ((pr0 t4 t5) \to (ty3 g c2 t4 t3))))) (\lambda (H10: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((eq T t5 t4) \to ((pr0 t t5) \to (ty3 g c2 t4 t3)))) (\lambda (H11: (eq T t5 t4)).(eq_ind T t4 (\lambda (t: T).((pr0 t2 t) \to (ty3 g c2 t4 t3))) (\lambda (H12: (pr0 t2 t4)).(H1 c2 H4 t4 H12)) t5 (sym_eq T t5 t4 H11))) t4 (sym_eq T t4 t2 H10))) u (sym_eq T u t3 H9))) H8)) H7 H5)))]) in (H6 (refl_equal T (THead (Flat Cast) t3 t2)) (refl_equal T t4))))))))))))))) c1 t1 t H))))). + \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t: T).(\lambda (H: (ty3 g c1 t1 t)).(ty3_ind g (\lambda (c: C).(\lambda (t0: T).(\lambda (t2: T).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t3: T).((pr0 t0 t3) \to (ty3 g c2 t3 t2)))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t0: T).(\lambda (_: (ty3 g c t2 t0)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t3: T).((pr0 t2 t3) \to (ty3 g c2 t3 t0))))))).(\lambda (u: T).(\lambda (t3: T).(\lambda (_: (ty3 g c u t3)).(\lambda (H3: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 u t2) \to (ty3 g c2 t2 t3))))))).(\lambda (H4: (pc3 c t3 t2)).(\lambda (c2: C).(\lambda (H5: (wcpr0 c c2)).(\lambda (t4: T).(\lambda (H6: (pr0 u t4)).(ty3_conv g c2 t2 t0 (H1 c2 H5 t2 (pr0_refl t2)) t4 t3 (H3 c2 H5 t4 H6) (pc3_wcpr0 c c2 H5 t3 t2 H4)))))))))))))))) (\lambda (c: C).(\lambda (m: nat).(\lambda (c2: C).(\lambda (_: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H1: (pr0 (TSort m) t2)).(eq_ind_r T (TSort m) (\lambda (t0: T).(ty3 g c2 t0 (TSort (next g m)))) (ty3_sort g c2 m) t2 (pr0_gen_sort t2 m H1)))))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind Abbr) u))).(\lambda (t0: T).(\lambda (_: (ty3 g d u t0)).(\lambda (H2: ((\forall (c2: C).((wcpr0 d c2) \to (\forall (t2: T).((pr0 u t2) \to (ty3 g c2 t2 t0))))))).(\lambda (c2: C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H4: (pr0 (TLRef n) t2)).(eq_ind_r T (TLRef n) (\lambda (t3: T).(ty3 g c2 t3 (lift (S n) O t0))) (ex3_2_ind C T (\lambda (e2: C).(\lambda (u2: T).(getl n c2 (CHead e2 (Bind Abbr) u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u u2))) (ty3 g c2 (TLRef n) (lift (S n) O t0)) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (getl n c2 (CHead x0 (Bind Abbr) x1))).(\lambda (H6: (wcpr0 d x0)).(\lambda (H7: (pr0 u x1)).(ty3_abbr g n c2 x0 x1 H5 t0 (H2 x0 H6 x1 H7))))))) (wcpr0_getl c c2 H3 n d u (Bind Abbr) H0)) t2 (pr0_gen_lref t2 n H4)))))))))))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c (CHead d (Bind Abst) u))).(\lambda (t0: T).(\lambda (_: (ty3 g d u t0)).(\lambda (H2: ((\forall (c2: C).((wcpr0 d c2) \to (\forall (t2: T).((pr0 u t2) \to (ty3 g c2 t2 t0))))))).(\lambda (c2: C).(\lambda (H3: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H4: (pr0 (TLRef n) t2)).(eq_ind_r T (TLRef n) (\lambda (t3: T).(ty3 g c2 t3 (lift (S n) O u))) (ex3_2_ind C T (\lambda (e2: C).(\lambda (u2: T).(getl n c2 (CHead e2 (Bind Abst) u2)))) (\lambda (e2: C).(\lambda (_: T).(wcpr0 d e2))) (\lambda (_: C).(\lambda (u2: T).(pr0 u u2))) (ty3 g c2 (TLRef n) (lift (S n) O u)) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H5: (getl n c2 (CHead x0 (Bind Abst) x1))).(\lambda (H6: (wcpr0 d x0)).(\lambda (H7: (pr0 u x1)).(ty3_conv g c2 (lift (S n) O u) (lift (S n) O t0) (ty3_lift g x0 u t0 (H2 x0 H6 u (pr0_refl u)) c2 O (S n) (getl_drop Abst c2 x0 x1 n H5)) (TLRef n) (lift (S n) O x1) (ty3_abst g n c2 x0 x1 H5 t0 (H2 x0 H6 x1 H7)) (pc3_lift c2 x0 (S n) O (getl_drop Abst c2 x0 x1 n H5) x1 u (pc3_pr2_x x0 x1 u (pr2_free x0 u x1 H7))))))))) (wcpr0_getl c c2 H3 n d u (Bind Abst) H0)) t2 (pr0_gen_lref t2 n H4)))))))))))))) (\lambda (c: C).(\lambda (u: T).(\lambda (t0: T).(\lambda (_: (ty3 g c u t0)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 u t2) \to (ty3 g c2 t2 t0))))))).(\lambda (b: B).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H2: (ty3 g (CHead c (Bind b) u) t2 t3)).(\lambda (H3: ((\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t4: T).((pr0 t2 t4) \to (ty3 g c2 t4 t3))))))).(\lambda (t4: T).(\lambda (H4: (ty3 g (CHead c (Bind b) u) t3 t4)).(\lambda (H5: ((\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t2: T).((pr0 t3 t2) \to (ty3 g c2 t2 t4))))))).(\lambda (c2: C).(\lambda (H6: (wcpr0 c c2)).(\lambda (t5: T).(\lambda (H7: (pr0 (THead (Bind b) u t2) t5)).(let H8 \def (match H7 return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (THead (Bind b) u t2)) \to ((eq T t0 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3))))))) with [(pr0_refl t4) \Rightarrow (\lambda (H7: (eq T t4 (THead (Bind b) u t2))).(\lambda (H8: (eq T t4 t5)).(eq_ind T (THead (Bind b) u t2) (\lambda (t: T).((eq T t t5) \to (ty3 g c2 t5 (THead (Bind b) u t3)))) (\lambda (H9: (eq T (THead (Bind b) u t2) t5)).(eq_ind T (THead (Bind b) u t2) (\lambda (t: T).(ty3 g c2 t (THead (Bind b) u t3))) (ty3_bind g c2 u t0 (H1 c2 H6 u (pr0_refl u)) b t2 t3 (H3 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind b)) t2 (pr0_refl t2)) t4 (H5 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind b)) t3 (pr0_refl t3))) t5 H9)) t4 (sym_eq T t4 (THead (Bind b) u t2) H7) H8))) | (pr0_comp u1 u2 H7 t4 t5 H8 k) \Rightarrow (\lambda (H9: (eq T (THead k u1 t4) (THead (Bind b) u t2))).(\lambda (H10: (eq T (THead k u2 t5) t5)).((let H11 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead k u1 t4) (THead (Bind b) u t2) H9) in ((let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t4) (THead (Bind b) u t2) H9) in ((let H13 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t4) (THead (Bind b) u t2) H9) in (eq_ind K (Bind b) (\lambda (k0: K).((eq T u1 u) \to ((eq T t4 t2) \to ((eq T (THead k0 u2 t5) t5) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3)))))))) (\lambda (H14: (eq T u1 u)).(eq_ind T u (\lambda (t: T).((eq T t4 t2) \to ((eq T (THead (Bind b) u2 t5) t5) \to ((pr0 t u2) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3))))))) (\lambda (H15: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((eq T (THead (Bind b) u2 t5) t5) \to ((pr0 u u2) \to ((pr0 t t5) \to (ty3 g c2 t5 (THead (Bind b) u t3)))))) (\lambda (H16: (eq T (THead (Bind b) u2 t5) t5)).(eq_ind T (THead (Bind b) u2 t5) (\lambda (t: T).((pr0 u u2) \to ((pr0 t2 t5) \to (ty3 g c2 t (THead (Bind b) u t3))))) (\lambda (H17: (pr0 u u2)).(\lambda (H18: (pr0 t2 t5)).(ex_ind T (\lambda (t: T).(ty3 g (CHead c2 (Bind b) u) t4 t)) (ty3 g c2 (THead (Bind b) u2 t5) (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H19: (ty3 g (CHead c2 (Bind b) u) t4 x)).(ex_ind T (\lambda (t: T).(ty3 g (CHead c2 (Bind b) u2) t3 t)) (ty3 g c2 (THead (Bind b) u2 t5) (THead (Bind b) u t3)) (\lambda (x0: T).(\lambda (H20: (ty3 g (CHead c2 (Bind b) u2) t3 x0)).(ty3_conv g c2 (THead (Bind b) u t3) (THead (Bind b) u t4) (ty3_bind g c2 u t0 (H1 c2 H6 u (pr0_refl u)) b t3 t4 (H5 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind b)) t3 (pr0_refl t3)) x H19) (THead (Bind b) u2 t5) (THead (Bind b) u2 t3) (ty3_bind g c2 u2 t0 (H1 c2 H6 u2 H17) b t5 t3 (H3 (CHead c2 (Bind b) u2) (wcpr0_comp c c2 H6 u u2 H17 (Bind b)) t5 H18) x0 H20) (pc3_pr2_x c2 (THead (Bind b) u2 t3) (THead (Bind b) u t3) (pr2_head_1 c2 u u2 (pr2_free c2 u u2 H17) (Bind b) t3))))) (ty3_correct g (CHead c2 (Bind b) u2) t5 t3 (H3 (CHead c2 (Bind b) u2) (wcpr0_comp c c2 H6 u u2 H17 (Bind b)) t5 H18))))) (ty3_correct g (CHead c2 (Bind b) u) t3 t4 (H5 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind b)) t3 (pr0_refl t3)))))) t5 H16)) t4 (sym_eq T t4 t2 H15))) u1 (sym_eq T u1 u H14))) k (sym_eq K k (Bind b) H13))) H12)) H11)) H10 H7 H8))) | (pr0_beta u0 v1 v2 H7 t4 t5 H8) \Rightarrow (\lambda (H9: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) (THead (Bind b) u t2))).(\lambda (H10: (eq T (THead (Bind Abbr) v2 t5) t5)).((let H11 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t4)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t2) H9) in (False_ind ((eq T (THead (Bind Abbr) v2 t5) t5) \to ((pr0 v1 v2) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3))))) H11)) H10 H7 H8))) | (pr0_upsilon b0 H7 v1 v2 H8 u1 u2 H9 t4 t5 H10) \Rightarrow (\lambda (H11: (eq T (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)) (THead (Bind b) u t2))).(\lambda (H12: (eq T (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t5)).((let H13 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b0) u1 t4)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t2) H11) in (False_ind ((eq T (THead (Bind b0) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t5) \to ((not (eq B b0 Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3))))))) H13)) H12 H7 H8 H9 H10))) | (pr0_delta u1 u2 H7 t4 t5 H8 w H9) \Rightarrow (\lambda (H10: (eq T (THead (Bind Abbr) u1 t4) (THead (Bind b) u t2))).(\lambda (H11: (eq T (THead (Bind Abbr) u2 w) t5)).((let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead (Bind Abbr) u1 t4) (THead (Bind b) u t2) H10) in ((let H13 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead (Bind Abbr) u1 t4) (THead (Bind b) u t2) H10) in ((let H14 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow Abbr | (TLRef _) \Rightarrow Abbr | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow Abbr])])) (THead (Bind Abbr) u1 t4) (THead (Bind b) u t2) H10) in (eq_ind B Abbr (\lambda (b: B).((eq T u1 u) \to ((eq T t4 t2) \to ((eq T (THead (Bind Abbr) u2 w) t5) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ty3 g c2 t5 (THead (Bind b) u t3))))))))) (\lambda (H15: (eq T u1 u)).(eq_ind T u (\lambda (t: T).((eq T t4 t2) \to ((eq T (THead (Bind Abbr) u2 w) t5) \to ((pr0 t u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ty3 g c2 t5 (THead (Bind Abbr) u t3)))))))) (\lambda (H16: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((eq T (THead (Bind Abbr) u2 w) t5) \to ((pr0 u u2) \to ((pr0 t t5) \to ((subst0 O u2 t5 w) \to (ty3 g c2 t5 (THead (Bind Abbr) u t3))))))) (\lambda (H17: (eq T (THead (Bind Abbr) u2 w) t5)).(eq_ind T (THead (Bind Abbr) u2 w) (\lambda (t: T).((pr0 u u2) \to ((pr0 t2 t5) \to ((subst0 O u2 t5 w) \to (ty3 g c2 t (THead (Bind Abbr) u t3)))))) (\lambda (H18: (pr0 u u2)).(\lambda (H19: (pr0 t2 t5)).(\lambda (H20: (subst0 O u2 t5 w)).(let H21 \def (eq_ind_r B b (\lambda (b: B).(\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t2: T).((pr0 t3 t2) \to (ty3 g c2 t2 t4)))))) H5 Abbr H14) in (let H22 \def (eq_ind_r B b (\lambda (b: B).(ty3 g (CHead c (Bind b) u) t3 t4)) H4 Abbr H14) in (let H23 \def (eq_ind_r B b (\lambda (b: B).(\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t4: T).((pr0 t2 t4) \to (ty3 g c2 t4 t3)))))) H3 Abbr H14) in (let H24 \def (eq_ind_r B b (\lambda (b: B).(ty3 g (CHead c (Bind b) u) t2 t3)) H2 Abbr H14) in (ex_ind T (\lambda (t: T).(ty3 g (CHead c2 (Bind Abbr) u) t4 t)) (ty3 g c2 (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u t3)) (\lambda (x: T).(\lambda (H25: (ty3 g (CHead c2 (Bind Abbr) u) t4 x)).(ex_ind T (\lambda (t: T).(ty3 g (CHead c2 (Bind Abbr) u2) t3 t)) (ty3 g c2 (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u t3)) (\lambda (x0: T).(\lambda (H26: (ty3 g (CHead c2 (Bind Abbr) u2) t3 x0)).(ty3_conv g c2 (THead (Bind Abbr) u t3) (THead (Bind Abbr) u t4) (ty3_bind g c2 u t0 (H1 c2 H6 u (pr0_refl u)) Abbr t3 t4 (H21 (CHead c2 (Bind Abbr) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind Abbr)) t3 (pr0_refl t3)) x H25) (THead (Bind Abbr) u2 w) (THead (Bind Abbr) u2 t3) (ty3_bind g c2 u2 t0 (H1 c2 H6 u2 H18) Abbr w t3 (ty3_subst0 g (CHead c2 (Bind Abbr) u2) t5 t3 (H23 (CHead c2 (Bind Abbr) u2) (wcpr0_comp c c2 H6 u u2 H18 (Bind Abbr)) t5 H19) c2 u2 O (getl_refl Abbr c2 u2) w H20) x0 H26) (pc3_pr2_x c2 (THead (Bind Abbr) u2 t3) (THead (Bind Abbr) u t3) (pr2_head_1 c2 u u2 (pr2_free c2 u u2 H18) (Bind Abbr) t3))))) (ty3_correct g (CHead c2 (Bind Abbr) u2) t5 t3 (H23 (CHead c2 (Bind Abbr) u2) (wcpr0_comp c c2 H6 u u2 H18 (Bind Abbr)) t5 H19))))) (ty3_correct g (CHead c2 (Bind Abbr) u) t3 t4 (H21 (CHead c2 (Bind Abbr) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind Abbr)) t3 (pr0_refl t3))))))))))) t5 H17)) t4 (sym_eq T t4 t2 H16))) u1 (sym_eq T u1 u H15))) b H14)) H13)) H12)) H11 H7 H8 H9))) | (pr0_zeta b0 H7 t4 t5 H8 u0) \Rightarrow (\lambda (H9: (eq T (THead (Bind b0) u0 (lift (S O) O t4)) (THead (Bind b) u t2))).(\lambda (H10: (eq T t5 t5)).((let H11 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t4) | (TLRef _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x (S O))) O t4) | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) u0 (lift (S O) O t4)) (THead (Bind b) u t2) H9) in ((let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead (Bind b0) u0 (lift (S O) O t4)) (THead (Bind b) u t2) H9) in ((let H13 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (THead (Bind b0) u0 (lift (S O) O t4)) (THead (Bind b) u t2) H9) in (eq_ind B b (\lambda (b1: B).((eq T u0 u) \to ((eq T (lift (S O) O t4) t2) \to ((eq T t5 t5) \to ((not (eq B b1 Abst)) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3)))))))) (\lambda (H14: (eq T u0 u)).(eq_ind T u (\lambda (_: T).((eq T (lift (S O) O t4) t2) \to ((eq T t5 t5) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3))))))) (\lambda (H15: (eq T (lift (S O) O t4) t2)).(eq_ind T (lift (S O) O t4) (\lambda (_: T).((eq T t5 t5) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3)))))) (\lambda (H16: (eq T t5 t5)).(eq_ind T t5 (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 t4 t) \to (ty3 g c2 t5 (THead (Bind b) u t3))))) (\lambda (H17: (not (eq B b Abst))).(\lambda (H18: (pr0 t4 t5)).(let H19 \def (eq_ind_r T t2 (\lambda (t: T).(\forall (c2: C).((wcpr0 (CHead c (Bind b) u) c2) \to (\forall (t2: T).((pr0 t t2) \to (ty3 g c2 t2 t3)))))) H3 (lift (S O) O t4) H15) in (let H20 \def (eq_ind_r T t2 (\lambda (t: T).(ty3 g (CHead c (Bind b) u) t t3)) H2 (lift (S O) O t4) H15) in (ex_ind T (\lambda (t: T).(ty3 g (CHead c2 (Bind b) u) t4 t)) (ty3 g c2 t5 (THead (Bind b) u t3)) (\lambda (x: T).(\lambda (H4: (ty3 g (CHead c2 (Bind b) u) t4 x)).(B_ind (\lambda (b: B).((not (eq B b Abst)) \to ((ty3 g (CHead c2 (Bind b) u) t3 t4) \to ((ty3 g (CHead c2 (Bind b) u) t4 x) \to ((ty3 g (CHead c2 (Bind b) u) (lift (S O) O t5) t3) \to (ty3 g c2 t5 (THead (Bind b) u t3))))))) (\lambda (H21: (not (eq B Abbr Abst))).(\lambda (H2: (ty3 g (CHead c2 (Bind Abbr) u) t3 t4)).(\lambda (H5: (ty3 g (CHead c2 (Bind Abbr) u) t4 x)).(\lambda (H22: (ty3 g (CHead c2 (Bind Abbr) u) (lift (S O) O t5) t3)).(let H \def (ty3_gen_cabbr g (CHead c2 (Bind Abbr) u) (lift (S O) O t5) t3 H22 c2 u O (getl_refl Abbr c2 u) (CHead c2 (Bind Abbr) u) (csubst1_refl O u (CHead c2 (Bind Abbr) u)) c2 (drop_drop (Bind Abbr) O c2 c2 (drop_refl c2) u)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(subst1 O u (lift (S O) O t5) (lift (S O) O y1)))) (\lambda (_: T).(\lambda (y2: T).(subst1 O u t3 (lift (S O) O y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g c2 y1 y2))) (ty3 g c2 t5 (THead (Bind Abbr) u t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H0: (subst1 O u (lift (S O) O t5) (lift (S O) O x0))).(\lambda (H3: (subst1 O u t3 (lift (S O) O x1))).(\lambda (H23: (ty3 g c2 x0 x1)).(let H24 \def (eq_ind T x0 (\lambda (t: T).(ty3 g c2 t x1)) H23 t5 (lift_inj x0 t5 (S O) O (subst1_gen_lift_eq t5 u (lift (S O) O x0) (S O) O O (le_n O) (eq_ind_r nat (plus (S O) O) (\lambda (n: nat).(lt O n)) (le_n (plus (S O) O)) (plus O (S O)) (plus_comm O (S O))) H0))) in (ty3_conv g c2 (THead (Bind Abbr) u t3) (THead (Bind Abbr) u t4) (ty3_bind g c2 u t0 (H1 c2 H6 u (pr0_refl u)) Abbr t3 t4 H2 x H5) t5 x1 H24 (pc3_pr3_x c2 x1 (THead (Bind Abbr) u t3) (pr3_t (THead (Bind Abbr) u (lift (S O) O x1)) (THead (Bind Abbr) u t3) c2 (pr3_pr2 c2 (THead (Bind Abbr) u t3) (THead (Bind Abbr) u (lift (S O) O x1)) (pr2_free c2 (THead (Bind Abbr) u t3) (THead (Bind Abbr) u (lift (S O) O x1)) (pr0_delta1 u u (pr0_refl u) t3 t3 (pr0_refl t3) (lift (S O) O x1) H3))) x1 (pr3_pr2 c2 (THead (Bind Abbr) u (lift (S O) O x1)) x1 (pr2_free c2 (THead (Bind Abbr) u (lift (S O) O x1)) x1 (pr0_zeta Abbr H21 x1 x1 (pr0_refl x1) u)))))))))))) H)))))) (\lambda (H21: (not (eq B Abst Abst))).(\lambda (_: (ty3 g (CHead c2 (Bind Abst) u) t3 t4)).(\lambda (_: (ty3 g (CHead c2 (Bind Abst) u) t4 x)).(\lambda (_: (ty3 g (CHead c2 (Bind Abst) u) (lift (S O) O t5) t3)).(let H \def (match (H21 (refl_equal B Abst)) return (\lambda (_: False).(ty3 g c2 t5 (THead (Bind Abst) u t3))) with []) in H))))) (\lambda (H21: (not (eq B Void Abst))).(\lambda (H2: (ty3 g (CHead c2 (Bind Void) u) t3 t4)).(\lambda (H5: (ty3 g (CHead c2 (Bind Void) u) t4 x)).(\lambda (H22: (ty3 g (CHead c2 (Bind Void) u) (lift (S O) O t5) t3)).(let H \def (ty3_gen_cvoid g (CHead c2 (Bind Void) u) (lift (S O) O t5) t3 H22 c2 u O (getl_refl Void c2 u) c2 (drop_drop (Bind Void) O c2 c2 (drop_refl c2) u)) in (ex3_2_ind T T (\lambda (y1: T).(\lambda (_: T).(eq T (lift (S O) O t5) (lift (S O) O y1)))) (\lambda (_: T).(\lambda (y2: T).(eq T t3 (lift (S O) O y2)))) (\lambda (y1: T).(\lambda (y2: T).(ty3 g c2 y1 y2))) (ty3 g c2 t5 (THead (Bind Void) u t3)) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H0: (eq T (lift (S O) O t5) (lift (S O) O x0))).(\lambda (H3: (eq T t3 (lift (S O) O x1))).(\lambda (H23: (ty3 g c2 x0 x1)).(let H24 \def (eq_ind T t3 (\lambda (t: T).(ty3 g (CHead c2 (Bind Void) u) t t4)) H2 (lift (S O) O x1) H3) in (eq_ind_r T (lift (S O) O x1) (\lambda (t: T).(ty3 g c2 t5 (THead (Bind Void) u t))) (let H25 \def (eq_ind_r T x0 (\lambda (t: T).(ty3 g c2 t x1)) H23 t5 (lift_inj t5 x0 (S O) O H0)) in (ty3_conv g c2 (THead (Bind Void) u (lift (S O) O x1)) (THead (Bind Void) u t4) (ty3_bind g c2 u t0 (H1 c2 H6 u (pr0_refl u)) Void (lift (S O) O x1) t4 H24 x H5) t5 x1 H25 (pc3_pr2_x c2 x1 (THead (Bind Void) u (lift (S O) O x1)) (pr2_free c2 (THead (Bind Void) u (lift (S O) O x1)) x1 (pr0_zeta Void H21 x1 x1 (pr0_refl x1) u))))) t3 H3))))))) H)))))) b H17 (H5 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind b)) t3 (pr0_refl t3)) H4 (H19 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind b)) (lift (S O) O t5) (pr0_lift t4 t5 H18 (S O) O))))) (ty3_correct g (CHead c2 (Bind b) u) t3 t4 (H5 (CHead c2 (Bind b) u) (wcpr0_comp c c2 H6 u u (pr0_refl u) (Bind b)) t3 (pr0_refl t3)))))))) t5 (sym_eq T t5 t5 H16))) t2 H15)) u0 (sym_eq T u0 u H14))) b0 (sym_eq B b0 b H13))) H12)) H11)) H10 H7 H8))) | (pr0_epsilon t4 t5 H7 u0) \Rightarrow (\lambda (H8: (eq T (THead (Flat Cast) u0 t4) (THead (Bind b) u t2))).(\lambda (H9: (eq T t5 t5)).((let H10 \def (eq_ind T (THead (Flat Cast) u0 t4) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u t2) H8) in (False_ind ((eq T t5 t5) \to ((pr0 t4 t5) \to (ty3 g c2 t5 (THead (Bind b) u t3)))) H10)) H9 H7)))]) in (H8 (refl_equal T (THead (Bind b) u t2)) (refl_equal T t5)))))))))))))))))))) (\lambda (c: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c w u)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 w t2) \to (ty3 g c2 t2 u))))))).(\lambda (v: T).(\lambda (t0: T).(\lambda (H2: (ty3 g c v (THead (Bind Abst) u t0))).(\lambda (H3: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 v t2) \to (ty3 g c2 t2 (THead (Bind Abst) u t0)))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t2: T).(\lambda (H5: (pr0 (THead (Flat Appl) w v) t2)).(let H6 \def (match H5 return (\lambda (t: T).(\lambda (t1: T).(\lambda (_: (pr0 t t1)).((eq T t (THead (Flat Appl) w v)) \to ((eq T t1 t2) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0)))))))) with [(pr0_refl t0) \Rightarrow (\lambda (H5: (eq T t0 (THead (Flat Appl) w v))).(\lambda (H6: (eq T t0 t2)).(eq_ind T (THead (Flat Appl) w v) (\lambda (t: T).((eq T t t2) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0))))) (\lambda (H7: (eq T (THead (Flat Appl) w v) t2)).(eq_ind T (THead (Flat Appl) w v) (\lambda (t: T).(ty3 g c2 t (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (ty3_appl g c2 w u (H1 c2 H4 w (pr0_refl w)) v t0 (H3 c2 H4 v (pr0_refl v))) t2 H7)) t0 (sym_eq T t0 (THead (Flat Appl) w v) H5) H6))) | (pr0_comp u1 u2 H5 t1 t0 H6 k) \Rightarrow (\lambda (H7: (eq T (THead k u1 t1) (THead (Flat Appl) w v))).(\lambda (H8: (eq T (THead k u2 t0) t2)).((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead k u1 t1) (THead (Flat Appl) w v) H7) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t1) (THead (Flat Appl) w v) H7) in ((let H11 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t1) (THead (Flat Appl) w v) H7) in (eq_ind K (Flat Appl) (\lambda (k0: K).((eq T u1 w) \to ((eq T t1 v) \to ((eq T (THead k0 u2 t0) t2) \to ((pr0 u1 u2) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0))))))))) (\lambda (H12: (eq T u1 w)).(eq_ind T w (\lambda (t: T).((eq T t1 v) \to ((eq T (THead (Flat Appl) u2 t0) t2) \to ((pr0 t u2) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0)))))))) (\lambda (H13: (eq T t1 v)).(eq_ind T v (\lambda (t: T).((eq T (THead (Flat Appl) u2 t0) t2) \to ((pr0 w u2) \to ((pr0 t t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0))))))) (\lambda (H14: (eq T (THead (Flat Appl) u2 t0) t2)).(eq_ind T (THead (Flat Appl) u2 t0) (\lambda (t: T).((pr0 w u2) \to ((pr0 v t0) \to (ty3 g c2 t (THead (Flat Appl) w (THead (Bind Abst) u t0)))))) (\lambda (H15: (pr0 w u2)).(\lambda (H16: (pr0 v t0)).(ex_ind T (\lambda (t: T).(ty3 g c2 (THead (Bind Abst) u t0) t)) (ty3 g c2 (THead (Flat Appl) u2 t0) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H17: (ty3 g c2 (THead (Bind Abst) u t0) x)).(ex4_3_ind T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind Abst) u t2) x)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c2 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind Abst) u) t0 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c2 (Bind Abst) u) t2 t3)))) (ty3 g c2 (THead (Flat Appl) u2 t0) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (THead (Bind Abst) u x0) x)).(\lambda (H19: (ty3 g c2 u x1)).(\lambda (H20: (ty3 g (CHead c2 (Bind Abst) u) t0 x0)).(\lambda (H21: (ty3 g (CHead c2 (Bind Abst) u) x0 x2)).(ty3_conv g c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x0)) (ty3_appl g c2 w u (H1 c2 H4 w (pr0_refl w)) (THead (Bind Abst) u t0) x0 (ty3_bind g c2 u x1 H19 Abst t0 x0 H20 x2 H21)) (THead (Flat Appl) u2 t0) (THead (Flat Appl) u2 (THead (Bind Abst) u t0)) (ty3_appl g c2 u2 u (H1 c2 H4 u2 H15) t0 t0 (H3 c2 H4 t0 H16)) (pc3_pr2_x c2 (THead (Flat Appl) u2 (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pr2_head_1 c2 w u2 (pr2_free c2 w u2 H15) (Flat Appl) (THead (Bind Abst) u t0))))))))))) (ty3_gen_bind g Abst c2 u t0 x H17)))) (ty3_correct g c2 v (THead (Bind Abst) u t0) (H3 c2 H4 v (pr0_refl v)))))) t2 H14)) t1 (sym_eq T t1 v H13))) u1 (sym_eq T u1 w H12))) k (sym_eq K k (Flat Appl) H11))) H10)) H9)) H8 H5 H6))) | (pr0_beta u0 v1 v2 H5 t1 t0 H6) \Rightarrow (\lambda (H7: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u0 t1)) (THead (Flat Appl) w v))).(\lambda (H8: (eq T (THead (Bind Abbr) v2 t0) t2)).((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead (Bind Abst) u0 t1) | (TLRef _) \Rightarrow (THead (Bind Abst) u0 t1) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t1)) (THead (Flat Appl) w v) H7) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind Abst) u0 t1)) (THead (Flat Appl) w v) H7) in (eq_ind T w (\lambda (t: T).((eq T (THead (Bind Abst) u0 t1) v) \to ((eq T (THead (Bind Abbr) v2 t0) t2) \to ((pr0 t v2) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0)))))))) (\lambda (H11: (eq T (THead (Bind Abst) u0 t1) v)).(eq_ind T (THead (Bind Abst) u0 t1) (\lambda (_: T).((eq T (THead (Bind Abbr) v2 t0) t2) \to ((pr0 w v2) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0))))))) (\lambda (H12: (eq T (THead (Bind Abbr) v2 t0) t2)).(eq_ind T (THead (Bind Abbr) v2 t0) (\lambda (t: T).((pr0 w v2) \to ((pr0 t1 t0) \to (ty3 g c2 t (THead (Flat Appl) w (THead (Bind Abst) u t0)))))) (\lambda (H13: (pr0 w v2)).(\lambda (H14: (pr0 t1 t0)).(let H15 \def (eq_ind_r T v (\lambda (t: T).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (ty3 g c2 t2 (THead (Bind Abst) u t0))))))) H3 (THead (Bind Abst) u0 t1) H11) in (let H16 \def (eq_ind_r T v (\lambda (t: T).(ty3 g c t (THead (Bind Abst) u t0))) H2 (THead (Bind Abst) u0 t1) H11) in (ex_ind T (\lambda (t: T).(ty3 g c2 (THead (Bind Abst) u t0) t)) (ty3 g c2 (THead (Bind Abbr) v2 t0) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H2: (ty3 g c2 (THead (Bind Abst) u t0) x)).(ex4_3_ind T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind Abst) u t2) x)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c2 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind Abst) u) t0 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c2 (Bind Abst) u) t2 t3)))) (ty3 g c2 (THead (Bind Abbr) v2 t0) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (THead (Bind Abst) u x0) x)).(\lambda (H17: (ty3 g c2 u x1)).(\lambda (H18: (ty3 g (CHead c2 (Bind Abst) u) t0 x0)).(\lambda (H19: (ty3 g (CHead c2 (Bind Abst) u) x0 x2)).(ex4_3_ind T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind Abst) u0 t2) (THead (Bind Abst) u t0))))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c2 u0 t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind Abst) u0) t0 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c2 (Bind Abst) u0) t2 t3)))) (ty3 g c2 (THead (Bind Abbr) v2 t0) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H0: (pc3 c2 (THead (Bind Abst) u0 x3) (THead (Bind Abst) u t0))).(\lambda (H20: (ty3 g c2 u0 x4)).(\lambda (H21: (ty3 g (CHead c2 (Bind Abst) u0) t0 x3)).(\lambda (H22: (ty3 g (CHead c2 (Bind Abst) u0) x3 x5)).(and_ind (pc3 c2 u0 u) (\forall (b: B).(\forall (u: T).(pc3 (CHead c2 (Bind b) u) x3 t0))) (ty3 g c2 (THead (Bind Abbr) v2 t0) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (H23: (pc3 c2 u0 u)).(\lambda (H24: ((\forall (b: B).(\forall (u: T).(pc3 (CHead c2 (Bind b) u) x3 t0))))).(ty3_conv g c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x0)) (ty3_appl g c2 w u (H1 c2 H4 w (pr0_refl w)) (THead (Bind Abst) u t0) x0 (ty3_bind g c2 u x1 H17 Abst t0 x0 H18 x2 H19)) (THead (Bind Abbr) v2 t0) (THead (Bind Abbr) v2 x3) (ty3_bind g c2 v2 u (H1 c2 H4 v2 H13) Abbr t0 x3 (csub3_ty3_ld g c2 v2 u0 (ty3_conv g c2 u0 x4 H20 v2 u (H1 c2 H4 v2 H13) (pc3_s c2 u u0 H23)) t0 x3 H21) x5 (csub3_ty3_ld g c2 v2 u0 (ty3_conv g c2 u0 x4 H20 v2 u (H1 c2 H4 v2 H13) (pc3_s c2 u u0 H23)) x3 x5 H22)) (pc3_t (THead (Bind Abbr) v2 t0) c2 (THead (Bind Abbr) v2 x3) (pc3_head_2 c2 v2 x3 t0 (Bind Abbr) (H24 Abbr v2)) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc3_pr2_x c2 (THead (Bind Abbr) v2 t0) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pr2_free c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Bind Abbr) v2 t0) (pr0_beta u w v2 H13 t0 t0 (pr0_refl t0)))))))) (pc3_gen_abst c2 u0 u x3 t0 H0))))))))) (ty3_gen_bind g Abst c2 u0 t0 (THead (Bind Abst) u t0) (H15 c2 H4 (THead (Bind Abst) u0 t0) (pr0_comp u0 u0 (pr0_refl u0) t1 t0 H14 (Bind Abst)))))))))))) (ty3_gen_bind g Abst c2 u t0 x H2)))) (ty3_correct g c2 (THead (Bind Abst) u0 t1) (THead (Bind Abst) u t0) (H15 c2 H4 (THead (Bind Abst) u0 t1) (pr0_refl (THead (Bind Abst) u0 t1))))))))) t2 H12)) v H11)) v1 (sym_eq T v1 w H10))) H9)) H8 H5 H6))) | (pr0_upsilon b H5 v1 v2 H6 u1 u2 H7 t1 t0 H8) \Rightarrow (\lambda (H9: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (THead (Flat Appl) w v))).(\lambda (H10: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) t2)).((let H11 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow (THead (Bind b) u1 t1) | (TLRef _) \Rightarrow (THead (Bind b) u1 t1) | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (THead (Flat Appl) w v) H9) in ((let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v1 (THead (Bind b) u1 t1)) (THead (Flat Appl) w v) H9) in (eq_ind T w (\lambda (t: T).((eq T (THead (Bind b) u1 t1) v) \to ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) t2) \to ((not (eq B b Abst)) \to ((pr0 t v2) \to ((pr0 u1 u2) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0)))))))))) (\lambda (H13: (eq T (THead (Bind b) u1 t1) v)).(eq_ind T (THead (Bind b) u1 t1) (\lambda (_: T).((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) t2) \to ((not (eq B b Abst)) \to ((pr0 w v2) \to ((pr0 u1 u2) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0))))))))) (\lambda (H14: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) t2)).(eq_ind T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) (\lambda (t: T).((not (eq B b Abst)) \to ((pr0 w v2) \to ((pr0 u1 u2) \to ((pr0 t1 t0) \to (ty3 g c2 t (THead (Flat Appl) w (THead (Bind Abst) u t0)))))))) (\lambda (H15: (not (eq B b Abst))).(\lambda (H16: (pr0 w v2)).(\lambda (H17: (pr0 u1 u2)).(\lambda (H18: (pr0 t1 t0)).(let H19 \def (eq_ind_r T v (\lambda (t: T).(\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t t2) \to (ty3 g c2 t2 (THead (Bind Abst) u t0))))))) H3 (THead (Bind b) u1 t1) H13) in (let H20 \def (eq_ind_r T v (\lambda (t: T).(ty3 g c t (THead (Bind Abst) u t0))) H2 (THead (Bind b) u1 t1) H13) in (ex_ind T (\lambda (t: T).(ty3 g c2 (THead (Bind Abst) u t0) t)) (ty3 g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x: T).(\lambda (H2: (ty3 g c2 (THead (Bind Abst) u t0) x)).(let H3 \def H2 in (ex4_3_ind T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind Abst) u t2) x)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c2 u t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind Abst) u) t0 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c2 (Bind Abst) u) t2 t3)))) (ty3 g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (THead (Bind Abst) u x0) x)).(\lambda (H22: (ty3 g c2 u x1)).(\lambda (H23: (ty3 g (CHead c2 (Bind Abst) u) t0 x0)).(\lambda (H24: (ty3 g (CHead c2 (Bind Abst) u) x0 x2)).(ex4_3_ind T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind b) u2 t2) (THead (Bind Abst) u t0))))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c2 u2 t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) u2) t0 t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c2 (Bind b) u2) t2 t3)))) (ty3 g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x3: T).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H0: (pc3 c2 (THead (Bind b) u2 x3) (THead (Bind Abst) u t0))).(\lambda (H25: (ty3 g c2 u2 x4)).(\lambda (H26: (ty3 g (CHead c2 (Bind b) u2) t0 x3)).(\lambda (_: (ty3 g (CHead c2 (Bind b) u2) x3 x5)).(let H28 \def (eq_ind T (lift (S O) O (THead (Bind Abst) u t0)) (\lambda (t: T).(pc3 (CHead c2 (Bind b) u2) x3 t)) (pc3_gen_not_abst b H15 c2 x3 t0 u2 u H0) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)) (lift_bind Abst u t0 (S O) O)) in (let H29 \def (eq_ind T (lift (S O) O (THead (Bind Abst) u t0)) (\lambda (t: T).(ty3 g (CHead c2 (Bind b) u2) t (lift (S O) O x))) (ty3_lift g c2 (THead (Bind Abst) u t0) x H2 (CHead c2 (Bind b) u2) O (S O) (drop_drop (Bind b) O c2 c2 (drop_refl c2) u2)) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)) (lift_bind Abst u t0 (S O) O)) in (ex4_3_ind T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 (CHead c2 (Bind b) u2) (THead (Bind Abst) (lift (S O) O u) t2) (lift (S O) O x))))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) u2) (lift (S O) O u) t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead (CHead c2 (Bind b) u2) (Bind Abst) (lift (S O) O u)) (lift (S O) (S O) t0) t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead (CHead c2 (Bind b) u2) (Bind Abst) (lift (S O) O u)) t2 t3)))) (ty3 g c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) (THead (Flat Appl) w (THead (Bind Abst) u t0))) (\lambda (x6: T).(\lambda (x7: T).(\lambda (x8: T).(\lambda (_: (pc3 (CHead c2 (Bind b) u2) (THead (Bind Abst) (lift (S O) O u) x6) (lift (S O) O x))).(\lambda (H31: (ty3 g (CHead c2 (Bind b) u2) (lift (S O) O u) x7)).(\lambda (H32: (ty3 g (CHead (CHead c2 (Bind b) u2) (Bind Abst) (lift (S O) O u)) (lift (S O) (S O) t0) x6)).(\lambda (H33: (ty3 g (CHead (CHead c2 (Bind b) u2) (Bind Abst) (lift (S O) O u)) x6 x8)).(ty3_conv g c2 (THead (Flat Appl) w (THead (Bind Abst) u t0)) (THead (Flat Appl) w (THead (Bind Abst) u x0)) (ty3_appl g c2 w u (H1 c2 H4 w (pr0_refl w)) (THead (Bind Abst) u t0) x0 (ty3_bind g c2 u x1 H22 Abst t0 x0 H23 x2 H24)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t0)) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)))) (ty3_bind g c2 u2 x4 H25 b (THead (Flat Appl) (lift (S O) O v2) t0) (THead (Flat Appl) (lift (S O) O v2) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0))) (ty3_appl g (CHead c2 (Bind b) u2) (lift (S O) O v2) (lift (S O) O u) (ty3_lift g c2 v2 u (H1 c2 H4 v2 H16) (CHead c2 (Bind b) u2) O (S O) (drop_drop (Bind b) O c2 c2 (drop_refl c2) u2)) t0 (lift (S O) (S O) t0) (ty3_conv g (CHead c2 (Bind b) u2) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)) (THead (Bind Abst) (lift (S O) O u) x6) (ty3_bind g (CHead c2 (Bind b) u2) (lift (S O) O u) x7 H31 Abst (lift (S O) (S O) t0) x6 H32 x8 H33) t0 x3 H26 H28)) (THead (Flat Appl) (lift (S O) O v2) (THead (Bind Abst) (lift (S O) O u) x6)) (ty3_appl g (CHead c2 (Bind b) u2) (lift (S O) O v2) (lift (S O) O u) (ty3_lift g c2 v2 u (H1 c2 H4 v2 H16) (CHead c2 (Bind b) u2) O (S O) (drop_drop (Bind b) O c2 c2 (drop_refl c2) u2)) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)) x6 (ty3_bind g (CHead c2 (Bind b) u2) (lift (S O) O u) x7 H31 Abst (lift (S O) (S O) t0) x6 H32 x8 H33))) (eq_ind T (lift (S O) O (THead (Bind Abst) u t0)) (\lambda (t: T).(pc3 c2 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t)) (THead (Flat Appl) w (THead (Bind Abst) u t0)))) (pc3_pc1 (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O (THead (Bind Abst) u t0)))) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc1_pr0_u2 (THead (Flat Appl) v2 (THead (Bind b) u2 (lift (S O) O (THead (Bind Abst) u t0)))) (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) (lift (S O) O (THead (Bind Abst) u t0)))) (pr0_upsilon b H15 v2 v2 (pr0_refl v2) u2 u2 (pr0_refl u2) (lift (S O) O (THead (Bind Abst) u t0)) (lift (S O) O (THead (Bind Abst) u t0)) (pr0_refl (lift (S O) O (THead (Bind Abst) u t0)))) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc1_s (THead (Flat Appl) v2 (THead (Bind b) u2 (lift (S O) O (THead (Bind Abst) u t0)))) (THead (Flat Appl) w (THead (Bind Abst) u t0)) (pc1_head w v2 (pc1_pr0_r w v2 H16) (THead (Bind Abst) u t0) (THead (Bind b) u2 (lift (S O) O (THead (Bind Abst) u t0))) (pc1_pr0_x (THead (Bind Abst) u t0) (THead (Bind b) u2 (lift (S O) O (THead (Bind Abst) u t0))) (pr0_zeta b H15 (THead (Bind Abst) u t0) (THead (Bind Abst) u t0) (pr0_refl (THead (Bind Abst) u t0)) u2)) (Flat Appl)))) c2) (THead (Bind Abst) (lift (S O) O u) (lift (S O) (S O) t0)) (lift_bind Abst u t0 (S O) O)))))))))) (ty3_gen_bind g Abst (CHead c2 (Bind b) u2) (lift (S O) O u) (lift (S O) (S O) t0) (lift (S O) O x) H29))))))))))) (ty3_gen_bind g b c2 u2 t0 (THead (Bind Abst) u t0) (H19 c2 H4 (THead (Bind b) u2 t0) (pr0_comp u1 u2 H17 t1 t0 H18 (Bind b)))))))))))) (ty3_gen_bind g Abst c2 u t0 x H3))))) (ty3_correct g c2 (THead (Bind b) u2 t0) (THead (Bind Abst) u t0) (H19 c2 H4 (THead (Bind b) u2 t0) (pr0_comp u1 u2 H17 t1 t0 H18 (Bind b))))))))))) t2 H14)) v H13)) v1 (sym_eq T v1 w H12))) H11)) H10 H5 H6 H7 H8))) | (pr0_delta u1 u2 H5 t1 t0 H6 w0 H7) \Rightarrow (\lambda (H8: (eq T (THead (Bind Abbr) u1 t1) (THead (Flat Appl) w v))).(\lambda (H9: (eq T (THead (Bind Abbr) u2 w0) t2)).((let H10 \def (eq_ind T (THead (Bind Abbr) u1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) w v) H8) in (False_ind ((eq T (THead (Bind Abbr) u2 w0) t2) \to ((pr0 u1 u2) \to ((pr0 t1 t0) \to ((subst0 O u2 t0 w0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0))))))) H10)) H9 H5 H6 H7))) | (pr0_zeta b H5 t1 t0 H6 u0) \Rightarrow (\lambda (H7: (eq T (THead (Bind b) u0 (lift (S O) O t1)) (THead (Flat Appl) w v))).(\lambda (H8: (eq T t0 t2)).((let H9 \def (eq_ind T (THead (Bind b) u0 (lift (S O) O t1)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) w v) H7) in (False_ind ((eq T t0 t2) \to ((not (eq B b Abst)) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0)))))) H9)) H8 H5 H6))) | (pr0_epsilon t1 t0 H5 u0) \Rightarrow (\lambda (H6: (eq T (THead (Flat Cast) u0 t1) (THead (Flat Appl) w v))).(\lambda (H7: (eq T t0 t2)).((let H8 \def (eq_ind T (THead (Flat Cast) u0 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) w v) H6) in (False_ind ((eq T t0 t2) \to ((pr0 t1 t0) \to (ty3 g c2 t2 (THead (Flat Appl) w (THead (Bind Abst) u t0))))) H8)) H7 H5)))]) in (H6 (refl_equal T (THead (Flat Appl) w v)) (refl_equal T t2)))))))))))))))) (\lambda (c: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (ty3 g c t2 t3)).(\lambda (H1: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t4: T).((pr0 t2 t4) \to (ty3 g c2 t4 t3))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c t3 t0)).(\lambda (H3: ((\forall (c2: C).((wcpr0 c c2) \to (\forall (t2: T).((pr0 t3 t2) \to (ty3 g c2 t2 t0))))))).(\lambda (c2: C).(\lambda (H4: (wcpr0 c c2)).(\lambda (t4: T).(\lambda (H5: (pr0 (THead (Flat Cast) t3 t2) t4)).(let H6 \def (match H5 return (\lambda (t: T).(\lambda (t0: T).(\lambda (_: (pr0 t t0)).((eq T t (THead (Flat Cast) t3 t2)) \to ((eq T t0 t4) \to (ty3 g c2 t4 t3)))))) with [(pr0_refl t) \Rightarrow (\lambda (H5: (eq T t (THead (Flat Cast) t3 t2))).(\lambda (H6: (eq T t t4)).(eq_ind T (THead (Flat Cast) t3 t2) (\lambda (t0: T).((eq T t0 t4) \to (ty3 g c2 t4 t3))) (\lambda (H7: (eq T (THead (Flat Cast) t3 t2) t4)).(eq_ind T (THead (Flat Cast) t3 t2) (\lambda (t0: T).(ty3 g c2 t0 t3)) (ty3_cast g c2 t2 t3 (H1 c2 H4 t2 (pr0_refl t2)) t0 (H3 c2 H4 t3 (pr0_refl t3))) t4 H7)) t (sym_eq T t (THead (Flat Cast) t3 t2) H5) H6))) | (pr0_comp u1 u2 H5 t4 t5 H6 k) \Rightarrow (\lambda (H7: (eq T (THead k u1 t4) (THead (Flat Cast) t3 t2))).(\lambda (H8: (eq T (THead k u2 t5) t4)).((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead k u1 t4) (THead (Flat Cast) t3 t2) H7) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u1 | (TLRef _) \Rightarrow u1 | (THead _ t _) \Rightarrow t])) (THead k u1 t4) (THead (Flat Cast) t3 t2) H7) in ((let H11 \def (f_equal T K (\lambda (e: T).(match e return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u1 t4) (THead (Flat Cast) t3 t2) H7) in (eq_ind K (Flat Cast) (\lambda (k0: K).((eq T u1 t3) \to ((eq T t4 t2) \to ((eq T (THead k0 u2 t5) t4) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ty3 g c2 t4 t3))))))) (\lambda (H12: (eq T u1 t3)).(eq_ind T t3 (\lambda (t: T).((eq T t4 t2) \to ((eq T (THead (Flat Cast) u2 t5) t4) \to ((pr0 t u2) \to ((pr0 t4 t5) \to (ty3 g c2 t4 t3)))))) (\lambda (H13: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Cast) u2 t5) t4) \to ((pr0 t3 u2) \to ((pr0 t t5) \to (ty3 g c2 t4 t3))))) (\lambda (H14: (eq T (THead (Flat Cast) u2 t5) t4)).(eq_ind T (THead (Flat Cast) u2 t5) (\lambda (t: T).((pr0 t3 u2) \to ((pr0 t2 t5) \to (ty3 g c2 t t3)))) (\lambda (H15: (pr0 t3 u2)).(\lambda (H16: (pr0 t2 t5)).(ty3_conv g c2 t3 t0 (H3 c2 H4 t3 (pr0_refl t3)) (THead (Flat Cast) u2 t5) u2 (ty3_cast g c2 t5 u2 (ty3_conv g c2 u2 t0 (H3 c2 H4 u2 H15) t5 t3 (H1 c2 H4 t5 H16) (pc3_pr2_r c2 t3 u2 (pr2_free c2 t3 u2 H15))) t0 (H3 c2 H4 u2 H15)) (pc3_pr2_x c2 u2 t3 (pr2_free c2 t3 u2 H15))))) t4 H14)) t4 (sym_eq T t4 t2 H13))) u1 (sym_eq T u1 t3 H12))) k (sym_eq K k (Flat Cast) H11))) H10)) H9)) H8 H5 H6))) | (pr0_beta u v1 v2 H5 t4 t5 H6) \Rightarrow (\lambda (H7: (eq T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) (THead (Flat Cast) t3 t2))).(\lambda (H8: (eq T (THead (Bind Abbr) v2 t5) t4)).((let H9 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind Abst) u t4)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) t3 t2) H7) in (False_ind ((eq T (THead (Bind Abbr) v2 t5) t4) \to ((pr0 v1 v2) \to ((pr0 t4 t5) \to (ty3 g c2 t4 t3)))) H9)) H8 H5 H6))) | (pr0_upsilon b H5 v1 v2 H6 u1 u2 H7 t4 t5 H8) \Rightarrow (\lambda (H9: (eq T (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) (THead (Flat Cast) t3 t2))).(\lambda (H10: (eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t4)).((let H11 \def (eq_ind T (THead (Flat Appl) v1 (THead (Bind b) u1 t4)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) t3 t2) H9) in (False_ind ((eq T (THead (Bind b) u2 (THead (Flat Appl) (lift (S O) O v2) t5)) t4) \to ((not (eq B b Abst)) \to ((pr0 v1 v2) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to (ty3 g c2 t4 t3)))))) H11)) H10 H5 H6 H7 H8))) | (pr0_delta u1 u2 H5 t4 t5 H6 w H7) \Rightarrow (\lambda (H8: (eq T (THead (Bind Abbr) u1 t4) (THead (Flat Cast) t3 t2))).(\lambda (H9: (eq T (THead (Bind Abbr) u2 w) t4)).((let H10 \def (eq_ind T (THead (Bind Abbr) u1 t4) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) t3 t2) H8) in (False_ind ((eq T (THead (Bind Abbr) u2 w) t4) \to ((pr0 u1 u2) \to ((pr0 t4 t5) \to ((subst0 O u2 t5 w) \to (ty3 g c2 t4 t3))))) H10)) H9 H5 H6 H7))) | (pr0_zeta b H5 t4 t5 H6 u) \Rightarrow (\lambda (H7: (eq T (THead (Bind b) u (lift (S O) O t4)) (THead (Flat Cast) t3 t2))).(\lambda (H8: (eq T t5 t4)).((let H9 \def (eq_ind T (THead (Bind b) u (lift (S O) O t4)) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) t3 t2) H7) in (False_ind ((eq T t5 t4) \to ((not (eq B b Abst)) \to ((pr0 t4 t5) \to (ty3 g c2 t4 t3)))) H9)) H8 H5 H6))) | (pr0_epsilon t4 t5 H5 u) \Rightarrow (\lambda (H6: (eq T (THead (Flat Cast) u t4) (THead (Flat Cast) t3 t2))).(\lambda (H7: (eq T t5 t4)).((let H8 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) u t4) (THead (Flat Cast) t3 t2) H6) in ((let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) u t4) (THead (Flat Cast) t3 t2) H6) in (eq_ind T t3 (\lambda (_: T).((eq T t4 t2) \to ((eq T t5 t4) \to ((pr0 t4 t5) \to (ty3 g c2 t4 t3))))) (\lambda (H10: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((eq T t5 t4) \to ((pr0 t t5) \to (ty3 g c2 t4 t3)))) (\lambda (H11: (eq T t5 t4)).(eq_ind T t4 (\lambda (t: T).((pr0 t2 t) \to (ty3 g c2 t4 t3))) (\lambda (H12: (pr0 t2 t4)).(H1 c2 H4 t4 H12)) t5 (sym_eq T t5 t4 H11))) t4 (sym_eq T t4 t2 H10))) u (sym_eq T u t3 H9))) H8)) H7 H5)))]) in (H6 (refl_equal T (THead (Flat Cast) t3 t2)) (refl_equal T t4))))))))))))))) c1 t1 t H))))). theorem ty3_sred_pr1: \forall (c: C).(\forall (t1: T).(\forall (t2: T).((pr1 t1 t2) \to (\forall (g: G).(\forall (t: T).((ty3 g c t1 t) \to (ty3 g c t2 t))))))) @@ -3126,12 +3126,12 @@ theorem ty3_sconv: theorem ty3_tau0: \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).((ty3 g c u t1) \to (\forall (t2: T).((tau0 g c u t2) \to (ty3 g c u t2))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (H: (ty3 g c u t1)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (_: T).(\forall (t2: T).((tau0 g c0 t t2) \to (ty3 g c0 t t2)))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: ((\forall (t3: T).((tau0 g c0 t2 t3) \to (ty3 g c0 t2 t3))))).(\lambda (u0: T).(\lambda (t3: T).(\lambda (_: (ty3 g c0 u0 t3)).(\lambda (H3: ((\forall (t2: T).((tau0 g c0 u0 t2) \to (ty3 g c0 u0 t2))))).(\lambda (_: (pc3 c0 t3 t2)).(\lambda (t0: T).(\lambda (H5: (tau0 g c0 u0 t0)).(H3 t0 H5))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (t2: T).(\lambda (H0: (tau0 g c0 (TSort m) t2)).(let H1 \def (match H0 return (\lambda (_: ?).(\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).((eq C c c0) \to ((eq T t (TSort m)) \to ((eq T t0 t2) \to (ty3 g c0 (TSort m) t2)))))))) with [(tau0_sort c0 n) \Rightarrow (\lambda (H0: (eq C c0 c0)).(\lambda (H1: (eq T (TSort n) (TSort m))).(\lambda (H2: (eq T (TSort (next g n)) t2)).(eq_ind C c0 (\lambda (_: C).((eq T (TSort n) (TSort m)) \to ((eq T (TSort (next g n)) t2) \to (ty3 g c0 (TSort m) t2)))) (\lambda (H3: (eq T (TSort n) (TSort m))).(let H4 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort n) \Rightarrow n | (TLRef _) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TSort n) (TSort m) H3) in (eq_ind nat m (\lambda (n0: nat).((eq T (TSort (next g n0)) t2) \to (ty3 g c0 (TSort m) t2))) (\lambda (H5: (eq T (TSort (next g m)) t2)).(eq_ind T (TSort (next g m)) (\lambda (t: T).(ty3 g c0 (TSort m) t)) (ty3_sort g c0 m) t2 H5)) n (sym_eq nat n m H4)))) c0 (sym_eq C c0 c0 H0) H1 H2)))) | (tau0_abbr c0 d v i H0 w H1) \Rightarrow (\lambda (H2: (eq C c0 c0)).(\lambda (H3: (eq T (TLRef i) (TSort m))).(\lambda (H4: (eq T (lift (S i) O w) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (TSort m)) \to ((eq T (lift (S i) O w) t2) \to ((getl i c (CHead d (Bind Abbr) v)) \to ((tau0 g d v w) \to (ty3 g c0 (TSort m) t2)))))) (\lambda (H5: (eq T (TLRef i) (TSort m))).(let H6 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort m) H5) in (False_ind ((eq T (lift (S i) O w) t2) \to ((getl i c0 (CHead d (Bind Abbr) v)) \to ((tau0 g d v w) \to (ty3 g c0 (TSort m) t2)))) H6))) c0 (sym_eq C c0 c0 H2) H3 H4 H0 H1)))) | (tau0_abst c0 d v i H0 w H1) \Rightarrow (\lambda (H2: (eq C c0 c0)).(\lambda (H3: (eq T (TLRef i) (TSort m))).(\lambda (H4: (eq T (lift (S i) O v) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (TSort m)) \to ((eq T (lift (S i) O v) t2) \to ((getl i c (CHead d (Bind Abst) v)) \to ((tau0 g d v w) \to (ty3 g c0 (TSort m) t2)))))) (\lambda (H5: (eq T (TLRef i) (TSort m))).(let H6 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort m) H5) in (False_ind ((eq T (lift (S i) O v) t2) \to ((getl i c0 (CHead d (Bind Abst) v)) \to ((tau0 g d v w) \to (ty3 g c0 (TSort m) t2)))) H6))) c0 (sym_eq C c0 c0 H2) H3 H4 H0 H1)))) | (tau0_bind b c0 v t1 t0 H0) \Rightarrow (\lambda (H1: (eq C c0 c0)).(\lambda (H2: (eq T (THead (Bind b) v t1) (TSort m))).(\lambda (H3: (eq T (THead (Bind b) v t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Bind b) v t1) (TSort m)) \to ((eq T (THead (Bind b) v t0) t2) \to ((tau0 g (CHead c (Bind b) v) t1 t0) \to (ty3 g c0 (TSort m) t2))))) (\lambda (H4: (eq T (THead (Bind b) v t1) (TSort m))).(let H5 \def (eq_ind T (THead (Bind b) v t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort m) H4) in (False_ind ((eq T (THead (Bind b) v t0) t2) \to ((tau0 g (CHead c0 (Bind b) v) t1 t0) \to (ty3 g c0 (TSort m) t2))) H5))) c0 (sym_eq C c0 c0 H1) H2 H3 H0)))) | (tau0_appl c0 v t1 t0 H0) \Rightarrow (\lambda (H1: (eq C c0 c0)).(\lambda (H2: (eq T (THead (Flat Appl) v t1) (TSort m))).(\lambda (H3: (eq T (THead (Flat Appl) v t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Appl) v t1) (TSort m)) \to ((eq T (THead (Flat Appl) v t0) t2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (TSort m) t2))))) (\lambda (H4: (eq T (THead (Flat Appl) v t1) (TSort m))).(let H5 \def (eq_ind T (THead (Flat Appl) v t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort m) H4) in (False_ind ((eq T (THead (Flat Appl) v t0) t2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (TSort m) t2))) H5))) c0 (sym_eq C c0 c0 H1) H2 H3 H0)))) | (tau0_cast c0 v1 v2 H0 t1 t0 H1) \Rightarrow (\lambda (H2: (eq C c0 c0)).(\lambda (H3: (eq T (THead (Flat Cast) v1 t1) (TSort m))).(\lambda (H4: (eq T (THead (Flat Cast) v2 t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Cast) v1 t1) (TSort m)) \to ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c v1 v2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (TSort m) t2)))))) (\lambda (H5: (eq T (THead (Flat Cast) v1 t1) (TSort m))).(let H6 \def (eq_ind T (THead (Flat Cast) v1 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort m) H5) in (False_ind ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c0 v1 v2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (TSort m) t2)))) H6))) c0 (sym_eq C c0 c0 H2) H3 H4 H0 H1))))]) in (H1 (refl_equal C c0) (refl_equal T (TSort m)) (refl_equal T t2))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) u0))).(\lambda (t: T).(\lambda (_: (ty3 g d u0 t)).(\lambda (H2: ((\forall (t2: T).((tau0 g d u0 t2) \to (ty3 g d u0 t2))))).(\lambda (t2: T).(\lambda (H3: (tau0 g c0 (TLRef n) t2)).(let H4 \def (match H3 return (\lambda (_: ?).(\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).((eq C c c0) \to ((eq T t (TLRef n)) \to ((eq T t0 t2) \to (ty3 g c0 (TLRef n) t2)))))))) with [(tau0_sort c0 n0) \Rightarrow (\lambda (H3: (eq C c0 c0)).(\lambda (H4: (eq T (TSort n0) (TLRef n))).(\lambda (H5: (eq T (TSort (next g n0)) t2)).(eq_ind C c0 (\lambda (_: C).((eq T (TSort n0) (TLRef n)) \to ((eq T (TSort (next g n0)) t2) \to (ty3 g c0 (TLRef n) t2)))) (\lambda (H6: (eq T (TSort n0) (TLRef n))).(let H7 \def (eq_ind T (TSort n0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef n) H6) in (False_ind ((eq T (TSort (next g n0)) t2) \to (ty3 g c0 (TLRef n) t2)) H7))) c0 (sym_eq C c0 c0 H3) H4 H5)))) | (tau0_abbr c0 d0 v i H3 w H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (TLRef i) (TLRef n))).(\lambda (H7: (eq T (lift (S i) O w) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O w) t2) \to ((getl i c (CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H8: (eq T (TLRef i) (TLRef n))).(let H9 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H8) in (eq_ind nat n (\lambda (n0: nat).((eq T (lift (S n0) O w) t2) \to ((getl n0 c0 (CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H10: (eq T (lift (S n) O w) t2)).(eq_ind T (lift (S n) O w) (\lambda (t: T).((getl n c0 (CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t)))) (\lambda (H11: (getl n c0 (CHead d0 (Bind Abbr) v))).(\lambda (H12: (tau0 g d0 v w)).(let H13 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead d0 (Bind Abbr) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind Abbr) v) H11)) in (let H14 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u0) (CHead d0 (Bind Abbr) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind Abbr) v) H11)) in ((let H15 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u0) (CHead d0 (Bind Abbr) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind Abbr) v) H11)) in (\lambda (H16: (eq C d d0)).(let H17 \def (eq_ind_r T v (\lambda (t: T).(getl n c0 (CHead d0 (Bind Abbr) t))) H13 u0 H15) in (let H18 \def (eq_ind_r T v (\lambda (t: T).(tau0 g d0 t w)) H12 u0 H15) in (let H19 \def (eq_ind_r C d0 (\lambda (c: C).(getl n c0 (CHead c (Bind Abbr) u0))) H17 d H16) in (let H20 \def (eq_ind_r C d0 (\lambda (c: C).(tau0 g c u0 w)) H18 d H16) in (ty3_abbr g n c0 d u0 H19 w (H2 w H20)))))))) H14))))) t2 H10)) i (sym_eq nat i n H9)))) c0 (sym_eq C c0 c0 H5) H6 H7 H3 H4)))) | (tau0_abst c0 d0 v i H3 w H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (TLRef i) (TLRef n))).(\lambda (H7: (eq T (lift (S i) O v) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O v) t2) \to ((getl i c (CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H8: (eq T (TLRef i) (TLRef n))).(let H9 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H8) in (eq_ind nat n (\lambda (n0: nat).((eq T (lift (S n0) O v) t2) \to ((getl n0 c0 (CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H10: (eq T (lift (S n) O v) t2)).(eq_ind T (lift (S n) O v) (\lambda (t: T).((getl n c0 (CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t)))) (\lambda (H11: (getl n c0 (CHead d0 (Bind Abst) v))).(\lambda (_: (tau0 g d0 v w)).(let H2 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead d0 (Bind Abst) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind Abst) v) H11)) in (let H13 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d0 (Bind Abst) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind Abst) v) H11)) in (False_ind (ty3 g c0 (TLRef n) (lift (S n) O v)) H13))))) t2 H10)) i (sym_eq nat i n H9)))) c0 (sym_eq C c0 c0 H5) H6 H7 H3 H4)))) | (tau0_bind b c0 v t1 t0 H3) \Rightarrow (\lambda (H4: (eq C c0 c0)).(\lambda (H5: (eq T (THead (Bind b) v t1) (TLRef n))).(\lambda (H6: (eq T (THead (Bind b) v t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Bind b) v t1) (TLRef n)) \to ((eq T (THead (Bind b) v t0) t2) \to ((tau0 g (CHead c (Bind b) v) t1 t0) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H7: (eq T (THead (Bind b) v t1) (TLRef n))).(let H8 \def (eq_ind T (THead (Bind b) v t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H7) in (False_ind ((eq T (THead (Bind b) v t0) t2) \to ((tau0 g (CHead c0 (Bind b) v) t1 t0) \to (ty3 g c0 (TLRef n) t2))) H8))) c0 (sym_eq C c0 c0 H4) H5 H6 H3)))) | (tau0_appl c0 v t1 t0 H3) \Rightarrow (\lambda (H4: (eq C c0 c0)).(\lambda (H5: (eq T (THead (Flat Appl) v t1) (TLRef n))).(\lambda (H6: (eq T (THead (Flat Appl) v t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Appl) v t1) (TLRef n)) \to ((eq T (THead (Flat Appl) v t0) t2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H7: (eq T (THead (Flat Appl) v t1) (TLRef n))).(let H8 \def (eq_ind T (THead (Flat Appl) v t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H7) in (False_ind ((eq T (THead (Flat Appl) v t0) t2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (TLRef n) t2))) H8))) c0 (sym_eq C c0 c0 H4) H5 H6 H3)))) | (tau0_cast c0 v1 v2 H3 t1 t0 H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (THead (Flat Cast) v1 t1) (TLRef n))).(\lambda (H7: (eq T (THead (Flat Cast) v2 t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Cast) v1 t1) (TLRef n)) \to ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c v1 v2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H8: (eq T (THead (Flat Cast) v1 t1) (TLRef n))).(let H9 \def (eq_ind T (THead (Flat Cast) v1 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H8) in (False_ind ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c0 v1 v2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (TLRef n) t2)))) H9))) c0 (sym_eq C c0 c0 H5) H6 H7 H3 H4))))]) in (H4 (refl_equal C c0) (refl_equal T (TLRef n)) (refl_equal T t2))))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abst) u0))).(\lambda (t: T).(\lambda (H1: (ty3 g d u0 t)).(\lambda (_: ((\forall (t2: T).((tau0 g d u0 t2) \to (ty3 g d u0 t2))))).(\lambda (t2: T).(\lambda (H3: (tau0 g c0 (TLRef n) t2)).(let H4 \def (match H3 return (\lambda (_: ?).(\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).((eq C c c0) \to ((eq T t (TLRef n)) \to ((eq T t0 t2) \to (ty3 g c0 (TLRef n) t2)))))))) with [(tau0_sort c0 n0) \Rightarrow (\lambda (H3: (eq C c0 c0)).(\lambda (H4: (eq T (TSort n0) (TLRef n))).(\lambda (H5: (eq T (TSort (next g n0)) t2)).(eq_ind C c0 (\lambda (_: C).((eq T (TSort n0) (TLRef n)) \to ((eq T (TSort (next g n0)) t2) \to (ty3 g c0 (TLRef n) t2)))) (\lambda (H6: (eq T (TSort n0) (TLRef n))).(let H7 \def (eq_ind T (TSort n0) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef n) H6) in (False_ind ((eq T (TSort (next g n0)) t2) \to (ty3 g c0 (TLRef n) t2)) H7))) c0 (sym_eq C c0 c0 H3) H4 H5)))) | (tau0_abbr c0 d0 v i H3 w H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (TLRef i) (TLRef n))).(\lambda (H7: (eq T (lift (S i) O w) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O w) t2) \to ((getl i c (CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H8: (eq T (TLRef i) (TLRef n))).(let H9 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H8) in (eq_ind nat n (\lambda (n0: nat).((eq T (lift (S n0) O w) t2) \to ((getl n0 c0 (CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H10: (eq T (lift (S n) O w) t2)).(eq_ind T (lift (S n) O w) (\lambda (t: T).((getl n c0 (CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t)))) (\lambda (H11: (getl n c0 (CHead d0 (Bind Abbr) v))).(\lambda (_: (tau0 g d0 v w)).(let H2 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead d0 (Bind Abbr) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind Abbr) v) H11)) in (let H13 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d0 (Bind Abbr) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind Abbr) v) H11)) in (False_ind (ty3 g c0 (TLRef n) (lift (S n) O w)) H13))))) t2 H10)) i (sym_eq nat i n H9)))) c0 (sym_eq C c0 c0 H5) H6 H7 H3 H4)))) | (tau0_abst c0 d0 v i H3 w H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (TLRef i) (TLRef n))).(\lambda (H7: (eq T (lift (S i) O v) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O v) t2) \to ((getl i c (CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H8: (eq T (TLRef i) (TLRef n))).(let H9 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: ?).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H8) in (eq_ind nat n (\lambda (n0: nat).((eq T (lift (S n0) O v) t2) \to ((getl n0 c0 (CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H10: (eq T (lift (S n) O v) t2)).(eq_ind T (lift (S n) O v) (\lambda (t: T).((getl n c0 (CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t)))) (\lambda (H11: (getl n c0 (CHead d0 (Bind Abst) v))).(\lambda (H12: (tau0 g d0 v w)).(let H2 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead d0 (Bind Abst) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind Abst) v) H11)) in (let H13 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u0) (CHead d0 (Bind Abst) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind Abst) v) H11)) in ((let H14 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u0) (CHead d0 (Bind Abst) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind Abst) v) H11)) in (\lambda (H15: (eq C d d0)).(let H16 \def (eq_ind_r T v (\lambda (t: T).(getl n c0 (CHead d0 (Bind Abst) t))) H2 u0 H14) in (let H17 \def (eq_ind_r T v (\lambda (t: T).(tau0 g d0 t w)) H12 u0 H14) in (eq_ind T u0 (\lambda (t: T).(ty3 g c0 (TLRef n) (lift (S n) O t))) (let H18 \def (eq_ind_r C d0 (\lambda (c: C).(getl n c0 (CHead c (Bind Abst) u0))) H16 d H15) in (let H19 \def (eq_ind_r C d0 (\lambda (c: C).(tau0 g c u0 w)) H17 d H15) in (ty3_abst g n c0 d u0 H18 t H1))) v H14))))) H13))))) t2 H10)) i (sym_eq nat i n H9)))) c0 (sym_eq C c0 c0 H5) H6 H7 H3 H4)))) | (tau0_bind b c0 v t1 t0 H3) \Rightarrow (\lambda (H4: (eq C c0 c0)).(\lambda (H5: (eq T (THead (Bind b) v t1) (TLRef n))).(\lambda (H6: (eq T (THead (Bind b) v t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Bind b) v t1) (TLRef n)) \to ((eq T (THead (Bind b) v t0) t2) \to ((tau0 g (CHead c (Bind b) v) t1 t0) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H7: (eq T (THead (Bind b) v t1) (TLRef n))).(let H8 \def (eq_ind T (THead (Bind b) v t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H7) in (False_ind ((eq T (THead (Bind b) v t0) t2) \to ((tau0 g (CHead c0 (Bind b) v) t1 t0) \to (ty3 g c0 (TLRef n) t2))) H8))) c0 (sym_eq C c0 c0 H4) H5 H6 H3)))) | (tau0_appl c0 v t1 t0 H3) \Rightarrow (\lambda (H4: (eq C c0 c0)).(\lambda (H5: (eq T (THead (Flat Appl) v t1) (TLRef n))).(\lambda (H6: (eq T (THead (Flat Appl) v t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Appl) v t1) (TLRef n)) \to ((eq T (THead (Flat Appl) v t0) t2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H7: (eq T (THead (Flat Appl) v t1) (TLRef n))).(let H8 \def (eq_ind T (THead (Flat Appl) v t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H7) in (False_ind ((eq T (THead (Flat Appl) v t0) t2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (TLRef n) t2))) H8))) c0 (sym_eq C c0 c0 H4) H5 H6 H3)))) | (tau0_cast c0 v1 v2 H3 t1 t0 H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (THead (Flat Cast) v1 t1) (TLRef n))).(\lambda (H7: (eq T (THead (Flat Cast) v2 t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Cast) v1 t1) (TLRef n)) \to ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c v1 v2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H8: (eq T (THead (Flat Cast) v1 t1) (TLRef n))).(let H9 \def (eq_ind T (THead (Flat Cast) v1 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H8) in (False_ind ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c0 v1 v2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (TLRef n) t2)))) H9))) c0 (sym_eq C c0 c0 H5) H6 H7 H3 H4))))]) in (H4 (refl_equal C c0) (refl_equal T (TLRef n)) (refl_equal T t2))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 u0 t)).(\lambda (_: ((\forall (t2: T).((tau0 g c0 u0 t2) \to (ty3 g c0 u0 t2))))).(\lambda (b: B).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) t2 t3)).(\lambda (H3: ((\forall (t3: T).((tau0 g (CHead c0 (Bind b) u0) t2 t3) \to (ty3 g (CHead c0 (Bind b) u0) t2 t3))))).(\lambda (t0: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) t3 t0)).(\lambda (_: ((\forall (t2: T).((tau0 g (CHead c0 (Bind b) u0) t3 t2) \to (ty3 g (CHead c0 (Bind b) u0) t3 t2))))).(\lambda (t4: T).(\lambda (H6: (tau0 g c0 (THead (Bind b) u0 t2) t4)).(let H7 \def (match H6 return (\lambda (_: ?).(\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).((eq C c c0) \to ((eq T t (THead (Bind b) u0 t2)) \to ((eq T t0 t4) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))))))) with [(tau0_sort c0 n) \Rightarrow (\lambda (H6: (eq C c0 c0)).(\lambda (H7: (eq T (TSort n) (THead (Bind b) u0 t2))).(\lambda (H8: (eq T (TSort (next g n)) t4)).(eq_ind C c0 (\lambda (_: C).((eq T (TSort n) (THead (Bind b) u0 t2)) \to ((eq T (TSort (next g n)) t4) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))) (\lambda (H9: (eq T (TSort n) (THead (Bind b) u0 t2))).(let H10 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u0 t2) H9) in (False_ind ((eq T (TSort (next g n)) t4) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)) H10))) c0 (sym_eq C c0 c0 H6) H7 H8)))) | (tau0_abbr c0 d v i H6 w H7) \Rightarrow (\lambda (H8: (eq C c0 c0)).(\lambda (H9: (eq T (TLRef i) (THead (Bind b) u0 t2))).(\lambda (H10: (eq T (lift (S i) O w) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (THead (Bind b) u0 t2)) \to ((eq T (lift (S i) O w) t4) \to ((getl i c (CHead d (Bind Abbr) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))))) (\lambda (H11: (eq T (TLRef i) (THead (Bind b) u0 t2))).(let H12 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u0 t2) H11) in (False_ind ((eq T (lift (S i) O w) t4) \to ((getl i c0 (CHead d (Bind Abbr) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))) H12))) c0 (sym_eq C c0 c0 H8) H9 H10 H6 H7)))) | (tau0_abst c0 d v i H6 w H7) \Rightarrow (\lambda (H8: (eq C c0 c0)).(\lambda (H9: (eq T (TLRef i) (THead (Bind b) u0 t2))).(\lambda (H10: (eq T (lift (S i) O v) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (THead (Bind b) u0 t2)) \to ((eq T (lift (S i) O v) t4) \to ((getl i c (CHead d (Bind Abst) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))))) (\lambda (H11: (eq T (TLRef i) (THead (Bind b) u0 t2))).(let H12 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u0 t2) H11) in (False_ind ((eq T (lift (S i) O v) t4) \to ((getl i c0 (CHead d (Bind Abst) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))) H12))) c0 (sym_eq C c0 c0 H8) H9 H10 H6 H7)))) | (tau0_bind b0 c0 v t4 t5 H6) \Rightarrow (\lambda (H7: (eq C c0 c0)).(\lambda (H8: (eq T (THead (Bind b0) v t4) (THead (Bind b) u0 t2))).(\lambda (H9: (eq T (THead (Bind b0) v t5) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Bind b0) v t4) (THead (Bind b) u0 t2)) \to ((eq T (THead (Bind b0) v t5) t4) \to ((tau0 g (CHead c (Bind b0) v) t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4))))) (\lambda (H10: (eq T (THead (Bind b0) v t4) (THead (Bind b) u0 t2))).(let H11 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) v t4) (THead (Bind b) u0 t2) H10) in ((let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v | (TLRef _) \Rightarrow v | (THead _ t _) \Rightarrow t])) (THead (Bind b0) v t4) (THead (Bind b) u0 t2) H10) in ((let H13 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: ?).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (THead (Bind b0) v t4) (THead (Bind b) u0 t2) H10) in (eq_ind B b (\lambda (b1: B).((eq T v u0) \to ((eq T t4 t2) \to ((eq T (THead (Bind b1) v t5) t4) \to ((tau0 g (CHead c0 (Bind b1) v) t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))))) (\lambda (H14: (eq T v u0)).(eq_ind T u0 (\lambda (t: T).((eq T t4 t2) \to ((eq T (THead (Bind b) t t5) t4) \to ((tau0 g (CHead c0 (Bind b) t) t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4))))) (\lambda (H15: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((eq T (THead (Bind b) u0 t5) t4) \to ((tau0 g (CHead c0 (Bind b) u0) t t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))) (\lambda (H16: (eq T (THead (Bind b) u0 t5) t4)).(eq_ind T (THead (Bind b) u0 t5) (\lambda (t: T).((tau0 g (CHead c0 (Bind b) u0) t2 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t))) (\lambda (H17: (tau0 g (CHead c0 (Bind b) u0) t2 t5)).(let H_y \def (H3 t5 H17) in (ex_ind T (\lambda (t: T).(ty3 g (CHead c0 (Bind b) u0) t5 t)) (ty3 g c0 (THead (Bind b) u0 t2) (THead (Bind b) u0 t5)) (\lambda (x: T).(\lambda (H1: (ty3 g (CHead c0 (Bind b) u0) t5 x)).(ty3_bind g c0 u0 t H0 b t2 t5 H_y x H1))) (ty3_correct g (CHead c0 (Bind b) u0) t2 t5 H_y)))) t4 H16)) t4 (sym_eq T t4 t2 H15))) v (sym_eq T v u0 H14))) b0 (sym_eq B b0 b H13))) H12)) H11))) c0 (sym_eq C c0 c0 H7) H8 H9 H6)))) | (tau0_appl c0 v t4 t5 H6) \Rightarrow (\lambda (H7: (eq C c0 c0)).(\lambda (H8: (eq T (THead (Flat Appl) v t4) (THead (Bind b) u0 t2))).(\lambda (H9: (eq T (THead (Flat Appl) v t5) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Appl) v t4) (THead (Bind b) u0 t2)) \to ((eq T (THead (Flat Appl) v t5) t4) \to ((tau0 g c t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4))))) (\lambda (H10: (eq T (THead (Flat Appl) v t4) (THead (Bind b) u0 t2))).(let H11 \def (eq_ind T (THead (Flat Appl) v t4) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 t2) H10) in (False_ind ((eq T (THead (Flat Appl) v t5) t4) \to ((tau0 g c0 t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4))) H11))) c0 (sym_eq C c0 c0 H7) H8 H9 H6)))) | (tau0_cast c0 v1 v2 H6 t4 t5 H7) \Rightarrow (\lambda (H8: (eq C c0 c0)).(\lambda (H9: (eq T (THead (Flat Cast) v1 t4) (THead (Bind b) u0 t2))).(\lambda (H10: (eq T (THead (Flat Cast) v2 t5) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Cast) v1 t4) (THead (Bind b) u0 t2)) \to ((eq T (THead (Flat Cast) v2 t5) t4) \to ((tau0 g c v1 v2) \to ((tau0 g c t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))))) (\lambda (H11: (eq T (THead (Flat Cast) v1 t4) (THead (Bind b) u0 t2))).(let H12 \def (eq_ind T (THead (Flat Cast) v1 t4) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 t2) H11) in (False_ind ((eq T (THead (Flat Cast) v2 t5) t4) \to ((tau0 g c0 v1 v2) \to ((tau0 g c0 t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))) H12))) c0 (sym_eq C c0 c0 H8) H9 H10 H6 H7))))]) in (H7 (refl_equal C c0) (refl_equal T (THead (Bind b) u0 t2)) (refl_equal T t4)))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u0: T).(\lambda (H0: (ty3 g c0 w u0)).(\lambda (_: ((\forall (t2: T).((tau0 g c0 w t2) \to (ty3 g c0 w t2))))).(\lambda (v: T).(\lambda (t: T).(\lambda (H2: (ty3 g c0 v (THead (Bind Abst) u0 t))).(\lambda (H3: ((\forall (t2: T).((tau0 g c0 v t2) \to (ty3 g c0 v t2))))).(\lambda (t2: T).(\lambda (H4: (tau0 g c0 (THead (Flat Appl) w v) t2)).(let H5 \def (match H4 return (\lambda (_: ?).(\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).((eq C c c0) \to ((eq T t (THead (Flat Appl) w v)) \to ((eq T t0 t2) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))))))) with [(tau0_sort c0 n) \Rightarrow (\lambda (H4: (eq C c0 c0)).(\lambda (H5: (eq T (TSort n) (THead (Flat Appl) w v))).(\lambda (H6: (eq T (TSort (next g n)) t2)).(eq_ind C c0 (\lambda (_: C).((eq T (TSort n) (THead (Flat Appl) w v)) \to ((eq T (TSort (next g n)) t2) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))) (\lambda (H7: (eq T (TSort n) (THead (Flat Appl) w v))).(let H8 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) w v) H7) in (False_ind ((eq T (TSort (next g n)) t2) \to (ty3 g c0 (THead (Flat Appl) w v) t2)) H8))) c0 (sym_eq C c0 c0 H4) H5 H6)))) | (tau0_abbr c0 d v0 i H4 w0 H5) \Rightarrow (\lambda (H6: (eq C c0 c0)).(\lambda (H7: (eq T (TLRef i) (THead (Flat Appl) w v))).(\lambda (H8: (eq T (lift (S i) O w0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (THead (Flat Appl) w v)) \to ((eq T (lift (S i) O w0) t2) \to ((getl i c (CHead d (Bind Abbr) v0)) \to ((tau0 g d v0 w0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))))) (\lambda (H9: (eq T (TLRef i) (THead (Flat Appl) w v))).(let H10 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) w v) H9) in (False_ind ((eq T (lift (S i) O w0) t2) \to ((getl i c0 (CHead d (Bind Abbr) v0)) \to ((tau0 g d v0 w0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))) H10))) c0 (sym_eq C c0 c0 H6) H7 H8 H4 H5)))) | (tau0_abst c0 d v0 i H4 w0 H5) \Rightarrow (\lambda (H6: (eq C c0 c0)).(\lambda (H7: (eq T (TLRef i) (THead (Flat Appl) w v))).(\lambda (H8: (eq T (lift (S i) O v0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (THead (Flat Appl) w v)) \to ((eq T (lift (S i) O v0) t2) \to ((getl i c (CHead d (Bind Abst) v0)) \to ((tau0 g d v0 w0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))))) (\lambda (H9: (eq T (TLRef i) (THead (Flat Appl) w v))).(let H10 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) w v) H9) in (False_ind ((eq T (lift (S i) O v0) t2) \to ((getl i c0 (CHead d (Bind Abst) v0)) \to ((tau0 g d v0 w0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))) H10))) c0 (sym_eq C c0 c0 H6) H7 H8 H4 H5)))) | (tau0_bind b c0 v0 t1 t0 H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (THead (Bind b) v0 t1) (THead (Flat Appl) w v))).(\lambda (H7: (eq T (THead (Bind b) v0 t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Bind b) v0 t1) (THead (Flat Appl) w v)) \to ((eq T (THead (Bind b) v0 t0) t2) \to ((tau0 g (CHead c (Bind b) v0) t1 t0) \to (ty3 g c0 (THead (Flat Appl) w v) t2))))) (\lambda (H8: (eq T (THead (Bind b) v0 t1) (THead (Flat Appl) w v))).(let H9 \def (eq_ind T (THead (Bind b) v0 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) w v) H8) in (False_ind ((eq T (THead (Bind b) v0 t0) t2) \to ((tau0 g (CHead c0 (Bind b) v0) t1 t0) \to (ty3 g c0 (THead (Flat Appl) w v) t2))) H9))) c0 (sym_eq C c0 c0 H5) H6 H7 H4)))) | (tau0_appl c0 v0 t1 t0 H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (THead (Flat Appl) v0 t1) (THead (Flat Appl) w v))).(\lambda (H7: (eq T (THead (Flat Appl) v0 t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Appl) v0 t1) (THead (Flat Appl) w v)) \to ((eq T (THead (Flat Appl) v0 t0) t2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (THead (Flat Appl) w v) t2))))) (\lambda (H8: (eq T (THead (Flat Appl) v0 t1) (THead (Flat Appl) w v))).(let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v0 t1) (THead (Flat Appl) w v) H8) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v0 t1) (THead (Flat Appl) w v) H8) in (eq_ind T w (\lambda (t: T).((eq T t1 v) \to ((eq T (THead (Flat Appl) t t0) t2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (THead (Flat Appl) w v) t2))))) (\lambda (H11: (eq T t1 v)).(eq_ind T v (\lambda (t: T).((eq T (THead (Flat Appl) w t0) t2) \to ((tau0 g c0 t t0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))) (\lambda (H12: (eq T (THead (Flat Appl) w t0) t2)).(eq_ind T (THead (Flat Appl) w t0) (\lambda (t: T).((tau0 g c0 v t0) \to (ty3 g c0 (THead (Flat Appl) w v) t))) (\lambda (H13: (tau0 g c0 v t0)).(let H_y \def (H3 t0 H13) in (let H1 \def (ty3_unique g c0 v t0 H_y (THead (Bind Abst) u0 t) H2) in (ex_ind T (\lambda (t: T).(ty3 g c0 t0 t)) (ty3 g c0 (THead (Flat Appl) w v) (THead (Flat Appl) w t0)) (\lambda (x: T).(\lambda (H3: (ty3 g c0 t0 x)).(ex_ind T (\lambda (t: T).(ty3 g c0 u0 t)) (ty3 g c0 (THead (Flat Appl) w v) (THead (Flat Appl) w t0)) (\lambda (x0: T).(\lambda (_: (ty3 g c0 u0 x0)).(ex_ind T (\lambda (t2: T).(ty3 g c0 (THead (Bind Abst) u0 t) t2)) (ty3 g c0 (THead (Flat Appl) w v) (THead (Flat Appl) w t0)) (\lambda (x1: T).(\lambda (H15: (ty3 g c0 (THead (Bind Abst) u0 t) x1)).(ex4_3_ind T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind Abst) u0 t2) x1)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u0 t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind Abst) u0) t t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c0 (Bind Abst) u0) t2 t3)))) (ty3 g c0 (THead (Flat Appl) w v) (THead (Flat Appl) w t0)) (\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (_: (pc3 c0 (THead (Bind Abst) u0 x2) x1)).(\lambda (H17: (ty3 g c0 u0 x3)).(\lambda (H18: (ty3 g (CHead c0 (Bind Abst) u0) t x2)).(\lambda (H19: (ty3 g (CHead c0 (Bind Abst) u0) x2 x4)).(ty3_conv g c0 (THead (Flat Appl) w t0) (THead (Flat Appl) w (THead (Bind Abst) u0 x2)) (ty3_appl g c0 w u0 H0 t0 x2 (ty3_sconv g c0 t0 x H3 (THead (Bind Abst) u0 t) (THead (Bind Abst) u0 x2) (ty3_bind g c0 u0 x3 H17 Abst t x2 H18 x4 H19) H1)) (THead (Flat Appl) w v) (THead (Flat Appl) w (THead (Bind Abst) u0 t)) (ty3_appl g c0 w u0 H0 v t H2) (pc3_s c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t)) (THead (Flat Appl) w t0) (pc3_thin_dx c0 t0 (THead (Bind Abst) u0 t) H1 w Appl)))))))))) (ty3_gen_bind g Abst c0 u0 t x1 H15)))) (ty3_correct g c0 v (THead (Bind Abst) u0 t) H2)))) (ty3_correct g c0 w u0 H0)))) (ty3_correct g c0 v t0 H_y))))) t2 H12)) t1 (sym_eq T t1 v H11))) v0 (sym_eq T v0 w H10))) H9))) c0 (sym_eq C c0 c0 H5) H6 H7 H4)))) | (tau0_cast c0 v1 v2 H4 t1 t0 H5) \Rightarrow (\lambda (H6: (eq C c0 c0)).(\lambda (H7: (eq T (THead (Flat Cast) v1 t1) (THead (Flat Appl) w v))).(\lambda (H8: (eq T (THead (Flat Cast) v2 t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Cast) v1 t1) (THead (Flat Appl) w v)) \to ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c v1 v2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))))) (\lambda (H9: (eq T (THead (Flat Cast) v1 t1) (THead (Flat Appl) w v))).(let H10 \def (eq_ind T (THead (Flat Cast) v1 t1) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) w v) H9) in (False_ind ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c0 v1 v2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))) H10))) c0 (sym_eq C c0 c0 H6) H7 H8 H4 H5))))]) in (H5 (refl_equal C c0) (refl_equal T (THead (Flat Appl) w v)) (refl_equal T t2)))))))))))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: (ty3 g c0 t2 t3)).(\lambda (H1: ((\forall (t3: T).((tau0 g c0 t2 t3) \to (ty3 g c0 t2 t3))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t3 t0)).(\lambda (H3: ((\forall (t2: T).((tau0 g c0 t3 t2) \to (ty3 g c0 t3 t2))))).(\lambda (t4: T).(\lambda (H4: (tau0 g c0 (THead (Flat Cast) t3 t2) t4)).(let H5 \def (match H4 return (\lambda (_: ?).(\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).((eq C c c0) \to ((eq T t (THead (Flat Cast) t3 t2)) \to ((eq T t0 t4) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))))))) with [(tau0_sort c0 n) \Rightarrow (\lambda (H4: (eq C c0 c0)).(\lambda (H5: (eq T (TSort n) (THead (Flat Cast) t3 t2))).(\lambda (H6: (eq T (TSort (next g n)) t4)).(eq_ind C c0 (\lambda (_: C).((eq T (TSort n) (THead (Flat Cast) t3 t2)) \to ((eq T (TSort (next g n)) t4) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))) (\lambda (H7: (eq T (TSort n) (THead (Flat Cast) t3 t2))).(let H8 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t3 t2) H7) in (False_ind ((eq T (TSort (next g n)) t4) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)) H8))) c0 (sym_eq C c0 c0 H4) H5 H6)))) | (tau0_abbr c0 d v i H4 w H5) \Rightarrow (\lambda (H6: (eq C c0 c0)).(\lambda (H7: (eq T (TLRef i) (THead (Flat Cast) t3 t2))).(\lambda (H8: (eq T (lift (S i) O w) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (THead (Flat Cast) t3 t2)) \to ((eq T (lift (S i) O w) t4) \to ((getl i c (CHead d (Bind Abbr) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))))) (\lambda (H9: (eq T (TLRef i) (THead (Flat Cast) t3 t2))).(let H10 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t3 t2) H9) in (False_ind ((eq T (lift (S i) O w) t4) \to ((getl i c0 (CHead d (Bind Abbr) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))) H10))) c0 (sym_eq C c0 c0 H6) H7 H8 H4 H5)))) | (tau0_abst c0 d v i H4 w H5) \Rightarrow (\lambda (H6: (eq C c0 c0)).(\lambda (H7: (eq T (TLRef i) (THead (Flat Cast) t3 t2))).(\lambda (H8: (eq T (lift (S i) O v) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (THead (Flat Cast) t3 t2)) \to ((eq T (lift (S i) O v) t4) \to ((getl i c (CHead d (Bind Abst) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))))) (\lambda (H9: (eq T (TLRef i) (THead (Flat Cast) t3 t2))).(let H10 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t3 t2) H9) in (False_ind ((eq T (lift (S i) O v) t4) \to ((getl i c0 (CHead d (Bind Abst) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))) H10))) c0 (sym_eq C c0 c0 H6) H7 H8 H4 H5)))) | (tau0_bind b c0 v t4 t5 H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (THead (Bind b) v t4) (THead (Flat Cast) t3 t2))).(\lambda (H7: (eq T (THead (Bind b) v t5) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Bind b) v t4) (THead (Flat Cast) t3 t2)) \to ((eq T (THead (Bind b) v t5) t4) \to ((tau0 g (CHead c (Bind b) v) t4 t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4))))) (\lambda (H8: (eq T (THead (Bind b) v t4) (THead (Flat Cast) t3 t2))).(let H9 \def (eq_ind T (THead (Bind b) v t4) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) t3 t2) H8) in (False_ind ((eq T (THead (Bind b) v t5) t4) \to ((tau0 g (CHead c0 (Bind b) v) t4 t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4))) H9))) c0 (sym_eq C c0 c0 H5) H6 H7 H4)))) | (tau0_appl c0 v t4 t5 H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (THead (Flat Appl) v t4) (THead (Flat Cast) t3 t2))).(\lambda (H7: (eq T (THead (Flat Appl) v t5) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Appl) v t4) (THead (Flat Cast) t3 t2)) \to ((eq T (THead (Flat Appl) v t5) t4) \to ((tau0 g c t4 t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4))))) (\lambda (H8: (eq T (THead (Flat Appl) v t4) (THead (Flat Cast) t3 t2))).(let H9 \def (eq_ind T (THead (Flat Appl) v t4) (\lambda (e: T).(match e return (\lambda (_: ?).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: ?).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) t3 t2) H8) in (False_ind ((eq T (THead (Flat Appl) v t5) t4) \to ((tau0 g c0 t4 t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4))) H9))) c0 (sym_eq C c0 c0 H5) H6 H7 H4)))) | (tau0_cast c0 v1 v2 H4 t4 t5 H5) \Rightarrow (\lambda (H6: (eq C c0 c0)).(\lambda (H7: (eq T (THead (Flat Cast) v1 t4) (THead (Flat Cast) t3 t2))).(\lambda (H8: (eq T (THead (Flat Cast) v2 t5) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Cast) v1 t4) (THead (Flat Cast) t3 t2)) \to ((eq T (THead (Flat Cast) v2 t5) t4) \to ((tau0 g c v1 v2) \to ((tau0 g c t4 t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))))) (\lambda (H9: (eq T (THead (Flat Cast) v1 t4) (THead (Flat Cast) t3 t2))).(let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) v1 t4) (THead (Flat Cast) t3 t2) H9) in ((let H11 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: ?).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) v1 t4) (THead (Flat Cast) t3 t2) H9) in (eq_ind T t3 (\lambda (t: T).((eq T t4 t2) \to ((eq T (THead (Flat Cast) v2 t5) t4) \to ((tau0 g c0 t v2) \to ((tau0 g c0 t4 t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))))) (\lambda (H12: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Cast) v2 t5) t4) \to ((tau0 g c0 t3 v2) \to ((tau0 g c0 t t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4))))) (\lambda (H13: (eq T (THead (Flat Cast) v2 t5) t4)).(eq_ind T (THead (Flat Cast) v2 t5) (\lambda (t: T).((tau0 g c0 t3 v2) \to ((tau0 g c0 t2 t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t)))) (\lambda (H14: (tau0 g c0 t3 v2)).(\lambda (H15: (tau0 g c0 t2 t5)).(let H_y \def (H1 t5 H15) in (let H_y0 \def (H3 v2 H14) in (let H3 \def (ty3_unique g c0 t2 t5 H_y t3 H0) in (ex_ind T (\lambda (t: T).(ty3 g c0 v2 t)) (ty3 g c0 (THead (Flat Cast) t3 t2) (THead (Flat Cast) v2 t5)) (\lambda (x: T).(\lambda (H16: (ty3 g c0 v2 x)).(ex_ind T (\lambda (t: T).(ty3 g c0 t5 t)) (ty3 g c0 (THead (Flat Cast) t3 t2) (THead (Flat Cast) v2 t5)) (\lambda (x0: T).(\lambda (H17: (ty3 g c0 t5 x0)).(ty3_conv g c0 (THead (Flat Cast) v2 t5) v2 (ty3_cast g c0 t5 v2 (ty3_sconv g c0 t5 x0 H17 t3 v2 H_y0 H3) x H16) (THead (Flat Cast) t3 t2) t3 (ty3_cast g c0 t2 t3 H0 v2 H_y0) (pc3_s c0 t3 (THead (Flat Cast) v2 t5) (pc3_pr2_u c0 t5 (THead (Flat Cast) v2 t5) (pr2_free c0 (THead (Flat Cast) v2 t5) t5 (pr0_epsilon t5 t5 (pr0_refl t5) v2)) t3 H3))))) (ty3_correct g c0 t2 t5 H_y)))) (ty3_correct g c0 t3 v2 H_y0))))))) t4 H13)) t4 (sym_eq T t4 t2 H12))) v1 (sym_eq T v1 t3 H11))) H10))) c0 (sym_eq C c0 c0 H6) H7 H8 H4 H5))))]) in (H5 (refl_equal C c0) (refl_equal T (THead (Flat Cast) t3 t2)) (refl_equal T t4))))))))))))) c u t1 H))))). + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (H: (ty3 g c u t1)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (_: T).(\forall (t2: T).((tau0 g c0 t t2) \to (ty3 g c0 t t2)))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda (_: ((\forall (t3: T).((tau0 g c0 t2 t3) \to (ty3 g c0 t2 t3))))).(\lambda (u0: T).(\lambda (t3: T).(\lambda (_: (ty3 g c0 u0 t3)).(\lambda (H3: ((\forall (t2: T).((tau0 g c0 u0 t2) \to (ty3 g c0 u0 t2))))).(\lambda (_: (pc3 c0 t3 t2)).(\lambda (t0: T).(\lambda (H5: (tau0 g c0 u0 t0)).(H3 t0 H5))))))))))))) (\lambda (c0: C).(\lambda (m: nat).(\lambda (t2: T).(\lambda (H0: (tau0 g c0 (TSort m) t2)).(let H1 \def (match H0 return (\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (tau0 ? c t t0)).((eq C c c0) \to ((eq T t (TSort m)) \to ((eq T t0 t2) \to (ty3 g c0 (TSort m) t2)))))))) with [(tau0_sort c0 n) \Rightarrow (\lambda (H0: (eq C c0 c0)).(\lambda (H1: (eq T (TSort n) (TSort m))).(\lambda (H2: (eq T (TSort (next g n)) t2)).(eq_ind C c0 (\lambda (_: C).((eq T (TSort n) (TSort m)) \to ((eq T (TSort (next g n)) t2) \to (ty3 g c0 (TSort m) t2)))) (\lambda (H3: (eq T (TSort n) (TSort m))).(let H4 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort n) \Rightarrow n | (TLRef _) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TSort n) (TSort m) H3) in (eq_ind nat m (\lambda (n0: nat).((eq T (TSort (next g n0)) t2) \to (ty3 g c0 (TSort m) t2))) (\lambda (H5: (eq T (TSort (next g m)) t2)).(eq_ind T (TSort (next g m)) (\lambda (t: T).(ty3 g c0 (TSort m) t)) (ty3_sort g c0 m) t2 H5)) n (sym_eq nat n m H4)))) c0 (sym_eq C c0 c0 H0) H1 H2)))) | (tau0_abbr c0 d v i H0 w H1) \Rightarrow (\lambda (H2: (eq C c0 c0)).(\lambda (H3: (eq T (TLRef i) (TSort m))).(\lambda (H4: (eq T (lift (S i) O w) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (TSort m)) \to ((eq T (lift (S i) O w) t2) \to ((getl i c (CHead d (Bind Abbr) v)) \to ((tau0 g d v w) \to (ty3 g c0 (TSort m) t2)))))) (\lambda (H5: (eq T (TLRef i) (TSort m))).(let H6 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort m) H5) in (False_ind ((eq T (lift (S i) O w) t2) \to ((getl i c0 (CHead d (Bind Abbr) v)) \to ((tau0 g d v w) \to (ty3 g c0 (TSort m) t2)))) H6))) c0 (sym_eq C c0 c0 H2) H3 H4 H0 H1)))) | (tau0_abst c0 d v i H0 w H1) \Rightarrow (\lambda (H2: (eq C c0 c0)).(\lambda (H3: (eq T (TLRef i) (TSort m))).(\lambda (H4: (eq T (lift (S i) O v) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (TSort m)) \to ((eq T (lift (S i) O v) t2) \to ((getl i c (CHead d (Bind Abst) v)) \to ((tau0 g d v w) \to (ty3 g c0 (TSort m) t2)))))) (\lambda (H5: (eq T (TLRef i) (TSort m))).(let H6 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort m) H5) in (False_ind ((eq T (lift (S i) O v) t2) \to ((getl i c0 (CHead d (Bind Abst) v)) \to ((tau0 g d v w) \to (ty3 g c0 (TSort m) t2)))) H6))) c0 (sym_eq C c0 c0 H2) H3 H4 H0 H1)))) | (tau0_bind b c0 v t1 t0 H0) \Rightarrow (\lambda (H1: (eq C c0 c0)).(\lambda (H2: (eq T (THead (Bind b) v t1) (TSort m))).(\lambda (H3: (eq T (THead (Bind b) v t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Bind b) v t1) (TSort m)) \to ((eq T (THead (Bind b) v t0) t2) \to ((tau0 g (CHead c (Bind b) v) t1 t0) \to (ty3 g c0 (TSort m) t2))))) (\lambda (H4: (eq T (THead (Bind b) v t1) (TSort m))).(let H5 \def (eq_ind T (THead (Bind b) v t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort m) H4) in (False_ind ((eq T (THead (Bind b) v t0) t2) \to ((tau0 g (CHead c0 (Bind b) v) t1 t0) \to (ty3 g c0 (TSort m) t2))) H5))) c0 (sym_eq C c0 c0 H1) H2 H3 H0)))) | (tau0_appl c0 v t1 t0 H0) \Rightarrow (\lambda (H1: (eq C c0 c0)).(\lambda (H2: (eq T (THead (Flat Appl) v t1) (TSort m))).(\lambda (H3: (eq T (THead (Flat Appl) v t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Appl) v t1) (TSort m)) \to ((eq T (THead (Flat Appl) v t0) t2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (TSort m) t2))))) (\lambda (H4: (eq T (THead (Flat Appl) v t1) (TSort m))).(let H5 \def (eq_ind T (THead (Flat Appl) v t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort m) H4) in (False_ind ((eq T (THead (Flat Appl) v t0) t2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (TSort m) t2))) H5))) c0 (sym_eq C c0 c0 H1) H2 H3 H0)))) | (tau0_cast c0 v1 v2 H0 t1 t0 H1) \Rightarrow (\lambda (H2: (eq C c0 c0)).(\lambda (H3: (eq T (THead (Flat Cast) v1 t1) (TSort m))).(\lambda (H4: (eq T (THead (Flat Cast) v2 t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Cast) v1 t1) (TSort m)) \to ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c v1 v2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (TSort m) t2)))))) (\lambda (H5: (eq T (THead (Flat Cast) v1 t1) (TSort m))).(let H6 \def (eq_ind T (THead (Flat Cast) v1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort m) H5) in (False_ind ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c0 v1 v2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (TSort m) t2)))) H6))) c0 (sym_eq C c0 c0 H2) H3 H4 H0 H1))))]) in (H1 (refl_equal C c0) (refl_equal T (TSort m)) (refl_equal T t2))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) u0))).(\lambda (t: T).(\lambda (_: (ty3 g d u0 t)).(\lambda (H2: ((\forall (t2: T).((tau0 g d u0 t2) \to (ty3 g d u0 t2))))).(\lambda (t2: T).(\lambda (H3: (tau0 g c0 (TLRef n) t2)).(let H4 \def (match H3 return (\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (tau0 ? c t t0)).((eq C c c0) \to ((eq T t (TLRef n)) \to ((eq T t0 t2) \to (ty3 g c0 (TLRef n) t2)))))))) with [(tau0_sort c0 n0) \Rightarrow (\lambda (H3: (eq C c0 c0)).(\lambda (H4: (eq T (TSort n0) (TLRef n))).(\lambda (H5: (eq T (TSort (next g n0)) t2)).(eq_ind C c0 (\lambda (_: C).((eq T (TSort n0) (TLRef n)) \to ((eq T (TSort (next g n0)) t2) \to (ty3 g c0 (TLRef n) t2)))) (\lambda (H6: (eq T (TSort n0) (TLRef n))).(let H7 \def (eq_ind T (TSort n0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef n) H6) in (False_ind ((eq T (TSort (next g n0)) t2) \to (ty3 g c0 (TLRef n) t2)) H7))) c0 (sym_eq C c0 c0 H3) H4 H5)))) | (tau0_abbr c0 d0 v i H3 w H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (TLRef i) (TLRef n))).(\lambda (H7: (eq T (lift (S i) O w) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O w) t2) \to ((getl i c (CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H8: (eq T (TLRef i) (TLRef n))).(let H9 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H8) in (eq_ind nat n (\lambda (n0: nat).((eq T (lift (S n0) O w) t2) \to ((getl n0 c0 (CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H10: (eq T (lift (S n) O w) t2)).(eq_ind T (lift (S n) O w) (\lambda (t: T).((getl n c0 (CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t)))) (\lambda (H11: (getl n c0 (CHead d0 (Bind Abbr) v))).(\lambda (H12: (tau0 g d0 v w)).(let H13 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead d0 (Bind Abbr) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind Abbr) v) H11)) in (let H14 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abbr) u0) (CHead d0 (Bind Abbr) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind Abbr) v) H11)) in ((let H15 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abbr) u0) (CHead d0 (Bind Abbr) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind Abbr) v) H11)) in (\lambda (H16: (eq C d d0)).(let H17 \def (eq_ind_r T v (\lambda (t: T).(getl n c0 (CHead d0 (Bind Abbr) t))) H13 u0 H15) in (let H18 \def (eq_ind_r T v (\lambda (t: T).(tau0 g d0 t w)) H12 u0 H15) in (let H19 \def (eq_ind_r C d0 (\lambda (c: C).(getl n c0 (CHead c (Bind Abbr) u0))) H17 d H16) in (let H20 \def (eq_ind_r C d0 (\lambda (c: C).(tau0 g c u0 w)) H18 d H16) in (ty3_abbr g n c0 d u0 H19 w (H2 w H20)))))))) H14))))) t2 H10)) i (sym_eq nat i n H9)))) c0 (sym_eq C c0 c0 H5) H6 H7 H3 H4)))) | (tau0_abst c0 d0 v i H3 w H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (TLRef i) (TLRef n))).(\lambda (H7: (eq T (lift (S i) O v) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O v) t2) \to ((getl i c (CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H8: (eq T (TLRef i) (TLRef n))).(let H9 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H8) in (eq_ind nat n (\lambda (n0: nat).((eq T (lift (S n0) O v) t2) \to ((getl n0 c0 (CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H10: (eq T (lift (S n) O v) t2)).(eq_ind T (lift (S n) O v) (\lambda (t: T).((getl n c0 (CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t)))) (\lambda (H11: (getl n c0 (CHead d0 (Bind Abst) v))).(\lambda (_: (tau0 g d0 v w)).(let H2 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead d0 (Bind Abst) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind Abst) v) H11)) in (let H13 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow True | Abst \Rightarrow False | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d0 (Bind Abst) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind Abst) v) H11)) in (False_ind (ty3 g c0 (TLRef n) (lift (S n) O v)) H13))))) t2 H10)) i (sym_eq nat i n H9)))) c0 (sym_eq C c0 c0 H5) H6 H7 H3 H4)))) | (tau0_bind b c0 v t1 t0 H3) \Rightarrow (\lambda (H4: (eq C c0 c0)).(\lambda (H5: (eq T (THead (Bind b) v t1) (TLRef n))).(\lambda (H6: (eq T (THead (Bind b) v t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Bind b) v t1) (TLRef n)) \to ((eq T (THead (Bind b) v t0) t2) \to ((tau0 g (CHead c (Bind b) v) t1 t0) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H7: (eq T (THead (Bind b) v t1) (TLRef n))).(let H8 \def (eq_ind T (THead (Bind b) v t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H7) in (False_ind ((eq T (THead (Bind b) v t0) t2) \to ((tau0 g (CHead c0 (Bind b) v) t1 t0) \to (ty3 g c0 (TLRef n) t2))) H8))) c0 (sym_eq C c0 c0 H4) H5 H6 H3)))) | (tau0_appl c0 v t1 t0 H3) \Rightarrow (\lambda (H4: (eq C c0 c0)).(\lambda (H5: (eq T (THead (Flat Appl) v t1) (TLRef n))).(\lambda (H6: (eq T (THead (Flat Appl) v t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Appl) v t1) (TLRef n)) \to ((eq T (THead (Flat Appl) v t0) t2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H7: (eq T (THead (Flat Appl) v t1) (TLRef n))).(let H8 \def (eq_ind T (THead (Flat Appl) v t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H7) in (False_ind ((eq T (THead (Flat Appl) v t0) t2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (TLRef n) t2))) H8))) c0 (sym_eq C c0 c0 H4) H5 H6 H3)))) | (tau0_cast c0 v1 v2 H3 t1 t0 H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (THead (Flat Cast) v1 t1) (TLRef n))).(\lambda (H7: (eq T (THead (Flat Cast) v2 t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Cast) v1 t1) (TLRef n)) \to ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c v1 v2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H8: (eq T (THead (Flat Cast) v1 t1) (TLRef n))).(let H9 \def (eq_ind T (THead (Flat Cast) v1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H8) in (False_ind ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c0 v1 v2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (TLRef n) t2)))) H9))) c0 (sym_eq C c0 c0 H5) H6 H7 H3 H4))))]) in (H4 (refl_equal C c0) (refl_equal T (TLRef n)) (refl_equal T t2))))))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abst) u0))).(\lambda (t: T).(\lambda (H1: (ty3 g d u0 t)).(\lambda (_: ((\forall (t2: T).((tau0 g d u0 t2) \to (ty3 g d u0 t2))))).(\lambda (t2: T).(\lambda (H3: (tau0 g c0 (TLRef n) t2)).(let H4 \def (match H3 return (\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (tau0 ? c t t0)).((eq C c c0) \to ((eq T t (TLRef n)) \to ((eq T t0 t2) \to (ty3 g c0 (TLRef n) t2)))))))) with [(tau0_sort c0 n0) \Rightarrow (\lambda (H3: (eq C c0 c0)).(\lambda (H4: (eq T (TSort n0) (TLRef n))).(\lambda (H5: (eq T (TSort (next g n0)) t2)).(eq_ind C c0 (\lambda (_: C).((eq T (TSort n0) (TLRef n)) \to ((eq T (TSort (next g n0)) t2) \to (ty3 g c0 (TLRef n) t2)))) (\lambda (H6: (eq T (TSort n0) (TLRef n))).(let H7 \def (eq_ind T (TSort n0) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (TLRef n) H6) in (False_ind ((eq T (TSort (next g n0)) t2) \to (ty3 g c0 (TLRef n) t2)) H7))) c0 (sym_eq C c0 c0 H3) H4 H5)))) | (tau0_abbr c0 d0 v i H3 w H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (TLRef i) (TLRef n))).(\lambda (H7: (eq T (lift (S i) O w) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O w) t2) \to ((getl i c (CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H8: (eq T (TLRef i) (TLRef n))).(let H9 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H8) in (eq_ind nat n (\lambda (n0: nat).((eq T (lift (S n0) O w) t2) \to ((getl n0 c0 (CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H10: (eq T (lift (S n) O w) t2)).(eq_ind T (lift (S n) O w) (\lambda (t: T).((getl n c0 (CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t)))) (\lambda (H11: (getl n c0 (CHead d0 (Bind Abbr) v))).(\lambda (_: (tau0 g d0 v w)).(let H2 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead d0 (Bind Abbr) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind Abbr) v) H11)) in (let H13 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) \Rightarrow False])])) I (CHead d0 (Bind Abbr) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind Abbr) v) H11)) in (False_ind (ty3 g c0 (TLRef n) (lift (S n) O w)) H13))))) t2 H10)) i (sym_eq nat i n H9)))) c0 (sym_eq C c0 c0 H5) H6 H7 H3 H4)))) | (tau0_abst c0 d0 v i H3 w H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (TLRef i) (TLRef n))).(\lambda (H7: (eq T (lift (S i) O v) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O v) t2) \to ((getl i c (CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H8: (eq T (TLRef i) (TLRef n))).(let H9 \def (f_equal T nat (\lambda (e: T).(match e return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H8) in (eq_ind nat n (\lambda (n0: nat).((eq T (lift (S n0) O v) t2) \to ((getl n0 c0 (CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H10: (eq T (lift (S n) O v) t2)).(eq_ind T (lift (S n) O v) (\lambda (t: T).((getl n c0 (CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t)))) (\lambda (H11: (getl n c0 (CHead d0 (Bind Abst) v))).(\lambda (H12: (tau0 g d0 v w)).(let H2 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c: C).(getl n c0 c)) H0 (CHead d0 (Bind Abst) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind Abst) v) H11)) in (let H13 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | (CHead c _ _) \Rightarrow c])) (CHead d (Bind Abst) u0) (CHead d0 (Bind Abst) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind Abst) v) H11)) in ((let H14 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) \Rightarrow t])) (CHead d (Bind Abst) u0) (CHead d0 (Bind Abst) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind Abst) v) H11)) in (\lambda (H15: (eq C d d0)).(let H16 \def (eq_ind_r T v (\lambda (t: T).(getl n c0 (CHead d0 (Bind Abst) t))) H2 u0 H14) in (let H17 \def (eq_ind_r T v (\lambda (t: T).(tau0 g d0 t w)) H12 u0 H14) in (eq_ind T u0 (\lambda (t: T).(ty3 g c0 (TLRef n) (lift (S n) O t))) (let H18 \def (eq_ind_r C d0 (\lambda (c: C).(getl n c0 (CHead c (Bind Abst) u0))) H16 d H15) in (let H19 \def (eq_ind_r C d0 (\lambda (c: C).(tau0 g c u0 w)) H17 d H15) in (ty3_abst g n c0 d u0 H18 t H1))) v H14))))) H13))))) t2 H10)) i (sym_eq nat i n H9)))) c0 (sym_eq C c0 c0 H5) H6 H7 H3 H4)))) | (tau0_bind b c0 v t1 t0 H3) \Rightarrow (\lambda (H4: (eq C c0 c0)).(\lambda (H5: (eq T (THead (Bind b) v t1) (TLRef n))).(\lambda (H6: (eq T (THead (Bind b) v t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Bind b) v t1) (TLRef n)) \to ((eq T (THead (Bind b) v t0) t2) \to ((tau0 g (CHead c (Bind b) v) t1 t0) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H7: (eq T (THead (Bind b) v t1) (TLRef n))).(let H8 \def (eq_ind T (THead (Bind b) v t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H7) in (False_ind ((eq T (THead (Bind b) v t0) t2) \to ((tau0 g (CHead c0 (Bind b) v) t1 t0) \to (ty3 g c0 (TLRef n) t2))) H8))) c0 (sym_eq C c0 c0 H4) H5 H6 H3)))) | (tau0_appl c0 v t1 t0 H3) \Rightarrow (\lambda (H4: (eq C c0 c0)).(\lambda (H5: (eq T (THead (Flat Appl) v t1) (TLRef n))).(\lambda (H6: (eq T (THead (Flat Appl) v t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Appl) v t1) (TLRef n)) \to ((eq T (THead (Flat Appl) v t0) t2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H7: (eq T (THead (Flat Appl) v t1) (TLRef n))).(let H8 \def (eq_ind T (THead (Flat Appl) v t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H7) in (False_ind ((eq T (THead (Flat Appl) v t0) t2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (TLRef n) t2))) H8))) c0 (sym_eq C c0 c0 H4) H5 H6 H3)))) | (tau0_cast c0 v1 v2 H3 t1 t0 H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (THead (Flat Cast) v1 t1) (TLRef n))).(\lambda (H7: (eq T (THead (Flat Cast) v2 t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Cast) v1 t1) (TLRef n)) \to ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c v1 v2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H8: (eq T (THead (Flat Cast) v1 t1) (TLRef n))).(let H9 \def (eq_ind T (THead (Flat Cast) v1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H8) in (False_ind ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c0 v1 v2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (TLRef n) t2)))) H9))) c0 (sym_eq C c0 c0 H5) H6 H7 H3 H4))))]) in (H4 (refl_equal C c0) (refl_equal T (TLRef n)) (refl_equal T t2))))))))))))) (\lambda (c0: C).(\lambda (u0: T).(\lambda (t: T).(\lambda (H0: (ty3 g c0 u0 t)).(\lambda (_: ((\forall (t2: T).((tau0 g c0 u0 t2) \to (ty3 g c0 u0 t2))))).(\lambda (b: B).(\lambda (t2: T).(\lambda (t3: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) t2 t3)).(\lambda (H3: ((\forall (t3: T).((tau0 g (CHead c0 (Bind b) u0) t2 t3) \to (ty3 g (CHead c0 (Bind b) u0) t2 t3))))).(\lambda (t0: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u0) t3 t0)).(\lambda (_: ((\forall (t2: T).((tau0 g (CHead c0 (Bind b) u0) t3 t2) \to (ty3 g (CHead c0 (Bind b) u0) t3 t2))))).(\lambda (t4: T).(\lambda (H6: (tau0 g c0 (THead (Bind b) u0 t2) t4)).(let H7 \def (match H6 return (\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (tau0 ? c t t0)).((eq C c c0) \to ((eq T t (THead (Bind b) u0 t2)) \to ((eq T t0 t4) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))))))) with [(tau0_sort c0 n) \Rightarrow (\lambda (H6: (eq C c0 c0)).(\lambda (H7: (eq T (TSort n) (THead (Bind b) u0 t2))).(\lambda (H8: (eq T (TSort (next g n)) t4)).(eq_ind C c0 (\lambda (_: C).((eq T (TSort n) (THead (Bind b) u0 t2)) \to ((eq T (TSort (next g n)) t4) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))) (\lambda (H9: (eq T (TSort n) (THead (Bind b) u0 t2))).(let H10 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u0 t2) H9) in (False_ind ((eq T (TSort (next g n)) t4) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)) H10))) c0 (sym_eq C c0 c0 H6) H7 H8)))) | (tau0_abbr c0 d v i H6 w H7) \Rightarrow (\lambda (H8: (eq C c0 c0)).(\lambda (H9: (eq T (TLRef i) (THead (Bind b) u0 t2))).(\lambda (H10: (eq T (lift (S i) O w) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (THead (Bind b) u0 t2)) \to ((eq T (lift (S i) O w) t4) \to ((getl i c (CHead d (Bind Abbr) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))))) (\lambda (H11: (eq T (TLRef i) (THead (Bind b) u0 t2))).(let H12 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u0 t2) H11) in (False_ind ((eq T (lift (S i) O w) t4) \to ((getl i c0 (CHead d (Bind Abbr) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))) H12))) c0 (sym_eq C c0 c0 H8) H9 H10 H6 H7)))) | (tau0_abst c0 d v i H6 w H7) \Rightarrow (\lambda (H8: (eq C c0 c0)).(\lambda (H9: (eq T (TLRef i) (THead (Bind b) u0 t2))).(\lambda (H10: (eq T (lift (S i) O v) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (THead (Bind b) u0 t2)) \to ((eq T (lift (S i) O v) t4) \to ((getl i c (CHead d (Bind Abst) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))))) (\lambda (H11: (eq T (TLRef i) (THead (Bind b) u0 t2))).(let H12 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Bind b) u0 t2) H11) in (False_ind ((eq T (lift (S i) O v) t4) \to ((getl i c0 (CHead d (Bind Abst) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))) H12))) c0 (sym_eq C c0 c0 H8) H9 H10 H6 H7)))) | (tau0_bind b0 c0 v t4 t5 H6) \Rightarrow (\lambda (H7: (eq C c0 c0)).(\lambda (H8: (eq T (THead (Bind b0) v t4) (THead (Bind b) u0 t2))).(\lambda (H9: (eq T (THead (Bind b0) v t5) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Bind b0) v t4) (THead (Bind b) u0 t2)) \to ((eq T (THead (Bind b0) v t5) t4) \to ((tau0 g (CHead c (Bind b0) v) t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4))))) (\lambda (H10: (eq T (THead (Bind b0) v t4) (THead (Bind b) u0 t2))).(let H11 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) v t4) (THead (Bind b) u0 t2) H10) in ((let H12 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v | (TLRef _) \Rightarrow v | (THead _ t _) \Rightarrow t])) (THead (Bind b0) v t4) (THead (Bind b) u0 t2) H10) in ((let H13 \def (f_equal T B (\lambda (e: T).(match e return (\lambda (_: T).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow b0])])) (THead (Bind b0) v t4) (THead (Bind b) u0 t2) H10) in (eq_ind B b (\lambda (b1: B).((eq T v u0) \to ((eq T t4 t2) \to ((eq T (THead (Bind b1) v t5) t4) \to ((tau0 g (CHead c0 (Bind b1) v) t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))))) (\lambda (H14: (eq T v u0)).(eq_ind T u0 (\lambda (t: T).((eq T t4 t2) \to ((eq T (THead (Bind b) t t5) t4) \to ((tau0 g (CHead c0 (Bind b) t) t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4))))) (\lambda (H15: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((eq T (THead (Bind b) u0 t5) t4) \to ((tau0 g (CHead c0 (Bind b) u0) t t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))) (\lambda (H16: (eq T (THead (Bind b) u0 t5) t4)).(eq_ind T (THead (Bind b) u0 t5) (\lambda (t: T).((tau0 g (CHead c0 (Bind b) u0) t2 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t))) (\lambda (H17: (tau0 g (CHead c0 (Bind b) u0) t2 t5)).(let H_y \def (H3 t5 H17) in (ex_ind T (\lambda (t: T).(ty3 g (CHead c0 (Bind b) u0) t5 t)) (ty3 g c0 (THead (Bind b) u0 t2) (THead (Bind b) u0 t5)) (\lambda (x: T).(\lambda (H1: (ty3 g (CHead c0 (Bind b) u0) t5 x)).(ty3_bind g c0 u0 t H0 b t2 t5 H_y x H1))) (ty3_correct g (CHead c0 (Bind b) u0) t2 t5 H_y)))) t4 H16)) t4 (sym_eq T t4 t2 H15))) v (sym_eq T v u0 H14))) b0 (sym_eq B b0 b H13))) H12)) H11))) c0 (sym_eq C c0 c0 H7) H8 H9 H6)))) | (tau0_appl c0 v t4 t5 H6) \Rightarrow (\lambda (H7: (eq C c0 c0)).(\lambda (H8: (eq T (THead (Flat Appl) v t4) (THead (Bind b) u0 t2))).(\lambda (H9: (eq T (THead (Flat Appl) v t5) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Appl) v t4) (THead (Bind b) u0 t2)) \to ((eq T (THead (Flat Appl) v t5) t4) \to ((tau0 g c t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4))))) (\lambda (H10: (eq T (THead (Flat Appl) v t4) (THead (Bind b) u0 t2))).(let H11 \def (eq_ind T (THead (Flat Appl) v t4) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 t2) H10) in (False_ind ((eq T (THead (Flat Appl) v t5) t4) \to ((tau0 g c0 t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4))) H11))) c0 (sym_eq C c0 c0 H7) H8 H9 H6)))) | (tau0_cast c0 v1 v2 H6 t4 t5 H7) \Rightarrow (\lambda (H8: (eq C c0 c0)).(\lambda (H9: (eq T (THead (Flat Cast) v1 t4) (THead (Bind b) u0 t2))).(\lambda (H10: (eq T (THead (Flat Cast) v2 t5) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Cast) v1 t4) (THead (Bind b) u0 t2)) \to ((eq T (THead (Flat Cast) v2 t5) t4) \to ((tau0 g c v1 v2) \to ((tau0 g c t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))))) (\lambda (H11: (eq T (THead (Flat Cast) v1 t4) (THead (Bind b) u0 t2))).(let H12 \def (eq_ind T (THead (Flat Cast) v1 t4) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 t2) H11) in (False_ind ((eq T (THead (Flat Cast) v2 t5) t4) \to ((tau0 g c0 v1 v2) \to ((tau0 g c0 t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t4)))) H12))) c0 (sym_eq C c0 c0 H8) H9 H10 H6 H7))))]) in (H7 (refl_equal C c0) (refl_equal T (THead (Bind b) u0 t2)) (refl_equal T t4)))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u0: T).(\lambda (H0: (ty3 g c0 w u0)).(\lambda (_: ((\forall (t2: T).((tau0 g c0 w t2) \to (ty3 g c0 w t2))))).(\lambda (v: T).(\lambda (t: T).(\lambda (H2: (ty3 g c0 v (THead (Bind Abst) u0 t))).(\lambda (H3: ((\forall (t2: T).((tau0 g c0 v t2) \to (ty3 g c0 v t2))))).(\lambda (t2: T).(\lambda (H4: (tau0 g c0 (THead (Flat Appl) w v) t2)).(let H5 \def (match H4 return (\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (tau0 ? c t t0)).((eq C c c0) \to ((eq T t (THead (Flat Appl) w v)) \to ((eq T t0 t2) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))))))) with [(tau0_sort c0 n) \Rightarrow (\lambda (H4: (eq C c0 c0)).(\lambda (H5: (eq T (TSort n) (THead (Flat Appl) w v))).(\lambda (H6: (eq T (TSort (next g n)) t2)).(eq_ind C c0 (\lambda (_: C).((eq T (TSort n) (THead (Flat Appl) w v)) \to ((eq T (TSort (next g n)) t2) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))) (\lambda (H7: (eq T (TSort n) (THead (Flat Appl) w v))).(let H8 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) w v) H7) in (False_ind ((eq T (TSort (next g n)) t2) \to (ty3 g c0 (THead (Flat Appl) w v) t2)) H8))) c0 (sym_eq C c0 c0 H4) H5 H6)))) | (tau0_abbr c0 d v0 i H4 w0 H5) \Rightarrow (\lambda (H6: (eq C c0 c0)).(\lambda (H7: (eq T (TLRef i) (THead (Flat Appl) w v))).(\lambda (H8: (eq T (lift (S i) O w0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (THead (Flat Appl) w v)) \to ((eq T (lift (S i) O w0) t2) \to ((getl i c (CHead d (Bind Abbr) v0)) \to ((tau0 g d v0 w0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))))) (\lambda (H9: (eq T (TLRef i) (THead (Flat Appl) w v))).(let H10 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) w v) H9) in (False_ind ((eq T (lift (S i) O w0) t2) \to ((getl i c0 (CHead d (Bind Abbr) v0)) \to ((tau0 g d v0 w0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))) H10))) c0 (sym_eq C c0 c0 H6) H7 H8 H4 H5)))) | (tau0_abst c0 d v0 i H4 w0 H5) \Rightarrow (\lambda (H6: (eq C c0 c0)).(\lambda (H7: (eq T (TLRef i) (THead (Flat Appl) w v))).(\lambda (H8: (eq T (lift (S i) O v0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (THead (Flat Appl) w v)) \to ((eq T (lift (S i) O v0) t2) \to ((getl i c (CHead d (Bind Abst) v0)) \to ((tau0 g d v0 w0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))))) (\lambda (H9: (eq T (TLRef i) (THead (Flat Appl) w v))).(let H10 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) w v) H9) in (False_ind ((eq T (lift (S i) O v0) t2) \to ((getl i c0 (CHead d (Bind Abst) v0)) \to ((tau0 g d v0 w0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))) H10))) c0 (sym_eq C c0 c0 H6) H7 H8 H4 H5)))) | (tau0_bind b c0 v0 t1 t0 H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (THead (Bind b) v0 t1) (THead (Flat Appl) w v))).(\lambda (H7: (eq T (THead (Bind b) v0 t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Bind b) v0 t1) (THead (Flat Appl) w v)) \to ((eq T (THead (Bind b) v0 t0) t2) \to ((tau0 g (CHead c (Bind b) v0) t1 t0) \to (ty3 g c0 (THead (Flat Appl) w v) t2))))) (\lambda (H8: (eq T (THead (Bind b) v0 t1) (THead (Flat Appl) w v))).(let H9 \def (eq_ind T (THead (Bind b) v0 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) w v) H8) in (False_ind ((eq T (THead (Bind b) v0 t0) t2) \to ((tau0 g (CHead c0 (Bind b) v0) t1 t0) \to (ty3 g c0 (THead (Flat Appl) w v) t2))) H9))) c0 (sym_eq C c0 c0 H5) H6 H7 H4)))) | (tau0_appl c0 v0 t1 t0 H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (THead (Flat Appl) v0 t1) (THead (Flat Appl) w v))).(\lambda (H7: (eq T (THead (Flat Appl) v0 t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Appl) v0 t1) (THead (Flat Appl) w v)) \to ((eq T (THead (Flat Appl) v0 t0) t2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (THead (Flat Appl) w v) t2))))) (\lambda (H8: (eq T (THead (Flat Appl) v0 t1) (THead (Flat Appl) w v))).(let H9 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t) \Rightarrow t])) (THead (Flat Appl) v0 t1) (THead (Flat Appl) w v) H8) in ((let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | (THead _ t _) \Rightarrow t])) (THead (Flat Appl) v0 t1) (THead (Flat Appl) w v) H8) in (eq_ind T w (\lambda (t: T).((eq T t1 v) \to ((eq T (THead (Flat Appl) t t0) t2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (THead (Flat Appl) w v) t2))))) (\lambda (H11: (eq T t1 v)).(eq_ind T v (\lambda (t: T).((eq T (THead (Flat Appl) w t0) t2) \to ((tau0 g c0 t t0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))) (\lambda (H12: (eq T (THead (Flat Appl) w t0) t2)).(eq_ind T (THead (Flat Appl) w t0) (\lambda (t: T).((tau0 g c0 v t0) \to (ty3 g c0 (THead (Flat Appl) w v) t))) (\lambda (H13: (tau0 g c0 v t0)).(let H_y \def (H3 t0 H13) in (let H1 \def (ty3_unique g c0 v t0 H_y (THead (Bind Abst) u0 t) H2) in (ex_ind T (\lambda (t: T).(ty3 g c0 t0 t)) (ty3 g c0 (THead (Flat Appl) w v) (THead (Flat Appl) w t0)) (\lambda (x: T).(\lambda (H3: (ty3 g c0 t0 x)).(ex_ind T (\lambda (t: T).(ty3 g c0 u0 t)) (ty3 g c0 (THead (Flat Appl) w v) (THead (Flat Appl) w t0)) (\lambda (x0: T).(\lambda (_: (ty3 g c0 u0 x0)).(ex_ind T (\lambda (t2: T).(ty3 g c0 (THead (Bind Abst) u0 t) t2)) (ty3 g c0 (THead (Flat Appl) w v) (THead (Flat Appl) w t0)) (\lambda (x1: T).(\lambda (H15: (ty3 g c0 (THead (Bind Abst) u0 t) x1)).(ex4_3_ind T T T (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(pc3 c0 (THead (Bind Abst) u0 t2) x1)))) (\lambda (_: T).(\lambda (t: T).(\lambda (_: T).(ty3 g c0 u0 t)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c0 (Bind Abst) u0) t t2)))) (\lambda (t2: T).(\lambda (_: T).(\lambda (t3: T).(ty3 g (CHead c0 (Bind Abst) u0) t2 t3)))) (ty3 g c0 (THead (Flat Appl) w v) (THead (Flat Appl) w t0)) (\lambda (x2: T).(\lambda (x3: T).(\lambda (x4: T).(\lambda (_: (pc3 c0 (THead (Bind Abst) u0 x2) x1)).(\lambda (H17: (ty3 g c0 u0 x3)).(\lambda (H18: (ty3 g (CHead c0 (Bind Abst) u0) t x2)).(\lambda (H19: (ty3 g (CHead c0 (Bind Abst) u0) x2 x4)).(ty3_conv g c0 (THead (Flat Appl) w t0) (THead (Flat Appl) w (THead (Bind Abst) u0 x2)) (ty3_appl g c0 w u0 H0 t0 x2 (ty3_sconv g c0 t0 x H3 (THead (Bind Abst) u0 t) (THead (Bind Abst) u0 x2) (ty3_bind g c0 u0 x3 H17 Abst t x2 H18 x4 H19) H1)) (THead (Flat Appl) w v) (THead (Flat Appl) w (THead (Bind Abst) u0 t)) (ty3_appl g c0 w u0 H0 v t H2) (pc3_s c0 (THead (Flat Appl) w (THead (Bind Abst) u0 t)) (THead (Flat Appl) w t0) (pc3_thin_dx c0 t0 (THead (Bind Abst) u0 t) H1 w Appl)))))))))) (ty3_gen_bind g Abst c0 u0 t x1 H15)))) (ty3_correct g c0 v (THead (Bind Abst) u0 t) H2)))) (ty3_correct g c0 w u0 H0)))) (ty3_correct g c0 v t0 H_y))))) t2 H12)) t1 (sym_eq T t1 v H11))) v0 (sym_eq T v0 w H10))) H9))) c0 (sym_eq C c0 c0 H5) H6 H7 H4)))) | (tau0_cast c0 v1 v2 H4 t1 t0 H5) \Rightarrow (\lambda (H6: (eq C c0 c0)).(\lambda (H7: (eq T (THead (Flat Cast) v1 t1) (THead (Flat Appl) w v))).(\lambda (H8: (eq T (THead (Flat Cast) v2 t0) t2)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Cast) v1 t1) (THead (Flat Appl) w v)) \to ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c v1 v2) \to ((tau0 g c t1 t0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))))) (\lambda (H9: (eq T (THead (Flat Cast) v1 t1) (THead (Flat Appl) w v))).(let H10 \def (eq_ind T (THead (Flat Cast) v1 t1) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) w v) H9) in (False_ind ((eq T (THead (Flat Cast) v2 t0) t2) \to ((tau0 g c0 v1 v2) \to ((tau0 g c0 t1 t0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))) H10))) c0 (sym_eq C c0 c0 H6) H7 H8 H4 H5))))]) in (H5 (refl_equal C c0) (refl_equal T (THead (Flat Appl) w v)) (refl_equal T t2)))))))))))))) (\lambda (c0: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: (ty3 g c0 t2 t3)).(\lambda (H1: ((\forall (t3: T).((tau0 g c0 t2 t3) \to (ty3 g c0 t2 t3))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t3 t0)).(\lambda (H3: ((\forall (t2: T).((tau0 g c0 t3 t2) \to (ty3 g c0 t3 t2))))).(\lambda (t4: T).(\lambda (H4: (tau0 g c0 (THead (Flat Cast) t3 t2) t4)).(let H5 \def (match H4 return (\lambda (c: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (tau0 ? c t t0)).((eq C c c0) \to ((eq T t (THead (Flat Cast) t3 t2)) \to ((eq T t0 t4) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))))))) with [(tau0_sort c0 n) \Rightarrow (\lambda (H4: (eq C c0 c0)).(\lambda (H5: (eq T (TSort n) (THead (Flat Cast) t3 t2))).(\lambda (H6: (eq T (TSort (next g n)) t4)).(eq_ind C c0 (\lambda (_: C).((eq T (TSort n) (THead (Flat Cast) t3 t2)) \to ((eq T (TSort (next g n)) t4) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))) (\lambda (H7: (eq T (TSort n) (THead (Flat Cast) t3 t2))).(let H8 \def (eq_ind T (TSort n) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t3 t2) H7) in (False_ind ((eq T (TSort (next g n)) t4) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)) H8))) c0 (sym_eq C c0 c0 H4) H5 H6)))) | (tau0_abbr c0 d v i H4 w H5) \Rightarrow (\lambda (H6: (eq C c0 c0)).(\lambda (H7: (eq T (TLRef i) (THead (Flat Cast) t3 t2))).(\lambda (H8: (eq T (lift (S i) O w) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (THead (Flat Cast) t3 t2)) \to ((eq T (lift (S i) O w) t4) \to ((getl i c (CHead d (Bind Abbr) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))))) (\lambda (H9: (eq T (TLRef i) (THead (Flat Cast) t3 t2))).(let H10 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t3 t2) H9) in (False_ind ((eq T (lift (S i) O w) t4) \to ((getl i c0 (CHead d (Bind Abbr) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))) H10))) c0 (sym_eq C c0 c0 H6) H7 H8 H4 H5)))) | (tau0_abst c0 d v i H4 w H5) \Rightarrow (\lambda (H6: (eq C c0 c0)).(\lambda (H7: (eq T (TLRef i) (THead (Flat Cast) t3 t2))).(\lambda (H8: (eq T (lift (S i) O v) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (TLRef i) (THead (Flat Cast) t3 t2)) \to ((eq T (lift (S i) O v) t4) \to ((getl i c (CHead d (Bind Abst) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))))) (\lambda (H9: (eq T (TLRef i) (THead (Flat Cast) t3 t2))).(let H10 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t3 t2) H9) in (False_ind ((eq T (lift (S i) O v) t4) \to ((getl i c0 (CHead d (Bind Abst) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))) H10))) c0 (sym_eq C c0 c0 H6) H7 H8 H4 H5)))) | (tau0_bind b c0 v t4 t5 H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (THead (Bind b) v t4) (THead (Flat Cast) t3 t2))).(\lambda (H7: (eq T (THead (Bind b) v t5) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Bind b) v t4) (THead (Flat Cast) t3 t2)) \to ((eq T (THead (Bind b) v t5) t4) \to ((tau0 g (CHead c (Bind b) v) t4 t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4))))) (\lambda (H8: (eq T (THead (Bind b) v t4) (THead (Flat Cast) t3 t2))).(let H9 \def (eq_ind T (THead (Bind b) v t4) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Cast) t3 t2) H8) in (False_ind ((eq T (THead (Bind b) v t5) t4) \to ((tau0 g (CHead c0 (Bind b) v) t4 t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4))) H9))) c0 (sym_eq C c0 c0 H5) H6 H7 H4)))) | (tau0_appl c0 v t4 t5 H4) \Rightarrow (\lambda (H5: (eq C c0 c0)).(\lambda (H6: (eq T (THead (Flat Appl) v t4) (THead (Flat Cast) t3 t2))).(\lambda (H7: (eq T (THead (Flat Appl) v t5) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Appl) v t4) (THead (Flat Cast) t3 t2)) \to ((eq T (THead (Flat Appl) v t5) t4) \to ((tau0 g c t4 t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4))))) (\lambda (H8: (eq T (THead (Flat Appl) v t4) (THead (Flat Cast) t3 t2))).(let H9 \def (eq_ind T (THead (Flat Appl) v t4) (\lambda (e: T).(match e return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow (match f return (\lambda (_: F).Prop) with [Appl \Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) t3 t2) H8) in (False_ind ((eq T (THead (Flat Appl) v t5) t4) \to ((tau0 g c0 t4 t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4))) H9))) c0 (sym_eq C c0 c0 H5) H6 H7 H4)))) | (tau0_cast c0 v1 v2 H4 t4 t5 H5) \Rightarrow (\lambda (H6: (eq C c0 c0)).(\lambda (H7: (eq T (THead (Flat Cast) v1 t4) (THead (Flat Cast) t3 t2))).(\lambda (H8: (eq T (THead (Flat Cast) v2 t5) t4)).(eq_ind C c0 (\lambda (c: C).((eq T (THead (Flat Cast) v1 t4) (THead (Flat Cast) t3 t2)) \to ((eq T (THead (Flat Cast) v2 t5) t4) \to ((tau0 g c v1 v2) \to ((tau0 g c t4 t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))))) (\lambda (H9: (eq T (THead (Flat Cast) v1 t4) (THead (Flat Cast) t3 t2))).(let H10 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 | (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) v1 t4) (THead (Flat Cast) t3 t2) H9) in ((let H11 \def (f_equal T T (\lambda (e: T).(match e return (\lambda (_: T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t _) \Rightarrow t])) (THead (Flat Cast) v1 t4) (THead (Flat Cast) t3 t2) H9) in (eq_ind T t3 (\lambda (t: T).((eq T t4 t2) \to ((eq T (THead (Flat Cast) v2 t5) t4) \to ((tau0 g c0 t v2) \to ((tau0 g c0 t4 t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))))) (\lambda (H12: (eq T t4 t2)).(eq_ind T t2 (\lambda (t: T).((eq T (THead (Flat Cast) v2 t5) t4) \to ((tau0 g c0 t3 v2) \to ((tau0 g c0 t t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4))))) (\lambda (H13: (eq T (THead (Flat Cast) v2 t5) t4)).(eq_ind T (THead (Flat Cast) v2 t5) (\lambda (t: T).((tau0 g c0 t3 v2) \to ((tau0 g c0 t2 t5) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t)))) (\lambda (H14: (tau0 g c0 t3 v2)).(\lambda (H15: (tau0 g c0 t2 t5)).(let H_y \def (H1 t5 H15) in (let H_y0 \def (H3 v2 H14) in (let H3 \def (ty3_unique g c0 t2 t5 H_y t3 H0) in (ex_ind T (\lambda (t: T).(ty3 g c0 v2 t)) (ty3 g c0 (THead (Flat Cast) t3 t2) (THead (Flat Cast) v2 t5)) (\lambda (x: T).(\lambda (H16: (ty3 g c0 v2 x)).(ex_ind T (\lambda (t: T).(ty3 g c0 t5 t)) (ty3 g c0 (THead (Flat Cast) t3 t2) (THead (Flat Cast) v2 t5)) (\lambda (x0: T).(\lambda (H17: (ty3 g c0 t5 x0)).(ty3_conv g c0 (THead (Flat Cast) v2 t5) v2 (ty3_cast g c0 t5 v2 (ty3_sconv g c0 t5 x0 H17 t3 v2 H_y0 H3) x H16) (THead (Flat Cast) t3 t2) t3 (ty3_cast g c0 t2 t3 H0 v2 H_y0) (pc3_s c0 t3 (THead (Flat Cast) v2 t5) (pc3_pr2_u c0 t5 (THead (Flat Cast) v2 t5) (pr2_free c0 (THead (Flat Cast) v2 t5) t5 (pr0_epsilon t5 t5 (pr0_refl t5) v2)) t3 H3))))) (ty3_correct g c0 t2 t5 H_y)))) (ty3_correct g c0 t3 v2 H_y0))))))) t4 H13)) t4 (sym_eq T t4 t2 H12))) v1 (sym_eq T v1 t3 H11))) H10))) c0 (sym_eq C c0 c0 H6) H7 H8 H4 H5))))]) in (H5 (refl_equal C c0) (refl_equal T (THead (Flat Cast) t3 t2)) (refl_equal T t4))))))))))))) c u t1 H))))). theorem ty3_arity: \forall (g: G).(\forall (c: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c t1 t2) \to (ex2 A (\lambda (a1: A).(arity g c t1 a1)) (\lambda (a1: A).(arity g c t2 (asucc g a1)))))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (ty3 g c t1 t2)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(ex2 A (\lambda (a1: A).(arity g c0 t a1)) (\lambda (a1: A).(arity g c0 t0 (asucc g a1))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t3 t)).(\lambda (H1: (ex2 A (\lambda (a1: A).(arity g c0 t3 a1)) (\lambda (a1: A).(arity g c0 t (asucc g a1))))).(\lambda (u: T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 u t4)).(\lambda (H3: (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1))))).(\lambda (H4: (pc3 c0 t4 t3)).(let H5 \def H1 in (ex2_ind A (\lambda (a1: A).(arity g c0 t3 a1)) (\lambda (a1: A).(arity g c0 t (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t3 (asucc g a1)))) (\lambda (x: A).(\lambda (H6: (arity g c0 t3 x)).(\lambda (_: (arity g c0 t (asucc g x))).(let H8 \def H3 in (ex2_ind A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t3 (asucc g a1)))) (\lambda (x0: A).(\lambda (H9: (arity g c0 u x0)).(\lambda (H10: (arity g c0 t4 (asucc g x0))).(let H11 \def H4 in (ex2_ind T (\lambda (t0: T).(pr3 c0 t4 t0)) (\lambda (t0: T).(pr3 c0 t3 t0)) (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t3 (asucc g a1)))) (\lambda (x1: T).(\lambda (H12: (pr3 c0 t4 x1)).(\lambda (H13: (pr3 c0 t3 x1)).(ex_intro2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t3 (asucc g a1))) x0 H9 (arity_repl g c0 t3 x H6 (asucc g x0) (leq_sym g (asucc g x0) x (arity_mono g c0 x1 (asucc g x0) (arity_sred_pr3 c0 t4 x1 H12 g (asucc g x0) H10) x (arity_sred_pr3 c0 t3 x1 H13 g x H6)))))))) H11))))) H8))))) H5)))))))))))) (\lambda (c0: C).(\lambda (m: nat).(ex_intro2 A (\lambda (a1: A).(arity g c0 (TSort m) a1)) (\lambda (a1: A).(arity g c0 (TSort (next g m)) (asucc g a1))) (ASort O m) (arity_sort g c0 m) (arity_sort g c0 (next g m))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: (ex2 A (\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (asucc g a1))))).(let H3 \def H2 in (ex2_ind A (\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O t) (asucc g a1)))) (\lambda (x: A).(\lambda (H4: (arity g d u x)).(\lambda (H5: (arity g d t (asucc g x))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O t) (asucc g a1))) x (arity_abbr g c0 d u n H0 x H4) (arity_lift g d t (asucc g x) H5 c0 (S n) O (getl_drop Abbr c0 d u n H0)))))) H3)))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: (ex2 A (\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (asucc g a1))))).(let H3 \def H2 in (ex2_ind A (\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O u) (asucc g a1)))) (\lambda (x: A).(\lambda (H4: (arity g d u x)).(\lambda (_: (arity g d t (asucc g x))).(let H_x \def (leq_asucc g x) in (let H6 \def H_x in (ex_ind A (\lambda (a0: A).(leq g x (asucc g a0))) (ex2 A (\lambda (a1: A).(arity g c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O u) (asucc g a1)))) (\lambda (x0: A).(\lambda (H7: (leq g x (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O u) (asucc g a1))) x0 (arity_abst g c0 d u n H0 x0 (arity_repl g d u x H4 (asucc g x0) H7)) (arity_lift g d u (asucc g x0) (arity_repl g d u x H4 (asucc g x0) H7) c0 (S n) O (getl_drop Abst c0 d u n H0))))) H6)))))) H3)))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (H1: (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (asucc g a1))))).(\lambda (b: B).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t3 t4)).(\lambda (H3: (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t3 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t4 (asucc g a1))))).(\lambda (t0: T).(\lambda (H4: (ty3 g (CHead c0 (Bind b) u) t4 t0)).(\lambda (H5: (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t4 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t0 (asucc g a1))))).(let H6 \def H1 in (ex2_ind A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Bind b) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b) u t4) (asucc g a1)))) (\lambda (x: A).(\lambda (H7: (arity g c0 u x)).(\lambda (_: (arity g c0 t (asucc g x))).(let H9 \def H3 in (ex2_ind A (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t3 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t4 (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Bind b) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b) u t4) (asucc g a1)))) (\lambda (x0: A).(\lambda (H10: (arity g (CHead c0 (Bind b) u) t3 x0)).(\lambda (H11: (arity g (CHead c0 (Bind b) u) t4 (asucc g x0))).(let H_x \def (leq_asucc g x) in (let H12 \def H_x in (ex_ind A (\lambda (a0: A).(leq g x (asucc g a0))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Bind b) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b) u t4) (asucc g a1)))) (\lambda (x1: A).(\lambda (H13: (leq g x (asucc g x1))).((match b return (\lambda (_: ?).(\lambda (b0: B).((ty3 g (CHead c0 (Bind b0) u) t4 t0) \to ((ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b0) u) t4 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind b0) u) t0 (asucc g a1)))) \to ((arity g (CHead c0 (Bind b0) u) t3 x0) \to ((arity g (CHead c0 (Bind b0) u) t4 (asucc g x0)) \to (ex2 A (\lambda (a1: A).(arity g c0 (THead (Bind b0) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b0) u t4) (asucc g a1)))))))))) with [Abbr \Rightarrow (\lambda (_: (ty3 g (CHead c0 (Bind Abbr) u) t4 t0)).(\lambda (_: (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abbr) u) t4 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind Abbr) u) t0 (asucc g a1))))).(\lambda (H16: (arity g (CHead c0 (Bind Abbr) u) t3 x0)).(\lambda (H17: (arity g (CHead c0 (Bind Abbr) u) t4 (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Bind Abbr) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abbr) u t4) (asucc g a1))) x0 (arity_bind g Abbr not_abbr_abst c0 u x H7 t3 x0 H16) (arity_bind g Abbr not_abbr_abst c0 u x H7 t4 (asucc g x0) H17)))))) | Abst \Rightarrow (\lambda (_: (ty3 g (CHead c0 (Bind Abst) u) t4 t0)).(\lambda (_: (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u) t4 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u) t0 (asucc g a1))))).(\lambda (H16: (arity g (CHead c0 (Bind Abst) u) t3 x0)).(\lambda (H17: (arity g (CHead c0 (Bind Abst) u) t4 (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t4) (asucc g a1))) (AHead x1 x0) (arity_head g c0 u x1 (arity_repl g c0 u x H7 (asucc g x1) H13) t3 x0 H16) (arity_repl g c0 (THead (Bind Abst) u t4) (AHead x1 (asucc g x0)) (arity_head g c0 u x1 (arity_repl g c0 u x H7 (asucc g x1) H13) t4 (asucc g x0) H17) (asucc g (AHead x1 x0)) (leq_refl g (asucc g (AHead x1 x0))))))))) | Void \Rightarrow (\lambda (_: (ty3 g (CHead c0 (Bind Void) u) t4 t0)).(\lambda (_: (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Void) u) t4 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind Void) u) t0 (asucc g a1))))).(\lambda (H16: (arity g (CHead c0 (Bind Void) u) t3 x0)).(\lambda (H17: (arity g (CHead c0 (Bind Void) u) t4 (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Bind Void) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Void) u t4) (asucc g a1))) x0 (arity_bind g Void not_void_abst c0 u x H7 t3 x0 H16) (arity_bind g Void not_void_abst c0 u x H7 t4 (asucc g x0) H17))))))]) H4 H5 H10 H11))) H12)))))) H9))))) H6))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (H1: (ex2 A (\lambda (a1: A).(arity g c0 w a1)) (\lambda (a1: A).(arity g c0 u (asucc g a1))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (H3: (ex2 A (\lambda (a1: A).(arity g c0 v a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t) (asucc g a1))))).(let H4 \def H1 in (ex2_ind A (\lambda (a1: A).(arity g c0 w a1)) (\lambda (a1: A).(arity g c0 u (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (asucc g a1)))) (\lambda (x: A).(\lambda (H5: (arity g c0 w x)).(\lambda (H6: (arity g c0 u (asucc g x))).(let H7 \def H3 in (ex2_ind A (\lambda (a1: A).(arity g c0 v a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t) (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (asucc g a1)))) (\lambda (x0: A).(\lambda (H8: (arity g c0 v x0)).(\lambda (H9: (arity g c0 (THead (Bind Abst) u t) (asucc g x0))).(let H10 \def (arity_gen_abst g c0 u t (asucc g x0) H9) in (ex3_2_ind A A (\lambda (a1: A).(\lambda (a2: A).(eq A (asucc g x0) (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (asucc g a1)))) (\lambda (x1: A).(\lambda (x2: A).(\lambda (H11: (eq A (asucc g x0) (AHead x1 x2))).(\lambda (H12: (arity g c0 u (asucc g x1))).(\lambda (H13: (arity g (CHead c0 (Bind Abst) u) t x2)).(let H14 \def (sym_equal A (asucc g x0) (AHead x1 x2) H11) in (let H15 \def (asucc_gen_head g x1 x2 x0 H14) in (ex2_ind A (\lambda (a0: A).(eq A x0 (AHead x1 a0))) (\lambda (a0: A).(eq A x2 (asucc g a0))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (asucc g a1)))) (\lambda (x3: A).(\lambda (H16: (eq A x0 (AHead x1 x3))).(\lambda (H17: (eq A x2 (asucc g x3))).(let H18 \def (eq_ind A x2 (\lambda (a: A).(arity g (CHead c0 (Bind Abst) u) t a)) H13 (asucc g x3) H17) in (let H19 \def (eq_ind A x0 (\lambda (a: A).(arity g c0 v a)) H8 (AHead x1 x3) H16) in (ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (asucc g a1))) x3 (arity_appl g c0 w x1 (arity_repl g c0 w x H5 x1 (leq_sym g x1 x (asucc_inj g x1 x (arity_mono g c0 u (asucc g x1) H12 (asucc g x) H6)))) v x3 H19) (arity_appl g c0 w x H5 (THead (Bind Abst) u t) (asucc g x3) (arity_head g c0 u x H6 t (asucc g x3) H18)))))))) H15)))))))) H10))))) H7))))) H4))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 t3 t4)).(\lambda (H1: (ex2 A (\lambda (a1: A).(arity g c0 t3 a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t4 t0)).(\lambda (_: (ex2 A (\lambda (a1: A).(arity g c0 t4 a1)) (\lambda (a1: A).(arity g c0 t0 (asucc g a1))))).(let H4 \def H1 in (ex2_ind A (\lambda (a1: A).(arity g c0 t3 a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Cast) t4 t3) a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1)))) (\lambda (x: A).(\lambda (H5: (arity g c0 t3 x)).(\lambda (H6: (arity g c0 t4 (asucc g x))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Flat Cast) t4 t3) a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1))) x (arity_cast g c0 t4 x H6 t3 H5) H6)))) H4)))))))))) c t1 t2 H))))). + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H: (ty3 g c t1 t2)).(ty3_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).(ex2 A (\lambda (a1: A).(arity g c0 t a1)) (\lambda (a1: A).(arity g c0 t0 (asucc g a1))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t3 t)).(\lambda (H1: (ex2 A (\lambda (a1: A).(arity g c0 t3 a1)) (\lambda (a1: A).(arity g c0 t (asucc g a1))))).(\lambda (u: T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 u t4)).(\lambda (H3: (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1))))).(\lambda (H4: (pc3 c0 t4 t3)).(let H5 \def H1 in (ex2_ind A (\lambda (a1: A).(arity g c0 t3 a1)) (\lambda (a1: A).(arity g c0 t (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t3 (asucc g a1)))) (\lambda (x: A).(\lambda (H6: (arity g c0 t3 x)).(\lambda (_: (arity g c0 t (asucc g x))).(let H8 \def H3 in (ex2_ind A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t3 (asucc g a1)))) (\lambda (x0: A).(\lambda (H9: (arity g c0 u x0)).(\lambda (H10: (arity g c0 t4 (asucc g x0))).(let H11 \def H4 in (ex2_ind T (\lambda (t0: T).(pr3 c0 t4 t0)) (\lambda (t0: T).(pr3 c0 t3 t0)) (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t3 (asucc g a1)))) (\lambda (x1: T).(\lambda (H12: (pr3 c0 t4 x1)).(\lambda (H13: (pr3 c0 t3 x1)).(ex_intro2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t3 (asucc g a1))) x0 H9 (arity_repl g c0 t3 x H6 (asucc g x0) (leq_sym g (asucc g x0) x (arity_mono g c0 x1 (asucc g x0) (arity_sred_pr3 c0 t4 x1 H12 g (asucc g x0) H10) x (arity_sred_pr3 c0 t3 x1 H13 g x H6)))))))) H11))))) H8))))) H5)))))))))))) (\lambda (c0: C).(\lambda (m: nat).(ex_intro2 A (\lambda (a1: A).(arity g c0 (TSort m) a1)) (\lambda (a1: A).(arity g c0 (TSort (next g m)) (asucc g a1))) (ASort O m) (arity_sort g c0 m) (arity_sort g c0 (next g m))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: (ex2 A (\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (asucc g a1))))).(let H3 \def H2 in (ex2_ind A (\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O t) (asucc g a1)))) (\lambda (x: A).(\lambda (H4: (arity g d u x)).(\lambda (H5: (arity g d t (asucc g x))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O t) (asucc g a1))) x (arity_abbr g c0 d u n H0 x H4) (arity_lift g d t (asucc g x) H5 c0 (S n) O (getl_drop Abbr c0 d u n H0)))))) H3)))))))))) (\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c0 (CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (_: (ty3 g d u t)).(\lambda (H2: (ex2 A (\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (asucc g a1))))).(let H3 \def H2 in (ex2_ind A (\lambda (a1: A).(arity g d u a1)) (\lambda (a1: A).(arity g d t (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O u) (asucc g a1)))) (\lambda (x: A).(\lambda (H4: (arity g d u x)).(\lambda (_: (arity g d t (asucc g x))).(let H_x \def (leq_asucc g x) in (let H6 \def H_x in (ex_ind A (\lambda (a0: A).(leq g x (asucc g a0))) (ex2 A (\lambda (a1: A).(arity g c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O u) (asucc g a1)))) (\lambda (x0: A).(\lambda (H7: (leq g x (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (TLRef n) a1)) (\lambda (a1: A).(arity g c0 (lift (S n) O u) (asucc g a1))) x0 (arity_abst g c0 d u n H0 x0 (arity_repl g d u x H4 (asucc g x0) H7)) (arity_lift g d u (asucc g x0) (arity_repl g d u x H4 (asucc g x0) H7) c0 (S n) O (getl_drop Abst c0 d u n H0))))) H6)))))) H3)))))))))) (\lambda (c0: C).(\lambda (u: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (H1: (ex2 A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (asucc g a1))))).(\lambda (b: B).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g (CHead c0 (Bind b) u) t3 t4)).(\lambda (H3: (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t3 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t4 (asucc g a1))))).(\lambda (t0: T).(\lambda (H4: (ty3 g (CHead c0 (Bind b) u) t4 t0)).(\lambda (H5: (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t4 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t0 (asucc g a1))))).(let H6 \def H1 in (ex2_ind A (\lambda (a1: A).(arity g c0 u a1)) (\lambda (a1: A).(arity g c0 t (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Bind b) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b) u t4) (asucc g a1)))) (\lambda (x: A).(\lambda (H7: (arity g c0 u x)).(\lambda (_: (arity g c0 t (asucc g x))).(let H9 \def H3 in (ex2_ind A (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t3 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind b) u) t4 (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Bind b) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b) u t4) (asucc g a1)))) (\lambda (x0: A).(\lambda (H10: (arity g (CHead c0 (Bind b) u) t3 x0)).(\lambda (H11: (arity g (CHead c0 (Bind b) u) t4 (asucc g x0))).(let H_x \def (leq_asucc g x) in (let H12 \def H_x in (ex_ind A (\lambda (a0: A).(leq g x (asucc g a0))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Bind b) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b) u t4) (asucc g a1)))) (\lambda (x1: A).(\lambda (H13: (leq g x (asucc g x1))).((match b return (\lambda (b0: B).((ty3 g (CHead c0 (Bind b0) u) t4 t0) \to ((ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind b0) u) t4 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind b0) u) t0 (asucc g a1)))) \to ((arity g (CHead c0 (Bind b0) u) t3 x0) \to ((arity g (CHead c0 (Bind b0) u) t4 (asucc g x0)) \to (ex2 A (\lambda (a1: A).(arity g c0 (THead (Bind b0) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind b0) u t4) (asucc g a1))))))))) with [Abbr \Rightarrow (\lambda (_: (ty3 g (CHead c0 (Bind Abbr) u) t4 t0)).(\lambda (_: (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abbr) u) t4 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind Abbr) u) t0 (asucc g a1))))).(\lambda (H16: (arity g (CHead c0 (Bind Abbr) u) t3 x0)).(\lambda (H17: (arity g (CHead c0 (Bind Abbr) u) t4 (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Bind Abbr) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abbr) u t4) (asucc g a1))) x0 (arity_bind g Abbr not_abbr_abst c0 u x H7 t3 x0 H16) (arity_bind g Abbr not_abbr_abst c0 u x H7 t4 (asucc g x0) H17)))))) | Abst \Rightarrow (\lambda (_: (ty3 g (CHead c0 (Bind Abst) u) t4 t0)).(\lambda (_: (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u) t4 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind Abst) u) t0 (asucc g a1))))).(\lambda (H16: (arity g (CHead c0 (Bind Abst) u) t3 x0)).(\lambda (H17: (arity g (CHead c0 (Bind Abst) u) t4 (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t4) (asucc g a1))) (AHead x1 x0) (arity_head g c0 u x1 (arity_repl g c0 u x H7 (asucc g x1) H13) t3 x0 H16) (arity_repl g c0 (THead (Bind Abst) u t4) (AHead x1 (asucc g x0)) (arity_head g c0 u x1 (arity_repl g c0 u x H7 (asucc g x1) H13) t4 (asucc g x0) H17) (asucc g (AHead x1 x0)) (leq_refl g (asucc g (AHead x1 x0))))))))) | Void \Rightarrow (\lambda (_: (ty3 g (CHead c0 (Bind Void) u) t4 t0)).(\lambda (_: (ex2 A (\lambda (a1: A).(arity g (CHead c0 (Bind Void) u) t4 a1)) (\lambda (a1: A).(arity g (CHead c0 (Bind Void) u) t0 (asucc g a1))))).(\lambda (H16: (arity g (CHead c0 (Bind Void) u) t3 x0)).(\lambda (H17: (arity g (CHead c0 (Bind Void) u) t4 (asucc g x0))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Bind Void) u t3) a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Void) u t4) (asucc g a1))) x0 (arity_bind g Void not_void_abst c0 u x H7 t3 x0 H16) (arity_bind g Void not_void_abst c0 u x H7 t4 (asucc g x0) H17))))))]) H4 H5 H10 H11))) H12)))))) H9))))) H6))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda (u: T).(\lambda (_: (ty3 g c0 w u)).(\lambda (H1: (ex2 A (\lambda (a1: A).(arity g c0 w a1)) (\lambda (a1: A).(arity g c0 u (asucc g a1))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u t))).(\lambda (H3: (ex2 A (\lambda (a1: A).(arity g c0 v a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t) (asucc g a1))))).(let H4 \def H1 in (ex2_ind A (\lambda (a1: A).(arity g c0 w a1)) (\lambda (a1: A).(arity g c0 u (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (asucc g a1)))) (\lambda (x: A).(\lambda (H5: (arity g c0 w x)).(\lambda (H6: (arity g c0 u (asucc g x))).(let H7 \def H3 in (ex2_ind A (\lambda (a1: A).(arity g c0 v a1)) (\lambda (a1: A).(arity g c0 (THead (Bind Abst) u t) (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (asucc g a1)))) (\lambda (x0: A).(\lambda (H8: (arity g c0 v x0)).(\lambda (H9: (arity g c0 (THead (Bind Abst) u t) (asucc g x0))).(let H10 \def (arity_gen_abst g c0 u t (asucc g x0) H9) in (ex3_2_ind A A (\lambda (a1: A).(\lambda (a2: A).(eq A (asucc g x0) (AHead a1 a2)))) (\lambda (a1: A).(\lambda (_: A).(arity g c0 u (asucc g a1)))) (\lambda (_: A).(\lambda (a2: A).(arity g (CHead c0 (Bind Abst) u) t a2))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (asucc g a1)))) (\lambda (x1: A).(\lambda (x2: A).(\lambda (H11: (eq A (asucc g x0) (AHead x1 x2))).(\lambda (H12: (arity g c0 u (asucc g x1))).(\lambda (H13: (arity g (CHead c0 (Bind Abst) u) t x2)).(let H14 \def (sym_equal A (asucc g x0) (AHead x1 x2) H11) in (let H15 \def (asucc_gen_head g x1 x2 x0 H14) in (ex2_ind A (\lambda (a0: A).(eq A x0 (AHead x1 a0))) (\lambda (a0: A).(eq A x2 (asucc g a0))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (asucc g a1)))) (\lambda (x3: A).(\lambda (H16: (eq A x0 (AHead x1 x3))).(\lambda (H17: (eq A x2 (asucc g x3))).(let H18 \def (eq_ind A x2 (\lambda (a: A).(arity g (CHead c0 (Bind Abst) u) t a)) H13 (asucc g x3) H17) in (let H19 \def (eq_ind A x0 (\lambda (a: A).(arity g c0 v a)) H8 (AHead x1 x3) H16) in (ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w v) a1)) (\lambda (a1: A).(arity g c0 (THead (Flat Appl) w (THead (Bind Abst) u t)) (asucc g a1))) x3 (arity_appl g c0 w x1 (arity_repl g c0 w x H5 x1 (leq_sym g x1 x (asucc_inj g x1 x (arity_mono g c0 u (asucc g x1) H12 (asucc g x) H6)))) v x3 H19) (arity_appl g c0 w x H5 (THead (Bind Abst) u t) (asucc g x3) (arity_head g c0 u x H6 t (asucc g x3) H18)))))))) H15)))))))) H10))))) H7))))) H4))))))))))) (\lambda (c0: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g c0 t3 t4)).(\lambda (H1: (ex2 A (\lambda (a1: A).(arity g c0 t3 a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t4 t0)).(\lambda (_: (ex2 A (\lambda (a1: A).(arity g c0 t4 a1)) (\lambda (a1: A).(arity g c0 t0 (asucc g a1))))).(let H4 \def H1 in (ex2_ind A (\lambda (a1: A).(arity g c0 t3 a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1))) (ex2 A (\lambda (a1: A).(arity g c0 (THead (Flat Cast) t4 t3) a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1)))) (\lambda (x: A).(\lambda (H5: (arity g c0 t3 x)).(\lambda (H6: (arity g c0 t4 (asucc g x))).(ex_intro2 A (\lambda (a1: A).(arity g c0 (THead (Flat Cast) t4 t3) a1)) (\lambda (a1: A).(arity g c0 t4 (asucc g a1))) x (arity_cast g c0 t4 x H6 t3 H5) H6)))) H4)))))))))) c t1 t2 H))))). theorem ty3_predicative: \forall (g: G).(\forall (c: C).(\forall (v: T).(\forall (t: T).(\forall (u: T).((ty3 g c (THead (Bind Abst) v t) u) \to ((pc3 c u v) \to (\forall (P: Prop).P))))))) @@ -3161,5 +3161,5 @@ theorem pc3_abst_dec: theorem ty3_inference: \forall (g: G).(\forall (c: C).(\forall (t1: T).(or (ex T (\lambda (t2: T).(ty3 g c t1 t2))) (\forall (t2: T).((ty3 g c t1 t2) \to (\forall (P: Prop).P)))))) \def - \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(flt_wf_ind (\lambda (c0: C).(\lambda (t: T).(or (ex T (\lambda (t2: T).(ty3 g c0 t t2))) (\forall (t2: T).((ty3 g c0 t t2) \to (\forall (P: Prop).P)))))) (\lambda (c2: C).(\lambda (t2: T).(match t2 return (\lambda (_: ?).(\lambda (t: T).(((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 t) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P)))))))) \to (or (ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: Prop).P))))))) with [(TSort n) \Rightarrow (\lambda (_: ((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (TSort n)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P))))))))).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (TSort n) t3))) (\forall (t3: T).((ty3 g c2 (TSort n) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (TSort n) t3)) (TSort (next g n)) (ty3_sort g c2 n)))) | (TLRef n) \Rightarrow (\lambda (H: ((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (TLRef n)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P))))))))).(let H_x \def (getl_dec c2 n) in (let H0 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n c2 (CHead e (Bind b) v)))))) (\forall (d: C).((getl n c2 d) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P)))) (\lambda (H1: (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n c2 (CHead e (Bind b) v))))))).(ex_3_ind C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n c2 (CHead e (Bind b) v))))) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P)))) (\lambda (x0: C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H2: (getl n c2 (CHead x0 (Bind x1) x2))).(let H3 \def (H x0 x2 (getl_flt x1 c2 x0 x2 n H2)) in (or_ind (ex T (\lambda (t3: T).(ty3 g x0 x2 t3))) (\forall (t3: T).((ty3 g x0 x2 t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P)))) (\lambda (H4: (ex T (\lambda (t2: T).(ty3 g x0 x2 t2)))).(ex_ind T (\lambda (t3: T).(ty3 g x0 x2 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P)))) (\lambda (x: T).(\lambda (H5: (ty3 g x0 x2 x)).((match x1 return (\lambda (_: ?).(\lambda (b: B).((getl n c2 (CHead x0 (Bind b) x2)) \to (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))))))) with [Abbr \Rightarrow (\lambda (H6: (getl n c2 (CHead x0 (Bind Abbr) x2))).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3)) (lift (S n) O x) (ty3_abbr g n c2 x0 x2 H6 x H5)))) | Abst \Rightarrow (\lambda (H6: (getl n c2 (CHead x0 (Bind Abst) x2))).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3)) (lift (S n) O x2) (ty3_abst g n c2 x0 x2 H6 x H5)))) | Void \Rightarrow (\lambda (H6: (getl n c2 (CHead x0 (Bind Void) x2))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H7: (ty3 g c2 (TLRef n) t3)).(\lambda (P: Prop).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) P (\lambda (H8: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) P (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 c2 (lift (S n) O x5) t3)).(\lambda (H10: (getl n c2 (CHead x3 (Bind Abbr) x4))).(\lambda (_: (ty3 g x3 x4 x5)).(let H12 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (c: C).(getl n c2 c)) H6 (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abbr) x4) H10)) in (let H13 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abbr) x4) H10)) in (False_ind P H13))))))))) H8)) (\lambda (H8: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) P (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 c2 (lift (S n) O x4) t3)).(\lambda (H10: (getl n c2 (CHead x3 (Bind Abst) x4))).(\lambda (_: (ty3 g x3 x4 x5)).(let H12 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (c: C).(getl n c2 c)) H6 (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abst) x4) H10)) in (let H13 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (ee: C).(match ee return (\lambda (_: ?).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: ?).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abst) x4) H10)) in (False_ind P H13))))))))) H8)) (ty3_gen_lref g c2 t3 n H7)))))))]) H2))) H4)) (\lambda (H4: ((\forall (t2: T).((ty3 g x0 x2 t2) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H5: (ty3 g c2 (TLRef n) t3)).(\lambda (P: Prop).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) P (\lambda (H6: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) P (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 c2 (lift (S n) O x5) t3)).(\lambda (H8: (getl n c2 (CHead x3 (Bind Abbr) x4))).(\lambda (H9: (ty3 g x3 x4 x5)).(let H10 \def (eq_ind C (CHead x0 (Bind x1) x2) (\lambda (c: C).(getl n c2 c)) H2 (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abbr) x4) H8)) in (let H11 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow x0 | (CHead c _ _) \Rightarrow c])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abbr) x4) H8)) in ((let H12 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow x1 | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow x1])])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abbr) x4) H8)) in ((let H13 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow x2 | (CHead _ _ t) \Rightarrow t])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abbr) x4) H8)) in (\lambda (_: (eq B x1 Abbr)).(\lambda (H15: (eq C x0 x3)).(let H16 \def (eq_ind_r T x4 (\lambda (t: T).(getl n c2 (CHead x3 (Bind Abbr) t))) H10 x2 H13) in (let H17 \def (eq_ind_r T x4 (\lambda (t: T).(ty3 g x3 t x5)) H9 x2 H13) in (let H18 \def (eq_ind_r C x3 (\lambda (c: C).(getl n c2 (CHead c (Bind Abbr) x2))) H16 x0 H15) in (let H19 \def (eq_ind_r C x3 (\lambda (c: C).(ty3 g c x2 x5)) H17 x0 H15) in (H4 x5 H19 P)))))))) H12)) H11))))))))) H6)) (\lambda (H6: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) P (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H7: (pc3 c2 (lift (S n) O x4) t3)).(\lambda (H8: (getl n c2 (CHead x3 (Bind Abst) x4))).(\lambda (H9: (ty3 g x3 x4 x5)).(let H10 \def (eq_ind C (CHead x0 (Bind x1) x2) (\lambda (c: C).(getl n c2 c)) H2 (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abst) x4) H8)) in (let H11 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: ?).C) with [(CSort _) \Rightarrow x0 | (CHead c _ _) \Rightarrow c])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abst) x4) H8)) in ((let H12 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: ?).B) with [(CSort _) \Rightarrow x1 | (CHead _ k _) \Rightarrow (match k return (\lambda (_: ?).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow x1])])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abst) x4) H8)) in ((let H13 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: ?).T) with [(CSort _) \Rightarrow x2 | (CHead _ _ t) \Rightarrow t])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abst) x4) H8)) in (\lambda (_: (eq B x1 Abst)).(\lambda (H15: (eq C x0 x3)).(let H16 \def (eq_ind_r T x4 (\lambda (t: T).(getl n c2 (CHead x3 (Bind Abst) t))) H10 x2 H13) in (let H17 \def (eq_ind_r T x4 (\lambda (t: T).(ty3 g x3 t x5)) H9 x2 H13) in (let H18 \def (eq_ind_r T x4 (\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)) H7 x2 H13) in (let H19 \def (eq_ind_r C x3 (\lambda (c: C).(getl n c2 (CHead c (Bind Abst) x2))) H16 x0 H15) in (let H20 \def (eq_ind_r C x3 (\lambda (c: C).(ty3 g c x2 x5)) H17 x0 H15) in (H4 x5 H20 P))))))))) H12)) H11))))))))) H6)) (ty3_gen_lref g c2 t3 n H5))))))) H3)))))) H1)) (\lambda (H1: ((\forall (d: C).((getl n c2 d) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H2: (ty3 g c2 (TLRef n) t3)).(\lambda (P: Prop).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) P (\lambda (H3: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) P (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (lift (S n) O x2) t3)).(\lambda (H5: (getl n c2 (CHead x0 (Bind Abbr) x1))).(\lambda (_: (ty3 g x0 x1 x2)).(H1 (CHead x0 (Bind Abbr) x1) H5 P))))))) H3)) (\lambda (H3: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) P (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (lift (S n) O x1) t3)).(\lambda (H5: (getl n c2 (CHead x0 (Bind Abst) x1))).(\lambda (_: (ty3 g x0 x1 x2)).(H1 (CHead x0 (Bind Abst) x1) H5 P))))))) H3)) (ty3_gen_lref g c2 t3 n H2))))))) H0)))) | (THead k t t0) \Rightarrow (\lambda (H: ((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (THead k t t0)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P))))))))).((match k return (\lambda (_: ?).(\lambda (k0: K).(((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (THead k0 t t0)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P)))))))) \to (or (ex T (\lambda (t3: T).(ty3 g c2 (THead k0 t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead k0 t t0) t3) \to (\forall (P: Prop).P))))))) with [(Bind b) \Rightarrow (\lambda (H0: ((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (THead (Bind b) t t0)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P))))))))).(let H1 \def (H0 c2 t (flt_thead_sx (Bind b) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H2: (ex T (\lambda (t2: T).(ty3 g c2 t t2)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x: T).(\lambda (H3: (ty3 g c2 t x)).(let H4 \def (H0 (CHead c2 (Bind b) t) t0 (flt_shift (Bind b) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) t0 t3))) (\forall (t3: T).((ty3 g (CHead c2 (Bind b) t) t0 t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H5: (ex T (\lambda (t2: T).(ty3 g (CHead c2 (Bind b) t) t0 t2)))).(ex_ind T (\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) t0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x0: T).(\lambda (H6: (ty3 g (CHead c2 (Bind b) t) t0 x0)).(ex_ind T (\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) x0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x1: T).(\lambda (H7: (ty3 g (CHead c2 (Bind b) t) x0 x1)).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3)) (THead (Bind b) t x0) (ty3_bind g c2 t x H3 b t0 x0 H6 x1 H7))))) (ty3_correct g (CHead c2 (Bind b) t) t0 x0 H6)))) H5)) (\lambda (H5: ((\forall (t2: T).((ty3 g (CHead c2 (Bind b) t) t0 t2) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H6: (ty3 g c2 (THead (Bind b) t t0) t3)).(\lambda (P: Prop).(ex4_3_ind T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind b) t t4) t3)))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c2 t t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) t) t0 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c2 (Bind b) t) t4 t6)))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (THead (Bind b) t x0) t3)).(\lambda (_: (ty3 g c2 t x1)).(\lambda (H9: (ty3 g (CHead c2 (Bind b) t) t0 x0)).(\lambda (_: (ty3 g (CHead c2 (Bind b) t) x0 x2)).(H5 x0 H9 P)))))))) (ty3_gen_bind g b c2 t t0 t3 H6))))))) H4)))) H2)) (\lambda (H2: ((\forall (t2: T).((ty3 g c2 t t2) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H3: (ty3 g c2 (THead (Bind b) t t0) t3)).(\lambda (P: Prop).(ex4_3_ind T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind b) t t4) t3)))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c2 t t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) t) t0 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c2 (Bind b) t) t4 t6)))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (THead (Bind b) t x0) t3)).(\lambda (H5: (ty3 g c2 t x1)).(\lambda (_: (ty3 g (CHead c2 (Bind b) t) t0 x0)).(\lambda (_: (ty3 g (CHead c2 (Bind b) t) x0 x2)).(H2 x1 H5 P)))))))) (ty3_gen_bind g b c2 t t0 t3 H3))))))) H1))) | (Flat f) \Rightarrow (\lambda (H0: ((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (THead (Flat f) t t0)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P))))))))).((match f return (\lambda (_: ?).(\lambda (f0: F).(((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (THead (Flat f0) t t0)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P)))))))) \to (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat f0) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat f0) t t0) t3) \to (\forall (P: Prop).P))))))) with [Appl \Rightarrow (\lambda (H1: ((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (THead (Flat Appl) t t0)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P))))))))).(let H2 \def (H1 c2 t (flt_thead_sx (Flat Appl) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H3: (ex T (\lambda (t2: T).(ty3 g c2 t t2)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x: T).(\lambda (H4: (ty3 g c2 t x)).(let H5 \def (H1 c2 t0 (flt_thead_dx (Flat Appl) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g c2 t0 t3))) (\forall (t3: T).((ty3 g c2 t0 t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H6: (ex T (\lambda (t2: T).(ty3 g c2 t0 t2)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x0: T).(\lambda (H7: (ty3 g c2 t0 x0)).(ex_ind T (\lambda (t3: T).(ty3 g c2 x0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x1: T).(\lambda (H8: (ty3 g c2 x0 x1)).(ex_ind T (\lambda (t3: T).(ty3 g c2 x t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x2: T).(\lambda (H9: (ty3 g c2 x x2)).(let H10 \def (ty3_sn3 g c2 x x2 H9) in (let H_x \def (nf2_sn3 c2 x H10) in (let H11 \def H_x in (ex2_ind T (\lambda (u: T).(pr3 c2 x u)) (\lambda (u: T).(nf2 c2 u)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x3: T).(\lambda (H12: (pr3 c2 x x3)).(\lambda (H13: (nf2 c2 x3)).(let H14 \def (ty3_sred_pr3 c2 x x3 H12 g x2 H9) in (let H_x0 \def (pc3_abst_dec g c2 x0 x1 H8 x3 x2 H14) in (let H15 \def H_x0 in (or_ind (ex4_2 T T (\lambda (u: T).(\lambda (_: T).(pc3 c2 x0 (THead (Bind Abst) x3 u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c2 (THead (Bind Abst) v2 u) x1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c2 x3 v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c2 v2)))) (\forall (u: T).((pc3 c2 x0 (THead (Bind Abst) x3 u)) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H16: (ex4_2 T T (\lambda (u: T).(\lambda (_: T).(pc3 c2 x0 (THead (Bind Abst) x3 u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c2 (THead (Bind Abst) v2 u) x1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c2 x3 v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c2 v2))))).(ex4_2_ind T T (\lambda (u: T).(\lambda (_: T).(pc3 c2 x0 (THead (Bind Abst) x3 u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c2 (THead (Bind Abst) v2 u) x1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c2 x3 v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c2 v2))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H17: (pc3 c2 x0 (THead (Bind Abst) x3 x4))).(\lambda (H18: (ty3 g c2 (THead (Bind Abst) x5 x4) x1)).(\lambda (H19: (pr3 c2 x3 x5)).(\lambda (_: (nf2 c2 x5)).(let H_y \def (nf2_pr3_unfold c2 x3 x5 H19 H13) in (let H21 \def (eq_ind_r T x5 (\lambda (t: T).(pr3 c2 x3 t)) H19 x3 H_y) in (let H22 \def (eq_ind_r T x5 (\lambda (t: T).(ty3 g c2 (THead (Bind Abst) t x4) x1)) H18 x3 H_y) in (or_introl (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3)) (THead (Flat Appl) t (THead (Bind Abst) x3 x4)) (ty3_appl g c2 t x3 (ty3_tred g c2 t x H4 x3 H12) t0 x4 (ty3_conv g c2 (THead (Bind Abst) x3 x4) x1 H22 t0 x0 H7 H17))))))))))))) H16)) (\lambda (H16: ((\forall (u: T).((pc3 c2 x0 (THead (Bind Abst) x3 u)) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H17: (ty3 g c2 (THead (Flat Appl) t t0) t3)).(\lambda (P: Prop).(ex3_2_ind T T (\lambda (u: T).(\lambda (t4: T).(pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) u t4)) t3))) (\lambda (u: T).(\lambda (t4: T).(ty3 g c2 t0 (THead (Bind Abst) u t4)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c2 t u))) P (\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) x4 x5)) t3)).(\lambda (H19: (ty3 g c2 t0 (THead (Bind Abst) x4 x5))).(\lambda (H20: (ty3 g c2 t x4)).(let H_y \def (ty3_unique g c2 t x4 H20 x H4) in (let H_y0 \def (ty3_unique g c2 t0 (THead (Bind Abst) x4 x5) H19 x0 H7) in (H16 x5 (pc3_t (THead (Bind Abst) x4 x5) c2 x0 (pc3_s c2 x0 (THead (Bind Abst) x4 x5) H_y0) (THead (Bind Abst) x3 x5) (pc3_head_1 c2 x4 x3 (pc3_t x c2 x4 H_y x3 (pc3_pr3_r c2 x x3 H12)) (Bind Abst) x5)) P)))))))) (ty3_gen_appl g c2 t t0 t3 H17))))))) H15))))))) H11)))))) (ty3_correct g c2 t x H4)))) (ty3_correct g c2 t0 x0 H7)))) H6)) (\lambda (H6: ((\forall (t2: T).((ty3 g c2 t0 t2) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H7: (ty3 g c2 (THead (Flat Appl) t t0) t3)).(\lambda (P: Prop).(ex3_2_ind T T (\lambda (u: T).(\lambda (t4: T).(pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) u t4)) t3))) (\lambda (u: T).(\lambda (t4: T).(ty3 g c2 t0 (THead (Bind Abst) u t4)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c2 t u))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) t3)).(\lambda (H9: (ty3 g c2 t0 (THead (Bind Abst) x0 x1))).(\lambda (_: (ty3 g c2 t x0)).(H6 (THead (Bind Abst) x0 x1) H9 P)))))) (ty3_gen_appl g c2 t t0 t3 H7))))))) H5)))) H3)) (\lambda (H3: ((\forall (t2: T).((ty3 g c2 t t2) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H4: (ty3 g c2 (THead (Flat Appl) t t0) t3)).(\lambda (P: Prop).(ex3_2_ind T T (\lambda (u: T).(\lambda (t4: T).(pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) u t4)) t3))) (\lambda (u: T).(\lambda (t4: T).(ty3 g c2 t0 (THead (Bind Abst) u t4)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c2 t u))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) t3)).(\lambda (_: (ty3 g c2 t0 (THead (Bind Abst) x0 x1))).(\lambda (H7: (ty3 g c2 t x0)).(H3 x0 H7 P)))))) (ty3_gen_appl g c2 t t0 t3 H4))))))) H2))) | Cast \Rightarrow (\lambda (H1: ((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (THead (Flat Cast) t t0)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P))))))))).(let H2 \def (H1 c2 t (flt_thead_sx (Flat Cast) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H3: (ex T (\lambda (t2: T).(ty3 g c2 t t2)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x: T).(\lambda (H4: (ty3 g c2 t x)).(let H5 \def (H1 c2 t0 (flt_thead_dx (Flat Cast) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g c2 t0 t3))) (\forall (t3: T).((ty3 g c2 t0 t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H6: (ex T (\lambda (t2: T).(ty3 g c2 t0 t2)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x0: T).(\lambda (H7: (ty3 g c2 t0 x0)).(ex_ind T (\lambda (t3: T).(ty3 g c2 x0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x1: T).(\lambda (H8: (ty3 g c2 x0 x1)).(let H_x \def (pc3_dec g c2 x0 x1 H8 t x H4) in (let H9 \def H_x in (or_ind (pc3 c2 x0 t) ((pc3 c2 x0 t) \to (\forall (P: Prop).P)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H10: (pc3 c2 x0 t)).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3)) t (ty3_cast g c2 t0 t (ty3_conv g c2 t x H4 t0 x0 H7 H10) x H4)))) (\lambda (H10: (((pc3 c2 x0 t) \to (\forall (P: Prop).P)))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H11: (ty3 g c2 (THead (Flat Cast) t t0) t3)).(\lambda (P: Prop).(and_ind (pc3 c2 t t3) (ty3 g c2 t0 t) P (\lambda (_: (pc3 c2 t t3)).(\lambda (H13: (ty3 g c2 t0 t)).(let H_y \def (ty3_unique g c2 t0 t H13 x0 H7) in (H10 (pc3_s c2 x0 t H_y) P)))) (ty3_gen_cast g c2 t0 t t3 H11))))))) H9))))) (ty3_correct g c2 t0 x0 H7)))) H6)) (\lambda (H6: ((\forall (t2: T).((ty3 g c2 t0 t2) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H7: (ty3 g c2 (THead (Flat Cast) t t0) t3)).(\lambda (P: Prop).(and_ind (pc3 c2 t t3) (ty3 g c2 t0 t) P (\lambda (_: (pc3 c2 t t3)).(\lambda (H9: (ty3 g c2 t0 t)).(H6 t H9 P))) (ty3_gen_cast g c2 t0 t t3 H7))))))) H5)))) H3)) (\lambda (H3: ((\forall (t2: T).((ty3 g c2 t t2) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H4: (ty3 g c2 (THead (Flat Cast) t t0) t3)).(\lambda (P: Prop).(and_ind (pc3 c2 t t3) (ty3 g c2 t0 t) P (\lambda (_: (pc3 c2 t t3)).(\lambda (H6: (ty3 g c2 t0 t)).(ex_ind T (\lambda (t4: T).(ty3 g c2 t t4)) P (\lambda (x: T).(\lambda (H7: (ty3 g c2 t x)).(H3 x H7 P))) (ty3_correct g c2 t0 t H6)))) (ty3_gen_cast g c2 t0 t t3 H4))))))) H2)))]) H0))]) H))]))) c t1))). + \lambda (g: G).(\lambda (c: C).(\lambda (t1: T).(flt_wf_ind (\lambda (c0: C).(\lambda (t: T).(or (ex T (\lambda (t2: T).(ty3 g c0 t t2))) (\forall (t2: T).((ty3 g c0 t t2) \to (\forall (P: Prop).P)))))) (\lambda (c2: C).(\lambda (t2: T).(match t2 return (\lambda (t: T).(((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 t) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P)))))))) \to (or (ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: Prop).P)))))) with [(TSort n) \Rightarrow (\lambda (_: ((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (TSort n)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P))))))))).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (TSort n) t3))) (\forall (t3: T).((ty3 g c2 (TSort n) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (TSort n) t3)) (TSort (next g n)) (ty3_sort g c2 n)))) | (TLRef n) \Rightarrow (\lambda (H: ((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (TLRef n)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P))))))))).(let H_x \def (getl_dec c2 n) in (let H0 \def H_x in (or_ind (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n c2 (CHead e (Bind b) v)))))) (\forall (d: C).((getl n c2 d) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P)))) (\lambda (H1: (ex_3 C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n c2 (CHead e (Bind b) v))))))).(ex_3_ind C B T (\lambda (e: C).(\lambda (b: B).(\lambda (v: T).(getl n c2 (CHead e (Bind b) v))))) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P)))) (\lambda (x0: C).(\lambda (x1: B).(\lambda (x2: T).(\lambda (H2: (getl n c2 (CHead x0 (Bind x1) x2))).(let H3 \def (H x0 x2 (getl_flt x1 c2 x0 x2 n H2)) in (or_ind (ex T (\lambda (t3: T).(ty3 g x0 x2 t3))) (\forall (t3: T).((ty3 g x0 x2 t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P)))) (\lambda (H4: (ex T (\lambda (t2: T).(ty3 g x0 x2 t2)))).(ex_ind T (\lambda (t3: T).(ty3 g x0 x2 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P)))) (\lambda (x: T).(\lambda (H5: (ty3 g x0 x2 x)).((match x1 return (\lambda (b: B).((getl n c2 (CHead x0 (Bind b) x2)) \to (or (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P)))))) with [Abbr \Rightarrow (\lambda (H6: (getl n c2 (CHead x0 (Bind Abbr) x2))).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3)) (lift (S n) O x) (ty3_abbr g n c2 x0 x2 H6 x H5)))) | Abst \Rightarrow (\lambda (H6: (getl n c2 (CHead x0 (Bind Abst) x2))).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3)) (lift (S n) O x2) (ty3_abst g n c2 x0 x2 H6 x H5)))) | Void \Rightarrow (\lambda (H6: (getl n c2 (CHead x0 (Bind Void) x2))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H7: (ty3 g c2 (TLRef n) t3)).(\lambda (P: Prop).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) P (\lambda (H8: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) P (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 c2 (lift (S n) O x5) t3)).(\lambda (H10: (getl n c2 (CHead x3 (Bind Abbr) x4))).(\lambda (_: (ty3 g x3 x4 x5)).(let H12 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (c: C).(getl n c2 c)) H6 (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abbr) x4) H10)) in (let H13 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abbr) x4) H10)) in (False_ind P H13))))))))) H8)) (\lambda (H8: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) P (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 c2 (lift (S n) O x4) t3)).(\lambda (H10: (getl n c2 (CHead x3 (Bind Abst) x4))).(\lambda (_: (ty3 g x3 x4 x5)).(let H12 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (c: C).(getl n c2 c)) H6 (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abst) x4) H10)) in (let H13 \def (eq_ind C (CHead x0 (Bind Void) x2) (\lambda (ee: C).(match ee return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b return (\lambda (_: B).Prop) with [Abbr \Rightarrow False | Abst \Rightarrow False | Void \Rightarrow True]) | (Flat _) \Rightarrow False])])) I (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind Void) x2) n H6 (CHead x3 (Bind Abst) x4) H10)) in (False_ind P H13))))))))) H8)) (ty3_gen_lref g c2 t3 n H7)))))))]) H2))) H4)) (\lambda (H4: ((\forall (t2: T).((ty3 g x0 x2 t2) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H5: (ty3 g c2 (TLRef n) t3)).(\lambda (P: Prop).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) P (\lambda (H6: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) P (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 c2 (lift (S n) O x5) t3)).(\lambda (H8: (getl n c2 (CHead x3 (Bind Abbr) x4))).(\lambda (H9: (ty3 g x3 x4 x5)).(let H10 \def (eq_ind C (CHead x0 (Bind x1) x2) (\lambda (c: C).(getl n c2 c)) H2 (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abbr) x4) H8)) in (let H11 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow x0 | (CHead c _ _) \Rightarrow c])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abbr) x4) H8)) in ((let H12 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow x1 | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow x1])])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abbr) x4) H8)) in ((let H13 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow x2 | (CHead _ _ t) \Rightarrow t])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abbr) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abbr) x4) H8)) in (\lambda (_: (eq B x1 Abbr)).(\lambda (H15: (eq C x0 x3)).(let H16 \def (eq_ind_r T x4 (\lambda (t: T).(getl n c2 (CHead x3 (Bind Abbr) t))) H10 x2 H13) in (let H17 \def (eq_ind_r T x4 (\lambda (t: T).(ty3 g x3 t x5)) H9 x2 H13) in (let H18 \def (eq_ind_r C x3 (\lambda (c: C).(getl n c2 (CHead c (Bind Abbr) x2))) H16 x0 H15) in (let H19 \def (eq_ind_r C x3 (\lambda (c: C).(ty3 g c x2 x5)) H17 x0 H15) in (H4 x5 H19 P)))))))) H12)) H11))))))))) H6)) (\lambda (H6: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) P (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: T).(\lambda (H7: (pc3 c2 (lift (S n) O x4) t3)).(\lambda (H8: (getl n c2 (CHead x3 (Bind Abst) x4))).(\lambda (H9: (ty3 g x3 x4 x5)).(let H10 \def (eq_ind C (CHead x0 (Bind x1) x2) (\lambda (c: C).(getl n c2 c)) H2 (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abst) x4) H8)) in (let H11 \def (f_equal C C (\lambda (e: C).(match e return (\lambda (_: C).C) with [(CSort _) \Rightarrow x0 | (CHead c _ _) \Rightarrow c])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abst) x4) H8)) in ((let H12 \def (f_equal C B (\lambda (e: C).(match e return (\lambda (_: C).B) with [(CSort _) \Rightarrow x1 | (CHead _ k _) \Rightarrow (match k return (\lambda (_: K).B) with [(Bind b) \Rightarrow b | (Flat _) \Rightarrow x1])])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abst) x4) H8)) in ((let H13 \def (f_equal C T (\lambda (e: C).(match e return (\lambda (_: C).T) with [(CSort _) \Rightarrow x2 | (CHead _ _ t) \Rightarrow t])) (CHead x0 (Bind x1) x2) (CHead x3 (Bind Abst) x4) (getl_mono c2 (CHead x0 (Bind x1) x2) n H2 (CHead x3 (Bind Abst) x4) H8)) in (\lambda (_: (eq B x1 Abst)).(\lambda (H15: (eq C x0 x3)).(let H16 \def (eq_ind_r T x4 (\lambda (t: T).(getl n c2 (CHead x3 (Bind Abst) t))) H10 x2 H13) in (let H17 \def (eq_ind_r T x4 (\lambda (t: T).(ty3 g x3 t x5)) H9 x2 H13) in (let H18 \def (eq_ind_r T x4 (\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)) H7 x2 H13) in (let H19 \def (eq_ind_r C x3 (\lambda (c: C).(getl n c2 (CHead c (Bind Abst) x2))) H16 x0 H15) in (let H20 \def (eq_ind_r C x3 (\lambda (c: C).(ty3 g c x2 x5)) H17 x0 H15) in (H4 x5 H20 P))))))))) H12)) H11))))))))) H6)) (ty3_gen_lref g c2 t3 n H5))))))) H3)))))) H1)) (\lambda (H1: ((\forall (d: C).((getl n c2 d) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (TLRef n) t3))) (\forall (t3: T).((ty3 g c2 (TLRef n) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H2: (ty3 g c2 (TLRef n) t3)).(\lambda (P: Prop).(or_ind (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t))))) P (\lambda (H3: (ex3_3 C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(pc3 c2 (lift (S n) O t) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) P (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (lift (S n) O x2) t3)).(\lambda (H5: (getl n c2 (CHead x0 (Bind Abbr) x1))).(\lambda (_: (ty3 g x0 x1 x2)).(H1 (CHead x0 (Bind Abbr) x1) H5 P))))))) H3)) (\lambda (H3: (ex3_3 C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))))).(ex3_3_ind C T T (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(pc3 c2 (lift (S n) O u) t3)))) (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c2 (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(ty3 g e u t)))) P (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (lift (S n) O x1) t3)).(\lambda (H5: (getl n c2 (CHead x0 (Bind Abst) x1))).(\lambda (_: (ty3 g x0 x1 x2)).(H1 (CHead x0 (Bind Abst) x1) H5 P))))))) H3)) (ty3_gen_lref g c2 t3 n H2))))))) H0)))) | (THead k t t0) \Rightarrow (\lambda (H: ((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (THead k t t0)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P))))))))).((match k return (\lambda (k0: K).(((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (THead k0 t t0)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P)))))))) \to (or (ex T (\lambda (t3: T).(ty3 g c2 (THead k0 t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead k0 t t0) t3) \to (\forall (P: Prop).P)))))) with [(Bind b) \Rightarrow (\lambda (H0: ((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (THead (Bind b) t t0)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P))))))))).(let H1 \def (H0 c2 t (flt_thead_sx (Bind b) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H2: (ex T (\lambda (t2: T).(ty3 g c2 t t2)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x: T).(\lambda (H3: (ty3 g c2 t x)).(let H4 \def (H0 (CHead c2 (Bind b) t) t0 (flt_shift (Bind b) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) t0 t3))) (\forall (t3: T).((ty3 g (CHead c2 (Bind b) t) t0 t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H5: (ex T (\lambda (t2: T).(ty3 g (CHead c2 (Bind b) t) t0 t2)))).(ex_ind T (\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) t0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x0: T).(\lambda (H6: (ty3 g (CHead c2 (Bind b) t) t0 x0)).(ex_ind T (\lambda (t3: T).(ty3 g (CHead c2 (Bind b) t) x0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x1: T).(\lambda (H7: (ty3 g (CHead c2 (Bind b) t) x0 x1)).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3)) (THead (Bind b) t x0) (ty3_bind g c2 t x H3 b t0 x0 H6 x1 H7))))) (ty3_correct g (CHead c2 (Bind b) t) t0 x0 H6)))) H5)) (\lambda (H5: ((\forall (t2: T).((ty3 g (CHead c2 (Bind b) t) t0 t2) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H6: (ty3 g c2 (THead (Bind b) t t0) t3)).(\lambda (P: Prop).(ex4_3_ind T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind b) t t4) t3)))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c2 t t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) t) t0 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c2 (Bind b) t) t4 t6)))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (THead (Bind b) t x0) t3)).(\lambda (_: (ty3 g c2 t x1)).(\lambda (H9: (ty3 g (CHead c2 (Bind b) t) t0 x0)).(\lambda (_: (ty3 g (CHead c2 (Bind b) t) x0 x2)).(H5 x0 H9 P)))))))) (ty3_gen_bind g b c2 t t0 t3 H6))))))) H4)))) H2)) (\lambda (H2: ((\forall (t2: T).((ty3 g c2 t t2) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Bind b) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Bind b) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H3: (ty3 g c2 (THead (Bind b) t t0) t3)).(\lambda (P: Prop).(ex4_3_ind T T T (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(pc3 c2 (THead (Bind b) t t4) t3)))) (\lambda (_: T).(\lambda (t5: T).(\lambda (_: T).(ty3 g c2 t t5)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (_: T).(ty3 g (CHead c2 (Bind b) t) t0 t4)))) (\lambda (t4: T).(\lambda (_: T).(\lambda (t6: T).(ty3 g (CHead c2 (Bind b) t) t4 t6)))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (x2: T).(\lambda (_: (pc3 c2 (THead (Bind b) t x0) t3)).(\lambda (H5: (ty3 g c2 t x1)).(\lambda (_: (ty3 g (CHead c2 (Bind b) t) t0 x0)).(\lambda (_: (ty3 g (CHead c2 (Bind b) t) x0 x2)).(H2 x1 H5 P)))))))) (ty3_gen_bind g b c2 t t0 t3 H3))))))) H1))) | (Flat f) \Rightarrow (\lambda (H0: ((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (THead (Flat f) t t0)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P))))))))).((match f return (\lambda (f0: F).(((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (THead (Flat f0) t t0)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P)))))))) \to (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat f0) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat f0) t t0) t3) \to (\forall (P: Prop).P)))))) with [Appl \Rightarrow (\lambda (H1: ((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (THead (Flat Appl) t t0)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P))))))))).(let H2 \def (H1 c2 t (flt_thead_sx (Flat Appl) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H3: (ex T (\lambda (t2: T).(ty3 g c2 t t2)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x: T).(\lambda (H4: (ty3 g c2 t x)).(let H5 \def (H1 c2 t0 (flt_thead_dx (Flat Appl) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g c2 t0 t3))) (\forall (t3: T).((ty3 g c2 t0 t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H6: (ex T (\lambda (t2: T).(ty3 g c2 t0 t2)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x0: T).(\lambda (H7: (ty3 g c2 t0 x0)).(ex_ind T (\lambda (t3: T).(ty3 g c2 x0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x1: T).(\lambda (H8: (ty3 g c2 x0 x1)).(ex_ind T (\lambda (t3: T).(ty3 g c2 x t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x2: T).(\lambda (H9: (ty3 g c2 x x2)).(let H10 \def (ty3_sn3 g c2 x x2 H9) in (let H_x \def (nf2_sn3 c2 x H10) in (let H11 \def H_x in (ex2_ind T (\lambda (u: T).(pr3 c2 x u)) (\lambda (u: T).(nf2 c2 u)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x3: T).(\lambda (H12: (pr3 c2 x x3)).(\lambda (H13: (nf2 c2 x3)).(let H14 \def (ty3_sred_pr3 c2 x x3 H12 g x2 H9) in (let H_x0 \def (pc3_abst_dec g c2 x0 x1 H8 x3 x2 H14) in (let H15 \def H_x0 in (or_ind (ex4_2 T T (\lambda (u: T).(\lambda (_: T).(pc3 c2 x0 (THead (Bind Abst) x3 u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c2 (THead (Bind Abst) v2 u) x1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c2 x3 v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c2 v2)))) (\forall (u: T).((pc3 c2 x0 (THead (Bind Abst) x3 u)) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H16: (ex4_2 T T (\lambda (u: T).(\lambda (_: T).(pc3 c2 x0 (THead (Bind Abst) x3 u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c2 (THead (Bind Abst) v2 u) x1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c2 x3 v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c2 v2))))).(ex4_2_ind T T (\lambda (u: T).(\lambda (_: T).(pc3 c2 x0 (THead (Bind Abst) x3 u)))) (\lambda (u: T).(\lambda (v2: T).(ty3 g c2 (THead (Bind Abst) v2 u) x1))) (\lambda (_: T).(\lambda (v2: T).(pr3 c2 x3 v2))) (\lambda (_: T).(\lambda (v2: T).(nf2 c2 v2))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x4: T).(\lambda (x5: T).(\lambda (H17: (pc3 c2 x0 (THead (Bind Abst) x3 x4))).(\lambda (H18: (ty3 g c2 (THead (Bind Abst) x5 x4) x1)).(\lambda (H19: (pr3 c2 x3 x5)).(\lambda (_: (nf2 c2 x5)).(let H_y \def (nf2_pr3_unfold c2 x3 x5 H19 H13) in (let H21 \def (eq_ind_r T x5 (\lambda (t: T).(pr3 c2 x3 t)) H19 x3 H_y) in (let H22 \def (eq_ind_r T x5 (\lambda (t: T).(ty3 g c2 (THead (Bind Abst) t x4) x1)) H18 x3 H_y) in (or_introl (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3)) (THead (Flat Appl) t (THead (Bind Abst) x3 x4)) (ty3_appl g c2 t x3 (ty3_tred g c2 t x H4 x3 H12) t0 x4 (ty3_conv g c2 (THead (Bind Abst) x3 x4) x1 H22 t0 x0 H7 H17))))))))))))) H16)) (\lambda (H16: ((\forall (u: T).((pc3 c2 x0 (THead (Bind Abst) x3 u)) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H17: (ty3 g c2 (THead (Flat Appl) t t0) t3)).(\lambda (P: Prop).(ex3_2_ind T T (\lambda (u: T).(\lambda (t4: T).(pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) u t4)) t3))) (\lambda (u: T).(\lambda (t4: T).(ty3 g c2 t0 (THead (Bind Abst) u t4)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c2 t u))) P (\lambda (x4: T).(\lambda (x5: T).(\lambda (_: (pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) x4 x5)) t3)).(\lambda (H19: (ty3 g c2 t0 (THead (Bind Abst) x4 x5))).(\lambda (H20: (ty3 g c2 t x4)).(let H_y \def (ty3_unique g c2 t x4 H20 x H4) in (let H_y0 \def (ty3_unique g c2 t0 (THead (Bind Abst) x4 x5) H19 x0 H7) in (H16 x5 (pc3_t (THead (Bind Abst) x4 x5) c2 x0 (pc3_s c2 x0 (THead (Bind Abst) x4 x5) H_y0) (THead (Bind Abst) x3 x5) (pc3_head_1 c2 x4 x3 (pc3_t x c2 x4 H_y x3 (pc3_pr3_r c2 x x3 H12)) (Bind Abst) x5)) P)))))))) (ty3_gen_appl g c2 t t0 t3 H17))))))) H15))))))) H11)))))) (ty3_correct g c2 t x H4)))) (ty3_correct g c2 t0 x0 H7)))) H6)) (\lambda (H6: ((\forall (t2: T).((ty3 g c2 t0 t2) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H7: (ty3 g c2 (THead (Flat Appl) t t0) t3)).(\lambda (P: Prop).(ex3_2_ind T T (\lambda (u: T).(\lambda (t4: T).(pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) u t4)) t3))) (\lambda (u: T).(\lambda (t4: T).(ty3 g c2 t0 (THead (Bind Abst) u t4)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c2 t u))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) t3)).(\lambda (H9: (ty3 g c2 t0 (THead (Bind Abst) x0 x1))).(\lambda (_: (ty3 g c2 t x0)).(H6 (THead (Bind Abst) x0 x1) H9 P)))))) (ty3_gen_appl g c2 t t0 t3 H7))))))) H5)))) H3)) (\lambda (H3: ((\forall (t2: T).((ty3 g c2 t t2) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Appl) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Appl) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H4: (ty3 g c2 (THead (Flat Appl) t t0) t3)).(\lambda (P: Prop).(ex3_2_ind T T (\lambda (u: T).(\lambda (t4: T).(pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) u t4)) t3))) (\lambda (u: T).(\lambda (t4: T).(ty3 g c2 t0 (THead (Bind Abst) u t4)))) (\lambda (u: T).(\lambda (_: T).(ty3 g c2 t u))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (pc3 c2 (THead (Flat Appl) t (THead (Bind Abst) x0 x1)) t3)).(\lambda (_: (ty3 g c2 t0 (THead (Bind Abst) x0 x1))).(\lambda (H7: (ty3 g c2 t x0)).(H3 x0 H7 P)))))) (ty3_gen_appl g c2 t t0 t3 H4))))))) H2))) | Cast \Rightarrow (\lambda (H1: ((\forall (c1: C).(\forall (t1: T).((flt c1 t1 c2 (THead (Flat Cast) t t0)) \to (or (ex T (\lambda (t2: T).(ty3 g c1 t1 t2))) (\forall (t2: T).((ty3 g c1 t1 t2) \to (\forall (P: Prop).P))))))))).(let H2 \def (H1 c2 t (flt_thead_sx (Flat Cast) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g c2 t t3))) (\forall (t3: T).((ty3 g c2 t t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H3: (ex T (\lambda (t2: T).(ty3 g c2 t t2)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x: T).(\lambda (H4: (ty3 g c2 t x)).(let H5 \def (H1 c2 t0 (flt_thead_dx (Flat Cast) c2 t t0)) in (or_ind (ex T (\lambda (t3: T).(ty3 g c2 t0 t3))) (\forall (t3: T).((ty3 g c2 t0 t3) \to (\forall (P: Prop).P))) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H6: (ex T (\lambda (t2: T).(ty3 g c2 t0 t2)))).(ex_ind T (\lambda (t3: T).(ty3 g c2 t0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x0: T).(\lambda (H7: (ty3 g c2 t0 x0)).(ex_ind T (\lambda (t3: T).(ty3 g c2 x0 t3)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (x1: T).(\lambda (H8: (ty3 g c2 x0 x1)).(let H_x \def (pc3_dec g c2 x0 x1 H8 t x H4) in (let H9 \def H_x in (or_ind (pc3 c2 x0 t) ((pc3 c2 x0 t) \to (\forall (P: Prop).P)) (or (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P)))) (\lambda (H10: (pc3 c2 x0 t)).(or_introl (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P))) (ex_intro T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3)) t (ty3_cast g c2 t0 t (ty3_conv g c2 t x H4 t0 x0 H7 H10) x H4)))) (\lambda (H10: (((pc3 c2 x0 t) \to (\forall (P: Prop).P)))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H11: (ty3 g c2 (THead (Flat Cast) t t0) t3)).(\lambda (P: Prop).(and_ind (pc3 c2 t t3) (ty3 g c2 t0 t) P (\lambda (_: (pc3 c2 t t3)).(\lambda (H13: (ty3 g c2 t0 t)).(let H_y \def (ty3_unique g c2 t0 t H13 x0 H7) in (H10 (pc3_s c2 x0 t H_y) P)))) (ty3_gen_cast g c2 t0 t t3 H11))))))) H9))))) (ty3_correct g c2 t0 x0 H7)))) H6)) (\lambda (H6: ((\forall (t2: T).((ty3 g c2 t0 t2) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H7: (ty3 g c2 (THead (Flat Cast) t t0) t3)).(\lambda (P: Prop).(and_ind (pc3 c2 t t3) (ty3 g c2 t0 t) P (\lambda (_: (pc3 c2 t t3)).(\lambda (H9: (ty3 g c2 t0 t)).(H6 t H9 P))) (ty3_gen_cast g c2 t0 t t3 H7))))))) H5)))) H3)) (\lambda (H3: ((\forall (t2: T).((ty3 g c2 t t2) \to (\forall (P: Prop).P))))).(or_intror (ex T (\lambda (t3: T).(ty3 g c2 (THead (Flat Cast) t t0) t3))) (\forall (t3: T).((ty3 g c2 (THead (Flat Cast) t t0) t3) \to (\forall (P: Prop).P))) (\lambda (t3: T).(\lambda (H4: (ty3 g c2 (THead (Flat Cast) t t0) t3)).(\lambda (P: Prop).(and_ind (pc3 c2 t t3) (ty3 g c2 t0 t) P (\lambda (_: (pc3 c2 t t3)).(\lambda (H6: (ty3 g c2 t0 t)).(ex_ind T (\lambda (t4: T).(ty3 g c2 t t4)) P (\lambda (x: T).(\lambda (H7: (ty3 g c2 t x)).(H3 x H7 P))) (ty3_correct g c2 t0 t H6)))) (ty3_gen_cast g c2 t0 t t3 H4))))))) H2)))]) H0))]) H))]))) c t1))). diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/Preamble.ma b/matita/contribs/LAMBDA-TYPES/Level-1/Preamble.ma index 43cfd87cb..86d12a302 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/Preamble.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/Preamble.ma @@ -67,6 +67,9 @@ alias id "False_ind" = "cic:/Coq/Init/Logic/False_ind.con". alias id "False" = "cic:/Coq/Init/Logic/False.ind#xpointer(1/1)". alias id "I" = "cic:/Coq/Init/Logic/True.ind#xpointer(1/1/1)". alias id "minus" = "cic:/Coq/Init/Peano/minus.con". +alias id "le_n" = "cic:/Coq/Init/Peano/le.ind#xpointer(1/1/1)". +alias id "le_antisym" = "cic:/Coq/Arith/Le/le_antisym.con". +alias id "eq_ind_r" = "cic:/Coq/Init/Logic/eq_ind_r.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/problems.ma b/matita/contribs/LAMBDA-TYPES/Level-1/problems.ma index 409ef681f..f0db3d133 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/problems.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/problems.ma @@ -17,13 +17,22 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/problems". -include "legacy/coq.ma". +include "LambdaDelta-6.ma". (* -(* Problem 1: generation of LambdaDelta.ma fails *) +(* Problem 1: 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 2: disambiguation errors with these objects *) + +iso_trans drop1_getl_trans + +(* Problem 3: assertion failure raised by type checker on this object *) tau1 -- 2.39.2