author | huffman |
Tue, 19 Sep 2006 06:22:26 +0200 | |
changeset 20584 | 60b1d52a455d |
parent 20563 | 44eda2314aab |
child 20633 | e98f59806244 |
permissions | -rw-r--r-- |
10751 | 1 |
(* Title : NSA.thy |
2 |
Author : Jacques D. Fleuriot |
|
3 |
Copyright : 1998 University of Cambridge |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
4 |
|
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
5 |
Converted to Isar and polished by lcp |
14370 | 6 |
*) |
10751 | 7 |
|
14370 | 8 |
header{*Infinite Numbers, Infinitesimals, Infinitely Close Relation*} |
9 |
||
15131 | 10 |
theory NSA |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
11 |
imports HyperArith "../Real/RComplete" |
15131 | 12 |
begin |
10751 | 13 |
|
19765 | 14 |
definition |
10751 | 15 |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
16 |
hnorm :: "'a::norm star \<Rightarrow> real star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
17 |
"hnorm = *f* norm" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
18 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
19 |
Infinitesimal :: "('a::real_normed_vector) star set" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
20 |
"Infinitesimal = {x. \<forall>r \<in> Reals. 0 < r --> hnorm x < r}" |
10751 | 21 |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
22 |
HFinite :: "('a::real_normed_vector) star set" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
23 |
"HFinite = {x. \<exists>r \<in> Reals. hnorm x < r}" |
10751 | 24 |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
25 |
HInfinite :: "('a::real_normed_vector) star set" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
26 |
"HInfinite = {x. \<forall>r \<in> Reals. r < hnorm x}" |
10751 | 27 |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
28 |
approx :: "['a::real_normed_vector star, 'a star] => bool" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
29 |
(infixl "@=" 50) |
15229 | 30 |
--{*the `infinitely close' relation*} |
20563 | 31 |
"(x @= y) = ((x - y) \<in> Infinitesimal)" |
14653 | 32 |
|
14370 | 33 |
st :: "hypreal => hypreal" |
15229 | 34 |
--{*the standard part of a hyperreal*} |
19765 | 35 |
"st = (%x. @r. x \<in> HFinite & r \<in> Reals & r @= x)" |
10751 | 36 |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
37 |
monad :: "'a::real_normed_vector star => 'a star set" |
19765 | 38 |
"monad x = {y. x @= y}" |
10751 | 39 |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
40 |
galaxy :: "'a::real_normed_vector star => 'a star set" |
19765 | 41 |
"galaxy x = {y. (x + -y) \<in> HFinite}" |
42 |
||
43 |
const_syntax (xsymbols) |
|
44 |
approx (infixl "\<approx>" 50) |
|
45 |
||
46 |
const_syntax (HTML output) |
|
47 |
approx (infixl "\<approx>" 50) |
|
14370 | 48 |
|
49 |
||
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20552
diff
changeset
|
50 |
lemma hypreal_of_real_of_real_eq: "hypreal_of_real r = of_real r" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20552
diff
changeset
|
51 |
proof - |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20552
diff
changeset
|
52 |
have "hypreal_of_real r = hypreal_of_real (of_real r)" by simp |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20552
diff
changeset
|
53 |
also have "\<dots> = of_real r" by (rule star_of_of_real) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20552
diff
changeset
|
54 |
finally show ?thesis . |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20552
diff
changeset
|
55 |
qed |
14565 | 56 |
|
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20552
diff
changeset
|
57 |
lemma SReal_def: "Reals == {x. \<exists>r. x = hypreal_of_real r}" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20552
diff
changeset
|
58 |
by (simp add: Reals_def image_def hypreal_of_real_of_real_eq) |
14370 | 59 |
|
60 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
61 |
subsection{*Nonstandard extension of the norm function*} |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
62 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
63 |
declare hnorm_def [transfer_unfold] |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
64 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
65 |
lemma hnorm_ge_zero [simp]: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
66 |
"\<And>x::'a::real_normed_vector star. 0 \<le> hnorm x" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
67 |
by transfer (rule norm_ge_zero) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
68 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
69 |
lemma hnorm_eq_zero [simp]: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
70 |
"\<And>x::'a::real_normed_vector star. (hnorm x = 0) = (x = 0)" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
71 |
by transfer (rule norm_eq_zero) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
72 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
73 |
lemma hnorm_triangle_ineq: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
74 |
"\<And>x y::'a::real_normed_vector star. hnorm (x + y) \<le> hnorm x + hnorm y" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
75 |
by transfer (rule norm_triangle_ineq) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
76 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
77 |
lemma hnorm_scaleR: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
78 |
"\<And>a (x::'a::real_normed_vector star). |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
79 |
hnorm (( *f2* scaleR) a x) = \<bar>a\<bar> * hnorm x" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
80 |
by transfer (rule norm_scaleR) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
81 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
82 |
lemma hnorm_mult_ineq: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
83 |
"\<And>x y::'a::real_normed_algebra star. hnorm (x * y) \<le> hnorm x * hnorm y" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
84 |
by transfer (rule norm_mult_ineq) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
85 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
86 |
lemma hnorm_mult: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
87 |
"\<And>x y::'a::real_normed_div_algebra star. hnorm (x * y) = hnorm x * hnorm y" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
88 |
by transfer (rule norm_mult) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
89 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
90 |
lemma hnorm_one [simp]: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
91 |
"hnorm (1\<Colon>'a::real_normed_div_algebra star) = 1" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
92 |
by transfer (rule norm_one) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
93 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
94 |
lemma hnorm_zero [simp]: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
95 |
"hnorm (0\<Colon>'a::real_normed_vector star) = 0" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
96 |
by transfer (rule norm_zero) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
97 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
98 |
lemma zero_less_hnorm_iff [simp]: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
99 |
"\<And>x::'a::real_normed_vector star. (0 < hnorm x) = (x \<noteq> 0)" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
100 |
by transfer (rule zero_less_norm_iff) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
101 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
102 |
lemma hnorm_minus_cancel [simp]: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
103 |
"\<And>x::'a::real_normed_vector star. hnorm (- x) = hnorm x" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
104 |
by transfer (rule norm_minus_cancel) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
105 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
106 |
lemma hnorm_minus_commute: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
107 |
"\<And>a b::'a::real_normed_vector star. hnorm (a - b) = hnorm (b - a)" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
108 |
by transfer (rule norm_minus_commute) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
109 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
110 |
lemma hnorm_triangle_ineq2: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
111 |
"\<And>a b::'a::real_normed_vector star. hnorm a - hnorm b \<le> hnorm (a - b)" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
112 |
by transfer (rule norm_triangle_ineq2) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
113 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
114 |
lemma hnorm_triangle_ineq4: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
115 |
"\<And>a b::'a::real_normed_vector star. hnorm (a - b) \<le> hnorm a + hnorm b" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
116 |
by transfer (rule norm_triangle_ineq4) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
117 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
118 |
lemma nonzero_hnorm_inverse: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
119 |
"\<And>a::'a::real_normed_div_algebra star. |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
120 |
a \<noteq> 0 \<Longrightarrow> hnorm (inverse a) = inverse (hnorm a)" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
121 |
by transfer (rule nonzero_norm_inverse) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
122 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
123 |
lemma hnorm_inverse: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
124 |
"\<And>a::'a::{real_normed_div_algebra,division_by_zero} star. |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
125 |
hnorm (inverse a) = inverse (hnorm a)" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
126 |
by transfer (rule norm_inverse) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
127 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
128 |
lemma hypreal_hnorm_def [simp]: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
129 |
"\<And>r::hypreal. hnorm r \<equiv> \<bar>r\<bar>" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
130 |
by transfer (rule real_norm_def) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
131 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
132 |
lemma hnorm_add_less: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
133 |
fixes x y :: "'a::real_normed_vector star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
134 |
shows "\<lbrakk>hnorm x < r; hnorm y < s\<rbrakk> \<Longrightarrow> hnorm (x + y) < r + s" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
135 |
by (rule order_le_less_trans [OF hnorm_triangle_ineq add_strict_mono]) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
136 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
137 |
lemma hnorm_mult_less: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
138 |
fixes x y :: "'a::real_normed_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
139 |
shows "\<lbrakk>hnorm x < r; hnorm y < s\<rbrakk> \<Longrightarrow> hnorm (x * y) < r * s" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
140 |
apply (rule order_le_less_trans [OF hnorm_mult_ineq]) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
141 |
apply (simp add: mult_strict_mono') |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
142 |
done |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
143 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
144 |
|
15229 | 145 |
subsection{*Closure Laws for the Standard Reals*} |
14370 | 146 |
|
14378
69c4d5997669
generic of_nat and of_int functions, and generalization of iszero
paulson
parents:
14371
diff
changeset
|
147 |
lemma SReal_add [simp]: |
69c4d5997669
generic of_nat and of_int functions, and generalization of iszero
paulson
parents:
14371
diff
changeset
|
148 |
"[| (x::hypreal) \<in> Reals; y \<in> Reals |] ==> x + y \<in> Reals" |
14370 | 149 |
apply (auto simp add: SReal_def) |
150 |
apply (rule_tac x = "r + ra" in exI, simp) |
|
151 |
done |
|
152 |
||
20563 | 153 |
lemma SReal_diff [simp]: |
154 |
"[| (x::hypreal) \<in> Reals; y \<in> Reals |] ==> x - y \<in> Reals" |
|
155 |
apply (auto simp add: SReal_def) |
|
156 |
apply (rule_tac x = "r - ra" in exI, simp) |
|
157 |
done |
|
158 |
||
14370 | 159 |
lemma SReal_mult: "[| (x::hypreal) \<in> Reals; y \<in> Reals |] ==> x * y \<in> Reals" |
160 |
apply (simp add: SReal_def, safe) |
|
161 |
apply (rule_tac x = "r * ra" in exI) |
|
15539 | 162 |
apply (simp (no_asm)) |
14370 | 163 |
done |
164 |
||
165 |
lemma SReal_inverse: "(x::hypreal) \<in> Reals ==> inverse x \<in> Reals" |
|
166 |
apply (simp add: SReal_def) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
167 |
apply (blast intro: star_of_inverse [symmetric]) |
14370 | 168 |
done |
169 |
||
170 |
lemma SReal_divide: "[| (x::hypreal) \<in> Reals; y \<in> Reals |] ==> x/y \<in> Reals" |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
171 |
by (simp (no_asm_simp) add: SReal_mult SReal_inverse divide_inverse) |
14370 | 172 |
|
173 |
lemma SReal_minus: "(x::hypreal) \<in> Reals ==> -x \<in> Reals" |
|
174 |
apply (simp add: SReal_def) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
175 |
apply (blast intro: star_of_minus [symmetric]) |
14370 | 176 |
done |
177 |
||
15229 | 178 |
lemma SReal_minus_iff [simp]: "(-x \<in> Reals) = ((x::hypreal) \<in> Reals)" |
14370 | 179 |
apply auto |
180 |
apply (drule SReal_minus, auto) |
|
181 |
done |
|
182 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
183 |
lemma SReal_add_cancel: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
184 |
"[| (x::hypreal) + y \<in> Reals; y \<in> Reals |] ==> x \<in> Reals" |
14370 | 185 |
apply (drule_tac x = y in SReal_minus) |
186 |
apply (drule SReal_add, assumption, auto) |
|
187 |
done |
|
188 |
||
189 |
lemma SReal_hrabs: "(x::hypreal) \<in> Reals ==> abs x \<in> Reals" |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
190 |
apply (auto simp add: SReal_def) |
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
191 |
apply (rule_tac x="abs r" in exI) |
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
192 |
apply simp |
14370 | 193 |
done |
194 |
||
15229 | 195 |
lemma SReal_hypreal_of_real [simp]: "hypreal_of_real x \<in> Reals" |
14370 | 196 |
by (simp add: SReal_def) |
197 |
||
15229 | 198 |
lemma SReal_number_of [simp]: "(number_of w ::hypreal) \<in> Reals" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
199 |
apply (simp only: star_of_number_of [symmetric]) |
14370 | 200 |
apply (rule SReal_hypreal_of_real) |
201 |
done |
|
202 |
||
203 |
(** As always with numerals, 0 and 1 are special cases **) |
|
204 |
||
15229 | 205 |
lemma Reals_0 [simp]: "(0::hypreal) \<in> Reals" |
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14378
diff
changeset
|
206 |
apply (subst numeral_0_eq_0 [symmetric]) |
14370 | 207 |
apply (rule SReal_number_of) |
208 |
done |
|
209 |
||
15229 | 210 |
lemma Reals_1 [simp]: "(1::hypreal) \<in> Reals" |
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14378
diff
changeset
|
211 |
apply (subst numeral_1_eq_1 [symmetric]) |
14370 | 212 |
apply (rule SReal_number_of) |
213 |
done |
|
214 |
||
215 |
lemma SReal_divide_number_of: "r \<in> Reals ==> r/(number_of w::hypreal) \<in> Reals" |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
216 |
apply (simp only: divide_inverse) |
14370 | 217 |
apply (blast intro!: SReal_number_of SReal_mult SReal_inverse) |
218 |
done |
|
219 |
||
15229 | 220 |
text{*epsilon is not in Reals because it is an infinitesimal*} |
14370 | 221 |
lemma SReal_epsilon_not_mem: "epsilon \<notin> Reals" |
222 |
apply (simp add: SReal_def) |
|
223 |
apply (auto simp add: hypreal_of_real_not_eq_epsilon [THEN not_sym]) |
|
224 |
done |
|
225 |
||
226 |
lemma SReal_omega_not_mem: "omega \<notin> Reals" |
|
227 |
apply (simp add: SReal_def) |
|
228 |
apply (auto simp add: hypreal_of_real_not_eq_omega [THEN not_sym]) |
|
229 |
done |
|
230 |
||
231 |
lemma SReal_UNIV_real: "{x. hypreal_of_real x \<in> Reals} = (UNIV::real set)" |
|
232 |
by (simp add: SReal_def) |
|
233 |
||
234 |
lemma SReal_iff: "(x \<in> Reals) = (\<exists>y. x = hypreal_of_real y)" |
|
235 |
by (simp add: SReal_def) |
|
236 |
||
237 |
lemma hypreal_of_real_image: "hypreal_of_real `(UNIV::real set) = Reals" |
|
238 |
by (auto simp add: SReal_def) |
|
239 |
||
240 |
lemma inv_hypreal_of_real_image: "inv hypreal_of_real ` Reals = UNIV" |
|
241 |
apply (auto simp add: SReal_def) |
|
242 |
apply (rule inj_hypreal_of_real [THEN inv_f_f, THEN subst], blast) |
|
243 |
done |
|
244 |
||
245 |
lemma SReal_hypreal_of_real_image: |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
246 |
"[| \<exists>x. x: P; P \<subseteq> Reals |] ==> \<exists>Q. P = hypreal_of_real ` Q" |
14370 | 247 |
apply (simp add: SReal_def, blast) |
248 |
done |
|
249 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
250 |
lemma SReal_dense: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
251 |
"[| (x::hypreal) \<in> Reals; y \<in> Reals; x<y |] ==> \<exists>r \<in> Reals. x<r & r<y" |
14370 | 252 |
apply (auto simp add: SReal_iff) |
14477 | 253 |
apply (drule dense, safe) |
14370 | 254 |
apply (rule_tac x = "hypreal_of_real r" in bexI, auto) |
255 |
done |
|
256 |
||
15229 | 257 |
text{*Completeness of Reals, but both lemmas are unused.*} |
258 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
259 |
lemma SReal_sup_lemma: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
260 |
"P \<subseteq> Reals ==> ((\<exists>x \<in> P. y < x) = |
14370 | 261 |
(\<exists>X. hypreal_of_real X \<in> P & y < hypreal_of_real X))" |
262 |
by (blast dest!: SReal_iff [THEN iffD1]) |
|
263 |
||
264 |
lemma SReal_sup_lemma2: |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
265 |
"[| P \<subseteq> Reals; \<exists>x. x \<in> P; \<exists>y \<in> Reals. \<forall>x \<in> P. x < y |] |
14370 | 266 |
==> (\<exists>X. X \<in> {w. hypreal_of_real w \<in> P}) & |
267 |
(\<exists>Y. \<forall>X \<in> {w. hypreal_of_real w \<in> P}. X < Y)" |
|
268 |
apply (rule conjI) |
|
269 |
apply (fast dest!: SReal_iff [THEN iffD1]) |
|
270 |
apply (auto, frule subsetD, assumption) |
|
271 |
apply (drule SReal_iff [THEN iffD1]) |
|
272 |
apply (auto, rule_tac x = ya in exI, auto) |
|
273 |
done |
|
274 |
||
15229 | 275 |
|
276 |
subsection{*Lifting of the Ub and Lub Properties*} |
|
277 |
||
14370 | 278 |
lemma hypreal_of_real_isUb_iff: |
279 |
"(isUb (Reals) (hypreal_of_real ` Q) (hypreal_of_real Y)) = |
|
280 |
(isUb (UNIV :: real set) Q Y)" |
|
15229 | 281 |
by (simp add: isUb_def setle_def) |
14370 | 282 |
|
283 |
lemma hypreal_of_real_isLub1: |
|
284 |
"isLub Reals (hypreal_of_real ` Q) (hypreal_of_real Y) |
|
285 |
==> isLub (UNIV :: real set) Q Y" |
|
286 |
apply (simp add: isLub_def leastP_def) |
|
287 |
apply (auto intro: hypreal_of_real_isUb_iff [THEN iffD2] |
|
288 |
simp add: hypreal_of_real_isUb_iff setge_def) |
|
289 |
done |
|
290 |
||
291 |
lemma hypreal_of_real_isLub2: |
|
292 |
"isLub (UNIV :: real set) Q Y |
|
293 |
==> isLub Reals (hypreal_of_real ` Q) (hypreal_of_real Y)" |
|
294 |
apply (simp add: isLub_def leastP_def) |
|
295 |
apply (auto simp add: hypreal_of_real_isUb_iff setge_def) |
|
296 |
apply (frule_tac x2 = x in isUbD2a [THEN SReal_iff [THEN iffD1], THEN exE]) |
|
297 |
prefer 2 apply assumption |
|
298 |
apply (drule_tac x = xa in spec) |
|
299 |
apply (auto simp add: hypreal_of_real_isUb_iff) |
|
300 |
done |
|
301 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
302 |
lemma hypreal_of_real_isLub_iff: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
303 |
"(isLub Reals (hypreal_of_real ` Q) (hypreal_of_real Y)) = |
14370 | 304 |
(isLub (UNIV :: real set) Q Y)" |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
305 |
by (blast intro: hypreal_of_real_isLub1 hypreal_of_real_isLub2) |
14370 | 306 |
|
307 |
lemma lemma_isUb_hypreal_of_real: |
|
308 |
"isUb Reals P Y ==> \<exists>Yo. isUb Reals P (hypreal_of_real Yo)" |
|
309 |
by (auto simp add: SReal_iff isUb_def) |
|
310 |
||
311 |
lemma lemma_isLub_hypreal_of_real: |
|
312 |
"isLub Reals P Y ==> \<exists>Yo. isLub Reals P (hypreal_of_real Yo)" |
|
313 |
by (auto simp add: isLub_def leastP_def isUb_def SReal_iff) |
|
314 |
||
315 |
lemma lemma_isLub_hypreal_of_real2: |
|
316 |
"\<exists>Yo. isLub Reals P (hypreal_of_real Yo) ==> \<exists>Y. isLub Reals P Y" |
|
317 |
by (auto simp add: isLub_def leastP_def isUb_def) |
|
318 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
319 |
lemma SReal_complete: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
320 |
"[| P \<subseteq> Reals; \<exists>x. x \<in> P; \<exists>Y. isUb Reals P Y |] |
14370 | 321 |
==> \<exists>t::hypreal. isLub Reals P t" |
322 |
apply (frule SReal_hypreal_of_real_image) |
|
323 |
apply (auto, drule lemma_isUb_hypreal_of_real) |
|
15229 | 324 |
apply (auto intro!: reals_complete lemma_isLub_hypreal_of_real2 |
325 |
simp add: hypreal_of_real_isLub_iff hypreal_of_real_isUb_iff) |
|
14370 | 326 |
done |
327 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
328 |
|
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
329 |
subsection{* Set of Finite Elements is a Subring of the Extended Reals*} |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
330 |
|
14370 | 331 |
lemma HFinite_add: "[|x \<in> HFinite; y \<in> HFinite|] ==> (x+y) \<in> HFinite" |
332 |
apply (simp add: HFinite_def) |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
333 |
apply (blast intro!: SReal_add hnorm_add_less) |
14370 | 334 |
done |
335 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
336 |
lemma HFinite_mult: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
337 |
fixes x y :: "'a::real_normed_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
338 |
shows "[|x \<in> HFinite; y \<in> HFinite|] ==> x*y \<in> HFinite" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
339 |
apply (simp add: HFinite_def) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
340 |
apply (blast intro!: SReal_mult hnorm_mult_less) |
14370 | 341 |
done |
342 |
||
343 |
lemma HFinite_minus_iff: "(-x \<in> HFinite) = (x \<in> HFinite)" |
|
344 |
by (simp add: HFinite_def) |
|
345 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
346 |
lemma HFinite_star_of [simp]: "star_of x \<in> HFinite" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
347 |
apply (simp add: HFinite_def) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
348 |
apply (rule_tac x="star_of (norm x) + 1" in bexI) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
349 |
apply (transfer, simp) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
350 |
apply (blast intro: SReal_add SReal_hypreal_of_real Reals_1) |
14370 | 351 |
done |
352 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
353 |
lemma SReal_subset_HFinite: "(Reals::hypreal set) \<subseteq> HFinite" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
354 |
by (auto simp add: SReal_def) |
14370 | 355 |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
356 |
lemma HFinite_hypreal_of_real: "hypreal_of_real x \<in> HFinite" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
357 |
by (rule HFinite_star_of) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
358 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
359 |
lemma HFiniteD: "x \<in> HFinite ==> \<exists>t \<in> Reals. hnorm x < t" |
14370 | 360 |
by (simp add: HFinite_def) |
361 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
362 |
lemma HFinite_hrabs_iff [iff]: "(abs (x::hypreal) \<in> HFinite) = (x \<in> HFinite)" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
363 |
by (simp add: HFinite_def) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
364 |
|
20562
c2f672be8522
add type constraint to otherwise looping iff rule
huffman
parents:
20554
diff
changeset
|
365 |
lemma HFinite_hnorm_iff [iff]: |
c2f672be8522
add type constraint to otherwise looping iff rule
huffman
parents:
20554
diff
changeset
|
366 |
"(hnorm (x::hypreal) \<in> HFinite) = (x \<in> HFinite)" |
14370 | 367 |
by (simp add: HFinite_def) |
368 |
||
15229 | 369 |
lemma HFinite_number_of [simp]: "number_of w \<in> HFinite" |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
370 |
by (unfold star_number_def, rule HFinite_star_of) |
14370 | 371 |
|
372 |
(** As always with numerals, 0 and 1 are special cases **) |
|
373 |
||
15229 | 374 |
lemma HFinite_0 [simp]: "0 \<in> HFinite" |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
375 |
by (unfold star_zero_def, rule HFinite_star_of) |
14370 | 376 |
|
15229 | 377 |
lemma HFinite_1 [simp]: "1 \<in> HFinite" |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
378 |
by (unfold star_one_def, rule HFinite_star_of) |
14370 | 379 |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
380 |
lemma HFinite_bounded: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
381 |
"[|(x::hypreal) \<in> HFinite; y \<le> x; 0 \<le> y |] ==> y \<in> HFinite" |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
382 |
apply (case_tac "x \<le> 0") |
14370 | 383 |
apply (drule_tac y = x in order_trans) |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
384 |
apply (drule_tac [2] order_antisym) |
14370 | 385 |
apply (auto simp add: linorder_not_le) |
386 |
apply (auto intro: order_le_less_trans simp add: abs_if HFinite_def) |
|
387 |
done |
|
388 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
389 |
|
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
390 |
subsection{* Set of Infinitesimals is a Subring of the Hyperreals*} |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
391 |
|
20407 | 392 |
lemma InfinitesimalI: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
393 |
"(\<And>r. \<lbrakk>r \<in> \<real>; 0 < r\<rbrakk> \<Longrightarrow> hnorm x < r) \<Longrightarrow> x \<in> Infinitesimal" |
20407 | 394 |
by (simp add: Infinitesimal_def) |
395 |
||
14370 | 396 |
lemma InfinitesimalD: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
397 |
"x \<in> Infinitesimal ==> \<forall>r \<in> Reals. 0 < r --> hnorm x < r" |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
398 |
by (simp add: Infinitesimal_def) |
14370 | 399 |
|
15229 | 400 |
lemma Infinitesimal_zero [iff]: "0 \<in> Infinitesimal" |
14370 | 401 |
by (simp add: Infinitesimal_def) |
402 |
||
403 |
lemma hypreal_sum_of_halves: "x/(2::hypreal) + x/(2::hypreal) = x" |
|
404 |
by auto |
|
405 |
||
406 |
lemma Infinitesimal_add: |
|
407 |
"[| x \<in> Infinitesimal; y \<in> Infinitesimal |] ==> (x+y) \<in> Infinitesimal" |
|
20407 | 408 |
apply (rule InfinitesimalI) |
14370 | 409 |
apply (rule hypreal_sum_of_halves [THEN subst]) |
14477 | 410 |
apply (drule half_gt_zero) |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
411 |
apply (blast intro: hnorm_add_less SReal_divide_number_of dest: InfinitesimalD) |
14370 | 412 |
done |
413 |
||
15229 | 414 |
lemma Infinitesimal_minus_iff [simp]: "(-x:Infinitesimal) = (x:Infinitesimal)" |
14370 | 415 |
by (simp add: Infinitesimal_def) |
416 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
417 |
lemma Infinitesimal_diff: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
418 |
"[| x \<in> Infinitesimal; y \<in> Infinitesimal |] ==> x-y \<in> Infinitesimal" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
419 |
by (simp add: diff_def Infinitesimal_add) |
14370 | 420 |
|
421 |
lemma Infinitesimal_mult: |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
422 |
fixes x y :: "'a::real_normed_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
423 |
shows "[|x \<in> Infinitesimal; y \<in> Infinitesimal|] ==> (x * y) \<in> Infinitesimal" |
20407 | 424 |
apply (rule InfinitesimalI) |
425 |
apply (case_tac "y = 0", simp) |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
426 |
apply (subgoal_tac "hnorm (x * y) < 1 * r", simp only: mult_1) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
427 |
apply (rule hnorm_mult_less) |
20407 | 428 |
apply (simp_all add: InfinitesimalD) |
14370 | 429 |
done |
430 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
431 |
lemma Infinitesimal_HFinite_mult: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
432 |
fixes x y :: "'a::real_normed_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
433 |
shows "[| x \<in> Infinitesimal; y \<in> HFinite |] ==> (x * y) \<in> Infinitesimal" |
20407 | 434 |
apply (rule InfinitesimalI) |
435 |
apply (drule HFiniteD, clarify) |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
436 |
apply (subgoal_tac "0 < t") |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
437 |
apply (subgoal_tac "hnorm (x * y) < (r / t) * t", simp) |
20407 | 438 |
apply (subgoal_tac "0 < r / t") |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
439 |
apply (rule hnorm_mult_less) |
20407 | 440 |
apply (simp add: InfinitesimalD SReal_divide) |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
441 |
apply assumption |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
442 |
apply (simp only: divide_pos_pos) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
443 |
apply (erule order_le_less_trans [OF hnorm_ge_zero]) |
14370 | 444 |
done |
445 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
446 |
lemma Infinitesimal_HFinite_mult2: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
447 |
fixes x y :: "'a::real_normed_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
448 |
shows "[| x \<in> Infinitesimal; y \<in> HFinite |] ==> (y * x) \<in> Infinitesimal" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
449 |
apply (rule InfinitesimalI) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
450 |
apply (drule HFiniteD, clarify) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
451 |
apply (subgoal_tac "0 < t") |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
452 |
apply (subgoal_tac "hnorm (y * x) < t * (r / t)", simp) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
453 |
apply (subgoal_tac "0 < r / t") |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
454 |
apply (rule hnorm_mult_less) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
455 |
apply assumption |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
456 |
apply (simp add: InfinitesimalD SReal_divide) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
457 |
apply (simp only: divide_pos_pos) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
458 |
apply (erule order_le_less_trans [OF hnorm_ge_zero]) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
459 |
done |
14370 | 460 |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
461 |
lemma Compl_HFinite: "- HFinite = HInfinite" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
462 |
apply (auto simp add: HInfinite_def HFinite_def linorder_not_less) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
463 |
apply (rule_tac y="r + 1" in order_less_le_trans, simp) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
464 |
apply (simp add: SReal_add Reals_1) |
14370 | 465 |
done |
466 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
467 |
lemma HInfinite_inverse_Infinitesimal: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
468 |
fixes x :: "'a::real_normed_div_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
469 |
shows "x \<in> HInfinite ==> inverse x \<in> Infinitesimal" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
470 |
apply (rule InfinitesimalI) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
471 |
apply (subgoal_tac "x \<noteq> 0") |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
472 |
apply (rule inverse_less_imp_less) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
473 |
apply (simp add: nonzero_hnorm_inverse) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
474 |
apply (simp add: HInfinite_def SReal_inverse) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
475 |
apply assumption |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
476 |
apply (clarify, simp add: Compl_HFinite [symmetric]) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
477 |
done |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
478 |
|
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
479 |
lemma HInfiniteI: "(\<And>r. r \<in> \<real> \<Longrightarrow> r < hnorm x) \<Longrightarrow> x \<in> HInfinite" |
20407 | 480 |
by (simp add: HInfinite_def) |
481 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
482 |
lemma HInfiniteD: "\<lbrakk>x \<in> HInfinite; r \<in> \<real>\<rbrakk> \<Longrightarrow> r < hnorm x" |
20407 | 483 |
by (simp add: HInfinite_def) |
484 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
485 |
lemma HInfinite_mult: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
486 |
fixes x y :: "'a::real_normed_div_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
487 |
shows "[|x \<in> HInfinite; y \<in> HInfinite|] ==> (x*y) \<in> HInfinite" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
488 |
apply (rule HInfiniteI, simp only: hnorm_mult) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
489 |
apply (subgoal_tac "r * 1 < hnorm x * hnorm y", simp only: mult_1) |
20407 | 490 |
apply (case_tac "x = 0", simp add: HInfinite_def) |
491 |
apply (rule mult_strict_mono) |
|
492 |
apply (simp_all add: HInfiniteD) |
|
14370 | 493 |
done |
494 |
||
15229 | 495 |
lemma hypreal_add_zero_less_le_mono: "[|r < x; (0::hypreal) \<le> y|] ==> r < x+y" |
496 |
by (auto dest: add_less_le_mono) |
|
497 |
||
14370 | 498 |
lemma HInfinite_add_ge_zero: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
499 |
"[|(x::hypreal) \<in> HInfinite; 0 \<le> y; 0 \<le> x|] ==> (x + y): HInfinite" |
14370 | 500 |
by (auto intro!: hypreal_add_zero_less_le_mono |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
501 |
simp add: abs_if add_commute add_nonneg_nonneg HInfinite_def) |
14370 | 502 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
503 |
lemma HInfinite_add_ge_zero2: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
504 |
"[|(x::hypreal) \<in> HInfinite; 0 \<le> y; 0 \<le> x|] ==> (y + x): HInfinite" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
505 |
by (auto intro!: HInfinite_add_ge_zero simp add: add_commute) |
14370 | 506 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
507 |
lemma HInfinite_add_gt_zero: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
508 |
"[|(x::hypreal) \<in> HInfinite; 0 < y; 0 < x|] ==> (x + y): HInfinite" |
14370 | 509 |
by (blast intro: HInfinite_add_ge_zero order_less_imp_le) |
510 |
||
511 |
lemma HInfinite_minus_iff: "(-x \<in> HInfinite) = (x \<in> HInfinite)" |
|
512 |
by (simp add: HInfinite_def) |
|
513 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
514 |
lemma HInfinite_add_le_zero: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
515 |
"[|(x::hypreal) \<in> HInfinite; y \<le> 0; x \<le> 0|] ==> (x + y): HInfinite" |
14370 | 516 |
apply (drule HInfinite_minus_iff [THEN iffD2]) |
517 |
apply (rule HInfinite_minus_iff [THEN iffD1]) |
|
518 |
apply (auto intro: HInfinite_add_ge_zero) |
|
519 |
done |
|
520 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
521 |
lemma HInfinite_add_lt_zero: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
522 |
"[|(x::hypreal) \<in> HInfinite; y < 0; x < 0|] ==> (x + y): HInfinite" |
14370 | 523 |
by (blast intro: HInfinite_add_le_zero order_less_imp_le) |
524 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
525 |
lemma HFinite_sum_squares: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
526 |
fixes a b c :: "'a::real_normed_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
527 |
shows "[|a: HFinite; b: HFinite; c: HFinite|] |
14370 | 528 |
==> a*a + b*b + c*c \<in> HFinite" |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
529 |
by (auto intro: HFinite_mult HFinite_add) |
14370 | 530 |
|
531 |
lemma not_Infinitesimal_not_zero: "x \<notin> Infinitesimal ==> x \<noteq> 0" |
|
532 |
by auto |
|
533 |
||
534 |
lemma not_Infinitesimal_not_zero2: "x \<in> HFinite - Infinitesimal ==> x \<noteq> 0" |
|
535 |
by auto |
|
536 |
||
15229 | 537 |
lemma Infinitesimal_hrabs_iff [iff]: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
538 |
"(abs (x::hypreal) \<in> Infinitesimal) = (x \<in> Infinitesimal)" |
15003 | 539 |
by (auto simp add: abs_if) |
14370 | 540 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
541 |
lemma HFinite_diff_Infinitesimal_hrabs: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
542 |
"(x::hypreal) \<in> HFinite - Infinitesimal ==> abs x \<in> HFinite - Infinitesimal" |
14370 | 543 |
by blast |
544 |
||
545 |
lemma hrabs_less_Infinitesimal: |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
546 |
"[| e \<in> Infinitesimal; abs (x::hypreal) < e |] ==> x \<in> Infinitesimal" |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
547 |
by (auto simp add: Infinitesimal_def abs_less_iff) |
14370 | 548 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
549 |
lemma hrabs_le_Infinitesimal: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
550 |
"[| e \<in> Infinitesimal; abs (x::hypreal) \<le> e |] ==> x \<in> Infinitesimal" |
14370 | 551 |
by (blast dest: order_le_imp_less_or_eq intro: hrabs_less_Infinitesimal) |
552 |
||
553 |
lemma Infinitesimal_interval: |
|
554 |
"[| e \<in> Infinitesimal; e' \<in> Infinitesimal; e' < x ; x < e |] |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
555 |
==> (x::hypreal) \<in> Infinitesimal" |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
556 |
by (auto simp add: Infinitesimal_def abs_less_iff) |
14370 | 557 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
558 |
lemma Infinitesimal_interval2: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
559 |
"[| e \<in> Infinitesimal; e' \<in> Infinitesimal; |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
560 |
e' \<le> x ; x \<le> e |] ==> (x::hypreal) \<in> Infinitesimal" |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
561 |
by (auto intro: Infinitesimal_interval simp add: order_le_less) |
14370 | 562 |
|
563 |
lemma not_Infinitesimal_mult: |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
564 |
fixes x y :: "'a::real_normed_div_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
565 |
shows "[| x \<notin> Infinitesimal; y \<notin> Infinitesimal|] ==> (x*y) \<notin>Infinitesimal" |
20407 | 566 |
apply (unfold Infinitesimal_def, clarify, rename_tac r s) |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
567 |
apply (simp only: linorder_not_less hnorm_mult) |
20407 | 568 |
apply (drule_tac x = "r * s" in bspec) |
569 |
apply (fast intro: SReal_mult) |
|
570 |
apply (drule mp, blast intro: mult_pos_pos) |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
571 |
apply (drule_tac c = s and d = "hnorm y" and a = r and b = "hnorm x" in mult_mono) |
20407 | 572 |
apply (simp_all (no_asm_simp)) |
14370 | 573 |
done |
574 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
575 |
lemma Infinitesimal_mult_disj: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
576 |
fixes x y :: "'a::real_normed_div_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
577 |
shows "x*y \<in> Infinitesimal ==> x \<in> Infinitesimal | y \<in> Infinitesimal" |
14370 | 578 |
apply (rule ccontr) |
579 |
apply (drule de_Morgan_disj [THEN iffD1]) |
|
580 |
apply (fast dest: not_Infinitesimal_mult) |
|
581 |
done |
|
582 |
||
583 |
lemma HFinite_Infinitesimal_not_zero: "x \<in> HFinite-Infinitesimal ==> x \<noteq> 0" |
|
584 |
by blast |
|
585 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
586 |
lemma HFinite_Infinitesimal_diff_mult: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
587 |
fixes x y :: "'a::real_normed_div_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
588 |
shows "[| x \<in> HFinite - Infinitesimal; |
14370 | 589 |
y \<in> HFinite - Infinitesimal |
590 |
|] ==> (x*y) \<in> HFinite - Infinitesimal" |
|
591 |
apply clarify |
|
592 |
apply (blast dest: HFinite_mult not_Infinitesimal_mult) |
|
593 |
done |
|
594 |
||
595 |
lemma Infinitesimal_subset_HFinite: |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
596 |
"Infinitesimal \<subseteq> HFinite" |
14370 | 597 |
apply (simp add: Infinitesimal_def HFinite_def, auto) |
598 |
apply (rule_tac x = 1 in bexI, auto) |
|
599 |
done |
|
600 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
601 |
lemma Infinitesimal_hypreal_of_real_mult: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
602 |
"x \<in> Infinitesimal ==> x * hypreal_of_real r \<in> Infinitesimal" |
14370 | 603 |
by (erule HFinite_hypreal_of_real [THEN [2] Infinitesimal_HFinite_mult]) |
604 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
605 |
lemma Infinitesimal_hypreal_of_real_mult2: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
606 |
"x \<in> Infinitesimal ==> hypreal_of_real r * x \<in> Infinitesimal" |
14370 | 607 |
by (erule HFinite_hypreal_of_real [THEN [2] Infinitesimal_HFinite_mult2]) |
608 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
609 |
|
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
610 |
subsection{*The Infinitely Close Relation*} |
14370 | 611 |
|
612 |
lemma mem_infmal_iff: "(x \<in> Infinitesimal) = (x @= 0)" |
|
613 |
by (simp add: Infinitesimal_def approx_def) |
|
614 |
||
20563 | 615 |
lemma approx_minus_iff: " (x @= y) = (x - y @= 0)" |
14370 | 616 |
by (simp add: approx_def) |
617 |
||
618 |
lemma approx_minus_iff2: " (x @= y) = (-y + x @= 0)" |
|
20563 | 619 |
by (simp add: approx_def diff_minus add_commute) |
14370 | 620 |
|
15229 | 621 |
lemma approx_refl [iff]: "x @= x" |
14370 | 622 |
by (simp add: approx_def Infinitesimal_def) |
623 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
624 |
lemma hypreal_minus_distrib1: "-(y + -(x::'a::ab_group_add)) = x + -y" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
625 |
by (simp add: add_commute) |
14477 | 626 |
|
14370 | 627 |
lemma approx_sym: "x @= y ==> y @= x" |
628 |
apply (simp add: approx_def) |
|
20563 | 629 |
apply (drule Infinitesimal_minus_iff [THEN iffD2]) |
630 |
apply simp |
|
14370 | 631 |
done |
632 |
||
633 |
lemma approx_trans: "[| x @= y; y @= z |] ==> x @= z" |
|
634 |
apply (simp add: approx_def) |
|
20563 | 635 |
apply (drule (1) Infinitesimal_add) |
636 |
apply (simp add: diff_def) |
|
14370 | 637 |
done |
638 |
||
639 |
lemma approx_trans2: "[| r @= x; s @= x |] ==> r @= s" |
|
640 |
by (blast intro: approx_sym approx_trans) |
|
641 |
||
642 |
lemma approx_trans3: "[| x @= r; x @= s|] ==> r @= s" |
|
643 |
by (blast intro: approx_sym approx_trans) |
|
644 |
||
645 |
lemma number_of_approx_reorient: "(number_of w @= x) = (x @= number_of w)" |
|
646 |
by (blast intro: approx_sym) |
|
647 |
||
648 |
lemma zero_approx_reorient: "(0 @= x) = (x @= 0)" |
|
649 |
by (blast intro: approx_sym) |
|
650 |
||
651 |
lemma one_approx_reorient: "(1 @= x) = (x @= 1)" |
|
652 |
by (blast intro: approx_sym) |
|
10751 | 653 |
|
654 |
||
19765 | 655 |
ML {* |
656 |
local |
|
14370 | 657 |
(*** re-orientation, following HOL/Integ/Bin.ML |
658 |
We re-orient x @=y where x is 0, 1 or a numeral, unless y is as well! |
|
659 |
***) |
|
660 |
||
661 |
(*reorientation simprules using ==, for the following simproc*) |
|
19765 | 662 |
val meta_zero_approx_reorient = thm "zero_approx_reorient" RS eq_reflection; |
663 |
val meta_one_approx_reorient = thm "one_approx_reorient" RS eq_reflection; |
|
664 |
val meta_number_of_approx_reorient = thm "number_of_approx_reorient" RS eq_reflection |
|
14370 | 665 |
|
666 |
(*reorientation simplification procedure: reorients (polymorphic) |
|
667 |
0 = x, 1 = x, nnn = x provided x isn't 0, 1 or a numeral.*) |
|
668 |
fun reorient_proc sg _ (_ $ t $ u) = |
|
669 |
case u of |
|
15531 | 670 |
Const("0", _) => NONE |
671 |
| Const("1", _) => NONE |
|
672 |
| Const("Numeral.number_of", _) $ _ => NONE |
|
673 |
| _ => SOME (case t of |
|
14370 | 674 |
Const("0", _) => meta_zero_approx_reorient |
675 |
| Const("1", _) => meta_one_approx_reorient |
|
676 |
| Const("Numeral.number_of", _) $ _ => |
|
677 |
meta_number_of_approx_reorient); |
|
678 |
||
19765 | 679 |
in |
14370 | 680 |
val approx_reorient_simproc = |
20485 | 681 |
Int_Numeral_Base_Simprocs.prep_simproc |
14370 | 682 |
("reorient_simproc", ["0@=x", "1@=x", "number_of w @= x"], reorient_proc); |
19765 | 683 |
end; |
14370 | 684 |
|
685 |
Addsimprocs [approx_reorient_simproc]; |
|
686 |
*} |
|
687 |
||
688 |
lemma Infinitesimal_approx_minus: "(x-y \<in> Infinitesimal) = (x @= y)" |
|
20563 | 689 |
by (simp add: approx_minus_iff [symmetric] mem_infmal_iff) |
14370 | 690 |
|
691 |
lemma approx_monad_iff: "(x @= y) = (monad(x)=monad(y))" |
|
692 |
apply (simp add: monad_def) |
|
693 |
apply (auto dest: approx_sym elim!: approx_trans equalityCE) |
|
694 |
done |
|
695 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
696 |
lemma Infinitesimal_approx: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
697 |
"[| x \<in> Infinitesimal; y \<in> Infinitesimal |] ==> x @= y" |
14370 | 698 |
apply (simp add: mem_infmal_iff) |
699 |
apply (blast intro: approx_trans approx_sym) |
|
700 |
done |
|
701 |
||
702 |
lemma approx_add: "[| a @= b; c @= d |] ==> a+c @= b+d" |
|
703 |
proof (unfold approx_def) |
|
20563 | 704 |
assume inf: "a - b \<in> Infinitesimal" "c - d \<in> Infinitesimal" |
705 |
have "a + c - (b + d) = (a - b) + (c - d)" by simp |
|
14370 | 706 |
also have "... \<in> Infinitesimal" using inf by (rule Infinitesimal_add) |
20563 | 707 |
finally show "a + c - (b + d) \<in> Infinitesimal" . |
14370 | 708 |
qed |
709 |
||
710 |
lemma approx_minus: "a @= b ==> -a @= -b" |
|
711 |
apply (rule approx_minus_iff [THEN iffD2, THEN approx_sym]) |
|
712 |
apply (drule approx_minus_iff [THEN iffD1]) |
|
20563 | 713 |
apply (simp add: add_commute diff_def) |
14370 | 714 |
done |
715 |
||
716 |
lemma approx_minus2: "-a @= -b ==> a @= b" |
|
717 |
by (auto dest: approx_minus) |
|
718 |
||
15229 | 719 |
lemma approx_minus_cancel [simp]: "(-a @= -b) = (a @= b)" |
14370 | 720 |
by (blast intro: approx_minus approx_minus2) |
721 |
||
722 |
lemma approx_add_minus: "[| a @= b; c @= d |] ==> a + -c @= b + -d" |
|
723 |
by (blast intro!: approx_add approx_minus) |
|
724 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
725 |
lemma approx_mult1: |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
726 |
fixes a b c :: "'a::real_normed_algebra star" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
727 |
shows "[| a @= b; c: HFinite|] ==> a*c @= b*c" |
20563 | 728 |
by (simp add: approx_def Infinitesimal_HFinite_mult |
729 |
left_diff_distrib [symmetric]) |
|
14370 | 730 |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
731 |
lemma approx_mult2: |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
732 |
fixes a b c :: "'a::real_normed_algebra star" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
733 |
shows "[|a @= b; c: HFinite|] ==> c*a @= c*b" |
20563 | 734 |
by (simp add: approx_def Infinitesimal_HFinite_mult2 |
735 |
right_diff_distrib [symmetric]) |
|
14370 | 736 |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
737 |
lemma approx_mult_subst: |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
738 |
fixes u v x y :: "'a::real_normed_algebra star" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
739 |
shows "[|u @= v*x; x @= y; v \<in> HFinite|] ==> u @= v*y" |
14370 | 740 |
by (blast intro: approx_mult2 approx_trans) |
741 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
742 |
lemma approx_mult_subst2: |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
743 |
fixes u v x y :: "'a::real_normed_algebra star" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
744 |
shows "[| u @= x*v; x @= y; v \<in> HFinite |] ==> u @= y*v" |
14370 | 745 |
by (blast intro: approx_mult1 approx_trans) |
746 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
747 |
lemma approx_mult_subst_star_of: |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
748 |
fixes u x y :: "'a::real_normed_algebra star" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
749 |
shows "[| u @= x*star_of v; x @= y |] ==> u @= y*star_of v" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
750 |
by (auto intro: approx_mult_subst2) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
751 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
752 |
lemma approx_mult_subst_SReal: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
753 |
"[| u @= x*hypreal_of_real v; x @= y |] ==> u @= y*hypreal_of_real v" |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
754 |
by (rule approx_mult_subst_star_of) |
14370 | 755 |
|
756 |
lemma approx_eq_imp: "a = b ==> a @= b" |
|
757 |
by (simp add: approx_def) |
|
758 |
||
759 |
lemma Infinitesimal_minus_approx: "x \<in> Infinitesimal ==> -x @= x" |
|
760 |
by (blast intro: Infinitesimal_minus_iff [THEN iffD2] |
|
761 |
mem_infmal_iff [THEN iffD1] approx_trans2) |
|
762 |
||
20563 | 763 |
lemma bex_Infinitesimal_iff: "(\<exists>y \<in> Infinitesimal. x - z = y) = (x @= z)" |
14370 | 764 |
by (simp add: approx_def) |
765 |
||
766 |
lemma bex_Infinitesimal_iff2: "(\<exists>y \<in> Infinitesimal. x = z + y) = (x @= z)" |
|
767 |
by (force simp add: bex_Infinitesimal_iff [symmetric]) |
|
768 |
||
769 |
lemma Infinitesimal_add_approx: "[| y \<in> Infinitesimal; x + y = z |] ==> x @= z" |
|
770 |
apply (rule bex_Infinitesimal_iff [THEN iffD1]) |
|
771 |
apply (drule Infinitesimal_minus_iff [THEN iffD2]) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
772 |
apply (auto simp add: add_assoc [symmetric]) |
14370 | 773 |
done |
774 |
||
775 |
lemma Infinitesimal_add_approx_self: "y \<in> Infinitesimal ==> x @= x + y" |
|
776 |
apply (rule bex_Infinitesimal_iff [THEN iffD1]) |
|
777 |
apply (drule Infinitesimal_minus_iff [THEN iffD2]) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
778 |
apply (auto simp add: add_assoc [symmetric]) |
14370 | 779 |
done |
780 |
||
781 |
lemma Infinitesimal_add_approx_self2: "y \<in> Infinitesimal ==> x @= y + x" |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
782 |
by (auto dest: Infinitesimal_add_approx_self simp add: add_commute) |
14370 | 783 |
|
784 |
lemma Infinitesimal_add_minus_approx_self: "y \<in> Infinitesimal ==> x @= x + -y" |
|
785 |
by (blast intro!: Infinitesimal_add_approx_self Infinitesimal_minus_iff [THEN iffD2]) |
|
786 |
||
787 |
lemma Infinitesimal_add_cancel: "[| y \<in> Infinitesimal; x+y @= z|] ==> x @= z" |
|
788 |
apply (drule_tac x = x in Infinitesimal_add_approx_self [THEN approx_sym]) |
|
789 |
apply (erule approx_trans3 [THEN approx_sym], assumption) |
|
790 |
done |
|
791 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
792 |
lemma Infinitesimal_add_right_cancel: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
793 |
"[| y \<in> Infinitesimal; x @= z + y|] ==> x @= z" |
14370 | 794 |
apply (drule_tac x = z in Infinitesimal_add_approx_self2 [THEN approx_sym]) |
795 |
apply (erule approx_trans3 [THEN approx_sym]) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
796 |
apply (simp add: add_commute) |
14370 | 797 |
apply (erule approx_sym) |
798 |
done |
|
799 |
||
800 |
lemma approx_add_left_cancel: "d + b @= d + c ==> b @= c" |
|
801 |
apply (drule approx_minus_iff [THEN iffD1]) |
|
15539 | 802 |
apply (simp add: approx_minus_iff [symmetric] add_ac) |
14370 | 803 |
done |
804 |
||
805 |
lemma approx_add_right_cancel: "b + d @= c + d ==> b @= c" |
|
806 |
apply (rule approx_add_left_cancel) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
807 |
apply (simp add: add_commute) |
14370 | 808 |
done |
809 |
||
810 |
lemma approx_add_mono1: "b @= c ==> d + b @= d + c" |
|
811 |
apply (rule approx_minus_iff [THEN iffD2]) |
|
15539 | 812 |
apply (simp add: approx_minus_iff [symmetric] add_ac) |
14370 | 813 |
done |
814 |
||
815 |
lemma approx_add_mono2: "b @= c ==> b + a @= c + a" |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
816 |
by (simp add: add_commute approx_add_mono1) |
14370 | 817 |
|
15229 | 818 |
lemma approx_add_left_iff [simp]: "(a + b @= a + c) = (b @= c)" |
14370 | 819 |
by (fast elim: approx_add_left_cancel approx_add_mono1) |
820 |
||
15229 | 821 |
lemma approx_add_right_iff [simp]: "(b + a @= c + a) = (b @= c)" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
822 |
by (simp add: add_commute) |
14370 | 823 |
|
824 |
lemma approx_HFinite: "[| x \<in> HFinite; x @= y |] ==> y \<in> HFinite" |
|
825 |
apply (drule bex_Infinitesimal_iff2 [THEN iffD2], safe) |
|
826 |
apply (drule Infinitesimal_subset_HFinite [THEN subsetD, THEN HFinite_minus_iff [THEN iffD2]]) |
|
827 |
apply (drule HFinite_add) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
828 |
apply (auto simp add: add_assoc) |
14370 | 829 |
done |
830 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
831 |
lemma approx_star_of_HFinite: "x @= star_of D ==> x \<in> HFinite" |
14370 | 832 |
by (rule approx_sym [THEN [2] approx_HFinite], auto) |
833 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
834 |
lemma approx_hypreal_of_real_HFinite: "x @= hypreal_of_real D ==> x \<in> HFinite" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
835 |
by (rule approx_star_of_HFinite) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
836 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
837 |
lemma approx_mult_HFinite: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
838 |
fixes a b c d :: "'a::real_normed_algebra star" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
839 |
shows "[|a @= b; c @= d; b: HFinite; d: HFinite|] ==> a*c @= b*d" |
14370 | 840 |
apply (rule approx_trans) |
841 |
apply (rule_tac [2] approx_mult2) |
|
842 |
apply (rule approx_mult1) |
|
843 |
prefer 2 apply (blast intro: approx_HFinite approx_sym, auto) |
|
844 |
done |
|
845 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
846 |
lemma approx_mult_star_of: |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
847 |
fixes a c :: "'a::real_normed_algebra star" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
848 |
shows "[|a @= star_of b; c @= star_of d |] |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
849 |
==> a*c @= star_of b*star_of d" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
850 |
by (blast intro!: approx_mult_HFinite approx_star_of_HFinite HFinite_star_of) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
851 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
852 |
lemma approx_mult_hypreal_of_real: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
853 |
"[|a @= hypreal_of_real b; c @= hypreal_of_real d |] |
14370 | 854 |
==> a*c @= hypreal_of_real b*hypreal_of_real d" |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
855 |
by (rule approx_mult_star_of) |
14370 | 856 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
857 |
lemma approx_SReal_mult_cancel_zero: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
858 |
"[| (a::hypreal) \<in> Reals; a \<noteq> 0; a*x @= 0 |] ==> x @= 0" |
14370 | 859 |
apply (drule SReal_inverse [THEN SReal_subset_HFinite [THEN subsetD]]) |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
860 |
apply (auto dest: approx_mult2 simp add: mult_assoc [symmetric]) |
14370 | 861 |
done |
862 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
863 |
lemma approx_mult_SReal1: "[| (a::hypreal) \<in> Reals; x @= 0 |] ==> x*a @= 0" |
14370 | 864 |
by (auto dest: SReal_subset_HFinite [THEN subsetD] approx_mult1) |
865 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
866 |
lemma approx_mult_SReal2: "[| (a::hypreal) \<in> Reals; x @= 0 |] ==> a*x @= 0" |
14370 | 867 |
by (auto dest: SReal_subset_HFinite [THEN subsetD] approx_mult2) |
868 |
||
15229 | 869 |
lemma approx_mult_SReal_zero_cancel_iff [simp]: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
870 |
"[|(a::hypreal) \<in> Reals; a \<noteq> 0 |] ==> (a*x @= 0) = (x @= 0)" |
14370 | 871 |
by (blast intro: approx_SReal_mult_cancel_zero approx_mult_SReal2) |
872 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
873 |
lemma approx_SReal_mult_cancel: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
874 |
"[| (a::hypreal) \<in> Reals; a \<noteq> 0; a* w @= a*z |] ==> w @= z" |
14370 | 875 |
apply (drule SReal_inverse [THEN SReal_subset_HFinite [THEN subsetD]]) |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
876 |
apply (auto dest: approx_mult2 simp add: mult_assoc [symmetric]) |
14370 | 877 |
done |
878 |
||
15229 | 879 |
lemma approx_SReal_mult_cancel_iff1 [simp]: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
880 |
"[| (a::hypreal) \<in> Reals; a \<noteq> 0|] ==> (a* w @= a*z) = (w @= z)" |
15229 | 881 |
by (auto intro!: approx_mult2 SReal_subset_HFinite [THEN subsetD] |
882 |
intro: approx_SReal_mult_cancel) |
|
14370 | 883 |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
884 |
lemma approx_le_bound: "[| (z::hypreal) \<le> f; f @= g; g \<le> z |] ==> f @= z" |
14370 | 885 |
apply (simp add: bex_Infinitesimal_iff2 [symmetric], auto) |
886 |
apply (rule_tac x = "g+y-z" in bexI) |
|
887 |
apply (simp (no_asm)) |
|
888 |
apply (rule Infinitesimal_interval2) |
|
889 |
apply (rule_tac [2] Infinitesimal_zero, auto) |
|
890 |
done |
|
891 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
892 |
|
15539 | 893 |
subsection{* Zero is the Only Infinitesimal that is also a Real*} |
14370 | 894 |
|
895 |
lemma Infinitesimal_less_SReal: |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
896 |
"[| (x::hypreal) \<in> Reals; y \<in> Infinitesimal; 0 < x |] ==> y < x" |
14370 | 897 |
apply (simp add: Infinitesimal_def) |
898 |
apply (rule abs_ge_self [THEN order_le_less_trans], auto) |
|
899 |
done |
|
900 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
901 |
lemma Infinitesimal_less_SReal2: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
902 |
"(y::hypreal) \<in> Infinitesimal ==> \<forall>r \<in> Reals. 0 < r --> y < r" |
14370 | 903 |
by (blast intro: Infinitesimal_less_SReal) |
904 |
||
905 |
lemma SReal_not_Infinitesimal: |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
906 |
"[| 0 < y; (y::hypreal) \<in> Reals|] ==> y \<notin> Infinitesimal" |
14370 | 907 |
apply (simp add: Infinitesimal_def) |
15003 | 908 |
apply (auto simp add: abs_if) |
14370 | 909 |
done |
910 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
911 |
lemma SReal_minus_not_Infinitesimal: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
912 |
"[| y < 0; (y::hypreal) \<in> Reals |] ==> y \<notin> Infinitesimal" |
14370 | 913 |
apply (subst Infinitesimal_minus_iff [symmetric]) |
914 |
apply (rule SReal_not_Infinitesimal, auto) |
|
915 |
done |
|
916 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
917 |
lemma SReal_Int_Infinitesimal_zero: "Reals Int Infinitesimal = {0::hypreal}" |
14370 | 918 |
apply auto |
919 |
apply (cut_tac x = x and y = 0 in linorder_less_linear) |
|
920 |
apply (blast dest: SReal_not_Infinitesimal SReal_minus_not_Infinitesimal) |
|
921 |
done |
|
922 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
923 |
lemma SReal_Infinitesimal_zero: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
924 |
"[| (x::hypreal) \<in> Reals; x \<in> Infinitesimal|] ==> x = 0" |
14370 | 925 |
by (cut_tac SReal_Int_Infinitesimal_zero, blast) |
926 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
927 |
lemma SReal_HFinite_diff_Infinitesimal: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
928 |
"[| (x::hypreal) \<in> Reals; x \<noteq> 0 |] ==> x \<in> HFinite - Infinitesimal" |
14370 | 929 |
by (auto dest: SReal_Infinitesimal_zero SReal_subset_HFinite [THEN subsetD]) |
930 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
931 |
lemma hypreal_of_real_HFinite_diff_Infinitesimal: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
932 |
"hypreal_of_real x \<noteq> 0 ==> hypreal_of_real x \<in> HFinite - Infinitesimal" |
14370 | 933 |
by (rule SReal_HFinite_diff_Infinitesimal, auto) |
934 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
935 |
lemma star_of_Infinitesimal_iff_0 [iff]: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
936 |
"(star_of x \<in> Infinitesimal) = (x = 0)" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
937 |
apply (auto simp add: Infinitesimal_def) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
938 |
apply (drule_tac x="hnorm (star_of x)" in bspec) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
939 |
apply (simp add: hnorm_def) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
940 |
apply simp |
14370 | 941 |
done |
942 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
943 |
lemma star_of_HFinite_diff_Infinitesimal: |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
944 |
"x \<noteq> 0 ==> star_of x \<in> HFinite - Infinitesimal" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
945 |
by simp |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
946 |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
947 |
lemma hypreal_of_real_Infinitesimal_iff_0: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
948 |
"(hypreal_of_real x \<in> Infinitesimal) = (x=0)" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
949 |
by (rule star_of_Infinitesimal_iff_0) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
950 |
|
15229 | 951 |
lemma number_of_not_Infinitesimal [simp]: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
952 |
"number_of w \<noteq> (0::hypreal) ==> (number_of w :: hypreal) \<notin> Infinitesimal" |
14370 | 953 |
by (fast dest: SReal_number_of [THEN SReal_Infinitesimal_zero]) |
954 |
||
955 |
(*again: 1 is a special case, but not 0 this time*) |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
956 |
lemma one_not_Infinitesimal [simp]: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
957 |
"(1::'a::{real_normed_vector,axclass_0_neq_1} star) \<notin> Infinitesimal" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
958 |
apply (simp only: star_one_def star_of_Infinitesimal_iff_0) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
959 |
apply simp |
14370 | 960 |
done |
961 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
962 |
lemma approx_SReal_not_zero: |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
963 |
"[| (y::hypreal) \<in> Reals; x @= y; y\<noteq> 0 |] ==> x \<noteq> 0" |
14370 | 964 |
apply (cut_tac x = 0 and y = y in linorder_less_linear, simp) |
965 |
apply (blast dest: approx_sym [THEN mem_infmal_iff [THEN iffD2]] SReal_not_Infinitesimal SReal_minus_not_Infinitesimal) |
|
966 |
done |
|
967 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
968 |
lemma HFinite_diff_Infinitesimal_approx: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
969 |
"[| x @= y; y \<in> HFinite - Infinitesimal |] |
14370 | 970 |
==> x \<in> HFinite - Infinitesimal" |
971 |
apply (auto intro: approx_sym [THEN [2] approx_HFinite] |
|
972 |
simp add: mem_infmal_iff) |
|
973 |
apply (drule approx_trans3, assumption) |
|
974 |
apply (blast dest: approx_sym) |
|
975 |
done |
|
976 |
||
977 |
(*The premise y\<noteq>0 is essential; otherwise x/y =0 and we lose the |
|
978 |
HFinite premise.*) |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
979 |
lemma Infinitesimal_ratio: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
980 |
fixes x y :: "'a::{real_normed_div_algebra,field} star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
981 |
shows "[| y \<noteq> 0; y \<in> Infinitesimal; x/y \<in> HFinite |] |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
982 |
==> x \<in> Infinitesimal" |
14370 | 983 |
apply (drule Infinitesimal_HFinite_mult2, assumption) |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
984 |
apply (simp add: divide_inverse mult_assoc) |
14370 | 985 |
done |
986 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
987 |
lemma Infinitesimal_SReal_divide: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
988 |
"[| (x::hypreal) \<in> Infinitesimal; y \<in> Reals |] ==> x/y \<in> Infinitesimal" |
14430
5cb24165a2e1
new material from Avigad, and simplified treatment of division by 0
paulson
parents:
14420
diff
changeset
|
989 |
apply (simp add: divide_inverse) |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
990 |
apply (auto intro!: Infinitesimal_HFinite_mult |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
991 |
dest!: SReal_inverse [THEN SReal_subset_HFinite [THEN subsetD]]) |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
992 |
done |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
993 |
|
14370 | 994 |
(*------------------------------------------------------------------ |
995 |
Standard Part Theorem: Every finite x: R* is infinitely |
|
996 |
close to a unique real number (i.e a member of Reals) |
|
997 |
------------------------------------------------------------------*) |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
998 |
|
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
999 |
subsection{* Uniqueness: Two Infinitely Close Reals are Equal*} |
14370 | 1000 |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1001 |
lemma star_of_approx_iff [simp]: "(star_of x @= star_of y) = (x = y)" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1002 |
apply safe |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1003 |
apply (simp add: approx_def) |
20563 | 1004 |
apply (simp only: star_of_diff [symmetric]) |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1005 |
apply (simp only: star_of_Infinitesimal_iff_0) |
20563 | 1006 |
apply simp |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1007 |
done |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1008 |
|
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1009 |
lemma SReal_approx_iff: |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1010 |
"[|(x::hypreal) \<in> Reals; y \<in> Reals|] ==> (x @= y) = (x = y)" |
14370 | 1011 |
apply auto |
1012 |
apply (simp add: approx_def) |
|
20563 | 1013 |
apply (drule (1) SReal_diff) |
1014 |
apply (drule (1) SReal_Infinitesimal_zero) |
|
1015 |
apply simp |
|
14370 | 1016 |
done |
1017 |
||
15229 | 1018 |
lemma number_of_approx_iff [simp]: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1019 |
"(number_of v @= (number_of w :: 'a::{number,real_normed_vector} star)) = |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1020 |
(number_of v = (number_of w :: 'a))" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1021 |
apply (unfold star_number_def) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1022 |
apply (rule star_of_approx_iff) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1023 |
done |
14370 | 1024 |
|
1025 |
(*And also for 0 @= #nn and 1 @= #nn, #nn @= 0 and #nn @= 1.*) |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1026 |
lemma [simp]: |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1027 |
"(number_of w @= (0::'a::{number,real_normed_vector} star)) = |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1028 |
(number_of w = (0::'a))" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1029 |
"((0::'a::{number,real_normed_vector} star) @= number_of w) = |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1030 |
(number_of w = (0::'a))" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1031 |
"(number_of w @= (1::'b::{number,one,real_normed_vector} star)) = |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1032 |
(number_of w = (1::'b))" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1033 |
"((1::'b::{number,one,real_normed_vector} star) @= number_of w) = |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1034 |
(number_of w = (1::'b))" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1035 |
"~ (0 @= (1::'c::{axclass_0_neq_1,real_normed_vector} star))" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1036 |
"~ (1 @= (0::'c::{axclass_0_neq_1,real_normed_vector} star))" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1037 |
apply (unfold star_number_def star_zero_def star_one_def) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1038 |
apply (unfold star_of_approx_iff) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1039 |
by (auto intro: sym) |
14370 | 1040 |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1041 |
lemma hypreal_of_real_approx_iff: |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1042 |
"(hypreal_of_real k @= hypreal_of_real m) = (k = m)" |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1043 |
by (rule star_of_approx_iff) |
14370 | 1044 |
|
15229 | 1045 |
lemma hypreal_of_real_approx_number_of_iff [simp]: |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1046 |
"(hypreal_of_real k @= number_of w) = (k = number_of w)" |
14370 | 1047 |
by (subst hypreal_of_real_approx_iff [symmetric], auto) |
1048 |
||
1049 |
(*And also for 0 and 1.*) |
|
1050 |
(*And also for 0 @= #nn and 1 @= #nn, #nn @= 0 and #nn @= 1.*) |
|
1051 |
lemma [simp]: "(hypreal_of_real k @= 0) = (k = 0)" |
|
1052 |
"(hypreal_of_real k @= 1) = (k = 1)" |
|
1053 |
by (simp_all add: hypreal_of_real_approx_iff [symmetric]) |
|
1054 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1055 |
lemma approx_unique_real: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1056 |
"[| (r::hypreal) \<in> Reals; s \<in> Reals; r @= x; s @= x|] ==> r = s" |
14370 | 1057 |
by (blast intro: SReal_approx_iff [THEN iffD1] approx_trans2) |
1058 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1059 |
|
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1060 |
subsection{* Existence of Unique Real Infinitely Close*} |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1061 |
|
14370 | 1062 |
(* lemma about lubs *) |
1063 |
lemma hypreal_isLub_unique: |
|
1064 |
"[| isLub R S x; isLub R S y |] ==> x = (y::hypreal)" |
|
1065 |
apply (frule isLub_isUb) |
|
1066 |
apply (frule_tac x = y in isLub_isUb) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1067 |
apply (blast intro!: order_antisym dest!: isLub_le_isUb) |
14370 | 1068 |
done |
1069 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1070 |
lemma lemma_st_part_ub: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1071 |
"(x::hypreal) \<in> HFinite ==> \<exists>u. isUb Reals {s. s \<in> Reals & s < x} u" |
14370 | 1072 |
apply (drule HFiniteD, safe) |
1073 |
apply (rule exI, rule isUbI) |
|
1074 |
apply (auto intro: setleI isUbI simp add: abs_less_iff) |
|
1075 |
done |
|
1076 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1077 |
lemma lemma_st_part_nonempty: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1078 |
"(x::hypreal) \<in> HFinite ==> \<exists>y. y \<in> {s. s \<in> Reals & s < x}" |
14370 | 1079 |
apply (drule HFiniteD, safe) |
1080 |
apply (drule SReal_minus) |
|
1081 |
apply (rule_tac x = "-t" in exI) |
|
1082 |
apply (auto simp add: abs_less_iff) |
|
1083 |
done |
|
1084 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1085 |
lemma lemma_st_part_subset: "{s. s \<in> Reals & s < x} \<subseteq> Reals" |
14370 | 1086 |
by auto |
1087 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1088 |
lemma lemma_st_part_lub: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1089 |
"(x::hypreal) \<in> HFinite ==> \<exists>t. isLub Reals {s. s \<in> Reals & s < x} t" |
14370 | 1090 |
by (blast intro!: SReal_complete lemma_st_part_ub lemma_st_part_nonempty lemma_st_part_subset) |
1091 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1092 |
lemma lemma_hypreal_le_left_cancel: "((t::hypreal) + r \<le> t) = (r \<le> 0)" |
14370 | 1093 |
apply safe |
1094 |
apply (drule_tac c = "-t" in add_left_mono) |
|
1095 |
apply (drule_tac [2] c = t in add_left_mono) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1096 |
apply (auto simp add: add_assoc [symmetric]) |
14370 | 1097 |
done |
1098 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1099 |
lemma lemma_st_part_le1: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1100 |
"[| (x::hypreal) \<in> HFinite; isLub Reals {s. s \<in> Reals & s < x} t; |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1101 |
r \<in> Reals; 0 < r |] ==> x \<le> t + r" |
14370 | 1102 |
apply (frule isLubD1a) |
1103 |
apply (rule ccontr, drule linorder_not_le [THEN iffD2]) |
|
1104 |
apply (drule_tac x = t in SReal_add, assumption) |
|
1105 |
apply (drule_tac y = "t + r" in isLubD1 [THEN setleD], auto) |
|
1106 |
done |
|
1107 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1108 |
lemma hypreal_setle_less_trans: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1109 |
"[| S *<= (x::hypreal); x < y |] ==> S *<= y" |
14370 | 1110 |
apply (simp add: setle_def) |
1111 |
apply (auto dest!: bspec order_le_less_trans intro: order_less_imp_le) |
|
1112 |
done |
|
1113 |
||
1114 |
lemma hypreal_gt_isUb: |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1115 |
"[| isUb R S (x::hypreal); x < y; y \<in> R |] ==> isUb R S y" |
14370 | 1116 |
apply (simp add: isUb_def) |
1117 |
apply (blast intro: hypreal_setle_less_trans) |
|
1118 |
done |
|
1119 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1120 |
lemma lemma_st_part_gt_ub: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1121 |
"[| (x::hypreal) \<in> HFinite; x < y; y \<in> Reals |] |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1122 |
==> isUb Reals {s. s \<in> Reals & s < x} y" |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1123 |
by (auto dest: order_less_trans intro: order_less_imp_le intro!: isUbI setleI) |
14370 | 1124 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1125 |
lemma lemma_minus_le_zero: "t \<le> t + -r ==> r \<le> (0::hypreal)" |
14370 | 1126 |
apply (drule_tac c = "-t" in add_left_mono) |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1127 |
apply (auto simp add: add_assoc [symmetric]) |
14370 | 1128 |
done |
1129 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1130 |
lemma lemma_st_part_le2: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1131 |
"[| (x::hypreal) \<in> HFinite; |
14370 | 1132 |
isLub Reals {s. s \<in> Reals & s < x} t; |
1133 |
r \<in> Reals; 0 < r |] |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1134 |
==> t + -r \<le> x" |
14370 | 1135 |
apply (frule isLubD1a) |
1136 |
apply (rule ccontr, drule linorder_not_le [THEN iffD1]) |
|
1137 |
apply (drule SReal_minus, drule_tac x = t in SReal_add, assumption) |
|
1138 |
apply (drule lemma_st_part_gt_ub, assumption+) |
|
1139 |
apply (drule isLub_le_isUb, assumption) |
|
1140 |
apply (drule lemma_minus_le_zero) |
|
1141 |
apply (auto dest: order_less_le_trans) |
|
1142 |
done |
|
1143 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1144 |
lemma lemma_st_part1a: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1145 |
"[| (x::hypreal) \<in> HFinite; |
14370 | 1146 |
isLub Reals {s. s \<in> Reals & s < x} t; |
1147 |
r \<in> Reals; 0 < r |] |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1148 |
==> x + -t \<le> r" |
15229 | 1149 |
apply (subgoal_tac "x \<le> t+r") |
1150 |
apply (auto intro: lemma_st_part_le1) |
|
1151 |
done |
|
14370 | 1152 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1153 |
lemma lemma_st_part2a: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1154 |
"[| (x::hypreal) \<in> HFinite; |
14370 | 1155 |
isLub Reals {s. s \<in> Reals & s < x} t; |
1156 |
r \<in> Reals; 0 < r |] |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1157 |
==> -(x + -t) \<le> r" |
15229 | 1158 |
apply (subgoal_tac "(t + -r \<le> x)") |
1159 |
apply (auto intro: lemma_st_part_le2) |
|
14370 | 1160 |
done |
1161 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1162 |
lemma lemma_SReal_ub: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1163 |
"(x::hypreal) \<in> Reals ==> isUb Reals {s. s \<in> Reals & s < x} x" |
14370 | 1164 |
by (auto intro: isUbI setleI order_less_imp_le) |
1165 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1166 |
lemma lemma_SReal_lub: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1167 |
"(x::hypreal) \<in> Reals ==> isLub Reals {s. s \<in> Reals & s < x} x" |
14370 | 1168 |
apply (auto intro!: isLubI2 lemma_SReal_ub setgeI) |
1169 |
apply (frule isUbD2a) |
|
1170 |
apply (rule_tac x = x and y = y in linorder_cases) |
|
1171 |
apply (auto intro!: order_less_imp_le) |
|
1172 |
apply (drule SReal_dense, assumption, assumption, safe) |
|
1173 |
apply (drule_tac y = r in isUbD) |
|
1174 |
apply (auto dest: order_less_le_trans) |
|
1175 |
done |
|
1176 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1177 |
lemma lemma_st_part_not_eq1: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1178 |
"[| (x::hypreal) \<in> HFinite; |
14370 | 1179 |
isLub Reals {s. s \<in> Reals & s < x} t; |
1180 |
r \<in> Reals; 0 < r |] |
|
1181 |
==> x + -t \<noteq> r" |
|
1182 |
apply auto |
|
1183 |
apply (frule isLubD1a [THEN SReal_minus]) |
|
1184 |
apply (drule SReal_add_cancel, assumption) |
|
1185 |
apply (drule_tac x = x in lemma_SReal_lub) |
|
1186 |
apply (drule hypreal_isLub_unique, assumption, auto) |
|
1187 |
done |
|
1188 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1189 |
lemma lemma_st_part_not_eq2: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1190 |
"[| (x::hypreal) \<in> HFinite; |
14370 | 1191 |
isLub Reals {s. s \<in> Reals & s < x} t; |
1192 |
r \<in> Reals; 0 < r |] |
|
1193 |
==> -(x + -t) \<noteq> r" |
|
15539 | 1194 |
apply (auto) |
14370 | 1195 |
apply (frule isLubD1a) |
1196 |
apply (drule SReal_add_cancel, assumption) |
|
1197 |
apply (drule_tac x = "-x" in SReal_minus, simp) |
|
1198 |
apply (drule_tac x = x in lemma_SReal_lub) |
|
1199 |
apply (drule hypreal_isLub_unique, assumption, auto) |
|
1200 |
done |
|
1201 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1202 |
lemma lemma_st_part_major: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1203 |
"[| (x::hypreal) \<in> HFinite; |
14370 | 1204 |
isLub Reals {s. s \<in> Reals & s < x} t; |
1205 |
r \<in> Reals; 0 < r |] |
|
20563 | 1206 |
==> abs (x - t) < r" |
14370 | 1207 |
apply (frule lemma_st_part1a) |
1208 |
apply (frule_tac [4] lemma_st_part2a, auto) |
|
1209 |
apply (drule order_le_imp_less_or_eq)+ |
|
1210 |
apply (auto dest: lemma_st_part_not_eq1 lemma_st_part_not_eq2 simp add: abs_less_iff) |
|
1211 |
done |
|
1212 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1213 |
lemma lemma_st_part_major2: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1214 |
"[| (x::hypreal) \<in> HFinite; isLub Reals {s. s \<in> Reals & s < x} t |] |
20563 | 1215 |
==> \<forall>r \<in> Reals. 0 < r --> abs (x - t) < r" |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1216 |
by (blast dest!: lemma_st_part_major) |
14370 | 1217 |
|
15229 | 1218 |
|
1219 |
text{*Existence of real and Standard Part Theorem*} |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1220 |
lemma lemma_st_part_Ex: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1221 |
"(x::hypreal) \<in> HFinite |
20563 | 1222 |
==> \<exists>t \<in> Reals. \<forall>r \<in> Reals. 0 < r --> abs (x - t) < r" |
14370 | 1223 |
apply (frule lemma_st_part_lub, safe) |
1224 |
apply (frule isLubD1a) |
|
1225 |
apply (blast dest: lemma_st_part_major2) |
|
1226 |
done |
|
1227 |
||
1228 |
lemma st_part_Ex: |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1229 |
"(x::hypreal) \<in> HFinite ==> \<exists>t \<in> Reals. x @= t" |
14370 | 1230 |
apply (simp add: approx_def Infinitesimal_def) |
1231 |
apply (drule lemma_st_part_Ex, auto) |
|
1232 |
done |
|
1233 |
||
15229 | 1234 |
text{*There is a unique real infinitely close*} |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1235 |
lemma st_part_Ex1: "x \<in> HFinite ==> EX! t::hypreal. t \<in> Reals & x @= t" |
14370 | 1236 |
apply (drule st_part_Ex, safe) |
1237 |
apply (drule_tac [2] approx_sym, drule_tac [2] approx_sym, drule_tac [2] approx_sym) |
|
1238 |
apply (auto intro!: approx_unique_real) |
|
1239 |
done |
|
1240 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1241 |
subsection{* Finite, Infinite and Infinitesimal*} |
14370 | 1242 |
|
15229 | 1243 |
lemma HFinite_Int_HInfinite_empty [simp]: "HFinite Int HInfinite = {}" |
14370 | 1244 |
apply (simp add: HFinite_def HInfinite_def) |
1245 |
apply (auto dest: order_less_trans) |
|
1246 |
done |
|
1247 |
||
1248 |
lemma HFinite_not_HInfinite: |
|
1249 |
assumes x: "x \<in> HFinite" shows "x \<notin> HInfinite" |
|
1250 |
proof |
|
1251 |
assume x': "x \<in> HInfinite" |
|
1252 |
with x have "x \<in> HFinite \<inter> HInfinite" by blast |
|
1253 |
thus False by auto |
|
1254 |
qed |
|
1255 |
||
1256 |
lemma not_HFinite_HInfinite: "x\<notin> HFinite ==> x \<in> HInfinite" |
|
1257 |
apply (simp add: HInfinite_def HFinite_def, auto) |
|
1258 |
apply (drule_tac x = "r + 1" in bspec) |
|
15539 | 1259 |
apply (auto) |
14370 | 1260 |
done |
1261 |
||
1262 |
lemma HInfinite_HFinite_disj: "x \<in> HInfinite | x \<in> HFinite" |
|
1263 |
by (blast intro: not_HFinite_HInfinite) |
|
1264 |
||
1265 |
lemma HInfinite_HFinite_iff: "(x \<in> HInfinite) = (x \<notin> HFinite)" |
|
1266 |
by (blast dest: HFinite_not_HInfinite not_HFinite_HInfinite) |
|
1267 |
||
1268 |
lemma HFinite_HInfinite_iff: "(x \<in> HFinite) = (x \<notin> HInfinite)" |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1269 |
by (simp add: HInfinite_HFinite_iff) |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1270 |
|
14370 | 1271 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1272 |
lemma HInfinite_diff_HFinite_Infinitesimal_disj: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1273 |
"x \<notin> Infinitesimal ==> x \<in> HInfinite | x \<in> HFinite - Infinitesimal" |
14370 | 1274 |
by (fast intro: not_HFinite_HInfinite) |
1275 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1276 |
lemma HFinite_inverse: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1277 |
fixes x :: "'a::{real_normed_div_algebra,division_by_zero} star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1278 |
shows "[| x \<in> HFinite; x \<notin> Infinitesimal |] ==> inverse x \<in> HFinite" |
14370 | 1279 |
apply (cut_tac x = "inverse x" in HInfinite_HFinite_disj) |
1280 |
apply (auto dest!: HInfinite_inverse_Infinitesimal) |
|
1281 |
done |
|
1282 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1283 |
lemma HFinite_inverse2: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1284 |
fixes x :: "'a::{real_normed_div_algebra,division_by_zero} star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1285 |
shows "x \<in> HFinite - Infinitesimal ==> inverse x \<in> HFinite" |
14370 | 1286 |
by (blast intro: HFinite_inverse) |
1287 |
||
1288 |
(* stronger statement possible in fact *) |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1289 |
lemma Infinitesimal_inverse_HFinite: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1290 |
fixes x :: "'a::{real_normed_div_algebra,division_by_zero} star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1291 |
shows "x \<notin> Infinitesimal ==> inverse(x) \<in> HFinite" |
14370 | 1292 |
apply (drule HInfinite_diff_HFinite_Infinitesimal_disj) |
1293 |
apply (blast intro: HFinite_inverse HInfinite_inverse_Infinitesimal Infinitesimal_subset_HFinite [THEN subsetD]) |
|
1294 |
done |
|
1295 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1296 |
lemma HFinite_not_Infinitesimal_inverse: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1297 |
fixes x :: "'a::{real_normed_div_algebra,division_by_zero} star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1298 |
shows "x \<in> HFinite - Infinitesimal ==> inverse x \<in> HFinite - Infinitesimal" |
14370 | 1299 |
apply (auto intro: Infinitesimal_inverse_HFinite) |
1300 |
apply (drule Infinitesimal_HFinite_mult2, assumption) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1301 |
apply (simp add: not_Infinitesimal_not_zero right_inverse) |
14370 | 1302 |
done |
1303 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1304 |
lemma approx_inverse: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1305 |
fixes x y :: "'a::{real_normed_div_algebra,division_by_zero} star" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1306 |
shows |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1307 |
"[| x @= y; y \<in> HFinite - Infinitesimal |] |
14370 | 1308 |
==> inverse x @= inverse y" |
1309 |
apply (frule HFinite_diff_Infinitesimal_approx, assumption) |
|
1310 |
apply (frule not_Infinitesimal_not_zero2) |
|
1311 |
apply (frule_tac x = x in not_Infinitesimal_not_zero2) |
|
1312 |
apply (drule HFinite_inverse2)+ |
|
1313 |
apply (drule approx_mult2, assumption, auto) |
|
1314 |
apply (drule_tac c = "inverse x" in approx_mult1, assumption) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1315 |
apply (auto intro: approx_sym simp add: mult_assoc) |
14370 | 1316 |
done |
1317 |
||
1318 |
(*Used for NSLIM_inverse, NSLIMSEQ_inverse*) |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1319 |
lemmas star_of_approx_inverse = star_of_HFinite_diff_Infinitesimal [THEN [2] approx_inverse] |
14370 | 1320 |
lemmas hypreal_of_real_approx_inverse = hypreal_of_real_HFinite_diff_Infinitesimal [THEN [2] approx_inverse] |
1321 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1322 |
lemma inverse_add_Infinitesimal_approx: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1323 |
fixes x h :: "'a::{real_normed_div_algebra,division_by_zero} star" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1324 |
shows |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1325 |
"[| x \<in> HFinite - Infinitesimal; |
14370 | 1326 |
h \<in> Infinitesimal |] ==> inverse(x + h) @= inverse x" |
1327 |
apply (auto intro: approx_inverse approx_sym Infinitesimal_add_approx_self) |
|
1328 |
done |
|
1329 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1330 |
lemma inverse_add_Infinitesimal_approx2: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1331 |
fixes x h :: "'a::{real_normed_div_algebra,division_by_zero} star" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1332 |
shows |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1333 |
"[| x \<in> HFinite - Infinitesimal; |
14370 | 1334 |
h \<in> Infinitesimal |] ==> inverse(h + x) @= inverse x" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1335 |
apply (rule add_commute [THEN subst]) |
14370 | 1336 |
apply (blast intro: inverse_add_Infinitesimal_approx) |
1337 |
done |
|
1338 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1339 |
lemma inverse_add_Infinitesimal_approx_Infinitesimal: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1340 |
fixes x h :: "'a::{real_normed_div_algebra,division_by_zero} star" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1341 |
shows |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1342 |
"[| x \<in> HFinite - Infinitesimal; |
20563 | 1343 |
h \<in> Infinitesimal |] ==> inverse(x + h) - inverse x @= h" |
14370 | 1344 |
apply (rule approx_trans2) |
15229 | 1345 |
apply (auto intro: inverse_add_Infinitesimal_approx |
1346 |
simp add: mem_infmal_iff approx_minus_iff [symmetric]) |
|
14370 | 1347 |
done |
1348 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1349 |
lemma Infinitesimal_square_iff: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1350 |
fixes x :: "'a::{real_normed_div_algebra,division_by_zero} star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1351 |
shows "(x \<in> Infinitesimal) = (x*x \<in> Infinitesimal)" |
14370 | 1352 |
apply (auto intro: Infinitesimal_mult) |
1353 |
apply (rule ccontr, frule Infinitesimal_inverse_HFinite) |
|
1354 |
apply (frule not_Infinitesimal_not_zero) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1355 |
apply (auto dest: Infinitesimal_HFinite_mult simp add: mult_assoc) |
14370 | 1356 |
done |
1357 |
declare Infinitesimal_square_iff [symmetric, simp] |
|
1358 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1359 |
lemma HFinite_square_iff [simp]: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1360 |
fixes x :: "'a::real_normed_div_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1361 |
shows "(x*x \<in> HFinite) = (x \<in> HFinite)" |
14370 | 1362 |
apply (auto intro: HFinite_mult) |
1363 |
apply (auto dest: HInfinite_mult simp add: HFinite_HInfinite_iff) |
|
1364 |
done |
|
1365 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1366 |
lemma HInfinite_square_iff [simp]: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1367 |
fixes x :: "'a::real_normed_div_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1368 |
shows "(x*x \<in> HInfinite) = (x \<in> HInfinite)" |
14370 | 1369 |
by (auto simp add: HInfinite_HFinite_iff) |
1370 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1371 |
lemma approx_HFinite_mult_cancel: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1372 |
fixes a w z :: "'a::{real_normed_div_algebra,division_by_zero} star" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1373 |
shows "[| a: HFinite-Infinitesimal; a* w @= a*z |] ==> w @= z" |
14370 | 1374 |
apply safe |
1375 |
apply (frule HFinite_inverse, assumption) |
|
1376 |
apply (drule not_Infinitesimal_not_zero) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1377 |
apply (auto dest: approx_mult2 simp add: mult_assoc [symmetric]) |
14370 | 1378 |
done |
1379 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1380 |
lemma approx_HFinite_mult_cancel_iff1: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1381 |
fixes a w z :: "'a::{real_normed_div_algebra,division_by_zero} star" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1382 |
shows "a: HFinite-Infinitesimal ==> (a * w @= a * z) = (w @= z)" |
14370 | 1383 |
by (auto intro: approx_mult2 approx_HFinite_mult_cancel) |
1384 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1385 |
lemma HInfinite_HFinite_add_cancel: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1386 |
"[| x + y \<in> HInfinite; y \<in> HFinite |] ==> x \<in> HInfinite" |
14370 | 1387 |
apply (rule ccontr) |
1388 |
apply (drule HFinite_HInfinite_iff [THEN iffD2]) |
|
1389 |
apply (auto dest: HFinite_add simp add: HInfinite_HFinite_iff) |
|
1390 |
done |
|
1391 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1392 |
lemma HInfinite_HFinite_add: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1393 |
"[| x \<in> HInfinite; y \<in> HFinite |] ==> x + y \<in> HInfinite" |
14370 | 1394 |
apply (rule_tac y = "-y" in HInfinite_HFinite_add_cancel) |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1395 |
apply (auto simp add: add_assoc HFinite_minus_iff) |
14370 | 1396 |
done |
1397 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1398 |
lemma HInfinite_ge_HInfinite: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1399 |
"[| (x::hypreal) \<in> HInfinite; x \<le> y; 0 \<le> x |] ==> y \<in> HInfinite" |
14370 | 1400 |
by (auto intro: HFinite_bounded simp add: HInfinite_HFinite_iff) |
1401 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1402 |
lemma Infinitesimal_inverse_HInfinite: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1403 |
fixes x :: "'a::real_normed_div_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1404 |
shows "[| x \<in> Infinitesimal; x \<noteq> 0 |] ==> inverse x \<in> HInfinite" |
14370 | 1405 |
apply (rule ccontr, drule HFinite_HInfinite_iff [THEN iffD2]) |
1406 |
apply (auto dest: Infinitesimal_HFinite_mult2) |
|
1407 |
done |
|
1408 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1409 |
lemma HInfinite_HFinite_not_Infinitesimal_mult: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1410 |
fixes x y :: "'a::{real_normed_div_algebra,division_by_zero} star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1411 |
shows "[| x \<in> HInfinite; y \<in> HFinite - Infinitesimal |] |
14370 | 1412 |
==> x * y \<in> HInfinite" |
1413 |
apply (rule ccontr, drule HFinite_HInfinite_iff [THEN iffD2]) |
|
1414 |
apply (frule HFinite_Infinitesimal_not_zero) |
|
1415 |
apply (drule HFinite_not_Infinitesimal_inverse) |
|
1416 |
apply (safe, drule HFinite_mult) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1417 |
apply (auto simp add: mult_assoc HFinite_HInfinite_iff) |
14370 | 1418 |
done |
1419 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1420 |
lemma HInfinite_HFinite_not_Infinitesimal_mult2: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1421 |
fixes x y :: "'a::{real_normed_div_algebra,division_by_zero} star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1422 |
shows "[| x \<in> HInfinite; y \<in> HFinite - Infinitesimal |] |
14370 | 1423 |
==> y * x \<in> HInfinite" |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1424 |
apply (rule ccontr, drule HFinite_HInfinite_iff [THEN iffD2]) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1425 |
apply (frule HFinite_Infinitesimal_not_zero) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1426 |
apply (drule HFinite_not_Infinitesimal_inverse) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1427 |
apply (safe, drule_tac x="inverse y" in HFinite_mult) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1428 |
apply assumption |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1429 |
apply (auto simp add: mult_assoc [symmetric] HFinite_HInfinite_iff) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1430 |
done |
14370 | 1431 |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1432 |
lemma HInfinite_gt_SReal: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1433 |
"[| (x::hypreal) \<in> HInfinite; 0 < x; y \<in> Reals |] ==> y < x" |
15003 | 1434 |
by (auto dest!: bspec simp add: HInfinite_def abs_if order_less_imp_le) |
14370 | 1435 |
|
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1436 |
lemma HInfinite_gt_zero_gt_one: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1437 |
"[| (x::hypreal) \<in> HInfinite; 0 < x |] ==> 1 < x" |
14370 | 1438 |
by (auto intro: HInfinite_gt_SReal) |
1439 |
||
1440 |
||
15229 | 1441 |
lemma not_HInfinite_one [simp]: "1 \<notin> HInfinite" |
14370 | 1442 |
apply (simp (no_asm) add: HInfinite_HFinite_iff) |
1443 |
done |
|
1444 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1445 |
lemma approx_hrabs_disj: "abs (x::hypreal) @= x | abs x @= -x" |
14370 | 1446 |
by (cut_tac x = x in hrabs_disj, auto) |
1447 |
||
1448 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1449 |
subsection{*Theorems about Monads*} |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1450 |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1451 |
lemma monad_hrabs_Un_subset: "monad (abs x) \<le> monad(x::hypreal) Un monad(-x)" |
14370 | 1452 |
by (rule_tac x1 = x in hrabs_disj [THEN disjE], auto) |
1453 |
||
1454 |
lemma Infinitesimal_monad_eq: "e \<in> Infinitesimal ==> monad (x+e) = monad x" |
|
1455 |
by (fast intro!: Infinitesimal_add_approx_self [THEN approx_sym] approx_monad_iff [THEN iffD1]) |
|
1456 |
||
1457 |
lemma mem_monad_iff: "(u \<in> monad x) = (-u \<in> monad (-x))" |
|
1458 |
by (simp add: monad_def) |
|
1459 |
||
1460 |
lemma Infinitesimal_monad_zero_iff: "(x \<in> Infinitesimal) = (x \<in> monad 0)" |
|
1461 |
by (auto intro: approx_sym simp add: monad_def mem_infmal_iff) |
|
1462 |
||
1463 |
lemma monad_zero_minus_iff: "(x \<in> monad 0) = (-x \<in> monad 0)" |
|
1464 |
apply (simp (no_asm) add: Infinitesimal_monad_zero_iff [symmetric]) |
|
1465 |
done |
|
1466 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1467 |
lemma monad_zero_hrabs_iff: "((x::hypreal) \<in> monad 0) = (abs x \<in> monad 0)" |
14370 | 1468 |
apply (rule_tac x1 = x in hrabs_disj [THEN disjE]) |
1469 |
apply (auto simp add: monad_zero_minus_iff [symmetric]) |
|
1470 |
done |
|
1471 |
||
15229 | 1472 |
lemma mem_monad_self [simp]: "x \<in> monad x" |
14370 | 1473 |
by (simp add: monad_def) |
15229 | 1474 |
|
14370 | 1475 |
|
15229 | 1476 |
subsection{*Proof that @{term "x @= y"} implies @{term"\<bar>x\<bar> @= \<bar>y\<bar>"}*} |
1477 |
||
1478 |
lemma approx_subset_monad: "x @= y ==> {x,y} \<le> monad x" |
|
14370 | 1479 |
apply (simp (no_asm)) |
1480 |
apply (simp add: approx_monad_iff) |
|
1481 |
done |
|
1482 |
||
15229 | 1483 |
lemma approx_subset_monad2: "x @= y ==> {x,y} \<le> monad y" |
14370 | 1484 |
apply (drule approx_sym) |
1485 |
apply (fast dest: approx_subset_monad) |
|
1486 |
done |
|
1487 |
||
1488 |
lemma mem_monad_approx: "u \<in> monad x ==> x @= u" |
|
1489 |
by (simp add: monad_def) |
|
1490 |
||
1491 |
lemma approx_mem_monad: "x @= u ==> u \<in> monad x" |
|
1492 |
by (simp add: monad_def) |
|
1493 |
||
1494 |
lemma approx_mem_monad2: "x @= u ==> x \<in> monad u" |
|
1495 |
apply (simp add: monad_def) |
|
1496 |
apply (blast intro!: approx_sym) |
|
1497 |
done |
|
1498 |
||
1499 |
lemma approx_mem_monad_zero: "[| x @= y;x \<in> monad 0 |] ==> y \<in> monad 0" |
|
1500 |
apply (drule mem_monad_approx) |
|
1501 |
apply (fast intro: approx_mem_monad approx_trans) |
|
1502 |
done |
|
1503 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1504 |
lemma Infinitesimal_approx_hrabs: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1505 |
"[| x @= y; (x::hypreal) \<in> Infinitesimal |] ==> abs x @= abs y" |
14370 | 1506 |
apply (drule Infinitesimal_monad_zero_iff [THEN iffD1]) |
1507 |
apply (blast intro: approx_mem_monad_zero monad_zero_hrabs_iff [THEN iffD1] mem_monad_approx approx_trans3) |
|
1508 |
done |
|
1509 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1510 |
lemma less_Infinitesimal_less: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1511 |
"[| 0 < x; (x::hypreal) \<notin>Infinitesimal; e :Infinitesimal |] ==> e < x" |
14370 | 1512 |
apply (rule ccontr) |
1513 |
apply (auto intro: Infinitesimal_zero [THEN [2] Infinitesimal_interval] |
|
1514 |
dest!: order_le_imp_less_or_eq simp add: linorder_not_less) |
|
1515 |
done |
|
1516 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1517 |
lemma Ball_mem_monad_gt_zero: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1518 |
"[| 0 < (x::hypreal); x \<notin> Infinitesimal; u \<in> monad x |] ==> 0 < u" |
14370 | 1519 |
apply (drule mem_monad_approx [THEN approx_sym]) |
1520 |
apply (erule bex_Infinitesimal_iff2 [THEN iffD2, THEN bexE]) |
|
1521 |
apply (drule_tac e = "-xa" in less_Infinitesimal_less, auto) |
|
1522 |
done |
|
1523 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1524 |
lemma Ball_mem_monad_less_zero: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1525 |
"[| (x::hypreal) < 0; x \<notin> Infinitesimal; u \<in> monad x |] ==> u < 0" |
14370 | 1526 |
apply (drule mem_monad_approx [THEN approx_sym]) |
1527 |
apply (erule bex_Infinitesimal_iff [THEN iffD2, THEN bexE]) |
|
1528 |
apply (cut_tac x = "-x" and e = xa in less_Infinitesimal_less, auto) |
|
1529 |
done |
|
1530 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1531 |
lemma lemma_approx_gt_zero: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1532 |
"[|0 < (x::hypreal); x \<notin> Infinitesimal; x @= y|] ==> 0 < y" |
14370 | 1533 |
by (blast dest: Ball_mem_monad_gt_zero approx_subset_monad) |
1534 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1535 |
lemma lemma_approx_less_zero: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1536 |
"[|(x::hypreal) < 0; x \<notin> Infinitesimal; x @= y|] ==> y < 0" |
14370 | 1537 |
by (blast dest: Ball_mem_monad_less_zero approx_subset_monad) |
1538 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1539 |
theorem approx_hrabs: "(x::hypreal) @= y ==> abs x @= abs y" |
15229 | 1540 |
apply (case_tac "x \<in> Infinitesimal") |
1541 |
apply (simp add: Infinitesimal_approx_hrabs) |
|
1542 |
apply (rule linorder_cases [of 0 x]) |
|
1543 |
apply (frule lemma_approx_gt_zero [of x y]) |
|
16775
c1b87ef4a1c3
added lemmas to OrderedGroup.thy (reasoning about signs, absolute value, triangle inequalities)
avigad
parents:
15539
diff
changeset
|
1544 |
apply (auto simp add: lemma_approx_less_zero [of x y] abs_of_neg) |
14370 | 1545 |
done |
1546 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1547 |
lemma approx_hrabs_zero_cancel: "abs(x::hypreal) @= 0 ==> x @= 0" |
14370 | 1548 |
apply (cut_tac x = x in hrabs_disj) |
1549 |
apply (auto dest: approx_minus) |
|
1550 |
done |
|
1551 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1552 |
lemma approx_hrabs_add_Infinitesimal: |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1553 |
"(e::hypreal) \<in> Infinitesimal ==> abs x @= abs(x+e)" |
14370 | 1554 |
by (fast intro: approx_hrabs Infinitesimal_add_approx_self) |
1555 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1556 |
lemma approx_hrabs_add_minus_Infinitesimal: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1557 |
"(e::hypreal) \<in> Infinitesimal ==> abs x @= abs(x + -e)" |
14370 | 1558 |
by (fast intro: approx_hrabs Infinitesimal_add_minus_approx_self) |
1559 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1560 |
lemma hrabs_add_Infinitesimal_cancel: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1561 |
"[| (e::hypreal) \<in> Infinitesimal; e' \<in> Infinitesimal; |
14370 | 1562 |
abs(x+e) = abs(y+e')|] ==> abs x @= abs y" |
1563 |
apply (drule_tac x = x in approx_hrabs_add_Infinitesimal) |
|
1564 |
apply (drule_tac x = y in approx_hrabs_add_Infinitesimal) |
|
1565 |
apply (auto intro: approx_trans2) |
|
1566 |
done |
|
1567 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1568 |
lemma hrabs_add_minus_Infinitesimal_cancel: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1569 |
"[| (e::hypreal) \<in> Infinitesimal; e' \<in> Infinitesimal; |
14370 | 1570 |
abs(x + -e) = abs(y + -e')|] ==> abs x @= abs y" |
1571 |
apply (drule_tac x = x in approx_hrabs_add_minus_Infinitesimal) |
|
1572 |
apply (drule_tac x = y in approx_hrabs_add_minus_Infinitesimal) |
|
1573 |
apply (auto intro: approx_trans2) |
|
1574 |
done |
|
1575 |
||
1576 |
(* interesting slightly counterintuitive theorem: necessary |
|
1577 |
for proving that an open interval is an NS open set |
|
1578 |
*) |
|
1579 |
lemma Infinitesimal_add_hypreal_of_real_less: |
|
1580 |
"[| x < y; u \<in> Infinitesimal |] |
|
1581 |
==> hypreal_of_real x + u < hypreal_of_real y" |
|
1582 |
apply (simp add: Infinitesimal_def) |
|
17431 | 1583 |
apply (drule_tac x = "hypreal_of_real y + -hypreal_of_real x" in bspec, simp) |
20254
58b71535ed00
lin_arith_prover splits certain operators (e.g. min, max, abs)
webertj
parents:
20217
diff
changeset
|
1584 |
apply (simp add: abs_less_iff) |
14370 | 1585 |
done |
1586 |
||
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14378
diff
changeset
|
1587 |
lemma Infinitesimal_add_hrabs_hypreal_of_real_less: |
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14378
diff
changeset
|
1588 |
"[| x \<in> Infinitesimal; abs(hypreal_of_real r) < hypreal_of_real y |] |
14370 | 1589 |
==> abs (hypreal_of_real r + x) < hypreal_of_real y" |
1590 |
apply (drule_tac x = "hypreal_of_real r" in approx_hrabs_add_Infinitesimal) |
|
1591 |
apply (drule approx_sym [THEN bex_Infinitesimal_iff2 [THEN iffD2]]) |
|
15229 | 1592 |
apply (auto intro!: Infinitesimal_add_hypreal_of_real_less |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1593 |
simp del: star_of_abs |
15229 | 1594 |
simp add: hypreal_of_real_hrabs) |
14370 | 1595 |
done |
1596 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1597 |
lemma Infinitesimal_add_hrabs_hypreal_of_real_less2: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1598 |
"[| x \<in> Infinitesimal; abs(hypreal_of_real r) < hypreal_of_real y |] |
14370 | 1599 |
==> abs (x + hypreal_of_real r) < hypreal_of_real y" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1600 |
apply (rule add_commute [THEN subst]) |
14370 | 1601 |
apply (erule Infinitesimal_add_hrabs_hypreal_of_real_less, assumption) |
1602 |
done |
|
1603 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1604 |
lemma hypreal_of_real_le_add_Infininitesimal_cancel: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1605 |
"[| u \<in> Infinitesimal; v \<in> Infinitesimal; |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1606 |
hypreal_of_real x + u \<le> hypreal_of_real y + v |] |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1607 |
==> hypreal_of_real x \<le> hypreal_of_real y" |
14370 | 1608 |
apply (simp add: linorder_not_less [symmetric], auto) |
1609 |
apply (drule_tac u = "v-u" in Infinitesimal_add_hypreal_of_real_less) |
|
1610 |
apply (auto simp add: Infinitesimal_diff) |
|
1611 |
done |
|
1612 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1613 |
lemma hypreal_of_real_le_add_Infininitesimal_cancel2: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1614 |
"[| u \<in> Infinitesimal; v \<in> Infinitesimal; |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1615 |
hypreal_of_real x + u \<le> hypreal_of_real y + v |] |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1616 |
==> x \<le> y" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1617 |
by (blast intro: star_of_le [THEN iffD1] |
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1618 |
intro!: hypreal_of_real_le_add_Infininitesimal_cancel) |
14370 | 1619 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1620 |
lemma hypreal_of_real_less_Infinitesimal_le_zero: |
15229 | 1621 |
"[| hypreal_of_real x < e; e \<in> Infinitesimal |] ==> hypreal_of_real x \<le> 0" |
14370 | 1622 |
apply (rule linorder_not_less [THEN iffD1], safe) |
1623 |
apply (drule Infinitesimal_interval) |
|
1624 |
apply (drule_tac [4] SReal_hypreal_of_real [THEN SReal_Infinitesimal_zero], auto) |
|
1625 |
done |
|
1626 |
||
1627 |
(*used once, in Lim/NSDERIV_inverse*) |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1628 |
lemma Infinitesimal_add_not_zero: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1629 |
"[| h \<in> Infinitesimal; x \<noteq> 0 |] ==> hypreal_of_real x + h \<noteq> 0" |
14370 | 1630 |
apply auto |
1631 |
apply (subgoal_tac "h = - hypreal_of_real x", auto) |
|
1632 |
done |
|
1633 |
||
15229 | 1634 |
lemma Infinitesimal_square_cancel [simp]: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1635 |
"(x::hypreal)*x + y*y \<in> Infinitesimal ==> x*x \<in> Infinitesimal" |
14370 | 1636 |
apply (rule Infinitesimal_interval2) |
1637 |
apply (rule_tac [3] zero_le_square, assumption) |
|
1638 |
apply (auto simp add: zero_le_square) |
|
1639 |
done |
|
1640 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1641 |
lemma HFinite_square_cancel [simp]: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1642 |
"(x::hypreal)*x + y*y \<in> HFinite ==> x*x \<in> HFinite" |
14370 | 1643 |
apply (rule HFinite_bounded, assumption) |
1644 |
apply (auto simp add: zero_le_square) |
|
1645 |
done |
|
1646 |
||
15229 | 1647 |
lemma Infinitesimal_square_cancel2 [simp]: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1648 |
"(x::hypreal)*x + y*y \<in> Infinitesimal ==> y*y \<in> Infinitesimal" |
14370 | 1649 |
apply (rule Infinitesimal_square_cancel) |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1650 |
apply (rule add_commute [THEN subst]) |
14370 | 1651 |
apply (simp (no_asm)) |
1652 |
done |
|
1653 |
||
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1654 |
lemma HFinite_square_cancel2 [simp]: |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1655 |
"(x::hypreal)*x + y*y \<in> HFinite ==> y*y \<in> HFinite" |
14370 | 1656 |
apply (rule HFinite_square_cancel) |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1657 |
apply (rule add_commute [THEN subst]) |
14370 | 1658 |
apply (simp (no_asm)) |
1659 |
done |
|
1660 |
||
15229 | 1661 |
lemma Infinitesimal_sum_square_cancel [simp]: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1662 |
"(x::hypreal)*x + y*y + z*z \<in> Infinitesimal ==> x*x \<in> Infinitesimal" |
14370 | 1663 |
apply (rule Infinitesimal_interval2, assumption) |
1664 |
apply (rule_tac [2] zero_le_square, simp) |
|
1665 |
apply (insert zero_le_square [of y]) |
|
1666 |
apply (insert zero_le_square [of z], simp) |
|
1667 |
done |
|
1668 |
||
15229 | 1669 |
lemma HFinite_sum_square_cancel [simp]: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1670 |
"(x::hypreal)*x + y*y + z*z \<in> HFinite ==> x*x \<in> HFinite" |
14370 | 1671 |
apply (rule HFinite_bounded, assumption) |
1672 |
apply (rule_tac [2] zero_le_square) |
|
1673 |
apply (insert zero_le_square [of y]) |
|
1674 |
apply (insert zero_le_square [of z], simp) |
|
1675 |
done |
|
1676 |
||
15229 | 1677 |
lemma Infinitesimal_sum_square_cancel2 [simp]: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1678 |
"(y::hypreal)*y + x*x + z*z \<in> Infinitesimal ==> x*x \<in> Infinitesimal" |
14370 | 1679 |
apply (rule Infinitesimal_sum_square_cancel) |
1680 |
apply (simp add: add_ac) |
|
1681 |
done |
|
1682 |
||
15229 | 1683 |
lemma HFinite_sum_square_cancel2 [simp]: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1684 |
"(y::hypreal)*y + x*x + z*z \<in> HFinite ==> x*x \<in> HFinite" |
14370 | 1685 |
apply (rule HFinite_sum_square_cancel) |
1686 |
apply (simp add: add_ac) |
|
1687 |
done |
|
1688 |
||
15229 | 1689 |
lemma Infinitesimal_sum_square_cancel3 [simp]: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1690 |
"(z::hypreal)*z + y*y + x*x \<in> Infinitesimal ==> x*x \<in> Infinitesimal" |
14370 | 1691 |
apply (rule Infinitesimal_sum_square_cancel) |
1692 |
apply (simp add: add_ac) |
|
1693 |
done |
|
1694 |
||
15229 | 1695 |
lemma HFinite_sum_square_cancel3 [simp]: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1696 |
"(z::hypreal)*z + y*y + x*x \<in> HFinite ==> x*x \<in> HFinite" |
14370 | 1697 |
apply (rule HFinite_sum_square_cancel) |
1698 |
apply (simp add: add_ac) |
|
1699 |
done |
|
1700 |
||
15229 | 1701 |
lemma monad_hrabs_less: |
1702 |
"[| y \<in> monad x; 0 < hypreal_of_real e |] |
|
20563 | 1703 |
==> abs (y - x) < hypreal_of_real e" |
14370 | 1704 |
apply (drule mem_monad_approx [THEN approx_sym]) |
1705 |
apply (drule bex_Infinitesimal_iff [THEN iffD2]) |
|
1706 |
apply (auto dest!: InfinitesimalD) |
|
1707 |
done |
|
1708 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1709 |
lemma mem_monad_SReal_HFinite: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1710 |
"x \<in> monad (hypreal_of_real a) ==> x \<in> HFinite" |
14370 | 1711 |
apply (drule mem_monad_approx [THEN approx_sym]) |
1712 |
apply (drule bex_Infinitesimal_iff2 [THEN iffD2]) |
|
1713 |
apply (safe dest!: Infinitesimal_subset_HFinite [THEN subsetD]) |
|
1714 |
apply (erule SReal_hypreal_of_real [THEN SReal_subset_HFinite [THEN subsetD], THEN HFinite_add]) |
|
1715 |
done |
|
1716 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1717 |
|
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1718 |
subsection{* Theorems about Standard Part*} |
14370 | 1719 |
|
1720 |
lemma st_approx_self: "x \<in> HFinite ==> st x @= x" |
|
1721 |
apply (simp add: st_def) |
|
1722 |
apply (frule st_part_Ex, safe) |
|
1723 |
apply (rule someI2) |
|
1724 |
apply (auto intro: approx_sym) |
|
1725 |
done |
|
1726 |
||
1727 |
lemma st_SReal: "x \<in> HFinite ==> st x \<in> Reals" |
|
1728 |
apply (simp add: st_def) |
|
1729 |
apply (frule st_part_Ex, safe) |
|
1730 |
apply (rule someI2) |
|
1731 |
apply (auto intro: approx_sym) |
|
1732 |
done |
|
1733 |
||
1734 |
lemma st_HFinite: "x \<in> HFinite ==> st x \<in> HFinite" |
|
1735 |
by (erule st_SReal [THEN SReal_subset_HFinite [THEN subsetD]]) |
|
1736 |
||
1737 |
lemma st_SReal_eq: "x \<in> Reals ==> st x = x" |
|
1738 |
apply (simp add: st_def) |
|
1739 |
apply (rule some_equality) |
|
1740 |
apply (fast intro: SReal_subset_HFinite [THEN subsetD]) |
|
1741 |
apply (blast dest: SReal_approx_iff [THEN iffD1]) |
|
1742 |
done |
|
1743 |
||
15229 | 1744 |
lemma st_hypreal_of_real [simp]: "st (hypreal_of_real x) = hypreal_of_real x" |
14370 | 1745 |
by (rule SReal_hypreal_of_real [THEN st_SReal_eq]) |
1746 |
||
1747 |
lemma st_eq_approx: "[| x \<in> HFinite; y \<in> HFinite; st x = st y |] ==> x @= y" |
|
1748 |
by (auto dest!: st_approx_self elim!: approx_trans3) |
|
1749 |
||
1750 |
lemma approx_st_eq: |
|
1751 |
assumes "x \<in> HFinite" and "y \<in> HFinite" and "x @= y" |
|
1752 |
shows "st x = st y" |
|
1753 |
proof - |
|
1754 |
have "st x @= x" "st y @= y" "st x \<in> Reals" "st y \<in> Reals" |
|
1755 |
by (simp_all add: st_approx_self st_SReal prems) |
|
1756 |
with prems show ?thesis |
|
1757 |
by (fast elim: approx_trans approx_trans2 SReal_approx_iff [THEN iffD1]) |
|
1758 |
qed |
|
1759 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1760 |
lemma st_eq_approx_iff: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1761 |
"[| x \<in> HFinite; y \<in> HFinite|] |
14370 | 1762 |
==> (x @= y) = (st x = st y)" |
1763 |
by (blast intro: approx_st_eq st_eq_approx) |
|
1764 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1765 |
lemma st_Infinitesimal_add_SReal: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1766 |
"[| x \<in> Reals; e \<in> Infinitesimal |] ==> st(x + e) = x" |
14370 | 1767 |
apply (frule st_SReal_eq [THEN subst]) |
1768 |
prefer 2 apply assumption |
|
1769 |
apply (frule SReal_subset_HFinite [THEN subsetD]) |
|
1770 |
apply (frule Infinitesimal_subset_HFinite [THEN subsetD]) |
|
1771 |
apply (drule st_SReal_eq) |
|
1772 |
apply (rule approx_st_eq) |
|
1773 |
apply (auto intro: HFinite_add simp add: Infinitesimal_add_approx_self [THEN approx_sym]) |
|
1774 |
done |
|
1775 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1776 |
lemma st_Infinitesimal_add_SReal2: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1777 |
"[| x \<in> Reals; e \<in> Infinitesimal |] ==> st(e + x) = x" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1778 |
apply (rule add_commute [THEN subst]) |
14370 | 1779 |
apply (blast intro!: st_Infinitesimal_add_SReal) |
1780 |
done |
|
1781 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1782 |
lemma HFinite_st_Infinitesimal_add: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1783 |
"x \<in> HFinite ==> \<exists>e \<in> Infinitesimal. x = st(x) + e" |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1784 |
by (blast dest!: st_approx_self [THEN approx_sym] bex_Infinitesimal_iff2 [THEN iffD2]) |
14370 | 1785 |
|
1786 |
lemma st_add: |
|
1787 |
assumes x: "x \<in> HFinite" and y: "y \<in> HFinite" |
|
1788 |
shows "st (x + y) = st(x) + st(y)" |
|
1789 |
proof - |
|
1790 |
from HFinite_st_Infinitesimal_add [OF x] |
|
1791 |
obtain ex where ex: "ex \<in> Infinitesimal" "st x + ex = x" |
|
1792 |
by (blast intro: sym) |
|
1793 |
from HFinite_st_Infinitesimal_add [OF y] |
|
1794 |
obtain ey where ey: "ey \<in> Infinitesimal" "st y + ey = y" |
|
1795 |
by (blast intro: sym) |
|
1796 |
have "st (x + y) = st ((st x + ex) + (st y + ey))" |
|
1797 |
by (simp add: ex ey) |
|
1798 |
also have "... = st ((ex + ey) + (st x + st y))" by (simp add: add_ac) |
|
1799 |
also have "... = st x + st y" |
|
15539 | 1800 |
by (simp add: prems st_SReal Infinitesimal_add |
14370 | 1801 |
st_Infinitesimal_add_SReal2) |
1802 |
finally show ?thesis . |
|
1803 |
qed |
|
1804 |
||
15229 | 1805 |
lemma st_number_of [simp]: "st (number_of w) = number_of w" |
14370 | 1806 |
by (rule SReal_number_of [THEN st_SReal_eq]) |
1807 |
||
1808 |
(*the theorem above for the special cases of zero and one*) |
|
1809 |
lemma [simp]: "st 0 = 0" "st 1 = 1" |
|
1810 |
by (simp_all add: st_SReal_eq) |
|
1811 |
||
1812 |
lemma st_minus: assumes "y \<in> HFinite" shows "st(-y) = -st(y)" |
|
1813 |
proof - |
|
1814 |
have "st (- y) + st y = 0" |
|
1815 |
by (simp add: prems st_add [symmetric] HFinite_minus_iff) |
|
1816 |
thus ?thesis by arith |
|
1817 |
qed |
|
1818 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1819 |
lemma st_diff: "[| x \<in> HFinite; y \<in> HFinite |] ==> st (x-y) = st(x) - st(y)" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1820 |
apply (simp add: diff_def) |
14370 | 1821 |
apply (frule_tac y1 = y in st_minus [symmetric]) |
1822 |
apply (drule_tac x1 = y in HFinite_minus_iff [THEN iffD2]) |
|
1823 |
apply (simp (no_asm_simp) add: st_add) |
|
1824 |
done |
|
1825 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1826 |
lemma lemma_st_mult: |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1827 |
fixes x y e ea :: "'a::real_normed_algebra star" |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1828 |
shows "[| x \<in> HFinite; y \<in> HFinite; e \<in> Infinitesimal; ea \<in> Infinitesimal |] |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1829 |
==> e*y + x*ea + e*ea \<in> Infinitesimal" |
20541
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1830 |
apply (intro Infinitesimal_add) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1831 |
apply (erule (1) Infinitesimal_HFinite_mult) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1832 |
apply (erule (1) Infinitesimal_HFinite_mult2) |
f614c619b1e1
generalized types of Infinitesimal, HFinite, and HInfinite to work over nonstandard extensions of any real normed vector space
huffman
parents:
20485
diff
changeset
|
1833 |
apply (erule (1) Infinitesimal_mult) |
14370 | 1834 |
done |
1835 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1836 |
lemma st_mult: "[| x \<in> HFinite; y \<in> HFinite |] ==> st (x * y) = st(x) * st(y)" |
14370 | 1837 |
apply (frule HFinite_st_Infinitesimal_add) |
1838 |
apply (frule_tac x = y in HFinite_st_Infinitesimal_add, safe) |
|
1839 |
apply (subgoal_tac "st (x * y) = st ((st x + e) * (st y + ea))") |
|
1840 |
apply (drule_tac [2] sym, drule_tac [2] sym) |
|
1841 |
prefer 2 apply simp |
|
1842 |
apply (erule_tac V = "x = st x + e" in thin_rl) |
|
1843 |
apply (erule_tac V = "y = st y + ea" in thin_rl) |
|
1844 |
apply (simp add: left_distrib right_distrib) |
|
1845 |
apply (drule st_SReal)+ |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1846 |
apply (simp (no_asm_use) add: add_assoc) |
14370 | 1847 |
apply (rule st_Infinitesimal_add_SReal) |
1848 |
apply (blast intro!: SReal_mult) |
|
1849 |
apply (drule SReal_subset_HFinite [THEN subsetD])+ |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1850 |
apply (rule add_assoc [THEN subst]) |
14370 | 1851 |
apply (blast intro!: lemma_st_mult) |
1852 |
done |
|
1853 |
||
1854 |
lemma st_Infinitesimal: "x \<in> Infinitesimal ==> st x = 0" |
|
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14378
diff
changeset
|
1855 |
apply (subst numeral_0_eq_0 [symmetric]) |
14370 | 1856 |
apply (rule st_number_of [THEN subst]) |
1857 |
apply (rule approx_st_eq) |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1858 |
apply (auto intro: Infinitesimal_subset_HFinite [THEN subsetD] |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1859 |
simp add: mem_infmal_iff [symmetric]) |
14370 | 1860 |
done |
1861 |
||
1862 |
lemma st_not_Infinitesimal: "st(x) \<noteq> 0 ==> x \<notin> Infinitesimal" |
|
1863 |
by (fast intro: st_Infinitesimal) |
|
1864 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1865 |
lemma st_inverse: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1866 |
"[| x \<in> HFinite; st x \<noteq> 0 |] |
14370 | 1867 |
==> st(inverse x) = inverse (st x)" |
1868 |
apply (rule_tac c1 = "st x" in hypreal_mult_left_cancel [THEN iffD1]) |
|
1869 |
apply (auto simp add: st_mult [symmetric] st_not_Infinitesimal HFinite_inverse) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1870 |
apply (subst right_inverse, auto) |
14370 | 1871 |
done |
1872 |
||
15229 | 1873 |
lemma st_divide [simp]: |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1874 |
"[| x \<in> HFinite; y \<in> HFinite; st y \<noteq> 0 |] |
14370 | 1875 |
==> st(x/y) = (st x) / (st y)" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1876 |
by (simp add: divide_inverse st_mult st_not_Infinitesimal HFinite_inverse st_inverse) |
14370 | 1877 |
|
15229 | 1878 |
lemma st_idempotent [simp]: "x \<in> HFinite ==> st(st(x)) = st(x)" |
14370 | 1879 |
by (blast intro: st_HFinite st_approx_self approx_st_eq) |
1880 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1881 |
lemma Infinitesimal_add_st_less: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1882 |
"[| x \<in> HFinite; y \<in> HFinite; u \<in> Infinitesimal; st x < st y |] |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1883 |
==> st x + u < st y" |
14370 | 1884 |
apply (drule st_SReal)+ |
1885 |
apply (auto intro!: Infinitesimal_add_hypreal_of_real_less simp add: SReal_iff) |
|
1886 |
done |
|
1887 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1888 |
lemma Infinitesimal_add_st_le_cancel: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1889 |
"[| x \<in> HFinite; y \<in> HFinite; |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1890 |
u \<in> Infinitesimal; st x \<le> st y + u |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1891 |
|] ==> st x \<le> st y" |
14370 | 1892 |
apply (simp add: linorder_not_less [symmetric]) |
1893 |
apply (auto dest: Infinitesimal_add_st_less) |
|
1894 |
done |
|
1895 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1896 |
lemma st_le: "[| x \<in> HFinite; y \<in> HFinite; x \<le> y |] ==> st(x) \<le> st(y)" |
14370 | 1897 |
apply (frule HFinite_st_Infinitesimal_add) |
1898 |
apply (rotate_tac 1) |
|
1899 |
apply (frule HFinite_st_Infinitesimal_add, safe) |
|
1900 |
apply (rule Infinitesimal_add_st_le_cancel) |
|
1901 |
apply (rule_tac [3] x = ea and y = e in Infinitesimal_diff) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1902 |
apply (auto simp add: add_assoc [symmetric]) |
14370 | 1903 |
done |
1904 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1905 |
lemma st_zero_le: "[| 0 \<le> x; x \<in> HFinite |] ==> 0 \<le> st x" |
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14378
diff
changeset
|
1906 |
apply (subst numeral_0_eq_0 [symmetric]) |
14370 | 1907 |
apply (rule st_number_of [THEN subst]) |
1908 |
apply (rule st_le, auto) |
|
1909 |
done |
|
1910 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1911 |
lemma st_zero_ge: "[| x \<le> 0; x \<in> HFinite |] ==> st x \<le> 0" |
14387
e96d5c42c4b0
Polymorphic treatment of binary arithmetic using axclasses
paulson
parents:
14378
diff
changeset
|
1912 |
apply (subst numeral_0_eq_0 [symmetric]) |
14370 | 1913 |
apply (rule st_number_of [THEN subst]) |
1914 |
apply (rule st_le, auto) |
|
1915 |
done |
|
1916 |
||
1917 |
lemma st_hrabs: "x \<in> HFinite ==> abs(st x) = st(abs x)" |
|
1918 |
apply (simp add: linorder_not_le st_zero_le abs_if st_minus |
|
1919 |
linorder_not_less) |
|
1920 |
apply (auto dest!: st_zero_ge [OF order_less_imp_le]) |
|
1921 |
done |
|
1922 |
||
1923 |
||
1924 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1925 |
subsection{*Alternative Definitions for @{term HFinite} using Free Ultrafilter*} |
14370 | 1926 |
|
1927 |
lemma HFinite_FreeUltrafilterNat: |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1928 |
"star_n X \<in> HFinite |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1929 |
==> \<exists>u. {n. norm (X n) < u} \<in> FreeUltrafilterNat" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1930 |
apply (auto simp add: HFinite_def SReal_def) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1931 |
apply (rule_tac x=r in exI) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1932 |
apply (simp add: hnorm_def star_of_def starfun_star_n) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1933 |
apply (simp add: star_less_def starP2_star_n) |
14370 | 1934 |
done |
1935 |
||
1936 |
lemma FreeUltrafilterNat_HFinite: |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1937 |
"\<exists>u. {n. norm (X n) < u} \<in> FreeUltrafilterNat |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1938 |
==> star_n X \<in> HFinite" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1939 |
apply (auto simp add: HFinite_def mem_Rep_star_iff) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1940 |
apply (rule_tac x="star_of u" in bexI) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1941 |
apply (simp add: hnorm_def starfun_star_n star_of_def) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1942 |
apply (simp add: star_less_def starP2_star_n) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1943 |
apply (simp add: SReal_def) |
14370 | 1944 |
done |
1945 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1946 |
lemma HFinite_FreeUltrafilterNat_iff: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1947 |
"(star_n X \<in> HFinite) = (\<exists>u. {n. norm (X n) < u} \<in> FreeUltrafilterNat)" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1948 |
by (blast intro!: HFinite_FreeUltrafilterNat FreeUltrafilterNat_HFinite) |
14370 | 1949 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1950 |
|
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1951 |
subsection{*Alternative Definitions for @{term HInfinite} using Free Ultrafilter*} |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1952 |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1953 |
lemma lemma_Compl_eq: "- {n. u < norm (xa n)} = {n. norm (xa n) \<le> u}" |
14370 | 1954 |
by auto |
1955 |
||
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1956 |
lemma lemma_Compl_eq2: "- {n. norm (xa n) < u} = {n. u \<le> norm (xa n)}" |
14370 | 1957 |
by auto |
1958 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1959 |
lemma lemma_Int_eq1: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1960 |
"{n. norm (xa n) \<le> u} Int {n. u \<le> norm (xa n)} |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1961 |
= {n. norm(xa n) = u}" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
1962 |
by auto |
14370 | 1963 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1964 |
lemma lemma_FreeUltrafilterNat_one: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1965 |
"{n. norm (xa n) = u} \<le> {n. norm (xa n) < u + (1::real)}" |
14370 | 1966 |
by auto |
1967 |
||
1968 |
(*------------------------------------- |
|
1969 |
Exclude this type of sets from free |
|
1970 |
ultrafilter for Infinite numbers! |
|
1971 |
-------------------------------------*) |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1972 |
lemma FreeUltrafilterNat_const_Finite: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1973 |
"{n. norm (X n) = u} \<in> FreeUltrafilterNat ==> star_n X \<in> HFinite" |
14370 | 1974 |
apply (rule FreeUltrafilterNat_HFinite) |
1975 |
apply (rule_tac x = "u + 1" in exI) |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1976 |
apply (erule ultra, simp) |
14370 | 1977 |
done |
1978 |
||
1979 |
lemma HInfinite_FreeUltrafilterNat: |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1980 |
"star_n X \<in> HInfinite ==> \<forall>u. {n. u < norm (X n)} \<in> FreeUltrafilterNat" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1981 |
apply (drule HInfinite_HFinite_iff [THEN iffD1]) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1982 |
apply (simp add: HFinite_FreeUltrafilterNat_iff) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1983 |
apply (rule allI, drule_tac x="u + 1" in spec) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1984 |
apply (drule FreeUltrafilterNat_Compl_mem) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1985 |
apply (simp add: Collect_neg_eq [symmetric] linorder_not_less) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1986 |
apply (erule ultra, simp) |
14370 | 1987 |
done |
1988 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1989 |
lemma lemma_Int_HI: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1990 |
"{n. norm (Xa n) < u} Int {n. X n = Xa n} \<subseteq> {n. norm (X n) < (u::real)}" |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1991 |
by auto |
14370 | 1992 |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1993 |
lemma lemma_Int_HIa: "{n. u < norm (X n)} Int {n. norm (X n) < u} = {}" |
14370 | 1994 |
by (auto intro: order_less_asym) |
1995 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
1996 |
lemma FreeUltrafilterNat_HInfinite: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1997 |
"\<forall>u. {n. u < norm (X n)} \<in> FreeUltrafilterNat ==> star_n X \<in> HInfinite" |
14370 | 1998 |
apply (rule HInfinite_HFinite_iff [THEN iffD2]) |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
1999 |
apply (safe, drule HFinite_FreeUltrafilterNat, safe) |
14370 | 2000 |
apply (drule_tac x = u in spec) |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2001 |
apply ultra |
14370 | 2002 |
done |
2003 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2004 |
lemma HInfinite_FreeUltrafilterNat_iff: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2005 |
"(star_n X \<in> HInfinite) = (\<forall>u. {n. u < norm (X n)} \<in> FreeUltrafilterNat)" |
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2006 |
by (blast intro!: HInfinite_FreeUltrafilterNat FreeUltrafilterNat_HInfinite) |
14370 | 2007 |
|
2008 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2009 |
subsection{*Alternative Definitions for @{term Infinitesimal} using Free Ultrafilter*} |
10751 | 2010 |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2011 |
lemma ball_SReal_eq: "(\<forall>x::hypreal \<in> Reals. P x) = (\<forall>x::real. P (star_of x))" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2012 |
by (unfold SReal_def, auto) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2013 |
|
14370 | 2014 |
lemma Infinitesimal_FreeUltrafilterNat: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2015 |
"star_n X \<in> Infinitesimal ==> \<forall>u>0. {n. norm (X n) < u} \<in> \<U>" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2016 |
apply (simp add: Infinitesimal_def ball_SReal_eq) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2017 |
apply (simp add: hnorm_def starfun_star_n star_of_def) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2018 |
apply (simp add: star_less_def starP2_star_n) |
14370 | 2019 |
done |
2020 |
||
2021 |
lemma FreeUltrafilterNat_Infinitesimal: |
|
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2022 |
"\<forall>u>0. {n. norm (X n) < u} \<in> \<U> ==> star_n X \<in> Infinitesimal" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2023 |
apply (simp add: Infinitesimal_def ball_SReal_eq) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2024 |
apply (simp add: hnorm_def starfun_star_n star_of_def) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2025 |
apply (simp add: star_less_def starP2_star_n) |
14370 | 2026 |
done |
2027 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2028 |
lemma Infinitesimal_FreeUltrafilterNat_iff: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2029 |
"(star_n X \<in> Infinitesimal) = (\<forall>u>0. {n. norm (X n) < u} \<in> \<U>)" |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
2030 |
by (blast intro!: Infinitesimal_FreeUltrafilterNat FreeUltrafilterNat_Infinitesimal) |
14370 | 2031 |
|
2032 |
(*------------------------------------------------------------------------ |
|
2033 |
Infinitesimals as smaller than 1/n for all n::nat (> 0) |
|
2034 |
------------------------------------------------------------------------*) |
|
2035 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2036 |
lemma lemma_Infinitesimal: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2037 |
"(\<forall>r. 0 < r --> x < r) = (\<forall>n. x < inverse(real (Suc n)))" |
14370 | 2038 |
apply (auto simp add: real_of_nat_Suc_gt_zero) |
2039 |
apply (blast dest!: reals_Archimedean intro: order_less_trans) |
|
2040 |
done |
|
2041 |
||
14378
69c4d5997669
generic of_nat and of_int functions, and generalization of iszero
paulson
parents:
14371
diff
changeset
|
2042 |
lemma of_nat_in_Reals [simp]: "(of_nat n::hypreal) \<in> \<real>" |
69c4d5997669
generic of_nat and of_int functions, and generalization of iszero
paulson
parents:
14371
diff
changeset
|
2043 |
apply (induct n) |
15539 | 2044 |
apply (simp_all) |
14378
69c4d5997669
generic of_nat and of_int functions, and generalization of iszero
paulson
parents:
14371
diff
changeset
|
2045 |
done |
69c4d5997669
generic of_nat and of_int functions, and generalization of iszero
paulson
parents:
14371
diff
changeset
|
2046 |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2047 |
lemma lemma_Infinitesimal2: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2048 |
"(\<forall>r \<in> Reals. 0 < r --> x < r) = |
14370 | 2049 |
(\<forall>n. x < inverse(hypreal_of_nat (Suc n)))" |
2050 |
apply safe |
|
2051 |
apply (drule_tac x = "inverse (hypreal_of_real (real (Suc n))) " in bspec) |
|
2052 |
apply (simp (no_asm_use) add: SReal_inverse) |
|
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
2053 |
apply (rule real_of_nat_Suc_gt_zero [THEN positive_imp_inverse_positive, THEN star_of_less [THEN iffD2], THEN [2] impE]) |
14370 | 2054 |
prefer 2 apply assumption |
14378
69c4d5997669
generic of_nat and of_int functions, and generalization of iszero
paulson
parents:
14371
diff
changeset
|
2055 |
apply (simp add: real_of_nat_Suc_gt_zero hypreal_of_nat_eq) |
14370 | 2056 |
apply (auto dest!: reals_Archimedean simp add: SReal_iff) |
17318
bc1c75855f3d
starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents:
17298
diff
changeset
|
2057 |
apply (drule star_of_less [THEN iffD2]) |
14378
69c4d5997669
generic of_nat and of_int functions, and generalization of iszero
paulson
parents:
14371
diff
changeset
|
2058 |
apply (simp add: real_of_nat_Suc_gt_zero hypreal_of_nat_eq) |
14370 | 2059 |
apply (blast intro: order_less_trans) |
2060 |
done |
|
2061 |
||
14378
69c4d5997669
generic of_nat and of_int functions, and generalization of iszero
paulson
parents:
14371
diff
changeset
|
2062 |
|
14370 | 2063 |
lemma Infinitesimal_hypreal_of_nat_iff: |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2064 |
"Infinitesimal = {x. \<forall>n. hnorm x < inverse (hypreal_of_nat (Suc n))}" |
14370 | 2065 |
apply (simp add: Infinitesimal_def) |
2066 |
apply (auto simp add: lemma_Infinitesimal2) |
|
2067 |
done |
|
2068 |
||
2069 |
||
15229 | 2070 |
subsection{*Proof that @{term omega} is an infinite number*} |
2071 |
||
2072 |
text{*It will follow that epsilon is an infinitesimal number.*} |
|
2073 |
||
14370 | 2074 |
lemma Suc_Un_eq: "{n. n < Suc m} = {n. n < m} Un {n. n = m}" |
2075 |
by (auto simp add: less_Suc_eq) |
|
2076 |
||
2077 |
(*------------------------------------------- |
|
2078 |
Prove that any segment is finite and |
|
2079 |
hence cannot belong to FreeUltrafilterNat |
|
2080 |
-------------------------------------------*) |
|
2081 |
lemma finite_nat_segment: "finite {n::nat. n < m}" |
|
15251 | 2082 |
apply (induct "m") |
14370 | 2083 |
apply (auto simp add: Suc_Un_eq) |
2084 |
done |
|
2085 |
||
2086 |
lemma finite_real_of_nat_segment: "finite {n::nat. real n < real (m::nat)}" |
|
2087 |
by (auto intro: finite_nat_segment) |
|
2088 |
||
2089 |
lemma finite_real_of_nat_less_real: "finite {n::nat. real n < u}" |
|
2090 |
apply (cut_tac x = u in reals_Archimedean2, safe) |
|
2091 |
apply (rule finite_real_of_nat_segment [THEN [2] finite_subset]) |
|
2092 |
apply (auto dest: order_less_trans) |
|
2093 |
done |
|
2094 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2095 |
lemma lemma_real_le_Un_eq: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2096 |
"{n. f n \<le> u} = {n. f n < u} Un {n. u = (f n :: real)}" |
14370 | 2097 |
by (auto dest: order_le_imp_less_or_eq simp add: order_less_imp_le) |
2098 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2099 |
lemma finite_real_of_nat_le_real: "finite {n::nat. real n \<le> u}" |
14370 | 2100 |
by (auto simp add: lemma_real_le_Un_eq lemma_finite_omega_set finite_real_of_nat_less_real) |
2101 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2102 |
lemma finite_rabs_real_of_nat_le_real: "finite {n::nat. abs(real n) \<le> u}" |
14370 | 2103 |
apply (simp (no_asm) add: real_of_nat_Suc_gt_zero finite_real_of_nat_le_real) |
2104 |
done |
|
2105 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2106 |
lemma rabs_real_of_nat_le_real_FreeUltrafilterNat: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2107 |
"{n. abs(real n) \<le> u} \<notin> FreeUltrafilterNat" |
14370 | 2108 |
by (blast intro!: FreeUltrafilterNat_finite finite_rabs_real_of_nat_le_real) |
2109 |
||
2110 |
lemma FreeUltrafilterNat_nat_gt_real: "{n. u < real n} \<in> FreeUltrafilterNat" |
|
2111 |
apply (rule ccontr, drule FreeUltrafilterNat_Compl_mem) |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2112 |
apply (subgoal_tac "- {n::nat. u < real n} = {n. real n \<le> u}") |
14370 | 2113 |
prefer 2 apply force |
2114 |
apply (simp add: finite_real_of_nat_le_real [THEN FreeUltrafilterNat_finite]) |
|
2115 |
done |
|
2116 |
||
2117 |
(*-------------------------------------------------------------- |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2118 |
The complement of {n. abs(real n) \<le> u} = |
14370 | 2119 |
{n. u < abs (real n)} is in FreeUltrafilterNat |
2120 |
by property of (free) ultrafilters |
|
2121 |
--------------------------------------------------------------*) |
|
2122 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2123 |
lemma Compl_real_le_eq: "- {n::nat. real n \<le> u} = {n. u < real n}" |
14370 | 2124 |
by (auto dest!: order_le_less_trans simp add: linorder_not_le) |
2125 |
||
15229 | 2126 |
text{*@{term omega} is a member of @{term HInfinite}*} |
14370 | 2127 |
|
2128 |
lemma FreeUltrafilterNat_omega: "{n. u < real n} \<in> FreeUltrafilterNat" |
|
2129 |
apply (cut_tac u = u in rabs_real_of_nat_le_real_FreeUltrafilterNat) |
|
2130 |
apply (auto dest: FreeUltrafilterNat_Compl_mem simp add: Compl_real_le_eq) |
|
2131 |
done |
|
2132 |
||
15229 | 2133 |
theorem HInfinite_omega [simp]: "omega \<in> HInfinite" |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2134 |
apply (simp add: omega_def) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2135 |
apply (rule FreeUltrafilterNat_HInfinite) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2136 |
apply (simp (no_asm) add: real_norm_def real_of_nat_Suc diff_less_eq [symmetric] FreeUltrafilterNat_omega) |
14370 | 2137 |
done |
2138 |
||
2139 |
(*----------------------------------------------- |
|
2140 |
Epsilon is a member of Infinitesimal |
|
2141 |
-----------------------------------------------*) |
|
2142 |
||
15229 | 2143 |
lemma Infinitesimal_epsilon [simp]: "epsilon \<in> Infinitesimal" |
14370 | 2144 |
by (auto intro!: HInfinite_inverse_Infinitesimal HInfinite_omega simp add: hypreal_epsilon_inverse_omega) |
2145 |
||
15229 | 2146 |
lemma HFinite_epsilon [simp]: "epsilon \<in> HFinite" |
14370 | 2147 |
by (auto intro: Infinitesimal_subset_HFinite [THEN subsetD]) |
2148 |
||
15229 | 2149 |
lemma epsilon_approx_zero [simp]: "epsilon @= 0" |
14370 | 2150 |
apply (simp (no_asm) add: mem_infmal_iff [symmetric]) |
2151 |
done |
|
2152 |
||
2153 |
(*------------------------------------------------------------------------ |
|
2154 |
Needed for proof that we define a hyperreal [<X(n)] @= hypreal_of_real a given |
|
2155 |
that \<forall>n. |X n - a| < 1/n. Used in proof of NSLIM => LIM. |
|
2156 |
-----------------------------------------------------------------------*) |
|
2157 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2158 |
lemma real_of_nat_less_inverse_iff: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2159 |
"0 < u ==> (u < inverse (real(Suc n))) = (real(Suc n) < inverse u)" |
14370 | 2160 |
apply (simp add: inverse_eq_divide) |
2161 |
apply (subst pos_less_divide_eq, assumption) |
|
2162 |
apply (subst pos_less_divide_eq) |
|
2163 |
apply (simp add: real_of_nat_Suc_gt_zero) |
|
2164 |
apply (simp add: real_mult_commute) |
|
2165 |
done |
|
2166 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2167 |
lemma finite_inverse_real_of_posnat_gt_real: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2168 |
"0 < u ==> finite {n. u < inverse(real(Suc n))}" |
14370 | 2169 |
apply (simp (no_asm_simp) add: real_of_nat_less_inverse_iff) |
2170 |
apply (simp (no_asm_simp) add: real_of_nat_Suc less_diff_eq [symmetric]) |
|
2171 |
apply (rule finite_real_of_nat_less_real) |
|
2172 |
done |
|
2173 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2174 |
lemma lemma_real_le_Un_eq2: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2175 |
"{n. u \<le> inverse(real(Suc n))} = |
14370 | 2176 |
{n. u < inverse(real(Suc n))} Un {n. u = inverse(real(Suc n))}" |
2177 |
apply (auto dest: order_le_imp_less_or_eq simp add: order_less_imp_le) |
|
2178 |
done |
|
2179 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2180 |
lemma real_of_nat_inverse_le_iff: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2181 |
"(inverse (real(Suc n)) \<le> r) = (1 \<le> r * real(Suc n))" |
14370 | 2182 |
apply (simp (no_asm) add: linorder_not_less [symmetric]) |
2183 |
apply (simp (no_asm) add: inverse_eq_divide) |
|
2184 |
apply (subst pos_less_divide_eq) |
|
2185 |
apply (simp (no_asm) add: real_of_nat_Suc_gt_zero) |
|
2186 |
apply (simp (no_asm) add: real_mult_commute) |
|
2187 |
done |
|
2188 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2189 |
lemma real_of_nat_inverse_eq_iff: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2190 |
"(u = inverse (real(Suc n))) = (real(Suc n) = inverse u)" |
15539 | 2191 |
by (auto simp add: real_of_nat_Suc_gt_zero real_not_refl2 [THEN not_sym]) |
14370 | 2192 |
|
2193 |
lemma lemma_finite_omega_set2: "finite {n::nat. u = inverse(real(Suc n))}" |
|
2194 |
apply (simp (no_asm_simp) add: real_of_nat_inverse_eq_iff) |
|
2195 |
apply (cut_tac x = "inverse u - 1" in lemma_finite_omega_set) |
|
2196 |
apply (simp add: real_of_nat_Suc diff_eq_eq [symmetric] eq_commute) |
|
2197 |
done |
|
2198 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2199 |
lemma finite_inverse_real_of_posnat_ge_real: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2200 |
"0 < u ==> finite {n. u \<le> inverse(real(Suc n))}" |
14370 | 2201 |
by (auto simp add: lemma_real_le_Un_eq2 lemma_finite_omega_set2 finite_inverse_real_of_posnat_gt_real) |
2202 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2203 |
lemma inverse_real_of_posnat_ge_real_FreeUltrafilterNat: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2204 |
"0 < u ==> {n. u \<le> inverse(real(Suc n))} \<notin> FreeUltrafilterNat" |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2205 |
by (blast intro!: FreeUltrafilterNat_finite finite_inverse_real_of_posnat_ge_real) |
14370 | 2206 |
|
2207 |
(*-------------------------------------------------------------- |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2208 |
The complement of {n. u \<le> inverse(real(Suc n))} = |
14370 | 2209 |
{n. inverse(real(Suc n)) < u} is in FreeUltrafilterNat |
2210 |
by property of (free) ultrafilters |
|
2211 |
--------------------------------------------------------------*) |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2212 |
lemma Compl_le_inverse_eq: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2213 |
"- {n. u \<le> inverse(real(Suc n))} = |
14370 | 2214 |
{n. inverse(real(Suc n)) < u}" |
2215 |
apply (auto dest!: order_le_less_trans simp add: linorder_not_le) |
|
2216 |
done |
|
2217 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2218 |
lemma FreeUltrafilterNat_inverse_real_of_posnat: |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2219 |
"0 < u ==> |
14370 | 2220 |
{n. inverse(real(Suc n)) < u} \<in> FreeUltrafilterNat" |
2221 |
apply (cut_tac u = u in inverse_real_of_posnat_ge_real_FreeUltrafilterNat) |
|
2222 |
apply (auto dest: FreeUltrafilterNat_Compl_mem simp add: Compl_le_inverse_eq) |
|
2223 |
done |
|
2224 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2225 |
text{* Example where we get a hyperreal from a real sequence |
14370 | 2226 |
for which a particular property holds. The theorem is |
2227 |
used in proofs about equivalence of nonstandard and |
|
2228 |
standard neighbourhoods. Also used for equivalence of |
|
2229 |
nonstandard ans standard definitions of pointwise |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2230 |
limit.*} |
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2231 |
|
14370 | 2232 |
(*----------------------------------------------------- |
2233 |
|X(n) - x| < 1/n ==> [<X n>] - hypreal_of_real x| \<in> Infinitesimal |
|
2234 |
-----------------------------------------------------*) |
|
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2235 |
lemma real_seq_to_hypreal_Infinitesimal: |
20563 | 2236 |
"\<forall>n. norm(X n - x) < inverse(real(Suc n)) |
2237 |
==> star_n X - star_of x \<in> Infinitesimal" |
|
2238 |
apply (auto intro!: bexI dest: FreeUltrafilterNat_inverse_real_of_posnat FreeUltrafilterNat_all FreeUltrafilterNat_Int intro: order_less_trans FreeUltrafilterNat_subset simp add: star_n_diff star_of_def Infinitesimal_FreeUltrafilterNat_iff star_n_inverse) |
|
14370 | 2239 |
done |
2240 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2241 |
lemma real_seq_to_hypreal_approx: |
20563 | 2242 |
"\<forall>n. norm(X n - x) < inverse(real(Suc n)) |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2243 |
==> star_n X @= star_of x" |
14370 | 2244 |
apply (subst approx_minus_iff) |
2245 |
apply (rule mem_infmal_iff [THEN subst]) |
|
2246 |
apply (erule real_seq_to_hypreal_Infinitesimal) |
|
2247 |
done |
|
2248 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2249 |
lemma real_seq_to_hypreal_approx2: |
20563 | 2250 |
"\<forall>n. norm(x - X n) < inverse(real(Suc n)) |
20552
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2251 |
==> star_n X @= star_of x" |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2252 |
apply (rule real_seq_to_hypreal_approx) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2253 |
apply (subst norm_minus_cancel [symmetric]) |
2c31dd358c21
generalized types of many constants to work over arbitrary vector spaces;
huffman
parents:
20541
diff
changeset
|
2254 |
apply (simp del: norm_minus_cancel) |
14370 | 2255 |
done |
2256 |
||
14420
4e72cd222e0b
converted Hyperreal/HTranscendental to Isar script
paulson
parents:
14387
diff
changeset
|
2257 |
lemma real_seq_to_hypreal_Infinitesimal2: |
20563 | 2258 |
"\<forall>n. norm(X n - Y n) < inverse(real(Suc n)) |
2259 |
==> star_n X - star_n Y \<in> Infinitesimal" |
|
14370 | 2260 |
by (auto intro!: bexI |
2261 |
dest: FreeUltrafilterNat_inverse_real_of_posnat |
|
2262 |
FreeUltrafilterNat_all FreeUltrafilterNat_Int |
|
2263 |
intro: order_less_trans FreeUltrafilterNat_subset |
|
20563 | 2264 |
simp add: Infinitesimal_FreeUltrafilterNat_iff star_n_diff |
2265 |
star_n_inverse) |
|
14370 | 2266 |
|
10751 | 2267 |
end |