From: Ferruccio Guidi Date: Tue, 5 Sep 2006 17:44:29 +0000 (+0000) Subject: new theorems X-Git-Tag: 0.4.95@7852~1077 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=01cd30e9b0e915304b3ffef48a0477c69ce7a959;p=helm.git new theorems --- diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/preamble.ma b/matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/preamble.ma index 0cbdc3acb..f1b0a886c 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/preamble.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/Base/ext/preamble.ma @@ -108,6 +108,33 @@ alias id "refl_equal" = "cic:/Coq/Init/Logic/eq.ind#xpointer(1/1/1)". alias id "S" = "cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1/2)". alias id "true" = "cic:/Coq/Init/Datatypes/bool.ind#xpointer(1/1/1)". alias id "True" = "cic:/Coq/Init/Logic/True.ind#xpointer(1/1)". +alias id "plus_lt_compat_r" = "cic:/Coq/Arith/Plus/plus_lt_compat_r.con". +alias id "plus_n_O" = "cic:/Coq/Init/Peano/plus_n_O.con". +alias id "plus_le_lt_compat" = "cic:/Coq/Arith/Plus/plus_le_lt_compat.con". +alias id "lt_wf_ind" = "cic:/Coq/Arith/Wf_nat/lt_wf_ind.con". +alias id "minus_Sn_m" = "cic:/Coq/Arith/Minus/minus_Sn_m.con". +alias id "and_ind" = "cic:/Coq/Init/Logic/and_ind.con". +alias id "le_lt_trans" = "cic:/Coq/Arith/Lt/le_lt_trans.con". +alias id "lt_le_trans" = "cic:/Coq/Arith/Lt/lt_le_trans.con". +alias id "le_lt_trans" = "cic:/Coq/Arith/Lt/le_lt_trans.con". +alias id "plus_n_O" = "cic:/Coq/Init/Peano/plus_n_O.con". +alias id "f_equal3" = "cic:/Coq/Init/Logic/f_equal3.con". +alias id "S_pred" = "cic:/Coq/Arith/Lt/S_pred.con". +alias id "lt_le_trans" = "cic:/Coq/Arith/Lt/lt_le_trans.con". +alias id "plus_lt_compat_r" = "cic:/Coq/Arith/Plus/plus_lt_compat_r.con". +alias id "le_plus_trans" = "cic:/Coq/Arith/Plus/le_plus_trans.con". +alias id "f_equal2" = "cic:/Coq/Init/Logic/f_equal2.con". +alias id "le_plus_trans" = "cic:/Coq/Arith/Plus/le_plus_trans.con". +alias id "f_equal2" = "cic:/Coq/Init/Logic/f_equal2.con". +alias id "plus_n_O" = "cic:/Coq/Init/Peano/plus_n_O.con". +alias id "plus_n_O" = "cic:/Coq/Init/Peano/plus_n_O.con". +alias id "lt_trans" = "cic:/Coq/Arith/Lt/lt_trans.con". +alias id "minus_Sn_m" = "cic:/Coq/Arith/Minus/minus_Sn_m.con". +alias id "ex_intro" = "cic:/Coq/Init/Logic/ex.ind#xpointer(1/1/1)". +alias id "lt_trans" = "cic:/Coq/Arith/Lt/lt_trans.con". +alias id "lt_n_Sn" = "cic:/Coq/Arith/Lt/lt_n_Sn.con". +alias id "lt_le_trans" = "cic:/Coq/Arith/Lt/lt_le_trans.con". +alias id "lt_wf_ind" = "cic:/Coq/Arith/Wf_nat/lt_wf_ind.con". theorem f_equal: \forall A,B:Type. \forall f:A \to B. \forall x,y:A. x = y \to f x = f y. diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/Base/theory.ma b/matita/contribs/LAMBDA-TYPES/Level-1/Base/theory.ma index 31ae9dd30..008ba2f22 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/Base/theory.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/Base/theory.ma @@ -28,3 +28,5 @@ include "blt/defs.ma". include "blt/props.ma". +include "ext/plist.ma". + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/G/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/G/defs.ma index c493641aa..bc601b309 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/G/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/G/defs.ma @@ -16,7 +16,7 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/G/defs". -include "../Base/theory.ma". +include "preamble.ma". record G : Set \def { next: (nat \to nat); diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/defs.ma index 5db781439..61a492535 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/T/defs.ma @@ -16,7 +16,7 @@ set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/T/defs". -include "../Base/theory.ma". +include "preamble.ma". inductive B: Set \def | Abbr: B diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/cnt/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/cnt/defs.ma new file mode 100644 index 000000000..a3c2e6606 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/cnt/defs.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/cnt/defs". + +include "T/defs.ma". + +inductive cnt: T \to Prop \def +| cnt_sort: \forall (n: nat).(cnt (TSort n)) +| cnt_head: \forall (t: T).((cnt t) \to (\forall (k: K).(\forall (v: T).(cnt +(THead k v t))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/cnt/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/cnt/props.ma new file mode 100644 index 000000000..685b59683 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/cnt/props.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/cnt/props". + +include "cnt/defs.ma". + +include "lift/defs.ma". + +theorem cnt_lift: + \forall (t: T).((cnt t) \to (\forall (i: nat).(\forall (d: nat).(cnt (lift i +d t))))) +\def + \lambda (t: T).(\lambda (H: (cnt t)).(cnt_ind (\lambda (t0: T).(\forall (i: +nat).(\forall (d: nat).(cnt (lift i d t0))))) (\lambda (n: nat).(\lambda (i: +nat).(\lambda (d: nat).(eq_ind_r T (TSort n) (\lambda (t0: T).(cnt t0)) +(cnt_sort n) (lift i d (TSort n)) (lift_sort n i d))))) (\lambda (t0: +T).(\lambda (_: (cnt t0)).(\lambda (H1: ((\forall (i: nat).(\forall (d: +nat).(cnt (lift i d t0)))))).(\lambda (k: K).(\lambda (v: T).(\lambda (i: +nat).(\lambda (d: nat).(eq_ind_r T (THead k (lift i d v) (lift i (s k d) t0)) +(\lambda (t1: T).(cnt t1)) (cnt_head (lift i (s k d) t0) (H1 i (s k d)) k +(lift i d v)) (lift i d (THead k v t0)) (lift_head k v t0 i d))))))))) t H)). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/defs.ma new file mode 100644 index 000000000..aedcf4a3a --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/defs.ma @@ -0,0 +1,31 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/drop/defs". + +include "C/defs.ma". + +include "lift/defs.ma". + +inductive drop: nat \to (nat \to (C \to (C \to Prop))) \def +| drop_refl: \forall (c: C).(drop O O c c) +| drop_drop: \forall (k: K).(\forall (h: nat).(\forall (c: C).(\forall (e: +C).((drop (r k h) O c e) \to (\forall (u: T).(drop (S h) O (CHead c k u) +e)))))) +| drop_skip: \forall (k: K).(\forall (h: nat).(\forall (d: nat).(\forall (c: +C).(\forall (e: C).((drop h (r k d) c e) \to (\forall (u: T).(drop h (S d) +(CHead c k (lift h (r k d) u)) (CHead e k u)))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd.ma new file mode 100644 index 000000000..33931e1e0 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd.ma @@ -0,0 +1,325 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd". + +include "drop/defs.ma". + +theorem drop_gen_sort: + \forall (n: nat).(\forall (h: nat).(\forall (d: nat).(\forall (x: C).((drop +h d (CSort n) x) \to (and3 (eq C x (CSort n)) (eq nat h O) (eq nat d O)))))) +\def + \lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (x: +C).(\lambda (H: (drop h d (CSort n) x)).(insert_eq C (CSort n) (\lambda (c: +C).(drop h d c x)) (and3 (eq C x (CSort n)) (eq nat h O) (eq nat d O)) +(\lambda (y: C).(\lambda (H0: (drop h d y x)).(drop_ind (\lambda (n0: +nat).(\lambda (n1: nat).(\lambda (c: C).(\lambda (c0: C).((eq C c (CSort n)) +\to (and3 (eq C c0 (CSort n)) (eq nat n0 O) (eq nat n1 O))))))) (\lambda (c: +C).(\lambda (H1: (eq C c (CSort n))).(let H2 \def (f_equal C C (\lambda (e: +C).e) c (CSort n) H1) in (eq_ind_r C (CSort n) (\lambda (c0: C).(and3 (eq C +c0 (CSort n)) (eq nat O O) (eq nat O O))) (and3_intro (eq C (CSort n) (CSort +n)) (eq nat O O) (eq nat O O) (refl_equal C (CSort n)) (refl_equal nat O) +(refl_equal nat O)) c H2)))) (\lambda (k: K).(\lambda (h0: nat).(\lambda (c: +C).(\lambda (e: C).(\lambda (_: (drop (r k h0) O c e)).(\lambda (_: (((eq C c +(CSort n)) \to (and3 (eq C e (CSort n)) (eq nat (r k h0) O) (eq nat O +O))))).(\lambda (u: T).(\lambda (H3: (eq C (CHead c k u) (CSort n))).(let H4 +\def (eq_ind C (CHead c k u) (\lambda (ee: C).(match ee in C return (\lambda +(_: C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow +True])) I (CSort n) H3) in (False_ind (and3 (eq C e (CSort n)) (eq nat (S h0) +O) (eq nat O O)) H4)))))))))) (\lambda (k: K).(\lambda (h0: nat).(\lambda +(d0: nat).(\lambda (c: C).(\lambda (e: C).(\lambda (_: (drop h0 (r k d0) c +e)).(\lambda (_: (((eq C c (CSort n)) \to (and3 (eq C e (CSort n)) (eq nat h0 +O) (eq nat (r k d0) O))))).(\lambda (u: T).(\lambda (H3: (eq C (CHead c k +(lift h0 (r k d0) u)) (CSort n))).(let H4 \def (eq_ind C (CHead c k (lift h0 +(r k d0) u)) (\lambda (ee: C).(match ee in C return (\lambda (_: C).Prop) +with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I +(CSort n) H3) in (False_ind (and3 (eq C (CHead e k u) (CSort n)) (eq nat h0 +O) (eq nat (S d0) O)) H4))))))))))) h d y x H0))) H))))). + +theorem drop_gen_refl: + \forall (x: C).(\forall (e: C).((drop O O x e) \to (eq C x e))) +\def + \lambda (x: C).(\lambda (e: C).(\lambda (H: (drop O O x e)).(insert_eq nat O +(\lambda (n: nat).(drop n O x e)) (eq C x e) (\lambda (y: nat).(\lambda (H0: +(drop y O x e)).(insert_eq nat O (\lambda (n: nat).(drop y n x e)) ((eq nat y +O) \to (eq C x e)) (\lambda (y0: nat).(\lambda (H1: (drop y y0 x +e)).(drop_ind (\lambda (n: nat).(\lambda (n0: nat).(\lambda (c: C).(\lambda +(c0: C).((eq nat n0 O) \to ((eq nat n O) \to (eq C c c0))))))) (\lambda (c: +C).(\lambda (_: (eq nat O O)).(\lambda (_: (eq nat O O)).(refl_equal C c)))) +(\lambda (k: K).(\lambda (h: nat).(\lambda (c: C).(\lambda (e0: C).(\lambda +(_: (drop (r k h) O c e0)).(\lambda (_: (((eq nat O O) \to ((eq nat (r k h) +O) \to (eq C c e0))))).(\lambda (u: T).(\lambda (_: (eq nat O O)).(\lambda +(H5: (eq nat (S h) O)).(let H6 \def (eq_ind nat (S h) (\lambda (ee: +nat).(match ee in nat return (\lambda (_: nat).Prop) with [O \Rightarrow +False | (S _) \Rightarrow True])) I O H5) in (False_ind (eq C (CHead c k u) +e0) H6))))))))))) (\lambda (k: K).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (c: C).(\lambda (e0: C).(\lambda (H2: (drop h (r k d) c +e0)).(\lambda (H3: (((eq nat (r k d) O) \to ((eq nat h O) \to (eq C c +e0))))).(\lambda (u: T).(\lambda (H4: (eq nat (S d) O)).(\lambda (H5: (eq nat +h O)).(let H6 \def (f_equal nat nat (\lambda (e1: nat).e1) h O H5) in (let H7 +\def (eq_ind nat h (\lambda (n: nat).((eq nat (r k d) O) \to ((eq nat n O) +\to (eq C c e0)))) H3 O H6) in (let H8 \def (eq_ind nat h (\lambda (n: +nat).(drop n (r k d) c e0)) H2 O H6) in (eq_ind_r nat O (\lambda (n: nat).(eq +C (CHead c k (lift n (r k d) u)) (CHead e0 k u))) (let H9 \def (eq_ind nat (S +d) (\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind (eq C +(CHead c k (lift O (r k d) u)) (CHead e0 k u)) H9)) h H6)))))))))))))) y y0 x +e H1))) H0))) H))). + +theorem drop_gen_drop: + \forall (k: K).(\forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: +nat).((drop (S h) O (CHead c k u) x) \to (drop (r k h) O c x)))))) +\def + \lambda (k: K).(\lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: +nat).(\lambda (H: (drop (S h) O (CHead c k u) x)).(insert_eq C (CHead c k u) +(\lambda (c0: C).(drop (S h) O c0 x)) (drop (r k h) O c x) (\lambda (y: +C).(\lambda (H0: (drop (S h) O y x)).(insert_eq nat O (\lambda (n: nat).(drop +(S h) n y x)) ((eq C y (CHead c k u)) \to (drop (r k h) O c x)) (\lambda (y0: +nat).(\lambda (H1: (drop (S h) y0 y x)).(insert_eq nat (S h) (\lambda (n: +nat).(drop n y0 y x)) ((eq nat y0 O) \to ((eq C y (CHead c k u)) \to (drop (r +k h) O c x))) (\lambda (y1: nat).(\lambda (H2: (drop y1 y0 y x)).(drop_ind +(\lambda (n: nat).(\lambda (n0: nat).(\lambda (c0: C).(\lambda (c1: C).((eq +nat n (S h)) \to ((eq nat n0 O) \to ((eq C c0 (CHead c k u)) \to (drop (r k +h) O c c1)))))))) (\lambda (c0: C).(\lambda (H3: (eq nat O (S h))).(\lambda +(_: (eq nat O O)).(\lambda (_: (eq C c0 (CHead c k u))).(let H6 \def (match +H3 in eq return (\lambda (n: nat).(\lambda (_: (eq ? ? n)).((eq nat n (S h)) +\to (drop (r k h) O c c0)))) with [refl_equal \Rightarrow (\lambda (H2: (eq +nat O (S h))).(let H3 \def (eq_ind nat O (\lambda (e: nat).(match e in nat +return (\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow +False])) I (S h) H2) in (False_ind (drop (r k h) O c c0) H3)))]) in (H6 +(refl_equal nat (S h)))))))) (\lambda (k0: K).(\lambda (h0: nat).(\lambda +(c0: C).(\lambda (e: C).(\lambda (H3: (drop (r k0 h0) O c0 e)).(\lambda (_: +(((eq nat (r k0 h0) (S h)) \to ((eq nat O O) \to ((eq C c0 (CHead c k u)) \to +(drop (r k h) O c e)))))).(\lambda (u0: T).(\lambda (H5: (eq nat (S h0) (S +h))).(\lambda (_: (eq nat O O)).(\lambda (H7: (eq C (CHead c0 k0 u0) (CHead c +k u))).(let H8 \def (match H5 in eq return (\lambda (n: nat).(\lambda (_: (eq +? ? n)).((eq nat n (S h)) \to (drop (r k h) O c e)))) with [refl_equal +\Rightarrow (\lambda (H4: (eq nat (S h0) (S h))).(let H5 \def (f_equal nat +nat (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).nat) with [O +\Rightarrow h0 | (S n) \Rightarrow n])) (S h0) (S h) H4) in (eq_ind nat h +(\lambda (_: nat).(drop (r k h) O c e)) (let H6 \def (match H7 in eq return +(\lambda (c0: C).(\lambda (_: (eq ? ? c0)).((eq C c0 (CHead c k u)) \to (drop +(r k h) O c e)))) with [refl_equal \Rightarrow (\lambda (H4: (eq C (CHead c0 +k0 u0) (CHead c k u))).(let H6 \def (f_equal C T (\lambda (e0: C).(match e0 +in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) +\Rightarrow t])) (CHead c0 k0 u0) (CHead c k u) H4) in ((let H7 \def (f_equal +C K (\lambda (e0: C).(match e0 in C return (\lambda (_: C).K) with [(CSort _) +\Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead c0 k0 u0) (CHead c k +u) H4) in ((let H8 \def (f_equal C C (\lambda (e0: C).(match e0 in C return +(\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow +c])) (CHead c0 k0 u0) (CHead c k u) H4) in (eq_ind C c (\lambda (_: C).((eq K +k0 k) \to ((eq T u0 u) \to (drop (r k h) O c e)))) (\lambda (H9: (eq K k0 +k)).(eq_ind K k (\lambda (_: K).((eq T u0 u) \to (drop (r k h) O c e))) +(\lambda (H10: (eq T u0 u)).(eq_ind T u (\lambda (_: T).(drop (r k h) O c e)) +(eq_ind nat h0 (\lambda (n: nat).(drop (r k n) O c e)) (eq_ind C c0 (\lambda +(c: C).(drop (r k h0) O c e)) (eq_ind K k0 (\lambda (k: K).(drop (r k h0) O +c0 e)) H3 k H9) c H8) h H5) u0 (sym_eq T u0 u H10))) k0 (sym_eq K k0 k H9))) +c0 (sym_eq C c0 c H8))) H7)) H6)))]) in (H6 (refl_equal C (CHead c k u)))) h0 +(sym_eq nat h0 h H5))))]) in (H8 (refl_equal nat (S h)))))))))))))) (\lambda +(k0: K).(\lambda (h0: nat).(\lambda (d: nat).(\lambda (c0: C).(\lambda (e: +C).(\lambda (_: (drop h0 (r k0 d) c0 e)).(\lambda (_: (((eq nat h0 (S h)) \to +((eq nat (r k0 d) O) \to ((eq C c0 (CHead c k u)) \to (drop (r k h) O c +e)))))).(\lambda (u0: T).(\lambda (_: (eq nat h0 (S h))).(\lambda (H6: (eq +nat (S d) O)).(\lambda (_: (eq C (CHead c0 k0 (lift h0 (r k0 d) u0)) (CHead c +k u))).(let H8 \def (match H6 in eq return (\lambda (n: nat).(\lambda (_: (eq +? ? n)).((eq nat n O) \to (drop (r k h) O c (CHead e k0 u0))))) with +[refl_equal \Rightarrow (\lambda (H4: (eq nat (S d) O)).(let H5 \def (eq_ind +nat (S d) (\lambda (e0: nat).(match e0 in nat return (\lambda (_: nat).Prop) +with [O \Rightarrow False | (S _) \Rightarrow True])) I O H4) in (False_ind +(drop (r k h) O c (CHead e k0 u0)) H5)))]) in (H8 (refl_equal nat +O)))))))))))))) y1 y0 y x H2))) H1))) H0))) H)))))). + +theorem drop_gen_skip_r: + \forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).(\forall +(d: nat).(\forall (k: K).((drop h (S d) x (CHead c k u)) \to (ex2 C (\lambda +(e: C).(eq C x (CHead e k (lift h (r k d) u)))) (\lambda (e: C).(drop h (r k +d) e c))))))))) +\def + \lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) x (CHead c k u))).(let H0 +\def (match H in drop return (\lambda (n: nat).(\lambda (n0: nat).(\lambda +(c0: C).(\lambda (c1: C).(\lambda (_: (drop n n0 c0 c1)).((eq nat n h) \to +((eq nat n0 (S d)) \to ((eq C c0 x) \to ((eq C c1 (CHead c k u)) \to (ex2 C +(\lambda (e: C).(eq C x (CHead e k (lift h (r k d) u)))) (\lambda (e: +C).(drop h (r k d) e c)))))))))))) with [(drop_refl c0) \Rightarrow (\lambda +(H0: (eq nat O h)).(\lambda (H1: (eq nat O (S d))).(\lambda (H2: (eq C c0 +x)).(\lambda (H3: (eq C c0 (CHead c k u))).(eq_ind nat O (\lambda (n: +nat).((eq nat O (S d)) \to ((eq C c0 x) \to ((eq C c0 (CHead c k u)) \to (ex2 +C (\lambda (e: C).(eq C x (CHead e k (lift n (r k d) u)))) (\lambda (e: +C).(drop n (r k d) e c))))))) (\lambda (H4: (eq nat O (S d))).(let H5 \def +(eq_ind nat O (\lambda (e: nat).(match e in nat return (\lambda (_: +nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) H4) +in (False_ind ((eq C c0 x) \to ((eq C c0 (CHead c k u)) \to (ex2 C (\lambda +(e: C).(eq C x (CHead e k (lift O (r k d) u)))) (\lambda (e: C).(drop O (r k +d) e c))))) H5))) h H0 H1 H2 H3))))) | (drop_drop k0 h0 c0 e H0 u0) +\Rightarrow (\lambda (H1: (eq nat (S h0) h)).(\lambda (H2: (eq nat O (S +d))).(\lambda (H3: (eq C (CHead c0 k0 u0) x)).(\lambda (H4: (eq C e (CHead c +k u))).(eq_ind nat (S h0) (\lambda (n: nat).((eq nat O (S d)) \to ((eq C +(CHead c0 k0 u0) x) \to ((eq C e (CHead c k u)) \to ((drop (r k0 h0) O c0 e) +\to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift n (r k d) u)))) +(\lambda (e0: C).(drop n (r k d) e0 c)))))))) (\lambda (H5: (eq nat O (S +d))).(let H6 \def (eq_ind nat O (\lambda (e0: nat).(match e0 in nat return +(\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) +I (S d) H5) in (False_ind ((eq C (CHead c0 k0 u0) x) \to ((eq C e (CHead c k +u)) \to ((drop (r k0 h0) O c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead +e0 k (lift (S h0) (r k d) u)))) (\lambda (e0: C).(drop (S h0) (r k d) e0 +c)))))) H6))) h H1 H2 H3 H4 H0))))) | (drop_skip k0 h0 d0 c0 e H0 u0) +\Rightarrow (\lambda (H1: (eq nat h0 h)).(\lambda (H2: (eq nat (S d0) (S +d))).(\lambda (H3: (eq C (CHead c0 k0 (lift h0 (r k0 d0) u0)) x)).(\lambda +(H4: (eq C (CHead e k0 u0) (CHead c k u))).(eq_ind nat h (\lambda (n: +nat).((eq nat (S d0) (S d)) \to ((eq C (CHead c0 k0 (lift n (r k0 d0) u0)) x) +\to ((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop n (r k0 d0) c0 e) \to +(ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift h (r k d) u)))) (\lambda +(e0: C).(drop h (r k d) e0 c)))))))) (\lambda (H5: (eq nat (S d0) (S +d))).(let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 in nat return +(\lambda (_: nat).nat) with [O \Rightarrow d0 | (S n) \Rightarrow n])) (S d0) +(S d) H5) in (eq_ind nat d (\lambda (n: nat).((eq C (CHead c0 k0 (lift h (r +k0 n) u0)) x) \to ((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop h (r k0 n) +c0 e) \to (ex2 C (\lambda (e0: C).(eq C x (CHead e0 k (lift h (r k d) u)))) +(\lambda (e0: C).(drop h (r k d) e0 c))))))) (\lambda (H7: (eq C (CHead c0 k0 +(lift h (r k0 d) u0)) x)).(eq_ind C (CHead c0 k0 (lift h (r k0 d) u0)) +(\lambda (c1: C).((eq C (CHead e k0 u0) (CHead c k u)) \to ((drop h (r k0 d) +c0 e) \to (ex2 C (\lambda (e0: C).(eq C c1 (CHead e0 k (lift h (r k d) u)))) +(\lambda (e0: C).(drop h (r k d) e0 c)))))) (\lambda (H8: (eq C (CHead e k0 +u0) (CHead c k u))).(let H9 \def (f_equal C T (\lambda (e0: C).(match e0 in C +return (\lambda (_: C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t) +\Rightarrow t])) (CHead e k0 u0) (CHead c k u) H8) in ((let H10 \def (f_equal +C K (\lambda (e0: C).(match e0 in C return (\lambda (_: C).K) with [(CSort _) +\Rightarrow k0 | (CHead _ k _) \Rightarrow k])) (CHead e k0 u0) (CHead c k u) +H8) in ((let H11 \def (f_equal C C (\lambda (e0: C).(match e0 in C return +(\lambda (_: C).C) with [(CSort _) \Rightarrow e | (CHead c _ _) \Rightarrow +c])) (CHead e k0 u0) (CHead c k u) H8) in (eq_ind C c (\lambda (c1: C).((eq K +k0 k) \to ((eq T u0 u) \to ((drop h (r k0 d) c0 c1) \to (ex2 C (\lambda (e0: +C).(eq C (CHead c0 k0 (lift h (r k0 d) u0)) (CHead e0 k (lift h (r k d) u)))) +(\lambda (e0: C).(drop h (r k d) e0 c))))))) (\lambda (H12: (eq K k0 +k)).(eq_ind K k (\lambda (k1: K).((eq T u0 u) \to ((drop h (r k1 d) c0 c) \to +(ex2 C (\lambda (e0: C).(eq C (CHead c0 k1 (lift h (r k1 d) u0)) (CHead e0 k +(lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c)))))) (\lambda +(H13: (eq T u0 u)).(eq_ind T u (\lambda (t: T).((drop h (r k d) c0 c) \to +(ex2 C (\lambda (e0: C).(eq C (CHead c0 k (lift h (r k d) t)) (CHead e0 k +(lift h (r k d) u)))) (\lambda (e0: C).(drop h (r k d) e0 c))))) (\lambda +(H14: (drop h (r k d) c0 c)).(let H15 \def (eq_ind T u0 (\lambda (t: T).(eq C +(CHead c0 k0 (lift h (r k0 d) t)) x)) H7 u H13) in (let H16 \def (eq_ind K k0 +(\lambda (k: K).(eq C (CHead c0 k (lift h (r k d) u)) x)) H15 k H12) in (let +H17 \def (eq_ind_r C x (\lambda (c0: C).(drop h (S d) c0 (CHead c k u))) H +(CHead c0 k (lift h (r k d) u)) H16) in (ex_intro2 C (\lambda (e0: C).(eq C +(CHead c0 k (lift h (r k d) u)) (CHead e0 k (lift h (r k d) u)))) (\lambda +(e0: C).(drop h (r k d) e0 c)) c0 (refl_equal C (CHead c0 k (lift h (r k d) +u))) H14))))) u0 (sym_eq T u0 u H13))) k0 (sym_eq K k0 k H12))) e (sym_eq C e +c H11))) H10)) H9))) x H7)) d0 (sym_eq nat d0 d H6)))) h0 (sym_eq nat h0 h +H1) H2 H3 H4 H0)))))]) in (H0 (refl_equal nat h) (refl_equal nat (S d)) +(refl_equal C x) (refl_equal C (CHead c k u)))))))))). + +theorem drop_gen_skip_l: + \forall (c: C).(\forall (x: C).(\forall (u: T).(\forall (h: nat).(\forall +(d: nat).(\forall (k: K).((drop h (S d) (CHead c k u) x) \to (ex3_2 C T +(\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: +C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e: C).(\lambda (_: +T).(drop h (r k d) c e)))))))))) +\def + \lambda (c: C).(\lambda (x: C).(\lambda (u: T).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (k: K).(\lambda (H: (drop h (S d) (CHead c k u) x)).(let H0 +\def (match H in drop return (\lambda (n: nat).(\lambda (n0: nat).(\lambda +(c0: C).(\lambda (c1: C).(\lambda (_: (drop n n0 c0 c1)).((eq nat n h) \to +((eq nat n0 (S d)) \to ((eq C c0 (CHead c k u)) \to ((eq C c1 x) \to (ex3_2 C +T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: +C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e: C).(\lambda (_: +T).(drop h (r k d) c e))))))))))))) with [(drop_refl c0) \Rightarrow (\lambda +(H0: (eq nat O h)).(\lambda (H1: (eq nat O (S d))).(\lambda (H2: (eq C c0 +(CHead c k u))).(\lambda (H3: (eq C c0 x)).(eq_ind nat O (\lambda (n: +nat).((eq nat O (S d)) \to ((eq C c0 (CHead c k u)) \to ((eq C c0 x) \to +(ex3_2 C T (\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda +(_: C).(\lambda (v: T).(eq T u (lift n (r k d) v)))) (\lambda (e: C).(\lambda +(_: T).(drop n (r k d) c e)))))))) (\lambda (H4: (eq nat O (S d))).(let H5 +\def (eq_ind nat O (\lambda (e: nat).(match e in nat return (\lambda (_: +nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) I (S d) H4) +in (False_ind ((eq C c0 (CHead c k u)) \to ((eq C c0 x) \to (ex3_2 C T +(\lambda (e: C).(\lambda (v: T).(eq C x (CHead e k v)))) (\lambda (_: +C).(\lambda (v: T).(eq T u (lift O (r k d) v)))) (\lambda (e: C).(\lambda (_: +T).(drop O (r k d) c e)))))) H5))) h H0 H1 H2 H3))))) | (drop_drop k0 h0 c0 e +H0 u0) \Rightarrow (\lambda (H1: (eq nat (S h0) h)).(\lambda (H2: (eq nat O +(S d))).(\lambda (H3: (eq C (CHead c0 k0 u0) (CHead c k u))).(\lambda (H4: +(eq C e x)).(eq_ind nat (S h0) (\lambda (n: nat).((eq nat O (S d)) \to ((eq C +(CHead c0 k0 u0) (CHead c k u)) \to ((eq C e x) \to ((drop (r k0 h0) O c0 e) +\to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T u (lift n (r k d) v)))) (\lambda (e0: +C).(\lambda (_: T).(drop n (r k d) c e0))))))))) (\lambda (H5: (eq nat O (S +d))).(let H6 \def (eq_ind nat O (\lambda (e0: nat).(match e0 in nat return +(\lambda (_: nat).Prop) with [O \Rightarrow True | (S _) \Rightarrow False])) +I (S d) H5) in (False_ind ((eq C (CHead c0 k0 u0) (CHead c k u)) \to ((eq C e +x) \to ((drop (r k0 h0) O c0 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: +T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift (S +h0) (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop (S h0) (r k d) c +e0))))))) H6))) h H1 H2 H3 H4 H0))))) | (drop_skip k0 h0 d0 c0 e H0 u0) +\Rightarrow (\lambda (H1: (eq nat h0 h)).(\lambda (H2: (eq nat (S d0) (S +d))).(\lambda (H3: (eq C (CHead c0 k0 (lift h0 (r k0 d0) u0)) (CHead c k +u))).(\lambda (H4: (eq C (CHead e k0 u0) x)).(eq_ind nat h (\lambda (n: +nat).((eq nat (S d0) (S d)) \to ((eq C (CHead c0 k0 (lift n (r k0 d0) u0)) +(CHead c k u)) \to ((eq C (CHead e k0 u0) x) \to ((drop n (r k0 d0) c0 e) \to +(ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) (\lambda (e0: +C).(\lambda (_: T).(drop h (r k d) c e0))))))))) (\lambda (H5: (eq nat (S d0) +(S d))).(let H6 \def (f_equal nat nat (\lambda (e0: nat).(match e0 in nat +return (\lambda (_: nat).nat) with [O \Rightarrow d0 | (S n) \Rightarrow n])) +(S d0) (S d) H5) in (eq_ind nat d (\lambda (n: nat).((eq C (CHead c0 k0 (lift +h (r k0 n) u0)) (CHead c k u)) \to ((eq C (CHead e k0 u0) x) \to ((drop h (r +k0 n) c0 e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead e0 +k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) +(\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))))) (\lambda (H7: +(eq C (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u))).(let H8 \def +(f_equal C T (\lambda (e0: C).(match e0 in C return (\lambda (_: C).T) with +[(CSort _) \Rightarrow ((let rec lref_map (f: ((nat \to nat))) (d: nat) (t: +T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef i) +\Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false +\Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) +(lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) (r k0 +d) u0) | (CHead _ _ t) \Rightarrow t])) (CHead c0 k0 (lift h (r k0 d) u0)) +(CHead c k u) H7) in ((let H9 \def (f_equal C K (\lambda (e0: C).(match e0 in +C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k0 | (CHead _ k _) +\Rightarrow k])) (CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) in +((let H10 \def (f_equal C C (\lambda (e0: C).(match e0 in C return (\lambda +(_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow c])) +(CHead c0 k0 (lift h (r k0 d) u0)) (CHead c k u) H7) in (eq_ind C c (\lambda +(c1: C).((eq K k0 k) \to ((eq T (lift h (r k0 d) u0) u) \to ((eq C (CHead e +k0 u0) x) \to ((drop h (r k0 d) c1 e) \to (ex3_2 C T (\lambda (e0: +C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: +T).(eq T u (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r +k d) c e0))))))))) (\lambda (H11: (eq K k0 k)).(eq_ind K k (\lambda (k1: +K).((eq T (lift h (r k1 d) u0) u) \to ((eq C (CHead e k1 u0) x) \to ((drop h +(r k1 d) c e) \to (ex3_2 C T (\lambda (e0: C).(\lambda (v: T).(eq C x (CHead +e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k d) v)))) +(\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c e0)))))))) (\lambda (H12: +(eq T (lift h (r k d) u0) u)).(eq_ind T (lift h (r k d) u0) (\lambda (t: +T).((eq C (CHead e k u0) x) \to ((drop h (r k d) c e) \to (ex3_2 C T (\lambda +(e0: C).(\lambda (v: T).(eq C x (CHead e0 k v)))) (\lambda (_: C).(\lambda +(v: T).(eq T t (lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h +(r k d) c e0))))))) (\lambda (H13: (eq C (CHead e k u0) x)).(eq_ind C (CHead +e k u0) (\lambda (c1: C).((drop h (r k d) c e) \to (ex3_2 C T (\lambda (e0: +C).(\lambda (v: T).(eq C c1 (CHead e0 k v)))) (\lambda (_: C).(\lambda (v: +T).(eq T (lift h (r k d) u0) (lift h (r k d) v)))) (\lambda (e0: C).(\lambda +(_: T).(drop h (r k d) c e0)))))) (\lambda (H14: (drop h (r k d) c e)).(let +H15 \def (eq_ind_r T u (\lambda (t: T).(drop h (S d) (CHead c k t) x)) H +(lift h (r k d) u0) H12) in (let H16 \def (eq_ind_r C x (\lambda (c0: +C).(drop h (S d) (CHead c k (lift h (r k d) u0)) c0)) H15 (CHead e k u0) H13) +in (ex3_2_intro C T (\lambda (e0: C).(\lambda (v: T).(eq C (CHead e k u0) +(CHead e0 k v)))) (\lambda (_: C).(\lambda (v: T).(eq T (lift h (r k d) u0) +(lift h (r k d) v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r k d) c +e0))) e u0 (refl_equal C (CHead e k u0)) (refl_equal T (lift h (r k d) u0)) +H14)))) x H13)) u H12)) k0 (sym_eq K k0 k H11))) c0 (sym_eq C c0 c H10))) +H9)) H8))) d0 (sym_eq nat d0 d H6)))) h0 (sym_eq nat h0 h H1) H2 H3 H4 +H0)))))]) in (H0 (refl_equal nat h) (refl_equal nat (S d)) (refl_equal C +(CHead c k u)) (refl_equal C x))))))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/props.ma new file mode 100644 index 000000000..3b7907d2d --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/drop/props.ma @@ -0,0 +1,728 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/drop/props". + +include "drop/defs.ma". + +include "lift/props.ma". + +theorem drop_skip_bind: + \forall (h: nat).(\forall (d: nat).(\forall (c: C).(\forall (e: C).((drop h +d c e) \to (\forall (b: B).(\forall (u: T).(drop h (S d) (CHead c (Bind b) +(lift h d u)) (CHead e (Bind b) u)))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (c: C).(\lambda (e: C).(\lambda +(H: (drop h d c e)).(\lambda (b: B).(\lambda (u: T).(eq_ind nat (r (Bind b) +d) (\lambda (n: nat).(drop h (S d) (CHead c (Bind b) (lift h n u)) (CHead e +(Bind b) u))) (drop_skip (Bind b) h d c e H u) d (refl_equal nat d)))))))). + +theorem drop_skip_flat: + \forall (h: nat).(\forall (d: nat).(\forall (c: C).(\forall (e: C).((drop h +(S d) c e) \to (\forall (f: F).(\forall (u: T).(drop h (S d) (CHead c (Flat +f) (lift h (S d) u)) (CHead e (Flat f) u)))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (c: C).(\lambda (e: C).(\lambda +(H: (drop h (S d) c e)).(\lambda (f: F).(\lambda (u: T).(eq_ind nat (r (Flat +f) d) (\lambda (n: nat).(drop h (S d) (CHead c (Flat f) (lift h n u)) (CHead +e (Flat f) u))) (drop_skip (Flat f) h d c e H u) (S d) (refl_equal nat (S +d))))))))). + +theorem drop_S: + \forall (b: B).(\forall (c: C).(\forall (e: C).(\forall (u: T).(\forall (h: +nat).((drop h O c (CHead e (Bind b) u)) \to (drop (S h) O c e)))))) +\def + \lambda (b: B).(\lambda (c: C).(C_ind (\lambda (c0: C).(\forall (e: +C).(\forall (u: T).(\forall (h: nat).((drop h O c0 (CHead e (Bind b) u)) \to +(drop (S h) O c0 e)))))) (\lambda (n: nat).(\lambda (e: C).(\lambda (u: +T).(\lambda (h: nat).(\lambda (H: (drop h O (CSort n) (CHead e (Bind b) +u))).(and3_ind (eq C (CHead e (Bind b) u) (CSort n)) (eq nat h O) (eq nat O +O) (drop (S h) O (CSort n) e) (\lambda (H0: (eq C (CHead e (Bind b) u) (CSort +n))).(\lambda (H1: (eq nat h O)).(\lambda (_: (eq nat O O)).(eq_ind_r nat O +(\lambda (n0: nat).(drop (S n0) O (CSort n) e)) (let H3 \def (eq_ind C (CHead +e (Bind b) u) (\lambda (ee: C).(match ee in C return (\lambda (_: C).Prop) +with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I +(CSort n) H0) in (False_ind (drop (S O) O (CSort n) e) H3)) h H1)))) +(drop_gen_sort n h O (CHead e (Bind b) u) H))))))) (\lambda (c0: C).(\lambda +(H: ((\forall (e: C).(\forall (u: T).(\forall (h: nat).((drop h O c0 (CHead e +(Bind b) u)) \to (drop (S h) O c0 e))))))).(\lambda (k: K).(\lambda (t: +T).(\lambda (e: C).(\lambda (u: T).(\lambda (h: nat).(nat_ind (\lambda (n: +nat).((drop n O (CHead c0 k t) (CHead e (Bind b) u)) \to (drop (S n) O (CHead +c0 k t) e))) (\lambda (H0: (drop O O (CHead c0 k t) (CHead e (Bind b) +u))).(let H1 \def (f_equal C C (\lambda (e0: C).(match e0 in C return +(\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow +c])) (CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 k t) (CHead +e (Bind b) u) H0)) in ((let H2 \def (f_equal C K (\lambda (e0: C).(match e0 +in C return (\lambda (_: C).K) with [(CSort _) \Rightarrow k | (CHead _ k _) +\Rightarrow k])) (CHead c0 k t) (CHead e (Bind b) u) (drop_gen_refl (CHead c0 +k t) (CHead e (Bind b) u) H0)) in ((let H3 \def (f_equal C T (\lambda (e0: +C).(match e0 in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow t | +(CHead _ _ t) \Rightarrow t])) (CHead c0 k t) (CHead e (Bind b) u) +(drop_gen_refl (CHead c0 k t) (CHead e (Bind b) u) H0)) in (\lambda (H4: (eq +K k (Bind b))).(\lambda (H5: (eq C c0 e)).(eq_ind C c0 (\lambda (c1: C).(drop +(S O) O (CHead c0 k t) c1)) (eq_ind_r K (Bind b) (\lambda (k0: K).(drop (S O) +O (CHead c0 k0 t) c0)) (drop_drop (Bind b) O c0 c0 (drop_refl c0) t) k H4) e +H5)))) H2)) H1))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c0 k t) +(CHead e (Bind b) u)) \to (drop (S n) O (CHead c0 k t) e)))).(\lambda (H1: +(drop (S n) O (CHead c0 k t) (CHead e (Bind b) u))).(drop_drop k (S n) c0 e +(eq_ind_r nat (S (r k n)) (\lambda (n0: nat).(drop n0 O c0 e)) (H e u (r k n) +(drop_gen_drop k c0 (CHead e (Bind b) u) t n H1)) (r k (S n)) (r_S k n)) +t)))) h)))))))) c)). + +theorem drop_ctail: + \forall (c1: C).(\forall (c2: C).(\forall (d: nat).(\forall (h: nat).((drop +h d c1 c2) \to (\forall (k: K).(\forall (u: T).(drop h d (CTail k u c1) +(CTail k u c2)))))))) +\def + \lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: C).(\forall (d: +nat).(\forall (h: nat).((drop h d c c2) \to (\forall (k: K).(\forall (u: +T).(drop h d (CTail k u c) (CTail k u c2))))))))) (\lambda (n: nat).(\lambda +(c2: C).(\lambda (d: nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) +c2)).(\lambda (k: K).(\lambda (u: T).(and3_ind (eq C c2 (CSort n)) (eq nat h +O) (eq nat d O) (drop h d (CTail k u (CSort n)) (CTail k u c2)) (\lambda (H0: +(eq C c2 (CSort n))).(\lambda (H1: (eq nat h O)).(\lambda (H2: (eq nat d +O)).(eq_ind_r nat O (\lambda (n0: nat).(drop n0 d (CTail k u (CSort n)) +(CTail k u c2))) (eq_ind_r nat O (\lambda (n0: nat).(drop O n0 (CTail k u +(CSort n)) (CTail k u c2))) (eq_ind_r C (CSort n) (\lambda (c: C).(drop O O +(CTail k u (CSort n)) (CTail k u c))) (drop_refl (CTail k u (CSort n))) c2 +H0) d H2) h H1)))) (drop_gen_sort n h d c2 H))))))))) (\lambda (c2: +C).(\lambda (IHc: ((\forall (c3: C).(\forall (d: nat).(\forall (h: +nat).((drop h d c2 c3) \to (\forall (k: K).(\forall (u: T).(drop h d (CTail k +u c2) (CTail k u c3)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (c3: +C).(\lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n +(CHead c2 k t) c3) \to (\forall (k0: K).(\forall (u: T).(drop h n (CTail k0 u +(CHead c2 k t)) (CTail k0 u c3))))))) (\lambda (h: nat).(nat_ind (\lambda (n: +nat).((drop n O (CHead c2 k t) c3) \to (\forall (k0: K).(\forall (u: T).(drop +n O (CTail k0 u (CHead c2 k t)) (CTail k0 u c3)))))) (\lambda (H: (drop O O +(CHead c2 k t) c3)).(\lambda (k0: K).(\lambda (u: T).(eq_ind C (CHead c2 k t) +(\lambda (c: C).(drop O O (CTail k0 u (CHead c2 k t)) (CTail k0 u c))) +(drop_refl (CTail k0 u (CHead c2 k t))) c3 (drop_gen_refl (CHead c2 k t) c3 +H))))) (\lambda (n: nat).(\lambda (_: (((drop n O (CHead c2 k t) c3) \to +(\forall (k0: K).(\forall (u: T).(drop n O (CTail k0 u (CHead c2 k t)) (CTail +k0 u c3))))))).(\lambda (H0: (drop (S n) O (CHead c2 k t) c3)).(\lambda (k0: +K).(\lambda (u: T).(drop_drop k n (CTail k0 u c2) (CTail k0 u c3) (IHc c3 O +(r k n) (drop_gen_drop k c2 c3 t n H0) k0 u) t)))))) h)) (\lambda (n: +nat).(\lambda (H: ((\forall (h: nat).((drop h n (CHead c2 k t) c3) \to +(\forall (k0: K).(\forall (u: T).(drop h n (CTail k0 u (CHead c2 k t)) (CTail +k0 u c3)))))))).(\lambda (h: nat).(\lambda (H0: (drop h (S n) (CHead c2 k t) +c3)).(\lambda (k0: K).(\lambda (u: T).(ex3_2_ind C T (\lambda (e: C).(\lambda +(v: T).(eq C c3 (CHead e k v)))) (\lambda (_: C).(\lambda (v: T).(eq T t +(lift h (r k n) v)))) (\lambda (e: C).(\lambda (_: T).(drop h (r k n) c2 e))) +(drop h (S n) (CTail k0 u (CHead c2 k t)) (CTail k0 u c3)) (\lambda (x0: +C).(\lambda (x1: T).(\lambda (H1: (eq C c3 (CHead x0 k x1))).(\lambda (H2: +(eq T t (lift h (r k n) x1))).(\lambda (H3: (drop h (r k n) c2 x0)).(let H4 +\def (eq_ind C c3 (\lambda (c: C).(\forall (h: nat).((drop h n (CHead c2 k t) +c) \to (\forall (k0: K).(\forall (u: T).(drop h n (CTail k0 u (CHead c2 k t)) +(CTail k0 u c))))))) H (CHead x0 k x1) H1) in (eq_ind_r C (CHead x0 k x1) +(\lambda (c: C).(drop h (S n) (CTail k0 u (CHead c2 k t)) (CTail k0 u c))) +(let H5 \def (eq_ind T t (\lambda (t: T).(\forall (h: nat).((drop h n (CHead +c2 k t) (CHead x0 k x1)) \to (\forall (k0: K).(\forall (u: T).(drop h n +(CTail k0 u (CHead c2 k t)) (CTail k0 u (CHead x0 k x1)))))))) H4 (lift h (r +k n) x1) H2) in (eq_ind_r T (lift h (r k n) x1) (\lambda (t0: T).(drop h (S +n) (CTail k0 u (CHead c2 k t0)) (CTail k0 u (CHead x0 k x1)))) (drop_skip k h +n (CTail k0 u c2) (CTail k0 u x0) (IHc x0 (r k n) h H3 k0 u) x1) t H2)) c3 +H1))))))) (drop_gen_skip_l c2 c3 t h n k H0)))))))) d))))))) c1). + +theorem drop_mono: + \forall (c: C).(\forall (x1: C).(\forall (d: nat).(\forall (h: nat).((drop h +d c x1) \to (\forall (x2: C).((drop h d c x2) \to (eq C x1 x2))))))) +\def + \lambda (c: C).(C_ind (\lambda (c0: C).(\forall (x1: C).(\forall (d: +nat).(\forall (h: nat).((drop h d c0 x1) \to (\forall (x2: C).((drop h d c0 +x2) \to (eq C x1 x2)))))))) (\lambda (n: nat).(\lambda (x1: C).(\lambda (d: +nat).(\lambda (h: nat).(\lambda (H: (drop h d (CSort n) x1)).(\lambda (x2: +C).(\lambda (H0: (drop h d (CSort n) x2)).(and3_ind (eq C x2 (CSort n)) (eq +nat h O) (eq nat d O) (eq C x1 x2) (\lambda (H1: (eq C x2 (CSort +n))).(\lambda (H2: (eq nat h O)).(\lambda (H3: (eq nat d O)).(and3_ind (eq C +x1 (CSort n)) (eq nat h O) (eq nat d O) (eq C x1 x2) (\lambda (H4: (eq C x1 +(CSort n))).(\lambda (H5: (eq nat h O)).(\lambda (H6: (eq nat d O)).(eq_ind_r +C (CSort n) (\lambda (c0: C).(eq C x1 c0)) (let H7 \def (eq_ind nat h +(\lambda (n: nat).(eq nat n O)) H2 O H5) in (let H8 \def (eq_ind nat d +(\lambda (n: nat).(eq nat n O)) H3 O H6) in (eq_ind_r C (CSort n) (\lambda +(c0: C).(eq C c0 (CSort n))) (refl_equal C (CSort n)) x1 H4))) x2 H1)))) +(drop_gen_sort n h d x1 H))))) (drop_gen_sort n h d x2 H0))))))))) (\lambda +(c0: C).(\lambda (H: ((\forall (x1: C).(\forall (d: nat).(\forall (h: +nat).((drop h d c0 x1) \to (\forall (x2: C).((drop h d c0 x2) \to (eq C x1 +x2))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (x1: C).(\lambda (d: +nat).(nat_ind (\lambda (n: nat).(\forall (h: nat).((drop h n (CHead c0 k t) +x1) \to (\forall (x2: C).((drop h n (CHead c0 k t) x2) \to (eq C x1 x2)))))) +(\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 k t) x1) +\to (\forall (x2: C).((drop n O (CHead c0 k t) x2) \to (eq C x1 x2))))) +(\lambda (H0: (drop O O (CHead c0 k t) x1)).(\lambda (x2: C).(\lambda (H1: +(drop O O (CHead c0 k t) x2)).(eq_ind C (CHead c0 k t) (\lambda (c1: C).(eq C +x1 c1)) (eq_ind C (CHead c0 k t) (\lambda (c1: C).(eq C c1 (CHead c0 k t))) +(refl_equal C (CHead c0 k t)) x1 (drop_gen_refl (CHead c0 k t) x1 H0)) x2 +(drop_gen_refl (CHead c0 k t) x2 H1))))) (\lambda (n: nat).(\lambda (_: +(((drop n O (CHead c0 k t) x1) \to (\forall (x2: C).((drop n O (CHead c0 k t) +x2) \to (eq C x1 x2)))))).(\lambda (H1: (drop (S n) O (CHead c0 k t) +x1)).(\lambda (x2: C).(\lambda (H2: (drop (S n) O (CHead c0 k t) x2)).(H x1 O +(r k n) (drop_gen_drop k c0 x1 t n H1) x2 (drop_gen_drop k c0 x2 t n +H2))))))) h)) (\lambda (n: nat).(\lambda (H0: ((\forall (h: nat).((drop h n +(CHead c0 k t) x1) \to (\forall (x2: C).((drop h n (CHead c0 k t) x2) \to (eq +C x1 x2))))))).(\lambda (h: nat).(\lambda (H1: (drop h (S n) (CHead c0 k t) +x1)).(\lambda (x2: C).(\lambda (H2: (drop h (S n) (CHead c0 k t) +x2)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C x2 (CHead e k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k n) v)))) (\lambda (e: +C).(\lambda (_: T).(drop h (r k n) c0 e))) (eq C x1 x2) (\lambda (x0: +C).(\lambda (x3: T).(\lambda (H3: (eq C x2 (CHead x0 k x3))).(\lambda (H4: +(eq T t (lift h (r k n) x3))).(\lambda (H5: (drop h (r k n) c0 +x0)).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C x1 (CHead e k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k n) v)))) (\lambda (e: +C).(\lambda (_: T).(drop h (r k n) c0 e))) (eq C x1 x2) (\lambda (x4: +C).(\lambda (x5: T).(\lambda (H6: (eq C x1 (CHead x4 k x5))).(\lambda (H7: +(eq T t (lift h (r k n) x5))).(\lambda (H8: (drop h (r k n) c0 x4)).(eq_ind_r +C (CHead x0 k x3) (\lambda (c1: C).(eq C x1 c1)) (let H9 \def (eq_ind C x1 +(\lambda (c: C).(\forall (h: nat).((drop h n (CHead c0 k t) c) \to (\forall +(x2: C).((drop h n (CHead c0 k t) x2) \to (eq C c x2)))))) H0 (CHead x4 k x5) +H6) in (eq_ind_r C (CHead x4 k x5) (\lambda (c1: C).(eq C c1 (CHead x0 k +x3))) (let H10 \def (eq_ind T t (\lambda (t: T).(\forall (h: nat).((drop h n +(CHead c0 k t) (CHead x4 k x5)) \to (\forall (x2: C).((drop h n (CHead c0 k +t) x2) \to (eq C (CHead x4 k x5) x2)))))) H9 (lift h (r k n) x5) H7) in (let +H11 \def (eq_ind T t (\lambda (t: T).(eq T t (lift h (r k n) x3))) H4 (lift h +(r k n) x5) H7) in (let H12 \def (eq_ind T x5 (\lambda (t: T).(\forall (h0: +nat).((drop h0 n (CHead c0 k (lift h (r k n) t)) (CHead x4 k t)) \to (\forall +(x2: C).((drop h0 n (CHead c0 k (lift h (r k n) t)) x2) \to (eq C (CHead x4 k +t) x2)))))) H10 x3 (lift_inj x5 x3 h (r k n) H11)) in (eq_ind_r T x3 (\lambda +(t0: T).(eq C (CHead x4 k t0) (CHead x0 k x3))) (sym_equal C (CHead x0 k x3) +(CHead x4 k x3) (sym_equal C (CHead x4 k x3) (CHead x0 k x3) (sym_equal C +(CHead x0 k x3) (CHead x4 k x3) (f_equal3 C K T C CHead x0 x4 k k x3 x3 (H x0 +(r k n) h H5 x4 H8) (refl_equal K k) (refl_equal T x3))))) x5 (lift_inj x5 x3 +h (r k n) H11))))) x1 H6)) x2 H3)))))) (drop_gen_skip_l c0 x1 t h n k +H1))))))) (drop_gen_skip_l c0 x2 t h n k H2)))))))) d))))))) c). + +theorem drop_conf_lt: + \forall (k: K).(\forall (i: nat).(\forall (u: T).(\forall (c0: C).(\forall +(c: C).((drop i O c (CHead c0 k u)) \to (\forall (e: C).(\forall (h: +nat).(\forall (d: nat).((drop h (S (plus i d)) c e) \to (ex3_2 T C (\lambda +(v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda +(e0: C).(drop i O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop +h (r k d) c0 e0))))))))))))) +\def + \lambda (k: K).(\lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (u: +T).(\forall (c0: C).(\forall (c: C).((drop n O c (CHead c0 k u)) \to (\forall +(e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus n d)) c e) \to +(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) +(\lambda (v: T).(\lambda (e0: C).(drop n O e (CHead e0 k v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))))) (\lambda (u: +T).(\lambda (c0: C).(\lambda (c: C).(\lambda (H: (drop O O c (CHead c0 k +u))).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop +h (S (plus O d)) c e)).(let H1 \def (eq_ind C c (\lambda (c: C).(drop h (S +(plus O d)) c e)) H0 (CHead c0 k u) (drop_gen_refl c (CHead c0 k u) H)) in +(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 k v)))) +(\lambda (_: C).(\lambda (v: T).(eq T u (lift h (r k (plus O d)) v)))) +(\lambda (e0: C).(\lambda (_: T).(drop h (r k (plus O d)) c0 e0))) (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: +T).(\lambda (e0: C).(drop O O e (CHead e0 k v)))) (\lambda (_: T).(\lambda +(e0: C).(drop h (r k d) c0 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda +(H2: (eq C e (CHead x0 k x1))).(\lambda (H3: (eq T u (lift h (r k (plus O d)) +x1))).(\lambda (H4: (drop h (r k (plus O d)) c0 x0)).(eq_ind_r C (CHead x0 k +x1) (\lambda (c1: C).(ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift +h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop O O c1 (CHead e0 k +v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))) (eq_ind_r T +(lift h (r k (plus O d)) x1) (\lambda (t: T).(ex3_2 T C (\lambda (v: +T).(\lambda (_: C).(eq T t (lift h (r k d) v)))) (\lambda (v: T).(\lambda +(e0: C).(drop O O (CHead x0 k x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda +(e0: C).(drop h (r k d) c0 e0))))) (ex3_2_intro T C (\lambda (v: T).(\lambda +(_: C).(eq T (lift h (r k (plus O d)) x1) (lift h (r k d) v)))) (\lambda (v: +T).(\lambda (e0: C).(drop O O (CHead x0 k x1) (CHead e0 k v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h (r k d) c0 e0))) x1 x0 (refl_equal T (lift h (r k +d) x1)) (drop_refl (CHead x0 k x1)) H4) u H3) e H2)))))) (drop_gen_skip_l c0 +e u h (plus O d) k H1))))))))))) (\lambda (i0: nat).(\lambda (H: ((\forall +(u: T).(\forall (c0: C).(\forall (c: C).((drop i0 O c (CHead c0 k u)) \to +(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus i0 d)) +c e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) +v)))) (\lambda (v: T).(\lambda (e0: C).(drop i0 O e (CHead e0 k v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))))))))))))).(\lambda +(u: T).(\lambda (c0: C).(\lambda (c: C).(C_ind (\lambda (c1: C).((drop (S i0) +O c1 (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: +nat).((drop h (S (plus (S i0) d)) c1 e) \to (ex3_2 T C (\lambda (v: +T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda +(e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: +C).(drop h (r k d) c0 e0)))))))))) (\lambda (n: nat).(\lambda (_: (drop (S +i0) O (CSort n) (CHead c0 k u))).(\lambda (e: C).(\lambda (h: nat).(\lambda +(d: nat).(\lambda (H1: (drop h (S (plus (S i0) d)) (CSort n) e)).(and3_ind +(eq C e (CSort n)) (eq nat h O) (eq nat (S (plus (S i0) d)) O) (ex3_2 T C +(\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: +T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) (\lambda (_: (eq C e (CSort +n))).(\lambda (_: (eq nat h O)).(\lambda (H4: (eq nat (S (plus (S i0) d)) +O)).(let H5 \def (eq_ind nat (S (plus (S i0) d)) (\lambda (ee: nat).(match ee +in nat return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) +\Rightarrow True])) I O H4) in (False_ind (ex3_2 T C (\lambda (v: T).(\lambda +(_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop +(S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) +c0 e0)))) H5))))) (drop_gen_sort n h (S (plus (S i0) d)) e H1)))))))) +(\lambda (c1: C).(\lambda (H0: (((drop (S i0) O c1 (CHead c0 k u)) \to +(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h (S (plus (S i0) +d)) c1 e) \to (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k +d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O e (CHead e0 k v)))) +(\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0))))))))))).(\lambda +(k0: K).(K_ind (\lambda (k1: K).(\forall (t: T).((drop (S i0) O (CHead c1 k1 +t) (CHead c0 k u)) \to (\forall (e: C).(\forall (h: nat).(\forall (d: +nat).((drop h (S (plus (S i0) d)) (CHead c1 k1 t) e) \to (ex3_2 T C (\lambda +(v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda +(e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: +C).(drop h (r k d) c0 e0))))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda +(H1: (drop (S i0) O (CHead c1 (Bind b) t) (CHead c0 k u))).(\lambda (e: +C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h (S (plus (S i0) +d)) (CHead c1 (Bind b) t) e)).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: +T).(eq C e (CHead e0 (Bind b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t +(lift h (r (Bind b) (plus (S i0) d)) v)))) (\lambda (e0: C).(\lambda (_: +T).(drop h (r (Bind b) (plus (S i0) d)) c1 e0))) (ex3_2 T C (\lambda (v: +T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda +(e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: +C).(drop h (r k d) c0 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: +(eq C e (CHead x0 (Bind b) x1))).(\lambda (_: (eq T t (lift h (r (Bind b) +(plus (S i0) d)) x1))).(\lambda (H5: (drop h (r (Bind b) (plus (S i0) d)) c1 +x0)).(eq_ind_r C (CHead x0 (Bind b) x1) (\lambda (c2: C).(ex3_2 T C (\lambda +(v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda +(e0: C).(drop (S i0) O c2 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: +C).(drop h (r k d) c0 e0))))) (let H6 \def (H u c0 c1 (drop_gen_drop (Bind b) +c1 (CHead c0 k u) t i0 H1) x0 h d H5) in (ex3_2_ind T C (\lambda (v: +T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda +(e0: C).(drop i0 O x0 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: +C).(drop h (r k d) c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T +u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O +(CHead x0 (Bind b) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: +C).(drop h (r k d) c0 e0)))) (\lambda (x2: T).(\lambda (x3: C).(\lambda (H7: +(eq T u (lift h (r k d) x2))).(\lambda (H8: (drop i0 O x0 (CHead x3 k +x2))).(\lambda (H9: (drop h (r k d) c0 x3)).(ex3_2_intro T C (\lambda (v: +T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda +(e0: C).(drop (S i0) O (CHead x0 (Bind b) x1) (CHead e0 k v)))) (\lambda (_: +T).(\lambda (e0: C).(drop h (r k d) c0 e0))) x2 x3 H7 (drop_drop (Bind b) i0 +x0 (CHead x3 k x2) H8 x1) H9)))))) H6)) e H3)))))) (drop_gen_skip_l c1 e t h +(plus (S i0) d) (Bind b) H2))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda +(H1: (drop (S i0) O (CHead c1 (Flat f) t) (CHead c0 k u))).(\lambda (e: +C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: (drop h (S (plus (S i0) +d)) (CHead c1 (Flat f) t) e)).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: +T).(eq C e (CHead e0 (Flat f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t +(lift h (r (Flat f) (plus (S i0) d)) v)))) (\lambda (e0: C).(\lambda (_: +T).(drop h (r (Flat f) (plus (S i0) d)) c1 e0))) (ex3_2 T C (\lambda (v: +T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda +(e0: C).(drop (S i0) O e (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: +C).(drop h (r k d) c0 e0)))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H3: +(eq C e (CHead x0 (Flat f) x1))).(\lambda (_: (eq T t (lift h (r (Flat f) +(plus (S i0) d)) x1))).(\lambda (H5: (drop h (r (Flat f) (plus (S i0) d)) c1 +x0)).(eq_ind_r C (CHead x0 (Flat f) x1) (\lambda (c2: C).(ex3_2 T C (\lambda +(v: T).(\lambda (_: C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda +(e0: C).(drop (S i0) O c2 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: +C).(drop h (r k d) c0 e0))))) (ex3_2_ind T C (\lambda (v: T).(\lambda (_: +C).(eq T u (lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S +i0) O x0 (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) +c0 e0))) (ex3_2 T C (\lambda (v: T).(\lambda (_: C).(eq T u (lift h (r k d) +v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead x0 (Flat f) x1) +(CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r k d) c0 e0)))) +(\lambda (x2: T).(\lambda (x3: C).(\lambda (H6: (eq T u (lift h (r k d) +x2))).(\lambda (H7: (drop (S i0) O x0 (CHead x3 k x2))).(\lambda (H8: (drop h +(r k d) c0 x3)).(ex3_2_intro T C (\lambda (v: T).(\lambda (_: C).(eq T u +(lift h (r k d) v)))) (\lambda (v: T).(\lambda (e0: C).(drop (S i0) O (CHead +x0 (Flat f) x1) (CHead e0 k v)))) (\lambda (_: T).(\lambda (e0: C).(drop h (r +k d) c0 e0))) x2 x3 H6 (drop_drop (Flat f) i0 x0 (CHead x3 k x2) H7 x1) +H8)))))) (H0 (drop_gen_drop (Flat f) c1 (CHead c0 k u) t i0 H1) x0 h d H5)) e +H3)))))) (drop_gen_skip_l c1 e t h (plus (S i0) d) (Flat f) H2))))))))) +k0)))) c)))))) i)). + +theorem drop_conf_ge: + \forall (i: nat).(\forall (a: C).(\forall (c: C).((drop i O c a) \to +(\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) \to ((le +(plus d h) i) \to (drop (minus i h) O e a))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (a: C).(\forall (c: +C).((drop n O c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: +nat).((drop h d c e) \to ((le (plus d h) n) \to (drop (minus n h) O e +a)))))))))) (\lambda (a: C).(\lambda (c: C).(\lambda (H: (drop O O c +a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H0: (drop h +d c e)).(\lambda (H1: (le (plus d h) O)).(let H2 \def (eq_ind C c (\lambda +(c: C).(drop h d c e)) H0 a (drop_gen_refl c a H)) in (let H3 \def (match H1 +in le return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) \to (drop +(minus O h) O e a)))) with [le_n \Rightarrow (\lambda (H: (eq nat (plus d h) +O)).(let H3 \def (f_equal nat nat (\lambda (e0: nat).e0) (plus d h) O H) in +(eq_ind nat (plus d h) (\lambda (n: nat).(drop (minus n h) n e a)) (eq_ind_r +nat O (\lambda (n: nat).(drop (minus n h) n e a)) (and_ind (eq nat d O) (eq +nat h O) (drop O O e a) (\lambda (H0: (eq nat d O)).(\lambda (H1: (eq nat h +O)).(let H2 \def (eq_ind nat d (\lambda (n: nat).(drop h n a e)) H2 O H0) in +(let H4 \def (eq_ind nat h (\lambda (n: nat).(drop n O a e)) H2 O H1) in +(eq_ind C a (\lambda (c: C).(drop O O c a)) (drop_refl a) e (drop_gen_refl a +e H4)))))) (plus_O d h H3)) (plus d h) H3) O H3))) | (le_S m H) \Rightarrow +(\lambda (H2: (eq nat (S m) O)).((let H0 \def (eq_ind nat (S m) (\lambda (e0: +nat).(match e0 in nat return (\lambda (_: nat).Prop) with [O \Rightarrow +False | (S _) \Rightarrow True])) I O H2) in (False_ind ((le (plus d h) m) +\to (drop (minus O h) O e a)) H0)) H))]) in (H3 (refl_equal nat O)))))))))))) +(\lambda (i0: nat).(\lambda (H: ((\forall (a: C).(\forall (c: C).((drop i0 O +c a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c e) +\to ((le (plus d h) i0) \to (drop (minus i0 h) O e a))))))))))).(\lambda (a: +C).(\lambda (c: C).(C_ind (\lambda (c0: C).((drop (S i0) O c0 a) \to (\forall +(e: C).(\forall (h: nat).(\forall (d: nat).((drop h d c0 e) \to ((le (plus d +h) (S i0)) \to (drop (minus (S i0) h) O e a)))))))) (\lambda (n: +nat).(\lambda (H0: (drop (S i0) O (CSort n) a)).(\lambda (e: C).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H1: (drop h d (CSort n) e)).(\lambda (H2: +(le (plus d h) (S i0))).(and3_ind (eq C e (CSort n)) (eq nat h O) (eq nat d +O) (drop (minus (S i0) h) O e a) (\lambda (H3: (eq C e (CSort n))).(\lambda +(H4: (eq nat h O)).(\lambda (H5: (eq nat d O)).(and3_ind (eq C a (CSort n)) +(eq nat (S i0) O) (eq nat O O) (drop (minus (S i0) h) O e a) (\lambda (H6: +(eq C a (CSort n))).(\lambda (H7: (eq nat (S i0) O)).(\lambda (_: (eq nat O +O)).(let H9 \def (eq_ind nat d (\lambda (n: nat).(le (plus n h) (S i0))) H2 O +H5) in (let H10 \def (eq_ind nat h (\lambda (n: nat).(le (plus O n) (S i0))) +H9 O H4) in (eq_ind_r nat O (\lambda (n0: nat).(drop (minus (S i0) n0) O e +a)) (eq_ind_r C (CSort n) (\lambda (c0: C).(drop (minus (S i0) O) O c0 a)) +(eq_ind_r C (CSort n) (\lambda (c0: C).(drop (minus (S i0) O) O (CSort n) +c0)) (let H11 \def (eq_ind nat (S i0) (\lambda (ee: nat).(match ee in nat +return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow +True])) I O H7) in (False_ind (drop (minus (S i0) O) O (CSort n) (CSort n)) +H11)) a H6) e H3) h H4)))))) (drop_gen_sort n (S i0) O a H0))))) +(drop_gen_sort n h d e H1))))))))) (\lambda (c0: C).(\lambda (H0: (((drop (S +i0) O c0 a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: nat).((drop h +d c0 e) \to ((le (plus d h) (S i0)) \to (drop (minus (S i0) h) O e +a))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: T).((drop (S +i0) O (CHead c0 k0 t) a) \to (\forall (e: C).(\forall (h: nat).(\forall (d: +nat).((drop h d (CHead c0 k0 t) e) \to ((le (plus d h) (S i0)) \to (drop +(minus (S i0) h) O e a))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H1: +(drop (S i0) O (CHead c0 (Bind b) t) a)).(\lambda (e: C).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H2: (drop h d (CHead c0 (Bind b) t) +e)).(\lambda (H3: (le (plus d h) (S i0))).(nat_ind (\lambda (n: nat).((drop h +n (CHead c0 (Bind b) t) e) \to ((le (plus n h) (S i0)) \to (drop (minus (S +i0) h) O e a)))) (\lambda (H4: (drop h O (CHead c0 (Bind b) t) e)).(\lambda +(H5: (le (plus O h) (S i0))).(nat_ind (\lambda (n: nat).((drop n O (CHead c0 +(Bind b) t) e) \to ((le (plus O n) (S i0)) \to (drop (minus (S i0) n) O e +a)))) (\lambda (H6: (drop O O (CHead c0 (Bind b) t) e)).(\lambda (_: (le +(plus O O) (S i0))).(eq_ind C (CHead c0 (Bind b) t) (\lambda (c1: C).(drop +(minus (S i0) O) O c1 a)) (drop_drop (Bind b) i0 c0 a (drop_gen_drop (Bind b) +c0 a t i0 H1) t) e (drop_gen_refl (CHead c0 (Bind b) t) e H6)))) (\lambda +(h0: nat).(\lambda (_: (((drop h0 O (CHead c0 (Bind b) t) e) \to ((le (plus O +h0) (S i0)) \to (drop (minus (S i0) h0) O e a))))).(\lambda (H6: (drop (S h0) +O (CHead c0 (Bind b) t) e)).(\lambda (H7: (le (plus O (S h0)) (S i0))).(H a +c0 (drop_gen_drop (Bind b) c0 a t i0 H1) e h0 O (drop_gen_drop (Bind b) c0 e +t h0 H6) (le_S_n (plus O h0) i0 H7)))))) h H4 H5))) (\lambda (d0: +nat).(\lambda (_: (((drop h d0 (CHead c0 (Bind b) t) e) \to ((le (plus d0 h) +(S i0)) \to (drop (minus (S i0) h) O e a))))).(\lambda (H4: (drop h (S d0) +(CHead c0 (Bind b) t) e)).(\lambda (H5: (le (plus (S d0) h) (S +i0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Bind +b) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Bind b) d0) +v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Bind b) d0) c0 e0))) (drop +(minus (S i0) h) O e a) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C +e (CHead x0 (Bind b) x1))).(\lambda (_: (eq T t (lift h (r (Bind b) d0) +x1))).(\lambda (H8: (drop h (r (Bind b) d0) c0 x0)).(eq_ind_r C (CHead x0 +(Bind b) x1) (\lambda (c1: C).(drop (minus (S i0) h) O c1 a)) (eq_ind nat (S +(minus i0 h)) (\lambda (n: nat).(drop n O (CHead x0 (Bind b) x1) a)) +(drop_drop (Bind b) (minus i0 h) x0 a (H a c0 (drop_gen_drop (Bind b) c0 a t +i0 H1) x0 h d0 H8 (le_S_n (plus d0 h) i0 H5)) x1) (minus (S i0) h) +(minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5)))) e +H6)))))) (drop_gen_skip_l c0 e t h d0 (Bind b) H4)))))) d H2 H3))))))))) +(\lambda (f: F).(\lambda (t: T).(\lambda (H1: (drop (S i0) O (CHead c0 (Flat +f) t) a)).(\lambda (e: C).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H2: +(drop h d (CHead c0 (Flat f) t) e)).(\lambda (H3: (le (plus d h) (S +i0))).(nat_ind (\lambda (n: nat).((drop h n (CHead c0 (Flat f) t) e) \to ((le +(plus n h) (S i0)) \to (drop (minus (S i0) h) O e a)))) (\lambda (H4: (drop h +O (CHead c0 (Flat f) t) e)).(\lambda (H5: (le (plus O h) (S i0))).(nat_ind +(\lambda (n: nat).((drop n O (CHead c0 (Flat f) t) e) \to ((le (plus O n) (S +i0)) \to (drop (minus (S i0) n) O e a)))) (\lambda (H6: (drop O O (CHead c0 +(Flat f) t) e)).(\lambda (_: (le (plus O O) (S i0))).(eq_ind C (CHead c0 +(Flat f) t) (\lambda (c1: C).(drop (minus (S i0) O) O c1 a)) (drop_drop (Flat +f) i0 c0 a (drop_gen_drop (Flat f) c0 a t i0 H1) t) e (drop_gen_refl (CHead +c0 (Flat f) t) e H6)))) (\lambda (h0: nat).(\lambda (_: (((drop h0 O (CHead +c0 (Flat f) t) e) \to ((le (plus O h0) (S i0)) \to (drop (minus (S i0) h0) O +e a))))).(\lambda (H6: (drop (S h0) O (CHead c0 (Flat f) t) e)).(\lambda (H7: +(le (plus O (S h0)) (S i0))).(H0 (drop_gen_drop (Flat f) c0 a t i0 H1) e (S +h0) O (drop_gen_drop (Flat f) c0 e t h0 H6) H7))))) h H4 H5))) (\lambda (d0: +nat).(\lambda (_: (((drop h d0 (CHead c0 (Flat f) t) e) \to ((le (plus d0 h) +(S i0)) \to (drop (minus (S i0) h) O e a))))).(\lambda (H4: (drop h (S d0) +(CHead c0 (Flat f) t) e)).(\lambda (H5: (le (plus (S d0) h) (S +i0))).(ex3_2_ind C T (\lambda (e0: C).(\lambda (v: T).(eq C e (CHead e0 (Flat +f) v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r (Flat f) d0) +v)))) (\lambda (e0: C).(\lambda (_: T).(drop h (r (Flat f) d0) c0 e0))) (drop +(minus (S i0) h) O e a) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C +e (CHead x0 (Flat f) x1))).(\lambda (_: (eq T t (lift h (r (Flat f) d0) +x1))).(\lambda (H8: (drop h (r (Flat f) d0) c0 x0)).(eq_ind_r C (CHead x0 +(Flat f) x1) (\lambda (c1: C).(drop (minus (S i0) h) O c1 a)) (let H9 \def +(eq_ind_r nat (minus (S i0) h) (\lambda (n: nat).(drop n O x0 a)) (H0 +(drop_gen_drop (Flat f) c0 a t i0 H1) x0 h (S d0) H8 H5) (S (minus i0 h)) +(minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5)))) in +(eq_ind nat (S (minus i0 h)) (\lambda (n: nat).(drop n O (CHead x0 (Flat f) +x1) a)) (drop_drop (Flat f) (minus i0 h) x0 a H9 x1) (minus (S i0) h) +(minus_Sn_m i0 h (le_trans_plus_r d0 h i0 (le_S_n (plus d0 h) i0 H5))))) e +H6)))))) (drop_gen_skip_l c0 e t h d0 (Flat f) H4)))))) d H2 H3))))))))) +k)))) c))))) i). + +theorem drop_conf_rev: + \forall (j: nat).(\forall (e1: C).(\forall (e2: C).((drop j O e1 e2) \to +(\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: +C).(drop j O c1 c2)) (\lambda (c1: C).(drop i j c1 e1))))))))) +\def + \lambda (j: nat).(nat_ind (\lambda (n: nat).(\forall (e1: C).(\forall (e2: +C).((drop n O e1 e2) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e2) +\to (ex2 C (\lambda (c1: C).(drop n O c1 c2)) (\lambda (c1: C).(drop i n c1 +e1)))))))))) (\lambda (e1: C).(\lambda (e2: C).(\lambda (H: (drop O O e1 +e2)).(\lambda (c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e2)).(let +H1 \def (eq_ind_r C e2 (\lambda (c: C).(drop i O c2 c)) H0 e1 (drop_gen_refl +e1 e2 H)) in (ex_intro2 C (\lambda (c1: C).(drop O O c1 c2)) (\lambda (c1: +C).(drop i O c1 e1)) c2 (drop_refl c2) H1)))))))) (\lambda (j0: nat).(\lambda +(IHj: ((\forall (e1: C).(\forall (e2: C).((drop j0 O e1 e2) \to (\forall (c2: +C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop j0 O +c1 c2)) (\lambda (c1: C).(drop i j0 c1 e1))))))))))).(\lambda (e1: C).(C_ind +(\lambda (c: C).(\forall (e2: C).((drop (S j0) O c e2) \to (\forall (c2: +C).(\forall (i: nat).((drop i O c2 e2) \to (ex2 C (\lambda (c1: C).(drop (S +j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 c))))))))) (\lambda (n: +nat).(\lambda (e2: C).(\lambda (H: (drop (S j0) O (CSort n) e2)).(\lambda +(c2: C).(\lambda (i: nat).(\lambda (H0: (drop i O c2 e2)).(and3_ind (eq C e2 +(CSort n)) (eq nat (S j0) O) (eq nat O O) (ex2 C (\lambda (c1: C).(drop (S +j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CSort n)))) (\lambda (H1: +(eq C e2 (CSort n))).(\lambda (H2: (eq nat (S j0) O)).(\lambda (_: (eq nat O +O)).(let H4 \def (eq_ind C e2 (\lambda (c: C).(drop i O c2 c)) H0 (CSort n) +H1) in (let H5 \def (eq_ind nat (S j0) (\lambda (ee: nat).(match ee in nat +return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow +True])) I O H2) in (False_ind (ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) +(\lambda (c1: C).(drop i (S j0) c1 (CSort n)))) H5)))))) (drop_gen_sort n (S +j0) O e2 H)))))))) (\lambda (e2: C).(\lambda (IHe1: ((\forall (e3: C).((drop +(S j0) O e2 e3) \to (\forall (c2: C).(\forall (i: nat).((drop i O c2 e3) \to +(ex2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: C).(drop i (S +j0) c1 e2)))))))))).(\lambda (k: K).(\lambda (t: T).(\lambda (e3: C).(\lambda +(H: (drop (S j0) O (CHead e2 k t) e3)).(\lambda (c2: C).(\lambda (i: +nat).(\lambda (H0: (drop i O c2 e3)).((match k in K return (\lambda (k0: +K).((drop (r k0 j0) O e2 e3) \to (ex2 C (\lambda (c1: C).(drop (S j0) O c1 +c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 k0 t)))))) with [(Bind b) +\Rightarrow (\lambda (H1: (drop (r (Bind b) j0) O e2 e3)).(let H_x \def (IHj +e2 e3 H1 c2 i H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c1: C).(drop j0 +O c1 c2)) (\lambda (c1: C).(drop i j0 c1 e2)) (ex2 C (\lambda (c1: C).(drop +(S j0) O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Bind b) t)))) +(\lambda (x: C).(\lambda (H3: (drop j0 O x c2)).(\lambda (H4: (drop i j0 x +e2)).(ex_intro2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: +C).(drop i (S j0) c1 (CHead e2 (Bind b) t))) (CHead x (Bind b) (lift i (r +(Bind b) j0) t)) (drop_drop (Bind b) j0 x c2 H3 (lift i (r (Bind b) j0) t)) +(drop_skip (Bind b) i j0 x e2 H4 t))))) H2)))) | (Flat f) \Rightarrow +(\lambda (H1: (drop (r (Flat f) j0) O e2 e3)).(let H_x \def (IHe1 e3 H1 c2 i +H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c1: C).(drop (S j0) O c1 c2)) +(\lambda (c1: C).(drop i (S j0) c1 e2)) (ex2 C (\lambda (c1: C).(drop (S j0) +O c1 c2)) (\lambda (c1: C).(drop i (S j0) c1 (CHead e2 (Flat f) t)))) +(\lambda (x: C).(\lambda (H3: (drop (S j0) O x c2)).(\lambda (H4: (drop i (S +j0) x e2)).(ex_intro2 C (\lambda (c1: C).(drop (S j0) O c1 c2)) (\lambda (c1: +C).(drop i (S j0) c1 (CHead e2 (Flat f) t))) (CHead x (Flat f) (lift i (r +(Flat f) j0) t)) (drop_drop (Flat f) j0 x c2 H3 (lift i (r (Flat f) j0) t)) +(drop_skip (Flat f) i j0 x e2 H4 t))))) H2))))]) (drop_gen_drop k e2 e3 t j0 +H))))))))))) e1)))) j). + +theorem drop_trans_le: + \forall (i: nat).(\forall (d: nat).((le i d) \to (\forall (c1: C).(\forall +(c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i O +c2 e2) \to (ex2 C (\lambda (e1: C).(drop i O c1 e1)) (\lambda (e1: C).(drop h +(minus d i) e1 e2))))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (d: nat).((le n d) \to +(\forall (c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to +(\forall (e2: C).((drop n O c2 e2) \to (ex2 C (\lambda (e1: C).(drop n O c1 +e1)) (\lambda (e1: C).(drop h (minus d n) e1 e2)))))))))))) (\lambda (d: +nat).(\lambda (_: (le O d)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: +nat).(\lambda (H0: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H1: (drop O O +c2 e2)).(let H2 \def (eq_ind C c2 (\lambda (c: C).(drop h d c1 c)) H0 e2 +(drop_gen_refl c2 e2 H1)) in (eq_ind nat d (\lambda (n: nat).(ex2 C (\lambda +(e1: C).(drop O O c1 e1)) (\lambda (e1: C).(drop h n e1 e2)))) (ex_intro2 C +(\lambda (e1: C).(drop O O c1 e1)) (\lambda (e1: C).(drop h d e1 e2)) c1 +(drop_refl c1) H2) (minus d O) (minus_n_O d))))))))))) (\lambda (i0: +nat).(\lambda (IHi: ((\forall (d: nat).((le i0 d) \to (\forall (c1: +C).(\forall (c2: C).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: +C).((drop i0 O c2 e2) \to (ex2 C (\lambda (e1: C).(drop i0 O c1 e1)) (\lambda +(e1: C).(drop h (minus d i0) e1 e2))))))))))))).(\lambda (d: nat).(nat_ind +(\lambda (n: nat).((le (S i0) n) \to (\forall (c1: C).(\forall (c2: +C).(\forall (h: nat).((drop h n c1 c2) \to (\forall (e2: C).((drop (S i0) O +c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: +C).(drop h (minus n (S i0)) e1 e2))))))))))) (\lambda (H: (le (S i0) +O)).(\lambda (c1: C).(\lambda (c2: C).(\lambda (h: nat).(\lambda (_: (drop h +O c1 c2)).(\lambda (e2: C).(\lambda (_: (drop (S i0) O c2 e2)).(let H2 \def +(match H in le return (\lambda (n: nat).(\lambda (_: (le ? n)).((eq nat n O) +\to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: C).(drop h +(minus O (S i0)) e1 e2)))))) with [le_n \Rightarrow (\lambda (H2: (eq nat (S +i0) O)).(let H3 \def (eq_ind nat (S i0) (\lambda (e: nat).(match e in nat +return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow +True])) I O H2) in (False_ind (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) +(\lambda (e1: C).(drop h (minus O (S i0)) e1 e2))) H3))) | (le_S m H2) +\Rightarrow (\lambda (H3: (eq nat (S m) O)).((let H4 \def (eq_ind nat (S m) +(\lambda (e: nat).(match e in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H3) in (False_ind ((le (S +i0) m) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 e1)) (\lambda (e1: +C).(drop h (minus O (S i0)) e1 e2)))) H4)) H2))]) in (H2 (refl_equal nat +O)))))))))) (\lambda (d0: nat).(\lambda (_: (((le (S i0) d0) \to (\forall +(c1: C).(\forall (c2: C).(\forall (h: nat).((drop h d0 c1 c2) \to (\forall +(e2: C).((drop (S i0) O c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c1 +e1)) (\lambda (e1: C).(drop h (minus d0 (S i0)) e1 e2)))))))))))).(\lambda +(H: (le (S i0) (S d0))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: +C).(\forall (h: nat).((drop h (S d0) c c2) \to (\forall (e2: C).((drop (S i0) +O c2 e2) \to (ex2 C (\lambda (e1: C).(drop (S i0) O c e1)) (\lambda (e1: +C).(drop h (minus (S d0) (S i0)) e1 e2))))))))) (\lambda (n: nat).(\lambda +(c2: C).(\lambda (h: nat).(\lambda (H0: (drop h (S d0) (CSort n) +c2)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c2 e2)).(and3_ind (eq C c2 +(CSort n)) (eq nat h O) (eq nat (S d0) O) (ex2 C (\lambda (e1: C).(drop (S +i0) O (CSort n) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) +(\lambda (H2: (eq C c2 (CSort n))).(\lambda (_: (eq nat h O)).(\lambda (_: +(eq nat (S d0) O)).(let H5 \def (eq_ind C c2 (\lambda (c: C).(drop (S i0) O c +e2)) H1 (CSort n) H2) in (and3_ind (eq C e2 (CSort n)) (eq nat (S i0) O) (eq +nat O O) (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda (e1: +C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (H6: (eq C e2 (CSort +n))).(\lambda (H7: (eq nat (S i0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C +(CSort n) (\lambda (c: C).(ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) +e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 c)))) (let H9 \def +(eq_ind nat (S i0) (\lambda (ee: nat).(match ee in nat return (\lambda (_: +nat).Prop) with [O \Rightarrow False | (S _) \Rightarrow True])) I O H7) in +(False_ind (ex2 C (\lambda (e1: C).(drop (S i0) O (CSort n) e1)) (\lambda +(e1: C).(drop h (minus (S d0) (S i0)) e1 (CSort n)))) H9)) e2 H6)))) +(drop_gen_sort n (S i0) O e2 H5)))))) (drop_gen_sort n h (S d0) c2 H0)))))))) +(\lambda (c2: C).(\lambda (IHc: ((\forall (c3: C).(\forall (h: nat).((drop h +(S d0) c2 c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to (ex2 C (\lambda +(e1: C).(drop (S i0) O c2 e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) +e1 e2)))))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: +T).(\forall (c3: C).(\forall (h: nat).((drop h (S d0) (CHead c2 k0 t) c3) \to +(\forall (e2: C).((drop (S i0) O c3 e2) \to (ex2 C (\lambda (e1: C).(drop (S +i0) O (CHead c2 k0 t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 +e2)))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (c3: C).(\lambda (h: +nat).(\lambda (H0: (drop h (S d0) (CHead c2 (Bind b) t) c3)).(\lambda (e2: +C).(\lambda (H1: (drop (S i0) O c3 e2)).(ex3_2_ind C T (\lambda (e: +C).(\lambda (v: T).(eq C c3 (CHead e (Bind b) v)))) (\lambda (_: C).(\lambda +(v: T).(eq T t (lift h (r (Bind b) d0) v)))) (\lambda (e: C).(\lambda (_: +T).(drop h (r (Bind b) d0) c2 e))) (ex2 C (\lambda (e1: C).(drop (S i0) O +(CHead c2 (Bind b) t) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 +e2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C c3 (CHead x0 +(Bind b) x1))).(\lambda (H3: (eq T t (lift h (r (Bind b) d0) x1))).(\lambda +(H4: (drop h (r (Bind b) d0) c2 x0)).(let H5 \def (eq_ind C c3 (\lambda (c: +C).(drop (S i0) O c e2)) H1 (CHead x0 (Bind b) x1) H2) in (eq_ind_r T (lift h +(r (Bind b) d0) x1) (\lambda (t0: T).(ex2 C (\lambda (e1: C).(drop (S i0) O +(CHead c2 (Bind b) t0) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 +e2)))) (ex2_ind C (\lambda (e1: C).(drop i0 O c2 e1)) (\lambda (e1: C).(drop +h (minus d0 i0) e1 e2)) (ex2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 +(Bind b) (lift h (r (Bind b) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S +d0) (S i0)) e1 e2))) (\lambda (x: C).(\lambda (H6: (drop i0 O c2 x)).(\lambda +(H7: (drop h (minus d0 i0) x e2)).(ex_intro2 C (\lambda (e1: C).(drop (S i0) +O (CHead c2 (Bind b) (lift h (r (Bind b) d0) x1)) e1)) (\lambda (e1: C).(drop +h (minus (S d0) (S i0)) e1 e2)) x (drop_drop (Bind b) i0 c2 x H6 (lift h (r +(Bind b) d0) x1)) H7)))) (IHi d0 (le_S_n i0 d0 H) c2 x0 h H4 e2 +(drop_gen_drop (Bind b) x0 e2 x1 i0 H5))) t H3))))))) (drop_gen_skip_l c2 c3 +t h d0 (Bind b) H0))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (c3: +C).(\lambda (h: nat).(\lambda (H0: (drop h (S d0) (CHead c2 (Flat f) t) +c3)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c3 e2)).(ex3_2_ind C T +(\lambda (e: C).(\lambda (v: T).(eq C c3 (CHead e (Flat f) v)))) (\lambda (_: +C).(\lambda (v: T).(eq T t (lift h (r (Flat f) d0) v)))) (\lambda (e: +C).(\lambda (_: T).(drop h (r (Flat f) d0) c2 e))) (ex2 C (\lambda (e1: +C).(drop (S i0) O (CHead c2 (Flat f) t) e1)) (\lambda (e1: C).(drop h (minus +(S d0) (S i0)) e1 e2))) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C +c3 (CHead x0 (Flat f) x1))).(\lambda (H3: (eq T t (lift h (r (Flat f) d0) +x1))).(\lambda (H4: (drop h (r (Flat f) d0) c2 x0)).(let H5 \def (eq_ind C c3 +(\lambda (c: C).(drop (S i0) O c e2)) H1 (CHead x0 (Flat f) x1) H2) in +(eq_ind_r T (lift h (r (Flat f) d0) x1) (\lambda (t0: T).(ex2 C (\lambda (e1: +C).(drop (S i0) O (CHead c2 (Flat f) t0) e1)) (\lambda (e1: C).(drop h (minus +(S d0) (S i0)) e1 e2)))) (ex2_ind C (\lambda (e1: C).(drop (S i0) O c2 e1)) +(\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2)) (ex2 C (\lambda (e1: +C).(drop (S i0) O (CHead c2 (Flat f) (lift h (r (Flat f) d0) x1)) e1)) +(\lambda (e1: C).(drop h (minus (S d0) (S i0)) e1 e2))) (\lambda (x: +C).(\lambda (H6: (drop (S i0) O c2 x)).(\lambda (H7: (drop h (minus (S d0) (S +i0)) x e2)).(ex_intro2 C (\lambda (e1: C).(drop (S i0) O (CHead c2 (Flat f) +(lift h (r (Flat f) d0) x1)) e1)) (\lambda (e1: C).(drop h (minus (S d0) (S +i0)) e1 e2)) x (drop_drop (Flat f) i0 c2 x H6 (lift h (r (Flat f) d0) x1)) +H7)))) (IHc x0 h H4 e2 (drop_gen_drop (Flat f) x0 e2 x1 i0 H5))) t H3))))))) +(drop_gen_skip_l c2 c3 t h d0 (Flat f) H0))))))))) k)))) c1))))) d)))) i). + +theorem drop_trans_ge: + \forall (i: nat).(\forall (c1: C).(\forall (c2: C).(\forall (d: +nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: C).((drop i O c2 +e2) \to ((le d i) \to (drop (plus i h) O c1 e2))))))))) +\def + \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (c2: +C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall (e2: +C).((drop n O c2 e2) \to ((le d n) \to (drop (plus n h) O c1 e2)))))))))) +(\lambda (c1: C).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: +nat).(\lambda (H: (drop h d c1 c2)).(\lambda (e2: C).(\lambda (H0: (drop O O +c2 e2)).(\lambda (H1: (le d O)).(eq_ind C c2 (\lambda (c: C).(drop (plus O h) +O c1 c)) (let H2 \def (match H1 in le return (\lambda (n: nat).(\lambda (_: +(le ? n)).((eq nat n O) \to (drop (plus O h) O c1 c2)))) with [le_n +\Rightarrow (\lambda (H0: (eq nat d O)).(eq_ind nat O (\lambda (_: nat).(drop +(plus O h) O c1 c2)) (let H2 \def (eq_ind nat d (\lambda (n: nat).(le n O)) +H1 O H0) in (let H3 \def (eq_ind nat d (\lambda (n: nat).(drop h n c1 c2)) H +O H0) in H3)) d (sym_eq nat d O H0))) | (le_S m H0) \Rightarrow (\lambda (H2: +(eq nat (S m) O)).((let H1 \def (eq_ind nat (S m) (\lambda (e: nat).(match e +in nat return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) +\Rightarrow True])) I O H2) in (False_ind ((le d m) \to (drop (plus O h) O c1 +c2)) H1)) H0))]) in (H2 (refl_equal nat O))) e2 (drop_gen_refl c2 e2 +H0)))))))))) (\lambda (i0: nat).(\lambda (IHi: ((\forall (c1: C).(\forall +(c2: C).(\forall (d: nat).(\forall (h: nat).((drop h d c1 c2) \to (\forall +(e2: C).((drop i0 O c2 e2) \to ((le d i0) \to (drop (plus i0 h) O c1 +e2))))))))))).(\lambda (c1: C).(C_ind (\lambda (c: C).(\forall (c2: +C).(\forall (d: nat).(\forall (h: nat).((drop h d c c2) \to (\forall (e2: +C).((drop (S i0) O c2 e2) \to ((le d (S i0)) \to (drop (plus (S i0) h) O c +e2))))))))) (\lambda (n: nat).(\lambda (c2: C).(\lambda (d: nat).(\lambda (h: +nat).(\lambda (H: (drop h d (CSort n) c2)).(\lambda (e2: C).(\lambda (H0: +(drop (S i0) O c2 e2)).(\lambda (H1: (le d (S i0))).(and3_ind (eq C c2 (CSort +n)) (eq nat h O) (eq nat d O) (drop (S (plus i0 h)) O (CSort n) e2) (\lambda +(H2: (eq C c2 (CSort n))).(\lambda (H3: (eq nat h O)).(\lambda (H4: (eq nat d +O)).(eq_ind_r nat O (\lambda (n0: nat).(drop (S (plus i0 n0)) O (CSort n) +e2)) (let H5 \def (eq_ind nat d (\lambda (n: nat).(le n (S i0))) H1 O H4) in +(let H6 \def (eq_ind C c2 (\lambda (c: C).(drop (S i0) O c e2)) H0 (CSort n) +H2) in (and3_ind (eq C e2 (CSort n)) (eq nat (S i0) O) (eq nat O O) (drop (S +(plus i0 O)) O (CSort n) e2) (\lambda (H7: (eq C e2 (CSort n))).(\lambda (H8: +(eq nat (S i0) O)).(\lambda (_: (eq nat O O)).(eq_ind_r C (CSort n) (\lambda +(c: C).(drop (S (plus i0 O)) O (CSort n) c)) (let H10 \def (eq_ind nat (S i0) +(\lambda (ee: nat).(match ee in nat return (\lambda (_: nat).Prop) with [O +\Rightarrow False | (S _) \Rightarrow True])) I O H8) in (False_ind (drop (S +(plus i0 O)) O (CSort n) (CSort n)) H10)) e2 H7)))) (drop_gen_sort n (S i0) O +e2 H6)))) h H3)))) (drop_gen_sort n h d c2 H)))))))))) (\lambda (c2: +C).(\lambda (IHc: ((\forall (c3: C).(\forall (d: nat).(\forall (h: +nat).((drop h d c2 c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le d +(S i0)) \to (drop (S (plus i0 h)) O c2 e2)))))))))).(\lambda (k: K).(\lambda +(t: T).(\lambda (c3: C).(\lambda (d: nat).(nat_ind (\lambda (n: nat).(\forall +(h: nat).((drop h n (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O +c3 e2) \to ((le n (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) +e2))))))) (\lambda (h: nat).(nat_ind (\lambda (n: nat).((drop n O (CHead c2 k +t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le O (S i0)) \to +(drop (S (plus i0 n)) O (CHead c2 k t) e2)))))) (\lambda (H: (drop O O (CHead +c2 k t) c3)).(\lambda (e2: C).(\lambda (H0: (drop (S i0) O c3 e2)).(\lambda +(_: (le O (S i0))).(let H2 \def (eq_ind_r C c3 (\lambda (c: C).(drop (S i0) O +c e2)) H0 (CHead c2 k t) (drop_gen_refl (CHead c2 k t) c3 H)) in (eq_ind nat +i0 (\lambda (n: nat).(drop (S n) O (CHead c2 k t) e2)) (drop_drop k i0 c2 e2 +(drop_gen_drop k c2 e2 t i0 H2) t) (plus i0 O) (plus_n_O i0))))))) (\lambda +(n: nat).(\lambda (_: (((drop n O (CHead c2 k t) c3) \to (\forall (e2: +C).((drop (S i0) O c3 e2) \to ((le O (S i0)) \to (drop (S (plus i0 n)) O +(CHead c2 k t) e2))))))).(\lambda (H0: (drop (S n) O (CHead c2 k t) +c3)).(\lambda (e2: C).(\lambda (H1: (drop (S i0) O c3 e2)).(\lambda (H2: (le +O (S i0))).(eq_ind nat (S (plus i0 n)) (\lambda (n0: nat).(drop (S n0) O +(CHead c2 k t) e2)) (drop_drop k (S (plus i0 n)) c2 e2 (eq_ind_r nat (S (r k +(plus i0 n))) (\lambda (n0: nat).(drop n0 O c2 e2)) (eq_ind_r nat (plus i0 (r +k n)) (\lambda (n0: nat).(drop (S n0) O c2 e2)) (IHc c3 O (r k n) +(drop_gen_drop k c2 c3 t n H0) e2 H1 H2) (r k (plus i0 n)) (r_plus_sym k i0 +n)) (r k (S (plus i0 n))) (r_S k (plus i0 n))) t) (plus i0 (S n)) (plus_n_Sm +i0 n)))))))) h)) (\lambda (d0: nat).(\lambda (IHd: ((\forall (h: nat).((drop +h d0 (CHead c2 k t) c3) \to (\forall (e2: C).((drop (S i0) O c3 e2) \to ((le +d0 (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) e2)))))))).(\lambda (h: +nat).(\lambda (H: (drop h (S d0) (CHead c2 k t) c3)).(\lambda (e2: +C).(\lambda (H0: (drop (S i0) O c3 e2)).(\lambda (H1: (le (S d0) (S +i0))).(ex3_2_ind C T (\lambda (e: C).(\lambda (v: T).(eq C c3 (CHead e k +v)))) (\lambda (_: C).(\lambda (v: T).(eq T t (lift h (r k d0) v)))) (\lambda +(e: C).(\lambda (_: T).(drop h (r k d0) c2 e))) (drop (S (plus i0 h)) O +(CHead c2 k t) e2) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H2: (eq C c3 +(CHead x0 k x1))).(\lambda (H3: (eq T t (lift h (r k d0) x1))).(\lambda (H4: +(drop h (r k d0) c2 x0)).(let H5 \def (eq_ind C c3 (\lambda (c: C).(\forall +(h: nat).((drop h d0 (CHead c2 k t) c) \to (\forall (e2: C).((drop (S i0) O c +e2) \to ((le d0 (S i0)) \to (drop (S (plus i0 h)) O (CHead c2 k t) e2))))))) +IHd (CHead x0 k x1) H2) in (let H6 \def (eq_ind C c3 (\lambda (c: C).(drop (S +i0) O c e2)) H0 (CHead x0 k x1) H2) in (let H7 \def (eq_ind T t (\lambda (t: +T).(\forall (h: nat).((drop h d0 (CHead c2 k t) (CHead x0 k x1)) \to (\forall +(e2: C).((drop (S i0) O (CHead x0 k x1) e2) \to ((le d0 (S i0)) \to (drop (S +(plus i0 h)) O (CHead c2 k t) e2))))))) H5 (lift h (r k d0) x1) H3) in +(eq_ind_r T (lift h (r k d0) x1) (\lambda (t0: T).(drop (S (plus i0 h)) O +(CHead c2 k t0) e2)) (drop_drop k (plus i0 h) c2 e2 (K_ind (\lambda (k0: +K).((drop h (r k0 d0) c2 x0) \to ((drop (r k0 i0) O x0 e2) \to (drop (r k0 +(plus i0 h)) O c2 e2)))) (\lambda (b: B).(\lambda (H8: (drop h (r (Bind b) +d0) c2 x0)).(\lambda (H9: (drop (r (Bind b) i0) O x0 e2)).(IHi c2 x0 (r (Bind +b) d0) h H8 e2 H9 (le_S_n (r (Bind b) d0) i0 H1))))) (\lambda (f: F).(\lambda +(H8: (drop h (r (Flat f) d0) c2 x0)).(\lambda (H9: (drop (r (Flat f) i0) O x0 +e2)).(IHc x0 (r (Flat f) d0) h H8 e2 H9 H1)))) k H4 (drop_gen_drop k x0 e2 x1 +i0 H6)) (lift h (r k d0) x1)) t H3))))))))) (drop_gen_skip_l c2 c3 t h d0 k +H))))))))) d))))))) c1)))) i). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/defs.ma new file mode 100644 index 000000000..da4cb9245 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/defs.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/defs". + +include "T/defs.ma". + +definition lref_map: + ((nat \to nat)) \to (nat \to (T \to T)) +\def + let rec lref_map (f: ((nat \to nat))) (d: nat) (t: T) on t: T \def (match t +with [(TSort n) \Rightarrow (TSort n) | (TLRef i) \Rightarrow (TLRef (match +(blt i d) with [true \Rightarrow i | false \Rightarrow (f i)])) | (THead k u +t0) \Rightarrow (THead k (lref_map f d u) (lref_map f (s k d) t0))]) in +lref_map. + +definition lift: + nat \to (nat \to (T \to T)) +\def + \lambda (h: nat).(\lambda (i: nat).(\lambda (t: T).(lref_map (\lambda (x: +nat).(plus x h)) i t))). + +definition lifts: + nat \to (nat \to (TList \to TList)) +\def + let rec lifts (h: nat) (d: nat) (ts: TList) on ts: TList \def (match ts with +[TNil \Rightarrow TNil | (TCons t ts0) \Rightarrow (TCons (lift h d t) (lifts +h d ts0))]) in lifts. + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd.ma new file mode 100644 index 000000000..ba33d1441 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd.ma @@ -0,0 +1,651 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd". + +include "lift/defs.ma". + +theorem lift_sort: + \forall (n: nat).(\forall (h: nat).(\forall (d: nat).(eq T (lift h d (TSort +n)) (TSort n)))) +\def + \lambda (n: nat).(\lambda (_: nat).(\lambda (_: nat).(refl_equal T (TSort +n)))). + +theorem lift_lref_lt: + \forall (n: nat).(\forall (h: nat).(\forall (d: nat).((lt n d) \to (eq T +(lift h d (TLRef n)) (TLRef n))))) +\def + \lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (lt n +d)).(eq_ind bool true (\lambda (b: bool).(eq T (TLRef (match b with [true +\Rightarrow n | false \Rightarrow (plus n h)])) (TLRef n))) (refl_equal T +(TLRef n)) (blt n d) (sym_equal bool (blt n d) true (lt_blt d n H)))))). + +theorem lift_lref_ge: + \forall (n: nat).(\forall (h: nat).(\forall (d: nat).((le d n) \to (eq T +(lift h d (TLRef n)) (TLRef (plus n h)))))) +\def + \lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (le d +n)).(eq_ind bool false (\lambda (b: bool).(eq T (TLRef (match b with [true +\Rightarrow n | false \Rightarrow (plus n h)])) (TLRef (plus n h)))) +(refl_equal T (TLRef (plus n h))) (blt n d) (sym_equal bool (blt n d) false +(le_bge d n H)))))). + +theorem lift_head: + \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall +(d: nat).(eq T (lift h d (THead k u t)) (THead k (lift h d u) (lift h (s k d) +t))))))) +\def + \lambda (k: K).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda +(d: nat).(refl_equal T (THead k (lift h d u) (lift h (s k d) t))))))). + +theorem lift_bind: + \forall (b: B).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall +(d: nat).(eq T (lift h d (THead (Bind b) u t)) (THead (Bind b) (lift h d u) +(lift h (S d) t))))))) +\def + \lambda (b: B).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda +(d: nat).(refl_equal T (THead (Bind b) (lift h d u) (lift h (S d) t))))))). + +theorem lift_flat: + \forall (f: F).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall +(d: nat).(eq T (lift h d (THead (Flat f) u t)) (THead (Flat f) (lift h d u) +(lift h d t))))))) +\def + \lambda (f: F).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda +(d: nat).(refl_equal T (THead (Flat f) (lift h d u) (lift h d t))))))). + +theorem lift_gen_sort: + \forall (h: nat).(\forall (d: nat).(\forall (n: nat).(\forall (t: T).((eq T +(TSort n) (lift h d t)) \to (eq T t (TSort n)))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (t: T).(T_ind +(\lambda (t0: T).((eq T (TSort n) (lift h d t0)) \to (eq T t0 (TSort n)))) +(\lambda (n0: nat).(\lambda (H: (eq T (TSort n) (lift h d (TSort +n0)))).(sym_eq T (TSort n) (TSort n0) H))) (\lambda (n0: nat).(\lambda (H: +(eq T (TSort n) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TSort +n)) (\lambda (H0: (lt n0 d)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) +(\lambda (t: T).(eq T (TSort n) t)) H (TLRef n0) (lift_lref_lt n0 h d H0)) in +(let H2 \def (match H1 in eq return (\lambda (t: T).(\lambda (_: (eq ? ? +t)).((eq T t (TLRef n0)) \to (eq T (TLRef n0) (TSort n))))) with [refl_equal +\Rightarrow (\lambda (H1: (eq T (TSort n) (TLRef n0))).(let H2 \def (eq_ind T +(TSort n) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with +[(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow False])) I (TLRef n0) H1) in (False_ind (eq T (TLRef n0) (TSort +n)) H2)))]) in (H2 (refl_equal T (TLRef n0)))))) (\lambda (H0: (le d +n0)).(let H1 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T +(TSort n) t)) H (TLRef (plus n0 h)) (lift_lref_ge n0 h d H0)) in (let H2 \def +(match H1 in eq return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t +(TLRef (plus n0 h))) \to (eq T (TLRef n0) (TSort n))))) with [refl_equal +\Rightarrow (\lambda (H1: (eq T (TSort n) (TLRef (plus n0 h)))).(let H2 \def +(eq_ind T (TSort n) (\lambda (e: T).(match e in T return (\lambda (_: +T).Prop) with [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | +(THead _ _ _) \Rightarrow False])) I (TLRef (plus n0 h)) H1) in (False_ind +(eq T (TLRef n0) (TSort n)) H2)))]) in (H2 (refl_equal T (TLRef (plus n0 +h)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TSort n) +(lift h d t0)) \to (eq T t0 (TSort n))))).(\lambda (t1: T).(\lambda (_: (((eq +T (TSort n) (lift h d t1)) \to (eq T t1 (TSort n))))).(\lambda (H1: (eq T +(TSort n) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d +(THead k t0 t1)) (\lambda (t: T).(eq T (TSort n) t)) H1 (THead k (lift h d +t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (match H2 +in eq return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k (lift +h d t0) (lift h (s k d) t1))) \to (eq T (THead k t0 t1) (TSort n))))) with +[refl_equal \Rightarrow (\lambda (H2: (eq T (TSort n) (THead k (lift h d t0) +(lift h (s k d) t1)))).(let H3 \def (eq_ind T (TSort n) (\lambda (e: +T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow +True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow False])) I +(THead k (lift h d t0) (lift h (s k d) t1)) H2) in (False_ind (eq T (THead k +t0 t1) (TSort n)) H3)))]) in (H3 (refl_equal T (THead k (lift h d t0) (lift h +(s k d) t1)))))))))))) t)))). + +theorem lift_gen_lref: + \forall (t: T).(\forall (d: nat).(\forall (h: nat).(\forall (i: nat).((eq T +(TLRef i) (lift h d t)) \to (or (land (lt i d) (eq T t (TLRef i))) (land (le +(plus d h) i) (eq T t (TLRef (minus i h))))))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(\forall (h: +nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t0)) \to (or (land (lt i d) +(eq T t0 (TLRef i))) (land (le (plus d h) i) (eq T t0 (TLRef (minus i +h)))))))))) (\lambda (n: nat).(\lambda (d: nat).(\lambda (h: nat).(\lambda +(i: nat).(\lambda (H: (eq T (TLRef i) (lift h d (TSort n)))).(let H0 \def +(eq_ind T (lift h d (TSort n)) (\lambda (t: T).(eq T (TLRef i) t)) H (TSort +n) (lift_sort n h d)) in (let H1 \def (eq_ind T (TLRef i) (\lambda (ee: +T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I +(TSort n) H0) in (False_ind (or (land (lt i d) (eq T (TSort n) (TLRef i))) +(land (le (plus d h) i) (eq T (TSort n) (TLRef (minus i h))))) H1)))))))) +(\lambda (n: nat).(\lambda (d: nat).(\lambda (h: nat).(\lambda (i: +nat).(\lambda (H: (eq T (TLRef i) (lift h d (TLRef n)))).(lt_le_e n d (or +(land (lt i d) (eq T (TLRef n) (TLRef i))) (land (le (plus d h) i) (eq T +(TLRef n) (TLRef (minus i h))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind +T (lift h d (TLRef n)) (\lambda (t: T).(eq T (TLRef i) t)) H (TLRef n) +(lift_lref_lt n h d H0)) in (let H2 \def (f_equal T nat (\lambda (e: +T).(match e in T return (\lambda (_: T).nat) with [(TSort _) \Rightarrow i | +(TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) (TLRef i) (TLRef n) +H1) in (eq_ind_r nat n (\lambda (n0: nat).(or (land (lt n0 d) (eq T (TLRef n) +(TLRef n0))) (land (le (plus d h) n0) (eq T (TLRef n) (TLRef (minus n0 +h)))))) (or_introl (land (lt n d) (eq T (TLRef n) (TLRef n))) (land (le (plus +d h) n) (eq T (TLRef n) (TLRef (minus n h)))) (conj (lt n d) (eq T (TLRef n) +(TLRef n)) H0 (refl_equal T (TLRef n)))) i H2)))) (\lambda (H0: (le d +n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t: T).(eq T (TLRef +i) t)) H (TLRef (plus n h)) (lift_lref_ge n h d H0)) in (let H2 \def (f_equal +T nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with [(TSort +_) \Rightarrow i | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow i])) +(TLRef i) (TLRef (plus n h)) H1) in (eq_ind_r nat (plus n h) (\lambda (n0: +nat).(or (land (lt n0 d) (eq T (TLRef n) (TLRef n0))) (land (le (plus d h) +n0) (eq T (TLRef n) (TLRef (minus n0 h)))))) (eq_ind_r nat n (\lambda (n0: +nat).(or (land (lt (plus n h) d) (eq T (TLRef n) (TLRef (plus n h)))) (land +(le (plus d h) (plus n h)) (eq T (TLRef n) (TLRef n0))))) (or_intror (land +(lt (plus n h) d) (eq T (TLRef n) (TLRef (plus n h)))) (land (le (plus d h) +(plus n h)) (eq T (TLRef n) (TLRef n))) (conj (le (plus d h) (plus n h)) (eq +T (TLRef n) (TLRef n)) (plus_le_compat d n h h H0 (le_n h)) (refl_equal T +(TLRef n)))) (minus (plus n h) h) (minus_plus_r n h)) i H2)))))))))) (\lambda +(k: K).(\lambda (t0: T).(\lambda (_: ((\forall (d: nat).(\forall (h: +nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t0)) \to (or (land (lt i d) +(eq T t0 (TLRef i))) (land (le (plus d h) i) (eq T t0 (TLRef (minus i +h))))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (d: nat).(\forall (h: +nat).(\forall (i: nat).((eq T (TLRef i) (lift h d t1)) \to (or (land (lt i d) +(eq T t1 (TLRef i))) (land (le (plus d h) i) (eq T t1 (TLRef (minus i +h))))))))))).(\lambda (d: nat).(\lambda (h: nat).(\lambda (i: nat).(\lambda +(H1: (eq T (TLRef i) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T +(lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TLRef i) t)) H1 (THead k +(lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def +(eq_ind T (TLRef i) (\lambda (ee: T).(match ee in T return (\lambda (_: +T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) +t1)) H2) in (False_ind (or (land (lt i d) (eq T (THead k t0 t1) (TLRef i))) +(land (le (plus d h) i) (eq T (THead k t0 t1) (TLRef (minus i h))))) +H3)))))))))))) t). + +theorem lift_gen_lref_lt: + \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((lt n d) \to (\forall +(t: T).((eq T (TLRef n) (lift h d t)) \to (eq T t (TLRef n))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (lt n +d)).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TLRef n) (lift h d t0)) +\to (eq T t0 (TLRef n)))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef n) +(lift h d (TSort n0)))).(sym_eq T (TLRef n) (TSort n0) H0))) (\lambda (n0: +nat).(\lambda (H0: (eq T (TLRef n) (lift h d (TLRef n0)))).(lt_le_e n0 d (eq +T (TLRef n0) (TLRef n)) (\lambda (H1: (lt n0 d)).(let H2 \def (eq_ind T (lift +h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef n) t)) H0 (TLRef n0) +(lift_lref_lt n0 h d H1)) in (sym_eq T (TLRef n) (TLRef n0) H2))) (\lambda +(H1: (le d n0)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: +T).(eq T (TLRef n) t)) H0 (TLRef (plus n0 h)) (lift_lref_ge n0 h d H1)) in +(let H3 \def (match H2 in eq return (\lambda (t: T).(\lambda (_: (eq ? ? +t)).((eq T t (TLRef (plus n0 h))) \to (eq T (TLRef n0) (TLRef n))))) with +[refl_equal \Rightarrow (\lambda (H2: (eq T (TLRef n) (TLRef (plus n0 +h)))).(let H3 \def (f_equal T nat (\lambda (e: T).(match e in T return +(\lambda (_: T).nat) with [(TSort _) \Rightarrow n | (TLRef n) \Rightarrow n +| (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef (plus n0 h)) H2) in (eq_ind +nat (plus n0 h) (\lambda (n: nat).(eq T (TLRef n0) (TLRef n))) (let H0 \def +(eq_ind nat n (\lambda (n: nat).(lt n d)) H (plus n0 h) H3) in (le_false d n0 +(eq T (TLRef n0) (TLRef (plus n0 h))) H1 (lt_le_S n0 d (le_lt_trans n0 (plus +n0 h) d (le_plus_l n0 h) H0)))) n (sym_eq nat n (plus n0 h) H3))))]) in (H3 +(refl_equal T (TLRef (plus n0 h)))))))))) (\lambda (k: K).(\lambda (t0: +T).(\lambda (_: (((eq T (TLRef n) (lift h d t0)) \to (eq T t0 (TLRef +n))))).(\lambda (t1: T).(\lambda (_: (((eq T (TLRef n) (lift h d t1)) \to (eq +T t1 (TLRef n))))).(\lambda (H2: (eq T (TLRef n) (lift h d (THead k t0 +t1)))).(let H3 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq +T (TLRef n) t)) H2 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k +t0 t1 h d)) in (let H4 \def (match H3 in eq return (\lambda (t: T).(\lambda +(_: (eq ? ? t)).((eq T t (THead k (lift h d t0) (lift h (s k d) t1))) \to (eq +T (THead k t0 t1) (TLRef n))))) with [refl_equal \Rightarrow (\lambda (H3: +(eq T (TLRef n) (THead k (lift h d t0) (lift h (s k d) t1)))).(let H4 \def +(eq_ind T (TLRef n) (\lambda (e: T).(match e in T return (\lambda (_: +T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (THead k (lift h d t0) (lift h (s k d) +t1)) H3) in (False_ind (eq T (THead k t0 t1) (TLRef n)) H4)))]) in (H4 +(refl_equal T (THead k (lift h d t0) (lift h (s k d) t1)))))))))))) t))))). + +theorem lift_gen_lref_false: + \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((le d n) \to ((lt n +(plus d h)) \to (\forall (t: T).((eq T (TLRef n) (lift h d t)) \to (\forall +(P: Prop).P))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (le d +n)).(\lambda (H0: (lt n (plus d h))).(\lambda (t: T).(T_ind (\lambda (t0: +T).((eq T (TLRef n) (lift h d t0)) \to (\forall (P: Prop).P))) (\lambda (n0: +nat).(\lambda (H1: (eq T (TLRef n) (lift h d (TSort n0)))).(\lambda (P: +Prop).(let H2 \def (match H1 in eq return (\lambda (t: T).(\lambda (_: (eq ? +? t)).((eq T t (lift h d (TSort n0))) \to P))) with [refl_equal \Rightarrow +(\lambda (H2: (eq T (TLRef n) (lift h d (TSort n0)))).(let H3 \def (eq_ind T +(TLRef n) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) +\Rightarrow False])) I (lift h d (TSort n0)) H2) in (False_ind P H3)))]) in +(H2 (refl_equal T (lift h d (TSort n0)))))))) (\lambda (n0: nat).(\lambda +(H1: (eq T (TLRef n) (lift h d (TLRef n0)))).(\lambda (P: Prop).(lt_le_e n0 d +P (\lambda (H2: (lt n0 d)).(let H3 \def (eq_ind T (lift h d (TLRef n0)) +(\lambda (t: T).(eq T (TLRef n) t)) H1 (TLRef n0) (lift_lref_lt n0 h d H2)) +in (let H4 \def (match H3 in eq return (\lambda (t: T).(\lambda (_: (eq ? ? +t)).((eq T t (TLRef n0)) \to P))) with [refl_equal \Rightarrow (\lambda (H3: +(eq T (TLRef n) (TLRef n0))).(let H4 \def (f_equal T nat (\lambda (e: +T).(match e in T return (\lambda (_: T).nat) with [(TSort _) \Rightarrow n | +(TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef n0) +H3) in (eq_ind nat n0 (\lambda (_: nat).P) (let H1 \def (eq_ind_r nat n0 +(\lambda (n: nat).(lt n d)) H2 n H4) in (le_false d n P H H1)) n (sym_eq nat +n n0 H4))))]) in (H4 (refl_equal T (TLRef n0)))))) (\lambda (H2: (le d +n0)).(let H3 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T +(TLRef n) t)) H1 (TLRef (plus n0 h)) (lift_lref_ge n0 h d H2)) in (let H4 +\def (match H3 in eq return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t +(TLRef (plus n0 h))) \to P))) with [refl_equal \Rightarrow (\lambda (H3: (eq +T (TLRef n) (TLRef (plus n0 h)))).(let H4 \def (f_equal T nat (\lambda (e: +T).(match e in T return (\lambda (_: T).nat) with [(TSort _) \Rightarrow n | +(TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow n])) (TLRef n) (TLRef +(plus n0 h)) H3) in (eq_ind nat (plus n0 h) (\lambda (_: nat).P) (let H1 \def +(eq_ind nat n (\lambda (n: nat).(lt n (plus d h))) H0 (plus n0 h) H4) in +(le_false d n0 P H2 (lt_le_S n0 d (simpl_lt_plus_r h n0 d H1)))) n (sym_eq +nat n (plus n0 h) H4))))]) in (H4 (refl_equal T (TLRef (plus n0 h))))))))))) +(\lambda (k: K).(\lambda (t0: T).(\lambda (_: (((eq T (TLRef n) (lift h d +t0)) \to (\forall (P: Prop).P)))).(\lambda (t1: T).(\lambda (_: (((eq T +(TLRef n) (lift h d t1)) \to (\forall (P: Prop).P)))).(\lambda (H3: (eq T +(TLRef n) (lift h d (THead k t0 t1)))).(\lambda (P: Prop).(let H4 \def +(eq_ind T (lift h d (THead k t0 t1)) (\lambda (t: T).(eq T (TLRef n) t)) H3 +(THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in (let +H5 \def (match H4 in eq return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq +T t (THead k (lift h d t0) (lift h (s k d) t1))) \to P))) with [refl_equal +\Rightarrow (\lambda (H4: (eq T (TLRef n) (THead k (lift h d t0) (lift h (s k +d) t1)))).(let H5 \def (eq_ind T (TLRef n) (\lambda (e: T).(match e in T +return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow True | (THead _ _ _) \Rightarrow False])) I (THead k (lift h d +t0) (lift h (s k d) t1)) H4) in (False_ind P H5)))]) in (H5 (refl_equal T +(THead k (lift h d t0) (lift h (s k d) t1))))))))))))) t)))))). + +theorem lift_gen_lref_ge: + \forall (h: nat).(\forall (d: nat).(\forall (n: nat).((le d n) \to (\forall +(t: T).((eq T (TLRef (plus n h)) (lift h d t)) \to (eq T t (TLRef n))))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (n: nat).(\lambda (H: (le d +n)).(\lambda (t: T).(T_ind (\lambda (t0: T).((eq T (TLRef (plus n h)) (lift h +d t0)) \to (eq T t0 (TLRef n)))) (\lambda (n0: nat).(\lambda (H0: (eq T +(TLRef (plus n h)) (lift h d (TSort n0)))).(let H1 \def (match H0 in eq +return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (lift h d (TSort +n0))) \to (eq T (TSort n0) (TLRef n))))) with [refl_equal \Rightarrow +(\lambda (H1: (eq T (TLRef (plus n h)) (lift h d (TSort n0)))).(let H2 \def +(eq_ind T (TLRef (plus n h)) (\lambda (e: T).(match e in T return (\lambda +(_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (lift h d (TSort n0)) H1) in (False_ind +(eq T (TSort n0) (TLRef n)) H2)))]) in (H1 (refl_equal T (lift h d (TSort +n0))))))) (\lambda (n0: nat).(\lambda (H0: (eq T (TLRef (plus n h)) (lift h d +(TLRef n0)))).(lt_le_e n0 d (eq T (TLRef n0) (TLRef n)) (\lambda (H1: (lt n0 +d)).(let H2 \def (eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef +(plus n h)) t)) H0 (TLRef n0) (lift_lref_lt n0 h d H1)) in (let H3 \def +(match H2 in eq return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t +(TLRef n0)) \to (eq T (TLRef n0) (TLRef n))))) with [refl_equal \Rightarrow +(\lambda (H2: (eq T (TLRef (plus n h)) (TLRef n0))).(let H3 \def (f_equal T +nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with [(TSort _) +\Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: +nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in +plus) n h) | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow ((let rec +plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O +\Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h)])) (TLRef +(plus n h)) (TLRef n0) H2) in (eq_ind nat (plus n h) (\lambda (n0: nat).(eq T +(TLRef n0) (TLRef n))) (let H0 \def (eq_ind_r nat n0 (\lambda (n: nat).(lt n +d)) H1 (plus n h) H3) in (le_false d n (eq T (TLRef (plus n h)) (TLRef n)) H +(lt_le_S n d (le_lt_trans n (plus n h) d (le_plus_l n h) H0)))) n0 H3)))]) in +(H3 (refl_equal T (TLRef n0)))))) (\lambda (H1: (le d n0)).(let H2 \def +(eq_ind T (lift h d (TLRef n0)) (\lambda (t: T).(eq T (TLRef (plus n h)) t)) +H0 (TLRef (plus n0 h)) (lift_lref_ge n0 h d H1)) in (let H3 \def (match H2 in +eq return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (TLRef (plus n0 +h))) \to (eq T (TLRef n0) (TLRef n))))) with [refl_equal \Rightarrow (\lambda +(H2: (eq T (TLRef (plus n h)) (TLRef (plus n0 h)))).(let H3 \def (f_equal T +nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with [(TSort _) +\Rightarrow ((let rec plus (n: nat) on n: (nat \to nat) \def (\lambda (m: +nat).(match n with [O \Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in +plus) n h) | (TLRef n) \Rightarrow n | (THead _ _ _) \Rightarrow ((let rec +plus (n: nat) on n: (nat \to nat) \def (\lambda (m: nat).(match n with [O +\Rightarrow m | (S p) \Rightarrow (S (plus p m))])) in plus) n h)])) (TLRef +(plus n h)) (TLRef (plus n0 h)) H2) in (eq_ind nat (plus n h) (\lambda (_: +nat).(eq T (TLRef n0) (TLRef n))) (f_equal nat T TLRef n0 n (simpl_plus_r h +n0 n (sym_eq nat (plus n h) (plus n0 h) H3))) (plus n0 h) H3)))]) in (H3 +(refl_equal T (TLRef (plus n0 h)))))))))) (\lambda (k: K).(\lambda (t0: +T).(\lambda (_: (((eq T (TLRef (plus n h)) (lift h d t0)) \to (eq T t0 (TLRef +n))))).(\lambda (t1: T).(\lambda (_: (((eq T (TLRef (plus n h)) (lift h d +t1)) \to (eq T t1 (TLRef n))))).(\lambda (H2: (eq T (TLRef (plus n h)) (lift +h d (THead k t0 t1)))).(let H3 \def (eq_ind T (lift h d (THead k t0 t1)) +(\lambda (t: T).(eq T (TLRef (plus n h)) t)) H2 (THead k (lift h d t0) (lift +h (s k d) t1)) (lift_head k t0 t1 h d)) in (let H4 \def (match H3 in eq +return (\lambda (t: T).(\lambda (_: (eq ? ? t)).((eq T t (THead k (lift h d +t0) (lift h (s k d) t1))) \to (eq T (THead k t0 t1) (TLRef n))))) with +[refl_equal \Rightarrow (\lambda (H3: (eq T (TLRef (plus n h)) (THead k (lift +h d t0) (lift h (s k d) t1)))).(let H4 \def (eq_ind T (TLRef (plus n h)) +(\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) +\Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow +False])) I (THead k (lift h d t0) (lift h (s k d) t1)) H3) in (False_ind (eq +T (THead k t0 t1) (TLRef n)) H4)))]) in (H4 (refl_equal T (THead k (lift h d +t0) (lift h (s k d) t1)))))))))))) t))))). + +theorem lift_gen_head: + \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: +nat).(\forall (d: nat).((eq T (THead k u t) (lift h d x)) \to (ex3_2 T T +(\lambda (y: T).(\lambda (z: T).(eq T x (THead k y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h (s k d) z))))))))))) +\def + \lambda (k: K).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind +(\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k u t) +(lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead +k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda +(_: T).(\lambda (z: T).(eq T t (lift h (s k d) z))))))))) (\lambda (n: +nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k u t) +(lift h d (TSort n)))).(let H0 \def (match H in eq return (\lambda (t0: +T).(\lambda (_: (eq ? ? t0)).((eq T t0 (lift h d (TSort n))) \to (ex3_2 T T +(\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead k y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda +(H0: (eq T (THead k u t) (lift h d (TSort n)))).(let H1 \def (eq_ind T (THead +k u t) (\lambda (e: T).(match e in T return (\lambda (_: T).Prop) with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (lift h d (TSort n)) H0) in (False_ind (ex3_2 T T +(\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead k y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h (s k d) z))))) H1)))]) in (H0 (refl_equal T (lift h d +(TSort n))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H: (eq T (THead k u t) (lift h d (TLRef n)))).(lt_le_e n d +(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h (s k d) z))))) (\lambda (H0: (lt n +d)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead +k u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 in +eq return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef n)) \to +(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h (s k d) z)))))))) with [refl_equal +\Rightarrow (\lambda (H1: (eq T (THead k u t) (TLRef n))).(let H2 \def +(eq_ind T (THead k u t) (\lambda (e: T).(match e in T return (\lambda (_: +T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | +(THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind (ex3_2 T T +(\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h (s k d) z))))) H2)))]) in (H2 (refl_equal T (TLRef n)))))) +(\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda +(t0: T).(eq T (THead k u t) t0)) H (TLRef (plus n h)) (lift_lref_ge n h d +H0)) in (let H2 \def (match H1 in eq return (\lambda (t0: T).(\lambda (_: (eq +? ? t0)).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T T (\lambda (y: +T).(\lambda (z: T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda +(_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift +h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda (H1: (eq T (THead k +u t) (TLRef (plus n h)))).(let H2 \def (eq_ind T (THead k u t) (\lambda (e: +T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I +(TLRef (plus n h)) H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: +T).(eq T (TLRef n) (THead k y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u +(lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k d) +z))))) H2)))]) in (H2 (refl_equal T (TLRef (plus n h)))))))))))) (\lambda +(k0: K).(\lambda (t0: T).(\lambda (_: ((\forall (h: nat).(\forall (d: +nat).((eq T (THead k u t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: +T).(\lambda (z: T).(eq T t0 (THead k y z)))) (\lambda (y: T).(\lambda (_: +T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s +k d) z)))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (h: nat).(\forall +(d: nat).((eq T (THead k u t) (lift h d t1)) \to (ex3_2 T T (\lambda (y: +T).(\lambda (z: T).(eq T t1 (THead k y z)))) (\lambda (y: T).(\lambda (_: +T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s +k d) z)))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T +(THead k u t) (lift h d (THead k0 t0 t1)))).(let H2 \def (eq_ind T (lift h d +(THead k0 t0 t1)) (\lambda (t0: T).(eq T (THead k u t) t0)) H1 (THead k0 +(lift h d t0) (lift h (s k0 d) t1)) (lift_head k0 t0 t1 h d)) in (let H3 \def +(match H2 in eq return (\lambda (t2: T).(\lambda (_: (eq ? ? t2)).((eq T t2 +(THead k0 (lift h d t0) (lift h (s k0 d) t1))) \to (ex3_2 T T (\lambda (y: +T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h (s k d) z)))))))) with [refl_equal \Rightarrow (\lambda +(H2: (eq T (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)))).(let +H3 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) +with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t) +\Rightarrow t])) (THead k u t) (THead k0 (lift h d t0) (lift h (s k0 d) t1)) +H2) in ((let H4 \def (f_equal T T (\lambda (e: T).(match e in T return +(\lambda (_: T).T) with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | +(THead _ t _) \Rightarrow t])) (THead k u t) (THead k0 (lift h d t0) (lift h +(s k0 d) t1)) H2) in ((let H5 \def (f_equal T K (\lambda (e: T).(match e in T +return (\lambda (_: T).K) with [(TSort _) \Rightarrow k | (TLRef _) +\Rightarrow k | (THead k _ _) \Rightarrow k])) (THead k u t) (THead k0 (lift +h d t0) (lift h (s k0 d) t1)) H2) in (eq_ind K k0 (\lambda (k: K).((eq T u +(lift h d t0)) \to ((eq T t (lift h (s k0 d) t1)) \to (ex3_2 T T (\lambda (y: +T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead k y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h (s k d) z)))))))) (\lambda (H6: (eq T u (lift h d +t0))).(eq_ind T (lift h d t0) (\lambda (t2: T).((eq T t (lift h (s k0 d) t1)) +\to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead +k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d y)))) (\lambda +(_: T).(\lambda (z: T).(eq T t (lift h (s k0 d) z))))))) (\lambda (H7: (eq T +t (lift h (s k0 d) t1))).(eq_ind T (lift h (s k0 d) t1) (\lambda (t: +T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) (THead +k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h d +y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (s k0 d) z)))))) +(ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead k0 t0 t1) +(THead k0 y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) (lift h +d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s k0 d) t1) (lift h (s +k0 d) z)))) t0 t1 (refl_equal T (THead k0 t0 t1)) (refl_equal T (lift h d +t0)) (refl_equal T (lift h (s k0 d) t1))) t (sym_eq T t (lift h (s k0 d) t1) +H7))) u (sym_eq T u (lift h d t0) H6))) k (sym_eq K k k0 H5))) H4)) H3)))]) +in (H3 (refl_equal T (THead k0 (lift h d t0) (lift h (s k0 d) +t1)))))))))))))) x)))). + +theorem lift_gen_bind: + \forall (b: B).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: +nat).(\forall (d: nat).((eq T (THead (Bind b) u t) (lift h d x)) \to (ex3_2 T +T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Bind b) y z)))) (\lambda +(y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h (S d) z))))))))))) +\def + \lambda (b: B).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind +(\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u +t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 +(THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d +y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))))))) +(\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T +(THead (Bind b) u t) (lift h d (TSort n)))).(let H0 \def (match H in eq +return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (lift h d (TSort +n))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead +(Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) +(\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with +[refl_equal \Rightarrow (\lambda (H0: (eq T (THead (Bind b) u t) (lift h d +(TSort n)))).(let H1 \def (eq_ind T (THead (Bind b) u t) (\lambda (e: +T).(match e in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I +(lift h d (TSort n)) H0) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda +(z: T).(eq T (TSort n) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: +T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S +d) z))))) H1)))]) in (H0 (refl_equal T (lift h d (TSort n))))))))) (\lambda +(n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Bind +b) u t) (lift h d (TLRef n)))).(lt_le_e n d (ex3_2 T T (\lambda (y: +T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h (S d) z))))) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind +T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Bind b) u t) t0)) H +(TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 in eq return +(\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef n)) \to (ex3_2 T +T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal +\Rightarrow (\lambda (H1: (eq T (THead (Bind b) u t) (TLRef n))).(let H2 \def +(eq_ind T (THead (Bind b) u t) (\lambda (e: T).(match e in T return (\lambda +(_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind (ex3_2 T T +(\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h (S d) z))))) H2)))]) in (H2 (refl_equal T +(TLRef n)))))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d +(TLRef n)) (\lambda (t0: T).(eq T (THead (Bind b) u t) t0)) H (TLRef (plus n +h)) (lift_lref_ge n h d H0)) in (let H2 \def (match H1 in eq return (\lambda +(t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T +T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Bind b) y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal +\Rightarrow (\lambda (H1: (eq T (THead (Bind b) u t) (TLRef (plus n +h)))).(let H2 \def (eq_ind T (THead (Bind b) u t) (\lambda (e: T).(match e in +T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef (plus n h)) +H1) in (False_ind (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) +(THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d +y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z))))) H2)))]) in +(H2 (refl_equal T (TLRef (plus n h)))))))))))) (\lambda (k: K).(\lambda (t0: +T).(\lambda (_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Bind b) u +t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 +(THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d +y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) +z)))))))))).(\lambda (t1: T).(\lambda (_: ((\forall (h: nat).(\forall (d: +nat).((eq T (THead (Bind b) u t) (lift h d t1)) \to (ex3_2 T T (\lambda (y: +T).(\lambda (z: T).(eq T t1 (THead (Bind b) y z)))) (\lambda (y: T).(\lambda +(_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift +h (S d) z)))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (eq T +(THead (Bind b) u t) (lift h d (THead k t0 t1)))).(let H2 \def (eq_ind T +(lift h d (THead k t0 t1)) (\lambda (t0: T).(eq T (THead (Bind b) u t) t0)) +H1 (THead k (lift h d t0) (lift h (s k d) t1)) (lift_head k t0 t1 h d)) in +(let H3 \def (match H2 in eq return (\lambda (t2: T).(\lambda (_: (eq ? ? +t2)).((eq T t2 (THead k (lift h d t0) (lift h (s k d) t1))) \to (ex3_2 T T +(\lambda (y: T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Bind b) y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h (S d) z)))))))) with [refl_equal +\Rightarrow (\lambda (H2: (eq T (THead (Bind b) u t) (THead k (lift h d t0) +(lift h (s k d) t1)))).(let H3 \def (f_equal T T (\lambda (e: T).(match e in +T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | (TLRef _) +\Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead (Bind b) u t) (THead k +(lift h d t0) (lift h (s k d) t1)) H2) in ((let H4 \def (f_equal T T (\lambda +(e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow u +| (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) (THead (Bind b) u +t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let H5 \def (f_equal +T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with [(TSort _) +\Rightarrow (Bind b) | (TLRef _) \Rightarrow (Bind b) | (THead k _ _) +\Rightarrow k])) (THead (Bind b) u t) (THead k (lift h d t0) (lift h (s k d) +t1)) H2) in (eq_ind K (Bind b) (\lambda (k: K).((eq T u (lift h d t0)) \to +((eq T t (lift h (s k d) t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: +T).(eq T (THead k t0 t1) (THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: +T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S +d) z)))))))) (\lambda (H6: (eq T u (lift h d t0))).(eq_ind T (lift h d t0) +(\lambda (t2: T).((eq T t (lift h (s (Bind b) d) t1)) \to (ex3_2 T T (\lambda +(y: T).(\lambda (z: T).(eq T (THead (Bind b) t0 t1) (THead (Bind b) y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h (S d) z))))))) (\lambda (H7: (eq T t (lift +h (s (Bind b) d) t1))).(eq_ind T (lift h (s (Bind b) d) t1) (\lambda (t: +T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Bind b) t0 t1) +(THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) +(lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h (S d) z)))))) +(ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Bind b) t0 t1) +(THead (Bind b) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t0) +(lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s (Bind b) d) +t1) (lift h (S d) z)))) t0 t1 (refl_equal T (THead (Bind b) t0 t1)) +(refl_equal T (lift h d t0)) (refl_equal T (lift h (S d) t1))) t (sym_eq T t +(lift h (s (Bind b) d) t1) H7))) u (sym_eq T u (lift h d t0) H6))) k H5)) +H4)) H3)))]) in (H3 (refl_equal T (THead k (lift h d t0) (lift h (s k d) +t1)))))))))))))) x)))). + +theorem lift_gen_flat: + \forall (f: F).(\forall (u: T).(\forall (t: T).(\forall (x: T).(\forall (h: +nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d x)) \to (ex3_2 T +T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Flat f) y z)))) (\lambda +(y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h d z))))))))))) +\def + \lambda (f: F).(\lambda (u: T).(\lambda (t: T).(\lambda (x: T).(T_ind +(\lambda (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u +t) (lift h d t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 +(THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d +y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))))))) (\lambda +(n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T (THead (Flat +f) u t) (lift h d (TSort n)))).(let H0 \def (match H in eq return (\lambda +(t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (lift h d (TSort n))) \to (ex3_2 +T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Flat f) y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow +(\lambda (H0: (eq T (THead (Flat f) u t) (lift h d (TSort n)))).(let H1 \def +(eq_ind T (THead (Flat f) u t) (\lambda (e: T).(match e in T return (\lambda +(_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead _ _ _) \Rightarrow True])) I (lift h d (TSort n)) H0) in (False_ind +(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TSort n) (THead (Flat f) y +z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h d z))))) H1)))]) in (H0 (refl_equal T +(lift h d (TSort n))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H: (eq T (THead (Flat f) u t) (lift h d (TLRef n)))).(lt_le_e +n d (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat +f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda +(_: T).(\lambda (z: T).(eq T t (lift h d z))))) (\lambda (H0: (lt n d)).(let +H1 \def (eq_ind T (lift h d (TLRef n)) (\lambda (t0: T).(eq T (THead (Flat f) +u t) t0)) H (TLRef n) (lift_lref_lt n h d H0)) in (let H2 \def (match H1 in +eq return (\lambda (t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef n)) \to +(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y +z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow +(\lambda (H1: (eq T (THead (Flat f) u t) (TLRef n))).(let H2 \def (eq_ind T +(THead (Flat f) u t) (\lambda (e: T).(match e in T return (\lambda (_: +T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | +(THead _ _ _) \Rightarrow True])) I (TLRef n) H1) in (False_ind (ex3_2 T T +(\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h d z))))) H2)))]) in (H2 (refl_equal T +(TLRef n)))))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift h d +(TLRef n)) (\lambda (t0: T).(eq T (THead (Flat f) u t) t0)) H (TLRef (plus n +h)) (lift_lref_ge n h d H0)) in (let H2 \def (match H1 in eq return (\lambda +(t0: T).(\lambda (_: (eq ? ? t0)).((eq T t0 (TLRef (plus n h))) \to (ex3_2 T +T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h d z)))))))) with [refl_equal \Rightarrow +(\lambda (H1: (eq T (THead (Flat f) u t) (TLRef (plus n h)))).(let H2 \def +(eq_ind T (THead (Flat f) u t) (\lambda (e: T).(match e in T return (\lambda +(_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False +| (THead _ _ _) \Rightarrow True])) I (TLRef (plus n h)) H1) in (False_ind +(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (TLRef n) (THead (Flat f) y +z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h d z))))) H2)))]) in (H2 (refl_equal T +(TLRef (plus n h)))))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda (_: +((\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h d +t0)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t0 (THead (Flat f) +y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t (lift h d z)))))))))).(\lambda (t1: T).(\lambda +(_: ((\forall (h: nat).(\forall (d: nat).((eq T (THead (Flat f) u t) (lift h +d t1)) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Flat +f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda +(_: T).(\lambda (z: T).(eq T t (lift h d z)))))))))).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead (Flat f) u t) (lift h d +(THead k t0 t1)))).(let H2 \def (eq_ind T (lift h d (THead k t0 t1)) (\lambda +(t0: T).(eq T (THead (Flat f) u t) t0)) H1 (THead k (lift h d t0) (lift h (s +k d) t1)) (lift_head k t0 t1 h d)) in (let H3 \def (match H2 in eq return +(\lambda (t2: T).(\lambda (_: (eq ? ? t2)).((eq T t2 (THead k (lift h d t0) +(lift h (s k d) t1))) \to (ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T +(THead k t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T +u (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z)))))))) +with [refl_equal \Rightarrow (\lambda (H2: (eq T (THead (Flat f) u t) (THead +k (lift h d t0) (lift h (s k d) t1)))).(let H3 \def (f_equal T T (\lambda (e: +T).(match e in T return (\lambda (_: T).T) with [(TSort _) \Rightarrow t | +(TLRef _) \Rightarrow t | (THead _ _ t) \Rightarrow t])) (THead (Flat f) u t) +(THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let H4 \def (f_equal T T +(\lambda (e: T).(match e in T return (\lambda (_: T).T) with [(TSort _) +\Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) \Rightarrow t])) +(THead (Flat f) u t) (THead k (lift h d t0) (lift h (s k d) t1)) H2) in ((let +H5 \def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) +with [(TSort _) \Rightarrow (Flat f) | (TLRef _) \Rightarrow (Flat f) | +(THead k _ _) \Rightarrow k])) (THead (Flat f) u t) (THead k (lift h d t0) +(lift h (s k d) t1)) H2) in (eq_ind K (Flat f) (\lambda (k: K).((eq T u (lift +h d t0)) \to ((eq T t (lift h (s k d) t1)) \to (ex3_2 T T (\lambda (y: +T).(\lambda (z: T).(eq T (THead k t0 t1) (THead (Flat f) y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T u (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T t (lift h d z)))))))) (\lambda (H6: (eq T u (lift h d t0))).(eq_ind +T (lift h d t0) (\lambda (t2: T).((eq T t (lift h (s (Flat f) d) t1)) \to +(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Flat f) t0 t1) +(THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T t2 (lift h d +y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h d z))))))) (\lambda +(H7: (eq T t (lift h (s (Flat f) d) t1))).(eq_ind T (lift h (s (Flat f) d) +t1) (\lambda (t: T).(ex3_2 T T (\lambda (y: T).(\lambda (z: T).(eq T (THead +(Flat f) t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T +(lift h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T t (lift h +d z)))))) (ex3_2_intro T T (\lambda (y: T).(\lambda (z: T).(eq T (THead (Flat +f) t0 t1) (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift +h d t0) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h (s +(Flat f) d) t1) (lift h d z)))) t0 t1 (refl_equal T (THead (Flat f) t0 t1)) +(refl_equal T (lift h d t0)) (refl_equal T (lift h d t1))) t (sym_eq T t +(lift h (s (Flat f) d) t1) H7))) u (sym_eq T u (lift h d t0) H6))) k H5)) +H4)) H3)))]) in (H3 (refl_equal T (THead k (lift h d t0) (lift h (s k d) +t1)))))))))))))) x)))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/props.ma new file mode 100644 index 000000000..f6f3eb39f --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/props.ma @@ -0,0 +1,517 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/props". + +include "lift/fwd.ma". + +theorem thead_x_lift_y_y: + \forall (k: K).(\forall (t: T).(\forall (v: T).(\forall (h: nat).(\forall +(d: nat).((eq T (THead k v (lift h d t)) t) \to (\forall (P: Prop).P)))))) +\def + \lambda (k: K).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (v: +T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift h d t0)) t0) +\to (\forall (P: Prop).P)))))) (\lambda (n: nat).(\lambda (v: T).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H: (eq T (THead k v (lift h d (TSort n))) +(TSort n))).(\lambda (P: Prop).(let H0 \def (eq_ind T (THead k v (lift h d +(TSort n))) (\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with +[(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) +\Rightarrow True])) I (TSort n) H) in (False_ind P H0)))))))) (\lambda (n: +nat).(\lambda (v: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H: (eq T +(THead k v (lift h d (TLRef n))) (TLRef n))).(\lambda (P: Prop).(let H0 \def +(eq_ind T (THead k v (lift h d (TLRef n))) (\lambda (ee: T).(match ee in T +return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H) in +(False_ind P H0)))))))) (\lambda (k0: K).(\lambda (t0: T).(\lambda (_: +((\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift +h d t0)) t0) \to (\forall (P: Prop).P))))))).(\lambda (t1: T).(\lambda (H0: +((\forall (v: T).(\forall (h: nat).(\forall (d: nat).((eq T (THead k v (lift +h d t1)) t1) \to (\forall (P: Prop).P))))))).(\lambda (v: T).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H1: (eq T (THead k v (lift h d (THead k0 t0 +t1))) (THead k0 t0 t1))).(\lambda (P: Prop).(let H2 \def (f_equal T K +(\lambda (e: T).(match e in T return (\lambda (_: T).K) with [(TSort _) +\Rightarrow k | (TLRef _) \Rightarrow k | (THead k _ _) \Rightarrow k])) +(THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1) H1) in ((let H3 \def +(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with +[(TSort _) \Rightarrow v | (TLRef _) \Rightarrow v | (THead _ t _) +\Rightarrow t])) (THead k v (lift h d (THead k0 t0 t1))) (THead k0 t0 t1) H1) +in ((let H4 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda +(_: T).T) with [(TSort _) \Rightarrow (THead k0 ((let rec lref_map (f: ((nat +\to nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow +(TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true +\Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow +(THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda +(x: nat).(plus x h)) d t0) ((let rec lref_map (f: ((nat \to nat))) (d: nat) +(t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef +i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false +\Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) +(lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) (s k0 +d) t1)) | (TLRef _) \Rightarrow (THead k0 ((let rec lref_map (f: ((nat \to +nat))) (d: nat) (t: T) on t: T \def (match t with [(TSort n) \Rightarrow +(TSort n) | (TLRef i) \Rightarrow (TLRef (match (blt i d) with [true +\Rightarrow i | false \Rightarrow (f i)])) | (THead k u t0) \Rightarrow +(THead k (lref_map f d u) (lref_map f (s k d) t0))]) in lref_map) (\lambda +(x: nat).(plus x h)) d t0) ((let rec lref_map (f: ((nat \to nat))) (d: nat) +(t: T) on t: T \def (match t with [(TSort n) \Rightarrow (TSort n) | (TLRef +i) \Rightarrow (TLRef (match (blt i d) with [true \Rightarrow i | false +\Rightarrow (f i)])) | (THead k u t0) \Rightarrow (THead k (lref_map f d u) +(lref_map f (s k d) t0))]) in lref_map) (\lambda (x: nat).(plus x h)) (s k0 +d) t1)) | (THead _ _ t) \Rightarrow t])) (THead k v (lift h d (THead k0 t0 +t1))) (THead k0 t0 t1) H1) in (\lambda (_: (eq T v t0)).(\lambda (H6: (eq K k +k0)).(let H7 \def (eq_ind K k (\lambda (k: K).(\forall (v: T).(\forall (h: +nat).(\forall (d: nat).((eq T (THead k v (lift h d t1)) t1) \to (\forall (P: +Prop).P)))))) H0 k0 H6) in (let H8 \def (eq_ind T (lift h d (THead k0 t0 t1)) +(\lambda (t: T).(eq T t t1)) H4 (THead k0 (lift h d t0) (lift h (s k0 d) t1)) +(lift_head k0 t0 t1 h d)) in (H7 (lift h d t0) h (s k0 d) H8 P)))))) H3)) +H2)))))))))))) t)). + +theorem lift_r: + \forall (t: T).(\forall (d: nat).(eq T (lift O d t) t)) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(eq T (lift O d t0) +t0))) (\lambda (n: nat).(\lambda (_: nat).(refl_equal T (TSort n)))) (\lambda +(n: nat).(\lambda (d: nat).(lt_le_e n d (eq T (lift O d (TLRef n)) (TLRef n)) +(\lambda (H: (lt n d)).(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 (TLRef +n))) (refl_equal T (TLRef n)) (lift O d (TLRef n)) (lift_lref_lt n O d H))) +(\lambda (H: (le d n)).(eq_ind_r T (TLRef (plus n O)) (\lambda (t0: T).(eq T +t0 (TLRef n))) (f_equal nat T TLRef (plus n O) n (sym_eq nat n (plus n O) +(plus_n_O n))) (lift O d (TLRef n)) (lift_lref_ge n O d H)))))) (\lambda (k: +K).(\lambda (t0: T).(\lambda (H: ((\forall (d: nat).(eq T (lift O d t0) +t0)))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).(eq T (lift O d t1) +t1)))).(\lambda (d: nat).(eq_ind_r T (THead k (lift O d t0) (lift O (s k d) +t1)) (\lambda (t2: T).(eq T t2 (THead k t0 t1))) (sym_equal T (THead k t0 t1) +(THead k (lift O d t0) (lift O (s k d) t1)) (sym_equal T (THead k (lift O d +t0) (lift O (s k d) t1)) (THead k t0 t1) (sym_equal T (THead k t0 t1) (THead +k (lift O d t0) (lift O (s k d) t1)) (f_equal3 K T T T THead k k t0 (lift O d +t0) t1 (lift O (s k d) t1) (refl_equal K k) (sym_eq T (lift O d t0) t0 (H d)) +(sym_eq T (lift O (s k d) t1) t1 (H0 (s k d))))))) (lift O d (THead k t0 t1)) +(lift_head k t0 t1 O d)))))))) t). + +theorem lift_lref_gt: + \forall (d: nat).(\forall (n: nat).((lt d n) \to (eq T (lift (S O) d (TLRef +(pred n))) (TLRef n)))) +\def + \lambda (d: nat).(\lambda (n: nat).(\lambda (H: (lt d n)).(eq_ind_r T (TLRef +(plus (pred n) (S O))) (\lambda (t: T).(eq T t (TLRef n))) (eq_ind nat (plus +(S O) (pred n)) (\lambda (n0: nat).(eq T (TLRef n0) (TLRef n))) (eq_ind nat n +(\lambda (n0: nat).(eq T (TLRef n0) (TLRef n))) (refl_equal T (TLRef n)) (S +(pred n)) (S_pred n d H)) (plus (pred n) (S O)) (plus_comm (S O) (pred n))) +(lift (S O) d (TLRef (pred n))) (lift_lref_ge (pred n) (S O) d (le_S_n d +(pred n) (eq_ind nat n (\lambda (n0: nat).(le (S d) n0)) H (S (pred n)) +(S_pred n d H))))))). + +theorem lift_inj: + \forall (x: T).(\forall (t: T).(\forall (h: nat).(\forall (d: nat).((eq T +(lift h d x) (lift h d t)) \to (eq T x t))))) +\def + \lambda (x: T).(T_ind (\lambda (t: T).(\forall (t0: T).(\forall (h: +nat).(\forall (d: nat).((eq T (lift h d t) (lift h d t0)) \to (eq T t +t0)))))) (\lambda (n: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H: (eq T (lift h d (TSort n)) (lift h d t))).(let H0 \def +(eq_ind T (lift h d (TSort n)) (\lambda (t0: T).(eq T t0 (lift h d t))) H +(TSort n) (lift_sort n h d)) in (sym_eq T t (TSort n) (lift_gen_sort h d n t +H0)))))))) (\lambda (n: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H: (eq T (lift h d (TLRef n)) (lift h d t))).(lt_le_e n d (eq +T (TLRef n) t) (\lambda (H0: (lt n d)).(let H1 \def (eq_ind T (lift h d +(TLRef n)) (\lambda (t0: T).(eq T t0 (lift h d t))) H (TLRef n) (lift_lref_lt +n h d H0)) in (sym_eq T t (TLRef n) (lift_gen_lref_lt h d n (lt_le_trans n d +d H0 (le_n d)) t H1)))) (\lambda (H0: (le d n)).(let H1 \def (eq_ind T (lift +h d (TLRef n)) (\lambda (t0: T).(eq T t0 (lift h d t))) H (TLRef (plus n h)) +(lift_lref_ge n h d H0)) in (sym_eq T t (TLRef n) (lift_gen_lref_ge h d n H0 +t H1)))))))))) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t: +T).(((\forall (t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t) +(lift h d t0)) \to (eq T t t0)))))) \to (\forall (t0: T).(((\forall (t: +T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t0) (lift h d t)) \to +(eq T t0 t)))))) \to (\forall (t1: T).(\forall (h: nat).(\forall (d: +nat).((eq T (lift h d (THead k0 t t0)) (lift h d t1)) \to (eq T (THead k0 t +t0) t1)))))))))) (\lambda (b: B).(\lambda (t: T).(\lambda (H: ((\forall (t0: +T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t) (lift h d t0)) \to +(eq T t t0))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (t: T).(\forall +(h: nat).(\forall (d: nat).((eq T (lift h d t0) (lift h d t)) \to (eq T t0 +t))))))).(\lambda (t1: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: +(eq T (lift h d (THead (Bind b) t t0)) (lift h d t1))).(let H2 \def (eq_ind T +(lift h d (THead (Bind b) t t0)) (\lambda (t: T).(eq T t (lift h d t1))) H1 +(THead (Bind b) (lift h d t) (lift h (S d) t0)) (lift_bind b t t0 h d)) in +(ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T t1 (THead (Bind b) y +z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d t) (lift h d y)))) +(\lambda (_: T).(\lambda (z: T).(eq T (lift h (S d) t0) (lift h (S d) z)))) +(eq T (THead (Bind b) t t0) t1) (\lambda (x0: T).(\lambda (x1: T).(\lambda +(H3: (eq T t1 (THead (Bind b) x0 x1))).(\lambda (H4: (eq T (lift h d t) (lift +h d x0))).(\lambda (H5: (eq T (lift h (S d) t0) (lift h (S d) x1))).(eq_ind_r +T (THead (Bind b) x0 x1) (\lambda (t2: T).(eq T (THead (Bind b) t t0) t2)) +(sym_equal T (THead (Bind b) x0 x1) (THead (Bind b) t t0) (sym_equal T (THead +(Bind b) t t0) (THead (Bind b) x0 x1) (sym_equal T (THead (Bind b) x0 x1) +(THead (Bind b) t t0) (f_equal3 K T T T THead (Bind b) (Bind b) x0 t x1 t0 +(refl_equal K (Bind b)) (sym_eq T t x0 (H x0 h d H4)) (sym_eq T t0 x1 (H0 x1 +h (S d) H5)))))) t1 H3)))))) (lift_gen_bind b (lift h d t) (lift h (S d) t0) +t1 h d H2)))))))))))) (\lambda (f: F).(\lambda (t: T).(\lambda (H: ((\forall +(t0: T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t) (lift h d +t0)) \to (eq T t t0))))))).(\lambda (t0: T).(\lambda (H0: ((\forall (t: +T).(\forall (h: nat).(\forall (d: nat).((eq T (lift h d t0) (lift h d t)) \to +(eq T t0 t))))))).(\lambda (t1: T).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H1: (eq T (lift h d (THead (Flat f) t t0)) (lift h d +t1))).(let H2 \def (eq_ind T (lift h d (THead (Flat f) t t0)) (\lambda (t: +T).(eq T t (lift h d t1))) H1 (THead (Flat f) (lift h d t) (lift h d t0)) +(lift_flat f t t0 h d)) in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq +T t1 (THead (Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h d +t) (lift h d y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h d t0) (lift +h d z)))) (eq T (THead (Flat f) t t0) t1) (\lambda (x0: T).(\lambda (x1: +T).(\lambda (H3: (eq T t1 (THead (Flat f) x0 x1))).(\lambda (H4: (eq T (lift +h d t) (lift h d x0))).(\lambda (H5: (eq T (lift h d t0) (lift h d +x1))).(eq_ind_r T (THead (Flat f) x0 x1) (\lambda (t2: T).(eq T (THead (Flat +f) t t0) t2)) (sym_equal T (THead (Flat f) x0 x1) (THead (Flat f) t t0) +(sym_equal T (THead (Flat f) t t0) (THead (Flat f) x0 x1) (sym_equal T (THead +(Flat f) x0 x1) (THead (Flat f) t t0) (f_equal3 K T T T THead (Flat f) (Flat +f) x0 t x1 t0 (refl_equal K (Flat f)) (sym_eq T t x0 (H x0 h d H4)) (sym_eq T +t0 x1 (H0 x1 h d H5)))))) t1 H3)))))) (lift_gen_flat f (lift h d t) (lift h d +t0) t1 h d H2)))))))))))) k)) x). + +theorem lift_gen_lift: + \forall (t1: T).(\forall (x: T).(\forall (h1: nat).(\forall (h2: +nat).(\forall (d1: nat).(\forall (d2: nat).((le d1 d2) \to ((eq T (lift h1 d1 +t1) (lift h2 (plus d2 h1) x)) \to (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 +t2))) (\lambda (t2: T).(eq T t1 (lift h2 d2 t2))))))))))) +\def + \lambda (t1: T).(T_ind (\lambda (t: T).(\forall (x: T).(\forall (h1: +nat).(\forall (h2: nat).(\forall (d1: nat).(\forall (d2: nat).((le d1 d2) \to +((eq T (lift h1 d1 t) (lift h2 (plus d2 h1) x)) \to (ex2 T (\lambda (t2: +T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T t (lift h2 d2 +t2)))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda (h1: nat).(\lambda +(h2: nat).(\lambda (d1: nat).(\lambda (d2: nat).(\lambda (_: (le d1 +d2)).(\lambda (H0: (eq T (lift h1 d1 (TSort n)) (lift h2 (plus d2 h1) +x))).(let H1 \def (eq_ind T (lift h1 d1 (TSort n)) (\lambda (t: T).(eq T t +(lift h2 (plus d2 h1) x))) H0 (TSort n) (lift_sort n h1 d1)) in (eq_ind_r T +(TSort n) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h1 d1 t2))) +(\lambda (t2: T).(eq T (TSort n) (lift h2 d2 t2))))) (ex_intro2 T (\lambda +(t2: T).(eq T (TSort n) (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TSort n) +(lift h2 d2 t2))) (TSort n) (eq_ind_r T (TSort n) (\lambda (t: T).(eq T +(TSort n) t)) (refl_equal T (TSort n)) (lift h1 d1 (TSort n)) (lift_sort n h1 +d1)) (eq_ind_r T (TSort n) (\lambda (t: T).(eq T (TSort n) t)) (refl_equal T +(TSort n)) (lift h2 d2 (TSort n)) (lift_sort n h2 d2))) x (lift_gen_sort h2 +(plus d2 h1) n x H1))))))))))) (\lambda (n: nat).(\lambda (x: T).(\lambda +(h1: nat).(\lambda (h2: nat).(\lambda (d1: nat).(\lambda (d2: nat).(\lambda +(H: (le d1 d2)).(\lambda (H0: (eq T (lift h1 d1 (TLRef n)) (lift h2 (plus d2 +h1) x))).(lt_le_e n d1 (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) +(\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2)))) (\lambda (H1: (lt n +d1)).(let H2 \def (eq_ind T (lift h1 d1 (TLRef n)) (\lambda (t: T).(eq T t +(lift h2 (plus d2 h1) x))) H0 (TLRef n) (lift_lref_lt n h1 d1 H1)) in +(eq_ind_r T (TLRef n) (\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift +h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))))) (ex_intro2 T +(\lambda (t2: T).(eq T (TLRef n) (lift h1 d1 t2))) (\lambda (t2: T).(eq T +(TLRef n) (lift h2 d2 t2))) (TLRef n) (eq_ind_r T (TLRef n) (\lambda (t: +T).(eq T (TLRef n) t)) (refl_equal T (TLRef n)) (lift h1 d1 (TLRef n)) +(lift_lref_lt n h1 d1 H1)) (eq_ind_r T (TLRef n) (\lambda (t: T).(eq T (TLRef +n) t)) (refl_equal T (TLRef n)) (lift h2 d2 (TLRef n)) (lift_lref_lt n h2 d2 +(lt_le_trans n d1 d2 H1 H)))) x (lift_gen_lref_lt h2 (plus d2 h1) n +(lt_le_trans n d1 (plus d2 h1) H1 (le_plus_trans d1 d2 h1 H)) x H2)))) +(\lambda (H1: (le d1 n)).(let H2 \def (eq_ind T (lift h1 d1 (TLRef n)) +(\lambda (t: T).(eq T t (lift h2 (plus d2 h1) x))) H0 (TLRef (plus n h1)) +(lift_lref_ge n h1 d1 H1)) in (lt_le_e n d2 (ex2 T (\lambda (t2: T).(eq T x +(lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2)))) +(\lambda (H3: (lt n d2)).(eq_ind_r T (TLRef (plus n h1)) (\lambda (t: T).(ex2 +T (\lambda (t2: T).(eq T t (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) +(lift h2 d2 t2))))) (ex_intro2 T (\lambda (t2: T).(eq T (TLRef (plus n h1)) +(lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2))) (TLRef +n) (eq_ind_r T (TLRef (plus n h1)) (\lambda (t: T).(eq T (TLRef (plus n h1)) +t)) (refl_equal T (TLRef (plus n h1))) (lift h1 d1 (TLRef n)) (lift_lref_ge n +h1 d1 H1)) (eq_ind_r T (TLRef n) (\lambda (t: T).(eq T (TLRef n) t)) +(refl_equal T (TLRef n)) (lift h2 d2 (TLRef n)) (lift_lref_lt n h2 d2 H3))) x +(lift_gen_lref_lt h2 (plus d2 h1) (plus n h1) (plus_lt_compat_r n d2 h1 H3) x +H2))) (\lambda (H3: (le d2 n)).(lt_le_e n (plus d2 h2) (ex2 T (\lambda (t2: +T).(eq T x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 +t2)))) (\lambda (H4: (lt n (plus d2 h2))).(lift_gen_lref_false h2 (plus d2 +h1) (plus n h1) (le_S_n (plus d2 h1) (plus n h1) (lt_le_S (plus d2 h1) (S +(plus n h1)) (le_lt_n_Sm (plus d2 h1) (plus n h1) (plus_le_compat d2 n h1 h1 +H3 (le_n h1))))) (eq_ind_r nat (plus (plus d2 h2) h1) (\lambda (n0: nat).(lt +(plus n h1) n0)) (lt_le_S (plus n h1) (plus (plus d2 h2) h1) +(plus_lt_compat_r n (plus d2 h2) h1 H4)) (plus (plus d2 h1) h2) +(plus_permute_2_in_3 d2 h1 h2)) x H2 (ex2 T (\lambda (t2: T).(eq T x (lift h1 +d1 t2))) (\lambda (t2: T).(eq T (TLRef n) (lift h2 d2 t2)))))) (\lambda (H4: +(le (plus d2 h2) n)).(let H5 \def (eq_ind nat (plus n h1) (\lambda (n: +nat).(eq T (TLRef n) (lift h2 (plus d2 h1) x))) H2 (plus (minus (plus n h1) +h2) h2) (le_plus_minus_sym h2 (plus n h1) (le_plus_trans h2 n h1 +(le_trans_plus_r d2 h2 n H4)))) in (eq_ind_r T (TLRef (minus (plus n h1) h2)) +(\lambda (t: T).(ex2 T (\lambda (t2: T).(eq T t (lift h1 d1 t2))) (\lambda +(t2: T).(eq T (TLRef n) (lift h2 d2 t2))))) (ex_intro2 T (\lambda (t2: T).(eq +T (TLRef (minus (plus n h1) h2)) (lift h1 d1 t2))) (\lambda (t2: T).(eq T +(TLRef n) (lift h2 d2 t2))) (TLRef (minus n h2)) (eq_ind_r nat (plus (minus n +h2) h1) (\lambda (n0: nat).(eq T (TLRef n0) (lift h1 d1 (TLRef (minus n +h2))))) (eq_ind_r T (TLRef (plus (minus n h2) h1)) (\lambda (t: T).(eq T +(TLRef (plus (minus n h2) h1)) t)) (refl_equal T (TLRef (plus (minus n h2) +h1))) (lift h1 d1 (TLRef (minus n h2))) (lift_lref_ge (minus n h2) h1 d1 +(le_trans d1 d2 (minus n h2) H (le_minus d2 n h2 H4)))) (minus (plus n h1) +h2) (le_minus_plus h2 n (le_trans_plus_r d2 h2 n H4) h1)) (eq_ind_r nat (plus +(minus n h2) h2) (\lambda (n0: nat).(eq T (TLRef n0) (lift h2 d2 (TLRef +(minus n0 h2))))) (eq_ind_r T (TLRef (plus (minus (plus (minus n h2) h2) h2) +h2)) (\lambda (t: T).(eq T (TLRef (plus (minus n h2) h2)) t)) (f_equal nat T +TLRef (plus (minus n h2) h2) (plus (minus (plus (minus n h2) h2) h2) h2) +(f_equal2 nat nat nat plus (minus n h2) (minus (plus (minus n h2) h2) h2) h2 +h2 (sym_eq nat (minus (plus (minus n h2) h2) h2) (minus n h2) (minus_plus_r +(minus n h2) h2)) (refl_equal nat h2))) (lift h2 d2 (TLRef (minus (plus +(minus n h2) h2) h2))) (lift_lref_ge (minus (plus (minus n h2) h2) h2) h2 d2 +(le_minus d2 (plus (minus n h2) h2) h2 (plus_le_compat d2 (minus n h2) h2 h2 +(le_minus d2 n h2 H4) (le_n h2))))) n (le_plus_minus_sym h2 n +(le_trans_plus_r d2 h2 n H4)))) x (lift_gen_lref_ge h2 (plus d2 h1) (minus +(plus n h1) h2) (arith0 h2 d2 n H4 h1) x H5)))))))))))))))))) (\lambda (k: +K).(\lambda (t: T).(\lambda (H: ((\forall (x: T).(\forall (h1: nat).(\forall +(h2: nat).(\forall (d1: nat).(\forall (d2: nat).((le d1 d2) \to ((eq T (lift +h1 d1 t) (lift h2 (plus d2 h1) x)) \to (ex2 T (\lambda (t2: T).(eq T x (lift +h1 d1 t2))) (\lambda (t2: T).(eq T t (lift h2 d2 t2))))))))))))).(\lambda +(t0: T).(\lambda (H0: ((\forall (x: T).(\forall (h1: nat).(\forall (h2: +nat).(\forall (d1: nat).(\forall (d2: nat).((le d1 d2) \to ((eq T (lift h1 d1 +t0) (lift h2 (plus d2 h1) x)) \to (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 +t2))) (\lambda (t2: T).(eq T t0 (lift h2 d2 t2))))))))))))).(\lambda (x: +T).(\lambda (h1: nat).(\lambda (h2: nat).(\lambda (d1: nat).(\lambda (d2: +nat).(\lambda (H1: (le d1 d2)).(\lambda (H2: (eq T (lift h1 d1 (THead k t +t0)) (lift h2 (plus d2 h1) x))).(K_ind (\lambda (k0: K).((eq T (lift h1 d1 +(THead k0 t t0)) (lift h2 (plus d2 h1) x)) \to (ex2 T (\lambda (t2: T).(eq T +x (lift h1 d1 t2))) (\lambda (t2: T).(eq T (THead k0 t t0) (lift h2 d2 +t2)))))) (\lambda (b: B).(\lambda (H3: (eq T (lift h1 d1 (THead (Bind b) t +t0)) (lift h2 (plus d2 h1) x))).(let H4 \def (eq_ind T (lift h1 d1 (THead +(Bind b) t t0)) (\lambda (t: T).(eq T t (lift h2 (plus d2 h1) x))) H3 (THead +(Bind b) (lift h1 d1 t) (lift h1 (S d1) t0)) (lift_bind b t t0 h1 d1)) in +(ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead (Bind b) y +z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h1 d1 t) (lift h2 (plus d2 +h1) y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h1 (S d1) t0) (lift h2 +(S (plus d2 h1)) z)))) (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) +(\lambda (t2: T).(eq T (THead (Bind b) t t0) (lift h2 d2 t2)))) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H5: (eq T x (THead (Bind b) x0 x1))).(\lambda +(H6: (eq T (lift h1 d1 t) (lift h2 (plus d2 h1) x0))).(\lambda (H7: (eq T +(lift h1 (S d1) t0) (lift h2 (S (plus d2 h1)) x1))).(eq_ind_r T (THead (Bind +b) x0 x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h1 d1 t3))) +(\lambda (t3: T).(eq T (THead (Bind b) t t0) (lift h2 d2 t3))))) (ex2_ind T +(\lambda (t2: T).(eq T x0 (lift h1 d1 t2))) (\lambda (t2: T).(eq T t (lift h2 +d2 t2))) (ex2 T (\lambda (t2: T).(eq T (THead (Bind b) x0 x1) (lift h1 d1 +t2))) (\lambda (t2: T).(eq T (THead (Bind b) t t0) (lift h2 d2 t2)))) +(\lambda (x2: T).(\lambda (H8: (eq T x0 (lift h1 d1 x2))).(\lambda (H9: (eq T +t (lift h2 d2 x2))).(eq_ind_r T (lift h1 d1 x2) (\lambda (t2: T).(ex2 T +(\lambda (t3: T).(eq T (THead (Bind b) t2 x1) (lift h1 d1 t3))) (\lambda (t3: +T).(eq T (THead (Bind b) t t0) (lift h2 d2 t3))))) (eq_ind_r T (lift h2 d2 +x2) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Bind b) (lift h1 +d1 x2) x1) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Bind b) t2 t0) +(lift h2 d2 t3))))) (let H10 \def (refl_equal nat (plus (S d2) h1)) in (let +H11 \def (eq_ind nat (S (plus d2 h1)) (\lambda (n: nat).(eq T (lift h1 (S d1) +t0) (lift h2 n x1))) H7 (plus (S d2) h1) H10) in (ex2_ind T (\lambda (t2: +T).(eq T x1 (lift h1 (S d1) t2))) (\lambda (t2: T).(eq T t0 (lift h2 (S d2) +t2))) (ex2 T (\lambda (t2: T).(eq T (THead (Bind b) (lift h1 d1 x2) x1) (lift +h1 d1 t2))) (\lambda (t2: T).(eq T (THead (Bind b) (lift h2 d2 x2) t0) (lift +h2 d2 t2)))) (\lambda (x3: T).(\lambda (H12: (eq T x1 (lift h1 (S d1) +x3))).(\lambda (H13: (eq T t0 (lift h2 (S d2) x3))).(eq_ind_r T (lift h1 (S +d1) x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Bind b) (lift +h1 d1 x2) t2) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Bind b) (lift +h2 d2 x2) t0) (lift h2 d2 t3))))) (eq_ind_r T (lift h2 (S d2) x3) (\lambda +(t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Bind b) (lift h1 d1 x2) (lift +h1 (S d1) x3)) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Bind b) (lift +h2 d2 x2) t2) (lift h2 d2 t3))))) (ex_intro2 T (\lambda (t2: T).(eq T (THead +(Bind b) (lift h1 d1 x2) (lift h1 (S d1) x3)) (lift h1 d1 t2))) (\lambda (t2: +T).(eq T (THead (Bind b) (lift h2 d2 x2) (lift h2 (S d2) x3)) (lift h2 d2 +t2))) (THead (Bind b) x2 x3) (eq_ind_r T (THead (Bind b) (lift h1 d1 x2) +(lift h1 (S d1) x3)) (\lambda (t2: T).(eq T (THead (Bind b) (lift h1 d1 x2) +(lift h1 (S d1) x3)) t2)) (refl_equal T (THead (Bind b) (lift h1 d1 x2) (lift +h1 (S d1) x3))) (lift h1 d1 (THead (Bind b) x2 x3)) (lift_bind b x2 x3 h1 +d1)) (eq_ind_r T (THead (Bind b) (lift h2 d2 x2) (lift h2 (S d2) x3)) +(\lambda (t2: T).(eq T (THead (Bind b) (lift h2 d2 x2) (lift h2 (S d2) x3)) +t2)) (refl_equal T (THead (Bind b) (lift h2 d2 x2) (lift h2 (S d2) x3))) +(lift h2 d2 (THead (Bind b) x2 x3)) (lift_bind b x2 x3 h2 d2))) t0 H13) x1 +H12)))) (H0 x1 h1 h2 (S d1) (S d2) (le_S_n (S d1) (S d2) (lt_le_S (S d1) (S +(S d2)) (lt_n_S d1 (S d2) (le_lt_n_Sm d1 d2 H1)))) H11)))) t H9) x0 H8)))) (H +x0 h1 h2 d1 d2 H1 H6)) x H5)))))) (lift_gen_bind b (lift h1 d1 t) (lift h1 (S +d1) t0) x h2 (plus d2 h1) H4))))) (\lambda (f: F).(\lambda (H3: (eq T (lift +h1 d1 (THead (Flat f) t t0)) (lift h2 (plus d2 h1) x))).(let H4 \def (eq_ind +T (lift h1 d1 (THead (Flat f) t t0)) (\lambda (t: T).(eq T t (lift h2 (plus +d2 h1) x))) H3 (THead (Flat f) (lift h1 d1 t) (lift h1 d1 t0)) (lift_flat f t +t0 h1 d1)) in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T x (THead +(Flat f) y z)))) (\lambda (y: T).(\lambda (_: T).(eq T (lift h1 d1 t) (lift +h2 (plus d2 h1) y)))) (\lambda (_: T).(\lambda (z: T).(eq T (lift h1 d1 t0) +(lift h2 (plus d2 h1) z)))) (ex2 T (\lambda (t2: T).(eq T x (lift h1 d1 t2))) +(\lambda (t2: T).(eq T (THead (Flat f) t t0) (lift h2 d2 t2)))) (\lambda (x0: +T).(\lambda (x1: T).(\lambda (H5: (eq T x (THead (Flat f) x0 x1))).(\lambda +(H6: (eq T (lift h1 d1 t) (lift h2 (plus d2 h1) x0))).(\lambda (H7: (eq T +(lift h1 d1 t0) (lift h2 (plus d2 h1) x1))).(eq_ind_r T (THead (Flat f) x0 +x1) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T t2 (lift h1 d1 t3))) +(\lambda (t3: T).(eq T (THead (Flat f) t t0) (lift h2 d2 t3))))) (ex2_ind T +(\lambda (t2: T).(eq T x0 (lift h1 d1 t2))) (\lambda (t2: T).(eq T t (lift h2 +d2 t2))) (ex2 T (\lambda (t2: T).(eq T (THead (Flat f) x0 x1) (lift h1 d1 +t2))) (\lambda (t2: T).(eq T (THead (Flat f) t t0) (lift h2 d2 t2)))) +(\lambda (x2: T).(\lambda (H8: (eq T x0 (lift h1 d1 x2))).(\lambda (H9: (eq T +t (lift h2 d2 x2))).(eq_ind_r T (lift h1 d1 x2) (\lambda (t2: T).(ex2 T +(\lambda (t3: T).(eq T (THead (Flat f) t2 x1) (lift h1 d1 t3))) (\lambda (t3: +T).(eq T (THead (Flat f) t t0) (lift h2 d2 t3))))) (eq_ind_r T (lift h2 d2 +x2) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Flat f) (lift h1 +d1 x2) x1) (lift h1 d1 t3))) (\lambda (t3: T).(eq T (THead (Flat f) t2 t0) +(lift h2 d2 t3))))) (ex2_ind T (\lambda (t2: T).(eq T x1 (lift h1 d1 t2))) +(\lambda (t2: T).(eq T t0 (lift h2 d2 t2))) (ex2 T (\lambda (t2: T).(eq T +(THead (Flat f) (lift h1 d1 x2) x1) (lift h1 d1 t2))) (\lambda (t2: T).(eq T +(THead (Flat f) (lift h2 d2 x2) t0) (lift h2 d2 t2)))) (\lambda (x3: +T).(\lambda (H10: (eq T x1 (lift h1 d1 x3))).(\lambda (H11: (eq T t0 (lift h2 +d2 x3))).(eq_ind_r T (lift h1 d1 x3) (\lambda (t2: T).(ex2 T (\lambda (t3: +T).(eq T (THead (Flat f) (lift h1 d1 x2) t2) (lift h1 d1 t3))) (\lambda (t3: +T).(eq T (THead (Flat f) (lift h2 d2 x2) t0) (lift h2 d2 t3))))) (eq_ind_r T +(lift h2 d2 x3) (\lambda (t2: T).(ex2 T (\lambda (t3: T).(eq T (THead (Flat +f) (lift h1 d1 x2) (lift h1 d1 x3)) (lift h1 d1 t3))) (\lambda (t3: T).(eq T +(THead (Flat f) (lift h2 d2 x2) t2) (lift h2 d2 t3))))) (ex_intro2 T (\lambda +(t2: T).(eq T (THead (Flat f) (lift h1 d1 x2) (lift h1 d1 x3)) (lift h1 d1 +t2))) (\lambda (t2: T).(eq T (THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3)) +(lift h2 d2 t2))) (THead (Flat f) x2 x3) (eq_ind_r T (THead (Flat f) (lift h1 +d1 x2) (lift h1 d1 x3)) (\lambda (t2: T).(eq T (THead (Flat f) (lift h1 d1 +x2) (lift h1 d1 x3)) t2)) (refl_equal T (THead (Flat f) (lift h1 d1 x2) (lift +h1 d1 x3))) (lift h1 d1 (THead (Flat f) x2 x3)) (lift_flat f x2 x3 h1 d1)) +(eq_ind_r T (THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3)) (\lambda (t2: +T).(eq T (THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3)) t2)) (refl_equal T +(THead (Flat f) (lift h2 d2 x2) (lift h2 d2 x3))) (lift h2 d2 (THead (Flat f) +x2 x3)) (lift_flat f x2 x3 h2 d2))) t0 H11) x1 H10)))) (H0 x1 h1 h2 d1 d2 H1 +H7)) t H9) x0 H8)))) (H x0 h1 h2 d1 d2 H1 H6)) x H5)))))) (lift_gen_flat f +(lift h1 d1 t) (lift h1 d1 t0) x h2 (plus d2 h1) H4))))) k H2))))))))))))) +t1). + +theorem lift_free: + \forall (t: T).(\forall (h: nat).(\forall (k: nat).(\forall (d: +nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to (eq T (lift k e +(lift h d t)) (lift (plus k h) d t)))))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (k: +nat).(\forall (d: nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to +(eq T (lift k e (lift h d t0)) (lift (plus k h) d t0))))))))) (\lambda (n: +nat).(\lambda (h: nat).(\lambda (k: nat).(\lambda (d: nat).(\lambda (e: +nat).(\lambda (_: (le e (plus d h))).(\lambda (_: (le d e)).(eq_ind_r T +(TSort n) (\lambda (t0: T).(eq T (lift k e t0) (lift (plus k h) d (TSort +n)))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T t0 (lift (plus k h) d +(TSort n)))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (TSort n) t0)) +(refl_equal T (TSort n)) (lift (plus k h) d (TSort n)) (lift_sort n (plus k +h) d)) (lift k e (TSort n)) (lift_sort n k e)) (lift h d (TSort n)) +(lift_sort n h d))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (k: +nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (H: (le e (plus d +h))).(\lambda (H0: (le d e)).(lt_le_e n d (eq T (lift k e (lift h d (TLRef +n))) (lift (plus k h) d (TLRef n))) (\lambda (H1: (lt n d)).(eq_ind_r T +(TLRef n) (\lambda (t0: T).(eq T (lift k e t0) (lift (plus k h) d (TLRef +n)))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 (lift (plus k h) d +(TLRef n)))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) t0)) +(refl_equal T (TLRef n)) (lift (plus k h) d (TLRef n)) (lift_lref_lt n (plus +k h) d H1)) (lift k e (TLRef n)) (lift_lref_lt n k e (lt_le_trans n d e H1 +H0))) (lift h d (TLRef n)) (lift_lref_lt n h d H1))) (\lambda (H1: (le d +n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(eq T (lift k e t0) (lift +(plus k h) d (TLRef n)))) (eq_ind_r T (TLRef (plus (plus n h) k)) (\lambda +(t0: T).(eq T t0 (lift (plus k h) d (TLRef n)))) (eq_ind_r T (TLRef (plus n +(plus k h))) (\lambda (t0: T).(eq T (TLRef (plus (plus n h) k)) t0)) (f_equal +nat T TLRef (plus (plus n h) k) (plus n (plus k h)) +(plus_permute_2_in_3_assoc n h k)) (lift (plus k h) d (TLRef n)) +(lift_lref_ge n (plus k h) d H1)) (lift k e (TLRef (plus n h))) (lift_lref_ge +(plus n h) k e (le_trans e (plus d h) (plus n h) H (plus_le_compat d n h h H1 +(le_n h))))) (lift h d (TLRef n)) (lift_lref_ge n h d H1))))))))))) (\lambda +(k: K).(\lambda (t0: T).(\lambda (H: ((\forall (h: nat).(\forall (k: +nat).(\forall (d: nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to +(eq T (lift k e (lift h d t0)) (lift (plus k h) d t0)))))))))).(\lambda (t1: +T).(\lambda (H0: ((\forall (h: nat).(\forall (k: nat).(\forall (d: +nat).(\forall (e: nat).((le e (plus d h)) \to ((le d e) \to (eq T (lift k e +(lift h d t1)) (lift (plus k h) d t1)))))))))).(\lambda (h: nat).(\lambda +(k0: nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (H1: (le e (plus d +h))).(\lambda (H2: (le d e)).(eq_ind_r T (THead k (lift h d t0) (lift h (s k +d) t1)) (\lambda (t2: T).(eq T (lift k0 e t2) (lift (plus k0 h) d (THead k t0 +t1)))) (eq_ind_r T (THead k (lift k0 e (lift h d t0)) (lift k0 (s k e) (lift +h (s k d) t1))) (\lambda (t2: T).(eq T t2 (lift (plus k0 h) d (THead k t0 +t1)))) (eq_ind_r T (THead k (lift (plus k0 h) d t0) (lift (plus k0 h) (s k d) +t1)) (\lambda (t2: T).(eq T (THead k (lift k0 e (lift h d t0)) (lift k0 (s k +e) (lift h (s k d) t1))) t2)) (f_equal3 K T T T THead k k (lift k0 e (lift h +d t0)) (lift (plus k0 h) d t0) (lift k0 (s k e) (lift h (s k d) t1)) (lift +(plus k0 h) (s k d) t1) (refl_equal K k) (H h k0 d e H1 H2) (H0 h k0 (s k d) +(s k e) (eq_ind nat (s k (plus d h)) (\lambda (n: nat).(le (s k e) n)) (s_le +k e (plus d h) H1) (plus (s k d) h) (s_plus k d h)) (s_le k d e H2))) (lift +(plus k0 h) d (THead k t0 t1)) (lift_head k t0 t1 (plus k0 h) d)) (lift k0 e +(THead k (lift h d t0) (lift h (s k d) t1))) (lift_head k (lift h d t0) (lift +h (s k d) t1) k0 e)) (lift h d (THead k t0 t1)) (lift_head k t0 t1 h +d))))))))))))) t). + +theorem lift_d: + \forall (t: T).(\forall (h: nat).(\forall (k: nat).(\forall (d: +nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k d) (lift k e t)) +(lift k e (lift h d t)))))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (k: +nat).(\forall (d: nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k +d) (lift k e t0)) (lift k e (lift h d t0))))))))) (\lambda (n: nat).(\lambda +(h: nat).(\lambda (k: nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (_: +(le e d)).(eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (lift h (plus k d) t0) +(lift k e (lift h d (TSort n))))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq +T t0 (lift k e (lift h d (TSort n))))) (eq_ind_r T (TSort n) (\lambda (t0: +T).(eq T (TSort n) (lift k e t0))) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq +T (TSort n) t0)) (refl_equal T (TSort n)) (lift k e (TSort n)) (lift_sort n k +e)) (lift h d (TSort n)) (lift_sort n h d)) (lift h (plus k d) (TSort n)) +(lift_sort n h (plus k d))) (lift k e (TSort n)) (lift_sort n k e)))))))) +(\lambda (n: nat).(\lambda (h: nat).(\lambda (k: nat).(\lambda (d: +nat).(\lambda (e: nat).(\lambda (H: (le e d)).(lt_le_e n e (eq T (lift h +(plus k d) (lift k e (TLRef n))) (lift k e (lift h d (TLRef n)))) (\lambda +(H0: (lt n e)).(let H1 \def (lt_le_trans n e d H0 H) in (eq_ind_r T (TLRef n) +(\lambda (t0: T).(eq T (lift h (plus k d) t0) (lift k e (lift h d (TLRef +n))))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T t0 (lift k e (lift h d +(TLRef n))))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) (lift k +e t0))) (eq_ind_r T (TLRef n) (\lambda (t0: T).(eq T (TLRef n) t0)) +(refl_equal T (TLRef n)) (lift k e (TLRef n)) (lift_lref_lt n k e H0)) (lift +h d (TLRef n)) (lift_lref_lt n h d H1)) (lift h (plus k d) (TLRef n)) +(lift_lref_lt n h (plus k d) (lt_le_trans n d (plus k d) H1 (le_plus_r k +d)))) (lift k e (TLRef n)) (lift_lref_lt n k e H0)))) (\lambda (H0: (le e +n)).(eq_ind_r T (TLRef (plus n k)) (\lambda (t0: T).(eq T (lift h (plus k d) +t0) (lift k e (lift h d (TLRef n))))) (eq_ind_r nat (plus d k) (\lambda (n0: +nat).(eq T (lift h n0 (TLRef (plus n k))) (lift k e (lift h d (TLRef n))))) +(lt_le_e n d (eq T (lift h (plus d k) (TLRef (plus n k))) (lift k e (lift h d +(TLRef n)))) (\lambda (H1: (lt n d)).(eq_ind_r T (TLRef (plus n k)) (\lambda +(t0: T).(eq T t0 (lift k e (lift h d (TLRef n))))) (eq_ind_r T (TLRef n) +(\lambda (t0: T).(eq T (TLRef (plus n k)) (lift k e t0))) (eq_ind_r T (TLRef +(plus n k)) (\lambda (t0: T).(eq T (TLRef (plus n k)) t0)) (refl_equal T +(TLRef (plus n k))) (lift k e (TLRef n)) (lift_lref_ge n k e H0)) (lift h d +(TLRef n)) (lift_lref_lt n h d H1)) (lift h (plus d k) (TLRef (plus n k))) +(lift_lref_lt (plus n k) h (plus d k) (lt_le_S (plus n k) (plus d k) +(plus_lt_compat_r n d k H1))))) (\lambda (H1: (le d n)).(eq_ind_r T (TLRef +(plus (plus n k) h)) (\lambda (t0: T).(eq T t0 (lift k e (lift h d (TLRef +n))))) (eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(eq T (TLRef (plus +(plus n k) h)) (lift k e t0))) (eq_ind_r T (TLRef (plus (plus n h) k)) +(\lambda (t0: T).(eq T (TLRef (plus (plus n k) h)) t0)) (f_equal nat T TLRef +(plus (plus n k) h) (plus (plus n h) k) (sym_eq nat (plus (plus n h) k) (plus +(plus n k) h) (plus_permute_2_in_3 n h k))) (lift k e (TLRef (plus n h))) +(lift_lref_ge (plus n h) k e (le_S_n e (plus n h) (lt_le_S e (S (plus n h)) +(le_lt_n_Sm e (plus n h) (le_plus_trans e n h H0)))))) (lift h d (TLRef n)) +(lift_lref_ge n h d H1)) (lift h (plus d k) (TLRef (plus n k))) (lift_lref_ge +(plus n k) h (plus d k) (le_S_n (plus d k) (plus n k) (lt_le_S (plus d k) (S +(plus n k)) (le_lt_n_Sm (plus d k) (plus n k) (plus_le_compat d n k k H1 +(le_n k))))))))) (plus k d) (plus_comm k d)) (lift k e (TLRef n)) +(lift_lref_ge n k e H0)))))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda +(H: ((\forall (h: nat).(\forall (k: nat).(\forall (d: nat).(\forall (e: +nat).((le e d) \to (eq T (lift h (plus k d) (lift k e t0)) (lift k e (lift h +d t0)))))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (h: nat).(\forall (k: +nat).(\forall (d: nat).(\forall (e: nat).((le e d) \to (eq T (lift h (plus k +d) (lift k e t1)) (lift k e (lift h d t1)))))))))).(\lambda (h: nat).(\lambda +(k0: nat).(\lambda (d: nat).(\lambda (e: nat).(\lambda (H1: (le e +d)).(eq_ind_r T (THead k (lift k0 e t0) (lift k0 (s k e) t1)) (\lambda (t2: +T).(eq T (lift h (plus k0 d) t2) (lift k0 e (lift h d (THead k t0 t1))))) +(eq_ind_r T (THead k (lift h (plus k0 d) (lift k0 e t0)) (lift h (s k (plus +k0 d)) (lift k0 (s k e) t1))) (\lambda (t2: T).(eq T t2 (lift k0 e (lift h d +(THead k t0 t1))))) (eq_ind_r T (THead k (lift h d t0) (lift h (s k d) t1)) +(\lambda (t2: T).(eq T (THead k (lift h (plus k0 d) (lift k0 e t0)) (lift h +(s k (plus k0 d)) (lift k0 (s k e) t1))) (lift k0 e t2))) (eq_ind_r T (THead +k (lift k0 e (lift h d t0)) (lift k0 (s k e) (lift h (s k d) t1))) (\lambda +(t2: T).(eq T (THead k (lift h (plus k0 d) (lift k0 e t0)) (lift h (s k (plus +k0 d)) (lift k0 (s k e) t1))) t2)) (eq_ind_r nat (plus k0 (s k d)) (\lambda +(n: nat).(eq T (THead k (lift h (plus k0 d) (lift k0 e t0)) (lift h n (lift +k0 (s k e) t1))) (THead k (lift k0 e (lift h d t0)) (lift k0 (s k e) (lift h +(s k d) t1))))) (f_equal3 K T T T THead k k (lift h (plus k0 d) (lift k0 e +t0)) (lift k0 e (lift h d t0)) (lift h (plus k0 (s k d)) (lift k0 (s k e) +t1)) (lift k0 (s k e) (lift h (s k d) t1)) (refl_equal K k) (H h k0 d e H1) +(H0 h k0 (s k d) (s k e) (s_le k e d H1))) (s k (plus k0 d)) (s_plus_sym k k0 +d)) (lift k0 e (THead k (lift h d t0) (lift h (s k d) t1))) (lift_head k +(lift h d t0) (lift h (s k d) t1) k0 e)) (lift h d (THead k t0 t1)) +(lift_head k t0 t1 h d)) (lift h (plus k0 d) (THead k (lift k0 e t0) (lift k0 +(s k e) t1))) (lift_head k (lift k0 e t0) (lift k0 (s k e) t1) h (plus k0 +d))) (lift k0 e (THead k t0 t1)) (lift_head k t0 t1 k0 e)))))))))))) t). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/tlt.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/tlt.ma new file mode 100644 index 000000000..9ce6a4755 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift/tlt.ma @@ -0,0 +1,294 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/tlt". + +include "lift/defs.ma". + +include "tlt/defs.ma". + +theorem lift_weight_map: + \forall (t: T).(\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to +nat))).(((\forall (m: nat).((le d m) \to (eq nat (f m) O)))) \to (eq nat +(weight_map f (lift h d t)) (weight_map f t)))))) +\def + \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: nat).(\forall (d: +nat).(\forall (f: ((nat \to nat))).(((\forall (m: nat).((le d m) \to (eq nat +(f m) O)))) \to (eq nat (weight_map f (lift h d t0)) (weight_map f t0))))))) +(\lambda (n: nat).(\lambda (_: nat).(\lambda (d: nat).(\lambda (f: ((nat \to +nat))).(\lambda (_: ((\forall (m: nat).((le d m) \to (eq nat (f m) +O))))).(refl_equal nat (weight_map f (TSort n)))))))) (\lambda (n: +nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat \to +nat))).(\lambda (H: ((\forall (m: nat).((le d m) \to (eq nat (f m) +O))))).(lt_le_e n d (eq nat (weight_map f (lift h d (TLRef n))) (weight_map f +(TLRef n))) (\lambda (H0: (lt n d)).(eq_ind_r T (TLRef n) (\lambda (t0: +T).(eq nat (weight_map f t0) (weight_map f (TLRef n)))) (refl_equal nat +(weight_map f (TLRef n))) (lift h d (TLRef n)) (lift_lref_lt n h d H0))) +(\lambda (H0: (le d n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: T).(eq +nat (weight_map f t0) (weight_map f (TLRef n)))) (eq_ind_r nat O (\lambda +(n0: nat).(eq nat (f (plus n h)) n0)) (H (plus n h) (le_S_n d (plus n h) +(le_n_S d (plus n h) (le_plus_trans d n h H0)))) (f n) (H n H0)) (lift h d +(TLRef n)) (lift_lref_ge n h d H0))))))))) (\lambda (k: K).(\lambda (t0: +T).(\lambda (H: ((\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to +nat))).(((\forall (m: nat).((le d m) \to (eq nat (f m) O)))) \to (eq nat +(weight_map f (lift h d t0)) (weight_map f t0)))))))).(\lambda (t1: +T).(\lambda (H0: ((\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to +nat))).(((\forall (m: nat).((le d m) \to (eq nat (f m) O)))) \to (eq nat +(weight_map f (lift h d t1)) (weight_map f t1)))))))).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (f: ((nat \to nat))).(\lambda (H1: ((\forall +(m: nat).((le d m) \to (eq nat (f m) O))))).(K_ind (\lambda (k0: K).(eq nat +(weight_map f (lift h d (THead k0 t0 t1))) (weight_map f (THead k0 t0 t1)))) +(\lambda (b: B).(eq_ind_r T (THead (Bind b) (lift h d t0) (lift h (s (Bind b) +d) t1)) (\lambda (t2: T).(eq nat (weight_map f t2) (weight_map f (THead (Bind +b) t0 t1)))) (B_ind (\lambda (b0: B).(eq nat (match b0 with [Abbr \Rightarrow +(S (plus (weight_map f (lift h d t0)) (weight_map (wadd f (S (weight_map f +(lift h d t0)))) (lift h (S d) t1)))) | Abst \Rightarrow (S (plus (weight_map +f (lift h d t0)) (weight_map (wadd f O) (lift h (S d) t1)))) | Void +\Rightarrow (S (plus (weight_map f (lift h d t0)) (weight_map (wadd f O) +(lift h (S d) t1))))]) (match b0 with [Abbr \Rightarrow (S (plus (weight_map +f t0) (weight_map (wadd f (S (weight_map f t0))) t1))) | Abst \Rightarrow (S +(plus (weight_map f t0) (weight_map (wadd f O) t1))) | Void \Rightarrow (S +(plus (weight_map f t0) (weight_map (wadd f O) t1)))]))) (eq_ind_r nat +(weight_map f t0) (\lambda (n: nat).(eq nat (S (plus n (weight_map (wadd f (S +n)) (lift h (S d) t1)))) (S (plus (weight_map f t0) (weight_map (wadd f (S +(weight_map f t0))) t1))))) (eq_ind_r nat (weight_map (wadd f (S (weight_map +f t0))) t1) (\lambda (n: nat).(eq nat (S (plus (weight_map f t0) n)) (S (plus +(weight_map f t0) (weight_map (wadd f (S (weight_map f t0))) t1))))) +(refl_equal nat (S (plus (weight_map f t0) (weight_map (wadd f (S (weight_map +f t0))) t1)))) (weight_map (wadd f (S (weight_map f t0))) (lift h (S d) t1)) +(H0 h (S d) (wadd f (S (weight_map f t0))) (\lambda (m: nat).(\lambda (H2: +(le (S d) m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: +nat).(le d n)) (eq nat (wadd f (S (weight_map f t0)) m) O) (\lambda (x: +nat).(\lambda (H3: (eq nat m (S x))).(\lambda (H4: (le d x)).(eq_ind_r nat (S +x) (\lambda (n: nat).(eq nat (wadd f (S (weight_map f t0)) n) O)) (H1 x H4) m +H3)))) (le_gen_S d m H2)))))) (weight_map f (lift h d t0)) (H h d f H1)) +(eq_ind_r nat (weight_map (wadd f O) t1) (\lambda (n: nat).(eq nat (S (plus +(weight_map f (lift h d t0)) n)) (S (plus (weight_map f t0) (weight_map (wadd +f O) t1))))) (f_equal nat nat S (plus (weight_map f (lift h d t0)) +(weight_map (wadd f O) t1)) (plus (weight_map f t0) (weight_map (wadd f O) +t1)) (f_equal2 nat nat nat plus (weight_map f (lift h d t0)) (weight_map f +t0) (weight_map (wadd f O) t1) (weight_map (wadd f O) t1) (H h d f H1) +(refl_equal nat (weight_map (wadd f O) t1)))) (weight_map (wadd f O) (lift h +(S d) t1)) (H0 h (S d) (wadd f O) (\lambda (m: nat).(\lambda (H2: (le (S d) +m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d +n)) (eq nat (wadd f O m) O) (\lambda (x: nat).(\lambda (H3: (eq nat m (S +x))).(\lambda (H4: (le d x)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat +(wadd f O n) O)) (H1 x H4) m H3)))) (le_gen_S d m H2)))))) (eq_ind_r nat +(weight_map (wadd f O) t1) (\lambda (n: nat).(eq nat (S (plus (weight_map f +(lift h d t0)) n)) (S (plus (weight_map f t0) (weight_map (wadd f O) t1))))) +(f_equal nat nat S (plus (weight_map f (lift h d t0)) (weight_map (wadd f O) +t1)) (plus (weight_map f t0) (weight_map (wadd f O) t1)) (f_equal2 nat nat +nat plus (weight_map f (lift h d t0)) (weight_map f t0) (weight_map (wadd f +O) t1) (weight_map (wadd f O) t1) (H h d f H1) (refl_equal nat (weight_map +(wadd f O) t1)))) (weight_map (wadd f O) (lift h (S d) t1)) (H0 h (S d) (wadd +f O) (\lambda (m: nat).(\lambda (H2: (le (S d) m)).(ex2_ind nat (\lambda (n: +nat).(eq nat m (S n))) (\lambda (n: nat).(le d n)) (eq nat (wadd f O m) O) +(\lambda (x: nat).(\lambda (H3: (eq nat m (S x))).(\lambda (H4: (le d +x)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (wadd f O n) O)) (H1 x H4) +m H3)))) (le_gen_S d m H2)))))) b) (lift h d (THead (Bind b) t0 t1)) +(lift_head (Bind b) t0 t1 h d))) (\lambda (f0: F).(eq_ind_r T (THead (Flat +f0) (lift h d t0) (lift h (s (Flat f0) d) t1)) (\lambda (t2: T).(eq nat +(weight_map f t2) (weight_map f (THead (Flat f0) t0 t1)))) (f_equal nat nat S +(plus (weight_map f (lift h d t0)) (weight_map f (lift h d t1))) (plus +(weight_map f t0) (weight_map f t1)) (f_equal2 nat nat nat plus (weight_map f +(lift h d t0)) (weight_map f t0) (weight_map f (lift h d t1)) (weight_map f +t1) (H h d f H1) (H0 h d f H1))) (lift h d (THead (Flat f0) t0 t1)) +(lift_head (Flat f0) t0 t1 h d))) k)))))))))) t). + +theorem lift_weight: + \forall (t: T).(\forall (h: nat).(\forall (d: nat).(eq nat (weight (lift h d +t)) (weight t)))) +\def + \lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(lift_weight_map t h d +(\lambda (_: nat).O) (\lambda (m: nat).(\lambda (_: (le d m)).(refl_equal nat +O)))))). + +theorem lift_weight_add: + \forall (w: nat).(\forall (t: T).(\forall (h: nat).(\forall (d: +nat).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall +(m: nat).((lt m d) \to (eq nat (g m) (f m))))) \to ((eq nat (g d) w) \to +(((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m))))) \to (eq nat +(weight_map f (lift h d t)) (weight_map g (lift (S h) d t))))))))))) +\def + \lambda (w: nat).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (h: +nat).(\forall (d: nat).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).((lt m d) \to (eq nat (g m) (f m))))) \to ((eq nat +(g d) w) \to (((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m))))) +\to (eq nat (weight_map f (lift h d t0)) (weight_map g (lift (S h) d +t0))))))))))) (\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda +(f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (_: ((\forall (m: +nat).((lt m d) \to (eq nat (g m) (f m)))))).(\lambda (_: (eq nat (g d) +w)).(\lambda (_: ((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f +m)))))).(refl_equal nat (weight_map g (lift (S h) d (TSort n)))))))))))) +(\lambda (n: nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (H: ((\forall (m: nat).((lt m +d) \to (eq nat (g m) (f m)))))).(\lambda (_: (eq nat (g d) w)).(\lambda (H1: +((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f m)))))).(lt_le_e n d +(eq nat (weight_map f (lift h d (TLRef n))) (weight_map g (lift (S h) d +(TLRef n)))) (\lambda (H2: (lt n d)).(eq_ind_r T (TLRef n) (\lambda (t0: +T).(eq nat (weight_map f t0) (weight_map g (lift (S h) d (TLRef n))))) +(eq_ind_r T (TLRef n) (\lambda (t0: T).(eq nat (weight_map f (TLRef n)) +(weight_map g t0))) (sym_equal nat (g n) (f n) (H n H2)) (lift (S h) d (TLRef +n)) (lift_lref_lt n (S h) d H2)) (lift h d (TLRef n)) (lift_lref_lt n h d +H2))) (\lambda (H2: (le d n)).(eq_ind_r T (TLRef (plus n h)) (\lambda (t0: +T).(eq nat (weight_map f t0) (weight_map g (lift (S h) d (TLRef n))))) +(eq_ind_r T (TLRef (plus n (S h))) (\lambda (t0: T).(eq nat (weight_map f +(TLRef (plus n h))) (weight_map g t0))) (eq_ind nat (S (plus n h)) (\lambda +(n0: nat).(eq nat (f (plus n h)) (g n0))) (sym_equal nat (g (S (plus n h))) +(f (plus n h)) (H1 (plus n h) (le_plus_trans d n h H2))) (plus n (S h)) +(plus_n_Sm n h)) (lift (S h) d (TLRef n)) (lift_lref_ge n (S h) d H2)) (lift +h d (TLRef n)) (lift_lref_ge n h d H2)))))))))))) (\lambda (k: K).(\lambda +(t0: T).(\lambda (H: ((\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat +\to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).((lt m d) \to +(eq nat (g m) (f m))))) \to ((eq nat (g d) w) \to (((\forall (m: nat).((le d +m) \to (eq nat (g (S m)) (f m))))) \to (eq nat (weight_map f (lift h d t0)) +(weight_map g (lift (S h) d t0)))))))))))).(\lambda (t1: T).(\lambda (H0: +((\forall (h: nat).(\forall (d: nat).(\forall (f: ((nat \to nat))).(\forall +(g: ((nat \to nat))).(((\forall (m: nat).((lt m d) \to (eq nat (g m) (f +m))))) \to ((eq nat (g d) w) \to (((\forall (m: nat).((le d m) \to (eq nat (g +(S m)) (f m))))) \to (eq nat (weight_map f (lift h d t1)) (weight_map g (lift +(S h) d t1)))))))))))).(\lambda (h: nat).(\lambda (d: nat).(\lambda (f: ((nat +\to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H1: ((\forall (m: +nat).((lt m d) \to (eq nat (g m) (f m)))))).(\lambda (H2: (eq nat (g d) +w)).(\lambda (H3: ((\forall (m: nat).((le d m) \to (eq nat (g (S m)) (f +m)))))).(K_ind (\lambda (k0: K).(eq nat (weight_map f (lift h d (THead k0 t0 +t1))) (weight_map g (lift (S h) d (THead k0 t0 t1))))) (\lambda (b: +B).(eq_ind_r T (THead (Bind b) (lift h d t0) (lift h (s (Bind b) d) t1)) +(\lambda (t2: T).(eq nat (weight_map f t2) (weight_map g (lift (S h) d (THead +(Bind b) t0 t1))))) (eq_ind_r T (THead (Bind b) (lift (S h) d t0) (lift (S h) +(s (Bind b) d) t1)) (\lambda (t2: T).(eq nat (weight_map f (THead (Bind b) +(lift h d t0) (lift h (s (Bind b) d) t1))) (weight_map g t2))) (B_ind +(\lambda (b0: B).(eq nat (match b0 with [Abbr \Rightarrow (S (plus +(weight_map f (lift h d t0)) (weight_map (wadd f (S (weight_map f (lift h d +t0)))) (lift h (S d) t1)))) | Abst \Rightarrow (S (plus (weight_map f (lift h +d t0)) (weight_map (wadd f O) (lift h (S d) t1)))) | Void \Rightarrow (S +(plus (weight_map f (lift h d t0)) (weight_map (wadd f O) (lift h (S d) +t1))))]) (match b0 with [Abbr \Rightarrow (S (plus (weight_map g (lift (S h) +d t0)) (weight_map (wadd g (S (weight_map g (lift (S h) d t0)))) (lift (S h) +(S d) t1)))) | Abst \Rightarrow (S (plus (weight_map g (lift (S h) d t0)) +(weight_map (wadd g O) (lift (S h) (S d) t1)))) | Void \Rightarrow (S (plus +(weight_map g (lift (S h) d t0)) (weight_map (wadd g O) (lift (S h) (S d) +t1))))]))) (f_equal nat nat S (plus (weight_map f (lift h d t0)) (weight_map +(wadd f (S (weight_map f (lift h d t0)))) (lift h (S d) t1))) (plus +(weight_map g (lift (S h) d t0)) (weight_map (wadd g (S (weight_map g (lift +(S h) d t0)))) (lift (S h) (S d) t1))) (f_equal2 nat nat nat plus (weight_map +f (lift h d t0)) (weight_map g (lift (S h) d t0)) (weight_map (wadd f (S +(weight_map f (lift h d t0)))) (lift h (S d) t1)) (weight_map (wadd g (S +(weight_map g (lift (S h) d t0)))) (lift (S h) (S d) t1)) (H h d f g H1 H2 +H3) (H0 h (S d) (wadd f (S (weight_map f (lift h d t0)))) (wadd g (S +(weight_map g (lift (S h) d t0)))) (\lambda (m: nat).(\lambda (H4: (lt m (S +d))).(or_ind (eq nat m O) (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) +(\lambda (m0: nat).(lt m0 d))) (eq nat (wadd g (S (weight_map g (lift (S h) d +t0))) m) (wadd f (S (weight_map f (lift h d t0))) m)) (\lambda (H5: (eq nat m +O)).(eq_ind_r nat O (\lambda (n: nat).(eq nat (wadd g (S (weight_map g (lift +(S h) d t0))) n) (wadd f (S (weight_map f (lift h d t0))) n))) (f_equal nat +nat S (weight_map g (lift (S h) d t0)) (weight_map f (lift h d t0)) +(sym_equal nat (weight_map f (lift h d t0)) (weight_map g (lift (S h) d t0)) +(H h d f g H1 H2 H3))) m H5)) (\lambda (H5: (ex2 nat (\lambda (m0: nat).(eq +nat m (S m0))) (\lambda (m: nat).(lt m d)))).(ex2_ind nat (\lambda (m0: +nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d)) (eq nat (wadd g (S +(weight_map g (lift (S h) d t0))) m) (wadd f (S (weight_map f (lift h d t0))) +m)) (\lambda (x: nat).(\lambda (H6: (eq nat m (S x))).(\lambda (H7: (lt x +d)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (wadd g (S (weight_map g +(lift (S h) d t0))) n) (wadd f (S (weight_map f (lift h d t0))) n))) (H1 x +H7) m H6)))) H5)) (lt_gen_xS m d H4)))) H2 (\lambda (m: nat).(\lambda (H4: +(le (S d) m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: +nat).(le d n)) (eq nat (g m) (wadd f (S (weight_map f (lift h d t0))) m)) +(\lambda (x: nat).(\lambda (H5: (eq nat m (S x))).(\lambda (H6: (le d +x)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (g n) (wadd f (S +(weight_map f (lift h d t0))) n))) (H3 x H6) m H5)))) (le_gen_S d m H4))))))) +(f_equal nat nat S (plus (weight_map f (lift h d t0)) (weight_map (wadd f O) +(lift h (S d) t1))) (plus (weight_map g (lift (S h) d t0)) (weight_map (wadd +g O) (lift (S h) (S d) t1))) (f_equal2 nat nat nat plus (weight_map f (lift h +d t0)) (weight_map g (lift (S h) d t0)) (weight_map (wadd f O) (lift h (S d) +t1)) (weight_map (wadd g O) (lift (S h) (S d) t1)) (H h d f g H1 H2 H3) (H0 h +(S d) (wadd f O) (wadd g O) (\lambda (m: nat).(\lambda (H4: (lt m (S +d))).(or_ind (eq nat m O) (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) +(\lambda (m0: nat).(lt m0 d))) (eq nat (wadd g O m) (wadd f O m)) (\lambda +(H5: (eq nat m O)).(eq_ind_r nat O (\lambda (n: nat).(eq nat (wadd g O n) +(wadd f O n))) (refl_equal nat O) m H5)) (\lambda (H5: (ex2 nat (\lambda (m0: +nat).(eq nat m (S m0))) (\lambda (m: nat).(lt m d)))).(ex2_ind nat (\lambda +(m0: nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d)) (eq nat (wadd g O +m) (wadd f O m)) (\lambda (x: nat).(\lambda (H6: (eq nat m (S x))).(\lambda +(H7: (lt x d)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (wadd g O n) +(wadd f O n))) (H1 x H7) m H6)))) H5)) (lt_gen_xS m d H4)))) H2 (\lambda (m: +nat).(\lambda (H4: (le (S d) m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S +n))) (\lambda (n: nat).(le d n)) (eq nat (g m) (wadd f O m)) (\lambda (x: +nat).(\lambda (H5: (eq nat m (S x))).(\lambda (H6: (le d x)).(eq_ind_r nat (S +x) (\lambda (n: nat).(eq nat (g n) (wadd f O n))) (H3 x H6) m H5)))) +(le_gen_S d m H4))))))) (f_equal nat nat S (plus (weight_map f (lift h d t0)) +(weight_map (wadd f O) (lift h (S d) t1))) (plus (weight_map g (lift (S h) d +t0)) (weight_map (wadd g O) (lift (S h) (S d) t1))) (f_equal2 nat nat nat +plus (weight_map f (lift h d t0)) (weight_map g (lift (S h) d t0)) +(weight_map (wadd f O) (lift h (S d) t1)) (weight_map (wadd g O) (lift (S h) +(S d) t1)) (H h d f g H1 H2 H3) (H0 h (S d) (wadd f O) (wadd g O) (\lambda +(m: nat).(\lambda (H4: (lt m (S d))).(or_ind (eq nat m O) (ex2 nat (\lambda +(m0: nat).(eq nat m (S m0))) (\lambda (m0: nat).(lt m0 d))) (eq nat (wadd g O +m) (wadd f O m)) (\lambda (H5: (eq nat m O)).(eq_ind_r nat O (\lambda (n: +nat).(eq nat (wadd g O n) (wadd f O n))) (refl_equal nat O) m H5)) (\lambda +(H5: (ex2 nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda (m: nat).(lt m +d)))).(ex2_ind nat (\lambda (m0: nat).(eq nat m (S m0))) (\lambda (m0: +nat).(lt m0 d)) (eq nat (wadd g O m) (wadd f O m)) (\lambda (x: nat).(\lambda +(H6: (eq nat m (S x))).(\lambda (H7: (lt x d)).(eq_ind_r nat (S x) (\lambda +(n: nat).(eq nat (wadd g O n) (wadd f O n))) (H1 x H7) m H6)))) H5)) +(lt_gen_xS m d H4)))) H2 (\lambda (m: nat).(\lambda (H4: (le (S d) +m)).(ex2_ind nat (\lambda (n: nat).(eq nat m (S n))) (\lambda (n: nat).(le d +n)) (eq nat (g m) (wadd f O m)) (\lambda (x: nat).(\lambda (H5: (eq nat m (S +x))).(\lambda (H6: (le d x)).(eq_ind_r nat (S x) (\lambda (n: nat).(eq nat (g +n) (wadd f O n))) (H3 x H6) m H5)))) (le_gen_S d m H4))))))) b) (lift (S h) d +(THead (Bind b) t0 t1)) (lift_head (Bind b) t0 t1 (S h) d)) (lift h d (THead +(Bind b) t0 t1)) (lift_head (Bind b) t0 t1 h d))) (\lambda (f0: F).(eq_ind_r +T (THead (Flat f0) (lift h d t0) (lift h (s (Flat f0) d) t1)) (\lambda (t2: +T).(eq nat (weight_map f t2) (weight_map g (lift (S h) d (THead (Flat f0) t0 +t1))))) (eq_ind_r T (THead (Flat f0) (lift (S h) d t0) (lift (S h) (s (Flat +f0) d) t1)) (\lambda (t2: T).(eq nat (weight_map f (THead (Flat f0) (lift h d +t0) (lift h (s (Flat f0) d) t1))) (weight_map g t2))) (f_equal nat nat S +(plus (weight_map f (lift h d t0)) (weight_map f (lift h d t1))) (plus +(weight_map g (lift (S h) d t0)) (weight_map g (lift (S h) d t1))) (f_equal2 +nat nat nat plus (weight_map f (lift h d t0)) (weight_map g (lift (S h) d +t0)) (weight_map f (lift h d t1)) (weight_map g (lift (S h) d t1)) (H h d f g +H1 H2 H3) (H0 h d f g H1 H2 H3))) (lift (S h) d (THead (Flat f0) t0 t1)) +(lift_head (Flat f0) t0 t1 (S h) d)) (lift h d (THead (Flat f0) t0 t1)) +(lift_head (Flat f0) t0 t1 h d))) k))))))))))))) t)). + +theorem lift_weight_add_O: + \forall (w: nat).(\forall (t: T).(\forall (h: nat).(\forall (f: ((nat \to +nat))).(eq nat (weight_map f (lift h O t)) (weight_map (wadd f w) (lift (S h) +O t)))))) +\def + \lambda (w: nat).(\lambda (t: T).(\lambda (h: nat).(\lambda (f: ((nat \to +nat))).(lift_weight_add (plus (wadd f w O) O) t h O f (wadd f w) (\lambda (m: +nat).(\lambda (H: (lt m O)).(let H0 \def (match H in le return (\lambda (n: +nat).(\lambda (_: (le ? n)).((eq nat n O) \to (eq nat (wadd f w m) (f m))))) +with [le_n \Rightarrow (\lambda (H0: (eq nat (S m) O)).(let H1 \def (eq_ind +nat (S m) (\lambda (e: nat).(match e in nat return (\lambda (_: nat).Prop) +with [O \Rightarrow False | (S _) \Rightarrow True])) I O H0) in (False_ind +(eq nat (wadd f w m) (f m)) H1))) | (le_S m0 H0) \Rightarrow (\lambda (H1: +(eq nat (S m0) O)).((let H2 \def (eq_ind nat (S m0) (\lambda (e: nat).(match +e in nat return (\lambda (_: nat).Prop) with [O \Rightarrow False | (S _) +\Rightarrow True])) I O H1) in (False_ind ((le (S m) m0) \to (eq nat (wadd f +w m) (f m))) H2)) H0))]) in (H0 (refl_equal nat O))))) (plus_n_O (wadd f w +O)) (\lambda (m: nat).(\lambda (_: (le O m)).(refl_equal nat (f m)))))))). + +theorem lift_tlt_dx: + \forall (k: K).(\forall (u: T).(\forall (t: T).(\forall (h: nat).(\forall +(d: nat).(tlt t (THead k u (lift h d t))))))) +\def + \lambda (k: K).(\lambda (u: T).(\lambda (t: T).(\lambda (h: nat).(\lambda +(d: nat).(eq_ind nat (weight (lift h d t)) (\lambda (n: nat).(lt n (weight +(THead k u (lift h d t))))) (tlt_head_dx k u (lift h d t)) (weight t) +(lift_weight t h d)))))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/defs.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/defs.ma new file mode 100644 index 000000000..45a489f1b --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/defs.ma @@ -0,0 +1,42 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/defs". + +include "lift/defs.ma". + +definition trans: + PList \to (nat \to nat) +\def + let rec trans (hds: PList) on hds: (nat \to nat) \def (\lambda (i: +nat).(match hds with [PNil \Rightarrow i | (PCons h d hds0) \Rightarrow (let +j \def (trans hds0 i) in (match (blt j d) with [true \Rightarrow j | false +\Rightarrow (plus j h)]))])) in trans. + +definition lift1: + PList \to (T \to T) +\def + let rec lift1 (hds: PList) on hds: (T \to T) \def (\lambda (t: T).(match hds +with [PNil \Rightarrow t | (PCons h d hds0) \Rightarrow (lift h d (lift1 hds0 +t))])) in lift1. + +definition lifts1: + PList \to (TList \to TList) +\def + let rec lifts1 (hds: PList) (ts: TList) on ts: TList \def (match ts with +[TNil \Rightarrow TNil | (TCons t ts0) \Rightarrow (TCons (lift1 hds t) +(lifts1 hds ts0))]) in lifts1. + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/fwd.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/fwd.ma new file mode 100644 index 000000000..3492c7ba4 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/fwd.ma @@ -0,0 +1,132 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/fwd". + +include "lift1/defs.ma". + +theorem lift1_lref: + \forall (hds: PList).(\forall (i: nat).(eq T (lift1 hds (TLRef i)) (TLRef +(trans hds i)))) +\def + \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (i: nat).(eq T +(lift1 p (TLRef i)) (TLRef (trans p i))))) (\lambda (i: nat).(refl_equal T +(TLRef (trans PNil i)))) (\lambda (h: nat).(\lambda (d: nat).(\lambda (p: +PList).(\lambda (H: ((\forall (i: nat).(eq T (lift1 p (TLRef i)) (TLRef +(trans p i)))))).(\lambda (i: nat).(eq_ind_r T (TLRef (trans p i)) (\lambda +(t: T).(eq T (lift h d t) (TLRef (match (blt (trans p i) d) with [true +\Rightarrow (trans p i) | false \Rightarrow (plus (trans p i) h)])))) +(refl_equal T (TLRef (match (blt (trans p i) d) with [true \Rightarrow (trans +p i) | false \Rightarrow (plus (trans p i) h)]))) (lift1 p (TLRef i)) (H +i))))))) hds). + +theorem lift1_bind: + \forall (b: B).(\forall (hds: PList).(\forall (u: T).(\forall (t: T).(eq T +(lift1 hds (THead (Bind b) u t)) (THead (Bind b) (lift1 hds u) (lift1 (Ss +hds) t)))))) +\def + \lambda (b: B).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall +(u: T).(\forall (t: T).(eq T (lift1 p (THead (Bind b) u t)) (THead (Bind b) +(lift1 p u) (lift1 (Ss p) t)))))) (\lambda (u: T).(\lambda (t: T).(refl_equal +T (THead (Bind b) (lift1 PNil u) (lift1 (Ss PNil) t))))) (\lambda (h: +nat).(\lambda (d: nat).(\lambda (p: PList).(\lambda (H: ((\forall (u: +T).(\forall (t: T).(eq T (lift1 p (THead (Bind b) u t)) (THead (Bind b) +(lift1 p u) (lift1 (Ss p) t))))))).(\lambda (u: T).(\lambda (t: T).(eq_ind_r +T (THead (Bind b) (lift1 p u) (lift1 (Ss p) t)) (\lambda (t0: T).(eq T (lift +h d t0) (THead (Bind b) (lift h d (lift1 p u)) (lift h (S d) (lift1 (Ss p) +t))))) (eq_ind_r T (THead (Bind b) (lift h d (lift1 p u)) (lift h (S d) +(lift1 (Ss p) t))) (\lambda (t0: T).(eq T t0 (THead (Bind b) (lift h d (lift1 +p u)) (lift h (S d) (lift1 (Ss p) t))))) (refl_equal T (THead (Bind b) (lift +h d (lift1 p u)) (lift h (S d) (lift1 (Ss p) t)))) (lift h d (THead (Bind b) +(lift1 p u) (lift1 (Ss p) t))) (lift_bind b (lift1 p u) (lift1 (Ss p) t) h +d)) (lift1 p (THead (Bind b) u t)) (H u t)))))))) hds)). + +theorem lift1_flat: + \forall (f: F).(\forall (hds: PList).(\forall (u: T).(\forall (t: T).(eq T +(lift1 hds (THead (Flat f) u t)) (THead (Flat f) (lift1 hds u) (lift1 hds +t)))))) +\def + \lambda (f: F).(\lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall +(u: T).(\forall (t: T).(eq T (lift1 p (THead (Flat f) u t)) (THead (Flat f) +(lift1 p u) (lift1 p t)))))) (\lambda (u: T).(\lambda (t: T).(refl_equal T +(THead (Flat f) (lift1 PNil u) (lift1 PNil t))))) (\lambda (h: nat).(\lambda +(d: nat).(\lambda (p: PList).(\lambda (H: ((\forall (u: T).(\forall (t: +T).(eq T (lift1 p (THead (Flat f) u t)) (THead (Flat f) (lift1 p u) (lift1 p +t))))))).(\lambda (u: T).(\lambda (t: T).(eq_ind_r T (THead (Flat f) (lift1 p +u) (lift1 p t)) (\lambda (t0: T).(eq T (lift h d t0) (THead (Flat f) (lift h +d (lift1 p u)) (lift h d (lift1 p t))))) (eq_ind_r T (THead (Flat f) (lift h +d (lift1 p u)) (lift h d (lift1 p t))) (\lambda (t0: T).(eq T t0 (THead (Flat +f) (lift h d (lift1 p u)) (lift h d (lift1 p t))))) (refl_equal T (THead +(Flat f) (lift h d (lift1 p u)) (lift h d (lift1 p t)))) (lift h d (THead +(Flat f) (lift1 p u) (lift1 p t))) (lift_flat f (lift1 p u) (lift1 p t) h d)) +(lift1 p (THead (Flat f) u t)) (H u t)))))))) hds)). + +theorem lift1_cons_tail: + \forall (t: T).(\forall (h: nat).(\forall (d: nat).(\forall (hds: PList).(eq +T (lift1 (PConsTail hds h d) t) (lift1 hds (lift h d t)))))) +\def + \lambda (t: T).(\lambda (h: nat).(\lambda (d: nat).(\lambda (hds: +PList).(PList_ind (\lambda (p: PList).(eq T (lift1 (PConsTail p h d) t) +(lift1 p (lift h d t)))) (refl_equal T (lift h d t)) (\lambda (n: +nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H: (eq T (lift1 +(PConsTail p h d) t) (lift1 p (lift h d t)))).(eq_ind_r T (lift1 p (lift h d +t)) (\lambda (t0: T).(eq T (lift n n0 t0) (lift n n0 (lift1 p (lift h d +t))))) (refl_equal T (lift n n0 (lift1 p (lift h d t)))) (lift1 (PConsTail p +h d) t) H))))) hds)))). + +theorem lifts1_flat: + \forall (f: F).(\forall (hds: PList).(\forall (t: T).(\forall (ts: +TList).(eq T (lift1 hds (THeads (Flat f) ts t)) (THeads (Flat f) (lifts1 hds +ts) (lift1 hds t)))))) +\def + \lambda (f: F).(\lambda (hds: PList).(\lambda (t: T).(\lambda (ts: +TList).(TList_ind (\lambda (t0: TList).(eq T (lift1 hds (THeads (Flat f) t0 +t)) (THeads (Flat f) (lifts1 hds t0) (lift1 hds t)))) (refl_equal T (lift1 +hds t)) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (H: (eq T (lift1 hds +(THeads (Flat f) t1 t)) (THeads (Flat f) (lifts1 hds t1) (lift1 hds +t)))).(eq_ind_r T (THead (Flat f) (lift1 hds t0) (lift1 hds (THeads (Flat f) +t1 t))) (\lambda (t2: T).(eq T t2 (THead (Flat f) (lift1 hds t0) (THeads +(Flat f) (lifts1 hds t1) (lift1 hds t))))) (eq_ind_r T (THeads (Flat f) +(lifts1 hds t1) (lift1 hds t)) (\lambda (t2: T).(eq T (THead (Flat f) (lift1 +hds t0) t2) (THead (Flat f) (lift1 hds t0) (THeads (Flat f) (lifts1 hds t1) +(lift1 hds t))))) (refl_equal T (THead (Flat f) (lift1 hds t0) (THeads (Flat +f) (lifts1 hds t1) (lift1 hds t)))) (lift1 hds (THeads (Flat f) t1 t)) H) +(lift1 hds (THead (Flat f) t0 (THeads (Flat f) t1 t))) (lift1_flat f hds t0 +(THeads (Flat f) t1 t)))))) ts)))). + +theorem lifts1_nil: + \forall (ts: TList).(eq TList (lifts1 PNil ts) ts) +\def + \lambda (ts: TList).(TList_ind (\lambda (t: TList).(eq TList (lifts1 PNil t) +t)) (refl_equal TList TNil) (\lambda (t: T).(\lambda (t0: TList).(\lambda (H: +(eq TList (lifts1 PNil t0) t0)).(eq_ind_r TList t0 (\lambda (t1: TList).(eq +TList (TCons t t1) (TCons t t0))) (refl_equal TList (TCons t t0)) (lifts1 +PNil t0) H)))) ts). + +theorem lifts1_cons: + \forall (h: nat).(\forall (d: nat).(\forall (hds: PList).(\forall (ts: +TList).(eq TList (lifts1 (PCons h d hds) ts) (lifts h d (lifts1 hds ts)))))) +\def + \lambda (h: nat).(\lambda (d: nat).(\lambda (hds: PList).(\lambda (ts: +TList).(TList_ind (\lambda (t: TList).(eq TList (lifts1 (PCons h d hds) t) +(lifts h d (lifts1 hds t)))) (refl_equal TList TNil) (\lambda (t: T).(\lambda +(t0: TList).(\lambda (H: (eq TList (lifts1 (PCons h d hds) t0) (lifts h d +(lifts1 hds t0)))).(eq_ind_r TList (lifts h d (lifts1 hds t0)) (\lambda (t1: +TList).(eq TList (TCons (lift h d (lift1 hds t)) t1) (TCons (lift h d (lift1 +hds t)) (lifts h d (lifts1 hds t0))))) (refl_equal TList (TCons (lift h d +(lift1 hds t)) (lifts h d (lifts1 hds t0)))) (lifts1 (PCons h d hds) t0) +H)))) ts)))). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/props.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/props.ma new file mode 100644 index 000000000..a47a50e07 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/props.ma @@ -0,0 +1,55 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* This file was automatically generated: do not edit *********************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift1/props". + +include "lift1/defs.ma". + +theorem lift1_xhg: + \forall (hds: PList).(\forall (t: T).(eq T (lift1 (Ss hds) (lift (S O) O t)) +(lift (S O) O (lift1 hds t)))) +\def + \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (t: T).(eq T +(lift1 (Ss p) (lift (S O) O t)) (lift (S O) O (lift1 p t))))) (\lambda (t: +T).(refl_equal T (lift (S O) O t))) (\lambda (h: nat).(\lambda (d: +nat).(\lambda (p: PList).(\lambda (H: ((\forall (t: T).(eq T (lift1 (Ss p) +(lift (S O) O t)) (lift (S O) O (lift1 p t)))))).(\lambda (t: T).(eq_ind_r T +(lift (S O) O (lift1 p t)) (\lambda (t0: T).(eq T (lift h (S d) t0) (lift (S +O) O (lift h d (lift1 p t))))) (eq_ind nat (plus (S O) d) (\lambda (n: +nat).(eq T (lift h n (lift (S O) O (lift1 p t))) (lift (S O) O (lift h d +(lift1 p t))))) (eq_ind_r T (lift (S O) O (lift h d (lift1 p t))) (\lambda +(t0: T).(eq T t0 (lift (S O) O (lift h d (lift1 p t))))) (refl_equal T (lift +(S O) O (lift h d (lift1 p t)))) (lift h (plus (S O) d) (lift (S O) O (lift1 +p t))) (lift_d (lift1 p t) h (S O) d O (le_O_n d))) (S d) (refl_equal nat (S +d))) (lift1 (Ss p) (lift (S O) O t)) (H t))))))) hds). + +theorem lifts1_xhg: + \forall (hds: PList).(\forall (ts: TList).(eq TList (lifts1 (Ss hds) (lifts +(S O) O ts)) (lifts (S O) O (lifts1 hds ts)))) +\def + \lambda (hds: PList).(\lambda (ts: TList).(TList_ind (\lambda (t: TList).(eq +TList (lifts1 (Ss hds) (lifts (S O) O t)) (lifts (S O) O (lifts1 hds t)))) +(refl_equal TList TNil) (\lambda (t: T).(\lambda (t0: TList).(\lambda (H: (eq +TList (lifts1 (Ss hds) (lifts (S O) O t0)) (lifts (S O) O (lifts1 hds +t0)))).(eq_ind_r T (lift (S O) O (lift1 hds t)) (\lambda (t1: T).(eq TList +(TCons t1 (lifts1 (Ss hds) (lifts (S O) O t0))) (TCons (lift (S O) O (lift1 +hds t)) (lifts (S O) O (lifts1 hds t0))))) (eq_ind_r TList (lifts (S O) O +(lifts1 hds t0)) (\lambda (t1: TList).(eq TList (TCons (lift (S O) O (lift1 +hds t)) t1) (TCons (lift (S O) O (lift1 hds t)) (lifts (S O) O (lifts1 hds +t0))))) (refl_equal TList (TCons (lift (S O) O (lift1 hds t)) (lifts (S O) O +(lifts1 hds t0)))) (lifts1 (Ss hds) (lifts (S O) O t0)) H) (lift1 (Ss hds) +(lift (S O) O t)) (lift1_xhg hds t))))) ts)). + diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/preamble.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/preamble.ma new file mode 100644 index 000000000..ebefd32d9 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/preamble.ma @@ -0,0 +1,25 @@ +set "baseuri" "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/preamble". + +include "../Base/theory.ma". + +alias id "s" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/s/defs/s.con". +alias id "lift_sort" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd/lift_sort.con". +alias id "lift_head" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd/lift_head.con". +alias id "r" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/r/defs/r.con". +alias id "r_S" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/r/props/r_S.con". +alias id "drop_gen_sort" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd/drop_gen_sort.con". +alias id "drop_gen_refl" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd/drop_gen_refl.con". +alias id "drop_gen_drop" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd/drop_gen_drop.con". +alias id "drop_gen_skip_l" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd/drop_gen_skip_l.con". +alias id "r_plus_sym" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/r/props/r_plus_sym.con". +alias id "lift_bind" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd/lift_bind.con". +alias id "lift_flat" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd/lift_flat.con". +alias id "lift_d" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/props/lift_d.con". +alias id "s" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/s/defs/s.con". +alias id "s_plus" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/s/props/s_plus.con". +alias id "s_le" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/s/props/s_le.con". +alias id "s_plus_sym" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/s/props/s_plus_sym.con". +alias id "lift_lref_lt" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd/lift_lref_lt.con". +alias id "lift_lref_ge" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd/lift_lref_ge.con". +alias id "lift_head" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd/lift_head.con". +alias id "tlt_head_dx" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/tlt/props/tlt_head_dx.con". diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/preamble.ma~ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/preamble.ma~ new file mode 100644 index 000000000..1dce7c9b1 --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/preamble.ma~ @@ -0,0 +1,21 @@ +alias id "s" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/s/defs/s.con". +alias id "lift_sort" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd/lift_sort.con". +alias id "lift_head" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd/lift_head.con". +alias id "r" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/r/defs/r.con". +alias id "r_S" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/r/props/r_S.con". +alias id "drop_gen_sort" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd/drop_gen_sort.con". +alias id "drop_gen_refl" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd/drop_gen_refl.con". +alias id "drop_gen_drop" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd/drop_gen_drop.con". +alias id "drop_gen_skip_l" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/drop/fwd/drop_gen_skip_l.con". +alias id "r_plus_sym" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/r/props/r_plus_sym.con". +alias id "lift_bind" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd/lift_bind.con". +alias id "lift_flat" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd/lift_flat.con". +alias id "lift_d" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/props/lift_d.con". +alias id "s" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/s/defs/s.con". +alias id "s_plus" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/s/props/s_plus.con". +alias id "s_le" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/s/props/s_le.con". +alias id "s_plus_sym" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/s/props/s_plus_sym.con". +alias id "lift_lref_lt" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd/lift_lref_lt.con". +alias id "lift_lref_ge" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd/lift_lref_ge.con". +alias id "lift_head" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/lift/fwd/lift_head.con". +alias id "tlt_head_dx" = "cic:/matita/LAMBDA-TYPES/Level-1/LambdaDelta/tlt/props/tlt_head_dx.con". diff --git a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/theory.ma b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/theory.ma index 5e6b423f7..c24e6622d 100644 --- a/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/theory.ma +++ b/matita/contribs/LAMBDA-TYPES/Level-1/LambdaDelta/theory.ma @@ -26,6 +26,54 @@ include "s/defs.ma". include "s/props.ma". +include "tlt/defs.ma". + +include "tlt/props.ma". + +include "iso/defs.ma". + +include "iso/fwd.ma". + +include "iso/props.ma". + +include "C/defs.ma". + +include "C/props.ma". + +include "r/defs.ma". + +include "r/props.ma". + +include "clen/defs.ma". + +include "flt/defs.ma". + +include "flt/props.ma". + +include "lift/defs.ma". + +include "lift/fwd.ma". + +include "lift/props.ma". + +include "lift/tlt.ma". + +include "lift1/defs.ma". + +include "lift1/fwd.ma". + +include "lift1/props.ma". + +include "cnt/defs.ma". + +include "cnt/props.ma". + +include "drop/defs.ma". + +include "drop/fwd.ma". + +include "drop/props.ma". + include "G/defs.ma". include "next_plus/defs.ma".