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/CoRN-Decl/algebra/COrdFields".
21 (* $Id: COrdFields.v,v 1.6 2004/04/23 10:00:52 lcf Exp $ *)
23 (*#* printing [<] %\ensuremath<% #<# *)
25 (*#* printing [<=] %\ensuremath{\leq}% #≤# *)
27 (*#* printing [>] %\ensuremath>% #># *)
29 (*#* printing OneNZ %\ensuremath{\mathbf1}% #1# *)
31 (*#* printing TwoNZ %\ensuremath{\mathbf2}% #2# *)
33 (*#* printing ThreeNZ %\ensuremath{\mathbf3}% #3# *)
35 (*#* printing FourNZ %\ensuremath{\mathbf4}% #4# *)
37 (*#* printing SixNZ %\ensuremath{\mathbf6}% #6# *)
39 (*#* printing EightNZ %\ensuremath{\mathbf8}% #8# *)
41 (*#* printing NineNZ %\ensuremath{\mathbf9}% #9# *)
43 (*#* printing TwelveNZ %\ensuremath{\mathbf{12}}% #12# *)
45 (*#* printing SixteenNZ %\ensuremath{\mathbf{16}}% #16# *)
47 (*#* printing EighteenNZ %\ensuremath{\mathbf{18}}% #18# *)
49 (*#* printing TwentyFourNZ %\ensuremath{\mathbf{24}}% #24# *)
51 (*#* printing FortyEightNZ %\ensuremath{\mathbf{48}}% #48# *)
53 include "tactics/FieldReflection.ma".
59 ** Definition of the notion of ordered field
64 inline "cic:/CoRN/algebra/COrdFields/strictorder.ind".
67 Implicit Arguments strictorder [A].
71 Implicit Arguments Build_strictorder [A R].
75 Implicit Arguments so_trans [A R].
79 Implicit Arguments so_asym [A R].
82 inline "cic:/CoRN/algebra/COrdFields/is_COrdField.ind".
84 inline "cic:/CoRN/algebra/COrdFields/COrdField.ind".
86 coercion cic:/matita/CoRN-Decl/algebra/COrdFields/cof_crr.con 0 (* compounds *).
89 %\begin{nameconvention}%
90 In the names of lemmas, [ [<] ] is written as [less] and "[Zero [<] ]"
92 %\end{nameconvention}%
96 Implicit Arguments cof_less [c].
100 Infix "[<]" := cof_less (at level 70, no associativity).
103 inline "cic:/CoRN/algebra/COrdFields/greater.con".
106 Implicit Arguments greater [F].
110 Infix "[>]" := greater (at level 70, no associativity).
116 Less or equal is defined as ``not greater than''.
119 inline "cic:/CoRN/algebra/COrdFields/leEq.con".
122 %\begin{nameconvention}%
123 In the names of lemmas, [ [<=] ] is written as [leEq] and
124 [Zero [<=] ] is written as [nonneg].
125 %\end{nameconvention}%
129 Implicit Arguments leEq [F].
133 Infix "[<=]" := leEq (at level 70, no associativity).
137 Section COrdField_axioms
141 ** Ordered field axioms
147 alias id "F" = "cic:/CoRN/algebra/COrdFields/COrdField_axioms/F.var".
149 inline "cic:/CoRN/algebra/COrdFields/COrdField_is_COrdField.con".
151 inline "cic:/CoRN/algebra/COrdFields/less_strorder.con".
153 inline "cic:/CoRN/algebra/COrdFields/less_transitive_unfolded.con".
155 inline "cic:/CoRN/algebra/COrdFields/less_antisymmetric_unfolded.con".
157 inline "cic:/CoRN/algebra/COrdFields/less_irreflexive.con".
159 inline "cic:/CoRN/algebra/COrdFields/less_irreflexive_unfolded.con".
161 inline "cic:/CoRN/algebra/COrdFields/plus_resp_less_rht.con".
163 inline "cic:/CoRN/algebra/COrdFields/mult_resp_pos.con".
165 inline "cic:/CoRN/algebra/COrdFields/less_conf_ap.con".
167 inline "cic:/CoRN/algebra/COrdFields/less_wdr.con".
169 inline "cic:/CoRN/algebra/COrdFields/less_wdl.con".
176 Declare Left Step less_wdl.
180 Declare Right Step less_wdr.
184 Section OrdField_basics
193 Let in the rest of this section (and all subsections)
194 [R] be an ordered field
198 alias id "R" = "cic:/CoRN/algebra/COrdFields/OrdField_basics/R.var".
200 inline "cic:/CoRN/algebra/COrdFields/less_imp_ap.con".
202 inline "cic:/CoRN/algebra/COrdFields/Greater_imp_ap.con".
204 inline "cic:/CoRN/algebra/COrdFields/ap_imp_less.con".
207 Now properties which can be derived.
210 inline "cic:/CoRN/algebra/COrdFields/less_cotransitive.con".
212 inline "cic:/CoRN/algebra/COrdFields/less_cotransitive_unfolded.con".
214 inline "cic:/CoRN/algebra/COrdFields/pos_ap_zero.con".
216 (* Main characterization of less *)
218 inline "cic:/CoRN/algebra/COrdFields/leEq_not_eq.con".
224 (*#**********************************)
227 Section Basic_Properties_of_leEq
230 (*#**********************************)
232 (*#* ** Basic properties of [ [<=] ]
235 alias id "R" = "cic:/CoRN/algebra/COrdFields/Basic_Properties_of_leEq/R.var".
237 inline "cic:/CoRN/algebra/COrdFields/leEq_wdr.con".
239 inline "cic:/CoRN/algebra/COrdFields/leEq_wdl.con".
241 inline "cic:/CoRN/algebra/COrdFields/leEq_reflexive.con".
244 Declare Left Step leEq_wdl.
248 Declare Right Step leEq_wdr.
251 inline "cic:/CoRN/algebra/COrdFields/eq_imp_leEq.con".
253 inline "cic:/CoRN/algebra/COrdFields/leEq_imp_eq.con".
255 inline "cic:/CoRN/algebra/COrdFields/lt_equiv_imp_eq.con".
257 inline "cic:/CoRN/algebra/COrdFields/less_leEq_trans.con".
259 inline "cic:/CoRN/algebra/COrdFields/leEq_less_trans.con".
261 inline "cic:/CoRN/algebra/COrdFields/leEq_transitive.con".
263 inline "cic:/CoRN/algebra/COrdFields/less_leEq.con".
266 End Basic_Properties_of_leEq
270 Declare Left Step leEq_wdl.
274 Declare Right Step leEq_wdr.
278 Section infinity_of_cordfields
282 ** Infinity of ordered fields
284 In an ordered field we have that [One[+]One] and
285 [One[+]One[+]One] and so on are all apart from zero.
286 We first show this, so that we can define [TwoNZ], [ThreeNZ]
287 and so on. These are elements of [NonZeros], so that we can write
291 alias id "R" = "cic:/CoRN/algebra/COrdFields/infinity_of_cordfields/R.var".
293 inline "cic:/CoRN/algebra/COrdFields/pos_one.con".
295 inline "cic:/CoRN/algebra/COrdFields/nring_less_succ.con".
297 inline "cic:/CoRN/algebra/COrdFields/nring_less.con".
299 inline "cic:/CoRN/algebra/COrdFields/nring_leEq.con".
301 inline "cic:/CoRN/algebra/COrdFields/nring_apart.con".
303 inline "cic:/CoRN/algebra/COrdFields/nring_ap_zero.con".
305 inline "cic:/CoRN/algebra/COrdFields/nring_ap_zero'.con".
307 inline "cic:/CoRN/algebra/COrdFields/nring_ap_zero_imp.con".
309 inline "cic:/CoRN/algebra/COrdFields/Snring.con".
311 include "tactics/Transparent_algebra.ma".
313 inline "cic:/CoRN/algebra/COrdFields/pos_Snring.con".
315 inline "cic:/CoRN/algebra/COrdFields/nringS_ap_zero.con".
317 inline "cic:/CoRN/algebra/COrdFields/nring_fac_ap_zero.con".
319 include "tactics/Opaque_algebra.ma".
326 *** Properties of one up to four
327 %\begin{nameconvention}%
328 In the names of lemmas, we denote the numbers 0,1,2,3,4 and so on, by
329 [zero], [one], [two] etc.
330 %\end{nameconvention}%
333 inline "cic:/CoRN/algebra/COrdFields/less_plusOne.con".
335 inline "cic:/CoRN/algebra/COrdFields/zero_lt_posplus1.con".
337 inline "cic:/CoRN/algebra/COrdFields/plus_one_ext_less.con".
339 inline "cic:/CoRN/algebra/COrdFields/one_less_two.con".
341 inline "cic:/CoRN/algebra/COrdFields/two_less_three.con".
343 inline "cic:/CoRN/algebra/COrdFields/three_less_four.con".
345 inline "cic:/CoRN/algebra/COrdFields/pos_two.con".
347 inline "cic:/CoRN/algebra/COrdFields/one_less_three.con".
349 inline "cic:/CoRN/algebra/COrdFields/two_less_four.con".
351 inline "cic:/CoRN/algebra/COrdFields/pos_three.con".
353 inline "cic:/CoRN/algebra/COrdFields/one_less_four.con".
355 inline "cic:/CoRN/algebra/COrdFields/pos_four.con".
357 inline "cic:/CoRN/algebra/COrdFields/two_ap_zero.con".
359 inline "cic:/CoRN/algebra/COrdFields/three_ap_zero.con".
361 inline "cic:/CoRN/algebra/COrdFields/four_ap_zero.con".
368 Section More_than_four
371 (*#* *** Properties of some other numbers *)
373 inline "cic:/CoRN/algebra/COrdFields/pos_six.con".
375 inline "cic:/CoRN/algebra/COrdFields/pos_eight.con".
377 inline "cic:/CoRN/algebra/COrdFields/pos_nine.con".
379 inline "cic:/CoRN/algebra/COrdFields/pos_twelve.con".
381 inline "cic:/CoRN/algebra/COrdFields/pos_sixteen.con".
383 inline "cic:/CoRN/algebra/COrdFields/pos_eighteen.con".
385 inline "cic:/CoRN/algebra/COrdFields/pos_twentyfour.con".
387 inline "cic:/CoRN/algebra/COrdFields/pos_fortyeight.con".
389 inline "cic:/CoRN/algebra/COrdFields/six_ap_zero.con".
391 inline "cic:/CoRN/algebra/COrdFields/eight_ap_zero.con".
393 inline "cic:/CoRN/algebra/COrdFields/nine_ap_zero.con".
395 inline "cic:/CoRN/algebra/COrdFields/twelve_ap_zero.con".
397 inline "cic:/CoRN/algebra/COrdFields/sixteen_ap_zero.con".
399 inline "cic:/CoRN/algebra/COrdFields/eighteen_ap_zero.con".
401 inline "cic:/CoRN/algebra/COrdFields/twentyfour_ap_zero.con".
403 inline "cic:/CoRN/algebra/COrdFields/fortyeight_ap_zero.con".
410 End infinity_of_cordfields
414 Declare Left Step leEq_wdl.
418 Declare Right Step leEq_wdr.
422 Notation " x [/]OneNZ" := (x[/] One[//]ring_non_triv _) (at level 20).
426 Notation " x [/]TwoNZ" := (x[/] Two[//]two_ap_zero _) (at level 20).
430 Notation " x [/]ThreeNZ" := (x[/] Three[//]three_ap_zero _) (at level 20).
434 Notation " x [/]FourNZ" := (x[/] Four[//]four_ap_zero _) (at level 20).
438 Notation " x [/]SixNZ" := (x[/] Six[//]six_ap_zero _) (at level 20).
442 Notation " x [/]EightNZ" := (x[/] Eight[//]eight_ap_zero _) (at level 20).
446 Notation " x [/]NineNZ" := (x[/] Nine[//]nine_ap_zero _) (at level 20).
450 Notation " x [/]TwelveNZ" := (x[/] Twelve[//]twelve_ap_zero _) (at level 20).
454 Notation " x [/]SixteenNZ" := (x[/] Sixteen[//]sixteen_ap_zero _) (at level 20).
458 Notation " x [/]EighteenNZ" := (x[/] Eighteen[//]eighteen_ap_zero _) (at level 20).
462 Notation " x [/]TwentyFourNZ" := (x[/] TwentyFour[//]twentyfour_ap_zero _) (at level 20).
466 Notation " x [/]FortyEightNZ" := (x[/] FortyEight[//]fortyeight_ap_zero _) (at level 20).
470 Section consequences_of_infinity
474 *** Consequences of infinity
477 alias id "F" = "cic:/CoRN/algebra/COrdFields/consequences_of_infinity/F.var".
479 inline "cic:/CoRN/algebra/COrdFields/square_eq.con".
482 Ordered fields have characteristic zero.
485 inline "cic:/CoRN/algebra/COrdFields/char0_OrdField.con".
488 End consequences_of_infinity
491 (*#**********************************)
494 Section Properties_of_Ordering
497 (*#**********************************)
500 ** Properties of [[<]]
503 alias id "R" = "cic:/CoRN/algebra/COrdFields/Properties_of_Ordering/R.var".
506 We do not use a special predicate for positivity,
507 (e.g.%\% [PosP]), but just write [Zero [<] x].
508 Reasons: it is more natural; in ordinary mathematics we also write [Zero [<] x]
518 *** Addition and subtraction%\label{section:less_plus_minus}%
522 inline "cic:/CoRN/algebra/COrdFields/plus_resp_less_lft.con".
524 inline "cic:/CoRN/algebra/COrdFields/inv_resp_less.con".
527 Transparent cg_minus.
530 inline "cic:/CoRN/algebra/COrdFields/minus_resp_less.con".
533 Transparent cg_minus.
536 inline "cic:/CoRN/algebra/COrdFields/minus_resp_less_rht.con".
538 inline "cic:/CoRN/algebra/COrdFields/plus_resp_less_both.con".
541 For versions of [plus_resp_less_both] where one [ [<] ] in the
542 assumption is replaced by [ [<=] ]%, see
543 Section~\ref{section:leEq-plus-minus}%.
548 inline "cic:/CoRN/algebra/COrdFields/plus_cancel_less.con".
550 inline "cic:/CoRN/algebra/COrdFields/inv_cancel_less.con".
554 Lemmas where an operation is transformed into the inverse operation on
555 the other side of an inequality are called laws for shifting.
556 %\begin{nameconvention}%
557 The names of laws for shifting start with [shift_], and then come
558 the operation and the inequality, in the order in which they occur in the
560 If the shifted operand changes sides w.r.t.%\% the operation and its inverse,
561 the name gets a prime.
562 %\end{nameconvention}%
564 It would be nicer to write the laws for shifting as bi-implications,
565 However, it is impractical to use these in
566 Coq%(see the Coq shortcoming in Section~\ref{section:setoid-basics})%.
569 inline "cic:/CoRN/algebra/COrdFields/shift_less_plus.con".
571 inline "cic:/CoRN/algebra/COrdFields/shift_less_plus'.con".
573 inline "cic:/CoRN/algebra/COrdFields/shift_less_minus.con".
575 inline "cic:/CoRN/algebra/COrdFields/shift_less_minus'.con".
577 inline "cic:/CoRN/algebra/COrdFields/shift_plus_less.con".
579 inline "cic:/CoRN/algebra/COrdFields/shift_plus_less'.con".
581 inline "cic:/CoRN/algebra/COrdFields/shift_minus_less.con".
583 inline "cic:/CoRN/algebra/COrdFields/shift_minus_less'.con".
586 Some special cases of laws for shifting.
589 inline "cic:/CoRN/algebra/COrdFields/shift_zero_less_minus.con".
591 inline "cic:/CoRN/algebra/COrdFields/shift_zero_less_minus'.con".
593 inline "cic:/CoRN/algebra/COrdFields/qltone.con".
600 Section multiplication
604 *** Multiplication and division
605 By Convention%~\ref{convention:div-form}%
606 in CFields% (Section~\ref{section:fields})%, we often have redundant premises
607 in lemmas. E.g.%\% the informal statement
608 ``for all [x,y : R] with [Zero [<] x] and [Zero [<] y]
609 we have [Zero [<] y[/]x]''
610 is formalized as follows.
612 forall (x y : R) x_, (Zero [<] x) -> (Zero [<] y) -> (Zero [<] y[/]x[//]H)
614 We do this to keep it easy to use such lemmas.
618 inline "cic:/CoRN/algebra/COrdFields/mult_resp_less.con".
620 inline "cic:/CoRN/algebra/COrdFields/recip_resp_pos.con".
622 inline "cic:/CoRN/algebra/COrdFields/div_resp_less_rht.con".
624 inline "cic:/CoRN/algebra/COrdFields/div_resp_pos.con".
626 inline "cic:/CoRN/algebra/COrdFields/mult_resp_less_lft.con".
628 inline "cic:/CoRN/algebra/COrdFields/mult_resp_less_both.con".
630 inline "cic:/CoRN/algebra/COrdFields/recip_resp_less.con".
632 inline "cic:/CoRN/algebra/COrdFields/div_resp_less.con".
634 (*#* Cancellation laws
637 inline "cic:/CoRN/algebra/COrdFields/mult_cancel_less.con".
642 %For namegiving, see the Section~\ref{section:less_plus_minus}
646 inline "cic:/CoRN/algebra/COrdFields/shift_div_less.con".
648 inline "cic:/CoRN/algebra/COrdFields/shift_div_less'.con".
650 inline "cic:/CoRN/algebra/COrdFields/shift_less_div.con".
652 inline "cic:/CoRN/algebra/COrdFields/shift_less_mult.con".
654 inline "cic:/CoRN/algebra/COrdFields/shift_less_mult'.con".
656 inline "cic:/CoRN/algebra/COrdFields/shift_mult_less.con".
658 (*#* Other properties of multiplication and division
661 inline "cic:/CoRN/algebra/COrdFields/minusOne_less.con".
663 inline "cic:/CoRN/algebra/COrdFields/swap_div.con".
665 inline "cic:/CoRN/algebra/COrdFields/eps_div_less_eps.con".
667 inline "cic:/CoRN/algebra/COrdFields/pos_div_two.con".
669 inline "cic:/CoRN/algebra/COrdFields/pos_div_two'.con".
672 Apply mult_cancel_less with (Two::R).
674 rstepl eps[+]Zero; rstepr eps[+]eps.
675 Apply plus_resp_less_lft.
680 inline "cic:/CoRN/algebra/COrdFields/pos_div_three.con".
682 inline "cic:/CoRN/algebra/COrdFields/pos_div_three'.con".
684 inline "cic:/CoRN/algebra/COrdFields/pos_div_four.con".
686 inline "cic:/CoRN/algebra/COrdFields/pos_div_four'.con".
688 inline "cic:/CoRN/algebra/COrdFields/pos_div_six.con".
690 inline "cic:/CoRN/algebra/COrdFields/pos_div_eight.con".
692 inline "cic:/CoRN/algebra/COrdFields/pos_div_nine.con".
694 inline "cic:/CoRN/algebra/COrdFields/pos_div_twelve.con".
696 inline "cic:/CoRN/algebra/COrdFields/pos_div_sixteen.con".
698 inline "cic:/CoRN/algebra/COrdFields/pos_div_eighteen.con".
700 inline "cic:/CoRN/algebra/COrdFields/pos_div_twentyfour.con".
702 inline "cic:/CoRN/algebra/COrdFields/pos_div_fortyeight.con".
713 *** Miscellaneous properties
716 inline "cic:/CoRN/algebra/COrdFields/nring_pos.con".
718 inline "cic:/CoRN/algebra/COrdFields/less_nring.con".
720 inline "cic:/CoRN/algebra/COrdFields/pos_nring_fac.con".
722 inline "cic:/CoRN/algebra/COrdFields/Smallest_less_Average.con".
724 inline "cic:/CoRN/algebra/COrdFields/Average_less_Greatest.con".
726 inline "cic:/CoRN/algebra/COrdFields/Sum_resp_less.con".
728 inline "cic:/CoRN/algebra/COrdFields/Sumx_resp_less.con".
730 inline "cic:/CoRN/algebra/COrdFields/positive_Sum_two.con".
732 inline "cic:/CoRN/algebra/COrdFields/positive_Sumx.con".
734 inline "cic:/CoRN/algebra/COrdFields/negative_Sumx.con".
741 End Properties_of_Ordering