653 |
653 |
654 lemma hcomplex_hypreal_number_of: |
654 lemma hcomplex_hypreal_number_of: |
655 "hcomplex_of_complex (number_of w) = hcomplex_of_hypreal(number_of w)" |
655 "hcomplex_of_complex (number_of w) = hcomplex_of_hypreal(number_of w)" |
656 by transfer (rule of_real_number_of_eq [symmetric]) |
656 by transfer (rule of_real_number_of_eq [symmetric]) |
657 |
657 |
658 (* |
|
659 Goal "z + hcnj z = |
|
660 hcomplex_of_hypreal (2 * hRe(z))" |
|
661 by (res_inst_tac [("z","z")] eq_Abs_star 1); |
|
662 by (auto_tac (claset(),HOL_ss addsimps [hRe,hcnj,star_n_add, |
|
663 hypreal_mult,hcomplex_of_hypreal,complex_add_cnj])); |
|
664 qed "star_n_add_hcnj"; |
|
665 |
|
666 Goal "z - hcnj z = \ |
|
667 \ hcomplex_of_hypreal (hypreal_of_real #2 * hIm(z)) * iii"; |
|
668 by (res_inst_tac [("z","z")] eq_Abs_star 1); |
|
669 by (auto_tac (claset(),simpset() addsimps [hIm,hcnj,hcomplex_diff, |
|
670 hypreal_of_real_def,hypreal_mult,hcomplex_of_hypreal, |
|
671 complex_diff_cnj,iii_def,star_n_mult])); |
|
672 qed "hcomplex_diff_hcnj"; |
|
673 *) |
|
674 |
|
675 |
|
676 (*** Real and imaginary stuff ***) |
|
677 |
|
678 (*Convert??? |
|
679 Goalw [hcomplex_number_of_def] |
|
680 "((number_of xa :: hcomplex) + iii * number_of ya = |
|
681 number_of xb + iii * number_of yb) = |
|
682 (((number_of xa :: hcomplex) = number_of xb) & |
|
683 ((number_of ya :: hcomplex) = number_of yb))" |
|
684 by (auto_tac (claset(), HOL_ss addsimps [hcomplex_eq_cancel_iff, |
|
685 hcomplex_hypreal_number_of])); |
|
686 qed "hcomplex_number_of_eq_cancel_iff"; |
|
687 Addsimps [hcomplex_number_of_eq_cancel_iff]; |
|
688 |
|
689 Goalw [hcomplex_number_of_def] |
|
690 "((number_of xa :: hcomplex) + number_of ya * iii = \ |
|
691 \ number_of xb + number_of yb * iii) = \ |
|
692 \ (((number_of xa :: hcomplex) = number_of xb) & \ |
|
693 \ ((number_of ya :: hcomplex) = number_of yb))"; |
|
694 by (auto_tac (claset(), HOL_ss addsimps [hcomplex_eq_cancel_iffA, |
|
695 hcomplex_hypreal_number_of])); |
|
696 qed "hcomplex_number_of_eq_cancel_iffA"; |
|
697 Addsimps [hcomplex_number_of_eq_cancel_iffA]; |
|
698 |
|
699 Goalw [hcomplex_number_of_def] |
|
700 "((number_of xa :: hcomplex) + number_of ya * iii = \ |
|
701 \ number_of xb + iii * number_of yb) = \ |
|
702 \ (((number_of xa :: hcomplex) = number_of xb) & \ |
|
703 \ ((number_of ya :: hcomplex) = number_of yb))"; |
|
704 by (auto_tac (claset(), HOL_ss addsimps [hcomplex_eq_cancel_iffB, |
|
705 hcomplex_hypreal_number_of])); |
|
706 qed "hcomplex_number_of_eq_cancel_iffB"; |
|
707 Addsimps [hcomplex_number_of_eq_cancel_iffB]; |
|
708 |
|
709 Goalw [hcomplex_number_of_def] |
|
710 "((number_of xa :: hcomplex) + iii * number_of ya = \ |
|
711 \ number_of xb + number_of yb * iii) = \ |
|
712 \ (((number_of xa :: hcomplex) = number_of xb) & \ |
|
713 \ ((number_of ya :: hcomplex) = number_of yb))"; |
|
714 by (auto_tac (claset(), HOL_ss addsimps [hcomplex_eq_cancel_iffC, |
|
715 hcomplex_hypreal_number_of])); |
|
716 qed "hcomplex_number_of_eq_cancel_iffC"; |
|
717 Addsimps [hcomplex_number_of_eq_cancel_iffC]; |
|
718 |
|
719 Goalw [hcomplex_number_of_def] |
|
720 "((number_of xa :: hcomplex) + iii * number_of ya = \ |
|
721 \ number_of xb) = \ |
|
722 \ (((number_of xa :: hcomplex) = number_of xb) & \ |
|
723 \ ((number_of ya :: hcomplex) = 0))"; |
|
724 by (auto_tac (claset(), HOL_ss addsimps [hcomplex_eq_cancel_iff2, |
|
725 hcomplex_hypreal_number_of,hcomplex_of_hypreal_zero_iff])); |
|
726 qed "hcomplex_number_of_eq_cancel_iff2"; |
|
727 Addsimps [hcomplex_number_of_eq_cancel_iff2]; |
|
728 |
|
729 Goalw [hcomplex_number_of_def] |
|
730 "((number_of xa :: hcomplex) + number_of ya * iii = \ |
|
731 \ number_of xb) = \ |
|
732 \ (((number_of xa :: hcomplex) = number_of xb) & \ |
|
733 \ ((number_of ya :: hcomplex) = 0))"; |
|
734 by (auto_tac (claset(), HOL_ss addsimps [hcomplex_eq_cancel_iff2a, |
|
735 hcomplex_hypreal_number_of,hcomplex_of_hypreal_zero_iff])); |
|
736 qed "hcomplex_number_of_eq_cancel_iff2a"; |
|
737 Addsimps [hcomplex_number_of_eq_cancel_iff2a]; |
|
738 |
|
739 Goalw [hcomplex_number_of_def] |
|
740 "((number_of xa :: hcomplex) + iii * number_of ya = \ |
|
741 \ iii * number_of yb) = \ |
|
742 \ (((number_of xa :: hcomplex) = 0) & \ |
|
743 \ ((number_of ya :: hcomplex) = number_of yb))"; |
|
744 by (auto_tac (claset(), HOL_ss addsimps [hcomplex_eq_cancel_iff3, |
|
745 hcomplex_hypreal_number_of,hcomplex_of_hypreal_zero_iff])); |
|
746 qed "hcomplex_number_of_eq_cancel_iff3"; |
|
747 Addsimps [hcomplex_number_of_eq_cancel_iff3]; |
|
748 |
|
749 Goalw [hcomplex_number_of_def] |
|
750 "((number_of xa :: hcomplex) + number_of ya * iii= \ |
|
751 \ iii * number_of yb) = \ |
|
752 \ (((number_of xa :: hcomplex) = 0) & \ |
|
753 \ ((number_of ya :: hcomplex) = number_of yb))"; |
|
754 by (auto_tac (claset(), HOL_ss addsimps [hcomplex_eq_cancel_iff3a, |
|
755 hcomplex_hypreal_number_of,hcomplex_of_hypreal_zero_iff])); |
|
756 qed "hcomplex_number_of_eq_cancel_iff3a"; |
|
757 Addsimps [hcomplex_number_of_eq_cancel_iff3a]; |
|
758 *) |
|
759 |
|
760 lemma hcomplex_number_of_hcnj [simp]: |
658 lemma hcomplex_number_of_hcnj [simp]: |
761 "hcnj (number_of v :: hcomplex) = number_of v" |
659 "hcnj (number_of v :: hcomplex) = number_of v" |
762 by transfer (rule complex_cnj_number_of) |
660 by transfer (rule complex_cnj_number_of) |
763 |
661 |
764 lemma hcomplex_number_of_hcmod [simp]: |
662 lemma hcomplex_number_of_hcmod [simp]: |