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_1A/iso/defs.ma".
19 include "basic_1A/tlist/defs.ma".
21 implied lemma iso_ind:
22 \forall (P: ((T \to (T \to Prop)))).(((\forall (n1: nat).(\forall (n2:
23 nat).(P (TSort n1) (TSort n2))))) \to (((\forall (i1: nat).(\forall (i2:
24 nat).(P (TLRef i1) (TLRef i2))))) \to (((\forall (v1: T).(\forall (v2:
25 T).(\forall (t1: T).(\forall (t2: T).(\forall (k: K).(P (THead k v1 t1)
26 (THead k v2 t2)))))))) \to (\forall (t: T).(\forall (t0: T).((iso t t0) \to
29 \lambda (P: ((T \to (T \to Prop)))).(\lambda (f: ((\forall (n1:
30 nat).(\forall (n2: nat).(P (TSort n1) (TSort n2)))))).(\lambda (f0: ((\forall
31 (i1: nat).(\forall (i2: nat).(P (TLRef i1) (TLRef i2)))))).(\lambda (f1:
32 ((\forall (v1: T).(\forall (v2: T).(\forall (t1: T).(\forall (t2: T).(\forall
33 (k: K).(P (THead k v1 t1) (THead k v2 t2))))))))).(\lambda (t: T).(\lambda
34 (t0: T).(\lambda (i: (iso t t0)).(match i with [(iso_sort x x0) \Rightarrow
35 (f x x0) | (iso_lref x x0) \Rightarrow (f0 x x0) | (iso_head x x0 x1 x2 x3)
36 \Rightarrow (f1 x x0 x1 x2 x3)]))))))).
39 \forall (u2: T).(\forall (n1: nat).((iso (TSort n1) u2) \to (ex nat (\lambda
40 (n2: nat).(eq T u2 (TSort n2))))))
42 \lambda (u2: T).(\lambda (n1: nat).(\lambda (H: (iso (TSort n1)
43 u2)).(insert_eq T (TSort n1) (\lambda (t: T).(iso t u2)) (\lambda (_: T).(ex
44 nat (\lambda (n2: nat).(eq T u2 (TSort n2))))) (\lambda (y: T).(\lambda (H0:
45 (iso y u2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).((eq T t (TSort n1))
46 \to (ex nat (\lambda (n2: nat).(eq T t0 (TSort n2))))))) (\lambda (n0:
47 nat).(\lambda (n2: nat).(\lambda (H1: (eq T (TSort n0) (TSort n1))).(let H2
48 \def (f_equal T nat (\lambda (e: T).(match e with [(TSort n) \Rightarrow n |
49 (TLRef _) \Rightarrow n0 | (THead _ _ _) \Rightarrow n0])) (TSort n0) (TSort
50 n1) H1) in (ex_intro nat (\lambda (n3: nat).(eq T (TSort n2) (TSort n3))) n2
51 (refl_equal T (TSort n2))))))) (\lambda (i1: nat).(\lambda (i2: nat).(\lambda
52 (H1: (eq T (TLRef i1) (TSort n1))).(let H2 \def (eq_ind T (TLRef i1) (\lambda
53 (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow
54 True | (THead _ _ _) \Rightarrow False])) I (TSort n1) H1) in (False_ind (ex
55 nat (\lambda (n2: nat).(eq T (TLRef i2) (TSort n2)))) H2))))) (\lambda (v1:
56 T).(\lambda (v2: T).(\lambda (t1: T).(\lambda (t2: T).(\lambda (k:
57 K).(\lambda (H1: (eq T (THead k v1 t1) (TSort n1))).(let H2 \def (eq_ind T
58 (THead k v1 t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False
59 | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort
60 n1) H1) in (False_ind (ex nat (\lambda (n2: nat).(eq T (THead k v2 t2) (TSort
61 n2)))) H2)))))))) y u2 H0))) H))).
64 \forall (u2: T).(\forall (n1: nat).((iso (TLRef n1) u2) \to (ex nat (\lambda
65 (n2: nat).(eq T u2 (TLRef n2))))))
67 \lambda (u2: T).(\lambda (n1: nat).(\lambda (H: (iso (TLRef n1)
68 u2)).(insert_eq T (TLRef n1) (\lambda (t: T).(iso t u2)) (\lambda (_: T).(ex
69 nat (\lambda (n2: nat).(eq T u2 (TLRef n2))))) (\lambda (y: T).(\lambda (H0:
70 (iso y u2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).((eq T t (TLRef n1))
71 \to (ex nat (\lambda (n2: nat).(eq T t0 (TLRef n2))))))) (\lambda (n0:
72 nat).(\lambda (n2: nat).(\lambda (H1: (eq T (TSort n0) (TLRef n1))).(let H2
73 \def (eq_ind T (TSort n0) (\lambda (ee: T).(match ee with [(TSort _)
74 \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow
75 False])) I (TLRef n1) H1) in (False_ind (ex nat (\lambda (n3: nat).(eq T
76 (TSort n2) (TLRef n3)))) H2))))) (\lambda (i1: nat).(\lambda (i2:
77 nat).(\lambda (H1: (eq T (TLRef i1) (TLRef n1))).(let H2 \def (f_equal T nat
78 (\lambda (e: T).(match e with [(TSort _) \Rightarrow i1 | (TLRef n)
79 \Rightarrow n | (THead _ _ _) \Rightarrow i1])) (TLRef i1) (TLRef n1) H1) in
80 (ex_intro nat (\lambda (n2: nat).(eq T (TLRef i2) (TLRef n2))) i2 (refl_equal
81 T (TLRef i2))))))) (\lambda (v1: T).(\lambda (v2: T).(\lambda (t1:
82 T).(\lambda (t2: T).(\lambda (k: K).(\lambda (H1: (eq T (THead k v1 t1)
83 (TLRef n1))).(let H2 \def (eq_ind T (THead k v1 t1) (\lambda (ee: T).(match
84 ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _
85 _ _) \Rightarrow True])) I (TLRef n1) H1) in (False_ind (ex nat (\lambda (n2:
86 nat).(eq T (THead k v2 t2) (TLRef n2)))) H2)))))))) y u2 H0))) H))).
89 \forall (k: K).(\forall (v1: T).(\forall (t1: T).(\forall (u2: T).((iso
90 (THead k v1 t1) u2) \to (ex_2 T T (\lambda (v2: T).(\lambda (t2: T).(eq T u2
91 (THead k v2 t2)))))))))
93 \lambda (k: K).(\lambda (v1: T).(\lambda (t1: T).(\lambda (u2: T).(\lambda
94 (H: (iso (THead k v1 t1) u2)).(insert_eq T (THead k v1 t1) (\lambda (t:
95 T).(iso t u2)) (\lambda (_: T).(ex_2 T T (\lambda (v2: T).(\lambda (t2:
96 T).(eq T u2 (THead k v2 t2)))))) (\lambda (y: T).(\lambda (H0: (iso y
97 u2)).(iso_ind (\lambda (t: T).(\lambda (t0: T).((eq T t (THead k v1 t1)) \to
98 (ex_2 T T (\lambda (v2: T).(\lambda (t2: T).(eq T t0 (THead k v2 t2))))))))
99 (\lambda (n1: nat).(\lambda (n2: nat).(\lambda (H1: (eq T (TSort n1) (THead k
100 v1 t1))).(let H2 \def (eq_ind T (TSort n1) (\lambda (ee: T).(match ee with
101 [(TSort _) \Rightarrow True | (TLRef _) \Rightarrow False | (THead _ _ _)
102 \Rightarrow False])) I (THead k v1 t1) H1) in (False_ind (ex_2 T T (\lambda
103 (v2: T).(\lambda (t2: T).(eq T (TSort n2) (THead k v2 t2))))) H2)))))
104 (\lambda (i1: nat).(\lambda (i2: nat).(\lambda (H1: (eq T (TLRef i1) (THead k
105 v1 t1))).(let H2 \def (eq_ind T (TLRef i1) (\lambda (ee: T).(match ee with
106 [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | (THead _ _ _)
107 \Rightarrow False])) I (THead k v1 t1) H1) in (False_ind (ex_2 T T (\lambda
108 (v2: T).(\lambda (t2: T).(eq T (TLRef i2) (THead k v2 t2))))) H2)))))
109 (\lambda (v0: T).(\lambda (v2: T).(\lambda (t0: T).(\lambda (t2: T).(\lambda
110 (k0: K).(\lambda (H1: (eq T (THead k0 v0 t0) (THead k v1 t1))).(let H2 \def
111 (f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k0 | (TLRef
112 _) \Rightarrow k0 | (THead k1 _ _) \Rightarrow k1])) (THead k0 v0 t0) (THead
113 k v1 t1) H1) in ((let H3 \def (f_equal T T (\lambda (e: T).(match e with
114 [(TSort _) \Rightarrow v0 | (TLRef _) \Rightarrow v0 | (THead _ t _)
115 \Rightarrow t])) (THead k0 v0 t0) (THead k v1 t1) H1) in ((let H4 \def
116 (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef
117 _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 v0 t0) (THead k
118 v1 t1) H1) in (\lambda (_: (eq T v0 v1)).(\lambda (H6: (eq K k0 k)).(eq_ind_r
119 K k (\lambda (k1: K).(ex_2 T T (\lambda (v3: T).(\lambda (t3: T).(eq T (THead
120 k1 v2 t2) (THead k v3 t3)))))) (ex_2_intro T T (\lambda (v3: T).(\lambda (t3:
121 T).(eq T (THead k v2 t2) (THead k v3 t3)))) v2 t2 (refl_equal T (THead k v2
122 t2))) k0 H6)))) H3)) H2)))))))) y u2 H0))) H))))).
124 lemma iso_flats_lref_bind_false:
125 \forall (f: F).(\forall (b: B).(\forall (i: nat).(\forall (v: T).(\forall
126 (t: T).(\forall (vs: TList).((iso (THeads (Flat f) vs (TLRef i)) (THead (Bind
127 b) v t)) \to (\forall (P: Prop).P)))))))
129 \lambda (f: F).(\lambda (b: B).(\lambda (i: nat).(\lambda (v: T).(\lambda
130 (t: T).(\lambda (vs: TList).(TList_ind (\lambda (t0: TList).((iso (THeads
131 (Flat f) t0 (TLRef i)) (THead (Bind b) v t)) \to (\forall (P: Prop).P)))
132 (\lambda (H: (iso (TLRef i) (THead (Bind b) v t))).(\lambda (P: Prop).(let
133 H_x \def (iso_gen_lref (THead (Bind b) v t) i H) in (let H0 \def H_x in
134 (ex_ind nat (\lambda (n2: nat).(eq T (THead (Bind b) v t) (TLRef n2))) P
135 (\lambda (x: nat).(\lambda (H1: (eq T (THead (Bind b) v t) (TLRef x))).(let
136 H2 \def (eq_ind T (THead (Bind b) v t) (\lambda (ee: T).(match ee with
137 [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _)
138 \Rightarrow True])) I (TLRef x) H1) in (False_ind P H2)))) H0))))) (\lambda
139 (t0: T).(\lambda (t1: TList).(\lambda (_: (((iso (THeads (Flat f) t1 (TLRef
140 i)) (THead (Bind b) v t)) \to (\forall (P: Prop).P)))).(\lambda (H0: (iso
141 (THead (Flat f) t0 (THeads (Flat f) t1 (TLRef i))) (THead (Bind b) v
142 t))).(\lambda (P: Prop).(let H_x \def (iso_gen_head (Flat f) t0 (THeads (Flat
143 f) t1 (TLRef i)) (THead (Bind b) v t) H0) in (let H1 \def H_x in (ex_2_ind T
144 T (\lambda (v2: T).(\lambda (t2: T).(eq T (THead (Bind b) v t) (THead (Flat
145 f) v2 t2)))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (H2: (eq T (THead
146 (Bind b) v t) (THead (Flat f) x0 x1))).(let H3 \def (eq_ind T (THead (Bind b)
147 v t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _)
148 \Rightarrow False | (THead k _ _) \Rightarrow (match k with [(Bind _)
149 \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat f) x0 x1)
150 H2) in (False_ind P H3))))) H1)))))))) vs)))))).
152 lemma iso_flats_flat_bind_false:
153 \forall (f1: F).(\forall (f2: F).(\forall (b: B).(\forall (v: T).(\forall
154 (v2: T).(\forall (t: T).(\forall (t2: T).(\forall (vs: TList).((iso (THeads
155 (Flat f1) vs (THead (Flat f2) v2 t2)) (THead (Bind b) v t)) \to (\forall (P:
158 \lambda (f1: F).(\lambda (f2: F).(\lambda (b: B).(\lambda (v: T).(\lambda
159 (v2: T).(\lambda (t: T).(\lambda (t2: T).(\lambda (vs: TList).(TList_ind
160 (\lambda (t0: TList).((iso (THeads (Flat f1) t0 (THead (Flat f2) v2 t2))
161 (THead (Bind b) v t)) \to (\forall (P: Prop).P))) (\lambda (H: (iso (THead
162 (Flat f2) v2 t2) (THead (Bind b) v t))).(\lambda (P: Prop).(let H_x \def
163 (iso_gen_head (Flat f2) v2 t2 (THead (Bind b) v t) H) in (let H0 \def H_x in
164 (ex_2_ind T T (\lambda (v3: T).(\lambda (t3: T).(eq T (THead (Bind b) v t)
165 (THead (Flat f2) v3 t3)))) P (\lambda (x0: T).(\lambda (x1: T).(\lambda (H1:
166 (eq T (THead (Bind b) v t) (THead (Flat f2) x0 x1))).(let H2 \def (eq_ind T
167 (THead (Bind b) v t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow
168 False | (TLRef _) \Rightarrow False | (THead k _ _) \Rightarrow (match k with
169 [(Bind _) \Rightarrow True | (Flat _) \Rightarrow False])])) I (THead (Flat
170 f2) x0 x1) H1) in (False_ind P H2))))) H0))))) (\lambda (t0: T).(\lambda (t1:
171 TList).(\lambda (_: (((iso (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))
172 (THead (Bind b) v t)) \to (\forall (P: Prop).P)))).(\lambda (H0: (iso (THead
173 (Flat f1) t0 (THeads (Flat f1) t1 (THead (Flat f2) v2 t2))) (THead (Bind b) v
174 t))).(\lambda (P: Prop).(let H_x \def (iso_gen_head (Flat f1) t0 (THeads
175 (Flat f1) t1 (THead (Flat f2) v2 t2)) (THead (Bind b) v t) H0) in (let H1
176 \def H_x in (ex_2_ind T T (\lambda (v3: T).(\lambda (t3: T).(eq T (THead
177 (Bind b) v t) (THead (Flat f1) v3 t3)))) P (\lambda (x0: T).(\lambda (x1:
178 T).(\lambda (H2: (eq T (THead (Bind b) v t) (THead (Flat f1) x0 x1))).(let H3
179 \def (eq_ind T (THead (Bind b) v t) (\lambda (ee: T).(match ee with [(TSort
180 _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead k _ _)
181 \Rightarrow (match k with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow
182 False])])) I (THead (Flat f1) x0 x1) H2) in (False_ind P H3))))) H1))))))))