From: Ferruccio Guidi Date: Wed, 5 Mar 2008 18:26:38 +0000 (+0000) Subject: some corrections and additions X-Git-Tag: make_still_working~5564 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=de0eae04721942f08b7281664bfbc26badf5de84;p=helm.git some corrections and additions --- diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csuba/drop.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csuba/drop.ma index 599b90c53..8af712723 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csuba/drop.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/csuba/drop.ma @@ -54,18 +54,13 @@ 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 in eq -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 (H5: (eq C -(CHead d1 (Bind Abbr) u) (CSort n0))).(let H6 \def (eq_ind C (CHead d1 (Bind -Abbr) u) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with -[(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n0) -H5) 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))) H6)))]) 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: +d2))) (\lambda (_: (eq C (CHead d1 (Bind Abbr) u) (CSort n0))).(\lambda (H3: +(eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (eq_ind nat (S n) +(\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H3) in (False_ind (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2: +C).(csuba g d1 d2))) H5))))) (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: @@ -313,112 +308,103 @@ 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 in eq -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 (H5: (eq C (CHead d1 (Bind Abst) u1) (CSort -n0))).(let H6 \def (eq_ind C (CHead d1 (Bind Abst) u1) (\lambda (e: C).(match -e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | -(CHead _ _ _) \Rightarrow True])) I (CSort n0) H5) 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)))))) H6)))]) 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: +a)))))) (\lambda (_: (eq C (CHead d1 (Bind Abst) u1) (CSort n0))).(\lambda +(H3: (eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (eq_ind nat (S +n) (\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H3) in (False_ind (or (ex2 +C (\lambda (d2: C).(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 H_x \def -(csuba_gen_abbr g c c2 t H5) in (let H7 \def H_x in (ex2_ind C (\lambda (d2: -C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g c d2)) (or -(ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u1))) (\lambda -(d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abbr) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: -C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda (x: -C).(\lambda (H8: (eq C c2 (CHead x (Bind Abbr) t))).(\lambda (H9: (csuba g c -x)).(eq_ind_r C (CHead x (Bind Abbr) t) (\lambda (c0: C).(or (ex2 C (\lambda -(d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba -g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O c0 (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: -T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda -(u2: T).(\lambda (a: A).(arity g d2 u2 a))))))) (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))))) +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) H5))))) +(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))))) (or -(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind +(\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 H_x \def (csuba_gen_abbr g c c2 t H5) in (let H7 +\def H_x in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) +(\lambda (d2: C).(csuba g c d2)) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 +(Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +(asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 +u2 a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Abbr) +t))).(\lambda (H9: (csuba g c x)).(eq_ind_r C (CHead x (Bind Abbr) t) +(\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) +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)))))) (\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))) +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 (H12: (drop n O x (CHead x0 (Bind Abst) u1))).(\lambda (H13: -(csuba g d1 x0)).(let H14 \def (refl_equal nat (r (Bind Abbr) n)) in (let H15 -\def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abst) -u1))) H12 (r (Bind Abbr) n) H14) in (or_introl (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda (d2: -C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 a)))))) (\lambda +(H11: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abst) u1))) +(\lambda (d2: C).(csuba g d1 d2)))).(ex2_ind C (\lambda (d2: C).(drop n O x +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2)) (or (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) +u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) +(CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity +g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead +x0 (Bind Abst) u1))).(\lambda (H13: (csuba g d1 x0)).(let H14 \def +(refl_equal nat (r (Bind Abbr) n)) in (let H15 \def (eq_ind nat n (\lambda +(n0: nat).(drop n0 O x (CHead x0 (Bind Abst) u1))) H12 (r (Bind Abbr) n) H14) +in (or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) +(CHead d2 (Bind Abst) u1))) (\lambda (d2: C).(csuba g d1 d2))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x +(Bind Abbr) t) (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (a: A).(arity g d1 u1 (asucc g a))))) (\lambda (d2: C).(\lambda +(u2: T).(\lambda (a: A).(arity g d2 u2 a))))) (ex_intro2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u1))) (\lambda +(d2: C).(csuba g d1 d2)) x0 (drop_drop (Bind Abbr) n x (CHead x0 (Bind Abst) +u1) H15 t) H13))))))) H11)) (\lambda (H11: (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abbr) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d1 d2)))) (\lambda (_: C).(\lambda (_: T).(\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 (_: +(\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 @@ -847,18 +833,13 @@ O (CSort n0) (CHead d1 (Bind Abst) u))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: (csuba g c2 (CSort n0))).(and3_ind (eq C (CHead d1 (Bind Abst) 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 Abst) u))) (\lambda (d2: C).(csuba g d2 -d1))) (\lambda (H2: (eq C (CHead d1 (Bind Abst) u) (CSort n0))).(\lambda (_: -(eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (match H2 in eq -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 Abst) u))) (\lambda (d2: -C).(csuba g d2 d1)))))) with [refl_equal \Rightarrow (\lambda (H5: (eq C -(CHead d1 (Bind Abst) u) (CSort n0))).(let H6 \def (eq_ind C (CHead d1 (Bind -Abst) u) (\lambda (e: C).(match e in C return (\lambda (_: C).Prop) with -[(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort n0) -H5) in (False_ind (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind -Abst) u))) (\lambda (d2: C).(csuba g d2 d1))) H6)))]) in (H5 (refl_equal C -(CSort n0))))))) (drop_gen_sort n0 (S n) O (CHead d1 (Bind Abst) u) -H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).(\forall (u: +d1))) (\lambda (_: (eq C (CHead d1 (Bind Abst) u) (CSort n0))).(\lambda (H3: +(eq nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (eq_ind nat (S n) +(\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H3) in (False_ind (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: +C).(csuba g d2 d1))) H5))))) (drop_gen_sort n0 (S n) O (CHead d1 (Bind Abst) +u) H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).(\forall (u: T).((drop (S n) O c (CHead d1 (Bind Abst) u)) \to (\forall (g: G).(\forall (c2: C).((csuba g c2 c) \to (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abst) u))) (\lambda (d2: C).(csuba g d2 d1))))))))))).(\lambda (k: @@ -1106,300 +1087,111 @@ C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) -(\lambda (H2: (eq C (CHead d1 (Bind Abbr) u1) (CSort n0))).(\lambda (_: (eq -nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (match H2 in eq 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 Abbr) u1))) (\lambda (d2: +(\lambda (_: (eq C (CHead d1 (Bind Abbr) u1) (CSort n0))).(\lambda (H3: (eq +nat (S n) O)).(\lambda (_: (eq nat O O)).(let H5 \def (eq_ind nat (S n) +(\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H3) in (False_ind (or (ex2 +C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))) with -[refl_equal \Rightarrow (\lambda (H5: (eq C (CHead d1 (Bind Abbr) u1) (CSort -n0))).(let H6 \def (eq_ind C (CHead d1 (Bind Abbr) u1) (\lambda (e: C).(match -e in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | -(CHead _ _ _) \Rightarrow True])) I (CSort n0) H5) in (False_ind (or (ex2 C -(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) H6)))]) in (H5 -(refl_equal C (CSort n0))))))) (drop_gen_sort n0 (S n) O (CHead d1 (Bind -Abbr) u1) H0))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: -C).(\forall (u1: T).((drop (S n) O c (CHead d1 (Bind Abbr) u1)) \to (\forall -(g: G).(\forall (c2: C).((csuba g c2 c) \to (or (ex2 C (\lambda (d2: C).(drop -(S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))))))))))).(\lambda (k: K).(\lambda (t: -T).(\lambda (d1: C).(\lambda (u1: T).(\lambda (H1: (drop (S n) O (CHead c k -t) (CHead d1 (Bind Abbr) u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H2: -(csuba g c2 (CHead c k t))).(K_ind (\lambda (k0: K).((csuba g c2 (CHead c k0 -t)) \to ((drop (r k0 n) O c (CHead d1 (Bind Abbr) u1)) \to (or (ex2 C -(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))))))) (\lambda (b: -B).(\lambda (H3: (csuba g c2 (CHead c (Bind b) t))).(\lambda (H4: (drop (r -(Bind b) n) O c (CHead d1 (Bind Abbr) u1))).(B_ind (\lambda (b0: B).((csuba g -c2 (CHead c (Bind b0) t)) \to ((drop (r (Bind b0) n) O c (CHead d1 (Bind -Abbr) u1)) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) -u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) -(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g -a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 -a))))))))) (\lambda (H5: (csuba g c2 (CHead c (Bind Abbr) t))).(\lambda (H6: -(drop (r (Bind Abbr) n) O c (CHead d1 (Bind Abbr) u1))).(let H_x \def -(csuba_gen_abbr_rev g c c2 t H5) in (let H7 \def H_x in (or_ind (ex2 C -(\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba -g d2 c))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq -C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 c)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g c t a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 -(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 -(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))) (\lambda (H8: (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind -Abbr) t))) (\lambda (d2: C).(csuba g d2 c)))).(ex2_ind C (\lambda (d2: C).(eq -C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: C).(csuba g d2 c)) (or (ex2 C -(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x: -C).(\lambda (H9: (eq C c2 (CHead x (Bind Abbr) t))).(\lambda (H10: (csuba g x -c)).(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 Abbr) u1))) (\lambda (d2: C).(csuba -g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop (S n) O c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda -(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a))))))) (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 Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or -(ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n -O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind -C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind -Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -(CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x0: -C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abbr) u1))).(\lambda (H14: -(csuba g x0 d1)).(let H15 \def (refl_equal nat (r (Bind Abst) n)) in (let H16 -\def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abbr) -u1))) H13 (r (Bind Abst) n) H15) in (or_introl (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 -(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop (Bind Abbr) -n x (CHead x0 (Bind Abbr) 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 Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g -d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: -A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H13: (drop n O x -(CHead x0 (Bind Abst) x1))).(\lambda (H14: (csuba g x0 d1)).(\lambda (H15: -(arity g x0 x1 (asucc g x2))).(\lambda (H16: (arity g d1 u1 x2)).(let H17 -\def (refl_equal nat (r (Bind Abst) n)) in (let H18 \def (eq_ind nat n -(\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abst) x1))) H13 (r (Bind -Abst) n) H17) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x -(Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -(CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x -(Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: -T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: -T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))) x0 x1 x2 (drop_drop (Bind Abbr) n -x (CHead x0 (Bind Abst) 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 Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 c)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a)))))).(ex4_3_ind C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -c)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc -g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a)))) +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) H5))))) +(drop_gen_sort n0 (S n) O (CHead d1 (Bind Abbr) u1) H0))))))))) (\lambda (c: +C).(\lambda (H0: ((\forall (d1: C).(\forall (u1: T).((drop (S n) O c (CHead +d1 (Bind Abbr) u1)) \to (\forall (g: G).(\forall (c2: C).((csuba g c2 c) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) -(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H9: (eq C c2 -(CHead x0 (Bind Abst) x1))).(\lambda (H10: (csuba g x0 c)).(\lambda (_: -(arity g x0 x1 (asucc g x2))).(\lambda (_: (arity g c t x2)).(eq_ind_r C -(CHead x0 (Bind Abst) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop -(S n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda -(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))))) (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 Abbr) u1))) -(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abst) u2))))) (\lambda -(d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (H14: (ex2 C (\lambda (d2: C).(drop n -O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind -C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind -Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) -(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O -(CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: -C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x: -C).(\lambda (H15: (drop n O x0 (CHead x (Bind Abbr) u1))).(\lambda (H16: -(csuba g x d1)).(let H17 \def (refl_equal nat (r (Bind Abst) n)) in (let H18 -\def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x0 (CHead x (Bind Abbr) -u1))) H15 (r (Bind Abst) n) H17) in (or_introl (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead -d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x (drop_drop (Bind -Abst) n x0 (CHead x (Bind Abbr) 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 Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +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 Abbr) +u1))).(\lambda (g: G).(\lambda (c2: C).(\lambda (H2: (csuba g c2 (CHead c k +t))).(K_ind (\lambda (k0: K).((csuba g c2 (CHead c k0 t)) \to ((drop (r k0 n) +O c (CHead d1 (Bind Abbr) u1)) \to (or (ex2 C (\lambda (d2: C).(drop (S n) O +c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead +d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: -C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +(a: A).(arity g d1 u1 a))))))))) (\lambda (b: B).(\lambda (H3: (csuba g c2 +(CHead c (Bind b) t))).(\lambda (H4: (drop (r (Bind b) n) O c (CHead d1 (Bind +Abbr) u1))).(B_ind (\lambda (b0: B).((csuba g c2 (CHead c (Bind b0) t)) \to +((drop (r (Bind b0) n) O c (CHead d1 (Bind Abbr) u1)) \to (or (ex2 C (\lambda +(d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))))))) (\lambda (H5: (csuba g c2 +(CHead c (Bind Abbr) t))).(\lambda (H6: (drop (r (Bind Abbr) n) O c (CHead d1 +(Bind Abbr) u1))).(let H_x \def (csuba_gen_abbr_rev g c c2 t H5) in (let H7 +\def H_x in (or_ind (ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) +t))) (\lambda (d2: C).(csuba g d2 c))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 c)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) -(CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (x3: C).(\lambda (x4: T).(\lambda (x5: -A).(\lambda (H15: (drop n O x0 (CHead x3 (Bind Abst) x4))).(\lambda (H16: -(csuba g x3 d1)).(\lambda (H17: (arity g x3 x4 (asucc g x5))).(\lambda (H18: -(arity g d1 u1 x5)).(let H19 \def (refl_equal nat (r (Bind Abst) n)) in (let -H20 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x0 (CHead x3 (Bind Abst) -x4))) H15 (r (Bind Abst) n) H19) in (or_intror (ex2 C (\lambda (d2: C).(drop -(S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t a))))) (or (ex2 C +(\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda -(_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) -(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda -(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) -(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) -(ex4_3_intro C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +(_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))) x3 x4 x5 -(drop_drop (Bind Abst) n x0 (CHead x3 (Bind Abst) x4) H20 x1) H16 H17 -H18))))))))))) H14)) H13)) c2 H9)))))))) H8)) H7))))) (\lambda (H5: (csuba g -c2 (CHead c (Bind Abst) t))).(\lambda (H6: (drop (r (Bind Abst) n) O c (CHead -d1 (Bind Abbr) u1))).(let H_x \def (csuba_gen_abst_rev g c c2 t H5) in (let -H7 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abst) -t))) (\lambda (d2: C).(csuba g d2 c)) (or (ex2 C (\lambda (d2: C).(drop (S n) -O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead -d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H8: +(ex2 C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Abbr) t))) (\lambda (d2: +C).(csuba g d2 c)))).(ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind +Abbr) t))) (\lambda (d2: C).(csuba g d2 c)) (or (ex2 C (\lambda (d2: C).(drop +(S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x -(Bind Abst) t))).(\lambda (H9: (csuba g x c)).(eq_ind_r C (CHead x (Bind -Abst) t) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S n) O c0 (CHead +(a: A).(arity g d1 u1 a)))))) (\lambda (x: C).(\lambda (H9: (eq C c2 (CHead x +(Bind Abbr) t))).(\lambda (H10: (csuba g x c)).(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 Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))))) (let H10 \def (H c d1 u1 H6 g x H9) in (or_ind (ex2 C (\lambda +u1 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 Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead -x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H11: +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H12: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda +C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind +T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abbr) -u1))).(\lambda (H13: (csuba g x0 d1)).(let H14 \def (refl_equal nat (r (Bind -Abst) n)) in (let H15 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x -(CHead x0 (Bind Abbr) u1))) H12 (r (Bind Abst) n) H14) in (or_introl (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) +u1 a)))))) (\lambda (x0: C).(\lambda (H13: (drop n O x (CHead x0 (Bind Abbr) +u1))).(\lambda (H14: (csuba g x0 d1)).(let H15 \def (refl_equal nat (r (Bind +Abst) n)) in (let H16 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x +(CHead x0 (Bind Abbr) u1))) H13 (r (Bind Abst) n) H15) in (or_introl (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O -(CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g -d2 d1)) x0 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abbr) u1) H15 t) -H13))))))) H11)) (\lambda (H11: (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +(CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g +d2 d1)) x0 (drop_drop (Bind Abbr) n x (CHead x0 (Bind Abbr) 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 Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda @@ -1408,145 +1200,324 @@ A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) +u1 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x -(Bind Abst) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +(Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (x2: A).(\lambda (H12: (drop n O x (CHead x0 (Bind Abst) -x1))).(\lambda (H13: (csuba g x0 d1)).(\lambda (H14: (arity g x0 x1 (asucc g -x2))).(\lambda (H15: (arity g d1 u1 x2)).(let H16 \def (refl_equal nat (r -(Bind Abst) n)) in (let H17 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O -x (CHead x0 (Bind Abst) x1))) H12 (r (Bind Abst) n) H16) in (or_intror (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) +T).(\lambda (x2: A).(\lambda (H13: (drop n O x (CHead x0 (Bind Abst) +x1))).(\lambda (H14: (csuba g x0 d1)).(\lambda (H15: (arity g x0 x1 (asucc g +x2))).(\lambda (H16: (arity g d1 u1 x2)).(let H17 \def (refl_equal nat (r +(Bind Abst) n)) in (let H18 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O +x (CHead x0 (Bind Abst) x1))) H13 (r (Bind Abst) n) H17) in (or_intror (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind +(u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abbr) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))) x0 x1 x2 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abst) x1) H17 t) -H13 H14 H15))))))))))) H11)) H10)) c2 H8)))) H7))))) (\lambda (H5: (csuba g -c2 (CHead c (Bind Void) t))).(\lambda (H6: (drop (r (Bind Void) n) O c (CHead -d1 (Bind Abbr) u1))).(let H_x \def (csuba_gen_void_rev g c c2 t H5) in (let -H7 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 (Bind Void) -t))) (\lambda (d2: C).(csuba g d2 c)) (or (ex2 C (\lambda (d2: C).(drop (S n) -O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C -T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead -d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x -(Bind Void) t))).(\lambda (H9: (csuba g x c)).(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 Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda -(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind +u1 a)))) x0 x1 x2 (drop_drop (Bind Abbr) n x (CHead x0 (Bind Abst) 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 Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 -(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a))))))) (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 Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n -O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +c)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc +g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g c t +a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(eq C c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 c)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g c t a)))) (or (ex2 C (\lambda (d2: C).(drop +(S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead -x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 -d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S -n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +(a: A).(arity g d1 u1 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: +A).(\lambda (H9: (eq C c2 (CHead x0 (Bind Abst) x1))).(\lambda (H10: (csuba g +x0 c)).(\lambda (_: (arity g x0 x1 (asucc g x2))).(\lambda (_: (arity g c t +x2)).(eq_ind_r C (CHead x0 (Bind Abst) x1) (\lambda (c0: C).(or (ex2 C +(\lambda (d2: C).(drop (S n) O c0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H11: -(ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: -C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x (CHead d2 (Bind -Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: -C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda -(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 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 Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abbr) -u1))).(\lambda (H13: (csuba g x0 d1)).(let H14 \def (refl_equal nat (r (Bind -Abst) n)) in (let H15 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x -(CHead x0 (Bind Abbr) u1))) H12 (r (Bind Abst) n) H14) in (or_introl (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) +u1 a))))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 +(Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (H14: (ex2 C (\lambda +(d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1)))).(ex2_ind C (\lambda (d2: C).(drop n O x0 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S n) O +(CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) +(\lambda (x: C).(\lambda (H15: (drop n O x0 (CHead x (Bind Abbr) +u1))).(\lambda (H16: (csuba g x d1)).(let H17 \def (refl_equal nat (r (Bind +Abst) n)) in (let H18 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x0 +(CHead x (Bind Abbr) u1))) H15 (r (Bind Abst) n) H17) in (or_introl (ex2 C +(\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: C).(drop (S n) O -(CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g -d2 d1)) x0 (drop_drop (Bind Void) n x (CHead x0 (Bind Abbr) 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 Abst) u2))))) (\lambda (d2: +(CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1)) x (drop_drop (Bind Abst) n x0 (CHead x (Bind Abbr) 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 Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))).(ex4_3_ind C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) +u1 a)))) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A -(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x -(Bind Void) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 +(Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda -(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x0: C).(\lambda (x1: -T).(\lambda (x2: A).(\lambda (H12: (drop n O x (CHead x0 (Bind Abst) -x1))).(\lambda (H13: (csuba g x0 d1)).(\lambda (H14: (arity g x0 x1 (asucc g -x2))).(\lambda (H15: (arity g d1 u1 x2)).(let H16 \def (refl_equal nat (r -(Bind Abst) n)) in (let H17 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O -x (CHead x0 (Bind Abst) x1))) H12 (r (Bind Abst) n) H16) in (or_intror (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) -u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) +(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x3: C).(\lambda (x4: +T).(\lambda (x5: A).(\lambda (H15: (drop n O x0 (CHead x3 (Bind Abst) +x4))).(\lambda (H16: (csuba g x3 d1)).(\lambda (H17: (arity g x3 x4 (asucc g +x5))).(\lambda (H18: (arity g d1 u1 x5)).(let H19 \def (refl_equal nat (r +(Bind Abst) n)) in (let H20 \def (eq_ind nat n (\lambda (n0: nat).(drop n0 O +x0 (CHead x3 (Bind Abst) x4))) H15 (r (Bind Abst) n) H19) in (or_intror (ex2 +C (\lambda (d2: C).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T A (\lambda (d2: C).(\lambda -(u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind -Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 -d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Bind Abst) x1) (CHead d2 +(Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 -u1 a)))) x0 x1 x2 (drop_drop (Bind Void) n x (CHead x0 (Bind Abst) x1) H17 t) -H13 H14 H15))))))))))) H11)) H10)) c2 H8)))) H7))))) b H3 H4)))) (\lambda (f: -F).(\lambda (H3: (csuba g c2 (CHead c (Flat f) t))).(\lambda (H4: (drop (r -(Flat f) n) O c (CHead d1 (Bind Abbr) u1))).(let H_x \def (csuba_gen_flat_rev -g c c2 t f H3) in (let H5 \def H_x in (ex2_2_ind C T (\lambda (d2: -C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) u2)))) (\lambda (d2: -C).(\lambda (_: T).(csuba g d2 c))) (or (ex2 C (\lambda (d2: C).(drop (S n) O -c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T -A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead -d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: -A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: -A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a)))))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: -(eq C c2 (CHead x0 (Flat f) x1))).(\lambda (H7: (csuba g x0 c)).(eq_ind_r C -(CHead x0 (Flat f) x1) (\lambda (c0: C).(or (ex2 C (\lambda (d2: C).(drop (S +u1 a)))) x3 x4 x5 (drop_drop (Bind Abst) n x0 (CHead x3 (Bind Abst) x4) H20 +x1) H16 H17 H18))))))))))) H14)) H13)) c2 H9)))))))) H8)) H7))))) (\lambda +(H5: (csuba g c2 (CHead c (Bind Abst) t))).(\lambda (H6: (drop (r (Bind Abst) +n) O c (CHead d1 (Bind Abbr) u1))).(let H_x \def (csuba_gen_abst_rev g c c2 t +H5) in (let H7 \def H_x in (ex2_ind C (\lambda (d2: C).(eq C c2 (CHead d2 +(Bind Abst) t))) (\lambda (d2: C).(csuba g d2 c)) (or (ex2 C (\lambda (d2: +C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 +d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S +n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x: C).(\lambda (H8: +(eq C c2 (CHead x (Bind Abst) t))).(\lambda (H9: (csuba g x c)).(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 Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda -(a: A).(arity g d1 u1 a))))))) (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 Abbr) u1))) (\lambda +(a: A).(arity g d1 u1 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 Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or (ex2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: +T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind +Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 +d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))) (\lambda (H11: (ex2 C (\lambda (d2: C).(drop n O x (CHead d2 (Bind +Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind C (\lambda (d2: +C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) +(or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Abst) +t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))) (\lambda (x0: C).(\lambda (H12: (drop n O x +(CHead x0 (Bind Abbr) u1))).(\lambda (H13: (csuba g x0 d1)).(let H14 \def +(refl_equal nat (r (Bind Abst) n)) in (let H15 \def (eq_ind nat n (\lambda +(n0: nat).(drop n0 O x (CHead x0 (Bind Abbr) u1))) H12 (r (Bind Abst) n) H14) +in (or_introl (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Abst) t) +(CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A +(\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x +(Bind Abst) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex_intro2 C (\lambda (d2: +C).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda +(d2: C).(csuba g d2 d1)) x0 (drop_drop (Bind Abst) n x (CHead x0 (Bind Abbr) +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 Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 +a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H12: (drop n O x +(CHead x0 (Bind Abst) x1))).(\lambda (H13: (csuba g x0 d1)).(\lambda (H14: +(arity g x0 x1 (asucc g x2))).(\lambda (H15: (arity g d1 u1 x2)).(let H16 +\def (refl_equal nat (r (Bind Abst) n)) in (let H17 \def (eq_ind nat n +(\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abst) x1))) H12 (r (Bind +Abst) n) H16) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x +(Bind Abst) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +(CHead x (Bind Abst) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x +(Bind Abst) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) x0 x1 x2 (drop_drop (Bind Abst) n +x (CHead x0 (Bind Abst) x1) H17 t) H13 H14 H15))))))))))) H11)) H10)) c2 +H8)))) H7))))) (\lambda (H5: (csuba g c2 (CHead c (Bind Void) t))).(\lambda +(H6: (drop (r (Bind Void) n) O c (CHead d1 (Bind Abbr) u1))).(let H_x \def +(csuba_gen_void_rev g c c2 t H5) in (let H7 \def H_x in (ex2_ind C (\lambda +(d2: C).(eq C c2 (CHead d2 (Bind Void) t))) (\lambda (d2: C).(csuba g d2 c)) +(or (ex2 C (\lambda (d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) +(\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda +(u2: T).(\lambda (_: A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) +(\lambda (x: C).(\lambda (H8: (eq C c2 (CHead x (Bind Void) t))).(\lambda +(H9: (csuba g x c)).(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 Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: -T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abst) u2))))) (\lambda +T).(\lambda (_: A).(drop (S n) O c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda -(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (or (ex2 C -(\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abbr) +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 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 Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop n O x (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x (Bind Void) +t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda +(_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: +A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda +(a: A).(arity g d1 u1 a)))))) (\lambda (H11: (ex2 C (\lambda (d2: C).(drop n +O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)))).(ex2_ind +C (\lambda (d2: C).(drop n O x (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1)) (or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind +Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +(CHead x (Bind Void) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x0: +C).(\lambda (H12: (drop n O x (CHead x0 (Bind Abbr) u1))).(\lambda (H13: +(csuba g x0 d1)).(let H14 \def (refl_equal nat (r (Bind Abst) n)) in (let H15 +\def (eq_ind nat n (\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abbr) +u1))) H12 (r (Bind Abst) n) H14) in (or_introl (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(ex_intro2 C (\lambda (d2: C).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1)) x0 (drop_drop (Bind Void) +n x (CHead x0 (Bind Abbr) 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 Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g +d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 +(asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 +u1 a)))))).(ex4_3_ind C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop n O x (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) (or (ex2 C (\lambda (d2: C).(drop +(S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: +C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda +(_: A).(drop (S n) O (CHead x (Bind Void) t) (CHead d2 (Bind Abst) u2))))) +(\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda +(d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) +(\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a)))))) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: A).(\lambda (H12: (drop n O x +(CHead x0 (Bind Abst) x1))).(\lambda (H13: (csuba g x0 d1)).(\lambda (H14: +(arity g x0 x1 (asucc g x2))).(\lambda (H15: (arity g d1 u1 x2)).(let H16 +\def (refl_equal nat (r (Bind Abst) n)) in (let H17 \def (eq_ind nat n +(\lambda (n0: nat).(drop n0 O x (CHead x0 (Bind Abst) x1))) H12 (r (Bind +Abst) n) H16) in (or_intror (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x +(Bind Void) t) (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) +(ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O +(CHead x (Bind Void) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: +C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: +C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda +(_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) (ex4_3_intro C T +A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x +(Bind Void) t) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: +T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))) x0 x1 x2 (drop_drop (Bind Void) n +x (CHead x0 (Bind Abst) x1) H17 t) H13 H14 H15))))))))))) H11)) H10)) c2 +H8)))) H7))))) b H3 H4)))) (\lambda (f: F).(\lambda (H3: (csuba g c2 (CHead c +(Flat f) t))).(\lambda (H4: (drop (r (Flat f) n) O c (CHead d1 (Bind Abbr) +u1))).(let H_x \def (csuba_gen_flat_rev g c c2 t f H3) in (let H5 \def H_x in +(ex2_2_ind C T (\lambda (d2: C).(\lambda (u2: T).(eq C c2 (CHead d2 (Flat f) +u2)))) (\lambda (d2: C).(\lambda (_: T).(csuba g d2 c))) (or (ex2 C (\lambda +(d2: C).(drop (S n) O c2 (CHead d2 (Bind Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O c2 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a)))))) (\lambda (x0: C).(\lambda (x1: +T).(\lambda (H6: (eq C c2 (CHead x0 (Flat f) x1))).(\lambda (H7: (csuba g x0 +c)).(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 Abbr) u1))) (\lambda (d2: C).(csuba +g d2 d1))) (ex4_3 C T A (\lambda (d2: C).(\lambda (u2: T).(\lambda (_: +A).(drop (S n) O c0 (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda +(_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: +T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda +(_: T).(\lambda (a: A).(arity g d1 u1 a))))))) (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 Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda (d2: -C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) +C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O x0 (CHead d2 (Bind Abst) +u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) +(\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g +a))))) (\lambda (_: C).(\lambda (_: T).(\lambda (a: A).(arity g d1 u1 a))))) +(or (ex2 C (\lambda (d2: C).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 +(Bind Abbr) u1))) (\lambda (d2: C).(csuba g d2 d1))) (ex4_3 C T A (\lambda +(d2: C).(\lambda (u2: T).(\lambda (_: A).(drop (S n) O (CHead x0 (Flat f) x1) (CHead d2 (Bind Abst) u2))))) (\lambda (d2: C).(\lambda (_: T).(\lambda (_: A).(csuba g d2 d1)))) (\lambda (d2: C).(\lambda (u2: T).(\lambda (a: A).(arity g d2 u2 (asucc g a))))) (\lambda (_: C).(\lambda (_: T).(\lambda diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/tau0/fwd.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/tau0/fwd.ma new file mode 100644 index 000000000..303473206 --- /dev/null +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/tau0/fwd.ma @@ -0,0 +1,547 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +include "LambdaDelta-1/tau0/defs.ma". + +theorem tau0_gen_sort: + \forall (g: G).(\forall (c: C).(\forall (x: T).(\forall (n: nat).((tau0 g c +(TSort n) x) \to (eq T x (TSort (next g n))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda +(H: (tau0 g c (TSort n) x)).(insert_eq T (TSort n) (\lambda (t: T).(tau0 g c +t x)) (\lambda (_: T).(eq T x (TSort (next g n)))) (\lambda (y: T).(\lambda +(H0: (tau0 g c y x)).(tau0_ind g (\lambda (_: C).(\lambda (t: T).(\lambda +(t0: T).((eq T t (TSort n)) \to (eq T t0 (TSort (next g 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 in T return (\lambda (_: T).nat) with +[(TSort n1) \Rightarrow n1 | (TLRef _) \Rightarrow n0 | (THead _ _ _) +\Rightarrow n0])) (TSort n0) (TSort n) H1) in (eq_ind_r nat n (\lambda (n1: +nat).(eq T (TSort (next g n1)) (TSort (next g n)))) (refl_equal T (TSort +(next g n))) n0 H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (v: +T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) +v))).(\lambda (w: T).(\lambda (_: (tau0 g d v w)).(\lambda (_: (((eq T v +(TSort n)) \to (eq T w (TSort (next g n)))))).(\lambda (H4: (eq T (TLRef i) +(TSort n))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee in T +return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort n) H4) in +(False_ind (eq T (lift (S i) O w) (TSort (next g n))) H5))))))))))) (\lambda +(c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl +i c0 (CHead d (Bind Abst) v))).(\lambda (w: T).(\lambda (_: (tau0 g d v +w)).(\lambda (_: (((eq T v (TSort n)) \to (eq T w (TSort (next g +n)))))).(\lambda (H4: (eq T (TLRef i) (TSort n))).(let H5 \def (eq_ind T +(TLRef i) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) +\Rightarrow False])) I (TSort n) H4) in (False_ind (eq T (lift (S i) O v) +(TSort (next g n))) H5))))))))))) (\lambda (b: B).(\lambda (c0: C).(\lambda +(v: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (tau0 g (CHead c0 (Bind +b) v) t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq T t2 (TSort (next g +n)))))).(\lambda (H3: (eq T (THead (Bind b) v t1) (TSort n))).(let H4 \def +(eq_ind T (THead (Bind b) v t1) (\lambda (ee: T).(match ee in T 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 b) v t2) (TSort (next g n))) H4)))))))))) +(\lambda (c0: C).(\lambda (v: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(_: (tau0 g c0 t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq T t2 (TSort +(next g n)))))).(\lambda (H3: (eq T (THead (Flat Appl) v t1) (TSort n))).(let +H4 \def (eq_ind T (THead (Flat Appl) v t1) (\lambda (ee: T).(match ee in T +return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H3) in +(False_ind (eq T (THead (Flat Appl) v t2) (TSort (next g n))) H4))))))))) +(\lambda (c0: C).(\lambda (v1: T).(\lambda (v2: T).(\lambda (_: (tau0 g c0 v1 +v2)).(\lambda (_: (((eq T v1 (TSort n)) \to (eq T v2 (TSort (next g +n)))))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (tau0 g c0 t1 +t2)).(\lambda (_: (((eq T t1 (TSort n)) \to (eq T t2 (TSort (next g +n)))))).(\lambda (H5: (eq T (THead (Flat Cast) v1 t1) (TSort n))).(let H6 +\def (eq_ind T (THead (Flat Cast) v1 t1) (\lambda (ee: T).(match ee in T +return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H5) in +(False_ind (eq T (THead (Flat Cast) v2 t2) (TSort (next g n))) H6)))))))))))) +c y x H0))) H))))). + +theorem tau0_gen_lref: + \forall (g: G).(\forall (c: C).(\forall (x: T).(\forall (n: nat).((tau0 g c +(TLRef n) x) \to (or (ex3_3 C T T (\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).(tau0 g e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(t: T).(eq T x (lift (S n) O t)))))) (ex3_3 C T T (\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).(tau0 g e u t)))) (\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq T x (lift (S n) O u))))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (x: T).(\lambda (n: nat).(\lambda +(H: (tau0 g c (TLRef n) x)).(insert_eq T (TLRef n) (\lambda (t: T).(tau0 g c +t x)) (\lambda (_: T).(or (ex3_3 C T T (\lambda (e: C).(\lambda (u: +T).(\lambda (_: T).(getl n c (CHead e (Bind Abbr) u))))) (\lambda (e: +C).(\lambda (u: T).(\lambda (t0: T).(tau0 g e u t0)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(eq T x (lift (S n) O t0)))))) (ex3_3 C T +T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl n c (CHead e (Bind +Abst) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t0: T).(tau0 g e u +t0)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T x (lift (S n) O +u)))))))) (\lambda (y: T).(\lambda (H0: (tau0 g c y x)).(tau0_ind g (\lambda +(c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n)) \to (or (ex3_3 C +T T (\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).(tau0 g e u +t1)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t1: T).(eq T t0 (lift (S n) +O t1)))))) (ex3_3 C T T (\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).(tau0 g e u t1)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: +T).(eq T t0 (lift (S n) O u))))))))))) (\lambda (c0: C).(\lambda (n0: +nat).(\lambda (H1: (eq T (TSort n0) (TLRef n))).(let H2 \def (eq_ind T (TSort +n0) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort +_) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow +False])) I (TLRef n) H1) in (False_ind (or (ex3_3 C T 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).(tau0 g e u t)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (t: T).(eq T (TSort (next g n0)) (lift (S n) +O t)))))) (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T +(TSort (next g n0)) (lift (S n) O u))))))) H2))))) (\lambda (c0: C).(\lambda +(d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H1: (getl i c0 (CHead d +(Bind Abbr) v))).(\lambda (w: T).(\lambda (H2: (tau0 g d v w)).(\lambda (_: +(((eq T v (TLRef n)) \to (or (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda +(_: T).(\lambda (t: T).(eq T w (lift (S n) O t)))))) (ex3_3 C T 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).(tau0 g e u t)))) (\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq T w (lift (S n) O +u)))))))))).(\lambda (H4: (eq T (TLRef i) (TLRef n))).(let H5 \def (f_equal T +nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with [(TSort _) +\Rightarrow i | (TLRef n0) \Rightarrow n0 | (THead _ _ _) \Rightarrow i])) +(TLRef i) (TLRef n) H4) in (let H6 \def (eq_ind nat i (\lambda (n0: +nat).(getl n0 c0 (CHead d (Bind Abbr) v))) H1 n H5) in (eq_ind_r nat n +(\lambda (n0: nat).(or (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(t: T).(eq T (lift (S n0) O w) (lift (S n) O t)))))) (ex3_3 C T 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).(tau0 g e u t)))) (\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq T (lift (S n0) O w) (lift (S n) O +u)))))))) (or_introl (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(t: T).(eq T (lift (S n) O w) (lift (S n) O t)))))) (ex3_3 C T 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).(tau0 g e u t)))) (\lambda +(_: C).(\lambda (u: T).(\lambda (_: T).(eq T (lift (S n) O w) (lift (S n) O +u)))))) (ex3_3_intro C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(t: T).(eq T (lift (S n) O w) (lift (S n) O t))))) d v w H6 H2 (refl_equal T +(lift (S n) O w)))) i H5)))))))))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H1: (getl i c0 (CHead d (Bind +Abst) v))).(\lambda (w: T).(\lambda (H2: (tau0 g d v w)).(\lambda (_: (((eq T +v (TLRef n)) \to (or (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(t: T).(eq T w (lift (S n) O t)))))) (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq T w (lift (S n) O u)))))))))).(\lambda (H4: (eq T +(TLRef i) (TLRef n))).(let H5 \def (f_equal T nat (\lambda (e: T).(match e in +T return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | (TLRef n0) +\Rightarrow n0 | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H4) in +(let H6 \def (eq_ind nat i (\lambda (n0: nat).(getl n0 c0 (CHead d (Bind +Abst) v))) H1 n H5) in (eq_ind_r nat n (\lambda (n0: nat).(or (ex3_3 C T 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).(tau0 g e u +t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T (lift (S n0) O v) +(lift (S n) O t)))))) (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq T (lift (S n0) O v) (lift (S n) O u)))))))) (or_intror (ex3_3 C T +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).(tau0 g e u +t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T (lift (S n) O v) +(lift (S n) O t)))))) (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq T (lift (S n) O v) (lift (S n) O u)))))) (ex3_3_intro C T 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).(tau0 g e u +t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T (lift (S n) O v) +(lift (S n) O u))))) d v w H6 H2 (refl_equal T (lift (S n) O v)))) i +H5)))))))))))) (\lambda (b: B).(\lambda (c0: C).(\lambda (v: T).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (_: (tau0 g (CHead c0 (Bind b) v) t1 +t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (or (ex3_3 C T T (\lambda (e: +C).(\lambda (u: T).(\lambda (_: T).(getl n (CHead c0 (Bind b) v) (CHead e +(Bind Abbr) u))))) (\lambda (e: C).(\lambda (u: T).(\lambda (t: T).(tau0 g e +u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T t2 (lift (S n) +O t)))))) (ex3_3 C T T (\lambda (e: C).(\lambda (u: T).(\lambda (_: T).(getl +n (CHead c0 (Bind b) v) (CHead e (Bind Abst) u))))) (\lambda (e: C).(\lambda +(u: T).(\lambda (t: T).(tau0 g e u t)))) (\lambda (_: C).(\lambda (u: +T).(\lambda (_: T).(eq T t2 (lift (S n) O u)))))))))).(\lambda (H3: (eq T +(THead (Bind b) v t1) (TLRef n))).(let H4 \def (eq_ind T (THead (Bind b) v +t1) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort +_) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (TLRef n) H3) in (False_ind (or (ex3_3 C T 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).(tau0 g e u t)))) (\lambda +(_: C).(\lambda (_: T).(\lambda (t: T).(eq T (THead (Bind b) v t2) (lift (S +n) O t)))))) (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda +(_: T).(eq T (THead (Bind b) v t2) (lift (S n) O u))))))) H4)))))))))) +(\lambda (c0: C).(\lambda (v: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda +(_: (tau0 g c0 t1 t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (or (ex3_3 C T +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).(tau0 g e u +t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T t2 (lift (S n) O +t)))))) (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T t2 +(lift (S n) O u)))))))))).(\lambda (H3: (eq T (THead (Flat Appl) v t1) (TLRef +n))).(let H4 \def (eq_ind T (THead (Flat Appl) v t1) (\lambda (ee: T).(match +ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) +H3) in (False_ind (or (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(t: T).(eq T (THead (Flat Appl) v t2) (lift (S n) O t)))))) (ex3_3 C T 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).(tau0 g e u +t)))) (\lambda (_: C).(\lambda (u: T).(\lambda (_: T).(eq T (THead (Flat +Appl) v t2) (lift (S n) O u))))))) H4))))))))) (\lambda (c0: C).(\lambda (v1: +T).(\lambda (v2: T).(\lambda (_: (tau0 g c0 v1 v2)).(\lambda (_: (((eq T v1 +(TLRef n)) \to (or (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(t: T).(eq T v2 (lift (S n) O t)))))) (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq T v2 (lift (S n) O u)))))))))).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (_: (tau0 g c0 t1 t2)).(\lambda (_: (((eq T t1 +(TLRef n)) \to (or (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda (_: T).(\lambda +(t: T).(eq T t2 (lift (S n) O t)))))) (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq T t2 (lift (S n) O u)))))))))).(\lambda (H5: (eq T +(THead (Flat Cast) v1 t1) (TLRef n))).(let H6 \def (eq_ind T (THead (Flat +Cast) v1 t1) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) +with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ +_) \Rightarrow True])) I (TLRef n) H5) in (False_ind (or (ex3_3 C T 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).(tau0 g e u +t)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t: T).(eq T (THead (Flat +Cast) v2 t2) (lift (S n) O t)))))) (ex3_3 C T 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).(tau0 g e u t)))) (\lambda (_: C).(\lambda +(u: T).(\lambda (_: T).(eq T (THead (Flat Cast) v2 t2) (lift (S n) O u))))))) +H6)))))))))))) c y x H0))) H))))). + +theorem tau0_gen_bind: + \forall (g: G).(\forall (b: B).(\forall (c: C).(\forall (u: T).(\forall (t1: +T).(\forall (x: T).((tau0 g c (THead (Bind b) u t1) x) \to (ex2 T (\lambda +(t2: T).(tau0 g (CHead c (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T x (THead +(Bind b) u t2)))))))))) +\def + \lambda (g: G).(\lambda (b: B).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: +T).(\lambda (x: T).(\lambda (H: (tau0 g c (THead (Bind b) u t1) +x)).(insert_eq T (THead (Bind b) u t1) (\lambda (t: T).(tau0 g c t x)) +(\lambda (_: T).(ex2 T (\lambda (t2: T).(tau0 g (CHead c (Bind b) u) t1 t2)) +(\lambda (t2: T).(eq T x (THead (Bind b) u t2))))) (\lambda (y: T).(\lambda +(H0: (tau0 g c y x)).(tau0_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda +(t0: T).((eq T t (THead (Bind b) u t1)) \to (ex2 T (\lambda (t2: T).(tau0 g +(CHead c0 (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T t0 (THead (Bind b) u +t2)))))))) (\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) +(THead (Bind b) u t1))).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: +T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow +True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I +(THead (Bind b) u t1) H1) in (False_ind (ex2 T (\lambda (t2: T).(tau0 g +(CHead c0 (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T (TSort (next g n)) +(THead (Bind b) u t2)))) H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda +(v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) +v))).(\lambda (w: T).(\lambda (_: (tau0 g d v w)).(\lambda (_: (((eq T v +(THead (Bind b) u t1)) \to (ex2 T (\lambda (t2: T).(tau0 g (CHead d (Bind b) +u) t1 t2)) (\lambda (t2: T).(eq T w (THead (Bind b) u t2))))))).(\lambda (H4: +(eq T (TLRef i) (THead (Bind b) u t1))).(let H5 \def (eq_ind T (TLRef i) +(\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow +False])) I (THead (Bind b) u t1) H4) in (False_ind (ex2 T (\lambda (t2: +T).(tau0 g (CHead c0 (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T (lift (S i) O +w) (THead (Bind b) u t2)))) H5))))))))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind +Abst) v))).(\lambda (w: T).(\lambda (_: (tau0 g d v w)).(\lambda (_: (((eq T +v (THead (Bind b) u t1)) \to (ex2 T (\lambda (t2: T).(tau0 g (CHead d (Bind +b) u) t1 t2)) (\lambda (t2: T).(eq T w (THead (Bind b) u t2))))))).(\lambda +(H4: (eq T (TLRef i) (THead (Bind b) u t1))).(let H5 \def (eq_ind T (TLRef i) +(\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow +False])) I (THead (Bind b) u t1) H4) in (False_ind (ex2 T (\lambda (t2: +T).(tau0 g (CHead c0 (Bind b) u) t1 t2)) (\lambda (t2: T).(eq T (lift (S i) O +v) (THead (Bind b) u t2)))) H5))))))))))) (\lambda (b0: B).(\lambda (c0: +C).(\lambda (v: T).(\lambda (t0: T).(\lambda (t2: T).(\lambda (H1: (tau0 g +(CHead c0 (Bind b0) v) t0 t2)).(\lambda (H2: (((eq T t0 (THead (Bind b) u +t1)) \to (ex2 T (\lambda (t3: T).(tau0 g (CHead (CHead c0 (Bind b0) v) (Bind +b) u) t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))))))).(\lambda +(H3: (eq T (THead (Bind b0) v t0) (THead (Bind b) u t1))).(let H4 \def +(f_equal T B (\lambda (e: T).(match e in T return (\lambda (_: T).B) with +[(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 | (THead k _ _) +\Rightarrow (match k in K return (\lambda (_: K).B) with [(Bind b1) +\Rightarrow b1 | (Flat _) \Rightarrow b0])])) (THead (Bind b0) v t0) (THead +(Bind b) u t1) H3) in ((let H5 \def (f_equal T T (\lambda (e: T).(match e in +T return (\lambda (_: T).T) with [(TSort _) \Rightarrow v | (TLRef _) +\Rightarrow v | (THead _ t _) \Rightarrow t])) (THead (Bind b0) v t0) (THead +(Bind b) u t1) H3) in ((let H6 \def (f_equal T T (\lambda (e: T).(match e in +T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) +\Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead (Bind b0) v t0) (THead +(Bind b) u t1) H3) in (\lambda (H7: (eq T v u)).(\lambda (H8: (eq B b0 +b)).(let H9 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead (Bind b) u t1)) +\to (ex2 T (\lambda (t3: T).(tau0 g (CHead (CHead c0 (Bind b0) v) (Bind b) u) +t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3)))))) H2 t1 H6) in +(let H10 \def (eq_ind T t0 (\lambda (t: T).(tau0 g (CHead c0 (Bind b0) v) t +t2)) H1 t1 H6) in (let H11 \def (eq_ind T v (\lambda (t: T).((eq T t1 (THead +(Bind b) u t1)) \to (ex2 T (\lambda (t3: T).(tau0 g (CHead (CHead c0 (Bind +b0) t) (Bind b) u) t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Bind b) u +t3)))))) H9 u H7) in (let H12 \def (eq_ind T v (\lambda (t: T).(tau0 g (CHead +c0 (Bind b0) t) t1 t2)) H10 u H7) in (eq_ind_r T u (\lambda (t: T).(ex2 T +(\lambda (t3: T).(tau0 g (CHead c0 (Bind b) u) t1 t3)) (\lambda (t3: T).(eq T +(THead (Bind b0) t t2) (THead (Bind b) u t3))))) (let H13 \def (eq_ind B b0 +(\lambda (b1: B).((eq T t1 (THead (Bind b) u t1)) \to (ex2 T (\lambda (t3: +T).(tau0 g (CHead (CHead c0 (Bind b1) u) (Bind b) u) t1 t3)) (\lambda (t3: +T).(eq T t2 (THead (Bind b) u t3)))))) H11 b H8) in (let H14 \def (eq_ind B +b0 (\lambda (b1: B).(tau0 g (CHead c0 (Bind b1) u) t1 t2)) H12 b H8) in +(eq_ind_r B b (\lambda (b1: B).(ex2 T (\lambda (t3: T).(tau0 g (CHead c0 +(Bind b) u) t1 t3)) (\lambda (t3: T).(eq T (THead (Bind b1) u t2) (THead +(Bind b) u t3))))) (ex_intro2 T (\lambda (t3: T).(tau0 g (CHead c0 (Bind b) +u) t1 t3)) (\lambda (t3: T).(eq T (THead (Bind b) u t2) (THead (Bind b) u +t3))) t2 H14 (refl_equal T (THead (Bind b) u t2))) b0 H8))) v H7)))))))) H5)) +H4)))))))))) (\lambda (c0: C).(\lambda (v: T).(\lambda (t0: T).(\lambda (t2: +T).(\lambda (_: (tau0 g c0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Bind b) u +t1)) \to (ex2 T (\lambda (t3: T).(tau0 g (CHead c0 (Bind b) u) t1 t3)) +(\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))))))).(\lambda (H3: (eq T +(THead (Flat Appl) v t0) (THead (Bind b) u t1))).(let H4 \def (eq_ind T +(THead (Flat Appl) v t0) (\lambda (ee: T).(match ee in T return (\lambda (_: +T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | +(THead k _ _) \Rightarrow (match k in K return (\lambda (_: K).Prop) with +[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind +b) u t1) H3) in (False_ind (ex2 T (\lambda (t3: T).(tau0 g (CHead c0 (Bind b) +u) t1 t3)) (\lambda (t3: T).(eq T (THead (Flat Appl) v t2) (THead (Bind b) u +t3)))) H4))))))))) (\lambda (c0: C).(\lambda (v1: T).(\lambda (v2: +T).(\lambda (_: (tau0 g c0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Bind b) u +t1)) \to (ex2 T (\lambda (t2: T).(tau0 g (CHead c0 (Bind b) u) t1 t2)) +(\lambda (t2: T).(eq T v2 (THead (Bind b) u t2))))))).(\lambda (t0: +T).(\lambda (t2: T).(\lambda (_: (tau0 g c0 t0 t2)).(\lambda (_: (((eq T t0 +(THead (Bind b) u t1)) \to (ex2 T (\lambda (t3: T).(tau0 g (CHead c0 (Bind b) +u) t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Bind b) u t3))))))).(\lambda +(H5: (eq T (THead (Flat Cast) v1 t0) (THead (Bind b) u t1))).(let H6 \def +(eq_ind T (THead (Flat Cast) v1 t0) (\lambda (ee: T).(match ee in T return +(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead k _ _) \Rightarrow (match k in K return (\lambda +(_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow +True])])) I (THead (Bind b) u t1) H5) in (False_ind (ex2 T (\lambda (t3: +T).(tau0 g (CHead c0 (Bind b) u) t1 t3)) (\lambda (t3: T).(eq T (THead (Flat +Cast) v2 t2) (THead (Bind b) u t3)))) H6)))))))))))) c y x H0))) H))))))). + +theorem tau0_gen_appl: + \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).(\forall (x: +T).((tau0 g c (THead (Flat Appl) u t1) x) \to (ex2 T (\lambda (t2: T).(tau0 g +c t1 t2)) (\lambda (t2: T).(eq T x (THead (Flat Appl) u t2))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (u: T).(\lambda (t1: T).(\lambda (x: +T).(\lambda (H: (tau0 g c (THead (Flat Appl) u t1) x)).(insert_eq T (THead +(Flat Appl) u t1) (\lambda (t: T).(tau0 g c t x)) (\lambda (_: T).(ex2 T +(\lambda (t2: T).(tau0 g c t1 t2)) (\lambda (t2: T).(eq T x (THead (Flat +Appl) u t2))))) (\lambda (y: T).(\lambda (H0: (tau0 g c y x)).(tau0_ind g +(\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq T t (THead (Flat Appl) +u t1)) \to (ex2 T (\lambda (t2: T).(tau0 g c0 t1 t2)) (\lambda (t2: T).(eq T +t0 (THead (Flat Appl) u t2)))))))) (\lambda (c0: C).(\lambda (n: +nat).(\lambda (H1: (eq T (TSort n) (THead (Flat Appl) u t1))).(let H2 \def +(eq_ind T (TSort n) (\lambda (ee: T).(match ee in T return (\lambda (_: +T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | +(THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u t1) H1) in +(False_ind (ex2 T (\lambda (t2: T).(tau0 g c0 t1 t2)) (\lambda (t2: T).(eq T +(TSort (next g n)) (THead (Flat Appl) u t2)))) H2))))) (\lambda (c0: +C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 +(CHead d (Bind Abbr) v))).(\lambda (w: T).(\lambda (_: (tau0 g d v +w)).(\lambda (_: (((eq T v (THead (Flat Appl) u t1)) \to (ex2 T (\lambda (t2: +T).(tau0 g d t1 t2)) (\lambda (t2: T).(eq T w (THead (Flat Appl) u +t2))))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Appl) u t1))).(let H5 +\def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee in T return (\lambda (_: +T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u t1) H4) in +(False_ind (ex2 T (\lambda (t2: T).(tau0 g c0 t1 t2)) (\lambda (t2: T).(eq T +(lift (S i) O w) (THead (Flat Appl) u t2)))) H5))))))))))) (\lambda (c0: +C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 +(CHead d (Bind Abst) v))).(\lambda (w: T).(\lambda (_: (tau0 g d v +w)).(\lambda (_: (((eq T v (THead (Flat Appl) u t1)) \to (ex2 T (\lambda (t2: +T).(tau0 g d t1 t2)) (\lambda (t2: T).(eq T w (THead (Flat Appl) u +t2))))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Appl) u t1))).(let H5 +\def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee in T return (\lambda (_: +T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) u t1) H4) in +(False_ind (ex2 T (\lambda (t2: T).(tau0 g c0 t1 t2)) (\lambda (t2: T).(eq T +(lift (S i) O v) (THead (Flat Appl) u t2)))) H5))))))))))) (\lambda (b: +B).(\lambda (c0: C).(\lambda (v: T).(\lambda (t0: T).(\lambda (t2: +T).(\lambda (_: (tau0 g (CHead c0 (Bind b) v) t0 t2)).(\lambda (_: (((eq T t0 +(THead (Flat Appl) u t1)) \to (ex2 T (\lambda (t3: T).(tau0 g (CHead c0 (Bind +b) v) t1 t3)) (\lambda (t3: T).(eq T t2 (THead (Flat Appl) u +t3))))))).(\lambda (H3: (eq T (THead (Bind b) v t0) (THead (Flat Appl) u +t1))).(let H4 \def (eq_ind T (THead (Bind b) v t0) (\lambda (ee: T).(match ee +in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef +_) \Rightarrow False | (THead k _ _) \Rightarrow (match k in K return +(\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow +False])])) I (THead (Flat Appl) u t1) H3) in (False_ind (ex2 T (\lambda (t3: +T).(tau0 g c0 t1 t3)) (\lambda (t3: T).(eq T (THead (Bind b) v t2) (THead +(Flat Appl) u t3)))) H4)))))))))) (\lambda (c0: C).(\lambda (v: T).(\lambda +(t0: T).(\lambda (t2: T).(\lambda (H1: (tau0 g c0 t0 t2)).(\lambda (H2: (((eq +T t0 (THead (Flat Appl) u t1)) \to (ex2 T (\lambda (t3: T).(tau0 g c0 t1 t3)) +(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3))))))).(\lambda (H3: (eq T +(THead (Flat Appl) v t0) (THead (Flat Appl) u t1))).(let H4 \def (f_equal T T +(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) +\Rightarrow v | (TLRef _) \Rightarrow v | (THead _ t _) \Rightarrow t])) +(THead (Flat Appl) v t0) (THead (Flat Appl) u t1) H3) in ((let H5 \def +(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with +[(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) +\Rightarrow t])) (THead (Flat Appl) v t0) (THead (Flat Appl) u t1) H3) in +(\lambda (H6: (eq T v u)).(let H7 \def (eq_ind T t0 (\lambda (t: T).((eq T t +(THead (Flat Appl) u t1)) \to (ex2 T (\lambda (t3: T).(tau0 g c0 t1 t3)) +(\lambda (t3: T).(eq T t2 (THead (Flat Appl) u t3)))))) H2 t1 H5) in (let H8 +\def (eq_ind T t0 (\lambda (t: T).(tau0 g c0 t t2)) H1 t1 H5) in (eq_ind_r T +u (\lambda (t: T).(ex2 T (\lambda (t3: T).(tau0 g c0 t1 t3)) (\lambda (t3: +T).(eq T (THead (Flat Appl) t t2) (THead (Flat Appl) u t3))))) (ex_intro2 T +(\lambda (t3: T).(tau0 g c0 t1 t3)) (\lambda (t3: T).(eq T (THead (Flat Appl) +u t2) (THead (Flat Appl) u t3))) t2 H8 (refl_equal T (THead (Flat Appl) u +t2))) v H6))))) H4))))))))) (\lambda (c0: C).(\lambda (v1: T).(\lambda (v2: +T).(\lambda (_: (tau0 g c0 v1 v2)).(\lambda (_: (((eq T v1 (THead (Flat Appl) +u t1)) \to (ex2 T (\lambda (t2: T).(tau0 g c0 t1 t2)) (\lambda (t2: T).(eq T +v2 (THead (Flat Appl) u t2))))))).(\lambda (t0: T).(\lambda (t2: T).(\lambda +(_: (tau0 g c0 t0 t2)).(\lambda (_: (((eq T t0 (THead (Flat Appl) u t1)) \to +(ex2 T (\lambda (t3: T).(tau0 g c0 t1 t3)) (\lambda (t3: T).(eq T t2 (THead +(Flat Appl) u t3))))))).(\lambda (H5: (eq T (THead (Flat Cast) v1 t0) (THead +(Flat Appl) u t1))).(let H6 \def (eq_ind T (THead (Flat Cast) v1 t0) (\lambda +(ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | +(Flat f) \Rightarrow (match f in F return (\lambda (_: F).Prop) with [Appl +\Rightarrow False | Cast \Rightarrow True])])])) I (THead (Flat Appl) u t1) +H5) in (False_ind (ex2 T (\lambda (t3: T).(tau0 g c0 t1 t3)) (\lambda (t3: +T).(eq T (THead (Flat Cast) v2 t2) (THead (Flat Appl) u t3)))) H6)))))))))))) +c y x H0))) H)))))). + +theorem tau0_gen_cast: + \forall (g: G).(\forall (c: C).(\forall (v1: T).(\forall (t1: T).(\forall +(x: T).((tau0 g c (THead (Flat Cast) v1 t1) x) \to (ex3_2 T T (\lambda (v2: +T).(\lambda (_: T).(tau0 g c v1 v2))) (\lambda (_: T).(\lambda (t2: T).(tau0 +g c t1 t2))) (\lambda (v2: T).(\lambda (t2: T).(eq T x (THead (Flat Cast) v2 +t2)))))))))) +\def + \lambda (g: G).(\lambda (c: C).(\lambda (v1: T).(\lambda (t1: T).(\lambda +(x: T).(\lambda (H: (tau0 g c (THead (Flat Cast) v1 t1) x)).(insert_eq T +(THead (Flat Cast) v1 t1) (\lambda (t: T).(tau0 g c t x)) (\lambda (_: +T).(ex3_2 T T (\lambda (v2: T).(\lambda (_: T).(tau0 g c v1 v2))) (\lambda +(_: T).(\lambda (t2: T).(tau0 g c t1 t2))) (\lambda (v2: T).(\lambda (t2: +T).(eq T x (THead (Flat Cast) v2 t2)))))) (\lambda (y: T).(\lambda (H0: (tau0 +g c y x)).(tau0_ind g (\lambda (c0: C).(\lambda (t: T).(\lambda (t0: T).((eq +T t (THead (Flat Cast) v1 t1)) \to (ex3_2 T T (\lambda (v2: T).(\lambda (_: +T).(tau0 g c0 v1 v2))) (\lambda (_: T).(\lambda (t2: T).(tau0 g c0 t1 t2))) +(\lambda (v2: T).(\lambda (t2: T).(eq T t0 (THead (Flat Cast) v2 t2))))))))) +(\lambda (c0: C).(\lambda (n: nat).(\lambda (H1: (eq T (TSort n) (THead (Flat +Cast) v1 t1))).(let H2 \def (eq_ind T (TSort n) (\lambda (ee: T).(match ee in +T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) +v1 t1) H1) in (False_ind (ex3_2 T T (\lambda (v2: T).(\lambda (_: T).(tau0 g +c0 v1 v2))) (\lambda (_: T).(\lambda (t2: T).(tau0 g c0 t1 t2))) (\lambda +(v2: T).(\lambda (t2: T).(eq T (TSort (next g n)) (THead (Flat Cast) v2 +t2))))) H2))))) (\lambda (c0: C).(\lambda (d: C).(\lambda (v: T).(\lambda (i: +nat).(\lambda (_: (getl i c0 (CHead d (Bind Abbr) v))).(\lambda (w: +T).(\lambda (_: (tau0 g d v w)).(\lambda (_: (((eq T v (THead (Flat Cast) v1 +t1)) \to (ex3_2 T T (\lambda (v2: T).(\lambda (_: T).(tau0 g d v1 v2))) +(\lambda (_: T).(\lambda (t2: T).(tau0 g d t1 t2))) (\lambda (v2: T).(\lambda +(t2: T).(eq T w (THead (Flat Cast) v2 t2)))))))).(\lambda (H4: (eq T (TLRef +i) (THead (Flat Cast) v1 t1))).(let H5 \def (eq_ind T (TLRef i) (\lambda (ee: +T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I +(THead (Flat Cast) v1 t1) H4) in (False_ind (ex3_2 T T (\lambda (v2: +T).(\lambda (_: T).(tau0 g c0 v1 v2))) (\lambda (_: T).(\lambda (t2: T).(tau0 +g c0 t1 t2))) (\lambda (v2: T).(\lambda (t2: T).(eq T (lift (S i) O w) (THead +(Flat Cast) v2 t2))))) H5))))))))))) (\lambda (c0: C).(\lambda (d: +C).(\lambda (v: T).(\lambda (i: nat).(\lambda (_: (getl i c0 (CHead d (Bind +Abst) v))).(\lambda (w: T).(\lambda (_: (tau0 g d v w)).(\lambda (_: (((eq T +v (THead (Flat Cast) v1 t1)) \to (ex3_2 T T (\lambda (v2: T).(\lambda (_: +T).(tau0 g d v1 v2))) (\lambda (_: T).(\lambda (t2: T).(tau0 g d t1 t2))) +(\lambda (v2: T).(\lambda (t2: T).(eq T w (THead (Flat Cast) v2 +t2)))))))).(\lambda (H4: (eq T (TLRef i) (THead (Flat Cast) v1 t1))).(let H5 +\def (eq_ind T (TLRef i) (\lambda (ee: T).(match ee in T return (\lambda (_: +T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) v1 t1) H4) in +(False_ind (ex3_2 T T (\lambda (v2: T).(\lambda (_: T).(tau0 g c0 v1 v2))) +(\lambda (_: T).(\lambda (t2: T).(tau0 g c0 t1 t2))) (\lambda (v2: +T).(\lambda (t2: T).(eq T (lift (S i) O v) (THead (Flat Cast) v2 t2))))) +H5))))))))))) (\lambda (b: B).(\lambda (c0: C).(\lambda (v: T).(\lambda (t0: +T).(\lambda (t2: T).(\lambda (_: (tau0 g (CHead c0 (Bind b) v) t0 +t2)).(\lambda (_: (((eq T t0 (THead (Flat Cast) v1 t1)) \to (ex3_2 T T +(\lambda (v2: T).(\lambda (_: T).(tau0 g (CHead c0 (Bind b) v) v1 v2))) +(\lambda (_: T).(\lambda (t3: T).(tau0 g (CHead c0 (Bind b) v) t1 t3))) +(\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) v2 +t3)))))))).(\lambda (H3: (eq T (THead (Bind b) v t0) (THead (Flat Cast) v1 +t1))).(let H4 \def (eq_ind T (THead (Bind b) v t0) (\lambda (ee: T).(match ee +in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef +_) \Rightarrow False | (THead k _ _) \Rightarrow (match k in K return +(\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow +False])])) I (THead (Flat Cast) v1 t1) H3) in (False_ind (ex3_2 T T (\lambda +(v2: T).(\lambda (_: T).(tau0 g c0 v1 v2))) (\lambda (_: T).(\lambda (t3: +T).(tau0 g c0 t1 t3))) (\lambda (v2: T).(\lambda (t3: T).(eq T (THead (Bind +b) v t2) (THead (Flat Cast) v2 t3))))) H4)))))))))) (\lambda (c0: C).(\lambda +(v: T).(\lambda (t0: T).(\lambda (t2: T).(\lambda (_: (tau0 g c0 t0 +t2)).(\lambda (_: (((eq T t0 (THead (Flat Cast) v1 t1)) \to (ex3_2 T T +(\lambda (v2: T).(\lambda (_: T).(tau0 g c0 v1 v2))) (\lambda (_: T).(\lambda +(t3: T).(tau0 g c0 t1 t3))) (\lambda (v2: T).(\lambda (t3: T).(eq T t2 (THead +(Flat Cast) v2 t3)))))))).(\lambda (H3: (eq T (THead (Flat Appl) v t0) (THead +(Flat Cast) v1 t1))).(let H4 \def (eq_ind T (THead (Flat Appl) v t0) (\lambda +(ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow +(match k in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | +(Flat f) \Rightarrow (match f in F return (\lambda (_: F).Prop) with [Appl +\Rightarrow True | Cast \Rightarrow False])])])) I (THead (Flat Cast) v1 t1) +H3) in (False_ind (ex3_2 T T (\lambda (v2: T).(\lambda (_: T).(tau0 g c0 v1 +v2))) (\lambda (_: T).(\lambda (t3: T).(tau0 g c0 t1 t3))) (\lambda (v2: +T).(\lambda (t3: T).(eq T (THead (Flat Appl) v t2) (THead (Flat Cast) v2 +t3))))) H4))))))))) (\lambda (c0: C).(\lambda (v0: T).(\lambda (v2: +T).(\lambda (H1: (tau0 g c0 v0 v2)).(\lambda (H2: (((eq T v0 (THead (Flat +Cast) v1 t1)) \to (ex3_2 T T (\lambda (v3: T).(\lambda (_: T).(tau0 g c0 v1 +v3))) (\lambda (_: T).(\lambda (t2: T).(tau0 g c0 t1 t2))) (\lambda (v3: +T).(\lambda (t2: T).(eq T v2 (THead (Flat Cast) v3 t2)))))))).(\lambda (t0: +T).(\lambda (t2: T).(\lambda (H3: (tau0 g c0 t0 t2)).(\lambda (H4: (((eq T t0 +(THead (Flat Cast) v1 t1)) \to (ex3_2 T T (\lambda (v3: T).(\lambda (_: +T).(tau0 g c0 v1 v3))) (\lambda (_: T).(\lambda (t3: T).(tau0 g c0 t1 t3))) +(\lambda (v3: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) v3 +t3)))))))).(\lambda (H5: (eq T (THead (Flat Cast) v0 t0) (THead (Flat Cast) +v1 t1))).(let H6 \def (f_equal T T (\lambda (e: T).(match e in T return +(\lambda (_: T).T) with [(TSort _) \Rightarrow v0 | (TLRef _) \Rightarrow v0 +| (THead _ t _) \Rightarrow t])) (THead (Flat Cast) v0 t0) (THead (Flat Cast) +v1 t1) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e in T return +(\lambda (_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 +| (THead _ _ t) \Rightarrow t])) (THead (Flat Cast) v0 t0) (THead (Flat Cast) +v1 t1) H5) in (\lambda (H8: (eq T v0 v1)).(let H9 \def (eq_ind T t0 (\lambda +(t: T).((eq T t (THead (Flat Cast) v1 t1)) \to (ex3_2 T T (\lambda (v3: +T).(\lambda (_: T).(tau0 g c0 v1 v3))) (\lambda (_: T).(\lambda (t3: T).(tau0 +g c0 t1 t3))) (\lambda (v3: T).(\lambda (t3: T).(eq T t2 (THead (Flat Cast) +v3 t3))))))) H4 t1 H7) in (let H10 \def (eq_ind T t0 (\lambda (t: T).(tau0 g +c0 t t2)) H3 t1 H7) in (let H11 \def (eq_ind T v0 (\lambda (t: T).((eq T t +(THead (Flat Cast) v1 t1)) \to (ex3_2 T T (\lambda (v3: T).(\lambda (_: +T).(tau0 g c0 v1 v3))) (\lambda (_: T).(\lambda (t3: T).(tau0 g c0 t1 t3))) +(\lambda (v3: T).(\lambda (t3: T).(eq T v2 (THead (Flat Cast) v3 t3))))))) H2 +v1 H8) in (let H12 \def (eq_ind T v0 (\lambda (t: T).(tau0 g c0 t v2)) H1 v1 +H8) in (ex3_2_intro T T (\lambda (v3: T).(\lambda (_: T).(tau0 g c0 v1 v3))) +(\lambda (_: T).(\lambda (t3: T).(tau0 g c0 t1 t3))) (\lambda (v3: +T).(\lambda (t3: T).(eq T (THead (Flat Cast) v2 t2) (THead (Flat Cast) v3 +t3)))) v2 t2 H12 H10 (refl_equal T (THead (Flat Cast) v2 t2))))))))) +H6)))))))))))) c y x H0))) H)))))). + diff --git a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ty3/tau0.ma b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ty3/tau0.ma index ceaa58478..5e1cef728 100644 --- a/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ty3/tau0.ma +++ b/helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/ty3/tau0.ma @@ -16,7 +16,7 @@ include "LambdaDelta-1/ty3/pr3_props.ma". -include "LambdaDelta-1/tau0/defs.ma". +include "LambdaDelta-1/tau0/fwd.ma". theorem ty3_tau0: \forall (g: G).(\forall (c: C).(\forall (u: T).(\forall (t1: T).((ty3 g c u @@ -31,592 +31,204 @@ C).(\lambda (t2: T).(\lambda (t: T).(\lambda (_: (ty3 g c0 t2 t)).(\lambda ((\forall (t4: T).((tau0 g c0 u0 t4) \to (ty3 g c0 u0 t4))))).(\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 in tau0 return (\lambda -(c1: C).(\lambda (t: T).(\lambda (t0: T).(\lambda (_: (tau0 ? c1 t t0)).((eq -C c1 c0) \to ((eq T t (TSort m)) \to ((eq T t0 t2) \to (ty3 g c0 (TSort m) -t2)))))))) with [(tau0_sort c1 n) \Rightarrow (\lambda (H1: (eq C c1 -c0)).(\lambda (H2: (eq T (TSort n) (TSort m))).(\lambda (H3: (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 (H4: -(eq T (TSort n) (TSort m))).(let H5 \def (f_equal T nat (\lambda (e: -T).(match e in T return (\lambda (_: T).nat) with [(TSort n0) \Rightarrow n0 -| (TLRef _) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TSort n) (TSort -m) H4) in (eq_ind nat m (\lambda (n0: nat).((eq T (TSort (next g n0)) t2) \to -(ty3 g c0 (TSort m) t2))) (\lambda (H6: (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 H6)) n (sym_eq nat n m H5)))) c1 (sym_eq C c1 c0 H1) H2 H3)))) | -(tau0_abbr c1 d v i H1 w H2) \Rightarrow (\lambda (H3: (eq C c1 c0)).(\lambda -(H4: (eq T (TLRef i) (TSort m))).(\lambda (H5: (eq T (lift (S i) O w) -t2)).(eq_ind C c0 (\lambda (c2: C).((eq T (TLRef i) (TSort m)) \to ((eq T -(lift (S i) O w) t2) \to ((getl i c2 (CHead d (Bind Abbr) v)) \to ((tau0 g d -v w) \to (ty3 g c0 (TSort m) t2)))))) (\lambda (H6: (eq T (TLRef i) (TSort -m))).(let H7 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (TSort m) H6) 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)))) H7))) c1 (sym_eq C c1 -c0 H3) H4 H5 H1 H2)))) | (tau0_abst c1 d v i H1 w H2) \Rightarrow (\lambda -(H3: (eq C c1 c0)).(\lambda (H4: (eq T (TLRef i) (TSort m))).(\lambda (H5: -(eq T (lift (S i) O v) t2)).(eq_ind C c0 (\lambda (c2: C).((eq T (TLRef i) -(TSort m)) \to ((eq T (lift (S i) O v) t2) \to ((getl i c2 (CHead d (Bind -Abst) v)) \to ((tau0 g d v w) \to (ty3 g c0 (TSort m) t2)))))) (\lambda (H6: -(eq T (TLRef i) (TSort m))).(let H7 \def (eq_ind T (TLRef i) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I -(TSort m) H6) 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)))) -H7))) c1 (sym_eq C c1 c0 H3) H4 H5 H1 H2)))) | (tau0_bind b c1 v t0 t3 H1) -\Rightarrow (\lambda (H2: (eq C c1 c0)).(\lambda (H3: (eq T (THead (Bind b) v -t0) (TSort m))).(\lambda (H4: (eq T (THead (Bind b) v t3) t2)).(eq_ind C c0 -(\lambda (c2: C).((eq T (THead (Bind b) v t0) (TSort m)) \to ((eq T (THead -(Bind b) v t3) t2) \to ((tau0 g (CHead c2 (Bind b) v) t0 t3) \to (ty3 g c0 -(TSort m) t2))))) (\lambda (H5: (eq T (THead (Bind b) v t0) (TSort m))).(let -H6 \def (eq_ind T (THead (Bind b) v t0) (\lambda (e: T).(match e in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort m) H5) in -(False_ind ((eq T (THead (Bind b) v t3) t2) \to ((tau0 g (CHead c0 (Bind b) -v) t0 t3) \to (ty3 g c0 (TSort m) t2))) H6))) c1 (sym_eq C c1 c0 H2) H3 H4 -H1)))) | (tau0_appl c1 v t0 t3 H1) \Rightarrow (\lambda (H2: (eq C c1 -c0)).(\lambda (H3: (eq T (THead (Flat Appl) v t0) (TSort m))).(\lambda (H4: -(eq T (THead (Flat Appl) v t3) t2)).(eq_ind C c0 (\lambda (c2: C).((eq T -(THead (Flat Appl) v t0) (TSort m)) \to ((eq T (THead (Flat Appl) v t3) t2) -\to ((tau0 g c2 t0 t3) \to (ty3 g c0 (TSort m) t2))))) (\lambda (H5: (eq T -(THead (Flat Appl) v t0) (TSort m))).(let H6 \def (eq_ind T (THead (Flat -Appl) v t0) (\lambda (e: T).(match e in T 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 Appl) v -t3) t2) \to ((tau0 g c0 t0 t3) \to (ty3 g c0 (TSort m) t2))) H6))) c1 (sym_eq -C c1 c0 H2) H3 H4 H1)))) | (tau0_cast c1 v1 v2 H1 t0 t3 H2) \Rightarrow -(\lambda (H3: (eq C c1 c0)).(\lambda (H4: (eq T (THead (Flat Cast) v1 t0) -(TSort m))).(\lambda (H5: (eq T (THead (Flat Cast) v2 t3) t2)).(eq_ind C c0 -(\lambda (c2: C).((eq T (THead (Flat Cast) v1 t0) (TSort m)) \to ((eq T -(THead (Flat Cast) v2 t3) t2) \to ((tau0 g c2 v1 v2) \to ((tau0 g c2 t0 t3) -\to (ty3 g c0 (TSort m) t2)))))) (\lambda (H6: (eq T (THead (Flat Cast) v1 -t0) (TSort m))).(let H7 \def (eq_ind T (THead (Flat Cast) v1 t0) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TSort m) H6) in (False_ind ((eq T (THead (Flat Cast) v2 t3) t2) \to ((tau0 g -c0 v1 v2) \to ((tau0 g c0 t0 t3) \to (ty3 g c0 (TSort m) t2)))) H7))) c1 -(sym_eq C c1 c0 H3) H4 H5 H1 H2))))]) 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 in tau0 -return (\lambda (c1: C).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (tau0 -? c1 t0 t3)).((eq C c1 c0) \to ((eq T t0 (TLRef n)) \to ((eq T t3 t2) \to -(ty3 g c0 (TLRef n) t2)))))))) with [(tau0_sort c1 n0) \Rightarrow (\lambda -(H4: (eq C c1 c0)).(\lambda (H5: (eq T (TSort n0) (TLRef n))).(\lambda (H6: -(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 (H7: (eq T (TSort n0) (TLRef n))).(let H8 \def (eq_ind T (TSort n0) -(\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) -\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -False])) I (TLRef n) H7) in (False_ind ((eq T (TSort (next g n0)) t2) \to -(ty3 g c0 (TLRef n) t2)) H8))) c1 (sym_eq C c1 c0 H4) H5 H6)))) | (tau0_abbr -c1 d0 v i H4 w H5) \Rightarrow (\lambda (H6: (eq C c1 c0)).(\lambda (H7: (eq -T (TLRef i) (TLRef n))).(\lambda (H8: (eq T (lift (S i) O w) t2)).(eq_ind C -c0 (\lambda (c2: C).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O w) -t2) \to ((getl i c2 (CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) \to (ty3 g -c0 (TLRef n) t2)))))) (\lambda (H9: (eq T (TLRef i) (TLRef n))).(let H10 \def -(f_equal T nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with -[(TSort _) \Rightarrow i | (TLRef n0) \Rightarrow n0 | (THead _ _ _) -\Rightarrow i])) (TLRef i) (TLRef n) H9) 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 (H11: (eq T -(lift (S n) O w) t2)).(eq_ind T (lift (S n) O w) (\lambda (t0: T).((getl n c0 -(CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t0)))) -(\lambda (H12: (getl n c0 (CHead d0 (Bind Abbr) v))).(\lambda (H13: (tau0 g -d0 v w)).(let H14 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c2: -C).(getl n c0 c2)) H0 (CHead d0 (Bind Abbr) v) (getl_mono c0 (CHead d (Bind -Abbr) u0) n H0 (CHead d0 (Bind Abbr) v) H12)) in (let H15 \def (f_equal C C -(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) -\Rightarrow d | (CHead c2 _ _) \Rightarrow c2])) (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) H12)) in ((let H16 \def (f_equal C T (\lambda (e: C).(match +(H0: (tau0 g c0 (TSort m) t2)).(let H_y \def (tau0_gen_sort g c0 t2 m H0) in +(let H1 \def (f_equal T T (\lambda (e: T).e) t2 (TSort (next g m)) H_y) in +(eq_ind_r T (TSort (next g m)) (\lambda (t: T).(ty3 g c0 (TSort m) t)) +(ty3_sort g c0 m) t2 H1))))))) (\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 H_x \def (tau0_gen_lref g c0 t2 n H3) in +(let H4 \def H_x in (or_ind (ex3_3 C T T (\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).(tau0 g e u1 t0)))) (\lambda (_: +C).(\lambda (_: T).(\lambda (t0: T).(eq T t2 (lift (S n) O t0)))))) (ex3_3 C +T T (\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).(tau0 g +e u1 t0)))) (\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq T t2 (lift +(S n) O u1)))))) (ty3 g c0 (TLRef n) t2) (\lambda (H5: (ex3_3 C T T (\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).(tau0 g e u1 t0)))) +(\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(eq T t2 (lift (S n) O +t0))))))).(ex3_3_ind C T T (\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).(tau0 g e u1 t0)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (t0: T).(eq T t2 (lift (S n) O t0))))) (ty3 g c0 (TLRef n) t2) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H6: (getl n c0 +(CHead x0 (Bind Abbr) x1))).(\lambda (H7: (tau0 g x0 x1 x2)).(\lambda (H8: +(eq T t2 (lift (S n) O x2))).(let H9 \def (f_equal T T (\lambda (e: T).e) t2 +(lift (S n) O x2) H8) in (eq_ind_r T (lift (S n) O x2) (\lambda (t0: T).(ty3 +g c0 (TLRef n) t0)) (let H10 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda +(c1: C).(getl n c0 c1)) H0 (CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d +(Bind Abbr) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (let H11 \def (f_equal +C C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _) +\Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) (CHead d (Bind Abbr) u0) +(CHead x0 (Bind Abbr) x1) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead +x0 (Bind Abbr) x1) H6)) in ((let H12 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ -t0) \Rightarrow t0])) (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) H12)) in -(\lambda (H17: (eq C d d0)).(let H18 \def (eq_ind_r T v (\lambda (t0: -T).(getl n c0 (CHead d0 (Bind Abbr) t0))) H14 u0 H16) in (let H19 \def -(eq_ind_r T v (\lambda (t0: T).(tau0 g d0 t0 w)) H13 u0 H16) in (let H20 \def -(eq_ind_r C d0 (\lambda (c2: C).(getl n c0 (CHead c2 (Bind Abbr) u0))) H18 d -H17) in (let H21 \def (eq_ind_r C d0 (\lambda (c2: C).(tau0 g c2 u0 w)) H19 d -H17) in (ty3_abbr g n c0 d u0 H20 w (H2 w H21)))))))) H15))))) t2 H11)) i -(sym_eq nat i n H10)))) c1 (sym_eq C c1 c0 H6) H7 H8 H4 H5)))) | (tau0_abst -c1 d0 v i H4 w H5) \Rightarrow (\lambda (H6: (eq C c1 c0)).(\lambda (H7: (eq -T (TLRef i) (TLRef n))).(\lambda (H8: (eq T (lift (S i) O v) t2)).(eq_ind C -c0 (\lambda (c2: C).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O v) -t2) \to ((getl i c2 (CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g -c0 (TLRef n) t2)))))) (\lambda (H9: (eq T (TLRef i) (TLRef n))).(let H10 \def -(f_equal T nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with -[(TSort _) \Rightarrow i | (TLRef n0) \Rightarrow n0 | (THead _ _ _) -\Rightarrow i])) (TLRef i) (TLRef n) H9) 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 (H11: (eq T -(lift (S n) O v) t2)).(eq_ind T (lift (S n) O v) (\lambda (t0: T).((getl n c0 -(CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t0)))) -(\lambda (H12: (getl n c0 (CHead d0 (Bind Abst) v))).(\lambda (_: (tau0 g d0 -v w)).(let H14 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c2: C).(getl -n c0 c2)) H0 (CHead d0 (Bind Abst) v) (getl_mono c0 (CHead d (Bind Abbr) u0) -n H0 (CHead d0 (Bind Abst) v) H12)) in (let H15 \def (eq_ind C (CHead d (Bind -Abbr) u0) (\lambda (ee: C).(match ee in C return (\lambda (_: C).Prop) with -[(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k in K return -(\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match b in 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) -H12)) in (False_ind (ty3 g c0 (TLRef n) (lift (S n) O v)) H15))))) t2 H11)) i -(sym_eq nat i n H10)))) c1 (sym_eq C c1 c0 H6) H7 H8 H4 H5)))) | (tau0_bind b -c1 v t0 t3 H4) \Rightarrow (\lambda (H5: (eq C c1 c0)).(\lambda (H6: (eq T -(THead (Bind b) v t0) (TLRef n))).(\lambda (H7: (eq T (THead (Bind b) v t3) -t2)).(eq_ind C c0 (\lambda (c2: C).((eq T (THead (Bind b) v t0) (TLRef n)) -\to ((eq T (THead (Bind b) v t3) t2) \to ((tau0 g (CHead c2 (Bind b) v) t0 -t3) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H8: (eq T (THead (Bind b) v t0) -(TLRef n))).(let H9 \def (eq_ind T (THead (Bind b) v t0) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TLRef n) H8) in (False_ind ((eq T (THead (Bind b) v t3) t2) \to ((tau0 g -(CHead c0 (Bind b) v) t0 t3) \to (ty3 g c0 (TLRef n) t2))) H9))) c1 (sym_eq C -c1 c0 H5) H6 H7 H4)))) | (tau0_appl c1 v t0 t3 H4) \Rightarrow (\lambda (H5: -(eq C c1 c0)).(\lambda (H6: (eq T (THead (Flat Appl) v t0) (TLRef -n))).(\lambda (H7: (eq T (THead (Flat Appl) v t3) t2)).(eq_ind C c0 (\lambda -(c2: C).((eq T (THead (Flat Appl) v t0) (TLRef n)) \to ((eq T (THead (Flat -Appl) v t3) t2) \to ((tau0 g c2 t0 t3) \to (ty3 g c0 (TLRef n) t2))))) -(\lambda (H8: (eq T (THead (Flat Appl) v t0) (TLRef n))).(let H9 \def (eq_ind -T (THead (Flat Appl) v t0) (\lambda (e: T).(match e in T 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 Appl) v t3) t2) \to ((tau0 g c0 t0 t3) \to (ty3 g c0 (TLRef n) t2))) -H9))) c1 (sym_eq C c1 c0 H5) H6 H7 H4)))) | (tau0_cast c1 v1 v2 H4 t0 t3 H5) -\Rightarrow (\lambda (H6: (eq C c1 c0)).(\lambda (H7: (eq T (THead (Flat -Cast) v1 t0) (TLRef n))).(\lambda (H8: (eq T (THead (Flat Cast) v2 t3) -t2)).(eq_ind C c0 (\lambda (c2: C).((eq T (THead (Flat Cast) v1 t0) (TLRef -n)) \to ((eq T (THead (Flat Cast) v2 t3) t2) \to ((tau0 g c2 v1 v2) \to -((tau0 g c2 t0 t3) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H9: (eq T -(THead (Flat Cast) v1 t0) (TLRef n))).(let H10 \def (eq_ind T (THead (Flat -Cast) v1 t0) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow True])) I (TLRef n) H9) in (False_ind ((eq T (THead (Flat Cast) -v2 t3) t2) \to ((tau0 g c0 v1 v2) \to ((tau0 g c0 t0 t3) \to (ty3 g c0 (TLRef -n) t2)))) H10))) c1 (sym_eq C c1 c0 H6) H7 H8 H4 H5))))]) in (H4 (refl_equal -C c0) (refl_equal T (TLRef n)) (refl_equal T t2))))))))))))) (\lambda (n: +t0) \Rightarrow t0])) (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 (H13: (eq C d x0)).(let H14 \def (eq_ind_r T x1 (\lambda (t0: +T).(getl n c0 (CHead x0 (Bind Abbr) t0))) H10 u0 H12) in (let H15 \def +(eq_ind_r T x1 (\lambda (t0: T).(tau0 g x0 t0 x2)) H7 u0 H12) in (let H16 +\def (eq_ind_r C x0 (\lambda (c1: C).(getl n c0 (CHead c1 (Bind Abbr) u0))) +H14 d H13) in (let H17 \def (eq_ind_r C x0 (\lambda (c1: C).(tau0 g c1 u0 +x2)) H15 d H13) in (ty3_abbr g n c0 d u0 H16 x2 (H2 x2 H17)))))))) H11))) t2 +H9)))))))) H5)) (\lambda (H5: (ex3_3 C T T (\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).(tau0 g e u1 t0)))) (\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq T t2 (lift (S n) O +u1))))))).(ex3_3_ind C T T (\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).(tau0 g e u1 t0)))) (\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq T t2 (lift (S n) O u1))))) (ty3 g c0 (TLRef n) t2) +(\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda (H6: (getl n c0 +(CHead x0 (Bind Abst) x1))).(\lambda (_: (tau0 g x0 x1 x2)).(\lambda (H8: (eq +T t2 (lift (S n) O x1))).(let H9 \def (f_equal T T (\lambda (e: T).e) t2 +(lift (S n) O x1) H8) in (eq_ind_r T (lift (S n) O x1) (\lambda (t0: T).(ty3 +g c0 (TLRef n) t0)) (let H10 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda +(c1: C).(getl n c0 c1)) H0 (CHead x0 (Bind Abst) x1) (getl_mono c0 (CHead d +(Bind Abbr) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in (let H11 \def (eq_ind +C (CHead d (Bind Abbr) u0) (\lambda (ee: C).(match ee in C return (\lambda +(_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow +(match k in K return (\lambda (_: K).Prop) with [(Bind b) \Rightarrow (match +b in 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 (ty3 g c0 (TLRef n) (lift +(S n) O x1)) H11))) t2 H9)))))))) H5)) H4))))))))))))) (\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 in tau0 return (\lambda (c1: C).(\lambda (t0: T).(\lambda (t3: -T).(\lambda (_: (tau0 ? c1 t0 t3)).((eq C c1 c0) \to ((eq T t0 (TLRef n)) \to -((eq T t3 t2) \to (ty3 g c0 (TLRef n) t2)))))))) with [(tau0_sort c1 n0) -\Rightarrow (\lambda (H4: (eq C c1 c0)).(\lambda (H5: (eq T (TSort n0) (TLRef -n))).(\lambda (H6: (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 (H7: (eq T (TSort n0) (TLRef n))).(let H8 \def -(eq_ind T (TSort n0) (\lambda (e: T).(match e in T return (\lambda (_: -T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | -(THead _ _ _) \Rightarrow False])) I (TLRef n) H7) in (False_ind ((eq T -(TSort (next g n0)) t2) \to (ty3 g c0 (TLRef n) t2)) H8))) c1 (sym_eq C c1 c0 -H4) H5 H6)))) | (tau0_abbr c1 d0 v i H4 w H5) \Rightarrow (\lambda (H6: (eq C -c1 c0)).(\lambda (H7: (eq T (TLRef i) (TLRef n))).(\lambda (H8: (eq T (lift -(S i) O w) t2)).(eq_ind C c0 (\lambda (c2: C).((eq T (TLRef i) (TLRef n)) \to -((eq T (lift (S i) O w) t2) \to ((getl i c2 (CHead d0 (Bind Abbr) v)) \to -((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H9: (eq T (TLRef -i) (TLRef n))).(let H10 \def (f_equal T nat (\lambda (e: T).(match e in T -return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | (TLRef n0) -\Rightarrow n0 | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) H9) 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 (H11: (eq T (lift (S n) O w) t2)).(eq_ind T (lift (S n) O w) -(\lambda (t0: T).((getl n c0 (CHead d0 (Bind Abbr) v)) \to ((tau0 g d0 v w) -\to (ty3 g c0 (TLRef n) t0)))) (\lambda (H12: (getl n c0 (CHead d0 (Bind -Abbr) v))).(\lambda (_: (tau0 g d0 v w)).(let H14 \def (eq_ind C (CHead d -(Bind Abst) u0) (\lambda (c2: C).(getl n c0 c2)) H0 (CHead d0 (Bind Abbr) v) -(getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind Abbr) v) H12)) in -(let H15 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (ee: C).(match ee -in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow False | (CHead -_ k _) \Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind b) -\Rightarrow (match b in B return (\lambda (_: B).Prop) with [Abbr \Rightarrow -False | Abst \Rightarrow True | Void \Rightarrow False]) | (Flat _) -\Rightarrow False])])) I (CHead d0 (Bind Abbr) v) (getl_mono c0 (CHead d -(Bind Abst) u0) n H0 (CHead d0 (Bind Abbr) v) H12)) in (False_ind (ty3 g c0 -(TLRef n) (lift (S n) O w)) H15))))) t2 H11)) i (sym_eq nat i n H10)))) c1 -(sym_eq C c1 c0 H6) H7 H8 H4 H5)))) | (tau0_abst c1 d0 v i H4 w H5) -\Rightarrow (\lambda (H6: (eq C c1 c0)).(\lambda (H7: (eq T (TLRef i) (TLRef -n))).(\lambda (H8: (eq T (lift (S i) O v) t2)).(eq_ind C c0 (\lambda (c2: -C).((eq T (TLRef i) (TLRef n)) \to ((eq T (lift (S i) O v) t2) \to ((getl i -c2 (CHead d0 (Bind Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) -t2)))))) (\lambda (H9: (eq T (TLRef i) (TLRef n))).(let H10 \def (f_equal T -nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with [(TSort _) -\Rightarrow i | (TLRef n0) \Rightarrow n0 | (THead _ _ _) \Rightarrow i])) -(TLRef i) (TLRef n) H9) 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 (H11: (eq T (lift (S n) O v) -t2)).(eq_ind T (lift (S n) O v) (\lambda (t0: T).((getl n c0 (CHead d0 (Bind -Abst) v)) \to ((tau0 g d0 v w) \to (ty3 g c0 (TLRef n) t0)))) (\lambda (H12: -(getl n c0 (CHead d0 (Bind Abst) v))).(\lambda (H13: (tau0 g d0 v w)).(let -H14 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c2: C).(getl n c0 c2)) -H0 (CHead d0 (Bind Abst) v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 -(CHead d0 (Bind Abst) v) H12)) in (let H15 \def (f_equal C C (\lambda (e: -C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d | -(CHead c2 _ _) \Rightarrow c2])) (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) -H12)) in ((let H16 \def (f_equal C T (\lambda (e: C).(match e in C return -(\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t0) -\Rightarrow t0])) (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) H12)) in -(\lambda (H17: (eq C d d0)).(let H18 \def (eq_ind_r T v (\lambda (t0: -T).(getl n c0 (CHead d0 (Bind Abst) t0))) H14 u0 H16) in (let H19 \def -(eq_ind_r T v (\lambda (t0: T).(tau0 g d0 t0 w)) H13 u0 H16) in (eq_ind T u0 -(\lambda (t0: T).(ty3 g c0 (TLRef n) (lift (S n) O t0))) (let H20 \def -(eq_ind_r C d0 (\lambda (c2: C).(getl n c0 (CHead c2 (Bind Abst) u0))) H18 d -H17) in (let H21 \def (eq_ind_r C d0 (\lambda (c2: C).(tau0 g c2 u0 w)) H19 d -H17) in (ty3_abst g n c0 d u0 H20 t H1))) v H16))))) H15))))) t2 H11)) i -(sym_eq nat i n H10)))) c1 (sym_eq C c1 c0 H6) H7 H8 H4 H5)))) | (tau0_bind b -c1 v t0 t3 H4) \Rightarrow (\lambda (H5: (eq C c1 c0)).(\lambda (H6: (eq T -(THead (Bind b) v t0) (TLRef n))).(\lambda (H7: (eq T (THead (Bind b) v t3) -t2)).(eq_ind C c0 (\lambda (c2: C).((eq T (THead (Bind b) v t0) (TLRef n)) -\to ((eq T (THead (Bind b) v t3) t2) \to ((tau0 g (CHead c2 (Bind b) v) t0 -t3) \to (ty3 g c0 (TLRef n) t2))))) (\lambda (H8: (eq T (THead (Bind b) v t0) -(TLRef n))).(let H9 \def (eq_ind T (THead (Bind b) v t0) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TLRef n) H8) in (False_ind ((eq T (THead (Bind b) v t3) t2) \to ((tau0 g -(CHead c0 (Bind b) v) t0 t3) \to (ty3 g c0 (TLRef n) t2))) H9))) c1 (sym_eq C -c1 c0 H5) H6 H7 H4)))) | (tau0_appl c1 v t0 t3 H4) \Rightarrow (\lambda (H5: -(eq C c1 c0)).(\lambda (H6: (eq T (THead (Flat Appl) v t0) (TLRef -n))).(\lambda (H7: (eq T (THead (Flat Appl) v t3) t2)).(eq_ind C c0 (\lambda -(c2: C).((eq T (THead (Flat Appl) v t0) (TLRef n)) \to ((eq T (THead (Flat -Appl) v t3) t2) \to ((tau0 g c2 t0 t3) \to (ty3 g c0 (TLRef n) t2))))) -(\lambda (H8: (eq T (THead (Flat Appl) v t0) (TLRef n))).(let H9 \def (eq_ind -T (THead (Flat Appl) v t0) (\lambda (e: T).(match e in T 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 Appl) v t3) t2) \to ((tau0 g c0 t0 t3) \to (ty3 g c0 (TLRef n) t2))) -H9))) c1 (sym_eq C c1 c0 H5) H6 H7 H4)))) | (tau0_cast c1 v1 v2 H4 t0 t3 H5) -\Rightarrow (\lambda (H6: (eq C c1 c0)).(\lambda (H7: (eq T (THead (Flat -Cast) v1 t0) (TLRef n))).(\lambda (H8: (eq T (THead (Flat Cast) v2 t3) -t2)).(eq_ind C c0 (\lambda (c2: C).((eq T (THead (Flat Cast) v1 t0) (TLRef -n)) \to ((eq T (THead (Flat Cast) v2 t3) t2) \to ((tau0 g c2 v1 v2) \to -((tau0 g c2 t0 t3) \to (ty3 g c0 (TLRef n) t2)))))) (\lambda (H9: (eq T -(THead (Flat Cast) v1 t0) (TLRef n))).(let H10 \def (eq_ind T (THead (Flat -Cast) v1 t0) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow True])) I (TLRef n) H9) in (False_ind ((eq T (THead (Flat Cast) -v2 t3) t2) \to ((tau0 g c0 v1 v2) \to ((tau0 g c0 t0 t3) \to (ty3 g c0 (TLRef -n) t2)))) H10))) c1 (sym_eq C c1 c0 H6) H7 H8 H4 H5))))]) 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 (t4: T).((tau0 g (CHead c0 (Bind b) -u0) t2 t4) \to (ty3 g (CHead c0 (Bind b) u0) t2 t4))))).(\lambda (t0: -T).(\lambda (H4: (tau0 g c0 (THead (Bind b) u0 t2) t0)).(let H5 \def (match -H4 in tau0 return (\lambda (c1: C).(\lambda (t4: T).(\lambda (t5: T).(\lambda -(_: (tau0 ? c1 t4 t5)).((eq C c1 c0) \to ((eq T t4 (THead (Bind b) u0 t2)) -\to ((eq T t5 t0) \to (ty3 g c0 (THead (Bind b) u0 t2) t0)))))))) with -[(tau0_sort c1 n) \Rightarrow (\lambda (H5: (eq C c1 c0)).(\lambda (H6: (eq T -(TSort n) (THead (Bind b) u0 t2))).(\lambda (H7: (eq T (TSort (next g n)) -t0)).(eq_ind C c0 (\lambda (_: C).((eq T (TSort n) (THead (Bind b) u0 t2)) -\to ((eq T (TSort (next g n)) t0) \to (ty3 g c0 (THead (Bind b) u0 t2) t0)))) -(\lambda (H8: (eq T (TSort n) (THead (Bind b) u0 t2))).(let H9 \def (eq_ind T -(TSort n) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with -[(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) -\Rightarrow False])) I (THead (Bind b) u0 t2) H8) in (False_ind ((eq T (TSort -(next g n)) t0) \to (ty3 g c0 (THead (Bind b) u0 t2) t0)) H9))) c1 (sym_eq C -c1 c0 H5) H6 H7)))) | (tau0_abbr c1 d v i H5 w H6) \Rightarrow (\lambda (H7: -(eq C c1 c0)).(\lambda (H8: (eq T (TLRef i) (THead (Bind b) u0 t2))).(\lambda -(H9: (eq T (lift (S i) O w) t0)).(eq_ind C c0 (\lambda (c2: C).((eq T (TLRef -i) (THead (Bind b) u0 t2)) \to ((eq T (lift (S i) O w) t0) \to ((getl i c2 -(CHead d (Bind Abbr) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Bind b) u0 -t2) t0)))))) (\lambda (H10: (eq T (TLRef i) (THead (Bind b) u0 t2))).(let H11 -\def (eq_ind T (TLRef i) (\lambda (e: T).(match e in T return (\lambda (_: -T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (THead (Bind b) u0 t2) H10) in -(False_ind ((eq T (lift (S i) O w) t0) \to ((getl i c0 (CHead d (Bind Abbr) -v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Bind b) u0 t2) t0)))) H11))) c1 -(sym_eq C c1 c0 H7) H8 H9 H5 H6)))) | (tau0_abst c1 d v i H5 w H6) -\Rightarrow (\lambda (H7: (eq C c1 c0)).(\lambda (H8: (eq T (TLRef i) (THead -(Bind b) u0 t2))).(\lambda (H9: (eq T (lift (S i) O v) t0)).(eq_ind C c0 -(\lambda (c2: C).((eq T (TLRef i) (THead (Bind b) u0 t2)) \to ((eq T (lift (S -i) O v) t0) \to ((getl i c2 (CHead d (Bind Abst) v)) \to ((tau0 g d v w) \to -(ty3 g c0 (THead (Bind b) u0 t2) t0)))))) (\lambda (H10: (eq T (TLRef i) -(THead (Bind b) u0 t2))).(let H11 \def (eq_ind T (TLRef i) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I -(THead (Bind b) u0 t2) H10) in (False_ind ((eq T (lift (S i) O v) t0) \to -((getl i c0 (CHead d (Bind Abst) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead -(Bind b) u0 t2) t0)))) H11))) c1 (sym_eq C c1 c0 H7) H8 H9 H5 H6)))) | -(tau0_bind b0 c1 v t4 t5 H5) \Rightarrow (\lambda (H6: (eq C c1 c0)).(\lambda -(H7: (eq T (THead (Bind b0) v t4) (THead (Bind b) u0 t2))).(\lambda (H8: (eq -T (THead (Bind b0) v t5) t0)).(eq_ind C c0 (\lambda (c2: C).((eq T (THead -(Bind b0) v t4) (THead (Bind b) u0 t2)) \to ((eq T (THead (Bind b0) v t5) t0) -\to ((tau0 g (CHead c2 (Bind b0) v) t4 t5) \to (ty3 g c0 (THead (Bind b) u0 -t2) t0))))) (\lambda (H9: (eq T (THead (Bind b0) v t4) (THead (Bind b) u0 -t2))).(let H10 \def (f_equal T T (\lambda (e: T).(match e in T return -(\lambda (_: T).T) with [(TSort _) \Rightarrow t4 | (TLRef _) \Rightarrow t4 -| (THead _ _ t6) \Rightarrow t6])) (THead (Bind b0) v t4) (THead (Bind b) u0 -t2) H9) in ((let H11 \def (f_equal T T (\lambda (e: T).(match e in T return -(\lambda (_: T).T) with [(TSort _) \Rightarrow v | (TLRef _) \Rightarrow v | -(THead _ t6 _) \Rightarrow t6])) (THead (Bind b0) v t4) (THead (Bind b) u0 -t2) H9) in ((let H12 \def (f_equal T B (\lambda (e: T).(match e in T return -(\lambda (_: T).B) with [(TSort _) \Rightarrow b0 | (TLRef _) \Rightarrow b0 -| (THead k _ _) \Rightarrow (match k in K return (\lambda (_: K).B) with -[(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow b0])])) (THead (Bind b0) v -t4) (THead (Bind b) u0 t2) H9) 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) t0) \to ((tau0 g (CHead -c0 (Bind b1) v) t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t0)))))) (\lambda -(H13: (eq T v u0)).(eq_ind T u0 (\lambda (t6: T).((eq T t4 t2) \to ((eq T -(THead (Bind b) t6 t5) t0) \to ((tau0 g (CHead c0 (Bind b) t6) t4 t5) \to -(ty3 g c0 (THead (Bind b) u0 t2) t0))))) (\lambda (H14: (eq T t4 t2)).(eq_ind -T t2 (\lambda (t6: T).((eq T (THead (Bind b) u0 t5) t0) \to ((tau0 g (CHead -c0 (Bind b) u0) t6 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t0)))) (\lambda -(H15: (eq T (THead (Bind b) u0 t5) t0)).(eq_ind T (THead (Bind b) u0 t5) -(\lambda (t6: T).((tau0 g (CHead c0 (Bind b) u0) t2 t5) \to (ty3 g c0 (THead -(Bind b) u0 t2) t6))) (\lambda (H16: (tau0 g (CHead c0 (Bind b) u0) t2 -t5)).(ty3_bind g c0 u0 t H0 b t2 t5 (H3 t5 H16))) t0 H15)) t4 (sym_eq T t4 t2 -H14))) v (sym_eq T v u0 H13))) b0 (sym_eq B b0 b H12))) H11)) H10))) c1 -(sym_eq C c1 c0 H6) H7 H8 H5)))) | (tau0_appl c1 v t4 t5 H5) \Rightarrow -(\lambda (H6: (eq C c1 c0)).(\lambda (H7: (eq T (THead (Flat Appl) v t4) -(THead (Bind b) u0 t2))).(\lambda (H8: (eq T (THead (Flat Appl) v t5) -t0)).(eq_ind C c0 (\lambda (c2: C).((eq T (THead (Flat Appl) v t4) (THead -(Bind b) u0 t2)) \to ((eq T (THead (Flat Appl) v t5) t0) \to ((tau0 g c2 t4 -t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t0))))) (\lambda (H9: (eq T (THead -(Flat Appl) v t4) (THead (Bind b) u0 t2))).(let H10 \def (eq_ind T (THead -(Flat Appl) v t4) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) -with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ -_) \Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind _) -\Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind b) u0 t2) -H9) in (False_ind ((eq T (THead (Flat Appl) v t5) t0) \to ((tau0 g c0 t4 t5) -\to (ty3 g c0 (THead (Bind b) u0 t2) t0))) H10))) c1 (sym_eq C c1 c0 H6) H7 -H8 H5)))) | (tau0_cast c1 v1 v2 H5 t4 t5 H6) \Rightarrow (\lambda (H7: (eq C -c1 c0)).(\lambda (H8: (eq T (THead (Flat Cast) v1 t4) (THead (Bind b) u0 -t2))).(\lambda (H9: (eq T (THead (Flat Cast) v2 t5) t0)).(eq_ind C c0 -(\lambda (c2: C).((eq T (THead (Flat Cast) v1 t4) (THead (Bind b) u0 t2)) \to -((eq T (THead (Flat Cast) v2 t5) t0) \to ((tau0 g c2 v1 v2) \to ((tau0 g c2 -t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) t0)))))) (\lambda (H10: (eq T -(THead (Flat Cast) v1 t4) (THead (Bind b) u0 t2))).(let H11 \def (eq_ind T -(THead (Flat Cast) v1 t4) (\lambda (e: T).(match e in T return (\lambda (_: -T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | -(THead k _ _) \Rightarrow (match k in K return (\lambda (_: K).Prop) with -[(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])])) I (THead (Bind -b) u0 t2) H10) in (False_ind ((eq T (THead (Flat Cast) v2 t5) t0) \to ((tau0 -g c0 v1 v2) \to ((tau0 g c0 t4 t5) \to (ty3 g c0 (THead (Bind b) u0 t2) -t0)))) H11))) c1 (sym_eq C c1 c0 H7) H8 H9 H5 H6))))]) in (H5 (refl_equal C -c0) (refl_equal T (THead (Bind b) u0 t2)) (refl_equal T t0))))))))))))))) -(\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 in tau0 return (\lambda (c1: -C).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (tau0 ? c1 t0 t3)).((eq C -c1 c0) \to ((eq T t0 (THead (Flat Appl) w v)) \to ((eq T t3 t2) \to (ty3 g c0 -(THead (Flat Appl) w v) t2)))))))) with [(tau0_sort c1 n) \Rightarrow -(\lambda (H5: (eq C c1 c0)).(\lambda (H6: (eq T (TSort n) (THead (Flat Appl) -w v))).(\lambda (H7: (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 (H8: (eq T (TSort -n) (THead (Flat Appl) w v))).(let H9 \def (eq_ind T (TSort n) (\lambda (e: -T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I -(THead (Flat Appl) w v) H8) in (False_ind ((eq T (TSort (next g n)) t2) \to -(ty3 g c0 (THead (Flat Appl) w v) t2)) H9))) c1 (sym_eq C c1 c0 H5) H6 H7)))) -| (tau0_abbr c1 d v0 i H5 w0 H6) \Rightarrow (\lambda (H7: (eq C c1 -c0)).(\lambda (H8: (eq T (TLRef i) (THead (Flat Appl) w v))).(\lambda (H9: -(eq T (lift (S i) O w0) t2)).(eq_ind C c0 (\lambda (c2: C).((eq T (TLRef i) -(THead (Flat Appl) w v)) \to ((eq T (lift (S i) O w0) t2) \to ((getl i c2 -(CHead d (Bind Abbr) v0)) \to ((tau0 g d v0 w0) \to (ty3 g c0 (THead (Flat -Appl) w v) t2)))))) (\lambda (H10: (eq T (TLRef i) (THead (Flat Appl) w -v))).(let H11 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Appl) w -v) H10) 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)))) H11))) c1 (sym_eq C c1 c0 H7) H8 H9 H5 H6)))) | (tau0_abst c1 d v0 i -H5 w0 H6) \Rightarrow (\lambda (H7: (eq C c1 c0)).(\lambda (H8: (eq T (TLRef -i) (THead (Flat Appl) w v))).(\lambda (H9: (eq T (lift (S i) O v0) -t2)).(eq_ind C c0 (\lambda (c2: C).((eq T (TLRef i) (THead (Flat Appl) w v)) -\to ((eq T (lift (S i) O v0) t2) \to ((getl i c2 (CHead d (Bind Abst) v0)) -\to ((tau0 g d v0 w0) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))))) (\lambda -(H10: (eq T (TLRef i) (THead (Flat Appl) w v))).(let H11 \def (eq_ind T -(TLRef i) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with -[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) -\Rightarrow False])) I (THead (Flat Appl) w v) H10) 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)))) H11))) c1 (sym_eq C c1 -c0 H7) H8 H9 H5 H6)))) | (tau0_bind b c1 v0 t0 t3 H5) \Rightarrow (\lambda -(H6: (eq C c1 c0)).(\lambda (H7: (eq T (THead (Bind b) v0 t0) (THead (Flat -Appl) w v))).(\lambda (H8: (eq T (THead (Bind b) v0 t3) t2)).(eq_ind C c0 -(\lambda (c2: C).((eq T (THead (Bind b) v0 t0) (THead (Flat Appl) w v)) \to -((eq T (THead (Bind b) v0 t3) t2) \to ((tau0 g (CHead c2 (Bind b) v0) t0 t3) -\to (ty3 g c0 (THead (Flat Appl) w v) t2))))) (\lambda (H9: (eq T (THead -(Bind b) v0 t0) (THead (Flat Appl) w v))).(let H10 \def (eq_ind T (THead -(Bind b) v0 t0) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) -with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ -_) \Rightarrow (match k in K return (\lambda (_: K).Prop) with [(Bind _) -\Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat Appl) w v) -H9) in (False_ind ((eq T (THead (Bind b) v0 t3) t2) \to ((tau0 g (CHead c0 -(Bind b) v0) t0 t3) \to (ty3 g c0 (THead (Flat Appl) w v) t2))) H10))) c1 -(sym_eq C c1 c0 H6) H7 H8 H5)))) | (tau0_appl c1 v0 t0 t3 H5) \Rightarrow -(\lambda (H6: (eq C c1 c0)).(\lambda (H7: (eq T (THead (Flat Appl) v0 t0) -(THead (Flat Appl) w v))).(\lambda (H8: (eq T (THead (Flat Appl) v0 t3) -t2)).(eq_ind C c0 (\lambda (c2: C).((eq T (THead (Flat Appl) v0 t0) (THead -(Flat Appl) w v)) \to ((eq T (THead (Flat Appl) v0 t3) t2) \to ((tau0 g c2 t0 -t3) \to (ty3 g c0 (THead (Flat Appl) w v) t2))))) (\lambda (H9: (eq T (THead -(Flat Appl) v0 t0) (THead (Flat Appl) w v))).(let H10 \def (f_equal T T -(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) -\Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t4) \Rightarrow t4])) -(THead (Flat Appl) v0 t0) (THead (Flat Appl) w v) H9) in ((let H11 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | (THead _ t4 _) -\Rightarrow t4])) (THead (Flat Appl) v0 t0) (THead (Flat Appl) w v) H9) in -(eq_ind T w (\lambda (t4: T).((eq T t0 v) \to ((eq T (THead (Flat Appl) t4 -t3) t2) \to ((tau0 g c0 t0 t3) \to (ty3 g c0 (THead (Flat Appl) w v) t2))))) -(\lambda (H12: (eq T t0 v)).(eq_ind T v (\lambda (t4: T).((eq T (THead (Flat -Appl) w t3) t2) \to ((tau0 g c0 t4 t3) \to (ty3 g c0 (THead (Flat Appl) w v) -t2)))) (\lambda (H13: (eq T (THead (Flat Appl) w t3) t2)).(eq_ind T (THead -(Flat Appl) w t3) (\lambda (t4: T).((tau0 g c0 v t3) \to (ty3 g c0 (THead -(Flat Appl) w v) t4))) (\lambda (H14: (tau0 g c0 v t3)).(let H_y \def (H3 t3 -H14) in (let H15 \def (ty3_unique g c0 v t3 H_y (THead (Bind Abst) u0 t) H2) -in (ex_ind T (\lambda (t4: T).(ty3 g c0 t3 t4)) (ty3 g c0 (THead (Flat Appl) -w v) (THead (Flat Appl) w t3)) (\lambda (x: T).(\lambda (H16: (ty3 g c0 t3 -x)).(ex_ind T (\lambda (t4: T).(ty3 g c0 u0 t4)) (ty3 g c0 (THead (Flat Appl) -w v) (THead (Flat Appl) w t3)) (\lambda (x0: T).(\lambda (_: (ty3 g c0 u0 -x0)).(ex_ind T (\lambda (t4: T).(ty3 g c0 (THead (Bind Abst) u0 t) t4)) (ty3 -g c0 (THead (Flat Appl) w v) (THead (Flat Appl) w t3)) (\lambda (x1: -T).(\lambda (H18: (ty3 g c0 (THead (Bind Abst) u0 t) x1)).(ex3_2_ind T T -(\lambda (t4: T).(\lambda (_: T).(pc3 c0 (THead (Bind Abst) u0 t4) x1))) -(\lambda (_: T).(\lambda (t5: T).(ty3 g c0 u0 t5))) (\lambda (t4: T).(\lambda -(_: T).(ty3 g (CHead c0 (Bind Abst) u0) t t4))) (ty3 g c0 (THead (Flat Appl) -w v) (THead (Flat Appl) w t3)) (\lambda (x2: T).(\lambda (x3: T).(\lambda (_: -(pc3 c0 (THead (Bind Abst) u0 x2) x1)).(\lambda (H20: (ty3 g c0 u0 -x3)).(\lambda (H21: (ty3 g (CHead c0 (Bind Abst) u0) t x2)).(ty3_conv g c0 -(THead (Flat Appl) w t3) (THead (Flat Appl) w (THead (Bind Abst) u0 x2)) -(ty3_appl g c0 w u0 H0 t3 x2 (ty3_sconv g c0 t3 x H16 (THead (Bind Abst) u0 -t) (THead (Bind Abst) u0 x2) (ty3_bind g c0 u0 x3 H20 Abst t x2 H21) H15)) -(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_thin_dx c0 (THead (Bind Abst) u0 t) t3 -(ty3_unique g c0 v (THead (Bind Abst) u0 t) H2 t3 H_y) w Appl))))))) -(ty3_gen_bind g Abst c0 u0 t x1 H18)))) (ty3_correct g c0 v (THead (Bind -Abst) u0 t) H2)))) (ty3_correct g c0 w u0 H0)))) (ty3_correct g c0 v t3 -H_y))))) t2 H13)) t0 (sym_eq T t0 v H12))) v0 (sym_eq T v0 w H11))) H10))) c1 -(sym_eq C c1 c0 H6) H7 H8 H5)))) | (tau0_cast c1 v1 v2 H5 t0 t3 H6) -\Rightarrow (\lambda (H7: (eq C c1 c0)).(\lambda (H8: (eq T (THead (Flat -Cast) v1 t0) (THead (Flat Appl) w v))).(\lambda (H9: (eq T (THead (Flat Cast) -v2 t3) t2)).(eq_ind C c0 (\lambda (c2: C).((eq T (THead (Flat Cast) v1 t0) -(THead (Flat Appl) w v)) \to ((eq T (THead (Flat Cast) v2 t3) t2) \to ((tau0 -g c2 v1 v2) \to ((tau0 g c2 t0 t3) \to (ty3 g c0 (THead (Flat Appl) w v) -t2)))))) (\lambda (H10: (eq T (THead (Flat Cast) v1 t0) (THead (Flat Appl) w -v))).(let H11 \def (eq_ind T (THead (Flat Cast) v1 t0) (\lambda (e: T).(match -e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | -(TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k in K return -(\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat f) \Rightarrow -(match f in F return (\lambda (_: F).Prop) with [Appl \Rightarrow False | -Cast \Rightarrow True])])])) I (THead (Flat Appl) w v) H10) in (False_ind -((eq T (THead (Flat Cast) v2 t3) t2) \to ((tau0 g c0 v1 v2) \to ((tau0 g c0 -t0 t3) \to (ty3 g c0 (THead (Flat Appl) w v) t2)))) H11))) c1 (sym_eq C c1 c0 -H7) H8 H9 H5 H6))))]) 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 -(t4: T).((tau0 g c0 t2 t4) \to (ty3 g c0 t2 t4))))).(\lambda (t0: T).(\lambda -(_: (ty3 g c0 t3 t0)).(\lambda (H3: ((\forall (t4: T).((tau0 g c0 t3 t4) \to -(ty3 g c0 t3 t4))))).(\lambda (t4: T).(\lambda (H4: (tau0 g c0 (THead (Flat -Cast) t3 t2) t4)).(let H5 \def (match H4 in tau0 return (\lambda (c1: -C).(\lambda (t: T).(\lambda (t5: T).(\lambda (_: (tau0 ? c1 t t5)).((eq C c1 -c0) \to ((eq T t (THead (Flat Cast) t3 t2)) \to ((eq T t5 t4) \to (ty3 g c0 -(THead (Flat Cast) t3 t2) t4)))))))) with [(tau0_sort c1 n) \Rightarrow -(\lambda (H5: (eq C c1 c0)).(\lambda (H6: (eq T (TSort n) (THead (Flat Cast) -t3 t2))).(\lambda (H7: (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 (H8: (eq T -(TSort n) (THead (Flat Cast) t3 t2))).(let H9 \def (eq_ind T (TSort n) -(\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) -\Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -False])) I (THead (Flat Cast) t3 t2) H8) in (False_ind ((eq T (TSort (next g -n)) t4) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)) H9))) c1 (sym_eq C c1 c0 -H5) H6 H7)))) | (tau0_abbr c1 d v i H5 w H6) \Rightarrow (\lambda (H7: (eq C -c1 c0)).(\lambda (H8: (eq T (TLRef i) (THead (Flat Cast) t3 t2))).(\lambda -(H9: (eq T (lift (S i) O w) t4)).(eq_ind C c0 (\lambda (c2: C).((eq T (TLRef -i) (THead (Flat Cast) t3 t2)) \to ((eq T (lift (S i) O w) t4) \to ((getl i c2 -(CHead d (Bind Abbr) v)) \to ((tau0 g d v w) \to (ty3 g c0 (THead (Flat Cast) -t3 t2) t4)))))) (\lambda (H10: (eq T (TLRef i) (THead (Flat Cast) t3 -t2))).(let H11 \def (eq_ind T (TLRef i) (\lambda (e: T).(match e in T return -(\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) -\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead (Flat Cast) t3 -t2) H10) 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)))) H11))) c1 (sym_eq C c1 c0 H7) H8 H9 H5 H6)))) | (tau0_abst c1 d v i H5 -w H6) \Rightarrow (\lambda (H7: (eq C c1 c0)).(\lambda (H8: (eq T (TLRef i) -(THead (Flat Cast) t3 t2))).(\lambda (H9: (eq T (lift (S i) O v) t4)).(eq_ind -C c0 (\lambda (c2: C).((eq T (TLRef i) (THead (Flat Cast) t3 t2)) \to ((eq T -(lift (S i) O v) t4) \to ((getl i c2 (CHead d (Bind Abst) v)) \to ((tau0 g d -v w) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))))) (\lambda (H10: (eq T -(TLRef i) (THead (Flat Cast) t3 t2))).(let H11 \def (eq_ind T (TLRef i) -(\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow -False])) I (THead (Flat Cast) t3 t2) H10) 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)))) H11))) c1 (sym_eq C c1 c0 H7) H8 H9 H5 -H6)))) | (tau0_bind b c1 v t5 t6 H5) \Rightarrow (\lambda (H6: (eq C c1 -c0)).(\lambda (H7: (eq T (THead (Bind b) v t5) (THead (Flat Cast) t3 -t2))).(\lambda (H8: (eq T (THead (Bind b) v t6) t4)).(eq_ind C c0 (\lambda -(c2: C).((eq T (THead (Bind b) v t5) (THead (Flat Cast) t3 t2)) \to ((eq T -(THead (Bind b) v t6) t4) \to ((tau0 g (CHead c2 (Bind b) v) t5 t6) \to (ty3 -g c0 (THead (Flat Cast) t3 t2) t4))))) (\lambda (H9: (eq T (THead (Bind b) v -t5) (THead (Flat Cast) t3 t2))).(let H10 \def (eq_ind T (THead (Bind b) v t5) -(\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | -(Flat _) \Rightarrow False])])) I (THead (Flat Cast) t3 t2) H9) in (False_ind -((eq T (THead (Bind b) v t6) t4) \to ((tau0 g (CHead c0 (Bind b) v) t5 t6) -\to (ty3 g c0 (THead (Flat Cast) t3 t2) t4))) H10))) c1 (sym_eq C c1 c0 H6) -H7 H8 H5)))) | (tau0_appl c1 v t5 t6 H5) \Rightarrow (\lambda (H6: (eq C c1 -c0)).(\lambda (H7: (eq T (THead (Flat Appl) v t5) (THead (Flat Cast) t3 -t2))).(\lambda (H8: (eq T (THead (Flat Appl) v t6) t4)).(eq_ind C c0 (\lambda -(c2: C).((eq T (THead (Flat Appl) v t5) (THead (Flat Cast) t3 t2)) \to ((eq T -(THead (Flat Appl) v t6) t4) \to ((tau0 g c2 t5 t6) \to (ty3 g c0 (THead -(Flat Cast) t3 t2) t4))))) (\lambda (H9: (eq T (THead (Flat Appl) v t5) -(THead (Flat Cast) t3 t2))).(let H10 \def (eq_ind T (THead (Flat Appl) v t5) -(\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow -(match k in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | -(Flat f) \Rightarrow (match f in 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 (Flat Appl) v t6) t4) \to ((tau0 g c0 t5 t6) -\to (ty3 g c0 (THead (Flat Cast) t3 t2) t4))) H10))) c1 (sym_eq C c1 c0 H6) -H7 H8 H5)))) | (tau0_cast c1 v1 v2 H5 t5 t6 H6) \Rightarrow (\lambda (H7: (eq -C c1 c0)).(\lambda (H8: (eq T (THead (Flat Cast) v1 t5) (THead (Flat Cast) t3 -t2))).(\lambda (H9: (eq T (THead (Flat Cast) v2 t6) t4)).(eq_ind C c0 -(\lambda (c2: C).((eq T (THead (Flat Cast) v1 t5) (THead (Flat Cast) t3 t2)) -\to ((eq T (THead (Flat Cast) v2 t6) t4) \to ((tau0 g c2 v1 v2) \to ((tau0 g -c2 t5 t6) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4)))))) (\lambda (H10: (eq -T (THead (Flat Cast) v1 t5) (THead (Flat Cast) t3 t2))).(let H11 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow t5 | (TLRef _) \Rightarrow t5 | (THead _ _ t) -\Rightarrow t])) (THead (Flat Cast) v1 t5) (THead (Flat Cast) t3 t2) H10) in -((let H12 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: -T).T) with [(TSort _) \Rightarrow v1 | (TLRef _) \Rightarrow v1 | (THead _ t -_) \Rightarrow t])) (THead (Flat Cast) v1 t5) (THead (Flat Cast) t3 t2) H10) -in (eq_ind T t3 (\lambda (t: T).((eq T t5 t2) \to ((eq T (THead (Flat Cast) -v2 t6) t4) \to ((tau0 g c0 t v2) \to ((tau0 g c0 t5 t6) \to (ty3 g c0 (THead -(Flat Cast) t3 t2) t4)))))) (\lambda (H13: (eq T t5 t2)).(eq_ind T t2 -(\lambda (t: T).((eq T (THead (Flat Cast) v2 t6) t4) \to ((tau0 g c0 t3 v2) -\to ((tau0 g c0 t t6) \to (ty3 g c0 (THead (Flat Cast) t3 t2) t4))))) -(\lambda (H14: (eq T (THead (Flat Cast) v2 t6) t4)).(eq_ind T (THead (Flat -Cast) v2 t6) (\lambda (t: T).((tau0 g c0 t3 v2) \to ((tau0 g c0 t2 t6) \to -(ty3 g c0 (THead (Flat Cast) t3 t2) t)))) (\lambda (H15: (tau0 g c0 t3 -v2)).(\lambda (H16: (tau0 g c0 t2 t6)).(let H_y \def (H1 t6 H16) in (let H_y0 -\def (H3 v2 H15) in (let H17 \def (ty3_unique g c0 t2 t6 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 t6)) (\lambda (x: T).(\lambda (H18: (ty3 g c0 v2 -x)).(ex_ind T (\lambda (t: T).(ty3 g c0 t6 t)) (ty3 g c0 (THead (Flat Cast) -t3 t2) (THead (Flat Cast) v2 t6)) (\lambda (x0: T).(\lambda (H19: (ty3 g c0 -t6 x0)).(ty3_conv g c0 (THead (Flat Cast) v2 t6) (THead (Flat Cast) x v2) -(ty3_cast g c0 t6 v2 (ty3_sconv g c0 t6 x0 H19 t3 v2 H_y0 H17) x H18) (THead -(Flat Cast) t3 t2) (THead (Flat Cast) v2 t3) (ty3_cast g c0 t2 t3 H0 v2 H_y0) -(pc3_thin_dx c0 t3 t6 (ty3_unique g c0 t2 t3 H0 t6 H_y) v2 Cast)))) -(ty3_correct g c0 t2 t6 H_y)))) (ty3_correct g c0 t3 v2 H_y0))))))) t4 H14)) -t5 (sym_eq T t5 t2 H13))) v1 (sym_eq T v1 t3 H12))) H11))) c1 (sym_eq C c1 c0 -H7) H8 H9 H5 H6))))]) in (H5 (refl_equal C c0) (refl_equal T (THead (Flat -Cast) t3 t2)) (refl_equal T t4))))))))))))) c u t1 H))))). +t2))))).(\lambda (t2: T).(\lambda (H3: (tau0 g c0 (TLRef n) t2)).(let H_x +\def (tau0_gen_lref g c0 t2 n H3) in (let H4 \def H_x in (or_ind (ex3_3 C T T +(\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).(tau0 g e u1 +t0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(eq T t2 (lift (S n) +O t0)))))) (ex3_3 C T T (\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).(tau0 g e u1 t0)))) (\lambda (_: C).(\lambda (u1: +T).(\lambda (_: T).(eq T t2 (lift (S n) O u1)))))) (ty3 g c0 (TLRef n) t2) +(\lambda (H5: (ex3_3 C T T (\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).(tau0 g e u1 t0)))) (\lambda (_: C).(\lambda (_: +T).(\lambda (t0: T).(eq T t2 (lift (S n) O t0))))))).(ex3_3_ind C T T +(\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).(tau0 g e u1 +t0)))) (\lambda (_: C).(\lambda (_: T).(\lambda (t0: T).(eq T t2 (lift (S n) +O t0))))) (ty3 g c0 (TLRef n) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda +(x2: T).(\lambda (H6: (getl n c0 (CHead x0 (Bind Abbr) x1))).(\lambda (_: +(tau0 g x0 x1 x2)).(\lambda (H8: (eq T t2 (lift (S n) O x2))).(let H9 \def +(f_equal T T (\lambda (e: T).e) t2 (lift (S n) O x2) H8) in (eq_ind_r T (lift +(S n) O x2) (\lambda (t0: T).(ty3 g c0 (TLRef n) t0)) (let H10 \def (eq_ind C +(CHead d (Bind Abst) u0) (\lambda (c1: C).(getl n c0 c1)) H0 (CHead x0 (Bind +Abbr) x1) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abbr) +x1) H6)) in (let H11 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (ee: +C).(match ee in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow +False | (CHead _ k _) \Rightarrow (match k in K return (\lambda (_: K).Prop) +with [(Bind b) \Rightarrow (match b in B return (\lambda (_: B).Prop) with +[Abbr \Rightarrow False | Abst \Rightarrow True | Void \Rightarrow False]) | +(Flat _) \Rightarrow False])])) I (CHead x0 (Bind Abbr) x1) (getl_mono c0 +(CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abbr) x1) H6)) in (False_ind +(ty3 g c0 (TLRef n) (lift (S n) O x2)) H11))) t2 H9)))))))) H5)) (\lambda +(H5: (ex3_3 C T T (\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).(tau0 g e u1 t0)))) (\lambda (_: C).(\lambda (u1: T).(\lambda (_: T).(eq T +t2 (lift (S n) O u1))))))).(ex3_3_ind C T T (\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).(tau0 g e u1 t0)))) (\lambda (_: +C).(\lambda (u1: T).(\lambda (_: T).(eq T t2 (lift (S n) O u1))))) (ty3 g c0 +(TLRef n) t2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (x2: T).(\lambda +(H6: (getl n c0 (CHead x0 (Bind Abst) x1))).(\lambda (H7: (tau0 g x0 x1 +x2)).(\lambda (H8: (eq T t2 (lift (S n) O x1))).(let H9 \def (f_equal T T +(\lambda (e: T).e) t2 (lift (S n) O x1) H8) in (eq_ind_r T (lift (S n) O x1) +(\lambda (t0: T).(ty3 g c0 (TLRef n) t0)) (let H10 \def (eq_ind C (CHead d +(Bind Abst) u0) (\lambda (c1: C).(getl n c0 c1)) H0 (CHead x0 (Bind Abst) x1) +(getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead x0 (Bind Abst) x1) H6)) in +(let H11 \def (f_equal C C (\lambda (e: C).(match e in C return (\lambda (_: +C).C) with [(CSort _) \Rightarrow d | (CHead c1 _ _) \Rightarrow c1])) (CHead +d (Bind 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 H12 \def (f_equal C T +(\lambda (e: C).(match e in C return (\lambda (_: C).T) with [(CSort _) +\Rightarrow u0 | (CHead _ _ t0) \Rightarrow t0])) (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 (H13: (eq C d x0)).(let H14 \def +(eq_ind_r T x1 (\lambda (t0: T).(getl n c0 (CHead x0 (Bind Abst) t0))) H10 u0 +H12) in (let H15 \def (eq_ind_r T x1 (\lambda (t0: T).(tau0 g x0 t0 x2)) H7 +u0 H12) in (eq_ind T u0 (\lambda (t0: T).(ty3 g c0 (TLRef n) (lift (S n) O +t0))) (let H16 \def (eq_ind_r C x0 (\lambda (c1: C).(getl n c0 (CHead c1 +(Bind Abst) u0))) H14 d H13) in (let H17 \def (eq_ind_r C x0 (\lambda (c1: +C).(tau0 g c1 u0 x2)) H15 d H13) in (ty3_abst g n c0 d u0 H16 t H1))) x1 +H12))))) H11))) t2 H9)))))))) H5)) H4))))))))))))) (\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 (t4: T).((tau0 g (CHead c0 (Bind b) u0) t2 t4) +\to (ty3 g (CHead c0 (Bind b) u0) t2 t4))))).(\lambda (t0: T).(\lambda (H4: +(tau0 g c0 (THead (Bind b) u0 t2) t0)).(let H_x \def (tau0_gen_bind g b c0 u0 +t2 t0 H4) in (let H5 \def H_x in (ex2_ind T (\lambda (t4: T).(tau0 g (CHead +c0 (Bind b) u0) t2 t4)) (\lambda (t4: T).(eq T t0 (THead (Bind b) u0 t4))) +(ty3 g c0 (THead (Bind b) u0 t2) t0) (\lambda (x: T).(\lambda (H6: (tau0 g +(CHead c0 (Bind b) u0) t2 x)).(\lambda (H7: (eq T t0 (THead (Bind b) u0 +x))).(let H8 \def (f_equal T T (\lambda (e: T).e) t0 (THead (Bind b) u0 x) +H7) in (eq_ind_r T (THead (Bind b) u0 x) (\lambda (t4: T).(ty3 g c0 (THead +(Bind b) u0 t2) t4)) (ty3_bind g c0 u0 t H0 b t2 x (H3 x H6)) t0 H8))))) +H5))))))))))))))) (\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 H_x \def (tau0_gen_appl g c0 w v t2 H4) in (let H5 +\def H_x in (ex2_ind T (\lambda (t3: T).(tau0 g c0 v t3)) (\lambda (t3: +T).(eq T t2 (THead (Flat Appl) w t3))) (ty3 g c0 (THead (Flat Appl) w v) t2) +(\lambda (x: T).(\lambda (H6: (tau0 g c0 v x)).(\lambda (H7: (eq T t2 (THead +(Flat Appl) w x))).(let H8 \def (f_equal T T (\lambda (e: T).e) t2 (THead +(Flat Appl) w x) H7) in (eq_ind_r T (THead (Flat Appl) w x) (\lambda (t0: +T).(ty3 g c0 (THead (Flat Appl) w v) t0)) (let H_y \def (H3 x H6) in (let H9 +\def (ty3_unique g c0 v x H_y (THead (Bind Abst) u0 t) H2) in (ex_ind T +(\lambda (t0: T).(ty3 g c0 x t0)) (ty3 g c0 (THead (Flat Appl) w v) (THead +(Flat Appl) w x)) (\lambda (x0: T).(\lambda (H10: (ty3 g c0 x x0)).(ex_ind T +(\lambda (t0: T).(ty3 g c0 u0 t0)) (ty3 g c0 (THead (Flat Appl) w v) (THead +(Flat Appl) w x)) (\lambda (x1: T).(\lambda (_: (ty3 g c0 u0 x1)).(ex_ind T +(\lambda (t0: T).(ty3 g c0 (THead (Bind Abst) u0 t) t0)) (ty3 g c0 (THead +(Flat Appl) w v) (THead (Flat Appl) w x)) (\lambda (x2: T).(\lambda (H12: +(ty3 g c0 (THead (Bind Abst) u0 t) x2)).(ex3_2_ind T T (\lambda (t3: +T).(\lambda (_: T).(pc3 c0 (THead (Bind Abst) u0 t3) x2))) (\lambda (_: +T).(\lambda (t0: T).(ty3 g c0 u0 t0))) (\lambda (t3: T).(\lambda (_: T).(ty3 +g (CHead c0 (Bind Abst) u0) t t3))) (ty3 g c0 (THead (Flat Appl) w v) (THead +(Flat Appl) w x)) (\lambda (x3: T).(\lambda (x4: T).(\lambda (_: (pc3 c0 +(THead (Bind Abst) u0 x3) x2)).(\lambda (H14: (ty3 g c0 u0 x4)).(\lambda +(H15: (ty3 g (CHead c0 (Bind Abst) u0) t x3)).(ty3_conv g c0 (THead (Flat +Appl) w x) (THead (Flat Appl) w (THead (Bind Abst) u0 x3)) (ty3_appl g c0 w +u0 H0 x x3 (ty3_sconv g c0 x x0 H10 (THead (Bind Abst) u0 t) (THead (Bind +Abst) u0 x3) (ty3_bind g c0 u0 x4 H14 Abst t x3 H15) H9)) (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_thin_dx c0 (THead (Bind Abst) u0 t) x (ty3_unique g c0 v (THead +(Bind Abst) u0 t) H2 x H_y) w Appl))))))) (ty3_gen_bind g Abst c0 u0 t x2 +H12)))) (ty3_correct g c0 v (THead (Bind Abst) u0 t) H2)))) (ty3_correct g c0 +w u0 H0)))) (ty3_correct g c0 v x H_y)))) t2 H8))))) H5)))))))))))))) +(\lambda (c0: C).(\lambda (t2: T).(\lambda (t3: T).(\lambda (H0: (ty3 g c0 t2 +t3)).(\lambda (H1: ((\forall (t4: T).((tau0 g c0 t2 t4) \to (ty3 g c0 t2 +t4))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t3 t0)).(\lambda (H3: +((\forall (t4: T).((tau0 g c0 t3 t4) \to (ty3 g c0 t3 t4))))).(\lambda (t4: +T).(\lambda (H4: (tau0 g c0 (THead (Flat Cast) t3 t2) t4)).(let H_x \def +(tau0_gen_cast g c0 t3 t2 t4 H4) in (let H5 \def H_x in (ex3_2_ind T T +(\lambda (v2: T).(\lambda (_: T).(tau0 g c0 t3 v2))) (\lambda (_: T).(\lambda +(t5: T).(tau0 g c0 t2 t5))) (\lambda (v2: T).(\lambda (t5: T).(eq T t4 (THead +(Flat Cast) v2 t5)))) (ty3 g c0 (THead (Flat Cast) t3 t2) t4) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H6: (tau0 g c0 t3 x0)).(\lambda (H7: (tau0 g c0 +t2 x1)).(\lambda (H8: (eq T t4 (THead (Flat Cast) x0 x1))).(let H9 \def +(f_equal T T (\lambda (e: T).e) t4 (THead (Flat Cast) x0 x1) H8) in (eq_ind_r +T (THead (Flat Cast) x0 x1) (\lambda (t: T).(ty3 g c0 (THead (Flat Cast) t3 +t2) t)) (let H_y \def (H1 x1 H7) in (let H_y0 \def (H3 x0 H6) in (let H10 +\def (ty3_unique g c0 t2 x1 H_y t3 H0) in (ex_ind T (\lambda (t: T).(ty3 g c0 +x0 t)) (ty3 g c0 (THead (Flat Cast) t3 t2) (THead (Flat Cast) x0 x1)) +(\lambda (x: T).(\lambda (H11: (ty3 g c0 x0 x)).(ex_ind T (\lambda (t: +T).(ty3 g c0 x1 t)) (ty3 g c0 (THead (Flat Cast) t3 t2) (THead (Flat Cast) x0 +x1)) (\lambda (x2: T).(\lambda (H12: (ty3 g c0 x1 x2)).(ty3_conv g c0 (THead +(Flat Cast) x0 x1) (THead (Flat Cast) x x0) (ty3_cast g c0 x1 x0 (ty3_sconv g +c0 x1 x2 H12 t3 x0 H_y0 H10) x H11) (THead (Flat Cast) t3 t2) (THead (Flat +Cast) x0 t3) (ty3_cast g c0 t2 t3 H0 x0 H_y0) (pc3_thin_dx c0 t3 x1 +(ty3_unique g c0 t2 t3 H0 x1 H_y) x0 Cast)))) (ty3_correct g c0 t2 x1 H_y)))) +(ty3_correct g c0 t3 x0 H_y0))))) t4 H9))))))) H5))))))))))))) c u t1 H))))).