353 simpset() addsimps [starfun_add RS sym])); |
353 simpset() addsimps [starfun_add RS sym])); |
354 qed "starfun_add_inf_close"; |
354 qed "starfun_add_inf_close"; |
355 |
355 |
356 (*---------------------------------------------------- |
356 (*---------------------------------------------------- |
357 Examples: hrabs is nonstandard extension of rabs |
357 Examples: hrabs is nonstandard extension of rabs |
358 hrinv is nonstandard extension of rinv |
358 inverse is nonstandard extension of inverse |
359 ---------------------------------------------------*) |
359 ---------------------------------------------------*) |
360 |
360 |
361 (* can be proved easily using theorem "starfun" and *) |
361 (* can be proved easily using theorem "starfun" and *) |
362 (* properties of ultrafilter as for hrinv below we *) |
362 (* properties of ultrafilter as for inverse below we *) |
363 (* use the theorem we proved above instead *) |
363 (* use the theorem we proved above instead *) |
364 |
364 |
365 Goal "*f* abs = abs"; |
365 Goal "*f* abs = abs"; |
366 by (rtac (hrabs_is_starext_rabs RS |
366 by (rtac (hrabs_is_starext_rabs RS |
367 (is_starext_starfun_iff RS iffD1) RS sym) 1); |
367 (is_starext_starfun_iff RS iffD1) RS sym) 1); |
368 qed "starfun_rabs_hrabs"; |
368 qed "starfun_rabs_hrabs"; |
369 |
369 |
370 Goal "!!x. x ~= 0 ==> (*f* rinv) x = hrinv(x)"; |
370 Goal "!!x. x ~= 0 ==> (*f* inverse) x = inverse(x)"; |
371 by (res_inst_tac [("z","x")] eq_Abs_hypreal 1); |
371 by (res_inst_tac [("z","x")] eq_Abs_hypreal 1); |
372 by (auto_tac (claset(),simpset() addsimps [starfun, |
372 by (auto_tac (claset(),simpset() addsimps [starfun, |
373 hypreal_hrinv,hypreal_zero_def])); |
373 hypreal_inverse,hypreal_zero_def])); |
374 by (dtac FreeUltrafilterNat_Compl_mem 1); |
374 by (dtac FreeUltrafilterNat_Compl_mem 1); |
375 by (auto_tac (claset() addEs [FreeUltrafilterNat_subset],simpset())); |
375 by (auto_tac (claset() addEs [FreeUltrafilterNat_subset],simpset())); |
376 qed "starfun_rinv_hrinv"; |
376 qed "starfun_inverse_inverse"; |
377 |
377 |
378 (* more specifically *) |
378 (* more specifically *) |
379 Goal "(*f* rinv) ehr = hrinv (ehr)"; |
379 Goal "(*f* inverse) ehr = inverse (ehr)"; |
380 by (rtac (hypreal_epsilon_not_zero RS starfun_rinv_hrinv) 1); |
380 by (rtac (hypreal_epsilon_not_zero RS starfun_inverse_inverse) 1); |
381 qed "starfun_rinv_epsilon"; |
381 qed "starfun_inverse_epsilon"; |
382 |
382 |
383 Goal "ALL x. f x ~= 0 ==> \ |
383 Goal "ALL x. f x ~= 0 ==> \ |
384 \ hrinv ((*f* f) x) = (*f* (%x. rinv (f x))) x"; |
384 \ inverse ((*f* f) x) = (*f* (%x. inverse (f x))) x"; |
385 by (res_inst_tac [("z","x")] eq_Abs_hypreal 1); |
385 by (res_inst_tac [("z","x")] eq_Abs_hypreal 1); |
386 by (auto_tac (claset(),simpset() addsimps [starfun, |
386 by (auto_tac (claset(),simpset() addsimps [starfun, |
387 hypreal_hrinv])); |
387 hypreal_inverse])); |
388 qed "starfun_hrinv"; |
388 qed "starfun_inverse"; |
389 |
389 |
390 Goal "(*f* f) x ~= 0 ==> \ |
390 Goal "(*f* f) x ~= 0 ==> \ |
391 \ hrinv ((*f* f) x) = (*f* (%x. rinv (f x))) x"; |
391 \ inverse ((*f* f) x) = (*f* (%x. inverse (f x))) x"; |
392 by (res_inst_tac [("z","x")] eq_Abs_hypreal 1); |
392 by (res_inst_tac [("z","x")] eq_Abs_hypreal 1); |
393 by (auto_tac (claset() addIs [FreeUltrafilterNat_subset] |
393 by (auto_tac (claset() addIs [FreeUltrafilterNat_subset] |
394 addSDs [FreeUltrafilterNat_Compl_mem], |
394 addSDs [FreeUltrafilterNat_Compl_mem], |
395 simpset() addsimps [starfun,hypreal_hrinv, |
395 simpset() addsimps [starfun,hypreal_inverse, |
396 hypreal_zero_def])); |
396 hypreal_zero_def])); |
397 qed "starfun_hrinv2"; |
397 qed "starfun_inverse2"; |
398 |
398 |
399 Goal "a ~= hypreal_of_real b ==> \ |
399 Goal "a ~= hypreal_of_real b ==> \ |
400 \ (*f* (%z. rinv (z + -b))) a = hrinv(a + -hypreal_of_real b)"; |
400 \ (*f* (%z. inverse (z + -b))) a = inverse(a + -hypreal_of_real b)"; |
401 by (res_inst_tac [("z","a")] eq_Abs_hypreal 1); |
401 by (res_inst_tac [("z","a")] eq_Abs_hypreal 1); |
402 by (auto_tac (claset() addIs [FreeUltrafilterNat_subset] |
402 by (auto_tac (claset() addIs [FreeUltrafilterNat_subset] |
403 addSDs [FreeUltrafilterNat_Compl_mem], |
403 addSDs [FreeUltrafilterNat_Compl_mem], |
404 simpset() addsimps [starfun,hypreal_of_real_def,hypreal_add, |
404 simpset() addsimps [starfun,hypreal_of_real_def,hypreal_add, |
405 hypreal_minus,hypreal_hrinv,rename_numerals |
405 hypreal_minus,hypreal_inverse,rename_numerals |
406 (real_eq_minus_iff2 RS sym)])); |
406 (real_eq_minus_iff2 RS sym)])); |
407 qed "starfun_hrinv3"; |
407 qed "starfun_inverse3"; |
408 |
408 |
409 Goal |
409 Goal |
410 "!!f. a + hypreal_of_real b ~= 0 ==> \ |
410 "!!f. a + hypreal_of_real b ~= 0 ==> \ |
411 \ (*f* (%z. rinv (z + b))) a = hrinv(a + hypreal_of_real b)"; |
411 \ (*f* (%z. inverse (z + b))) a = inverse(a + hypreal_of_real b)"; |
412 by (res_inst_tac [("z","a")] eq_Abs_hypreal 1); |
412 by (res_inst_tac [("z","a")] eq_Abs_hypreal 1); |
413 by (auto_tac (claset() addIs [FreeUltrafilterNat_subset] |
413 by (auto_tac (claset() addIs [FreeUltrafilterNat_subset] |
414 addSDs [FreeUltrafilterNat_Compl_mem], |
414 addSDs [FreeUltrafilterNat_Compl_mem], |
415 simpset() addsimps [starfun,hypreal_of_real_def,hypreal_add, |
415 simpset() addsimps [starfun,hypreal_of_real_def,hypreal_add, |
416 hypreal_hrinv,hypreal_zero_def])); |
416 hypreal_inverse,hypreal_zero_def])); |
417 qed "starfun_hrinv4"; |
417 qed "starfun_inverse4"; |
418 |
418 |
419 (*------------------------------------------------------------- |
419 (*------------------------------------------------------------- |
420 General lemma/theorem needed for proofs in elementary |
420 General lemma/theorem needed for proofs in elementary |
421 topology of the reals |
421 topology of the reals |
422 ------------------------------------------------------------*) |
422 ------------------------------------------------------------*) |
469 Another charaterization of Infinitesimal and one of @= relation. |
469 Another charaterization of Infinitesimal and one of @= relation. |
470 In this theory since hypreal_hrabs proved here. (To Check:) Maybe |
470 In this theory since hypreal_hrabs proved here. (To Check:) Maybe |
471 move both if possible? |
471 move both if possible? |
472 -------------------------------------------------------------------*) |
472 -------------------------------------------------------------------*) |
473 Goal "(x:Infinitesimal) = (EX X:Rep_hypreal(x). \ |
473 Goal "(x:Infinitesimal) = (EX X:Rep_hypreal(x). \ |
474 \ ALL m. {n. abs(X n) < rinv(real_of_posnat m)}:FreeUltrafilterNat)"; |
474 \ ALL m. {n. abs(X n) < inverse(real_of_posnat m)}:FreeUltrafilterNat)"; |
475 by (res_inst_tac [("z","x")] eq_Abs_hypreal 1); |
475 by (res_inst_tac [("z","x")] eq_Abs_hypreal 1); |
476 by (auto_tac (claset() addSIs [bexI,lemma_hyprel_refl], |
476 by (auto_tac (claset() addSIs [bexI,lemma_hyprel_refl], |
477 simpset() addsimps [Infinitesimal_hypreal_of_posnat_iff, |
477 simpset() addsimps [Infinitesimal_hypreal_of_posnat_iff, |
478 hypreal_of_real_of_posnat,hypreal_of_real_def,hypreal_hrinv, |
478 hypreal_of_real_of_posnat,hypreal_of_real_def,hypreal_inverse, |
479 hypreal_hrabs,hypreal_less])); |
479 hypreal_hrabs,hypreal_less])); |
480 by (dres_inst_tac [("x","n")] spec 1); |
480 by (dres_inst_tac [("x","n")] spec 1); |
481 by (Fuf_tac 1); |
481 by (Fuf_tac 1); |
482 qed "Infinitesimal_FreeUltrafilterNat_iff2"; |
482 qed "Infinitesimal_FreeUltrafilterNat_iff2"; |
483 |
483 |
484 Goal "(Abs_hypreal(hyprel^^{X}) @= Abs_hypreal(hyprel^^{Y})) = \ |
484 Goal "(Abs_hypreal(hyprel^^{X}) @= Abs_hypreal(hyprel^^{Y})) = \ |
485 \ (ALL m. {n. abs (X n + - Y n) < \ |
485 \ (ALL m. {n. abs (X n + - Y n) < \ |
486 \ rinv(real_of_posnat m)} : FreeUltrafilterNat)"; |
486 \ inverse(real_of_posnat m)} : FreeUltrafilterNat)"; |
487 by (rtac (inf_close_minus_iff RS ssubst) 1); |
487 by (rtac (inf_close_minus_iff RS ssubst) 1); |
488 by (rtac (mem_infmal_iff RS subst) 1); |
488 by (rtac (mem_infmal_iff RS subst) 1); |
489 by (auto_tac (claset(), simpset() addsimps [hypreal_minus, |
489 by (auto_tac (claset(), simpset() addsimps [hypreal_minus, |
490 hypreal_add,Infinitesimal_FreeUltrafilterNat_iff2])); |
490 hypreal_add,Infinitesimal_FreeUltrafilterNat_iff2])); |
491 by (dres_inst_tac [("x","m")] spec 1); |
491 by (dres_inst_tac [("x","m")] spec 1); |