]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/procedural/CoRN/tactics/RingReflection.mma
Preparing for 0.5.9 release.
[helm.git] / helm / software / matita / contribs / procedural / CoRN / tactics / RingReflection.mma
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 "CoRN.ma".
18
19 (* $Id: RingReflection.v,v 1.4 2004/04/23 10:01:06 lcf Exp $ *)
20
21 (* begin hide *)
22
23 include "algebra/CRings.ma".
24
25 include "tactics/AlgReflection.ma".
26
27 (* UNEXPORTED
28 Section Ring_Interpretation_Function
29 *)
30
31 (* UNEXPORTED
32 cic:/CoRN/tactics/RingReflection/Ring_Interpretation_Function/R.var
33 *)
34
35 (* UNEXPORTED
36 cic:/CoRN/tactics/RingReflection/Ring_Interpretation_Function/val.var
37 *)
38
39 (* UNEXPORTED
40 cic:/CoRN/tactics/RingReflection/Ring_Interpretation_Function/unop.var
41 *)
42
43 (* UNEXPORTED
44 cic:/CoRN/tactics/RingReflection/Ring_Interpretation_Function/binop.var
45 *)
46
47 (* UNEXPORTED
48 cic:/CoRN/tactics/RingReflection/Ring_Interpretation_Function/pfun.var
49 *)
50
51 inline procedural "cic:/CoRN/tactics/RingReflection/interpR.ind".
52
53 inline procedural "cic:/CoRN/tactics/RingReflection/wfR.con" as definition.
54
55 inline procedural "cic:/CoRN/tactics/RingReflection/xexprR.ind".
56
57 inline procedural "cic:/CoRN/tactics/RingReflection/xforgetR.con" as definition.
58
59 inline procedural "cic:/CoRN/tactics/RingReflection/xinterpR.con" as definition.
60
61 inline procedural "cic:/CoRN/tactics/RingReflection/xexprR2interpR.con" as lemma.
62
63 inline procedural "cic:/CoRN/tactics/RingReflection/xexprR_diagram_commutes.con" as definition.
64
65 inline procedural "cic:/CoRN/tactics/RingReflection/xexprR2wfR.con" as lemma.
66
67 inline procedural "cic:/CoRN/tactics/RingReflection/fexprR.ind".
68
69 inline procedural "cic:/CoRN/tactics/RingReflection/fexprR_var.con" as definition.
70
71 inline procedural "cic:/CoRN/tactics/RingReflection/fexprR_int.con" as definition.
72
73 inline procedural "cic:/CoRN/tactics/RingReflection/fexprR_plus.con" as definition.
74
75 inline procedural "cic:/CoRN/tactics/RingReflection/fexprR_mult.con" as definition.
76
77 inline procedural "cic:/CoRN/tactics/RingReflection/fforgetR.con" as definition.
78
79 inline procedural "cic:/CoRN/tactics/RingReflection/fexprR2interp.con" as lemma.
80
81 inline procedural "cic:/CoRN/tactics/RingReflection/fexprR2wf.con" as lemma.
82
83 (* UNEXPORTED
84 Opaque csg_crr.
85 *)
86
87 (* UNEXPORTED
88 Opaque cm_crr.
89 *)
90
91 (* UNEXPORTED
92 Opaque cg_crr.
93 *)
94
95 (* UNEXPORTED
96 Opaque cr_crr.
97 *)
98
99 (* UNEXPORTED
100 Opaque csf_fun.
101 *)
102
103 (* UNEXPORTED
104 Opaque csbf_fun.
105 *)
106
107 (* UNEXPORTED
108 Opaque csr_rel.
109 *)
110
111 (* UNEXPORTED
112 Opaque cs_eq.
113 *)
114
115 (* UNEXPORTED
116 Opaque cs_neq.
117 *)
118
119 (* UNEXPORTED
120 Opaque cs_ap.
121 *)
122
123 (* UNEXPORTED
124 Opaque cm_unit.
125 *)
126
127 (* UNEXPORTED
128 Opaque csg_op.
129 *)
130
131 (* UNEXPORTED
132 Opaque cg_inv.
133 *)
134
135 (* UNEXPORTED
136 Opaque cg_minus.
137 *)
138
139 (* UNEXPORTED
140 Opaque cr_one.
141 *)
142
143 (* UNEXPORTED
144 Opaque cr_mult.
145 *)
146
147 (* UNEXPORTED
148 Opaque nexp_op.
149 *)
150
151 inline procedural "cic:/CoRN/tactics/RingReflection/refl_interpR.con" as lemma.
152
153 inline procedural "cic:/CoRN/tactics/RingReflection/interpR_wd.con" as lemma.
154
155 (* UNEXPORTED
156 End Ring_Interpretation_Function
157 *)
158
159 (* UNEXPORTED
160 Section Ring_NormCorrect
161 *)
162
163 (* UNEXPORTED
164 cic:/CoRN/tactics/RingReflection/Ring_NormCorrect/R.var
165 *)
166
167 (* UNEXPORTED
168 cic:/CoRN/tactics/RingReflection/Ring_NormCorrect/val.var
169 *)
170
171 (* UNEXPORTED
172 cic:/CoRN/tactics/RingReflection/Ring_NormCorrect/unop.var
173 *)
174
175 (* UNEXPORTED
176 cic:/CoRN/tactics/RingReflection/Ring_NormCorrect/binop.var
177 *)
178
179 (* UNEXPORTED
180 cic:/CoRN/tactics/RingReflection/Ring_NormCorrect/pfun.var
181 *)
182
183 (* NOTATION
184 Notation II := (interpR R val unop binop pfun).
185 *)
186
187 (*
188 four kinds of exprs:
189
190   I     (expr_int _)
191   V     (expr_var _)
192   M     (expr_mult V M)
193         I
194   P     (expr_plus M P)
195         I
196
197 M: sorted on V
198 P: sorted on M, all M's not an I
199 *)
200
201 (* UNEXPORTED
202 Opaque Zmult.
203 *)
204
205 inline procedural "cic:/CoRN/tactics/RingReflection/MI_mult_corr_R.con" as lemma.
206
207 (* UNEXPORTED
208 Transparent Zmult.
209 *)
210
211 (* UNEXPORTED
212 Opaque MI_mult.
213 *)
214
215 inline procedural "cic:/CoRN/tactics/RingReflection/MV_mult_corr_R.con" as lemma.
216
217 (* UNEXPORTED
218 Transparent MI_mult.
219 *)
220
221 (* UNEXPORTED
222 Opaque MV_mult MI_mult.
223 *)
224
225 inline procedural "cic:/CoRN/tactics/RingReflection/MM_mult_corr_R.con" as lemma.
226
227 (* UNEXPORTED
228 Transparent MV_mult MI_mult.
229 *)
230
231 (* UNEXPORTED
232 Opaque MV_mult.
233 *)
234
235 inline procedural "cic:/CoRN/tactics/RingReflection/MM_plus_corr_R.con" as lemma.
236
237 (* UNEXPORTED
238 Transparent MV_mult.
239 *)
240
241 (* UNEXPORTED
242 Opaque MM_plus.
243 *)
244
245 inline procedural "cic:/CoRN/tactics/RingReflection/PM_plus_corr_R.con" as lemma.
246
247 (* UNEXPORTED
248 Transparent MM_plus.
249 *)
250
251 (* UNEXPORTED
252 Opaque PM_plus.
253 *)
254
255 inline procedural "cic:/CoRN/tactics/RingReflection/PP_plus_corr_R.con" as lemma.
256
257 (* UNEXPORTED
258 Transparent PM_plus.
259 *)
260
261 (* UNEXPORTED
262 Opaque PM_plus MM_mult MI_mult.
263 *)
264
265 inline procedural "cic:/CoRN/tactics/RingReflection/PM_mult_corr_R.con" as lemma.
266
267 (* UNEXPORTED
268 Opaque PM_mult.
269 *)
270
271 inline procedural "cic:/CoRN/tactics/RingReflection/PP_mult_corr_R.con" as lemma.
272
273 (*
274 Transparent PP_plus PM_mult PP_mult PM_plus MI_mult.
275 Lemma FF_plus_corr_R : (e,f:expr; x,y:R)
276   (II e x)->(II f y)->(II (FF_plus e f) x[+]y).
277 Cut (e1,e2,f1,f2:expr; x,y:R)
278      (II (expr_div e1 e2) x)
279      ->(II (expr_div f1 f2) y)
280      ->(II
281          (expr_div (PP_plus (PP_mult e1 f2) (PP_mult e2 f1))
282            (PP_mult e2 f2)) x[+]y).
283 Cut (e,f:expr; x,y:R)(II e x)->(II f y)->(II (expr_plus e f) x[+]y).
284 Intros H H0 e f.
285 Elim e; Elim f; Intros; Simpl; Auto.
286 Intros. Apply interpR_plus with x y; Algebra.
287 Intros. Inversion H. Inversion H0.
288 Apply interpR_div_one with x[+]y.
289 Algebra.
290 Apply interpR_wd with x0[*]One[+]One[*]x1.
291 Apply PP_plus_corr_R; Apply PP_mult_corr_R; Auto;
292   Apply interpR_int with k:=`1`; Algebra.
293 Step_final x0[+]x1.
294 Apply interpR_wd with (One::R)[*]One; Algebra.
295 Apply PP_mult_corr_R; Auto.
296 Qed.
297
298 Lemma FF_mult_corr_R : (e,f:expr; x,y:R)
299   (II e x)->(II f y)->(II (FF_mult e f) x[*]y).
300 Cut (e1,e2,f1,f2:expr; x,y:R)
301      (II (expr_div e1 e2) x)
302      ->(II (expr_div f1 f2) y)
303      ->(II (expr_div (PP_mult e1 f1) (PP_mult e2 f2)) x[*]y).
304 Cut (e,f:expr; x,y:R)(II e x)->(II f y)->(II (expr_mult e f) x[*]y).
305 Intros H H0 e f.
306 Elim e; Elim f; Intros; Simpl; Auto.
307 Intros. Apply interpR_mult with x y; Algebra.
308 Intros. Inversion H. Inversion H0.
309 Apply interpR_div_one with x0[*]x1.
310 Algebra.
311 Apply PP_mult_corr_R; Auto.
312 Apply interpR_wd with (One::R)[*]One; Algebra.
313 Apply PP_mult_corr_R; Auto.
314 Qed.
315
316 Transparent FF_div.
317 Lemma FF_div_corr_R : (e,f:expr; x:R)
318   (II (expr_div e f) x)->(II (FF_div e f) x).
319 Intro e; Case e; Simpl; Auto.
320 Intros e0 e1 f; Case f; Simpl; Auto.
321 Intros.
322 Inversion H; Simpl.
323 Inversion H3; Inversion H5.
324 Apply interpR_div_one with x1[*]One.
325 astepl x1. Step_final x0.
326 Apply PP_mult_corr_R; Auto.
327 Apply interpR_wd with One[*]x2.
328 Apply PP_mult_corr_R; Auto.
329 Step_final x2.
330 Qed.
331 *)
332
333 inline procedural "cic:/CoRN/tactics/RingReflection/NormR_corr.con" as lemma.
334
335 inline procedural "cic:/CoRN/tactics/RingReflection/Tactic_lemmaR.con" as lemma.
336
337 (* UNEXPORTED
338 End Ring_NormCorrect
339 *)
340
341 (* end hide *)
342