]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/LAMBDA-TYPES/LambdaDelta-1/drop1/getl.ma
LambdaDelta-1 regenerated as a subdevel ov LAMBDA-TYPES
[helm.git] / helm / software / matita / contribs / LAMBDA-TYPES / LambdaDelta-1 / drop1 / getl.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 (* This file was automatically generated: do not edit *********************)
16
17 include "LambdaDelta-1/drop1/defs.ma".
18
19 include "LambdaDelta-1/getl/drop.ma".
20
21 theorem drop1_getl_trans:
22  \forall (hds: PList).(\forall (c1: C).(\forall (c2: C).((drop1 hds c2 c1) 
23 \to (\forall (b: B).(\forall (e1: C).(\forall (v: T).(\forall (i: nat).((getl 
24 i c1 (CHead e1 (Bind b) v)) \to (ex2 C (\lambda (e2: C).(drop1 (ptrans hds i) 
25 e2 e1)) (\lambda (e2: C).(getl (trans hds i) c2 (CHead e2 (Bind b) (lift1 
26 (ptrans hds i) v)))))))))))))
27 \def
28  \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c1: 
29 C).(\forall (c2: C).((drop1 p c2 c1) \to (\forall (b: B).(\forall (e1: 
30 C).(\forall (v: T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to 
31 (ex2 C (\lambda (e2: C).(drop1 (ptrans p i) e2 e1)) (\lambda (e2: C).(getl 
32 (trans p i) c2 (CHead e2 (Bind b) (lift1 (ptrans p i) v)))))))))))))) 
33 (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (drop1 PNil c2 c1)).(\lambda 
34 (b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H0: (getl 
35 i c1 (CHead e1 (Bind b) v))).(let H1 \def (match H in drop1 return (\lambda 
36 (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda (_: (drop1 p c c0)).((eq 
37 PList p PNil) \to ((eq C c c2) \to ((eq C c0 c1) \to (ex2 C (\lambda (e2: 
38 C).(drop1 PNil e2 e1)) (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) 
39 v))))))))))) with [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil 
40 PNil)).(\lambda (H2: (eq C c c2)).(\lambda (H3: (eq C c c1)).(eq_ind C c2 
41 (\lambda (c0: C).((eq C c0 c1) \to (ex2 C (\lambda (e2: C).(drop1 PNil e2 
42 e1)) (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) v)))))) (\lambda (H4: (eq 
43 C c2 c1)).(eq_ind C c1 (\lambda (c0: C).(ex2 C (\lambda (e2: C).(drop1 PNil 
44 e2 e1)) (\lambda (e2: C).(getl i c0 (CHead e2 (Bind b) v))))) (ex_intro2 C 
45 (\lambda (e2: C).(drop1 PNil e2 e1)) (\lambda (e2: C).(getl i c1 (CHead e2 
46 (Bind b) v))) e1 (drop1_nil e1) H0) c2 (sym_eq C c2 c1 H4))) c (sym_eq C c c2 
47 H2) H3)))) | (drop1_cons c0 c3 h d H1 c4 hds0 H2) \Rightarrow (\lambda (H3: 
48 (eq PList (PCons h d hds0) PNil)).(\lambda (H4: (eq C c0 c2)).(\lambda (H5: 
49 (eq C c4 c1)).((let H6 \def (eq_ind PList (PCons h d hds0) (\lambda (e: 
50 PList).(match e in PList return (\lambda (_: PList).Prop) with [PNil 
51 \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in 
52 (False_ind ((eq C c0 c2) \to ((eq C c4 c1) \to ((drop h d c0 c3) \to ((drop1 
53 hds0 c3 c4) \to (ex2 C (\lambda (e2: C).(drop1 PNil e2 e1)) (\lambda (e2: 
54 C).(getl i c2 (CHead e2 (Bind b) v)))))))) H6)) H4 H5 H1 H2))))]) in (H1 
55 (refl_equal PList PNil) (refl_equal C c2) (refl_equal C c1))))))))))) 
56 (\lambda (h: nat).(\lambda (d: nat).(\lambda (hds0: PList).(\lambda (H: 
57 ((\forall (c1: C).(\forall (c2: C).((drop1 hds0 c2 c1) \to (\forall (b: 
58 B).(\forall (e1: C).(\forall (v: T).(\forall (i: nat).((getl i c1 (CHead e1 
59 (Bind b) v)) \to (ex2 C (\lambda (e2: C).(drop1 (ptrans hds0 i) e2 e1)) 
60 (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift1 (ptrans 
61 hds0 i) v))))))))))))))).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H0: 
62 (drop1 (PCons h d hds0) c2 c1)).(\lambda (b: B).(\lambda (e1: C).(\lambda (v: 
63 T).(\lambda (i: nat).(\lambda (H1: (getl i c1 (CHead e1 (Bind b) v))).(let H2 
64 \def (match H0 in drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda 
65 (c0: C).(\lambda (_: (drop1 p c c0)).((eq PList p (PCons h d hds0)) \to ((eq 
66 C c c2) \to ((eq C c0 c1) \to (ex2 C (\lambda (e2: C).(drop1 (match (blt 
67 (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans hds0 
68 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 e1)) (\lambda 
69 (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans 
70 hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) 
71 (lift1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d 
72 (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) 
73 v)))))))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil 
74 (PCons h d hds0))).(\lambda (H3: (eq C c c2)).(\lambda (H4: (eq C c 
75 c1)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e in PList 
76 return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) 
77 \Rightarrow False])) I (PCons h d hds0) H2) in (False_ind ((eq C c c2) \to 
78 ((eq C c c1) \to (ex2 C (\lambda (e2: C).(drop1 (match (blt (trans hds0 i) d) 
79 with [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) 
80 | false \Rightarrow (ptrans hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match 
81 (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false 
82 \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (lift1 (match 
83 (blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans 
84 hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) v))))))) 
85 H5)) H3 H4)))) | (drop1_cons c0 c3 h0 d0 H2 c4 hds1 H3) \Rightarrow (\lambda 
86 (H4: (eq PList (PCons h0 d0 hds1) (PCons h d hds0))).(\lambda (H5: (eq C c0 
87 c2)).(\lambda (H6: (eq C c4 c1)).((let H7 \def (f_equal PList PList (\lambda 
88 (e: PList).(match e in PList return (\lambda (_: PList).PList) with [PNil 
89 \Rightarrow hds1 | (PCons _ _ p) \Rightarrow p])) (PCons h0 d0 hds1) (PCons h 
90 d hds0) H4) in ((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e 
91 in PList return (\lambda (_: PList).nat) with [PNil \Rightarrow d0 | (PCons _ 
92 n _) \Rightarrow n])) (PCons h0 d0 hds1) (PCons h d hds0) H4) in ((let H9 
93 \def (f_equal PList nat (\lambda (e: PList).(match e in PList return (\lambda 
94 (_: PList).nat) with [PNil \Rightarrow h0 | (PCons n _ _) \Rightarrow n])) 
95 (PCons h0 d0 hds1) (PCons h d hds0) H4) in (eq_ind nat h (\lambda (n: 
96 nat).((eq nat d0 d) \to ((eq PList hds1 hds0) \to ((eq C c0 c2) \to ((eq C c4 
97 c1) \to ((drop n d0 c0 c3) \to ((drop1 hds1 c3 c4) \to (ex2 C (\lambda (e2: 
98 C).(drop1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h 
99 (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans 
100 hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with 
101 [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) 
102 h)]) c2 (CHead e2 (Bind b) (lift1 (match (blt (trans hds0 i) d) with [true 
103 \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false 
104 \Rightarrow (ptrans hds0 i)]) v)))))))))))) (\lambda (H10: (eq nat d0 
105 d)).(eq_ind nat d (\lambda (n: nat).((eq PList hds1 hds0) \to ((eq C c0 c2) 
106 \to ((eq C c4 c1) \to ((drop h n c0 c3) \to ((drop1 hds1 c3 c4) \to (ex2 C 
107 (\lambda (e2: C).(drop1 (match (blt (trans hds0 i) d) with [true \Rightarrow 
108 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow 
109 (ptrans hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match (blt (trans hds0 i) 
110 d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans 
111 hds0 i) h)]) c2 (CHead e2 (Bind b) (lift1 (match (blt (trans hds0 i) d) with 
112 [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | 
113 false \Rightarrow (ptrans hds0 i)]) v))))))))))) (\lambda (H11: (eq PList 
114 hds1 hds0)).(eq_ind PList hds0 (\lambda (p: PList).((eq C c0 c2) \to ((eq C 
115 c4 c1) \to ((drop h d c0 c3) \to ((drop1 p c3 c4) \to (ex2 C (\lambda (e2: 
116 C).(drop1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h 
117 (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans 
118 hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with 
119 [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) 
120 h)]) c2 (CHead e2 (Bind b) (lift1 (match (blt (trans hds0 i) d) with [true 
121 \Rightarrow (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false 
122 \Rightarrow (ptrans hds0 i)]) v)))))))))) (\lambda (H12: (eq C c0 
123 c2)).(eq_ind C c2 (\lambda (c: C).((eq C c4 c1) \to ((drop h d c c3) \to 
124 ((drop1 hds0 c3 c4) \to (ex2 C (\lambda (e2: C).(drop1 (match (blt (trans 
125 hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) 
126 (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 e1)) (\lambda (e2: 
127 C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) 
128 | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (lift1 
129 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S 
130 (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) 
131 v))))))))) (\lambda (H13: (eq C c4 c1)).(eq_ind C c1 (\lambda (c: C).((drop h 
132 d c2 c3) \to ((drop1 hds0 c3 c) \to (ex2 C (\lambda (e2: C).(drop1 (match 
133 (blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans 
134 hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 e1)) 
135 (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow 
136 (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 
137 (Bind b) (lift1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h 
138 (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans 
139 hds0 i)]) v)))))))) (\lambda (H14: (drop h d c2 c3)).(\lambda (H15: (drop1 
140 hds0 c3 c1)).(xinduction bool (blt (trans hds0 i) d) (\lambda (b0: bool).(ex2 
141 C (\lambda (e2: C).(drop1 (match b0 with [true \Rightarrow (PCons h (minus d 
142 (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 
143 e1)) (\lambda (e2: C).(getl (match b0 with [true \Rightarrow (trans hds0 i) | 
144 false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (lift1 
145 (match b0 with [true \Rightarrow (PCons h (minus d (S (trans hds0 i))) 
146 (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) v)))))) (\lambda (x_x: 
147 bool).(bool_ind (\lambda (b0: bool).((eq bool (blt (trans hds0 i) d) b0) \to 
148 (ex2 C (\lambda (e2: C).(drop1 (match b0 with [true \Rightarrow (PCons h 
149 (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans 
150 hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match b0 with [true \Rightarrow 
151 (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 
152 (Bind b) (lift1 (match b0 with [true \Rightarrow (PCons h (minus d (S (trans 
153 hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) v))))))) 
154 (\lambda (H16: (eq bool (blt (trans hds0 i) d) true)).(let H_x \def (H c1 c3 
155 H15 b e1 v i H1) in (let H17 \def H_x in (ex2_ind C (\lambda (e2: C).(drop1 
156 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) c3 (CHead e2 
157 (Bind b) (lift1 (ptrans hds0 i) v)))) (ex2 C (\lambda (e2: C).(drop1 (PCons h 
158 (minus d (S (trans hds0 i))) (ptrans hds0 i)) e2 e1)) (\lambda (e2: C).(getl 
159 (trans hds0 i) c2 (CHead e2 (Bind b) (lift1 (PCons h (minus d (S (trans hds0 
160 i))) (ptrans hds0 i)) v))))) (\lambda (x: C).(\lambda (H18: (drop1 (ptrans 
161 hds0 i) x e1)).(\lambda (H19: (getl (trans hds0 i) c3 (CHead x (Bind b) 
162 (lift1 (ptrans hds0 i) v)))).(let H_x0 \def (drop_getl_trans_lt (trans hds0 
163 i) d (blt_lt d (trans hds0 i) H16) c2 c3 h H14 b x (lift1 (ptrans hds0 i) v) 
164 H19) in (let H20 \def H_x0 in (ex2_ind C (\lambda (e2: C).(getl (trans hds0 
165 i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans hds0 i))) (lift1 (ptrans 
166 hds0 i) v))))) (\lambda (e2: C).(drop h (minus d (S (trans hds0 i))) e2 x)) 
167 (ex2 C (\lambda (e2: C).(drop1 (PCons h (minus d (S (trans hds0 i))) (ptrans 
168 hds0 i)) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) 
169 (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) v))))) (\lambda 
170 (x0: C).(\lambda (H21: (getl (trans hds0 i) c2 (CHead x0 (Bind b) (lift h 
171 (minus d (S (trans hds0 i))) (lift1 (ptrans hds0 i) v))))).(\lambda (H22: 
172 (drop h (minus d (S (trans hds0 i))) x0 x)).(ex_intro2 C (\lambda (e2: 
173 C).(drop1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) e2 e1)) 
174 (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift1 (PCons h 
175 (minus d (S (trans hds0 i))) (ptrans hds0 i)) v)))) x0 (drop1_cons x0 x h 
176 (minus d (S (trans hds0 i))) H22 e1 (ptrans hds0 i) H18) H21)))) H20)))))) 
177 H17)))) (\lambda (H16: (eq bool (blt (trans hds0 i) d) false)).(let H_x \def 
178 (H c1 c3 H15 b e1 v i H1) in (let H17 \def H_x in (ex2_ind C (\lambda (e2: 
179 C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) c3 
180 (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))) (ex2 C (\lambda (e2: 
181 C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (plus (trans hds0 i) 
182 h) c2 (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v))))) (\lambda (x: 
183 C).(\lambda (H18: (drop1 (ptrans hds0 i) x e1)).(\lambda (H19: (getl (trans 
184 hds0 i) c3 (CHead x (Bind b) (lift1 (ptrans hds0 i) v)))).(let H20 \def 
185 (drop_getl_trans_ge (trans hds0 i) c2 c3 d h H14 (CHead x (Bind b) (lift1 
186 (ptrans hds0 i) v)) H19) in (ex_intro2 C (\lambda (e2: C).(drop1 (ptrans hds0 
187 i) e2 e1)) (\lambda (e2: C).(getl (plus (trans hds0 i) h) c2 (CHead e2 (Bind 
188 b) (lift1 (ptrans hds0 i) v)))) x H18 (H20 (bge_le d (trans hds0 i) 
189 H16))))))) H17)))) x_x))))) c4 (sym_eq C c4 c1 H13))) c0 (sym_eq C c0 c2 
190 H12))) hds1 (sym_eq PList hds1 hds0 H11))) d0 (sym_eq nat d0 d H10))) h0 
191 (sym_eq nat h0 h H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList 
192 (PCons h d hds0)) (refl_equal C c2) (refl_equal C c1))))))))))))))) hds).
193