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 include "basic_1/drop1/fwd.ma".
19 include "basic_1/getl/drop.ma".
21 lemma 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)))))))))))))
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 H_y \def (drop1_gen_pnil c2 c1 H) in
36 (eq_ind_r C c1 (\lambda (c: C).(ex2 C (\lambda (e2: C).(drop1 PNil e2 e1))
37 (\lambda (e2: C).(getl i c (CHead e2 (Bind b) v))))) (ex_intro2 C (\lambda
38 (e2: C).(drop1 PNil e2 e1)) (\lambda (e2: C).(getl i c1 (CHead e2 (Bind b)
39 v))) e1 (drop1_nil e1) H0) c2 H_y)))))))))) (\lambda (h: nat).(\lambda (d:
40 nat).(\lambda (hds0: PList).(\lambda (H: ((\forall (c1: C).(\forall (c2:
41 C).((drop1 hds0 c2 c1) \to (\forall (b: B).(\forall (e1: C).(\forall (v:
42 T).(\forall (i: nat).((getl i c1 (CHead e1 (Bind b) v)) \to (ex2 C (\lambda
43 (e2: C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i)
44 c2 (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v))))))))))))))).(\lambda (c1:
45 C).(\lambda (c2: C).(\lambda (H0: (drop1 (PCons h d hds0) c2 c1)).(\lambda
46 (b: B).(\lambda (e1: C).(\lambda (v: T).(\lambda (i: nat).(\lambda (H1: (getl
47 i c1 (CHead e1 (Bind b) v))).(let H_x \def (drop1_gen_pcons c2 c1 hds0 h d
48 H0) in (let H2 \def H_x in (ex2_ind C (\lambda (c3: C).(drop h d c2 c3))
49 (\lambda (c3: C).(drop1 hds0 c3 c1)) (ex2 C (\lambda (e2: C).(drop1 (match
50 (blt (trans hds0 i) d) with [true \Rightarrow (PCons h (minus d (S (trans
51 hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) e2 e1))
52 (\lambda (e2: C).(getl (match (blt (trans hds0 i) d) with [true \Rightarrow
53 (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2
54 (Bind b) (lift1 (match (blt (trans hds0 i) d) with [true \Rightarrow (PCons h
55 (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans
56 hds0 i)]) v))))) (\lambda (x: C).(\lambda (H3: (drop h d c2 x)).(\lambda (H4:
57 (drop1 hds0 x c1)).(xinduction bool (blt (trans hds0 i) d) (\lambda (b0:
58 bool).(ex2 C (\lambda (e2: C).(drop1 (match b0 with [true \Rightarrow (PCons
59 h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans
60 hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match b0 with [true \Rightarrow
61 (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2 (CHead e2
62 (Bind b) (lift1 (match b0 with [true \Rightarrow (PCons h (minus d (S (trans
63 hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)]) v))))))
64 (\lambda (x_x: bool).(bool_ind (\lambda (b0: bool).((eq bool (blt (trans hds0
65 i) d) b0) \to (ex2 C (\lambda (e2: C).(drop1 (match b0 with [true \Rightarrow
66 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow
67 (ptrans hds0 i)]) e2 e1)) (\lambda (e2: C).(getl (match b0 with [true
68 \Rightarrow (trans hds0 i) | false \Rightarrow (plus (trans hds0 i) h)]) c2
69 (CHead e2 (Bind b) (lift1 (match b0 with [true \Rightarrow (PCons h (minus d
70 (S (trans hds0 i))) (ptrans hds0 i)) | false \Rightarrow (ptrans hds0 i)])
71 v))))))) (\lambda (H5: (eq bool (blt (trans hds0 i) d) true)).(let H_x0 \def
72 (H c1 x H4 b e1 v i H1) in (let H6 \def H_x0 in (ex2_ind C (\lambda (e2:
73 C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) x
74 (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))) (ex2 C (\lambda (e2:
75 C).(drop1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i)) e2 e1))
76 (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift1 (PCons h
77 (minus d (S (trans hds0 i))) (ptrans hds0 i)) v))))) (\lambda (x0:
78 C).(\lambda (H7: (drop1 (ptrans hds0 i) x0 e1)).(\lambda (H8: (getl (trans
79 hds0 i) x (CHead x0 (Bind b) (lift1 (ptrans hds0 i) v)))).(let H_x1 \def
80 (drop_getl_trans_lt (trans hds0 i) d (blt_lt d (trans hds0 i) H5) c2 x h H3 b
81 x0 (lift1 (ptrans hds0 i) v) H8) in (let H9 \def H_x1 in (ex2_ind C (\lambda
82 (e2: C).(getl (trans hds0 i) c2 (CHead e2 (Bind b) (lift h (minus d (S (trans
83 hds0 i))) (lift1 (ptrans hds0 i) v))))) (\lambda (e2: C).(drop h (minus d (S
84 (trans hds0 i))) e2 x0)) (ex2 C (\lambda (e2: C).(drop1 (PCons h (minus d (S
85 (trans hds0 i))) (ptrans hds0 i)) e2 e1)) (\lambda (e2: C).(getl (trans hds0
86 i) c2 (CHead e2 (Bind b) (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans
87 hds0 i)) v))))) (\lambda (x1: C).(\lambda (H10: (getl (trans hds0 i) c2
88 (CHead x1 (Bind b) (lift h (minus d (S (trans hds0 i))) (lift1 (ptrans hds0
89 i) v))))).(\lambda (H11: (drop h (minus d (S (trans hds0 i))) x1
90 x0)).(ex_intro2 C (\lambda (e2: C).(drop1 (PCons h (minus d (S (trans hds0
91 i))) (ptrans hds0 i)) e2 e1)) (\lambda (e2: C).(getl (trans hds0 i) c2 (CHead
92 e2 (Bind b) (lift1 (PCons h (minus d (S (trans hds0 i))) (ptrans hds0 i))
93 v)))) x1 (drop1_cons x1 x0 h (minus d (S (trans hds0 i))) H11 e1 (ptrans hds0
94 i) H7) H10)))) H9)))))) H6)))) (\lambda (H5: (eq bool (blt (trans hds0 i) d)
95 false)).(let H_x0 \def (H c1 x H4 b e1 v i H1) in (let H6 \def H_x0 in
96 (ex2_ind C (\lambda (e2: C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2:
97 C).(getl (trans hds0 i) x (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v))))
98 (ex2 C (\lambda (e2: C).(drop1 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl
99 (plus (trans hds0 i) h) c2 (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))))
100 (\lambda (x0: C).(\lambda (H7: (drop1 (ptrans hds0 i) x0 e1)).(\lambda (H8:
101 (getl (trans hds0 i) x (CHead x0 (Bind b) (lift1 (ptrans hds0 i) v)))).(let
102 H9 \def (drop_getl_trans_ge (trans hds0 i) c2 x d h H3 (CHead x0 (Bind b)
103 (lift1 (ptrans hds0 i) v)) H8) in (ex_intro2 C (\lambda (e2: C).(drop1
104 (ptrans hds0 i) e2 e1)) (\lambda (e2: C).(getl (plus (trans hds0 i) h) c2
105 (CHead e2 (Bind b) (lift1 (ptrans hds0 i) v)))) x0 H7 (H9 (bge_le d (trans
106 hds0 i) H5))))))) H6)))) x_x)))))) H2))))))))))))))) hds).