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/ftc/MoreIntervals".
21 (* $Id: MoreIntervals.v,v 1.6 2004/04/23 10:00:59 lcf Exp $ *)
23 include "ftc/NthDerivative.ma".
33 (*#* printing realline %\ensuremath{\RR}% #(-∞,+∞)# *)
35 (*#* printing openl %\ensuremath{(\cdot,+\infty)}% #(⋅,+∞)# *)
37 (*#* printing openr %\ensuremath{(-\infty,\cdot)}% #(-∞,⋅)# *)
39 (*#* printing closel %\ensuremath{[\cdot,+\infty)}% #[⋅,+∞)# *)
41 (*#* printing closer %\ensuremath{(-\infty,\cdot]}% #(-∞,⋅]# *)
43 (*#* printing olor %\ensuremath{(\cdot,\cdot)}% #(⋅,⋅)# *)
45 (*#* printing clor %\ensuremath{[\cdot,\cdot)}% #[⋅,⋅)# *)
47 (*#* printing olcr %\ensuremath{(\cdot,\cdot]}% #(⋅,⋅]# *)
49 (*#* printing clcr %\ensuremath{[\cdot,\cdot]}% #[⋅,⋅]# *)
51 (*#* *Generalized Intervals
53 At this stage we have enough material to begin generalizing our
54 concepts in preparation for the fundamental theorem of calculus and
55 the definition of the main (non-polynomial) functions of analysis.
57 In order to define functions via power series (or any other kind of
58 series) we need to formalize a notion of convergence more general than
59 the one we already have on compact intervals. This is necessary for
60 practical reasons: we want to define a single exponential function
61 with domain [IR], not several exponential functions defined on compact
62 intervals which we prove to be the same wherever their domains
63 overlap. In a similar way, we want to define indefinite integrals on
64 infinite domains and not only on compact intervals.
66 Unfortunately, proceeding in a way analogous to how we defined the
67 concept of global continuity will lead us nowhere; the concept turns
68 out to be to general, and the behaviour on too small domains
69 (typically intervals [[a,a']] where [a [=] a'] is neither
70 provably true nor provably false) will be unsatisfactory.
72 There is a special family of sets, however, where this problems can be
73 avoided: intervals. Intervals have some nice properties that allow us
74 to prove good results, namely the facts that if [a] and [b] are
75 elements of an interval [I] then so are [Min(a,b)] and
76 [Max(a,b)] (which is in general not true) and also the
77 compact interval [[a,b]] is included in [I]. Furthermore, all
78 intervals are characterized by simple, well defined predicates, and
79 the nonempty and proper concepts become very easy to define.
81 **Definitions and Basic Results
83 We define an inductive type of intervals with nine constructors,
84 corresponding to the nine basic types of intervals. The reason why so
85 many constructors are needed is that we do not have a notion of real
86 line, for many reasons which we will not discuss here. Also it seems
87 simple to directly define finite intervals than to define then later
88 as intersections of infinite intervals, as it would only mess things
91 The compact interval which we will define here is obviously the same
92 that we have been working with all the way through; why, then, the
93 different formulation? The reason is simple: if we had worked with
94 intervals from the beginning we would have had case definitions at
95 every spot, and our lemmas and proofs would have been very awkward.
96 Also, it seems more natural to characterize a compact interval by two
97 real numbers (and a proof) than as a particular case of a more general
98 concept which doesn't have an intuitive interpretation. Finally, the
99 definitions we will make here will have the elegant consequence that
100 from this point on we can work with any kind of intervals in exactly
104 inline "cic:/CoRN/ftc/MoreIntervals/interval.ind".
107 To each interval a predicate (set) is assigned by the following map:
110 inline "cic:/CoRN/ftc/MoreIntervals/iprop.con".
114 coercion cic:/matita/CoRN-Decl/ftc/MoreIntervals/iprop.con 0 (* compounds *).
119 This map is made into a coercion, so that intervals
120 %\emph{%#<i>#are%}%#</i># really subsets of reals.
122 We now define what it means for an interval to be nonvoid, proper,
123 finite and compact in the obvious way.
126 inline "cic:/CoRN/ftc/MoreIntervals/nonvoid.con".
128 inline "cic:/CoRN/ftc/MoreIntervals/proper.con".
130 inline "cic:/CoRN/ftc/MoreIntervals/finite.con".
132 inline "cic:/CoRN/ftc/MoreIntervals/compact_.con".
134 (*#* Finite intervals have a left end and a right end. *)
136 inline "cic:/CoRN/ftc/MoreIntervals/left_end.con".
138 inline "cic:/CoRN/ftc/MoreIntervals/right_end.con".
141 Some trivia: compact intervals are finite; proper intervals are nonvoid; an interval is nonvoid iff it contains some point.
144 inline "cic:/CoRN/ftc/MoreIntervals/compact_finite.con".
146 inline "cic:/CoRN/ftc/MoreIntervals/proper_nonvoid.con".
148 inline "cic:/CoRN/ftc/MoreIntervals/nonvoid_point.con".
150 inline "cic:/CoRN/ftc/MoreIntervals/nonvoid_char.con".
153 For practical reasons it helps to define left end and right end of compact intervals.
156 inline "cic:/CoRN/ftc/MoreIntervals/Lend.con".
158 inline "cic:/CoRN/ftc/MoreIntervals/Rend.con".
160 (*#* In a compact interval, the left end is always less than or equal
164 inline "cic:/CoRN/ftc/MoreIntervals/Lend_leEq_Rend.con".
167 Some nice characterizations of inclusion:
170 inline "cic:/CoRN/ftc/MoreIntervals/compact_included.con".
172 inline "cic:/CoRN/ftc/MoreIntervals/included_interval'.con".
174 inline "cic:/CoRN/ftc/MoreIntervals/included_interval.con".
177 A weirder inclusion result.
180 inline "cic:/CoRN/ftc/MoreIntervals/included3_interval.con".
183 Finally, all intervals are characterized by well defined predicates.
186 inline "cic:/CoRN/ftc/MoreIntervals/iprop_wd.con".
193 Implicit Arguments Lend [I].
197 Implicit Arguments Rend [I].
201 Section Compact_Constructions
205 Section Single_Compact_Interval
208 (*#* **Constructions with Compact Intervals
210 Several important constructions are now discussed.
212 We begin by defining the compact interval [[x,x]].
214 %\begin{convention}% Let [P:IR->CProp] be well defined, and [x:IR]
215 such that [P(x)] holds.
219 alias id "P" = "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Single_Compact_Interval/P.var".
221 alias id "wdP" = "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Single_Compact_Interval/wdP.var".
223 alias id "x" = "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Single_Compact_Interval/x.var".
225 alias id "Hx" = "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Single_Compact_Interval/Hx.var".
227 inline "cic:/CoRN/ftc/MoreIntervals/compact_single.con".
230 This interval contains [x] and only (elements equal to) [x]; furthermore, for every (well-defined) [P], if $x\in P$#x∈P# then $[x,x]\subseteq P$#[x,x]⊆P#.
233 inline "cic:/CoRN/ftc/MoreIntervals/compact_single_prop.con".
235 inline "cic:/CoRN/ftc/MoreIntervals/compact_single_pt.con".
237 inline "cic:/CoRN/ftc/MoreIntervals/compact_single_inc.con".
240 End Single_Compact_Interval
244 The special case of intervals is worth singling out, as one of the hypothesis becomes a theorem.
247 inline "cic:/CoRN/ftc/MoreIntervals/compact_single_iprop.con".
250 Now for more interesting and important results.
252 Let [I] be a proper interval and [x] be a point of [I]. Then there is
253 a proper compact interval [[a,b]] such that $x\in[a,b]\subseteq
254 I$#x∈[a,b]⊆I#.
258 Section Proper_Compact_with_One_or_Two_Points
263 inline "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Proper_Compact_with_One_or_Two_Points/cip1'.con" "Compact_Constructions__Proper_Compact_with_One_or_Two_Points__".
265 inline "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Proper_Compact_with_One_or_Two_Points/cip1''.con" "Compact_Constructions__Proper_Compact_with_One_or_Two_Points__".
267 inline "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Proper_Compact_with_One_or_Two_Points/cip1'''.con" "Compact_Constructions__Proper_Compact_with_One_or_Two_Points__".
269 inline "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Proper_Compact_with_One_or_Two_Points/cip1''''.con" "Compact_Constructions__Proper_Compact_with_One_or_Two_Points__".
271 inline "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Proper_Compact_with_One_or_Two_Points/cip2.con" "Compact_Constructions__Proper_Compact_with_One_or_Two_Points__".
273 inline "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Proper_Compact_with_One_or_Two_Points/cip2'.con" "Compact_Constructions__Proper_Compact_with_One_or_Two_Points__".
275 inline "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Proper_Compact_with_One_or_Two_Points/cip2''.con" "Compact_Constructions__Proper_Compact_with_One_or_Two_Points__".
277 inline "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Proper_Compact_with_One_or_Two_Points/cip2'''.con" "Compact_Constructions__Proper_Compact_with_One_or_Two_Points__".
279 inline "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Proper_Compact_with_One_or_Two_Points/cip3.con" "Compact_Constructions__Proper_Compact_with_One_or_Two_Points__".
281 inline "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Proper_Compact_with_One_or_Two_Points/cip3'.con" "Compact_Constructions__Proper_Compact_with_One_or_Two_Points__".
283 inline "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Proper_Compact_with_One_or_Two_Points/cip3''.con" "Compact_Constructions__Proper_Compact_with_One_or_Two_Points__".
285 inline "cic:/CoRN/ftc/MoreIntervals/Compact_Constructions/Proper_Compact_with_One_or_Two_Points/cip3'''.con" "Compact_Constructions__Proper_Compact_with_One_or_Two_Points__".
289 inline "cic:/CoRN/ftc/MoreIntervals/compact_in_interval.con".
291 inline "cic:/CoRN/ftc/MoreIntervals/compact_compact_in_interval.con".
293 inline "cic:/CoRN/ftc/MoreIntervals/proper_compact_in_interval.con".
295 inline "cic:/CoRN/ftc/MoreIntervals/proper_compact_in_interval'.con".
297 inline "cic:/CoRN/ftc/MoreIntervals/included_compact_in_interval.con".
299 inline "cic:/CoRN/ftc/MoreIntervals/iprop_compact_in_interval.con".
301 inline "cic:/CoRN/ftc/MoreIntervals/iprop_compact_in_interval'.con".
303 inline "cic:/CoRN/ftc/MoreIntervals/iprop_compact_in_interval_inc1.con".
305 inline "cic:/CoRN/ftc/MoreIntervals/iprop_compact_in_interval_inc2.con".
308 If [x [=] y] then the construction yields the same interval whether we
309 use [x] or [y] in its definition. This property is required at some
310 stage, which is why we formalized this result as a functional
311 definition rather than as an existential formula.
314 inline "cic:/CoRN/ftc/MoreIntervals/compact_in_interval_wd1.con".
316 inline "cic:/CoRN/ftc/MoreIntervals/compact_in_interval_wd2.con".
319 We can make an analogous construction for two points.
322 inline "cic:/CoRN/ftc/MoreIntervals/compact_in_interval2.con".
324 inline "cic:/CoRN/ftc/MoreIntervals/compact_compact_in_interval2.con".
326 inline "cic:/CoRN/ftc/MoreIntervals/proper_compact_in_interval2.con".
328 inline "cic:/CoRN/ftc/MoreIntervals/proper_compact_in_interval2'.con".
330 inline "cic:/CoRN/ftc/MoreIntervals/included_compact_in_interval2.con".
332 inline "cic:/CoRN/ftc/MoreIntervals/iprop_compact_in_interval2x.con".
334 inline "cic:/CoRN/ftc/MoreIntervals/iprop_compact_in_interval2y.con".
336 inline "cic:/CoRN/ftc/MoreIntervals/iprop_compact_in_interval2x'.con".
338 inline "cic:/CoRN/ftc/MoreIntervals/iprop_compact_in_interval2y'.con".
340 inline "cic:/CoRN/ftc/MoreIntervals/iprop_compact_in_interval2_inc1.con".
342 inline "cic:/CoRN/ftc/MoreIntervals/iprop_compact_in_interval2_inc2.con".
344 inline "cic:/CoRN/ftc/MoreIntervals/compact_in_interval_x_lft.con".
346 inline "cic:/CoRN/ftc/MoreIntervals/compact_in_interval_y_lft.con".
348 inline "cic:/CoRN/ftc/MoreIntervals/compact_in_interval_x_rht.con".
350 inline "cic:/CoRN/ftc/MoreIntervals/compact_in_interval_y_rht.con".
353 End Proper_Compact_with_One_or_Two_Points
357 Compact intervals are exactly compact intervals(!).
360 inline "cic:/CoRN/ftc/MoreIntervals/interval_compact_inc.con".
362 inline "cic:/CoRN/ftc/MoreIntervals/compact_interval_inc.con".
365 A generalization of the previous results: if $[a,b]\subseteq J$#[a,b]⊆J#
366 and [J] is proper, then we can find a proper interval [[a',b']] such that
367 $[a,b]\subseteq[a',b']\subseteq J$#[a,b]⊆[a',b']⊆J#.
370 inline "cic:/CoRN/ftc/MoreIntervals/compact_proper_in_interval.con".
373 End Compact_Constructions
380 (*#* **Properties of Functions in Intervals
382 We now define notions of continuity, differentiability and so on on
383 arbitrary intervals. As expected, a function [F] has property [P] in
384 the (proper) interval [I] iff it has property [P] in every compact
385 interval included in [I]. We can formalize this in a nice way using
386 previously defined concepts.
388 %\begin{convention}% Let [n:nat] and [I:interval].
392 alias id "n" = "cic:/CoRN/ftc/MoreIntervals/Functions/n.var".
394 alias id "I" = "cic:/CoRN/ftc/MoreIntervals/Functions/I.var".
396 inline "cic:/CoRN/ftc/MoreIntervals/Continuous.con".
398 inline "cic:/CoRN/ftc/MoreIntervals/Derivative.con".
400 inline "cic:/CoRN/ftc/MoreIntervals/Diffble.con".
402 inline "cic:/CoRN/ftc/MoreIntervals/Derivative_n.con".
404 inline "cic:/CoRN/ftc/MoreIntervals/Diffble_n.con".
411 Section Reflexivity_Properties
415 In the case of compact intervals, this definitions collapse to the old ones.
418 inline "cic:/CoRN/ftc/MoreIntervals/Continuous_Int.con".
420 inline "cic:/CoRN/ftc/MoreIntervals/Int_Continuous.con".
422 inline "cic:/CoRN/ftc/MoreIntervals/Derivative_Int.con".
424 inline "cic:/CoRN/ftc/MoreIntervals/Int_Derivative.con".
426 inline "cic:/CoRN/ftc/MoreIntervals/Diffble_Int.con".
428 inline "cic:/CoRN/ftc/MoreIntervals/Int_Diffble.con".
431 End Reflexivity_Properties
439 Interestingly, inclusion and equality in an interval are also characterizable in a similar way:
442 inline "cic:/CoRN/ftc/MoreIntervals/included_imp_inc.con".
444 inline "cic:/CoRN/ftc/MoreIntervals/included_Feq''.con".
446 inline "cic:/CoRN/ftc/MoreIntervals/included_Feq'.con".
453 Hint Resolve included_interval included_interval' included3_interval
454 compact_single_inc compact_single_iprop included_compact_in_interval
455 iprop_compact_in_interval_inc1 iprop_compact_in_interval_inc2
456 included_compact_in_interval2 iprop_compact_in_interval2_inc1
457 iprop_compact_in_interval2_inc2 interval_compact_inc compact_interval_inc