equal
deleted
inserted
replaced
1 (* Title : PReal.ML |
1 (* Title : HOL/Real/PReal.ML |
2 ID : $Id$ |
2 ID : $Id$ |
3 Author : Jacques D. Fleuriot |
3 Author : Jacques D. Fleuriot |
4 Copyright : 1998 University of Cambridge |
4 Copyright : 1998 University of Cambridge |
5 Description : The positive reals as Dedekind sections of positive |
5 Description : The positive reals as Dedekind sections of positive |
6 rationals. Fundamentals of Abstract Analysis |
6 rationals. Fundamentals of Abstract Analysis |
447 \ EX y: Rep_preal(S). z = x * y)"; |
447 \ EX y: Rep_preal(S). z = x * y)"; |
448 by (fast_tac (claset() addSIs [mem_Rep_preal_multD,mem_Rep_preal_multI]) 1); |
448 by (fast_tac (claset() addSIs [mem_Rep_preal_multD,mem_Rep_preal_multI]) 1); |
449 qed "mem_Rep_preal_mult_iff"; |
449 qed "mem_Rep_preal_mult_iff"; |
450 |
450 |
451 (** More lemmas for preal_add_mult_distrib2 **) |
451 (** More lemmas for preal_add_mult_distrib2 **) |
452 goal PRat.thy "!!(a1::prat). a1 < a2 ==> a1 * b + a2 * c < a2 * (b + c)"; |
|
453 by (auto_tac (claset() addSIs [prat_add_less2_mono1,prat_mult_less2_mono1], |
|
454 simpset() addsimps [prat_add_mult_distrib2])); |
|
455 qed "lemma_prat_add_mult_mono"; |
|
456 |
452 |
457 Goal "[| xb: Rep_preal z1; xc: Rep_preal z2; ya: \ |
453 Goal "[| xb: Rep_preal z1; xc: Rep_preal z2; ya: \ |
458 \ Rep_preal w; yb: Rep_preal w |] ==> \ |
454 \ Rep_preal w; yb: Rep_preal w |] ==> \ |
459 \ xb * ya + xc * yb: Rep_preal (z1 * w + z2 * w)"; |
455 \ xb * ya + xc * yb: Rep_preal (z1 * w + z2 * w)"; |
460 by (fast_tac (claset() addIs [mem_Rep_preal_addI,mem_Rep_preal_multI]) 1); |
456 by (fast_tac (claset() addIs [mem_Rep_preal_addI,mem_Rep_preal_multI]) 1); |
700 Goal "A*pinv(A) = (preal_of_prat (prat_of_pnat (Abs_pnat 1)))"; |
696 Goal "A*pinv(A) = (preal_of_prat (prat_of_pnat (Abs_pnat 1)))"; |
701 by (rtac (preal_mult_commute RS subst) 1); |
697 by (rtac (preal_mult_commute RS subst) 1); |
702 by (rtac preal_mult_inv 1); |
698 by (rtac preal_mult_inv 1); |
703 qed "preal_mult_inv_right"; |
699 qed "preal_mult_inv_right"; |
704 |
700 |
705 val [prem] = goal thy |
701 val [prem] = goal (the_context ()) |
706 "(!!u. z = Abs_preal(u) ==> P) ==> P"; |
702 "(!!u. z = Abs_preal(u) ==> P) ==> P"; |
707 by (cut_inst_tac [("x1","z")] |
703 by (cut_inst_tac [("x1","z")] |
708 (rewrite_rule [preal_def] (Rep_preal RS Abs_preal_inverse)) 1); |
704 (rewrite_rule [preal_def] (Rep_preal RS Abs_preal_inverse)) 1); |
709 by (res_inst_tac [("u","Rep_preal z")] prem 1); |
705 by (res_inst_tac [("u","Rep_preal z")] prem 1); |
710 by (dtac (inj_Rep_preal RS injD) 1); |
706 by (dtac (inj_Rep_preal RS injD) 1); |
781 |
777 |
782 Goalw [preal_le_def] "w <= (w::preal)"; |
778 Goalw [preal_le_def] "w <= (w::preal)"; |
783 by (Simp_tac 1); |
779 by (Simp_tac 1); |
784 qed "preal_le_refl"; |
780 qed "preal_le_refl"; |
785 |
781 |
786 val prems = goal thy "!!i. [| i <= j; j < k |] ==> i < (k::preal)"; |
782 val prems = goal (the_context ()) "!!i. [| i <= j; j < k |] ==> i < (k::preal)"; |
787 by (dtac preal_le_imp_less_or_eq 1); |
783 by (dtac preal_le_imp_less_or_eq 1); |
788 by (fast_tac (claset() addIs [preal_less_trans]) 1); |
784 by (fast_tac (claset() addIs [preal_less_trans]) 1); |
789 qed "preal_le_less_trans"; |
785 qed "preal_le_less_trans"; |
790 |
786 |
791 val prems = goal thy "!!i. [| i < j; j <= k |] ==> i < (k::preal)"; |
787 val prems = goal (the_context ()) "!!i. [| i < j; j <= k |] ==> i < (k::preal)"; |
792 by (dtac preal_le_imp_less_or_eq 1); |
788 by (dtac preal_le_imp_less_or_eq 1); |
793 by (fast_tac (claset() addIs [preal_less_trans]) 1); |
789 by (fast_tac (claset() addIs [preal_less_trans]) 1); |
794 qed "preal_less_le_trans"; |
790 qed "preal_less_le_trans"; |
795 |
791 |
796 Goal "[| i <= j; j <= k |] ==> i <= (k::preal)"; |
792 Goal "[| i <= j; j <= k |] ==> i <= (k::preal)"; |