author | wenzelm |
Tue, 24 Aug 1999 11:50:58 +0200 | |
changeset 7333 | 6cb15c6f1d9f |
parent 7219 | 4e3f386c2e37 |
child 7499 | 23e090051cb8 |
permissions | -rw-r--r-- |
5078 | 1 |
(* Title : RComplete.thy |
7219 | 2 |
ID : $Id$ |
5078 | 3 |
Author : Jacques D. Fleuriot |
4 |
Copyright : 1998 University of Cambridge |
|
5 |
Description : Completeness theorems for positive |
|
6 |
reals and reals |
|
7 |
*) |
|
8 |
||
5521 | 9 |
claset_ref() := claset() delWrapper "bspec"; |
10 |
||
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
11 |
(*--------------------------------------------------------- |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
12 |
Completeness of reals: use supremum property of |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
13 |
preal and theorems about real_preal. Theorems |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
14 |
previously in Real.ML. |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
15 |
---------------------------------------------------------*) |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
16 |
(*a few lemmas*) |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
17 |
Goal "! x:P. 0r < x ==> \ |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
18 |
\ ((? x:P. y < x) = (? X. real_of_preal X : P & \ |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
19 |
\ y < real_of_preal X))"; |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
20 |
by (blast_tac (claset() addSDs [bspec, |
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
21 |
real_gt_zero_preal_Ex RS iffD1]) 1); |
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
22 |
qed "real_sup_lemma1"; |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
23 |
|
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
24 |
Goal "[| ! x:P. 0r < x; ? x. x: P; ? y. !x: P. x < y |] \ |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
25 |
\ ==> (? X. X: {w. real_of_preal w : P}) & \ |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
26 |
\ (? Y. !X: {w. real_of_preal w : P}. X < Y)"; |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
27 |
by (rtac conjI 1); |
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
28 |
by (blast_tac (claset() addDs [bspec, real_gt_zero_preal_Ex RS iffD1]) 1); |
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
29 |
by Auto_tac; |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
30 |
by (dtac bspec 1 THEN assume_tac 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
31 |
by (forward_tac [bspec] 1 THEN assume_tac 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
32 |
by (dtac real_less_trans 1 THEN assume_tac 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
33 |
by (dtac (real_gt_zero_preal_Ex RS iffD1) 1 THEN etac exE 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
34 |
by (res_inst_tac [("x","ya")] exI 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
35 |
by Auto_tac; |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
36 |
by (dres_inst_tac [("x","real_of_preal X")] bspec 1 THEN assume_tac 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
37 |
by (etac real_of_preal_lessD 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
38 |
qed "real_sup_lemma2"; |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
39 |
|
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
40 |
(*------------------------------------------------------------- |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
41 |
Completeness of Positive Reals |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
42 |
-------------------------------------------------------------*) |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
43 |
|
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
44 |
(* Supremum property for the set of positive reals *) |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
45 |
(* FIXME: long proof - can be improved - need only have |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
46 |
one case split *) (* will do for now *) |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
47 |
Goal "[| ! x:P. 0r < x; ? x. x: P; ? y. !x: P. x < y |] \ |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
48 |
\ ==> (? S. !y. (? x: P. y < x) = (y < S))"; |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
49 |
by (res_inst_tac |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
50 |
[("x","real_of_preal (psup({w. real_of_preal w : P}))")] exI 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
51 |
by Auto_tac; |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
52 |
by (forward_tac [real_sup_lemma2] 1 THEN Auto_tac); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
53 |
by (case_tac "0r < ya" 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
54 |
by (dtac (real_gt_zero_preal_Ex RS iffD1) 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
55 |
by (dtac real_less_all_real2 2); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
56 |
by Auto_tac; |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
57 |
by (rtac (preal_complete RS spec RS iffD1) 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
58 |
by Auto_tac; |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
59 |
by (forward_tac [real_gt_preal_preal_Ex] 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
60 |
by Auto_tac; |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
61 |
(* second part *) |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
62 |
by (rtac (real_sup_lemma1 RS iffD2) 1 THEN assume_tac 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
63 |
by (case_tac "0r < ya" 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
64 |
by (auto_tac (claset() addSDs [real_less_all_real2, |
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
65 |
real_gt_zero_preal_Ex RS iffD1],simpset())); |
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
66 |
by (forward_tac [real_sup_lemma2] 2 THEN Auto_tac); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
67 |
by (forward_tac [real_sup_lemma2] 1 THEN Auto_tac); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
68 |
by (rtac (preal_complete RS spec RS iffD2 RS bexE) 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
69 |
by (Blast_tac 3); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
70 |
by (Blast_tac 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
71 |
by (Blast_tac 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
72 |
by (Blast_tac 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
73 |
qed "posreal_complete"; |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
74 |
|
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
75 |
(*-------------------------------------------------------- |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
76 |
Completeness properties using isUb, isLub etc. |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
77 |
-------------------------------------------------------*) |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
78 |
|
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
79 |
Goal "[| isLub R S x; isLub R S y |] ==> x = (y::real)"; |
5078 | 80 |
by (forward_tac [isLub_isUb] 1); |
81 |
by (forw_inst_tac [("x","y")] isLub_isUb 1); |
|
82 |
by (blast_tac (claset() addSIs [real_le_anti_sym] |
|
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
83 |
addSDs [isLub_le_isUb]) 1); |
5078 | 84 |
qed "real_isLub_unique"; |
85 |
||
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
86 |
Goalw [setle_def,setge_def] "[| (x::real) <=* S'; S <= S' |] ==> x <=* S"; |
5078 | 87 |
by (Blast_tac 1); |
88 |
qed "real_order_restrict"; |
|
89 |
||
90 |
(*---------------------------------------------------------------- |
|
91 |
Completeness theorem for the positive reals(again) |
|
92 |
----------------------------------------------------------------*) |
|
93 |
||
5143
b94cd208f073
Removal of leading "\!\!..." from most Goal commands
paulson
parents:
5078
diff
changeset
|
94 |
Goal "[| ALL x: S. 0r < x; \ |
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
95 |
\ EX x. x: S; \ |
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
96 |
\ EX u. isUb (UNIV::real set) S u \ |
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
97 |
\ |] ==> EX t. isLub (UNIV::real set) S t"; |
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
98 |
by (res_inst_tac [("x","real_of_preal(psup({w. real_of_preal w : S}))")] exI 1); |
5588 | 99 |
by (auto_tac (claset(), simpset() addsimps [isLub_def,leastP_def,isUb_def])); |
5078 | 100 |
by (auto_tac (claset() addSIs [setleI,setgeI] |
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
101 |
addSDs [real_gt_zero_preal_Ex RS iffD1], |
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
102 |
simpset())); |
5078 | 103 |
by (forw_inst_tac [("x","y")] bspec 1 THEN assume_tac 1); |
104 |
by (dtac (real_gt_zero_preal_Ex RS iffD1) 1); |
|
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
105 |
by (auto_tac (claset(), simpset() addsimps [real_of_preal_le_iff])); |
5078 | 106 |
by (rtac preal_psup_leI2a 1); |
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
107 |
by (forw_inst_tac [("y","real_of_preal ya")] setleD 1 THEN assume_tac 1); |
5078 | 108 |
by (forward_tac [real_ge_preal_preal_Ex] 1); |
109 |
by (Step_tac 1); |
|
110 |
by (res_inst_tac [("x","y")] exI 1); |
|
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
111 |
by (blast_tac (claset() addSDs [setleD] addIs [real_of_preal_le_iff RS iffD1]) 1); |
5078 | 112 |
by (forw_inst_tac [("x","x")] bspec 1 THEN assume_tac 1); |
113 |
by (forward_tac [isUbD2] 1); |
|
114 |
by (dtac (real_gt_zero_preal_Ex RS iffD1) 1); |
|
5588 | 115 |
by (auto_tac (claset() addSDs [isUbD, real_ge_preal_preal_Ex], |
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
116 |
simpset() addsimps [real_of_preal_le_iff])); |
5588 | 117 |
by (blast_tac (claset() addSDs [setleD] addSIs [psup_le_ub1] |
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
118 |
addIs [real_of_preal_le_iff RS iffD1]) 1); |
5078 | 119 |
qed "posreals_complete"; |
120 |
||
121 |
||
122 |
(*------------------------------- |
|
123 |
Lemmas |
|
124 |
-------------------------------*) |
|
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
125 |
Goal "! y : {z. ? x: P. z = x + (-xa) + 1r} Int {x. 0r < x}. 0r < y"; |
5078 | 126 |
by Auto_tac; |
127 |
qed "real_sup_lemma3"; |
|
128 |
||
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
129 |
Goal "(xa <= S + X + (-Z)) = (xa + (-X) + Z <= (S::real))"; |
5588 | 130 |
by (simp_tac (simpset() addsimps [real_diff_def, real_diff_le_eq RS sym] @ |
131 |
real_add_ac) 1); |
|
5078 | 132 |
qed "lemma_le_swap2"; |
133 |
||
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
134 |
Goal "[| 0r < x + (-X) + 1r; x < xa |] ==> 0r < xa + (-X) + 1r"; |
5078 | 135 |
by (dtac real_add_less_mono 1); |
136 |
by (assume_tac 1); |
|
5588 | 137 |
by (dres_inst_tac [("C","-x"),("A","0r + x")] real_add_less_mono2 1); |
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
138 |
by (asm_full_simp_tac |
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
139 |
(simpset() addsimps [real_add_zero_right, real_add_assoc RS sym, |
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
140 |
real_add_minus_left,real_add_zero_left]) 1); |
5078 | 141 |
by (asm_full_simp_tac (simpset() addsimps real_add_ac) 1); |
142 |
qed "lemma_real_complete1"; |
|
143 |
||
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
144 |
Goal "[| x + (-X) + 1r <= S; xa < x |] ==> xa + (-X) + 1r <= S"; |
5078 | 145 |
by (dtac real_less_imp_le 1); |
146 |
by (dtac real_add_le_mono 1); |
|
147 |
by (assume_tac 1); |
|
148 |
by (asm_full_simp_tac (simpset() addsimps real_add_ac) 1); |
|
149 |
qed "lemma_real_complete2"; |
|
150 |
||
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
151 |
Goal "[| x + (-X) + 1r <= S; xa < x |] ==> xa <= S + X + (-1r)"; (**) |
5078 | 152 |
by (rtac (lemma_le_swap2 RS iffD2) 1); |
153 |
by (etac lemma_real_complete2 1); |
|
154 |
by (assume_tac 1); |
|
155 |
qed "lemma_real_complete2a"; |
|
156 |
||
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
157 |
Goal "[| x + (-X) + 1r <= S; xa <= x |] ==> xa <= S + X + (-1r)"; |
5078 | 158 |
by (rotate_tac 1 1); |
159 |
by (etac (real_le_imp_less_or_eq RS disjE) 1); |
|
160 |
by (blast_tac (claset() addIs [lemma_real_complete2a]) 1); |
|
161 |
by (blast_tac (claset() addIs [(lemma_le_swap2 RS iffD2)]) 1); |
|
162 |
qed "lemma_real_complete2b"; |
|
163 |
||
164 |
(*------------------------------------ |
|
165 |
reals Completeness (again!) |
|
166 |
------------------------------------*) |
|
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
167 |
Goal "[| EX X. X: S; EX Y. isUb (UNIV::real set) S Y |] \ |
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
168 |
\ ==> EX t. isLub (UNIV :: real set) S t"; |
5078 | 169 |
by (Step_tac 1); |
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
170 |
by (subgoal_tac "? u. u: {z. ? x: S. z = x + (-X) + 1r} \ |
5078 | 171 |
\ Int {x. 0r < x}" 1); |
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
172 |
by (subgoal_tac "isUb (UNIV::real set) ({z. ? x: S. z = x + (-X) + 1r} \ |
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
173 |
\ Int {x. 0r < x}) (Y + (-X) + 1r)" 1); |
5078 | 174 |
by (cut_inst_tac [("P","S"),("xa","X")] real_sup_lemma3 1); |
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
175 |
by (EVERY1[forward_tac [exI RSN (3,posreals_complete)], Blast_tac, Blast_tac, |
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
176 |
Step_tac]); |
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
177 |
by (res_inst_tac [("x","t + X + (-1r)")] exI 1); |
5078 | 178 |
by (rtac isLubI2 1); |
179 |
by (rtac setgeI 2 THEN Step_tac 2); |
|
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
180 |
by (subgoal_tac "isUb (UNIV:: real set) ({z. ? x: S. z = x + (-X) + 1r} \ |
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
181 |
\ Int {x. 0r < x}) (y + (-X) + 1r)" 2); |
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
182 |
by (dres_inst_tac [("y","(y + (- X) + 1r)")] isLub_le_isUb 2 |
5078 | 183 |
THEN assume_tac 2); |
5588 | 184 |
by (full_simp_tac |
185 |
(simpset() addsimps [real_diff_def, real_diff_le_eq RS sym] @ |
|
186 |
real_add_ac) 2); |
|
5078 | 187 |
by (rtac (setleI RS isUbI) 1); |
188 |
by (Step_tac 1); |
|
189 |
by (res_inst_tac [("R1.0","x"),("R2.0","y")] real_linear_less2 1); |
|
190 |
by (stac lemma_le_swap2 1); |
|
191 |
by (forward_tac [isLubD2] 1 THEN assume_tac 2); |
|
192 |
by (Step_tac 1); |
|
193 |
by (Blast_tac 1); |
|
194 |
by (dtac lemma_real_complete1 1 THEN REPEAT(assume_tac 1)); |
|
195 |
by (stac lemma_le_swap2 1); |
|
196 |
by (forward_tac [isLubD2] 1 THEN assume_tac 2); |
|
197 |
by (Blast_tac 1); |
|
198 |
by (rtac lemma_real_complete2b 1); |
|
199 |
by (etac real_less_imp_le 2); |
|
200 |
by (blast_tac (claset() addSIs [isLubD2]) 1 THEN Step_tac 1); |
|
5588 | 201 |
by (full_simp_tac (simpset() addsimps [real_add_assoc]) 1); |
202 |
by (blast_tac (claset() addDs [isUbD] addSIs [setleI RS isUbI] |
|
203 |
addIs [real_add_le_mono1]) 1); |
|
204 |
by (blast_tac (claset() addDs [isUbD] addSIs [setleI RS isUbI] |
|
205 |
addIs [real_add_le_mono1]) 1); |
|
206 |
by (auto_tac (claset(), |
|
207 |
simpset() addsimps [real_add_assoc RS sym, |
|
208 |
real_zero_less_one])); |
|
5078 | 209 |
qed "reals_complete"; |
210 |
||
211 |
(*---------------------------------------------------------------- |
|
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
212 |
Related: Archimedean property of reals |
5078 | 213 |
----------------------------------------------------------------*) |
214 |
||
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
215 |
Goal "0r < x ==> EX n. rinv(real_of_posnat n) < x"; |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
216 |
by (stac real_of_posnat_rinv_Ex_iff 1); |
5078 | 217 |
by (EVERY1[rtac ccontr, Asm_full_simp_tac]); |
218 |
by (fold_tac [real_le_def]); |
|
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
219 |
by (subgoal_tac "isUb (UNIV::real set) \ |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
220 |
\ {z. EX n. z = x*(real_of_posnat n)} 1r" 1); |
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
221 |
by (subgoal_tac "EX X. X : {z. EX n. z = x*(real_of_posnat n)}" 1); |
5078 | 222 |
by (dtac reals_complete 1); |
223 |
by (auto_tac (claset() addIs [isUbI,setleI],simpset())); |
|
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
224 |
by (subgoal_tac "ALL m. x*(real_of_posnat(Suc m)) <= t" 1); |
5078 | 225 |
by (asm_full_simp_tac (simpset() addsimps |
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
226 |
[real_of_posnat_Suc,real_add_mult_distrib2]) 1); |
5078 | 227 |
by (blast_tac (claset() addIs [isLubD2]) 2); |
5588 | 228 |
by (asm_full_simp_tac |
229 |
(simpset() addsimps [real_le_diff_eq RS sym, real_diff_def]) 1); |
|
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
230 |
by (subgoal_tac "isUb (UNIV::real set) \ |
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
231 |
\ {z. EX n. z = x*(real_of_posnat n)} (t + (-x))" 1); |
5078 | 232 |
by (blast_tac (claset() addSIs [isUbI,setleI]) 2); |
7127
48e235179ffb
added parentheses to cope with a possible reduction of the precedence of unary
paulson
parents:
7077
diff
changeset
|
233 |
by (dres_inst_tac [("y","t+(-x)")] isLub_le_isUb 1); |
5588 | 234 |
by (dres_inst_tac [("x","-t")] real_add_left_le_mono1 2); |
5078 | 235 |
by (auto_tac (claset() addDs [real_le_less_trans, |
5588 | 236 |
(real_minus_zero_less_iff2 RS iffD2)], |
237 |
simpset() addsimps [real_less_not_refl,real_add_assoc RS sym])); |
|
5078 | 238 |
qed "reals_Archimedean"; |
239 |
||
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
240 |
Goal "EX n. (x::real) < real_of_posnat n"; |
5078 | 241 |
by (res_inst_tac [("R1.0","x"),("R2.0","0r")] real_linear_less2 1); |
242 |
by (res_inst_tac [("x","0")] exI 1); |
|
243 |
by (res_inst_tac [("x","0")] exI 2); |
|
244 |
by (auto_tac (claset() addEs [real_less_trans], |
|
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
245 |
simpset() addsimps [real_of_posnat_one,real_zero_less_one])); |
5078 | 246 |
by (forward_tac [(real_rinv_gt_zero RS reals_Archimedean)] 1); |
247 |
by (Step_tac 1 THEN res_inst_tac [("x","n")] exI 1); |
|
248 |
by (forw_inst_tac [("y","rinv x")] real_mult_less_mono1 1); |
|
249 |
by (auto_tac (claset(),simpset() addsimps [real_not_refl2 RS not_sym])); |
|
250 |
by (dres_inst_tac [("n1","n"),("y","1r")] |
|
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
251 |
(real_of_posnat_less_zero RS real_mult_less_mono2) 1); |
5588 | 252 |
by (auto_tac (claset(), |
7077
60b098bb8b8a
heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
5588
diff
changeset
|
253 |
simpset() addsimps [real_of_posnat_less_zero, |
5588 | 254 |
real_not_refl2 RS not_sym, |
255 |
real_mult_assoc RS sym])); |
|
5078 | 256 |
qed "reals_Archimedean2"; |
257 |
||
258 |
||
259 |
||
260 |
||
261 |