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/reals/Q_in_CReals".
19 (* $Id: Q_in_CReals.v,v 1.10 2004/04/23 10:01:05 lcf Exp $ *)
21 (*#* * On density of the image of [Q] in an arbitrary real number structure
22 In this file we introduce the image of the concrete rational numbers
23 (as defined earlier) in an arbitrary structure of type
24 [CReals]. At the end of this file we assign to any real number two
25 rational numbers for which the real number lies betwen image of them;
26 in other words we will prove that the image of rational numbers in
27 dense in any real number structure. *)
42 Section Rational_sequence_prelogue.
46 %\begin{convention}% Let [R1] be a real number structure.
50 inline cic:/CoRN/reals/Q_in_CReals/R1.var.
52 (* We clone these proofs from CReals1.v just because there IR is an axiom *)
56 inline cic:/CoRN/reals/Q_in_CReals/CReals_is_CReals.con.
58 inline cic:/CoRN/reals/Q_in_CReals/Lim_Cauchy.con.
60 inline cic:/CoRN/reals/Q_in_CReals/Archimedes.con.
62 inline cic:/CoRN/reals/Q_in_CReals/Archimedes'.con.
64 (*#**************************************)
69 ** Injection from [Q] to an arbitrary real number structure
70 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].
72 To define the injection we need one elemntary lemma about the denominator:
75 inline cic:/CoRN/reals/Q_in_CReals/den_is_nonzero.con.
77 (*#* 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]. *)
79 inline cic:/CoRN/reals/Q_in_CReals/inj_Q.con.
81 (*#* Next we need some properties of [nring], on the setoid of natural numbers: *)
83 inline cic:/CoRN/reals/Q_in_CReals/nring_strext.con.
85 inline cic:/CoRN/reals/Q_in_CReals/nring_wd.con.
87 inline cic:/CoRN/reals/Q_in_CReals/nring_eq.con.
89 inline cic:/CoRN/reals/Q_in_CReals/nring_leEq.con.
94 Unset Printing Coercions.
99 (*#* Similarly we prove some properties of [zring] on the ring of integers: *)
101 inline cic:/CoRN/reals/Q_in_CReals/zring_strext.con.
103 inline cic:/CoRN/reals/Q_in_CReals/zring_wd.con.
105 inline cic:/CoRN/reals/Q_in_CReals/zring_less.con.
107 (*#* 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. *)
109 inline cic:/CoRN/reals/Q_in_CReals/inj_Q_strext.con.
111 inline cic:/CoRN/reals/Q_in_CReals/inj_Q_wd.con.
113 inline cic:/CoRN/reals/Q_in_CReals/inj_Q_plus.con.
115 inline cic:/CoRN/reals/Q_in_CReals/inj_Q_mult.con.
117 inline cic:/CoRN/reals/Q_in_CReals/inj_Q_less.con.
119 inline cic:/CoRN/reals/Q_in_CReals/less_inj_Q.con.
121 inline cic:/CoRN/reals/Q_in_CReals/leEq_inj_Q.con.
123 inline cic:/CoRN/reals/Q_in_CReals/inj_Q_leEq.con.
125 inline cic:/CoRN/reals/Q_in_CReals/inj_Q_min.con.
127 inline cic:/CoRN/reals/Q_in_CReals/inj_Q_minus.con.
129 (*#* Moreover, and as expected, the [AbsSmall] predicate is also
130 preserved under the [inj_Q] *)
132 inline cic:/CoRN/reals/Q_in_CReals/inj_Q_AbsSmall.con.
134 inline cic:/CoRN/reals/Q_in_CReals/AbsSmall_inj_Q.con.
136 (*#* ** Injection preserves Cauchy property
137 We apply the above lemmata to obtain following theorem, which says
138 that a Cauchy sequence of elemnts of [Q] will be Cauchy in [R1].
141 inline cic:/CoRN/reals/Q_in_CReals/inj_Q_Cauchy.con.
143 (*#* Furthermore we prove that applying [nring] (which is adding the
144 ring unit [n] times) is the same whether we do it in [Q] or in [R1]:
147 inline cic:/CoRN/reals/Q_in_CReals/inj_Q_nring.con.
149 (*#* ** Injection of [Q] is dense
150 Finally we are able to prove the density of image of [Q] in [R1]. We
151 state this fact in two different ways. Both of them have their
154 The first theorem states the fact that any real number can be bound by
155 the image of two rational numbers. This is called [start_of_sequence]
156 because it can be used as an starting point for the typical "interval
157 trisection" argument, which is ubiquitous in constructive analysis.
160 inline cic:/CoRN/reals/Q_in_CReals/start_of_sequence.con.
162 (*#* The second version of the density of [Q] in [R1] states that given
163 any positive real number, there is a rational number between it and
164 zero. This lemma can be used to prove the more general fact that there
165 is a rational number between any two real numbers. *)
167 inline cic:/CoRN/reals/Q_in_CReals/Q_dense_in_CReals.con.
170 End Rational_sequence_prelogue.