384 |
384 |
385 (*---------------------------------------------------------------------------- |
385 (*---------------------------------------------------------------------------- |
386 Existence of infinite hyperreal number |
386 Existence of infinite hyperreal number |
387 ----------------------------------------------------------------------------*) |
387 ----------------------------------------------------------------------------*) |
388 |
388 |
389 Goalw [omega_def] "Rep_hypreal(whr) : hypreal"; |
389 Goalw [omega_def] "Rep_hypreal(omega) : hypreal"; |
390 by (rtac Rep_hypreal 1); |
390 by (rtac Rep_hypreal 1); |
391 qed "Rep_hypreal_omega"; |
391 qed "Rep_hypreal_omega"; |
392 |
392 |
393 (* existence of infinite number not corresponding to any real number *) |
393 (* existence of infinite number not corresponding to any real number *) |
394 (* use assumption that member FreeUltrafilterNat is not finite *) |
394 (* use assumption that member FreeUltrafilterNat is not finite *) |
395 (* a few lemmas first *) |
395 (* a few lemmas first *) |
396 |
396 |
397 Goal "{n::nat. x = real_of_nat n} = {} | \ |
397 Goal "{n::nat. x = real n} = {} | \ |
398 \ (EX y. {n::nat. x = real_of_nat n} = {y})"; |
398 \ (EX y. {n::nat. x = real n} = {y})"; |
399 by (auto_tac (claset() addDs [inj_real_of_nat RS injD], simpset())); |
399 by (auto_tac (claset() addDs [inj_real_of_nat RS injD], simpset())); |
400 qed "lemma_omega_empty_singleton_disj"; |
400 qed "lemma_omega_empty_singleton_disj"; |
401 |
401 |
402 Goal "finite {n::nat. x = real_of_nat n}"; |
402 Goal "finite {n::nat. x = real n}"; |
403 by (cut_inst_tac [("x","x")] lemma_omega_empty_singleton_disj 1); |
403 by (cut_inst_tac [("x","x")] lemma_omega_empty_singleton_disj 1); |
404 by Auto_tac; |
404 by Auto_tac; |
405 qed "lemma_finite_omega_set"; |
405 qed "lemma_finite_omega_set"; |
406 |
406 |
407 Goalw [omega_def,hypreal_of_real_def] |
407 Goalw [omega_def,hypreal_of_real_def] |
408 "~ (EX x. hypreal_of_real x = whr)"; |
408 "~ (EX x. hypreal_of_real x = omega)"; |
409 by (auto_tac (claset(), |
409 by (auto_tac (claset(), |
410 simpset() addsimps [real_of_nat_Suc, real_diff_eq_eq RS sym, |
410 simpset() addsimps [real_of_nat_Suc, real_diff_eq_eq RS sym, |
411 lemma_finite_omega_set RS FreeUltrafilterNat_finite])); |
411 lemma_finite_omega_set RS FreeUltrafilterNat_finite])); |
412 qed "not_ex_hypreal_of_real_eq_omega"; |
412 qed "not_ex_hypreal_of_real_eq_omega"; |
413 |
413 |
414 Goal "hypreal_of_real x ~= whr"; |
414 Goal "hypreal_of_real x ~= omega"; |
415 by (cut_facts_tac [not_ex_hypreal_of_real_eq_omega] 1); |
415 by (cut_facts_tac [not_ex_hypreal_of_real_eq_omega] 1); |
416 by Auto_tac; |
416 by Auto_tac; |
417 qed "hypreal_of_real_not_eq_omega"; |
417 qed "hypreal_of_real_not_eq_omega"; |
418 |
418 |
419 (* existence of infinitesimal number also not *) |
419 (* existence of infinitesimal number also not *) |
420 (* corresponding to any real number *) |
420 (* corresponding to any real number *) |
421 |
421 |
422 Goal "inverse (real_of_nat x) = inverse (real_of_nat y) ==> x = y"; |
422 Goal "inverse (real (x::nat)) = inverse (real y) ==> x = y"; |
423 by (rtac (inj_real_of_nat RS injD) 1); |
423 by (rtac (inj_real_of_nat RS injD) 1); |
424 by (Asm_full_simp_tac 1); |
424 by (Asm_full_simp_tac 1); |
425 qed "real_of_nat_inverse_inj"; |
425 qed "real_of_nat_inverse_inj"; |
426 |
426 |
427 Goal "{n::nat. x = inverse(real_of_nat(Suc n))} = {} | \ |
427 Goal "{n::nat. x = inverse(real(Suc n))} = {} | \ |
428 \ (EX y. {n::nat. x = inverse(real_of_nat(Suc n))} = {y})"; |
428 \ (EX y. {n::nat. x = inverse(real(Suc n))} = {y})"; |
429 by (auto_tac (claset(), simpset() addsimps [inj_real_of_nat RS inj_eq])); |
429 by (auto_tac (claset(), simpset() addsimps [inj_real_of_nat RS inj_eq])); |
430 qed "lemma_epsilon_empty_singleton_disj"; |
430 qed "lemma_epsilon_empty_singleton_disj"; |
431 |
431 |
432 Goal "finite {n::nat. x = inverse(real_of_nat(Suc n))}"; |
432 Goal "finite {n. x = inverse(real(Suc n))}"; |
433 by (cut_inst_tac [("x","x")] lemma_epsilon_empty_singleton_disj 1); |
433 by (cut_inst_tac [("x","x")] lemma_epsilon_empty_singleton_disj 1); |
434 by Auto_tac; |
434 by Auto_tac; |
435 qed "lemma_finite_epsilon_set"; |
435 qed "lemma_finite_epsilon_set"; |
436 |
436 |
437 Goalw [epsilon_def,hypreal_of_real_def] |
437 Goalw [epsilon_def,hypreal_of_real_def] |
438 "~ (EX x. hypreal_of_real x = ehr)"; |
438 "~ (EX x. hypreal_of_real x = epsilon)"; |
439 by (auto_tac (claset(), |
439 by (auto_tac (claset(), |
440 simpset() addsimps [lemma_finite_epsilon_set RS FreeUltrafilterNat_finite])); |
440 simpset() addsimps [lemma_finite_epsilon_set RS FreeUltrafilterNat_finite])); |
441 qed "not_ex_hypreal_of_real_eq_epsilon"; |
441 qed "not_ex_hypreal_of_real_eq_epsilon"; |
442 |
442 |
443 Goal "hypreal_of_real x ~= ehr"; |
443 Goal "hypreal_of_real x ~= epsilon"; |
444 by (cut_facts_tac [not_ex_hypreal_of_real_eq_epsilon] 1); |
444 by (cut_facts_tac [not_ex_hypreal_of_real_eq_epsilon] 1); |
445 by Auto_tac; |
445 by Auto_tac; |
446 qed "hypreal_of_real_not_eq_epsilon"; |
446 qed "hypreal_of_real_not_eq_epsilon"; |
447 |
447 |
448 Goalw [epsilon_def,hypreal_zero_def] "ehr ~= 0"; |
448 Goalw [epsilon_def,hypreal_zero_def] "epsilon ~= 0"; |
449 by Auto_tac; |
449 by Auto_tac; |
450 by (auto_tac (claset(), |
450 by (auto_tac (claset(), |
451 simpset() addsimps [real_of_nat_Suc_gt_zero RS real_not_refl2 RS not_sym])); |
451 simpset() addsimps [real_of_nat_Suc_gt_zero RS real_not_refl2 RS not_sym])); |
452 qed "hypreal_epsilon_not_zero"; |
452 qed "hypreal_epsilon_not_zero"; |
453 |
453 |
454 Goal "ehr = inverse(whr)"; |
454 Goal "epsilon = inverse(omega)"; |
455 by (asm_full_simp_tac (simpset() addsimps |
455 by (asm_full_simp_tac (simpset() addsimps |
456 [hypreal_inverse, omega_def, epsilon_def]) 1); |
456 [hypreal_inverse, omega_def, epsilon_def]) 1); |
457 qed "hypreal_epsilon_inverse_omega"; |
457 qed "hypreal_epsilon_inverse_omega"; |
458 |
458 |
459 |
459 |