]> matita.cs.unibo.it Git - helm.git/blob - matita/contribs/CoRN-Decl/reals/Q_in_CReals.ma
tagged 0.5.0-rc1
[helm.git] / matita / contribs / CoRN-Decl / reals / Q_in_CReals.ma
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 set "baseuri" "cic:/matita/CoRN-Decl/reals/Q_in_CReals".
18
19 include "CoRN.ma".
20
21 (* $Id: Q_in_CReals.v,v 1.10 2004/04/23 10:01:05 lcf Exp $ *)
22
23 (*#* * On density of the image of [Q] in an arbitrary real number structure
24 In this file we introduce the image of the concrete rational numbers
25 (as defined earlier) in an arbitrary structure of type
26 [CReals]. At the end of this file we assign to any real number two
27 rational numbers for which the real number lies betwen image of them;
28 in other words we will prove that the image of rational numbers in
29 dense in any real number structure. *)
30
31 include "model/reals/Cauchy_IR.ma".
32
33 include "model/monoids/Nmonoid.ma".
34
35 include "model/rings/Zring.ma".
36
37 (* UNEXPORTED
38 Section Rational_sequence_prelogue
39 *)
40
41 (*#*
42 %\begin{convention}% Let [R1] be a real number structure.
43 %\end{convention}%
44 *)
45
46 alias id "R1" = "cic:/CoRN/reals/Q_in_CReals/Rational_sequence_prelogue/R1.var".
47
48 (* We clone these proofs from CReals1.v just because there IR is an axiom *)
49
50 (* begin hide *)
51
52 inline "cic:/CoRN/reals/Q_in_CReals/CReals_is_CReals.con".
53
54 inline "cic:/CoRN/reals/Q_in_CReals/Lim_Cauchy.con".
55
56 inline "cic:/CoRN/reals/Q_in_CReals/Archimedes.con".
57
58 inline "cic:/CoRN/reals/Q_in_CReals/Archimedes'.con".
59
60 (*#**************************************)
61
62 coercion cic:/Coq/NArith/BinPos/nat_of_P.con 0 (* compounds *).
63
64 (* end hide *)
65
66 (*#*
67 ** Injection from [Q] to an arbitrary real number structure
68  First we need to define the injection from [Q] to [R1]. Note that in [Cauchy_CReals] we defined [inject_Q] from an arbitray field [F] to [(R_COrdField F)] which was the set of Cauchy sequences of that field. But since [R1] is an %\emph{arbitrary}%#<i>arbitrary</i># real number structure we can not use [inject_Q].
69
70  To define the injection we need one elemntary lemma about the denominator:
71 *)
72
73 inline "cic:/CoRN/reals/Q_in_CReals/den_is_nonzero.con".
74
75 (*#* And we define the injection in the natural way, using [zring] and [nring]. We call this [inj_Q], in contrast with [inject_Q] defined in [Cauchy_CReals]. *)
76
77 inline "cic:/CoRN/reals/Q_in_CReals/inj_Q.con".
78
79 (*#* Next we need some properties of [nring], on the setoid of natural numbers: *)
80
81 inline "cic:/CoRN/reals/Q_in_CReals/nring_strext.con".
82
83 inline "cic:/CoRN/reals/Q_in_CReals/nring_wd.con".
84
85 inline "cic:/CoRN/reals/Q_in_CReals/nring_eq.con".
86
87 inline "cic:/CoRN/reals/Q_in_CReals/nring_leEq.con".
88
89 (* begin hide *)
90
91 (* UNEXPORTED
92 Unset Printing Coercions.
93 *)
94
95 (* end hide *)
96
97 (*#* Similarly we prove some properties of [zring] on the ring of integers: *)
98
99 inline "cic:/CoRN/reals/Q_in_CReals/zring_strext.con".
100
101 inline "cic:/CoRN/reals/Q_in_CReals/zring_wd.con".
102
103 inline "cic:/CoRN/reals/Q_in_CReals/zring_less.con".
104
105 (*#* Using the above lemmata we prove the basic properties of [inj_Q], i.e.%\% it is a setoid function and preserves the ring operations and oreder operation. *)
106
107 inline "cic:/CoRN/reals/Q_in_CReals/inj_Q_strext.con".
108
109 inline "cic:/CoRN/reals/Q_in_CReals/inj_Q_wd.con".
110
111 inline "cic:/CoRN/reals/Q_in_CReals/inj_Q_plus.con".
112
113 inline "cic:/CoRN/reals/Q_in_CReals/inj_Q_mult.con".
114
115 inline "cic:/CoRN/reals/Q_in_CReals/inj_Q_less.con".
116
117 inline "cic:/CoRN/reals/Q_in_CReals/less_inj_Q.con".
118
119 inline "cic:/CoRN/reals/Q_in_CReals/leEq_inj_Q.con".
120
121 inline "cic:/CoRN/reals/Q_in_CReals/inj_Q_leEq.con".
122
123 inline "cic:/CoRN/reals/Q_in_CReals/inj_Q_min.con".
124
125 inline "cic:/CoRN/reals/Q_in_CReals/inj_Q_minus.con".
126
127 (*#* Moreover, and as expected, the [AbsSmall] predicate is also
128 preserved under the [inj_Q] *)
129
130 inline "cic:/CoRN/reals/Q_in_CReals/inj_Q_AbsSmall.con".
131
132 inline "cic:/CoRN/reals/Q_in_CReals/AbsSmall_inj_Q.con".
133
134 (*#* ** Injection preserves Cauchy property
135 We apply the above lemmata to obtain following theorem, which says
136 that a Cauchy sequence of elemnts of [Q] will be Cauchy in [R1].
137 *)
138
139 inline "cic:/CoRN/reals/Q_in_CReals/inj_Q_Cauchy.con".
140
141 (*#* Furthermore we prove that applying [nring] (which is adding the
142 ring unit [n] times) is the same whether we do it in [Q] or in [R1]:
143 *)
144
145 inline "cic:/CoRN/reals/Q_in_CReals/inj_Q_nring.con".
146
147 (*#* ** Injection of [Q] is dense
148 Finally we are able to prove the density of image of [Q] in [R1]. We
149 state this fact in two different ways. Both of them have their
150 specific use.
151
152 The first theorem states the fact that any real number can be bound by
153 the image of two rational numbers. This is called [start_of_sequence]
154 because it can be used as an starting point for the typical "interval
155 trisection" argument, which is ubiquitous in constructive analysis.
156 *)
157
158 inline "cic:/CoRN/reals/Q_in_CReals/start_of_sequence.con".
159
160 (*#* The second version of the density of [Q] in [R1] states that given
161 any positive real number, there is a rational number between it and
162 zero. This lemma can be used to prove the more general fact that there
163 is a rational number between any two real numbers. *)
164
165 inline "cic:/CoRN/reals/Q_in_CReals/Q_dense_in_CReals.con".
166
167 (* UNEXPORTED
168 End Rational_sequence_prelogue
169 *)
170