author | paulson |
Thu, 27 Nov 2003 10:47:55 +0100 | |
changeset 14268 | 5cf13e80be0e |
parent 14266 | 08b34c902618 |
child 14269 | 502a7c95de73 |
permissions | -rw-r--r-- |
9013
9dd0274f76af
Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents:
8838
diff
changeset
|
1 |
(* Title: Real/RealOrd.thy |
9dd0274f76af
Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents:
8838
diff
changeset
|
2 |
ID: $Id$ |
9dd0274f76af
Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents:
8838
diff
changeset
|
3 |
Author: Jacques D. Fleuriot and Lawrence C. Paulson |
7334 | 4 |
Copyright: 1998 University of Cambridge |
5 |
*) |
|
6 |
||
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
7 |
header{*The Reals Form an Ordered Field, etc.*} |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
8 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
9 |
theory RealOrd = RealDef: |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
10 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
11 |
instance real :: order |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
12 |
by (intro_classes, |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
13 |
(assumption | |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
14 |
rule real_le_refl real_le_trans real_le_anti_sym real_less_le)+) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
15 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
16 |
instance real :: linorder |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
17 |
by (intro_classes, rule real_le_linear) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
18 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
19 |
instance real :: plus_ac0 |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
20 |
by (intro_classes, |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
21 |
(assumption | |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
22 |
rule real_add_commute real_add_assoc real_add_zero_left)+) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
23 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
24 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
25 |
defs (overloaded) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
26 |
real_abs_def: "abs (r::real) == (if 0 \<le> r then r else -r)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
27 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
28 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
29 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
30 |
subsection{* The Simproc @{text abel_cancel}*} |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
31 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
32 |
(*Deletion of other terms in the formula, seeking the -x at the front of z*) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
33 |
lemma real_add_cancel_21: "((x::real) + (y + z) = y + u) = ((x + z) = u)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
34 |
apply (subst real_add_left_commute) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
35 |
apply (rule real_add_left_cancel) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
36 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
37 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
38 |
(*A further rule to deal with the case that |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
39 |
everything gets cancelled on the right.*) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
40 |
lemma real_add_cancel_end: "((x::real) + (y + z) = y) = (x = -z)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
41 |
apply (subst real_add_left_commute) |
14266 | 42 |
apply (rule_tac t = y in real_add_zero_right [THEN subst], subst real_add_left_cancel) |
43 |
apply (simp add: real_eq_diff_eq [symmetric]) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
44 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
45 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
46 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
47 |
ML |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
48 |
{* |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
49 |
val real_add_cancel_21 = thm "real_add_cancel_21"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
50 |
val real_add_cancel_end = thm "real_add_cancel_end"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
51 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
52 |
structure Real_Cancel_Data = |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
53 |
struct |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
54 |
val ss = HOL_ss |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
55 |
val eq_reflection = eq_reflection |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
56 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
57 |
val sg_ref = Sign.self_ref (Theory.sign_of (the_context ())) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
58 |
val T = HOLogic.realT |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
59 |
val zero = Const ("0", T) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
60 |
val restrict_to_left = restrict_to_left |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
61 |
val add_cancel_21 = real_add_cancel_21 |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
62 |
val add_cancel_end = real_add_cancel_end |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
63 |
val add_left_cancel = real_add_left_cancel |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
64 |
val add_assoc = real_add_assoc |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
65 |
val add_commute = real_add_commute |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
66 |
val add_left_commute = real_add_left_commute |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
67 |
val add_0 = real_add_zero_left |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
68 |
val add_0_right = real_add_zero_right |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
69 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
70 |
val eq_diff_eq = real_eq_diff_eq |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
71 |
val eqI_rules = [real_less_eqI, real_eq_eqI, real_le_eqI] |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
72 |
fun dest_eqI th = |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
73 |
#1 (HOLogic.dest_bin "op =" HOLogic.boolT |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
74 |
(HOLogic.dest_Trueprop (concl_of th))) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
75 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
76 |
val diff_def = real_diff_def |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
77 |
val minus_add_distrib = real_minus_add_distrib |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
78 |
val minus_minus = real_minus_minus |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
79 |
val minus_0 = real_minus_zero |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
80 |
val add_inverses = [real_add_minus, real_add_minus_left] |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
81 |
val cancel_simps = [real_add_minus_cancel, real_minus_add_cancel] |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
82 |
end; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
83 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
84 |
structure Real_Cancel = Abel_Cancel (Real_Cancel_Data); |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
85 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
86 |
Addsimprocs [Real_Cancel.sum_conv, Real_Cancel.rel_conv]; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
87 |
*} |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
88 |
|
14266 | 89 |
lemma real_minus_diff_eq [simp]: "- (z - y) = y - (z::real)" |
90 |
by simp |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
91 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
92 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
93 |
subsection{*Theorems About the Ordering*} |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
94 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
95 |
lemma real_gt_zero_preal_Ex: "(0 < x) = (\<exists>y. x = real_of_preal y)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
96 |
apply (auto simp add: real_of_preal_zero_less) |
14266 | 97 |
apply (cut_tac x = x in real_of_preal_trichotomy) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
98 |
apply (blast elim!: real_less_irrefl real_of_preal_not_minus_gt_zero [THEN notE]) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
99 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
100 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
101 |
lemma real_gt_preal_preal_Ex: "real_of_preal z < x ==> \<exists>y. x = real_of_preal y" |
14266 | 102 |
by (blast dest!: real_of_preal_zero_less [THEN real_less_trans] |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
103 |
intro: real_gt_zero_preal_Ex [THEN iffD1]) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
104 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
105 |
lemma real_ge_preal_preal_Ex: "real_of_preal z \<le> x ==> \<exists>y. x = real_of_preal y" |
14266 | 106 |
by (blast dest: order_le_imp_less_or_eq real_gt_preal_preal_Ex) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
107 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
108 |
lemma real_less_all_preal: "y \<le> 0 ==> \<forall>x. y < real_of_preal x" |
14266 | 109 |
by (auto elim: order_le_imp_less_or_eq [THEN disjE] |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
110 |
intro: real_of_preal_zero_less [THEN [2] real_less_trans] |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
111 |
simp add: real_of_preal_zero_less) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
112 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
113 |
lemma real_less_all_real2: "~ 0 < y ==> \<forall>x. y < real_of_preal x" |
14266 | 114 |
by (blast intro!: real_less_all_preal real_leI) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
115 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
116 |
lemma real_of_preal_le_iff: "(real_of_preal m1 \<le> real_of_preal m2) = (m1 \<le> m2)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
117 |
apply (auto intro!: preal_leI simp add: real_less_le_iff [symmetric]) |
14266 | 118 |
apply (drule order_le_less_trans, assumption) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
119 |
apply (erule preal_less_irrefl) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
120 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
121 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
122 |
subsection{*Monotonicity of Addition*} |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
123 |
|
14266 | 124 |
lemma real_add_right_cancel_less [simp]: "(v+z < w+z) = (v < (w::real))" |
125 |
by simp |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
126 |
|
14266 | 127 |
lemma real_add_left_cancel_less [simp]: "(z+v < z+w) = (v < (w::real))" |
128 |
by simp |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
129 |
|
14266 | 130 |
lemma real_add_right_cancel_le [simp]: "(v+z \<le> w+z) = (v \<le> (w::real))" |
131 |
by simp |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
132 |
|
14266 | 133 |
lemma real_add_left_cancel_le [simp]: "(z+v \<le> z+w) = (v \<le> (w::real))" |
134 |
by simp |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
135 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
136 |
lemma real_mult_order: "[| 0 < x; 0 < y |] ==> (0::real) < x * y" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
137 |
apply (auto simp add: real_gt_zero_preal_Ex) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
138 |
apply (rule_tac x = "y*ya" in exI) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
139 |
apply (simp (no_asm_use) add: real_of_preal_mult) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
140 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
141 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
142 |
lemma real_mult_less_mono2: "[| (0::real) < z; x < y |] ==> z * x < z * y" |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
143 |
apply (rule real_sum_gt_zero_less) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
144 |
apply (drule real_less_sum_gt_zero [of x y]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
145 |
apply (drule real_mult_order, assumption) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
146 |
apply (simp add: real_add_mult_distrib2) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
147 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
148 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
149 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
150 |
subsection{*The Reals Form an Ordered Field*} |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
151 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
152 |
instance real :: inverse .. |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
153 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
154 |
instance real :: ordered_field |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
155 |
proof |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
156 |
fix x y z :: real |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
157 |
show "(x + y) + z = x + (y + z)" by (rule real_add_assoc) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
158 |
show "x + y = y + x" by (rule real_add_commute) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
159 |
show "0 + x = x" by simp |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
160 |
show "- x + x = 0" by simp |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
161 |
show "x - y = x + (-y)" by (simp add: real_diff_def) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
162 |
show "(x * y) * z = x * (y * z)" by (rule real_mult_assoc) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
163 |
show "x * y = y * x" by (rule real_mult_commute) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
164 |
show "1 * x = x" by simp |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
165 |
show "(x + y) * z = x * z + y * z" by (simp add: real_add_mult_distrib) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
166 |
show "0 \<noteq> (1::real)" by (rule real_zero_not_eq_one) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
167 |
show "x \<le> y ==> z + x \<le> z + y" by simp |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
168 |
show "x < y ==> 0 < z ==> z * x < z * y" by (simp add: real_mult_less_mono2) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
169 |
show "\<bar>x\<bar> = (if x < 0 then -x else x)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
170 |
by (auto dest: order_le_less_trans simp add: real_abs_def linorder_not_le) |
14266 | 171 |
show "x \<noteq> 0 ==> inverse x * x = 1" by simp |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
172 |
show "y \<noteq> 0 ==> x / y = x * inverse y" by (simp add: real_divide_def) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
173 |
qed |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
174 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
175 |
(*"v\<le>w ==> v+z \<le> w+z"*) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
176 |
lemmas real_add_less_mono1 = real_add_right_cancel_less [THEN iffD2, standard] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
177 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
178 |
(*"v\<le>w ==> v+z \<le> w+z"*) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
179 |
lemmas real_add_le_mono1 = real_add_right_cancel_le [THEN iffD2, standard] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
180 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
181 |
lemma real_add_less_le_mono: "!!z z'::real. [| w'<w; z'\<le>z |] ==> w' + z' < w + z" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
182 |
by (erule real_add_less_mono1 [THEN order_less_le_trans], simp) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
183 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
184 |
lemma real_add_le_less_mono: "!!z z'::real. [| w'\<le>w; z'<z |] ==> w' + z' < w + z" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
185 |
by (erule real_add_le_mono1 [THEN order_le_less_trans], simp) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
186 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
187 |
lemma real_add_less_mono2: "!!(A::real). A < B ==> C + A < C + B" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
188 |
by simp |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
189 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
190 |
lemma real_less_add_right_cancel: "!!(A::real). A + C < B + C ==> A < B" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
191 |
apply simp |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
192 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
193 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
194 |
lemma real_less_add_left_cancel: "!!(A::real). C + A < C + B ==> A < B" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
195 |
apply simp |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
196 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
197 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
198 |
lemma real_le_add_right_cancel: "!!(A::real). A + C \<le> B + C ==> A \<le> B" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
199 |
apply simp |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
200 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
201 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
202 |
lemma real_le_add_left_cancel: "!!(A::real). C + A \<le> C + B ==> A \<le> B" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
203 |
apply simp |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
204 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
205 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
206 |
lemma real_zero_less_one: "0 < (1::real)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
207 |
by (rule Ring_and_Field.zero_less_one) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
208 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
209 |
lemma real_add_less_mono: "[| R1 < S1; R2 < S2 |] ==> R1+R2 < S1+(S2::real)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
210 |
by (rule Ring_and_Field.add_strict_mono) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
211 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
212 |
lemma real_add_left_le_mono1: "!!(q1::real). q1 \<le> q2 ==> x + q1 \<le> x + q2" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
213 |
by simp |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
214 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
215 |
lemma real_add_le_mono: "[|i\<le>j; k\<le>l |] ==> i + k \<le> j + (l::real)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
216 |
by (rule Ring_and_Field.add_mono) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
217 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
218 |
lemma real_le_minus_iff: "(-s \<le> -r) = ((r::real) \<le> s)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
219 |
by (rule Ring_and_Field.neg_le_iff_le) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
220 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
221 |
lemma real_le_square [simp]: "(0::real) \<le> x*x" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
222 |
by (rule Ring_and_Field.zero_le_square) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
223 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
224 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
225 |
subsection{*An Embedding of the Naturals in the Reals*} |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
226 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
227 |
lemma real_of_posnat_one: "real_of_posnat 0 = (1::real)" |
14266 | 228 |
by (simp add: real_of_posnat_def pnat_one_iff [symmetric] |
229 |
real_of_preal_def symmetric real_one_def) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
230 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
231 |
lemma real_of_posnat_two: "real_of_posnat (Suc 0) = (1::real) + (1::real)" |
14266 | 232 |
by (simp add: real_of_posnat_def real_of_preal_def real_one_def pnat_two_eq |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
233 |
real_add |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
234 |
prat_of_pnat_add [symmetric] preal_of_prat_add [symmetric] |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
235 |
pnat_add_ac) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
236 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
237 |
lemma real_of_posnat_add: |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
238 |
"real_of_posnat n1 + real_of_posnat n2 = real_of_posnat (n1 + n2) + (1::real)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
239 |
apply (unfold real_of_posnat_def) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
240 |
apply (simp (no_asm_use) add: real_of_posnat_one [symmetric] real_of_posnat_def real_of_preal_add [symmetric] preal_of_prat_add [symmetric] prat_of_pnat_add [symmetric] pnat_of_nat_add) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
241 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
242 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
243 |
lemma real_of_posnat_add_one: "real_of_posnat (n + 1) = real_of_posnat n + (1::real)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
244 |
apply (rule_tac x1 = " (1::real) " in real_add_right_cancel [THEN iffD1]) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
245 |
apply (rule real_of_posnat_add [THEN subst]) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
246 |
apply (simp (no_asm_use) add: real_of_posnat_two real_add_assoc) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
247 |
done |
7334 | 248 |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
249 |
lemma real_of_posnat_Suc: "real_of_posnat (Suc n) = real_of_posnat n + (1::real)" |
14266 | 250 |
by (subst real_of_posnat_add_one [symmetric], simp) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
251 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
252 |
lemma inj_real_of_posnat: "inj(real_of_posnat)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
253 |
apply (rule inj_onI) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
254 |
apply (unfold real_of_posnat_def) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
255 |
apply (drule inj_real_of_preal [THEN injD]) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
256 |
apply (drule inj_preal_of_prat [THEN injD]) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
257 |
apply (drule inj_prat_of_pnat [THEN injD]) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
258 |
apply (erule inj_pnat_of_nat [THEN injD]) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
259 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
260 |
|
14266 | 261 |
lemma real_of_nat_zero [simp]: "real (0::nat) = 0" |
262 |
by (simp add: real_of_nat_def real_of_posnat_one) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
263 |
|
14266 | 264 |
lemma real_of_nat_one [simp]: "real (Suc 0) = (1::real)" |
265 |
by (simp add: real_of_nat_def real_of_posnat_two real_add_assoc) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
266 |
|
14266 | 267 |
lemma real_of_nat_add [simp]: |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
268 |
"real (m + n) = real (m::nat) + real n" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
269 |
apply (simp add: real_of_nat_def real_add_assoc) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
270 |
apply (simp add: real_of_posnat_add real_add_assoc [symmetric]) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
271 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
272 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
273 |
(*Not for addsimps: often the LHS is used to represent a positive natural*) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
274 |
lemma real_of_nat_Suc: "real (Suc n) = real n + (1::real)" |
14266 | 275 |
by (simp add: real_of_nat_def real_of_posnat_Suc real_add_ac) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
276 |
|
14266 | 277 |
lemma real_of_nat_less_iff [iff]: |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
278 |
"(real (n::nat) < real m) = (n < m)" |
14266 | 279 |
by (auto simp add: real_of_nat_def real_of_posnat_def) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
280 |
|
14266 | 281 |
lemma real_of_nat_le_iff [iff]: "(real (n::nat) \<le> real m) = (n \<le> m)" |
282 |
by (simp add: linorder_not_less [symmetric]) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
283 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
284 |
lemma inj_real_of_nat: "inj (real :: nat => real)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
285 |
apply (rule inj_onI) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
286 |
apply (auto intro!: inj_real_of_posnat [THEN injD] |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
287 |
simp add: real_of_nat_def real_add_right_cancel) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
288 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
289 |
|
14266 | 290 |
lemma real_of_nat_ge_zero [iff]: "0 \<le> real (n::nat)" |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
291 |
apply (induct_tac "n") |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
292 |
apply (auto simp add: real_of_nat_Suc) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
293 |
apply (drule real_add_le_less_mono) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
294 |
apply (rule real_zero_less_one) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
295 |
apply (simp add: order_less_imp_le) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
296 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
297 |
|
14266 | 298 |
lemma real_of_nat_mult [simp]: "real (m * n) = real (m::nat) * real n" |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
299 |
apply (induct_tac "m") |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
300 |
apply (auto simp add: real_of_nat_Suc real_add_mult_distrib real_add_commute) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
301 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
302 |
|
14266 | 303 |
lemma real_of_nat_inject [iff]: "(real (n::nat) = real m) = (n = m)" |
304 |
by (auto dest: inj_real_of_nat [THEN injD]) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
305 |
|
14266 | 306 |
lemma real_of_nat_diff [rule_format]: |
307 |
"n \<le> m --> real (m - n) = real (m::nat) - real n" |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
308 |
apply (induct_tac "m") |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
309 |
apply (auto simp add: real_diff_def Suc_diff_le le_Suc_eq real_of_nat_Suc real_of_nat_zero real_add_ac) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
310 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
311 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
312 |
lemma real_of_nat_zero_iff: "(real (n::nat) = 0) = (n = 0)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
313 |
proof |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
314 |
assume "real n = 0" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
315 |
have "real n = real (0::nat)" by simp |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
316 |
then show "n = 0" by (simp only: real_of_nat_inject) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
317 |
next |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
318 |
show "n = 0 \<Longrightarrow> real n = 0" by simp |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
319 |
qed |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
320 |
|
14266 | 321 |
lemma real_of_nat_neg_int [simp]: "neg z ==> real (nat z) = 0" |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
322 |
apply (simp add: neg_nat real_of_nat_zero) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
323 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
324 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
325 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
326 |
subsection{*Inverse and Division*} |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
327 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
328 |
instance real :: division_by_zero |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
329 |
proof |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
330 |
fix x :: real |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
331 |
show "inverse 0 = (0::real)" by (rule INVERSE_ZERO) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
332 |
show "x/0 = 0" by (rule DIVISION_BY_ZERO) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
333 |
qed |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
334 |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
335 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
336 |
lemma real_inverse_gt_0: "0 < x ==> 0 < inverse (x::real)" |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
337 |
by (rule Ring_and_Field.inverse_gt_0) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
338 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
339 |
lemma real_inverse_less_0: "x < 0 ==> inverse (x::real) < 0" |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
340 |
by (rule Ring_and_Field.inverse_less_0) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
341 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
342 |
lemma real_mult_less_cancel1: "[| (0::real) < z; x * z < y * z |] ==> x < y" |
14266 | 343 |
by (force simp add: Ring_and_Field.mult_less_cancel_right |
344 |
elim: order_less_asym) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
345 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
346 |
lemma real_mult_less_cancel2: "[| (0::real) < z; z*x < z*y |] ==> x < y" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
347 |
apply (erule real_mult_less_cancel1) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
348 |
apply (simp add: real_mult_commute) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
349 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
350 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
351 |
lemma real_mult_less_mono1: "[| (0::real) < z; x < y |] ==> x*z < y*z" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
352 |
by (rule Ring_and_Field.mult_strict_right_mono) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
353 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
354 |
lemma real_mult_less_mono: |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
355 |
"[| u<v; x<y; (0::real) < v; 0 < x |] ==> u*x < v* y" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
356 |
by (simp add: Ring_and_Field.mult_strict_mono order_less_imp_le) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
357 |
|
14266 | 358 |
lemma real_mult_less_iff1 [simp]: "(0::real) < z ==> (x*z < y*z) = (x < y)" |
359 |
by (blast intro: real_mult_less_mono1 real_mult_less_cancel1) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
360 |
|
14266 | 361 |
lemma real_mult_less_iff2 [simp]: "(0::real) < z ==> (z*x < z*y) = (x < y)" |
362 |
by (blast intro: real_mult_less_mono2 real_mult_less_cancel2) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
363 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
364 |
(* 05/00 *) |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
365 |
lemma real_mult_le_cancel_iff1 [simp]: "(0::real) < z ==> (x*z \<le> y*z) = (x\<le>y)" |
14266 | 366 |
by (auto simp add: real_le_def) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
367 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
368 |
lemma real_mult_le_cancel_iff2 [simp]: "(0::real) < z ==> (z*x \<le> z*y) = (x\<le>y)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
369 |
by (auto simp add: real_le_def) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
370 |
|
14266 | 371 |
lemma real_mult_less_mono': |
372 |
"[| x < y; r1 < r2; (0::real) \<le> r1; 0 \<le> x|] ==> r1 * x < r2 * y" |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
373 |
apply (subgoal_tac "0<r2") |
14266 | 374 |
prefer 2 apply (blast intro: order_le_less_trans) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
375 |
apply (case_tac "x=0") |
14266 | 376 |
apply (auto dest!: order_le_imp_less_or_eq |
377 |
intro: real_mult_less_mono real_mult_order) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
378 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
379 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
380 |
lemma real_inverse_less_swap: |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
381 |
"[| 0 < r; r < x |] ==> inverse x < inverse (r::real)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
382 |
by (rule Ring_and_Field.less_imp_inverse_less) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
383 |
|
14266 | 384 |
lemma real_mult_is_0 [iff]: "(x*y = 0) = (x = 0 | y = (0::real))" |
385 |
by auto |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
386 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
387 |
lemma real_inverse_add: "[| x \<noteq> 0; y \<noteq> 0 |] |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
388 |
==> inverse x + inverse y = (x + y) * inverse (x * (y::real))" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
389 |
apply (simp add: real_inverse_distrib real_add_mult_distrib real_mult_assoc [symmetric]) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
390 |
apply (subst real_mult_assoc) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
391 |
apply (rule real_mult_left_commute [THEN subst]) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
392 |
apply (simp add: real_add_commute) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
393 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
394 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
395 |
lemma real_sum_squares_cancel: "x * x + y * y = 0 ==> x = (0::real)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
396 |
apply (drule real_add_minus_eq_minus) |
14266 | 397 |
apply (cut_tac x = x in real_le_square) |
398 |
apply (auto, drule real_le_anti_sym, auto) |
|
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
399 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
400 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
401 |
lemma real_sum_squares_cancel2: "x * x + y * y = 0 ==> y = (0::real)" |
14266 | 402 |
apply (rule_tac y = x in real_sum_squares_cancel) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
403 |
apply (simp add: real_add_commute) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
404 |
done |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
405 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
406 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
407 |
subsection{*Convenient Biconditionals for Products of Signs*} |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
408 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
409 |
lemma real_0_less_mult_iff: "((0::real) < x*y) = (0<x & 0<y | x<0 & y<0)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
410 |
by (rule Ring_and_Field.zero_less_mult_iff) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
411 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
412 |
lemma real_0_le_mult_iff: "((0::real)\<le>x*y) = (0\<le>x & 0\<le>y | x\<le>0 & y\<le>0)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
413 |
by (rule zero_le_mult_iff) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
414 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
415 |
lemma real_mult_less_0_iff: "(x*y < (0::real)) = (0<x & y<0 | x<0 & 0<y)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
416 |
by (rule mult_less_0_iff) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
417 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
418 |
lemma real_mult_le_0_iff: "(x*y \<le> (0::real)) = (0\<le>x & y\<le>0 | x\<le>0 & 0\<le>y)" |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
419 |
by (rule mult_le_0_iff) |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
420 |
|
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
421 |
subsection{*Hardly Used Theorems to be Deleted*} |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
422 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
423 |
lemma real_add_order: "[| 0 < x; 0 < y |] ==> (0::real) < x + y" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
424 |
apply (erule order_less_trans) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
425 |
apply (drule real_add_less_mono2) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
426 |
apply simp |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
427 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
428 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
429 |
lemma real_le_add_order: "[| 0 \<le> x; 0 \<le> y |] ==> (0::real) \<le> x + y" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
430 |
apply (drule order_le_imp_less_or_eq)+ |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
431 |
apply (auto intro: real_add_order order_less_imp_le) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
432 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
433 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
434 |
(*One use in HahnBanach/Aux.thy*) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
435 |
lemma real_mult_le_less_mono1: "[| (0::real) \<le> z; x < y |] ==> x*z \<le> y*z" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
436 |
apply (rule real_less_or_eq_imp_le) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
437 |
apply (drule order_le_imp_less_or_eq) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
438 |
apply (auto intro: real_mult_less_mono1) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
439 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
440 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
441 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
442 |
lemma real_of_posnat_gt_zero: "0 < real_of_posnat n" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
443 |
apply (unfold real_of_posnat_def) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
444 |
apply (rule real_gt_zero_preal_Ex [THEN iffD2]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
445 |
apply blast |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
446 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
447 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
448 |
declare real_of_posnat_gt_zero [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
449 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
450 |
lemmas real_inv_real_of_posnat_gt_zero = real_of_posnat_gt_zero [THEN real_inverse_gt_0, standard] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
451 |
declare real_inv_real_of_posnat_gt_zero [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
452 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
453 |
lemmas real_of_posnat_ge_zero = real_of_posnat_gt_zero [THEN order_less_imp_le, standard] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
454 |
declare real_of_posnat_ge_zero [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
455 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
456 |
lemma real_of_posnat_not_eq_zero: "real_of_posnat n ~= 0" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
457 |
apply (rule real_of_posnat_gt_zero [THEN real_not_refl2, THEN not_sym]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
458 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
459 |
declare real_of_posnat_not_eq_zero [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
460 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
461 |
declare real_of_posnat_not_eq_zero [THEN real_mult_inv_left, simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
462 |
declare real_of_posnat_not_eq_zero [THEN real_mult_inv_right, simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
463 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
464 |
lemma real_of_posnat_ge_one: "1 <= real_of_posnat n" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
465 |
apply (simp (no_asm) add: real_of_posnat_one [symmetric]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
466 |
apply (induct_tac "n") |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
467 |
apply (auto simp add: real_of_posnat_Suc real_of_posnat_one order_less_imp_le) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
468 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
469 |
declare real_of_posnat_ge_one [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
470 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
471 |
lemma real_of_posnat_real_inv_not_zero: "inverse(real_of_posnat n) ~= 0" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
472 |
apply (rule real_inverse_not_zero) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
473 |
apply (rule real_of_posnat_gt_zero [THEN real_not_refl2, THEN not_sym]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
474 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
475 |
declare real_of_posnat_real_inv_not_zero [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
476 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
477 |
lemma real_of_posnat_real_inv_inj: "inverse(real_of_posnat x) = inverse(real_of_posnat y) ==> x = y" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
478 |
apply (rule inj_real_of_posnat [THEN injD]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
479 |
apply (rule real_of_posnat_real_inv_not_zero |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
480 |
[THEN real_mult_left_cancel, THEN iffD1, of x]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
481 |
apply (simp add: real_mult_inv_left |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
482 |
real_of_posnat_gt_zero [THEN real_not_refl2, THEN not_sym]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
483 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
484 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
485 |
lemma real_mult_less_self: "0 < r ==> r*(1 + -inverse(real_of_posnat n)) < r" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
486 |
apply (simp (no_asm) add: real_add_mult_distrib2) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
487 |
apply (rule_tac C = "-r" in real_less_add_left_cancel) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
488 |
apply (auto intro: real_mult_order simp add: real_add_assoc [symmetric] real_minus_zero_less_iff2) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
489 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
490 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
491 |
lemma real_of_posnat_inv_Ex_iff: "(EX n. inverse(real_of_posnat n) < r) = (EX n. 1 < r * real_of_posnat n)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
492 |
apply safe |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
493 |
apply (drule_tac n1 = "n" in real_of_posnat_gt_zero [THEN real_mult_less_mono1]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
494 |
apply (drule_tac [2] n2=n in real_of_posnat_gt_zero [THEN real_inverse_gt_0, THEN real_mult_less_mono1]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
495 |
apply (auto simp add: real_of_posnat_gt_zero [THEN real_not_refl2, THEN not_sym] real_mult_assoc) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
496 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
497 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
498 |
lemma real_of_posnat_inv_iff: "(inverse(real_of_posnat n) < r) = (1 < r * real_of_posnat n)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
499 |
apply safe |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
500 |
apply (drule_tac n1 = "n" in real_of_posnat_gt_zero [THEN real_mult_less_mono1]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
501 |
apply (drule_tac [2] n2=n in real_of_posnat_gt_zero [THEN real_inverse_gt_0, THEN real_mult_less_mono1]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
502 |
apply (auto simp add: real_mult_assoc) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
503 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
504 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
505 |
lemma real_mult_le_le_mono1: "[| (0::real) <=z; x<=y |] ==> z*x<=z*y" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
506 |
by (rule Ring_and_Field.mult_left_mono) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
507 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
508 |
lemma real_mult_le_le_mono2: "[| (0::real)<=z; x<=y |] ==> x*z<=y*z" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
509 |
by (rule Ring_and_Field.mult_right_mono) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
510 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
511 |
lemma real_of_posnat_inv_le_iff: "(inverse(real_of_posnat n) <= r) = (1 <= r * real_of_posnat n)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
512 |
apply safe |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
513 |
apply (drule_tac n2=n in real_of_posnat_gt_zero [THEN order_less_imp_le, THEN real_mult_le_le_mono1]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
514 |
apply (drule_tac [2] n3=n in real_of_posnat_gt_zero [THEN real_inverse_gt_0, THEN order_less_imp_le, THEN real_mult_le_le_mono1]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
515 |
apply (auto simp add: real_mult_ac) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
516 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
517 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
518 |
lemma real_of_posnat_less_iff: |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
519 |
"(real_of_posnat n < real_of_posnat m) = (n < m)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
520 |
apply (unfold real_of_posnat_def) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
521 |
apply auto |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
522 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
523 |
declare real_of_posnat_less_iff [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
524 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
525 |
lemma real_of_posnat_le_iff: "(real_of_posnat n <= real_of_posnat m) = (n <= m)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
526 |
apply (auto dest: inj_real_of_posnat [THEN injD] simp add: real_le_less le_eq_less_or_eq) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
527 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
528 |
declare real_of_posnat_le_iff [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
529 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
530 |
lemma real_mult_less_cancel3: "[| (0::real)<z; x*z<y*z |] ==> x<y" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
531 |
apply auto |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
532 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
533 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
534 |
lemma real_mult_less_cancel4: "[| (0::real)<z; z*x<z*y |] ==> x<y" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
535 |
apply auto |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
536 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
537 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
538 |
lemma real_of_posnat_less_inv_iff: "0 < u ==> (u < inverse (real_of_posnat n)) = (real_of_posnat n < inverse(u))" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
539 |
apply safe |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
540 |
apply (rule_tac n2=n in real_of_posnat_gt_zero [THEN real_inverse_gt_0, THEN real_mult_less_cancel3]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
541 |
apply (rule_tac [2] x1 = "u" in real_inverse_gt_0 [THEN real_mult_less_cancel3]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
542 |
apply (auto simp add: real_not_refl2 [THEN not_sym]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
543 |
apply (rule_tac z = "u" in real_mult_less_cancel4) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
544 |
apply (rule_tac [3] n1 = "n" in real_of_posnat_gt_zero [THEN real_mult_less_cancel4]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
545 |
apply (auto simp add: real_not_refl2 [THEN not_sym] real_mult_assoc [symmetric]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
546 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
547 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
548 |
lemma real_of_posnat_inv_eq_iff: "0 < u ==> (u = inverse(real_of_posnat n)) = (real_of_posnat n = inverse u)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
549 |
apply auto |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
550 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
551 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
552 |
lemma real_add_one_minus_inv_ge_zero: "0 <= 1 + -inverse(real_of_posnat n)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
553 |
apply (rule_tac C = "inverse (real_of_posnat n) " in real_le_add_right_cancel) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
554 |
apply (simp (no_asm) add: real_add_assoc real_of_posnat_inv_le_iff) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
555 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
556 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
557 |
lemma real_mult_add_one_minus_ge_zero: "0 < r ==> 0 <= r*(1 + -inverse(real_of_posnat n))" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
558 |
apply (drule real_add_one_minus_inv_ge_zero [THEN real_mult_le_less_mono1]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
559 |
apply auto |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
560 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
561 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
562 |
lemma real_inverse_unique: "x*y = (1::real) ==> y = inverse x" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
563 |
apply (case_tac "x ~= 0") |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
564 |
apply (rule_tac c1 = "x" in real_mult_left_cancel [THEN iffD1]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
565 |
apply auto |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
566 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
567 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
568 |
lemma real_inverse_gt_one: "[| (0::real) < x; x < 1 |] ==> 1 < inverse x" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
569 |
apply (auto dest: real_inverse_less_swap) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
570 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
571 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
572 |
lemma real_of_nat_gt_zero_cancel_iff: "(0 < real (n::nat)) = (0 < n)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
573 |
apply (rule real_of_nat_less_iff [THEN subst]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
574 |
apply auto |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
575 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
576 |
declare real_of_nat_gt_zero_cancel_iff [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
577 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
578 |
lemma real_of_nat_le_zero_cancel_iff: "(real (n::nat) <= 0) = (n = 0)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
579 |
apply (rule real_of_nat_zero [THEN subst]) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
580 |
apply (subst real_of_nat_le_iff) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
581 |
apply auto |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
582 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
583 |
declare real_of_nat_le_zero_cancel_iff [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
584 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
585 |
lemma not_real_of_nat_less_zero: "~ real (n::nat) < 0" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
586 |
apply (simp (no_asm) add: real_le_def [symmetric] real_of_nat_ge_zero) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
587 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
588 |
declare not_real_of_nat_less_zero [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
589 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
590 |
lemma real_of_nat_ge_zero_cancel_iff: |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
591 |
"(0 <= real (n::nat)) = (0 <= n)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
592 |
apply (unfold real_le_def le_def) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
593 |
apply (simp (no_asm)) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
594 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
595 |
declare real_of_nat_ge_zero_cancel_iff [simp] |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
596 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
597 |
lemma real_of_nat_num_if: "real n = (if n=0 then 0 else 1 + real ((n::nat) - 1))" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
598 |
apply (case_tac "n") |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
599 |
apply (auto simp add: real_of_nat_Suc) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
600 |
done |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
601 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
602 |
(*RING AND FIELD*) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
603 |
lemma mult_less_imp_less_left: |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
604 |
"[|c*a < c*b; 0 < c|] ==> a < (b::'a::ordered_ring)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
605 |
by (force elim: order_less_asym simp add: mult_less_cancel_left) |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
606 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
607 |
lemma mult_less_imp_less_right: |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
608 |
"[|a*c < b*c; 0 < c|] ==> a < (b::'a::ordered_ring)" |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
609 |
by (force elim: order_less_asym simp add: mult_less_cancel_right) |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
610 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
611 |
ML |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
612 |
{* |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
613 |
val real_abs_def = thm "real_abs_def"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
614 |
|
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
615 |
val real_minus_diff_eq = thm "real_minus_diff_eq"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
616 |
val real_gt_zero_preal_Ex = thm "real_gt_zero_preal_Ex"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
617 |
val real_gt_preal_preal_Ex = thm "real_gt_preal_preal_Ex"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
618 |
val real_ge_preal_preal_Ex = thm "real_ge_preal_preal_Ex"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
619 |
val real_less_all_preal = thm "real_less_all_preal"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
620 |
val real_less_all_real2 = thm "real_less_all_real2"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
621 |
val real_of_preal_le_iff = thm "real_of_preal_le_iff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
622 |
val real_mult_order = thm "real_mult_order"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
623 |
val real_zero_less_one = thm "real_zero_less_one"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
624 |
val real_add_right_cancel_less = thm "real_add_right_cancel_less"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
625 |
val real_add_left_cancel_less = thm "real_add_left_cancel_less"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
626 |
val real_add_right_cancel_le = thm "real_add_right_cancel_le"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
627 |
val real_add_left_cancel_le = thm "real_add_left_cancel_le"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
628 |
val real_add_less_mono1 = thm "real_add_less_mono1"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
629 |
val real_add_le_mono1 = thm "real_add_le_mono1"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
630 |
val real_add_less_le_mono = thm "real_add_less_le_mono"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
631 |
val real_add_le_less_mono = thm "real_add_le_less_mono"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
632 |
val real_add_less_mono2 = thm "real_add_less_mono2"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
633 |
val real_less_add_right_cancel = thm "real_less_add_right_cancel"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
634 |
val real_less_add_left_cancel = thm "real_less_add_left_cancel"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
635 |
val real_le_add_right_cancel = thm "real_le_add_right_cancel"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
636 |
val real_le_add_left_cancel = thm "real_le_add_left_cancel"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
637 |
val real_add_order = thm "real_add_order"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
638 |
val real_le_add_order = thm "real_le_add_order"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
639 |
val real_add_less_mono = thm "real_add_less_mono"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
640 |
val real_add_left_le_mono1 = thm "real_add_left_le_mono1"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
641 |
val real_add_le_mono = thm "real_add_le_mono"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
642 |
val real_le_minus_iff = thm "real_le_minus_iff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
643 |
val real_le_square = thm "real_le_square"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
644 |
val real_mult_less_mono1 = thm "real_mult_less_mono1"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
645 |
val real_mult_less_mono2 = thm "real_mult_less_mono2"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
646 |
val real_of_posnat_one = thm "real_of_posnat_one"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
647 |
val real_of_posnat_two = thm "real_of_posnat_two"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
648 |
val real_of_posnat_add = thm "real_of_posnat_add"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
649 |
val real_of_posnat_add_one = thm "real_of_posnat_add_one"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
650 |
val real_of_posnat_Suc = thm "real_of_posnat_Suc"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
651 |
val inj_real_of_posnat = thm "inj_real_of_posnat"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
652 |
val real_of_nat_zero = thm "real_of_nat_zero"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
653 |
val real_of_nat_one = thm "real_of_nat_one"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
654 |
val real_of_nat_add = thm "real_of_nat_add"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
655 |
val real_of_nat_Suc = thm "real_of_nat_Suc"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
656 |
val real_of_nat_less_iff = thm "real_of_nat_less_iff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
657 |
val real_of_nat_le_iff = thm "real_of_nat_le_iff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
658 |
val inj_real_of_nat = thm "inj_real_of_nat"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
659 |
val real_of_nat_ge_zero = thm "real_of_nat_ge_zero"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
660 |
val real_of_nat_mult = thm "real_of_nat_mult"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
661 |
val real_of_nat_inject = thm "real_of_nat_inject"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
662 |
val real_of_nat_diff = thm "real_of_nat_diff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
663 |
val real_of_nat_zero_iff = thm "real_of_nat_zero_iff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
664 |
val real_of_nat_neg_int = thm "real_of_nat_neg_int"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
665 |
val real_inverse_gt_0 = thm "real_inverse_gt_0"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
666 |
val real_inverse_less_0 = thm "real_inverse_less_0"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
667 |
val real_mult_less_cancel1 = thm "real_mult_less_cancel1"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
668 |
val real_mult_less_cancel2 = thm "real_mult_less_cancel2"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
669 |
val real_mult_less_iff1 = thm "real_mult_less_iff1"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
670 |
val real_mult_less_iff2 = thm "real_mult_less_iff2"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
671 |
val real_mult_le_cancel_iff1 = thm "real_mult_le_cancel_iff1"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
672 |
val real_mult_le_cancel_iff2 = thm "real_mult_le_cancel_iff2"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
673 |
val real_mult_less_mono = thm "real_mult_less_mono"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
674 |
val real_mult_less_mono' = thm "real_mult_less_mono'"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
675 |
val real_inverse_less_swap = thm "real_inverse_less_swap"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
676 |
val real_mult_is_0 = thm "real_mult_is_0"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
677 |
val real_inverse_add = thm "real_inverse_add"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
678 |
val real_sum_squares_cancel = thm "real_sum_squares_cancel"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
679 |
val real_sum_squares_cancel2 = thm "real_sum_squares_cancel2"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
680 |
val real_0_less_mult_iff = thm "real_0_less_mult_iff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
681 |
val real_0_le_mult_iff = thm "real_0_le_mult_iff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
682 |
val real_mult_less_0_iff = thm "real_mult_less_0_iff"; |
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
683 |
val real_mult_le_0_iff = thm "real_mult_le_0_iff"; |
14268
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
684 |
|
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
685 |
val real_of_posnat_gt_zero = thm "real_of_posnat_gt_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
686 |
val real_inv_real_of_posnat_gt_zero = thm "real_inv_real_of_posnat_gt_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
687 |
val real_of_posnat_ge_zero = thm "real_of_posnat_ge_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
688 |
val real_of_posnat_not_eq_zero = thm "real_of_posnat_not_eq_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
689 |
val real_of_posnat_ge_one = thm "real_of_posnat_ge_one"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
690 |
val real_of_posnat_real_inv_not_zero = thm "real_of_posnat_real_inv_not_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
691 |
val real_of_posnat_real_inv_inj = thm "real_of_posnat_real_inv_inj"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
692 |
val real_mult_less_self = thm "real_mult_less_self"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
693 |
val real_of_posnat_inv_Ex_iff = thm "real_of_posnat_inv_Ex_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
694 |
val real_of_posnat_inv_iff = thm "real_of_posnat_inv_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
695 |
val real_mult_le_le_mono1 = thm "real_mult_le_le_mono1"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
696 |
val real_mult_le_le_mono2 = thm "real_mult_le_le_mono2"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
697 |
val real_of_posnat_inv_le_iff = thm "real_of_posnat_inv_le_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
698 |
val real_of_posnat_less_iff = thm "real_of_posnat_less_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
699 |
val real_of_posnat_le_iff = thm "real_of_posnat_le_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
700 |
val real_mult_less_cancel3 = thm "real_mult_less_cancel3"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
701 |
val real_mult_less_cancel4 = thm "real_mult_less_cancel4"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
702 |
val real_of_posnat_less_inv_iff = thm "real_of_posnat_less_inv_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
703 |
val real_of_posnat_inv_eq_iff = thm "real_of_posnat_inv_eq_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
704 |
val real_add_one_minus_inv_ge_zero = thm "real_add_one_minus_inv_ge_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
705 |
val real_mult_add_one_minus_ge_zero = thm "real_mult_add_one_minus_ge_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
706 |
val real_inverse_unique = thm "real_inverse_unique"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
707 |
val real_inverse_gt_one = thm "real_inverse_gt_one"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
708 |
val real_of_nat_gt_zero_cancel_iff = thm "real_of_nat_gt_zero_cancel_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
709 |
val real_of_nat_le_zero_cancel_iff = thm "real_of_nat_le_zero_cancel_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
710 |
val not_real_of_nat_less_zero = thm "not_real_of_nat_less_zero"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
711 |
val real_of_nat_ge_zero_cancel_iff = thm "real_of_nat_ge_zero_cancel_iff"; |
5cf13e80be0e
Removal of Hyperreal/ExtraThms2.ML, sending the material to the correct files.
paulson
parents:
14266
diff
changeset
|
712 |
val real_of_nat_num_if = thm "real_of_nat_num_if"; |
14265
95b42e69436c
HOL: installation of Ring_and_Field as the basis for Naturals and Reals
paulson
parents:
9043
diff
changeset
|
713 |
*} |
9043
ca761fe227d8
First round of changes, towards installation of simprocs
paulson
parents:
9013
diff
changeset
|
714 |
|
7334 | 715 |
end |