1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 (* This file was automatically generated: do not edit *********************)
17 set "baseuri" "cic:/matita/LAMBDA-TYPES/LambdaDelta-1/drop1/props".
19 include "drop1/defs.ma".
21 include "drop/props.ma".
23 include "getl/defs.ma".
25 theorem drop1_skip_bind:
26 \forall (b: B).(\forall (e: C).(\forall (hds: PList).(\forall (c:
27 C).(\forall (u: T).((drop1 hds c e) \to (drop1 (Ss hds) (CHead c (Bind b)
28 (lift1 hds u)) (CHead e (Bind b) u)))))))
30 \lambda (b: B).(\lambda (e: C).(\lambda (hds: PList).(PList_ind (\lambda (p:
31 PList).(\forall (c: C).(\forall (u: T).((drop1 p c e) \to (drop1 (Ss p)
32 (CHead c (Bind b) (lift1 p u)) (CHead e (Bind b) u)))))) (\lambda (c:
33 C).(\lambda (u: T).(\lambda (H: (drop1 PNil c e)).(let H0 \def (match H in
34 drop1 return (\lambda (p: PList).(\lambda (c0: C).(\lambda (c1: C).(\lambda
35 (_: (drop1 p c0 c1)).((eq PList p PNil) \to ((eq C c0 c) \to ((eq C c1 e) \to
36 (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u))))))))) with
37 [(drop1_nil c0) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H1:
38 (eq C c0 c)).(\lambda (H2: (eq C c0 e)).(eq_ind C c (\lambda (c1: C).((eq C
39 c1 e) \to (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind b) u)))) (\lambda
40 (H3: (eq C c e)).(eq_ind C e (\lambda (c1: C).(drop1 PNil (CHead c1 (Bind b)
41 u) (CHead e (Bind b) u))) (drop1_nil (CHead e (Bind b) u)) c (sym_eq C c e
42 H3))) c0 (sym_eq C c0 c H1) H2)))) | (drop1_cons c1 c2 h d H0 c3 hds0 H1)
43 \Rightarrow (\lambda (H2: (eq PList (PCons h d hds0) PNil)).(\lambda (H3: (eq
44 C c1 c)).(\lambda (H4: (eq C c3 e)).((let H5 \def (eq_ind PList (PCons h d
45 hds0) (\lambda (e0: PList).(match e0 in PList return (\lambda (_:
46 PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True]))
47 I PNil H2) in (False_ind ((eq C c1 c) \to ((eq C c3 e) \to ((drop h d c1 c2)
48 \to ((drop1 hds0 c2 c3) \to (drop1 PNil (CHead c (Bind b) u) (CHead e (Bind
49 b) u)))))) H5)) H3 H4 H0 H1))))]) in (H0 (refl_equal PList PNil) (refl_equal
50 C c) (refl_equal C e)))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p:
51 PList).(\lambda (H: ((\forall (c: C).(\forall (u: T).((drop1 p c e) \to
52 (drop1 (Ss p) (CHead c (Bind b) (lift1 p u)) (CHead e (Bind b)
53 u))))))).(\lambda (c: C).(\lambda (u: T).(\lambda (H0: (drop1 (PCons n n0 p)
54 c e)).(let H1 \def (match H0 in drop1 return (\lambda (p0: PList).(\lambda
55 (c0: C).(\lambda (c1: C).(\lambda (_: (drop1 p0 c0 c1)).((eq PList p0 (PCons
56 n n0 p)) \to ((eq C c0 c) \to ((eq C c1 e) \to (drop1 (PCons n (S n0) (Ss p))
57 (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))))))) with
58 [(drop1_nil c0) \Rightarrow (\lambda (H1: (eq PList PNil (PCons n n0
59 p))).(\lambda (H2: (eq C c0 c)).(\lambda (H3: (eq C c0 e)).((let H4 \def
60 (eq_ind PList PNil (\lambda (e0: PList).(match e0 in PList return (\lambda
61 (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _) \Rightarrow
62 False])) I (PCons n n0 p) H1) in (False_ind ((eq C c0 c) \to ((eq C c0 e) \to
63 (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u)))
64 (CHead e (Bind b) u)))) H4)) H2 H3)))) | (drop1_cons c1 c2 h d H1 c3 hds0 H2)
65 \Rightarrow (\lambda (H3: (eq PList (PCons h d hds0) (PCons n n0
66 p))).(\lambda (H4: (eq C c1 c)).(\lambda (H5: (eq C c3 e)).((let H6 \def
67 (f_equal PList PList (\lambda (e0: PList).(match e0 in PList return (\lambda
68 (_: PList).PList) with [PNil \Rightarrow hds0 | (PCons _ _ p0) \Rightarrow
69 p0])) (PCons h d hds0) (PCons n n0 p) H3) in ((let H7 \def (f_equal PList nat
70 (\lambda (e0: PList).(match e0 in PList return (\lambda (_: PList).nat) with
71 [PNil \Rightarrow d | (PCons _ n1 _) \Rightarrow n1])) (PCons h d hds0)
72 (PCons n n0 p) H3) in ((let H8 \def (f_equal PList nat (\lambda (e0:
73 PList).(match e0 in PList return (\lambda (_: PList).nat) with [PNil
74 \Rightarrow h | (PCons n1 _ _) \Rightarrow n1])) (PCons h d hds0) (PCons n n0
75 p) H3) in (eq_ind nat n (\lambda (n1: nat).((eq nat d n0) \to ((eq PList hds0
76 p) \to ((eq C c1 c) \to ((eq C c3 e) \to ((drop n1 d c1 c2) \to ((drop1 hds0
77 c2 c3) \to (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1
78 p u))) (CHead e (Bind b) u))))))))) (\lambda (H9: (eq nat d n0)).(eq_ind nat
79 n0 (\lambda (n1: nat).((eq PList hds0 p) \to ((eq C c1 c) \to ((eq C c3 e)
80 \to ((drop n n1 c1 c2) \to ((drop1 hds0 c2 c3) \to (drop1 (PCons n (S n0) (Ss
81 p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))))))
82 (\lambda (H10: (eq PList hds0 p)).(eq_ind PList p (\lambda (p0: PList).((eq C
83 c1 c) \to ((eq C c3 e) \to ((drop n n0 c1 c2) \to ((drop1 p0 c2 c3) \to
84 (drop1 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u)))
85 (CHead e (Bind b) u))))))) (\lambda (H11: (eq C c1 c)).(eq_ind C c (\lambda
86 (c0: C).((eq C c3 e) \to ((drop n n0 c0 c2) \to ((drop1 p c2 c3) \to (drop1
87 (PCons n (S n0) (Ss p)) (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e
88 (Bind b) u)))))) (\lambda (H12: (eq C c3 e)).(eq_ind C e (\lambda (c0:
89 C).((drop n n0 c c2) \to ((drop1 p c2 c0) \to (drop1 (PCons n (S n0) (Ss p))
90 (CHead c (Bind b) (lift n n0 (lift1 p u))) (CHead e (Bind b) u))))) (\lambda
91 (H13: (drop n n0 c c2)).(\lambda (H14: (drop1 p c2 e)).(drop1_cons (CHead c
92 (Bind b) (lift n n0 (lift1 p u))) (CHead c2 (Bind b) (lift1 p u)) n (S n0)
93 (drop_skip_bind n n0 c c2 H13 b (lift1 p u)) (CHead e (Bind b) u) (Ss p) (H
94 c2 u H14)))) c3 (sym_eq C c3 e H12))) c1 (sym_eq C c1 c H11))) hds0 (sym_eq
95 PList hds0 p H10))) d (sym_eq nat d n0 H9))) h (sym_eq nat h n H8))) H7))
96 H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList (PCons n n0 p)) (refl_equal C
97 c) (refl_equal C e)))))))))) hds))).
99 theorem drop1_cons_tail:
100 \forall (c2: C).(\forall (c3: C).(\forall (h: nat).(\forall (d: nat).((drop
101 h d c2 c3) \to (\forall (hds: PList).(\forall (c1: C).((drop1 hds c1 c2) \to
102 (drop1 (PConsTail hds h d) c1 c3))))))))
104 \lambda (c2: C).(\lambda (c3: C).(\lambda (h: nat).(\lambda (d:
105 nat).(\lambda (H: (drop h d c2 c3)).(\lambda (hds: PList).(PList_ind (\lambda
106 (p: PList).(\forall (c1: C).((drop1 p c1 c2) \to (drop1 (PConsTail p h d) c1
107 c3)))) (\lambda (c1: C).(\lambda (H0: (drop1 PNil c1 c2)).(let H1 \def (match
108 H0 in drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0:
109 C).(\lambda (_: (drop1 p c c0)).((eq PList p PNil) \to ((eq C c c1) \to ((eq
110 C c0 c2) \to (drop1 (PCons h d PNil) c1 c3)))))))) with [(drop1_nil c)
111 \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c
112 c1)).(\lambda (H3: (eq C c c2)).(eq_ind C c1 (\lambda (c0: C).((eq C c0 c2)
113 \to (drop1 (PCons h d PNil) c1 c3))) (\lambda (H4: (eq C c1 c2)).(eq_ind C c2
114 (\lambda (c0: C).(drop1 (PCons h d PNil) c0 c3)) (drop1_cons c2 c3 h d H c3
115 PNil (drop1_nil c3)) c1 (sym_eq C c1 c2 H4))) c (sym_eq C c c1 H2) H3)))) |
116 (drop1_cons c0 c4 h0 d0 H1 c5 hds0 H2) \Rightarrow (\lambda (H3: (eq PList
117 (PCons h0 d0 hds0) PNil)).(\lambda (H4: (eq C c0 c1)).(\lambda (H5: (eq C c5
118 c2)).((let H6 \def (eq_ind PList (PCons h0 d0 hds0) (\lambda (e:
119 PList).(match e in PList return (\lambda (_: PList).Prop) with [PNil
120 \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in
121 (False_ind ((eq C c0 c1) \to ((eq C c5 c2) \to ((drop h0 d0 c0 c4) \to
122 ((drop1 hds0 c4 c5) \to (drop1 (PCons h d PNil) c1 c3))))) H6)) H4 H5 H1
123 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C c1) (refl_equal C
124 c2))))) (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda
125 (H0: ((\forall (c1: C).((drop1 p c1 c2) \to (drop1 (PConsTail p h d) c1
126 c3))))).(\lambda (c1: C).(\lambda (H1: (drop1 (PCons n n0 p) c1 c2)).(let H2
127 \def (match H1 in drop1 return (\lambda (p0: PList).(\lambda (c: C).(\lambda
128 (c0: C).(\lambda (_: (drop1 p0 c c0)).((eq PList p0 (PCons n n0 p)) \to ((eq
129 C c c1) \to ((eq C c0 c2) \to (drop1 (PCons n n0 (PConsTail p h d)) c1
130 c3)))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList PNil
131 (PCons n n0 p))).(\lambda (H3: (eq C c c1)).(\lambda (H4: (eq C c c2)).((let
132 H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e in PList return
133 (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _)
134 \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c1) \to ((eq
135 C c c2) \to (drop1 (PCons n n0 (PConsTail p h d)) c1 c3))) H5)) H3 H4)))) |
136 (drop1_cons c0 c4 h0 d0 H2 c5 hds0 H3) \Rightarrow (\lambda (H4: (eq PList
137 (PCons h0 d0 hds0) (PCons n n0 p))).(\lambda (H5: (eq C c0 c1)).(\lambda (H6:
138 (eq C c5 c2)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e
139 in PList return (\lambda (_: PList).PList) with [PNil \Rightarrow hds0 |
140 (PCons _ _ p0) \Rightarrow p0])) (PCons h0 d0 hds0) (PCons n n0 p) H4) in
141 ((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e in PList return
142 (\lambda (_: PList).nat) with [PNil \Rightarrow d0 | (PCons _ n1 _)
143 \Rightarrow n1])) (PCons h0 d0 hds0) (PCons n n0 p) H4) in ((let H9 \def
144 (f_equal PList nat (\lambda (e: PList).(match e in PList return (\lambda (_:
145 PList).nat) with [PNil \Rightarrow h0 | (PCons n1 _ _) \Rightarrow n1]))
146 (PCons h0 d0 hds0) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1:
147 nat).((eq nat d0 n0) \to ((eq PList hds0 p) \to ((eq C c0 c1) \to ((eq C c5
148 c2) \to ((drop n1 d0 c0 c4) \to ((drop1 hds0 c4 c5) \to (drop1 (PCons n n0
149 (PConsTail p h d)) c1 c3)))))))) (\lambda (H10: (eq nat d0 n0)).(eq_ind nat
150 n0 (\lambda (n1: nat).((eq PList hds0 p) \to ((eq C c0 c1) \to ((eq C c5 c2)
151 \to ((drop n n1 c0 c4) \to ((drop1 hds0 c4 c5) \to (drop1 (PCons n n0
152 (PConsTail p h d)) c1 c3))))))) (\lambda (H11: (eq PList hds0 p)).(eq_ind
153 PList p (\lambda (p0: PList).((eq C c0 c1) \to ((eq C c5 c2) \to ((drop n n0
154 c0 c4) \to ((drop1 p0 c4 c5) \to (drop1 (PCons n n0 (PConsTail p h d)) c1
155 c3)))))) (\lambda (H12: (eq C c0 c1)).(eq_ind C c1 (\lambda (c: C).((eq C c5
156 c2) \to ((drop n n0 c c4) \to ((drop1 p c4 c5) \to (drop1 (PCons n n0
157 (PConsTail p h d)) c1 c3))))) (\lambda (H13: (eq C c5 c2)).(eq_ind C c2
158 (\lambda (c: C).((drop n n0 c1 c4) \to ((drop1 p c4 c) \to (drop1 (PCons n n0
159 (PConsTail p h d)) c1 c3)))) (\lambda (H14: (drop n n0 c1 c4)).(\lambda (H15:
160 (drop1 p c4 c2)).(drop1_cons c1 c4 n n0 H14 c3 (PConsTail p h d) (H0 c4
161 H15)))) c5 (sym_eq C c5 c2 H13))) c0 (sym_eq C c0 c1 H12))) hds0 (sym_eq
162 PList hds0 p H11))) d0 (sym_eq nat d0 n0 H10))) h0 (sym_eq nat h0 n H9)))
163 H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal PList (PCons n n0 p))
164 (refl_equal C c1) (refl_equal C c2))))))))) hds)))))).
167 \forall (is1: PList).(\forall (c1: C).(\forall (c0: C).((drop1 is1 c1 c0)
168 \to (\forall (is2: PList).(\forall (c2: C).((drop1 is2 c0 c2) \to (drop1
169 (papp is1 is2) c1 c2)))))))
171 \lambda (is1: PList).(PList_ind (\lambda (p: PList).(\forall (c1:
172 C).(\forall (c0: C).((drop1 p c1 c0) \to (\forall (is2: PList).(\forall (c2:
173 C).((drop1 is2 c0 c2) \to (drop1 (papp p is2) c1 c2)))))))) (\lambda (c1:
174 C).(\lambda (c0: C).(\lambda (H: (drop1 PNil c1 c0)).(\lambda (is2:
175 PList).(\lambda (c2: C).(\lambda (H0: (drop1 is2 c0 c2)).(let H1 \def (match
176 H in drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c3:
177 C).(\lambda (_: (drop1 p c c3)).((eq PList p PNil) \to ((eq C c c1) \to ((eq
178 C c3 c0) \to (drop1 is2 c1 c2)))))))) with [(drop1_nil c) \Rightarrow
179 (\lambda (_: (eq PList PNil PNil)).(\lambda (H2: (eq C c c1)).(\lambda (H3:
180 (eq C c c0)).(eq_ind C c1 (\lambda (c3: C).((eq C c3 c0) \to (drop1 is2 c1
181 c2))) (\lambda (H4: (eq C c1 c0)).(eq_ind C c0 (\lambda (c3: C).(drop1 is2 c3
182 c2)) (let H5 \def (eq_ind_r C c0 (\lambda (c3: C).(drop1 is2 c3 c2)) H0 c1
183 H4) in (eq_ind C c1 (\lambda (c3: C).(drop1 is2 c3 c2)) H5 c0 H4)) c1 (sym_eq
184 C c1 c0 H4))) c (sym_eq C c c1 H2) H3)))) | (drop1_cons c3 c4 h d H1 c5 hds
185 H2) \Rightarrow (\lambda (H3: (eq PList (PCons h d hds) PNil)).(\lambda (H4:
186 (eq C c3 c1)).(\lambda (H5: (eq C c5 c0)).((let H6 \def (eq_ind PList (PCons
187 h d hds) (\lambda (e: PList).(match e in PList return (\lambda (_:
188 PList).Prop) with [PNil \Rightarrow False | (PCons _ _ _) \Rightarrow True]))
189 I PNil H3) in (False_ind ((eq C c3 c1) \to ((eq C c5 c0) \to ((drop h d c3
190 c4) \to ((drop1 hds c4 c5) \to (drop1 is2 c1 c2))))) H6)) H4 H5 H1 H2))))])
191 in (H1 (refl_equal PList PNil) (refl_equal C c1) (refl_equal C c0)))))))))
192 (\lambda (n: nat).(\lambda (n0: nat).(\lambda (p: PList).(\lambda (H:
193 ((\forall (c1: C).(\forall (c0: C).((drop1 p c1 c0) \to (\forall (is2:
194 PList).(\forall (c2: C).((drop1 is2 c0 c2) \to (drop1 (papp p is2) c1
195 c2))))))))).(\lambda (c1: C).(\lambda (c0: C).(\lambda (H0: (drop1 (PCons n
196 n0 p) c1 c0)).(\lambda (is2: PList).(\lambda (c2: C).(\lambda (H1: (drop1 is2
197 c0 c2)).(let H2 \def (match H0 in drop1 return (\lambda (p0: PList).(\lambda
198 (c: C).(\lambda (c3: C).(\lambda (_: (drop1 p0 c c3)).((eq PList p0 (PCons n
199 n0 p)) \to ((eq C c c1) \to ((eq C c3 c0) \to (drop1 (PCons n n0 (papp p
200 is2)) c1 c2)))))))) with [(drop1_nil c) \Rightarrow (\lambda (H2: (eq PList
201 PNil (PCons n n0 p))).(\lambda (H3: (eq C c c1)).(\lambda (H4: (eq C c
202 c0)).((let H5 \def (eq_ind PList PNil (\lambda (e: PList).(match e in PList
203 return (\lambda (_: PList).Prop) with [PNil \Rightarrow True | (PCons _ _ _)
204 \Rightarrow False])) I (PCons n n0 p) H2) in (False_ind ((eq C c c1) \to ((eq
205 C c c0) \to (drop1 (PCons n n0 (papp p is2)) c1 c2))) H5)) H3 H4)))) |
206 (drop1_cons c3 c4 h d H2 c5 hds H3) \Rightarrow (\lambda (H4: (eq PList
207 (PCons h d hds) (PCons n n0 p))).(\lambda (H5: (eq C c3 c1)).(\lambda (H6:
208 (eq C c5 c0)).((let H7 \def (f_equal PList PList (\lambda (e: PList).(match e
209 in PList return (\lambda (_: PList).PList) with [PNil \Rightarrow hds |
210 (PCons _ _ p0) \Rightarrow p0])) (PCons h d hds) (PCons n n0 p) H4) in ((let
211 H8 \def (f_equal PList nat (\lambda (e: PList).(match e in PList return
212 (\lambda (_: PList).nat) with [PNil \Rightarrow d | (PCons _ n1 _)
213 \Rightarrow n1])) (PCons h d hds) (PCons n n0 p) H4) in ((let H9 \def
214 (f_equal PList nat (\lambda (e: PList).(match e in PList return (\lambda (_:
215 PList).nat) with [PNil \Rightarrow h | (PCons n1 _ _) \Rightarrow n1]))
216 (PCons h d hds) (PCons n n0 p) H4) in (eq_ind nat n (\lambda (n1: nat).((eq
217 nat d n0) \to ((eq PList hds p) \to ((eq C c3 c1) \to ((eq C c5 c0) \to
218 ((drop n1 d c3 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons n n0 (papp p
219 is2)) c1 c2)))))))) (\lambda (H10: (eq nat d n0)).(eq_ind nat n0 (\lambda
220 (n1: nat).((eq PList hds p) \to ((eq C c3 c1) \to ((eq C c5 c0) \to ((drop n
221 n1 c3 c4) \to ((drop1 hds c4 c5) \to (drop1 (PCons n n0 (papp p is2)) c1
222 c2))))))) (\lambda (H11: (eq PList hds p)).(eq_ind PList p (\lambda (p0:
223 PList).((eq C c3 c1) \to ((eq C c5 c0) \to ((drop n n0 c3 c4) \to ((drop1 p0
224 c4 c5) \to (drop1 (PCons n n0 (papp p is2)) c1 c2)))))) (\lambda (H12: (eq C
225 c3 c1)).(eq_ind C c1 (\lambda (c: C).((eq C c5 c0) \to ((drop n n0 c c4) \to
226 ((drop1 p c4 c5) \to (drop1 (PCons n n0 (papp p is2)) c1 c2))))) (\lambda
227 (H13: (eq C c5 c0)).(eq_ind C c0 (\lambda (c: C).((drop n n0 c1 c4) \to
228 ((drop1 p c4 c) \to (drop1 (PCons n n0 (papp p is2)) c1 c2)))) (\lambda (H14:
229 (drop n n0 c1 c4)).(\lambda (H15: (drop1 p c4 c0)).(drop1_cons c1 c4 n n0 H14
230 c2 (papp p is2) (H c4 c0 H15 is2 c2 H1)))) c5 (sym_eq C c5 c0 H13))) c3
231 (sym_eq C c3 c1 H12))) hds (sym_eq PList hds p H11))) d (sym_eq nat d n0
232 H10))) h (sym_eq nat h n H9))) H8)) H7)) H5 H6 H2 H3))))]) in (H2 (refl_equal
233 PList (PCons n n0 p)) (refl_equal C c1) (refl_equal C c0))))))))))))) is1).