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 *********************)
19 (* $Id: CFields.v,v 1.12 2004/04/23 10:00:52 lcf Exp $ *)
21 (*#* printing [/] %\ensuremath{/}% #/# *)
23 (*#* printing [//] %\ensuremath\ddagger% #‡# *)
25 (*#* printing {/} %\ensuremath{/}% #/# *)
27 (*#* printing {1/} %\ensuremath{\frac1\cdot}% #1/# *)
29 (*#* printing [/]?[//] %\ensuremath{/?\ddagger}% #/?‡# *)
31 include "algebra/CRings.ma".
113 (* Begin_SpecReals *)
118 * Fields %\label{section:fields}%
119 ** Definition of the notion Field
122 inline procedural "cic:/CoRN/algebra/CFields/is_CField.con" as definition.
124 inline procedural "cic:/CoRN/algebra/CFields/CField.ind".
127 cic:/matita/CoRN-Procedural/algebra/CFields/cf_crr.con
132 inline procedural "cic:/CoRN/algebra/CFields/f_rcpcl'.con" as definition.
134 inline procedural "cic:/CoRN/algebra/CFields/f_rcpcl.con" as definition.
137 Implicit Arguments f_rcpcl [F].
141 [cf_div] is the division in a field. It is defined in terms of
142 multiplication and the reciprocal. [x[/]y] is only defined if
143 we have a proof of [y [#] Zero].
146 inline procedural "cic:/CoRN/algebra/CFields/cf_div.con" as definition.
149 Implicit Arguments cf_div [F].
153 Notation "x [/] y [//] Hy" := (cf_div x y Hy) (at level 80).
157 %\begin{convention}\label{convention:div-form}%
158 - Division in fields is a (type dependent) ternary function: [(cf_div x y Hy)] is denoted infix by [x [/] y [//] Hy].
159 - In lemmas, a hypothesis that [t [#] Zero] will be named [t_].
160 - We do not use [NonZeros], but write the condition [ [#] Zero] separately.
161 - In each lemma, we use only variables for proof objects, and these variables
162 are universally quantified.
163 For example, the informal lemma
164 $\frac{1}{x}\cdot\frac{1}{y} = \frac{1}{x\cdot y}$
165 #(1/x).(1/y) = 1/(x.y)# for all [x] and [y]is formalized as
167 forall (x y : F) x_ y_ xy_, (1[/]x[//]x_) [*] (1[/]y[//]y_) [=] 1[/] (x[*]y)[//]xy_
171 forall (x y : F) x_ y_, (1[/]x[//]x_) [*] (1[/]y[//]y_) [=] 1[/] (x[*]y)[//](prod_nz x y x_ y_)
173 We have made this choice to make it easier to apply lemmas; this can
174 be quite awkward if we would use the last formulation.
175 - So every division occurring in the formulation of a lemma is of the
176 form [e[/]e'[//]H] where [H] is a variable. Only exceptions: we may
177 write [e[/] (Snring n)] and [e[/]TwoNZ], [e[/]ThreeNZ] and so on.
178 (Constants like [TwoNZ] will be defined later on.)
183 %\begin{convention}% Let [F] be a field.
192 cic:/CoRN/algebra/CFields/Field_axioms/F.var
195 inline procedural "cic:/CoRN/algebra/CFields/CField_is_CField.con" as lemma.
197 inline procedural "cic:/CoRN/algebra/CFields/rcpcl_is_inverse.con" as lemma.
208 %\begin{convention}% Let [F] be a field.
213 cic:/CoRN/algebra/CFields/Field_basics/F.var
216 inline procedural "cic:/CoRN/algebra/CFields/rcpcl_is_inverse_unfolded.con" as lemma.
218 inline procedural "cic:/CoRN/algebra/CFields/field_mult_inv.con" as lemma.
221 Hint Resolve field_mult_inv: algebra.
224 inline procedural "cic:/CoRN/algebra/CFields/field_mult_inv_op.con" as lemma.
231 Hint Resolve field_mult_inv field_mult_inv_op: algebra.
235 Section Field_multiplication
239 ** Properties of multiplication
240 %\begin{convention}% Let [F] be a field.
245 cic:/CoRN/algebra/CFields/Field_multiplication/F.var
248 inline procedural "cic:/CoRN/algebra/CFields/mult_resp_ap_zero.con" as lemma.
250 inline procedural "cic:/CoRN/algebra/CFields/mult_lft_resp_ap.con" as lemma.
252 inline procedural "cic:/CoRN/algebra/CFields/mult_rht_resp_ap.con" as lemma.
254 inline procedural "cic:/CoRN/algebra/CFields/mult_resp_neq_zero.con" as lemma.
256 inline procedural "cic:/CoRN/algebra/CFields/mult_resp_neq.con" as lemma.
258 inline procedural "cic:/CoRN/algebra/CFields/mult_eq_zero.con" as lemma.
260 inline procedural "cic:/CoRN/algebra/CFields/mult_cancel_lft.con" as lemma.
262 inline procedural "cic:/CoRN/algebra/CFields/mult_cancel_rht.con" as lemma.
264 inline procedural "cic:/CoRN/algebra/CFields/square_eq_aux.con" as lemma.
266 inline procedural "cic:/CoRN/algebra/CFields/square_eq_weak.con" as lemma.
268 inline procedural "cic:/CoRN/algebra/CFields/cond_square_eq.con" as lemma.
271 End Field_multiplication
278 inline procedural "cic:/CoRN/algebra/CFields/x_xminone.con" as lemma.
280 inline procedural "cic:/CoRN/algebra/CFields/square_id.con" as lemma.
287 Hint Resolve mult_resp_ap_zero: algebra.
291 Section Rcpcl_properties
295 ** Properties of reciprocal
296 %\begin{convention}% Let [F] be a field.
301 cic:/CoRN/algebra/CFields/Rcpcl_properties/F.var
304 inline procedural "cic:/CoRN/algebra/CFields/inv_one.con" as lemma.
306 inline procedural "cic:/CoRN/algebra/CFields/f_rcpcl_wd.con" as lemma.
308 inline procedural "cic:/CoRN/algebra/CFields/f_rcpcl_mult.con" as lemma.
310 inline procedural "cic:/CoRN/algebra/CFields/f_rcpcl_resp_ap_zero.con" as lemma.
312 inline procedural "cic:/CoRN/algebra/CFields/f_rcpcl_f_rcpcl.con" as lemma.
323 ** The multiplicative group of nonzeros of a field.
324 %\begin{convention}% Let [F] be a field
329 cic:/CoRN/algebra/CFields/MultipGroup/F.var
333 The multiplicative monoid of NonZeros.
336 inline procedural "cic:/CoRN/algebra/CFields/NonZeroMonoid.con" as definition.
338 inline procedural "cic:/CoRN/algebra/CFields/fmg_cs_inv.con" as definition.
340 inline procedural "cic:/CoRN/algebra/CFields/plus_nonzeros_eq_mult_dom.con" as lemma.
342 inline procedural "cic:/CoRN/algebra/CFields/cfield_to_mult_cgroup.con" as lemma.
349 Section Div_properties
353 ** Properties of division
354 %\begin{convention}% Let [F] be a field.
357 %\begin{nameconvention}%
358 In the names of lemmas, we denote [[/]] by [div], and
360 %\end{nameconvention}%
364 cic:/CoRN/algebra/CFields/Div_properties/F.var
367 inline procedural "cic:/CoRN/algebra/CFields/div_prop.con" as lemma.
369 inline procedural "cic:/CoRN/algebra/CFields/div_1.con" as lemma.
371 inline procedural "cic:/CoRN/algebra/CFields/div_1'.con" as lemma.
373 inline procedural "cic:/CoRN/algebra/CFields/div_1''.con" as lemma.
376 Hint Resolve div_1: algebra.
379 inline procedural "cic:/CoRN/algebra/CFields/x_div_x.con" as lemma.
382 Hint Resolve x_div_x: algebra.
385 inline procedural "cic:/CoRN/algebra/CFields/x_div_one.con" as lemma.
388 The next lemma says $x\cdot\frac{y}{z} = \frac{x\cdot y}{z}$
392 inline procedural "cic:/CoRN/algebra/CFields/x_mult_y_div_z.con" as lemma.
395 Hint Resolve x_mult_y_div_z: algebra.
398 inline procedural "cic:/CoRN/algebra/CFields/div_wd.con" as lemma.
401 Hint Resolve div_wd: algebra_c.
405 The next lemma says $\frac{\frac{x}{y}}{z} = \frac{x}{y\cdot z}$
406 #[(x/y)/z = x/(y.z)]#
409 inline procedural "cic:/CoRN/algebra/CFields/div_div.con" as lemma.
411 inline procedural "cic:/CoRN/algebra/CFields/div_resp_ap_zero_rev.con" as lemma.
413 inline procedural "cic:/CoRN/algebra/CFields/div_resp_ap_zero.con" as lemma.
416 The next lemma says $\frac{x}{\frac{y}{z}} = \frac{x\cdot z}{y}$
417 #[x/(y/z) = (x.z)/y]#
420 inline procedural "cic:/CoRN/algebra/CFields/div_div2.con" as lemma.
423 The next lemma says $\frac{x\cdot p}{y\cdot q} = \frac{x}{y}\cdot \frac{p}{q}$
424 #[(x.p)/(y.q) = (x/y).(p/q)]#
427 inline procedural "cic:/CoRN/algebra/CFields/mult_of_divs.con" as lemma.
429 inline procedural "cic:/CoRN/algebra/CFields/div_dist.con" as lemma.
431 inline procedural "cic:/CoRN/algebra/CFields/div_dist'.con" as lemma.
433 inline procedural "cic:/CoRN/algebra/CFields/div_semi_sym.con" as lemma.
436 Hint Resolve div_semi_sym: algebra.
439 inline procedural "cic:/CoRN/algebra/CFields/eq_div.con" as lemma.
441 inline procedural "cic:/CoRN/algebra/CFields/div_strext.con" as lemma.
448 Hint Resolve div_1 div_1' div_1'' div_wd x_div_x x_div_one div_div div_div2
449 mult_of_divs x_mult_y_div_z mult_of_divs div_dist div_dist' div_semi_sym
454 ** Cancellation laws for apartness and multiplication
455 %\begin{convention}% Let [F] be a field
460 Section Mult_Cancel_Ap_Zero
464 cic:/CoRN/algebra/CFields/Mult_Cancel_Ap_Zero/F.var
467 inline procedural "cic:/CoRN/algebra/CFields/mult_cancel_ap_zero_lft.con" as lemma.
469 inline procedural "cic:/CoRN/algebra/CFields/mult_cancel_ap_zero_rht.con" as lemma.
471 inline procedural "cic:/CoRN/algebra/CFields/recip_ap_zero.con" as lemma.
473 inline procedural "cic:/CoRN/algebra/CFields/recip_resp_ap.con" as lemma.
476 End Mult_Cancel_Ap_Zero
484 ** Functional Operations
486 We now move on to lifting these operations to functions. As we are
487 dealing with %\emph{partial}% #<i>partial</i># functions, we don't
488 have to worry explicitly about the function by which we are dividing
489 being non-zero everywhere; this will simply be encoded in its domain.
492 Let [X] be a Field and [F,G:(PartFunct X)] have domains respectively
498 cic:/CoRN/algebra/CFields/CField_Ops/X.var
502 cic:/CoRN/algebra/CFields/CField_Ops/F.var
506 cic:/CoRN/algebra/CFields/CField_Ops/G.var
511 inline procedural "cic:/CoRN/algebra/CFields/CField_Ops/P.con" "CField_Ops__" as definition.
513 inline procedural "cic:/CoRN/algebra/CFields/CField_Ops/Q.con" "CField_Ops__" as definition.
518 Section Part_Function_Recip
522 Some auxiliary notions are helpful in defining the domain.
525 inline procedural "cic:/CoRN/algebra/CFields/CField_Ops/Part_Function_Recip/R.con" "CField_Ops__Part_Function_Recip__" as definition.
527 inline procedural "cic:/CoRN/algebra/CFields/CField_Ops/Part_Function_Recip/Ext2R.con" "CField_Ops__Part_Function_Recip__" as definition.
529 inline procedural "cic:/CoRN/algebra/CFields/part_function_recip_strext.con" as lemma.
531 inline procedural "cic:/CoRN/algebra/CFields/part_function_recip_pred_wd.con" as lemma.
533 inline procedural "cic:/CoRN/algebra/CFields/Frecip.con" as definition.
536 End Part_Function_Recip
540 Section Part_Function_Div
544 For division things work out almost in the same way.
547 inline procedural "cic:/CoRN/algebra/CFields/CField_Ops/Part_Function_Div/R.con" "CField_Ops__Part_Function_Div__" as definition.
549 inline procedural "cic:/CoRN/algebra/CFields/CField_Ops/Part_Function_Div/Ext2R.con" "CField_Ops__Part_Function_Div__" as definition.
551 inline procedural "cic:/CoRN/algebra/CFields/part_function_div_strext.con" as lemma.
553 inline procedural "cic:/CoRN/algebra/CFields/part_function_div_pred_wd.con" as lemma.
555 inline procedural "cic:/CoRN/algebra/CFields/Fdiv.con" as definition.
558 End Part_Function_Div
562 %\begin{convention}% Let [R:X->CProp].
567 cic:/CoRN/algebra/CFields/CField_Ops/R.var
570 inline procedural "cic:/CoRN/algebra/CFields/included_FRecip.con" as lemma.
572 inline procedural "cic:/CoRN/algebra/CFields/included_FRecip'.con" as lemma.
574 inline procedural "cic:/CoRN/algebra/CFields/included_FDiv.con" as lemma.
576 inline procedural "cic:/CoRN/algebra/CFields/included_FDiv'.con" as lemma.
578 inline procedural "cic:/CoRN/algebra/CFields/included_FDiv''.con" as lemma.
585 Implicit Arguments Frecip [X].
589 Notation "{1/} x" := (Frecip x) (at level 2, right associativity).
593 Implicit Arguments Fdiv [X].
597 Infix "{/}" := Fdiv (at level 41, no associativity).
601 Hint Resolve included_FRecip included_FDiv : included.
605 Hint Immediate included_FRecip' included_FDiv' included_FDiv'' : included.