205 |
205 |
206 (** addition of two positive reals gives a positive real **) |
206 (** addition of two positive reals gives a positive real **) |
207 (** lemmas for proving positive reals addition set in preal **) |
207 (** lemmas for proving positive reals addition set in preal **) |
208 |
208 |
209 (** Part 1 of Dedekind sections def **) |
209 (** Part 1 of Dedekind sections def **) |
210 Goal "{} < {w. ? x: Rep_preal R. ? y:Rep_preal S. w = x + y}"; |
210 Goal "{} < {w. EX x: Rep_preal R. EX y:Rep_preal S. w = x + y}"; |
211 by (cut_facts_tac [mem_Rep_preal_Ex,mem_Rep_preal_Ex] 1); |
211 by (cut_facts_tac [mem_Rep_preal_Ex,mem_Rep_preal_Ex] 1); |
212 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset())); |
212 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset())); |
213 qed "preal_add_set_not_empty"; |
213 qed "preal_add_set_not_empty"; |
214 |
214 |
215 (** Part 2 of Dedekind sections def **) |
215 (** Part 2 of Dedekind sections def **) |
216 Goal "? q. q ~: {w. ? x: Rep_preal R. ? y:Rep_preal S. w = x + y}"; |
216 Goal "EX q. q ~: {w. EX x: Rep_preal R. EX y:Rep_preal S. w = x + y}"; |
217 by (cut_inst_tac [("X","R")] not_mem_Rep_preal_Ex 1); |
217 by (cut_inst_tac [("X","R")] not_mem_Rep_preal_Ex 1); |
218 by (cut_inst_tac [("X","S")] not_mem_Rep_preal_Ex 1); |
218 by (cut_inst_tac [("X","S")] not_mem_Rep_preal_Ex 1); |
219 by (REPEAT(etac exE 1)); |
219 by (REPEAT(etac exE 1)); |
220 by (REPEAT(dtac not_in_preal_ub 1)); |
220 by (REPEAT(dtac not_in_preal_ub 1)); |
221 by (res_inst_tac [("x","x+xa")] exI 1); |
221 by (res_inst_tac [("x","x+xa")] exI 1); |
222 by (Auto_tac THEN (REPEAT(etac ballE 1)) THEN Auto_tac); |
222 by (Auto_tac THEN (REPEAT(etac ballE 1)) THEN Auto_tac); |
223 by (dtac prat_add_less_mono 1); |
223 by (dtac prat_add_less_mono 1); |
224 by (auto_tac (claset(),simpset() addsimps [prat_less_not_refl])); |
224 by (auto_tac (claset(),simpset() addsimps [prat_less_not_refl])); |
225 qed "preal_not_mem_add_set_Ex"; |
225 qed "preal_not_mem_add_set_Ex"; |
226 |
226 |
227 Goal "{w. ? x: Rep_preal R. ? y:Rep_preal S. w = x + y} < UNIV"; |
227 Goal "{w. EX x: Rep_preal R. EX y:Rep_preal S. w = x + y} < UNIV"; |
228 by (auto_tac (claset() addSIs [psubsetI],simpset())); |
228 by (auto_tac (claset() addSIs [psubsetI],simpset())); |
229 by (cut_inst_tac [("R","R"),("S","S")] preal_not_mem_add_set_Ex 1); |
229 by (cut_inst_tac [("R","R"),("S","S")] preal_not_mem_add_set_Ex 1); |
230 by (etac exE 1); |
230 by (etac exE 1); |
231 by (eres_inst_tac [("c","q")] equalityCE 1); |
231 by (eres_inst_tac [("c","q")] equalityCE 1); |
232 by Auto_tac; |
232 by Auto_tac; |
233 qed "preal_add_set_not_prat_set"; |
233 qed "preal_add_set_not_prat_set"; |
234 |
234 |
235 (** Part 3 of Dedekind sections def **) |
235 (** Part 3 of Dedekind sections def **) |
236 Goal "!y: {w. ? x: Rep_preal R. ? y: Rep_preal S. w = x + y}. \ |
236 Goal "ALL y: {w. EX x: Rep_preal R. EX y: Rep_preal S. w = x + y}. \ |
237 \ !z. z < y --> z : {w. ? x:Rep_preal R. ? y:Rep_preal S. w = x + y}"; |
237 \ ALL z. z < y --> z : {w. EX x:Rep_preal R. EX y:Rep_preal S. w = x + y}"; |
238 by Auto_tac; |
238 by Auto_tac; |
239 by (ftac prat_mult_qinv_less_1 1); |
239 by (ftac prat_mult_qinv_less_1 1); |
240 by (forw_inst_tac [("x","x"),("q2.0","prat_of_pnat (Abs_pnat 1)")] |
240 by (forw_inst_tac [("x","x"),("q2.0","prat_of_pnat (Abs_pnat 1)")] |
241 prat_mult_less2_mono1 1); |
241 prat_mult_less2_mono1 1); |
242 by (forw_inst_tac [("x","ya"),("q2.0","prat_of_pnat (Abs_pnat 1)")] |
242 by (forw_inst_tac [("x","ya"),("q2.0","prat_of_pnat (Abs_pnat 1)")] |
295 |
295 |
296 (** multiplication of two positive reals gives a positive real **) |
296 (** multiplication of two positive reals gives a positive real **) |
297 (** lemmas for proving positive reals multiplication set in preal **) |
297 (** lemmas for proving positive reals multiplication set in preal **) |
298 |
298 |
299 (** Part 1 of Dedekind sections def **) |
299 (** Part 1 of Dedekind sections def **) |
300 Goal "{} < {w. ? x: Rep_preal R. ? y:Rep_preal S. w = x * y}"; |
300 Goal "{} < {w. EX x: Rep_preal R. EX y:Rep_preal S. w = x * y}"; |
301 by (cut_facts_tac [mem_Rep_preal_Ex,mem_Rep_preal_Ex] 1); |
301 by (cut_facts_tac [mem_Rep_preal_Ex,mem_Rep_preal_Ex] 1); |
302 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset())); |
302 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset())); |
303 qed "preal_mult_set_not_empty"; |
303 qed "preal_mult_set_not_empty"; |
304 |
304 |
305 (** Part 2 of Dedekind sections def **) |
305 (** Part 2 of Dedekind sections def **) |
306 Goal "? q. q ~: {w. ? x: Rep_preal R. ? y:Rep_preal S. w = x * y}"; |
306 Goal "EX q. q ~: {w. EX x: Rep_preal R. EX y:Rep_preal S. w = x * y}"; |
307 by (cut_inst_tac [("X","R")] not_mem_Rep_preal_Ex 1); |
307 by (cut_inst_tac [("X","R")] not_mem_Rep_preal_Ex 1); |
308 by (cut_inst_tac [("X","S")] not_mem_Rep_preal_Ex 1); |
308 by (cut_inst_tac [("X","S")] not_mem_Rep_preal_Ex 1); |
309 by (REPEAT(etac exE 1)); |
309 by (REPEAT(etac exE 1)); |
310 by (REPEAT(dtac not_in_preal_ub 1)); |
310 by (REPEAT(dtac not_in_preal_ub 1)); |
311 by (res_inst_tac [("x","x*xa")] exI 1); |
311 by (res_inst_tac [("x","x*xa")] exI 1); |
312 by (Auto_tac THEN (REPEAT(etac ballE 1)) THEN Auto_tac ); |
312 by (Auto_tac THEN (REPEAT(etac ballE 1)) THEN Auto_tac ); |
313 by (dtac prat_mult_less_mono 1); |
313 by (dtac prat_mult_less_mono 1); |
314 by (auto_tac (claset(),simpset() addsimps [prat_less_not_refl])); |
314 by (auto_tac (claset(),simpset() addsimps [prat_less_not_refl])); |
315 qed "preal_not_mem_mult_set_Ex"; |
315 qed "preal_not_mem_mult_set_Ex"; |
316 |
316 |
317 Goal "{w. ? x: Rep_preal R. ? y:Rep_preal S. w = x * y} < UNIV"; |
317 Goal "{w. EX x: Rep_preal R. EX y:Rep_preal S. w = x * y} < UNIV"; |
318 by (auto_tac (claset() addSIs [psubsetI],simpset())); |
318 by (auto_tac (claset() addSIs [psubsetI],simpset())); |
319 by (cut_inst_tac [("R","R"),("S","S")] preal_not_mem_mult_set_Ex 1); |
319 by (cut_inst_tac [("R","R"),("S","S")] preal_not_mem_mult_set_Ex 1); |
320 by (etac exE 1); |
320 by (etac exE 1); |
321 by (eres_inst_tac [("c","q")] equalityCE 1); |
321 by (eres_inst_tac [("c","q")] equalityCE 1); |
322 by Auto_tac; |
322 by Auto_tac; |
323 qed "preal_mult_set_not_prat_set"; |
323 qed "preal_mult_set_not_prat_set"; |
324 |
324 |
325 (** Part 3 of Dedekind sections def **) |
325 (** Part 3 of Dedekind sections def **) |
326 Goal "!y: {w. ? x: Rep_preal R. ? y: Rep_preal S. w = x * y}. \ |
326 Goal "ALL y: {w. EX x: Rep_preal R. EX y: Rep_preal S. w = x * y}. \ |
327 \ !z. z < y --> z : {w. ? x:Rep_preal R. ? y:Rep_preal S. w = x * y}"; |
327 \ ALL z. z < y --> z : {w. EX x:Rep_preal R. EX y:Rep_preal S. w = x * y}"; |
328 by Auto_tac; |
328 by Auto_tac; |
329 by (forw_inst_tac [("x","qinv(ya)"),("q1.0","z")] |
329 by (forw_inst_tac [("x","qinv(ya)"),("q1.0","z")] |
330 prat_mult_left_less2_mono1 1); |
330 prat_mult_left_less2_mono1 1); |
331 by (asm_full_simp_tac (simpset() addsimps prat_mult_ac) 1); |
331 by (asm_full_simp_tac (simpset() addsimps prat_mult_ac) 1); |
332 by (dtac (Rep_preal RS prealE_lemma3a) 1); |
332 by (dtac (Rep_preal RS prealE_lemma3a) 1); |
333 by (etac allE 1); |
333 by (etac allE 1); |
334 by (REPEAT(rtac bexI 1)); |
334 by (REPEAT(rtac bexI 1)); |
335 by (auto_tac (claset(),simpset() addsimps [prat_mult_assoc])); |
335 by (auto_tac (claset(),simpset() addsimps [prat_mult_assoc])); |
336 qed "preal_mult_set_lemma3"; |
336 qed "preal_mult_set_lemma3"; |
337 |
337 |
338 Goal "!y: {w. ? x: Rep_preal R. ? y: Rep_preal S. w = x * y}. \ |
338 Goal "ALL y: {w. EX x: Rep_preal R. EX y: Rep_preal S. w = x * y}. \ |
339 \ ? u: {w. ? x: Rep_preal R. ? y: Rep_preal S. w = x * y}. y < u"; |
339 \ EX u: {w. EX x: Rep_preal R. EX y: Rep_preal S. w = x * y}. y < u"; |
340 by Auto_tac; |
340 by Auto_tac; |
341 by (dtac (Rep_preal RS prealE_lemma4a) 1); |
341 by (dtac (Rep_preal RS prealE_lemma4a) 1); |
342 by (auto_tac (claset() addIs [prat_mult_less2_mono1],simpset())); |
342 by (auto_tac (claset() addIs [prat_mult_less2_mono1],simpset())); |
343 qed "preal_mult_set_lemma4"; |
343 qed "preal_mult_set_lemma4"; |
344 |
344 |
345 Goal "{w. ? x: Rep_preal R. ? y: Rep_preal S. w = x * y} : preal"; |
345 Goal "{w. EX x: Rep_preal R. EX y: Rep_preal S. w = x * y} : preal"; |
346 by (rtac prealI2 1); |
346 by (rtac prealI2 1); |
347 by (rtac preal_mult_set_not_empty 1); |
347 by (rtac preal_mult_set_not_empty 1); |
348 by (rtac preal_mult_set_not_prat_set 1); |
348 by (rtac preal_mult_set_not_prat_set 1); |
349 by (rtac preal_mult_set_lemma3 1); |
349 by (rtac preal_mult_set_lemma3 1); |
350 by (rtac preal_mult_set_lemma4 1); |
350 by (rtac preal_mult_set_lemma4 1); |
408 (** lemmas for the proof **) |
408 (** lemmas for the proof **) |
409 |
409 |
410 (** lemmas **) |
410 (** lemmas **) |
411 Goalw [preal_add_def] |
411 Goalw [preal_add_def] |
412 "z: Rep_preal(R+S) ==> \ |
412 "z: Rep_preal(R+S) ==> \ |
413 \ ? x: Rep_preal(R). ? y: Rep_preal(S). z = x + y"; |
413 \ EX x: Rep_preal(R). EX y: Rep_preal(S). z = x + y"; |
414 by (dtac (preal_mem_add_set RS Abs_preal_inverse RS subst) 1); |
414 by (dtac (preal_mem_add_set RS Abs_preal_inverse RS subst) 1); |
415 by (Fast_tac 1); |
415 by (Fast_tac 1); |
416 qed "mem_Rep_preal_addD"; |
416 qed "mem_Rep_preal_addD"; |
417 |
417 |
418 Goalw [preal_add_def] |
418 Goalw [preal_add_def] |
419 "? x: Rep_preal(R). ? y: Rep_preal(S). z = x + y \ |
419 "EX x: Rep_preal(R). EX y: Rep_preal(S). z = x + y \ |
420 \ ==> z: Rep_preal(R+S)"; |
420 \ ==> z: Rep_preal(R+S)"; |
421 by (rtac (preal_mem_add_set RS Abs_preal_inverse RS ssubst) 1); |
421 by (rtac (preal_mem_add_set RS Abs_preal_inverse RS ssubst) 1); |
422 by (Fast_tac 1); |
422 by (Fast_tac 1); |
423 qed "mem_Rep_preal_addI"; |
423 qed "mem_Rep_preal_addI"; |
424 |
424 |
425 Goal " z: Rep_preal(R+S) = (? x: Rep_preal(R). \ |
425 Goal " z: Rep_preal(R+S) = (EX x: Rep_preal(R). \ |
426 \ ? y: Rep_preal(S). z = x + y)"; |
426 \ EX y: Rep_preal(S). z = x + y)"; |
427 by (fast_tac (claset() addSIs [mem_Rep_preal_addD,mem_Rep_preal_addI]) 1); |
427 by (fast_tac (claset() addSIs [mem_Rep_preal_addD,mem_Rep_preal_addI]) 1); |
428 qed "mem_Rep_preal_add_iff"; |
428 qed "mem_Rep_preal_add_iff"; |
429 |
429 |
430 Goalw [preal_mult_def] |
430 Goalw [preal_mult_def] |
431 "z: Rep_preal(R*S) ==> \ |
431 "z: Rep_preal(R*S) ==> \ |
432 \ ? x: Rep_preal(R). ? y: Rep_preal(S). z = x * y"; |
432 \ EX x: Rep_preal(R). EX y: Rep_preal(S). z = x * y"; |
433 by (dtac (preal_mem_mult_set RS Abs_preal_inverse RS subst) 1); |
433 by (dtac (preal_mem_mult_set RS Abs_preal_inverse RS subst) 1); |
434 by (Fast_tac 1); |
434 by (Fast_tac 1); |
435 qed "mem_Rep_preal_multD"; |
435 qed "mem_Rep_preal_multD"; |
436 |
436 |
437 Goalw [preal_mult_def] |
437 Goalw [preal_mult_def] |
438 "? x: Rep_preal(R). ? y: Rep_preal(S). z = x * y \ |
438 "EX x: Rep_preal(R). EX y: Rep_preal(S). z = x * y \ |
439 \ ==> z: Rep_preal(R*S)"; |
439 \ ==> z: Rep_preal(R*S)"; |
440 by (rtac (preal_mem_mult_set RS Abs_preal_inverse RS ssubst) 1); |
440 by (rtac (preal_mem_mult_set RS Abs_preal_inverse RS ssubst) 1); |
441 by (Fast_tac 1); |
441 by (Fast_tac 1); |
442 qed "mem_Rep_preal_multI"; |
442 qed "mem_Rep_preal_multI"; |
443 |
443 |
444 Goal " z: Rep_preal(R*S) = (? x: Rep_preal(R). \ |
444 Goal " z: Rep_preal(R*S) = (EX x: Rep_preal(R). \ |
445 \ ? y: Rep_preal(S). z = x * y)"; |
445 \ EX y: Rep_preal(S). z = x * y)"; |
446 by (fast_tac (claset() addSIs [mem_Rep_preal_multD,mem_Rep_preal_multI]) 1); |
446 by (fast_tac (claset() addSIs [mem_Rep_preal_multD,mem_Rep_preal_multI]) 1); |
447 qed "mem_Rep_preal_mult_iff"; |
447 qed "mem_Rep_preal_mult_iff"; |
448 |
448 |
449 (** More lemmas for preal_add_mult_distrib2 **) |
449 (** More lemmas for preal_add_mult_distrib2 **) |
450 goal PRat.thy "!!(a1::prat). a1 < a2 ==> a1 * b + a2 * c < a2 * (b + c)"; |
450 goal PRat.thy "!!(a1::prat). a1 < a2 ==> a1 * b + a2 * c < a2 * (b + c)"; |
505 qed "preal_add_mult_distrib"; |
505 qed "preal_add_mult_distrib"; |
506 |
506 |
507 (*** Prove existence of inverse ***) |
507 (*** Prove existence of inverse ***) |
508 (*** Inverse is a positive real ***) |
508 (*** Inverse is a positive real ***) |
509 |
509 |
510 Goal "? y. qinv(y) ~: Rep_preal X"; |
510 Goal "EX y. qinv(y) ~: Rep_preal X"; |
511 by (cut_inst_tac [("X","X")] not_mem_Rep_preal_Ex 1); |
511 by (cut_inst_tac [("X","X")] not_mem_Rep_preal_Ex 1); |
512 by (etac exE 1 THEN cut_inst_tac [("x","x")] prat_as_inverse_ex 1); |
512 by (etac exE 1 THEN cut_inst_tac [("x","x")] prat_as_inverse_ex 1); |
513 by Auto_tac; |
513 by Auto_tac; |
514 qed "qinv_not_mem_Rep_preal_Ex"; |
514 qed "qinv_not_mem_Rep_preal_Ex"; |
515 |
515 |
516 Goal "? q. q: {x. ? y. x < y & qinv y ~: Rep_preal A}"; |
516 Goal "EX q. q: {x. EX y. x < y & qinv y ~: Rep_preal A}"; |
517 by (cut_inst_tac [("X","A")] qinv_not_mem_Rep_preal_Ex 1); |
517 by (cut_inst_tac [("X","A")] qinv_not_mem_Rep_preal_Ex 1); |
518 by Auto_tac; |
518 by Auto_tac; |
519 by (cut_inst_tac [("y","y")] qless_Ex 1); |
519 by (cut_inst_tac [("y","y")] qless_Ex 1); |
520 by (Fast_tac 1); |
520 by (Fast_tac 1); |
521 qed "lemma_preal_mem_inv_set_ex"; |
521 qed "lemma_preal_mem_inv_set_ex"; |
522 |
522 |
523 (** Part 1 of Dedekind sections def **) |
523 (** Part 1 of Dedekind sections def **) |
524 Goal "{} < {x. ? y. x < y & qinv y ~: Rep_preal A}"; |
524 Goal "{} < {x. EX y. x < y & qinv y ~: Rep_preal A}"; |
525 by (cut_facts_tac [lemma_preal_mem_inv_set_ex] 1); |
525 by (cut_facts_tac [lemma_preal_mem_inv_set_ex] 1); |
526 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset())); |
526 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset())); |
527 qed "preal_inv_set_not_empty"; |
527 qed "preal_inv_set_not_empty"; |
528 |
528 |
529 (** Part 2 of Dedekind sections def **) |
529 (** Part 2 of Dedekind sections def **) |
530 Goal "? y. qinv(y) : Rep_preal X"; |
530 Goal "EX y. qinv(y) : Rep_preal X"; |
531 by (cut_inst_tac [("X","X")] mem_Rep_preal_Ex 1); |
531 by (cut_inst_tac [("X","X")] mem_Rep_preal_Ex 1); |
532 by (etac exE 1 THEN cut_inst_tac [("x","x")] prat_as_inverse_ex 1); |
532 by (etac exE 1 THEN cut_inst_tac [("x","x")] prat_as_inverse_ex 1); |
533 by Auto_tac; |
533 by Auto_tac; |
534 qed "qinv_mem_Rep_preal_Ex"; |
534 qed "qinv_mem_Rep_preal_Ex"; |
535 |
535 |
536 Goal "? x. x ~: {x. ? y. x < y & qinv y ~: Rep_preal A}"; |
536 Goal "EX x. x ~: {x. EX y. x < y & qinv y ~: Rep_preal A}"; |
537 by (rtac ccontr 1); |
537 by (rtac ccontr 1); |
538 by (cut_inst_tac [("X","A")] qinv_mem_Rep_preal_Ex 1); |
538 by (cut_inst_tac [("X","A")] qinv_mem_Rep_preal_Ex 1); |
539 by Auto_tac; |
539 by Auto_tac; |
540 by (EVERY1[etac allE, etac exE, etac conjE]); |
540 by (EVERY1[etac allE, etac exE, etac conjE]); |
541 by (dtac qinv_prat_less 1 THEN dtac not_in_preal_ub 1); |
541 by (dtac qinv_prat_less 1 THEN dtac not_in_preal_ub 1); |
542 by (eres_inst_tac [("x","qinv y")] ballE 1); |
542 by (eres_inst_tac [("x","qinv y")] ballE 1); |
543 by (dtac prat_less_trans 1); |
543 by (dtac prat_less_trans 1); |
544 by (auto_tac (claset(),simpset() addsimps [prat_less_not_refl])); |
544 by (auto_tac (claset(),simpset() addsimps [prat_less_not_refl])); |
545 qed "preal_not_mem_inv_set_Ex"; |
545 qed "preal_not_mem_inv_set_Ex"; |
546 |
546 |
547 Goal "{x. ? y. x < y & qinv y ~: Rep_preal A} < UNIV"; |
547 Goal "{x. EX y. x < y & qinv y ~: Rep_preal A} < UNIV"; |
548 by (auto_tac (claset() addSIs [psubsetI],simpset())); |
548 by (auto_tac (claset() addSIs [psubsetI],simpset())); |
549 by (cut_inst_tac [("A","A")] preal_not_mem_inv_set_Ex 1); |
549 by (cut_inst_tac [("A","A")] preal_not_mem_inv_set_Ex 1); |
550 by (etac exE 1); |
550 by (etac exE 1); |
551 by (eres_inst_tac [("c","x")] equalityCE 1); |
551 by (eres_inst_tac [("c","x")] equalityCE 1); |
552 by Auto_tac; |
552 by Auto_tac; |
553 qed "preal_inv_set_not_prat_set"; |
553 qed "preal_inv_set_not_prat_set"; |
554 |
554 |
555 (** Part 3 of Dedekind sections def **) |
555 (** Part 3 of Dedekind sections def **) |
556 Goal "! y: {x. ? y. x < y & qinv y ~: Rep_preal A}. \ |
556 Goal "ALL y: {x. EX y. x < y & qinv y ~: Rep_preal A}. \ |
557 \ !z. z < y --> z : {x. ? y. x < y & qinv y ~: Rep_preal A}"; |
557 \ ALL z. z < y --> z : {x. EX y. x < y & qinv y ~: Rep_preal A}"; |
558 by Auto_tac; |
558 by Auto_tac; |
559 by (res_inst_tac [("x","ya")] exI 1); |
559 by (res_inst_tac [("x","ya")] exI 1); |
560 by (auto_tac (claset() addIs [prat_less_trans],simpset())); |
560 by (auto_tac (claset() addIs [prat_less_trans],simpset())); |
561 qed "preal_inv_set_lemma3"; |
561 qed "preal_inv_set_lemma3"; |
562 |
562 |
563 Goal "! y: {x. ? y. x < y & qinv y ~: Rep_preal A}. \ |
563 Goal "ALL y: {x. EX y. x < y & qinv y ~: Rep_preal A}. \ |
564 \ Bex {x. ? y. x < y & qinv y ~: Rep_preal A} (op < y)"; |
564 \ Bex {x. EX y. x < y & qinv y ~: Rep_preal A} (op < y)"; |
565 by (blast_tac (claset() addDs [prat_dense]) 1); |
565 by (blast_tac (claset() addDs [prat_dense]) 1); |
566 qed "preal_inv_set_lemma4"; |
566 qed "preal_inv_set_lemma4"; |
567 |
567 |
568 Goal "{x. ? y. x < y & qinv(y) ~: Rep_preal(A)} : preal"; |
568 Goal "{x. EX y. x < y & qinv(y) ~: Rep_preal(A)} : preal"; |
569 by (rtac prealI2 1); |
569 by (rtac prealI2 1); |
570 by (rtac preal_inv_set_not_empty 1); |
570 by (rtac preal_inv_set_not_empty 1); |
571 by (rtac preal_inv_set_not_prat_set 1); |
571 by (rtac preal_inv_set_not_prat_set 1); |
572 by (rtac preal_inv_set_lemma3 1); |
572 by (rtac preal_inv_set_lemma3 1); |
573 by (rtac preal_inv_set_lemma4 1); |
573 by (rtac preal_inv_set_lemma4 1); |
841 qed "psubsetD"; |
841 qed "psubsetD"; |
842 |
842 |
843 (** Part 1 of Dedekind sections def **) |
843 (** Part 1 of Dedekind sections def **) |
844 Goalw [preal_less_def] |
844 Goalw [preal_less_def] |
845 "A < B ==> \ |
845 "A < B ==> \ |
846 \ ? q. q : {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}"; |
846 \ EX q. q : {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}"; |
847 by (EVERY1[dtac lemma_psubset_mem, etac exE, etac conjE]); |
847 by (EVERY1[dtac lemma_psubset_mem, etac exE, etac conjE]); |
848 by (dres_inst_tac [("x1","B")] (Rep_preal RS prealE_lemma4a) 1); |
848 by (dres_inst_tac [("x1","B")] (Rep_preal RS prealE_lemma4a) 1); |
849 by (auto_tac (claset(),simpset() addsimps [prat_less_def])); |
849 by (auto_tac (claset(),simpset() addsimps [prat_less_def])); |
850 qed "lemma_ex_mem_less_left_add1"; |
850 qed "lemma_ex_mem_less_left_add1"; |
851 |
851 |
852 Goal |
852 Goal |
853 "A < B ==> \ |
853 "A < B ==> \ |
854 \ {} < {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}"; |
854 \ {} < {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}"; |
855 by (dtac lemma_ex_mem_less_left_add1 1); |
855 by (dtac lemma_ex_mem_less_left_add1 1); |
856 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset())); |
856 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset())); |
857 qed "preal_less_set_not_empty"; |
857 qed "preal_less_set_not_empty"; |
858 |
858 |
859 (** Part 2 of Dedekind sections def **) |
859 (** Part 2 of Dedekind sections def **) |
860 Goal "? q. q ~: {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}"; |
860 Goal "EX q. q ~: {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}"; |
861 by (cut_inst_tac [("X","B")] not_mem_Rep_preal_Ex 1); |
861 by (cut_inst_tac [("X","B")] not_mem_Rep_preal_Ex 1); |
862 by (etac exE 1); |
862 by (etac exE 1); |
863 by (res_inst_tac [("x","x")] exI 1); |
863 by (res_inst_tac [("x","x")] exI 1); |
864 by Auto_tac; |
864 by Auto_tac; |
865 by (cut_inst_tac [("x","x"),("y","n")] prat_self_less_add_right 1); |
865 by (cut_inst_tac [("x","x"),("y","n")] prat_self_less_add_right 1); |
866 by (auto_tac (claset() addDs [Rep_preal RS prealE_lemma3b],simpset())); |
866 by (auto_tac (claset() addDs [Rep_preal RS prealE_lemma3b],simpset())); |
867 qed "lemma_ex_not_mem_less_left_add1"; |
867 qed "lemma_ex_not_mem_less_left_add1"; |
868 |
868 |
869 Goal "{d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)} < UNIV"; |
869 Goal "{d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)} < UNIV"; |
870 by (auto_tac (claset() addSIs [psubsetI],simpset())); |
870 by (auto_tac (claset() addSIs [psubsetI],simpset())); |
871 by (cut_inst_tac [("A","A"),("B","B")] lemma_ex_not_mem_less_left_add1 1); |
871 by (cut_inst_tac [("A","A"),("B","B")] lemma_ex_not_mem_less_left_add1 1); |
872 by (etac exE 1); |
872 by (etac exE 1); |
873 by (eres_inst_tac [("c","q")] equalityCE 1); |
873 by (eres_inst_tac [("c","q")] equalityCE 1); |
874 by Auto_tac; |
874 by Auto_tac; |
875 qed "preal_less_set_not_prat_set"; |
875 qed "preal_less_set_not_prat_set"; |
876 |
876 |
877 (** Part 3 of Dedekind sections def **) |
877 (** Part 3 of Dedekind sections def **) |
878 Goal "A < B ==> ! y: {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}. \ |
878 Goal "A < B ==> ALL y: {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}. \ |
879 \ !z. z < y --> z : {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}"; |
879 \ ALL z. z < y --> z : {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}"; |
880 by Auto_tac; |
880 by Auto_tac; |
881 by (dres_inst_tac [("x","n")] prat_add_less2_mono2 1); |
881 by (dres_inst_tac [("x","n")] prat_add_less2_mono2 1); |
882 by (dtac (Rep_preal RS prealE_lemma3b) 1); |
882 by (dtac (Rep_preal RS prealE_lemma3b) 1); |
883 by Auto_tac; |
883 by Auto_tac; |
884 qed "preal_less_set_lemma3"; |
884 qed "preal_less_set_lemma3"; |
885 |
885 |
886 Goal "A < B ==> ! y: {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}. \ |
886 Goal "A < B ==> ALL y: {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}. \ |
887 \ Bex {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)} (op < y)"; |
887 \ Bex {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)} (op < y)"; |
888 by Auto_tac; |
888 by Auto_tac; |
889 by (dtac (Rep_preal RS prealE_lemma4a) 1); |
889 by (dtac (Rep_preal RS prealE_lemma4a) 1); |
890 by (auto_tac (claset(),simpset() addsimps [prat_less_def,prat_add_assoc])); |
890 by (auto_tac (claset(),simpset() addsimps [prat_less_def,prat_add_assoc])); |
891 qed "preal_less_set_lemma4"; |
891 qed "preal_less_set_lemma4"; |
892 |
892 |
893 Goal |
893 Goal |
894 "!! (A::preal). A < B ==> \ |
894 "!! (A::preal). A < B ==> \ |
895 \ {d. ? n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}: preal"; |
895 \ {d. EX n. n ~: Rep_preal(A) & n + d : Rep_preal(B)}: preal"; |
896 by (rtac prealI2 1); |
896 by (rtac prealI2 1); |
897 by (rtac preal_less_set_not_empty 1); |
897 by (rtac preal_less_set_not_empty 1); |
898 by (rtac preal_less_set_not_prat_set 2); |
898 by (rtac preal_less_set_not_prat_set 2); |
899 by (rtac preal_less_set_lemma3 2); |
899 by (rtac preal_less_set_lemma3 2); |
900 by (rtac preal_less_set_lemma4 3); |
900 by (rtac preal_less_set_lemma4 3); |
1068 Addsimps [preal_add_left_cancel_iff,preal_add_right_cancel_iff]; |
1068 Addsimps [preal_add_left_cancel_iff,preal_add_right_cancel_iff]; |
1069 |
1069 |
1070 (*** Completeness of preal ***) |
1070 (*** Completeness of preal ***) |
1071 |
1071 |
1072 (*** prove that supremum is a cut ***) |
1072 (*** prove that supremum is a cut ***) |
1073 Goal "? (X::preal). X: P ==> \ |
1073 Goal "EX (X::preal). X: P ==> \ |
1074 \ ? q. q: {w. ? X. X : P & w : Rep_preal X}"; |
1074 \ EX q. q: {w. EX X. X : P & w : Rep_preal X}"; |
1075 by Safe_tac; |
1075 by Safe_tac; |
1076 by (cut_inst_tac [("X","X")] mem_Rep_preal_Ex 1); |
1076 by (cut_inst_tac [("X","X")] mem_Rep_preal_Ex 1); |
1077 by Auto_tac; |
1077 by Auto_tac; |
1078 qed "preal_sup_mem_Ex"; |
1078 qed "preal_sup_mem_Ex"; |
1079 |
1079 |
1080 (** Part 1 of Dedekind def **) |
1080 (** Part 1 of Dedekind def **) |
1081 Goal "? (X::preal). X: P ==> \ |
1081 Goal "EX (X::preal). X: P ==> \ |
1082 \ {} < {w. ? X : P. w : Rep_preal X}"; |
1082 \ {} < {w. EX X : P. w : Rep_preal X}"; |
1083 by (dtac preal_sup_mem_Ex 1); |
1083 by (dtac preal_sup_mem_Ex 1); |
1084 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset())); |
1084 by (auto_tac (claset() addSIs [psubsetI] addEs [equalityCE],simpset())); |
1085 qed "preal_sup_set_not_empty"; |
1085 qed "preal_sup_set_not_empty"; |
1086 |
1086 |
1087 (** Part 2 of Dedekind sections def **) |
1087 (** Part 2 of Dedekind sections def **) |
1088 Goalw [preal_less_def] "? Y. (! X: P. X < Y) \ |
1088 Goalw [preal_less_def] "EX Y. (ALL X: P. X < Y) \ |
1089 \ ==> ? q. q ~: {w. ? X. X: P & w: Rep_preal(X)}"; (**) |
1089 \ ==> EX q. q ~: {w. EX X. X: P & w: Rep_preal(X)}"; (**) |
1090 by (auto_tac (claset(),simpset() addsimps [psubset_def])); |
1090 by (auto_tac (claset(),simpset() addsimps [psubset_def])); |
1091 by (cut_inst_tac [("X","Y")] not_mem_Rep_preal_Ex 1); |
1091 by (cut_inst_tac [("X","Y")] not_mem_Rep_preal_Ex 1); |
1092 by (etac exE 1); |
1092 by (etac exE 1); |
1093 by (res_inst_tac [("x","x")] exI 1); |
1093 by (res_inst_tac [("x","x")] exI 1); |
1094 by (auto_tac (claset() addSDs [bspec],simpset())); |
1094 by (auto_tac (claset() addSDs [bspec],simpset())); |
1095 qed "preal_sup_not_mem_Ex"; |
1095 qed "preal_sup_not_mem_Ex"; |
1096 |
1096 |
1097 Goalw [preal_le_def] "? Y. (! X: P. X <= Y) \ |
1097 Goalw [preal_le_def] "EX Y. (ALL X: P. X <= Y) \ |
1098 \ ==> ? q. q ~: {w. ? X. X: P & w: Rep_preal(X)}"; |
1098 \ ==> EX q. q ~: {w. EX X. X: P & w: Rep_preal(X)}"; |
1099 by (Step_tac 1); |
1099 by (Step_tac 1); |
1100 by (cut_inst_tac [("X","Y")] not_mem_Rep_preal_Ex 1); |
1100 by (cut_inst_tac [("X","Y")] not_mem_Rep_preal_Ex 1); |
1101 by (etac exE 1); |
1101 by (etac exE 1); |
1102 by (res_inst_tac [("x","x")] exI 1); |
1102 by (res_inst_tac [("x","x")] exI 1); |
1103 by (auto_tac (claset() addSDs [bspec],simpset())); |
1103 by (auto_tac (claset() addSDs [bspec],simpset())); |
1104 qed "preal_sup_not_mem_Ex1"; |
1104 qed "preal_sup_not_mem_Ex1"; |
1105 |
1105 |
1106 Goal "? Y. (! X: P. X < Y) \ |
1106 Goal "EX Y. (ALL X: P. X < Y) \ |
1107 \ ==> {w. ? X: P. w: Rep_preal(X)} < UNIV"; (**) |
1107 \ ==> {w. EX X: P. w: Rep_preal(X)} < UNIV"; (**) |
1108 by (dtac preal_sup_not_mem_Ex 1); |
1108 by (dtac preal_sup_not_mem_Ex 1); |
1109 by (auto_tac (claset() addSIs [psubsetI],simpset())); |
1109 by (auto_tac (claset() addSIs [psubsetI],simpset())); |
1110 by (eres_inst_tac [("c","q")] equalityCE 1); |
1110 by (eres_inst_tac [("c","q")] equalityCE 1); |
1111 by Auto_tac; |
1111 by Auto_tac; |
1112 qed "preal_sup_set_not_prat_set"; |
1112 qed "preal_sup_set_not_prat_set"; |
1113 |
1113 |
1114 Goal "? Y. (! X: P. X <= Y) \ |
1114 Goal "EX Y. (ALL X: P. X <= Y) \ |
1115 \ ==> {w. ? X: P. w: Rep_preal(X)} < UNIV"; |
1115 \ ==> {w. EX X: P. w: Rep_preal(X)} < UNIV"; |
1116 by (dtac preal_sup_not_mem_Ex1 1); |
1116 by (dtac preal_sup_not_mem_Ex1 1); |
1117 by (auto_tac (claset() addSIs [psubsetI],simpset())); |
1117 by (auto_tac (claset() addSIs [psubsetI],simpset())); |
1118 by (eres_inst_tac [("c","q")] equalityCE 1); |
1118 by (eres_inst_tac [("c","q")] equalityCE 1); |
1119 by Auto_tac; |
1119 by Auto_tac; |
1120 qed "preal_sup_set_not_prat_set1"; |
1120 qed "preal_sup_set_not_prat_set1"; |
1121 |
1121 |
1122 (** Part 3 of Dedekind sections def **) |
1122 (** Part 3 of Dedekind sections def **) |
1123 Goal "[|? (X::preal). X: P; ? Y. (! X:P. X < Y) |] \ |
1123 Goal "[|EX (X::preal). X: P; EX Y. (ALL X:P. X < Y) |] \ |
1124 \ ==> ! y: {w. ? X: P. w: Rep_preal X}. \ |
1124 \ ==> ALL y: {w. EX X: P. w: Rep_preal X}. \ |
1125 \ !z. z < y --> z: {w. ? X: P. w: Rep_preal X}"; (**) |
1125 \ ALL z. z < y --> z: {w. EX X: P. w: Rep_preal X}"; (**) |
1126 by (auto_tac(claset() addEs [Rep_preal RS prealE_lemma3b],simpset())); |
1126 by (auto_tac(claset() addEs [Rep_preal RS prealE_lemma3b],simpset())); |
1127 qed "preal_sup_set_lemma3"; |
1127 qed "preal_sup_set_lemma3"; |
1128 |
1128 |
1129 Goal "[|? (X::preal). X: P; ? Y. (! X:P. X <= Y) |] \ |
1129 Goal "[|EX (X::preal). X: P; EX Y. (ALL X:P. X <= Y) |] \ |
1130 \ ==> ! y: {w. ? X: P. w: Rep_preal X}. \ |
1130 \ ==> ALL y: {w. EX X: P. w: Rep_preal X}. \ |
1131 \ !z. z < y --> z: {w. ? X: P. w: Rep_preal X}"; |
1131 \ ALL z. z < y --> z: {w. EX X: P. w: Rep_preal X}"; |
1132 by (auto_tac(claset() addEs [Rep_preal RS prealE_lemma3b],simpset())); |
1132 by (auto_tac(claset() addEs [Rep_preal RS prealE_lemma3b],simpset())); |
1133 qed "preal_sup_set_lemma3_1"; |
1133 qed "preal_sup_set_lemma3_1"; |
1134 |
1134 |
1135 Goal "[|? (X::preal). X: P; ? Y. (! X:P. X < Y) |] \ |
1135 Goal "[|EX (X::preal). X: P; EX Y. (ALL X:P. X < Y) |] \ |
1136 \ ==> !y: {w. ? X: P. w: Rep_preal X}. \ |
1136 \ ==> ALL y: {w. EX X: P. w: Rep_preal X}. \ |
1137 \ Bex {w. ? X: P. w: Rep_preal X} (op < y)"; (**) |
1137 \ Bex {w. EX X: P. w: Rep_preal X} (op < y)"; (**) |
1138 by (blast_tac (claset() addDs [(Rep_preal RS prealE_lemma4a)]) 1); |
1138 by (blast_tac (claset() addDs [(Rep_preal RS prealE_lemma4a)]) 1); |
1139 qed "preal_sup_set_lemma4"; |
1139 qed "preal_sup_set_lemma4"; |
1140 |
1140 |
1141 Goal "[|? (X::preal). X: P; ? Y. (! X:P. X <= Y) |] \ |
1141 Goal "[|EX (X::preal). X: P; EX Y. (ALL X:P. X <= Y) |] \ |
1142 \ ==> !y: {w. ? X: P. w: Rep_preal X}. \ |
1142 \ ==> ALL y: {w. EX X: P. w: Rep_preal X}. \ |
1143 \ Bex {w. ? X: P. w: Rep_preal X} (op < y)"; |
1143 \ Bex {w. EX X: P. w: Rep_preal X} (op < y)"; |
1144 by (blast_tac (claset() addDs [(Rep_preal RS prealE_lemma4a)]) 1); |
1144 by (blast_tac (claset() addDs [(Rep_preal RS prealE_lemma4a)]) 1); |
1145 qed "preal_sup_set_lemma4_1"; |
1145 qed "preal_sup_set_lemma4_1"; |
1146 |
1146 |
1147 Goal "[|? (X::preal). X: P; ? Y. (! X:P. X < Y) |] \ |
1147 Goal "[|EX (X::preal). X: P; EX Y. (ALL X:P. X < Y) |] \ |
1148 \ ==> {w. ? X: P. w: Rep_preal(X)}: preal"; (**) |
1148 \ ==> {w. EX X: P. w: Rep_preal(X)}: preal"; (**) |
1149 by (rtac prealI2 1); |
1149 by (rtac prealI2 1); |
1150 by (rtac preal_sup_set_not_empty 1); |
1150 by (rtac preal_sup_set_not_empty 1); |
1151 by (rtac preal_sup_set_not_prat_set 2); |
1151 by (rtac preal_sup_set_not_prat_set 2); |
1152 by (rtac preal_sup_set_lemma3 3); |
1152 by (rtac preal_sup_set_lemma3 3); |
1153 by (rtac preal_sup_set_lemma4 5); |
1153 by (rtac preal_sup_set_lemma4 5); |
1154 by Auto_tac; |
1154 by Auto_tac; |
1155 qed "preal_sup"; |
1155 qed "preal_sup"; |
1156 |
1156 |
1157 Goal "[|? (X::preal). X: P; ? Y. (! X:P. X <= Y) |] \ |
1157 Goal "[|EX (X::preal). X: P; EX Y. (ALL X:P. X <= Y) |] \ |
1158 \ ==> {w. ? X: P. w: Rep_preal(X)}: preal"; |
1158 \ ==> {w. EX X: P. w: Rep_preal(X)}: preal"; |
1159 by (rtac prealI2 1); |
1159 by (rtac prealI2 1); |
1160 by (rtac preal_sup_set_not_empty 1); |
1160 by (rtac preal_sup_set_not_empty 1); |
1161 by (rtac preal_sup_set_not_prat_set1 2); |
1161 by (rtac preal_sup_set_not_prat_set1 2); |
1162 by (rtac preal_sup_set_lemma3_1 3); |
1162 by (rtac preal_sup_set_lemma3_1 3); |
1163 by (rtac preal_sup_set_lemma4_1 5); |
1163 by (rtac preal_sup_set_lemma4_1 5); |
1164 by Auto_tac; |
1164 by Auto_tac; |
1165 qed "preal_sup1"; |
1165 qed "preal_sup1"; |
1166 |
1166 |
1167 Goalw [psup_def] "? Y. (! X:P. X < Y) ==> ! x: P. x <= psup P"; (**) |
1167 Goalw [psup_def] "EX Y. (ALL X:P. X < Y) ==> ALL x: P. x <= psup P"; (**) |
1168 by (auto_tac (claset(),simpset() addsimps [preal_le_def])); |
1168 by (auto_tac (claset(),simpset() addsimps [preal_le_def])); |
1169 by (rtac (preal_sup RS Abs_preal_inverse RS ssubst) 1); |
1169 by (rtac (preal_sup RS Abs_preal_inverse RS ssubst) 1); |
1170 by Auto_tac; |
1170 by Auto_tac; |
1171 qed "preal_psup_leI"; |
1171 qed "preal_psup_leI"; |
1172 |
1172 |
1173 Goalw [psup_def] "? Y. (! X:P. X <= Y) ==> ! x: P. x <= psup P"; |
1173 Goalw [psup_def] "EX Y. (ALL X:P. X <= Y) ==> ALL x: P. x <= psup P"; |
1174 by (auto_tac (claset(),simpset() addsimps [preal_le_def])); |
1174 by (auto_tac (claset(),simpset() addsimps [preal_le_def])); |
1175 by (rtac (preal_sup1 RS Abs_preal_inverse RS ssubst) 1); |
1175 by (rtac (preal_sup1 RS Abs_preal_inverse RS ssubst) 1); |
1176 by (auto_tac (claset(),simpset() addsimps [preal_le_def])); |
1176 by (auto_tac (claset(),simpset() addsimps [preal_le_def])); |
1177 qed "preal_psup_leI2"; |
1177 qed "preal_psup_leI2"; |
1178 |
1178 |
1179 Goal "[| ? Y. (! X:P. X < Y); x : P |] ==> x <= psup P"; (**) |
1179 Goal "[| EX Y. (ALL X:P. X < Y); x : P |] ==> x <= psup P"; (**) |
1180 by (blast_tac (claset() addSDs [preal_psup_leI]) 1); |
1180 by (blast_tac (claset() addSDs [preal_psup_leI]) 1); |
1181 qed "preal_psup_leI2b"; |
1181 qed "preal_psup_leI2b"; |
1182 |
1182 |
1183 Goal "[| ? Y. (! X:P. X <= Y); x : P |] ==> x <= psup P"; |
1183 Goal "[| EX Y. (ALL X:P. X <= Y); x : P |] ==> x <= psup P"; |
1184 by (blast_tac (claset() addSDs [preal_psup_leI2]) 1); |
1184 by (blast_tac (claset() addSDs [preal_psup_leI2]) 1); |
1185 qed "preal_psup_leI2a"; |
1185 qed "preal_psup_leI2a"; |
1186 |
1186 |
1187 Goalw [psup_def] "[| ? X. X : P; ! X:P. X < Y |] ==> psup P <= Y"; (**) |
1187 Goalw [psup_def] "[| EX X. X : P; ALL X:P. X < Y |] ==> psup P <= Y"; (**) |
1188 by (auto_tac (claset(),simpset() addsimps [preal_le_def])); |
1188 by (auto_tac (claset(),simpset() addsimps [preal_le_def])); |
1189 by (dtac (([exI,exI] MRS preal_sup) RS Abs_preal_inverse RS subst) 1); |
1189 by (dtac (([exI,exI] MRS preal_sup) RS Abs_preal_inverse RS subst) 1); |
1190 by (rotate_tac 1 2); |
1190 by (rotate_tac 1 2); |
1191 by (assume_tac 2); |
1191 by (assume_tac 2); |
1192 by (auto_tac (claset() addSDs [bspec],simpset() addsimps [preal_less_def,psubset_def])); |
1192 by (auto_tac (claset() addSDs [bspec],simpset() addsimps [preal_less_def,psubset_def])); |
1193 qed "psup_le_ub"; |
1193 qed "psup_le_ub"; |
1194 |
1194 |
1195 Goalw [psup_def] "[| ? X. X : P; ! X:P. X <= Y |] ==> psup P <= Y"; |
1195 Goalw [psup_def] "[| EX X. X : P; ALL X:P. X <= Y |] ==> psup P <= Y"; |
1196 by (auto_tac (claset(),simpset() addsimps [preal_le_def])); |
1196 by (auto_tac (claset(),simpset() addsimps [preal_le_def])); |
1197 by (dtac (([exI,exI] MRS preal_sup1) RS Abs_preal_inverse RS subst) 1); |
1197 by (dtac (([exI,exI] MRS preal_sup1) RS Abs_preal_inverse RS subst) 1); |
1198 by (rotate_tac 1 2); |
1198 by (rotate_tac 1 2); |
1199 by (assume_tac 2); |
1199 by (assume_tac 2); |
1200 by (auto_tac (claset() addSDs [bspec], |
1200 by (auto_tac (claset() addSDs [bspec], |
1201 simpset() addsimps [preal_less_def,psubset_def,preal_le_def])); |
1201 simpset() addsimps [preal_less_def,psubset_def,preal_le_def])); |
1202 qed "psup_le_ub1"; |
1202 qed "psup_le_ub1"; |
1203 |
1203 |
1204 (** supremum property **) |
1204 (** supremum property **) |
1205 Goal "[|? (X::preal). X: P; ? Y. (! X:P. X < Y) |] \ |
1205 Goal "[|EX (X::preal). X: P; EX Y. (ALL X:P. X < Y) |] \ |
1206 \ ==> (!Y. (? X: P. Y < X) = (Y < psup P))"; |
1206 \ ==> (ALL Y. (EX X: P. Y < X) = (Y < psup P))"; |
1207 by (forward_tac [preal_sup RS Abs_preal_inverse] 1); |
1207 by (forward_tac [preal_sup RS Abs_preal_inverse] 1); |
1208 by (Fast_tac 1); |
1208 by (Fast_tac 1); |
1209 by (auto_tac (claset() addSIs [psubsetI],simpset() addsimps [psup_def,preal_less_def])); |
1209 by (auto_tac (claset() addSIs [psubsetI],simpset() addsimps [psup_def,preal_less_def])); |
1210 by (blast_tac (claset() addDs [psubset_def RS meta_eq_to_obj_eq RS iffD1]) 1); |
1210 by (blast_tac (claset() addDs [psubset_def RS meta_eq_to_obj_eq RS iffD1]) 1); |
1211 by (rotate_tac 4 1); |
1211 by (rotate_tac 4 1); |