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/Level-1/LambdaDelta/drop1/getl".
19 include "drop1/defs.ma".
21 include "getl/drop.ma".
23 theorem drop1_getl_trans:
24 \forall (hds: PList).(\forall (c1: C).(\forall (c2: C).((drop1 hds c2 c1)
25 \to (\forall (b: B).(\forall (e1: C).(\forall (v: T).(\forall (i: nat).((getl
26 i c1 (CHead e1 (Bind b) v)) \to (ex C (\lambda (e2: C).(getl (trans hds i) c2
27 (CHead e2 (Bind b) (ctrans hds i v)))))))))))))
29 \lambda (hds: PList).(PList_ind (\lambda (p: PList).(\forall (c1:
30 C).(\forall (c2: C).((drop1 p c2 c1) \to (\forall (b: B).(\forall (e1:
31 C).(\forall (v: T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to
32 (ex C (\lambda (e2: C).(getl (trans p i) c2 (CHead e2 (Bind b) (ctrans p i
33 v)))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (drop1 PNil c2
34 c1)).(\lambda (b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i:
35 nat).(\lambda (H0: (getl i c1 (CHead e1 (Bind b) v))).(let H1 \def (match H
36 in drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda
37 (_: (drop1 p c c0)).((eq PList p PNil) \to ((eq C c c2) \to ((eq C c0 c1) \to
38 (ex C (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) v))))))))))) with
39 [(drop1_nil c) \Rightarrow (\lambda (_: (eq PList PNil PNil)).(\lambda (H2:
40 (eq C c c2)).(\lambda (H3: (eq C c c1)).(eq_ind C c2 (\lambda (c0: C).((eq C
41 c0 c1) \to (ex C (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b) v))))))
42 (\lambda (H4: (eq C c2 c1)).(eq_ind C c1 (\lambda (c0: C).(ex C (\lambda (e2:
43 C).(getl i c0 (CHead e2 (Bind b) v))))) (ex_intro C (\lambda (e2: C).(getl i
44 c1 (CHead e2 (Bind b) v))) e1 H0) c2 (sym_eq C c2 c1 H4))) c (sym_eq C c c2
45 H2) H3)))) | (drop1_cons c0 c3 h d H1 c4 hds0 H2) \Rightarrow (\lambda (H3:
46 (eq PList (PCons h d hds0) PNil)).(\lambda (H4: (eq C c0 c2)).(\lambda (H5:
47 (eq C c4 c1)).((let H6 \def (eq_ind PList (PCons h d hds0) (\lambda (e:
48 PList).(match e in PList return (\lambda (_: PList).Prop) with [PNil
49 \Rightarrow False | (PCons _ _ _) \Rightarrow True])) I PNil H3) in
50 (False_ind ((eq C c0 c2) \to ((eq C c4 c1) \to ((drop h d c0 c3) \to ((drop1
51 hds0 c3 c4) \to (ex C (\lambda (e2: C).(getl i c2 (CHead e2 (Bind b)
52 v)))))))) H6)) H4 H5 H1 H2))))]) in (H1 (refl_equal PList PNil) (refl_equal C
53 c2) (refl_equal C c1))))))))))) (\lambda (h: nat).(\lambda (d: nat).(\lambda
54 (hds0: PList).(\lambda (H: ((\forall (c1: C).(\forall (c2: C).((drop1 hds0 c2
55 c1) \to (\forall (b: B).(\forall (e1: C).(\forall (v: T).(\forall (i:
56 nat).((getl i c1 (CHead e1 (Bind b) v)) \to (ex C (\lambda (e2: C).(getl
57 (trans hds0 i) c2 (CHead e2 (Bind b) (ctrans hds0 i v))))))))))))))).(\lambda
58 (c1: C).(\lambda (c2: C).(\lambda (H0: (drop1 (PCons h d hds0) c2
59 c1)).(\lambda (b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i:
60 nat).(\lambda (H1: (getl i c1 (CHead e1 (Bind b) v))).(let H2 \def (match H0
61 in drop1 return (\lambda (p: PList).(\lambda (c: C).(\lambda (c0: C).(\lambda
62 (_: (drop1 p c c0)).((eq PList p (PCons h d hds0)) \to ((eq C c c2) \to ((eq
63 C c0 c1) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with
64 [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i)
65 h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true
66 \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false
67 \Rightarrow (ctrans hds0 i v)])))))))))))) with [(drop1_nil c) \Rightarrow
68 (\lambda (H2: (eq PList PNil (PCons h d hds0))).(\lambda (H3: (eq C c
69 c2)).(\lambda (H4: (eq C c c1)).((let H5 \def (eq_ind PList PNil (\lambda (e:
70 PList).(match e in PList return (\lambda (_: PList).Prop) with [PNil
71 \Rightarrow True | (PCons _ _ _) \Rightarrow False])) I (PCons h d hds0) H2)
72 in (False_ind ((eq C c c2) \to ((eq C c c1) \to (ex C (\lambda (e2: C).(getl
73 (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false
74 \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt
75 (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i)))
76 (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)]))))))) H5)) H3
77 H4)))) | (drop1_cons c0 c3 h0 d0 H2 c4 hds1 H3) \Rightarrow (\lambda (H4: (eq
78 PList (PCons h0 d0 hds1) (PCons h d hds0))).(\lambda (H5: (eq C c0
79 c2)).(\lambda (H6: (eq C c4 c1)).((let H7 \def (f_equal PList PList (\lambda
80 (e: PList).(match e in PList return (\lambda (_: PList).PList) with [PNil
81 \Rightarrow hds1 | (PCons _ _ p) \Rightarrow p])) (PCons h0 d0 hds1) (PCons h
82 d hds0) H4) in ((let H8 \def (f_equal PList nat (\lambda (e: PList).(match e
83 in PList return (\lambda (_: PList).nat) with [PNil \Rightarrow d0 | (PCons _
84 n _) \Rightarrow n])) (PCons h0 d0 hds1) (PCons h d hds0) H4) in ((let H9
85 \def (f_equal PList nat (\lambda (e: PList).(match e in PList return (\lambda
86 (_: PList).nat) with [PNil \Rightarrow h0 | (PCons n _ _) \Rightarrow n]))
87 (PCons h0 d0 hds1) (PCons h d hds0) H4) in (eq_ind nat h (\lambda (n:
88 nat).((eq nat d0 d) \to ((eq PList hds1 hds0) \to ((eq C c0 c2) \to ((eq C c4
89 c1) \to ((drop n d0 c0 c3) \to ((drop1 hds1 c3 c4) \to (ex C (\lambda (e2:
90 C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i)
91 | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match
92 (blt (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0
93 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)]))))))))))))
94 (\lambda (H10: (eq nat d0 d)).(eq_ind nat d (\lambda (n: nat).((eq PList hds1
95 hds0) \to ((eq C c0 c2) \to ((eq C c4 c1) \to ((drop h n c0 c3) \to ((drop1
96 hds1 c3 c4) \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d)
97 with [true \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0
98 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true
99 \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false
100 \Rightarrow (ctrans hds0 i v)]))))))))))) (\lambda (H11: (eq PList hds1
101 hds0)).(eq_ind PList hds0 (\lambda (p: PList).((eq C c0 c2) \to ((eq C c4 c1)
102 \to ((drop h d c0 c3) \to ((drop1 p c3 c4) \to (ex C (\lambda (e2: C).(getl
103 (match (blt (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false
104 \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt
105 (trans hds0 i) d) with [true \Rightarrow (lift h (minus d (S (trans hds0 i)))
106 (ctrans hds0 i v)) | false \Rightarrow (ctrans hds0 i v)])))))))))) (\lambda
107 (H12: (eq C c0 c2)).(eq_ind C c2 (\lambda (c: C).((eq C c4 c1) \to ((drop h d
108 c c3) \to ((drop1 hds0 c3 c4) \to (ex C (\lambda (e2: C).(getl (match (blt
109 (trans hds0 i) d) with [true \Rightarrow (trans hds0 i) | false \Rightarrow
110 (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match (blt (trans hds0 i) d)
111 with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i
112 v)) | false \Rightarrow (ctrans hds0 i v)]))))))))) (\lambda (H13: (eq C c4
113 c1)).(eq_ind C c1 (\lambda (c: C).((drop h d c2 c3) \to ((drop1 hds0 c3 c)
114 \to (ex C (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true
115 \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2
116 (CHead e2 (Bind b) (match (blt (trans hds0 i) d) with [true \Rightarrow (lift
117 h (minus d (S (trans hds0 i))) (ctrans hds0 i v)) | false \Rightarrow (ctrans
118 hds0 i v)])))))))) (\lambda (H14: (drop h d c2 c3)).(\lambda (H15: (drop1
119 hds0 c3 c1)).(xinduction bool (blt (trans hds0 i) d) (\lambda (b0: bool).(ex
120 C (\lambda (e2: C).(getl (match b0 with [true \Rightarrow (trans hds0 i) |
121 false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match b0
122 with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i
123 v)) | false \Rightarrow (ctrans hds0 i v)])))))) (\lambda (x_x:
124 bool).(bool_ind (\lambda (b0: bool).((eq bool (blt (trans hds0 i) d) b0) \to
125 (ex C (\lambda (e2: C).(getl (match b0 with [true \Rightarrow (trans hds0 i)
126 | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2 (Bind b) (match b0
127 with [true \Rightarrow (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i
128 v)) | false \Rightarrow (ctrans hds0 i v)]))))))) (\lambda (H16: (eq bool
129 (blt (trans hds0 i) d) true)).(let H_x \def (H c1 c3 H15 b e1 v i H1) in (let
130 H17 \def H_x in (ex_ind C (\lambda (e2: C).(getl (trans hds0 i) c3 (CHead e2
131 (Bind b) (ctrans hds0 i v)))) (ex C (\lambda (e2: C).(getl (trans hds0 i) c2
132 (CHead e2 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i
133 v)))))) (\lambda (x: C).(\lambda (H18: (getl (trans hds0 i) c3 (CHead x (Bind
134 b) (ctrans hds0 i v)))).(let H_x0 \def (drop_getl_trans_lt (trans hds0 i) d
135 (le_S_n (S (trans hds0 i)) d (lt_le_S (S (trans hds0 i)) (S d) (blt_lt (S d)
136 (S (trans hds0 i)) H16))) c2 c3 h H14 b x (ctrans hds0 i v) H18) in (let H19
137 \def H_x0 in (ex2_ind C (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2
138 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i v))))) (\lambda
139 (e2: C).(drop h (minus d (S (trans hds0 i))) e2 x)) (ex C (\lambda (e2:
140 C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans hds0
141 i))) (ctrans hds0 i v)))))) (\lambda (x0: C).(\lambda (H20: (getl (trans hds0
142 i) c2 (CHead x0 (Bind b) (lift h (minus d (S (trans hds0 i))) (ctrans hds0 i
143 v))))).(\lambda (_: (drop h (minus d (S (trans hds0 i))) x0 x)).(ex_intro C
144 (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift h (minus d
145 (S (trans hds0 i))) (ctrans hds0 i v))))) x0 H20)))) H19))))) H17))))
146 (\lambda (H16: (eq bool (blt (trans hds0 i) d) false)).(let H_x \def (H c1 c3
147 H15 b e1 v i H1) in (let H17 \def H_x in (ex_ind C (\lambda (e2: C).(getl
148 (trans hds0 i) c3 (CHead e2 (Bind b) (ctrans hds0 i v)))) (ex C (\lambda (e2:
149 C).(getl (plus (trans hds0 i) h) c2 (CHead e2 (Bind b) (ctrans hds0 i v)))))
150 (\lambda (x: C).(\lambda (H18: (getl (trans hds0 i) c3 (CHead x (Bind b)
151 (ctrans hds0 i v)))).(let H19 \def (drop_getl_trans_ge (trans hds0 i) c2 c3 d
152 h H14 (CHead x (Bind b) (ctrans hds0 i v)) H18) in (ex_intro C (\lambda (e2:
153 C).(getl (plus (trans hds0 i) h) c2 (CHead e2 (Bind b) (ctrans hds0 i v)))) x
154 (H19 (bge_le d (trans hds0 i) H16)))))) H17)))) x_x))))) c4 (sym_eq C c4 c1
155 H13))) c0 (sym_eq C c0 c2 H12))) hds1 (sym_eq PList hds1 hds0 H11))) d0
156 (sym_eq nat d0 d H10))) h0 (sym_eq nat h0 h H9))) H8)) H7)) H5 H6 H2 H3))))])
157 in (H2 (refl_equal PList (PCons h d hds0)) (refl_equal C c2) (refl_equal C
158 c1))))))))))))))) hds).