# HG changeset patch # User wenzelm # Date 1441049288 -7200 # Node ID b72a990adfe29d408d7f3efd479e2b4dbe31509f # Parent aefe89038dd288e9ca985c3a79b46f351d38fcdb prefer symbols; diff -r aefe89038dd2 -r b72a990adfe2 src/HOL/Archimedean_Field.thy --- a/src/HOL/Archimedean_Field.thy Mon Aug 31 21:01:21 2015 +0200 +++ b/src/HOL/Archimedean_Field.thy Mon Aug 31 21:28:08 2015 +0200 @@ -546,14 +546,14 @@ lemma frac_lt_1: "frac x < 1" by (simp add: frac_def) linarith -lemma frac_eq_0_iff [simp]: "frac x = 0 \ x \ Ints" +lemma frac_eq_0_iff [simp]: "frac x = 0 \ x \ \" by (simp add: frac_def) (metis Ints_cases Ints_of_int floor_of_int ) lemma frac_ge_0 [simp]: "frac x \ 0" unfolding frac_def by linarith -lemma frac_gt_0_iff [simp]: "frac x > 0 \ x \ Ints" +lemma frac_gt_0_iff [simp]: "frac x > 0 \ x \ \" by (metis frac_eq_0_iff frac_ge_0 le_less less_irrefl) lemma frac_of_int [simp]: "frac (of_int z) = 0" @@ -582,7 +582,7 @@ lemma frac_unique_iff: fixes x :: "'a::floor_ceiling" - shows "(frac x) = a \ x - a \ Ints \ 0 \ a \ a < 1" + shows "(frac x) = a \ x - a \ \ \ 0 \ a \ a < 1" apply (auto simp: Ints_def frac_def) apply linarith apply linarith @@ -593,7 +593,7 @@ lemma frac_neg: fixes x :: "'a::floor_ceiling" - shows "frac (-x) = (if x \ Ints then 0 else 1 - frac x)" + shows "frac (-x) = (if x \ \ then 0 else 1 - frac x)" apply (auto simp add: frac_unique_iff) apply (simp add: frac_def) by (meson frac_lt_1 less_iff_diff_less_0 not_le not_less_iff_gr_or_eq) diff -r aefe89038dd2 -r b72a990adfe2 src/HOL/Int.thy --- a/src/HOL/Int.thy Mon Aug 31 21:01:21 2015 +0200 +++ b/src/HOL/Int.thy Mon Aug 31 21:28:08 2015 +0200 @@ -623,11 +623,8 @@ context ring_1 begin -definition Ints :: "'a set" where - "Ints = range of_int" - -notation (xsymbols) - Ints ("\") +definition Ints :: "'a set" ("\") + where "\ = range of_int" lemma Ints_of_int [simp]: "of_int z \ \" by (simp add: Ints_def) @@ -687,7 +684,7 @@ text \The premise involving @{term Ints} prevents @{term "a = 1/2"}.\ lemma Ints_double_eq_0_iff: - assumes in_Ints: "a \ Ints" + assumes in_Ints: "a \ \" shows "(a + a = 0) = (a = (0::'a::ring_char_0))" proof - from in_Ints have "a \ range of_int" unfolding Ints_def [symmetric] . @@ -706,7 +703,7 @@ qed lemma Ints_odd_nonzero: - assumes in_Ints: "a \ Ints" + assumes in_Ints: "a \ \" shows "1 + a + a \ (0::'a::ring_char_0)" proof - from in_Ints have "a \ range of_int" unfolding Ints_def [symmetric] . @@ -720,11 +717,11 @@ qed qed -lemma Nats_numeral [simp]: "numeral w \ Nats" +lemma Nats_numeral [simp]: "numeral w \ \" using of_nat_in_Nats [of "numeral w"] by simp lemma Ints_odd_less_0: - assumes in_Ints: "a \ Ints" + assumes in_Ints: "a \ \" shows "(1 + a + a < 0) = (a < (0::'a::linordered_idom))" proof - from in_Ints have "a \ range of_int" unfolding Ints_def [symmetric] . diff -r aefe89038dd2 -r b72a990adfe2 src/HOL/Library/Convex.thy --- a/src/HOL/Library/Convex.thy Mon Aug 31 21:01:21 2015 +0200 +++ b/src/HOL/Library/Convex.thy Mon Aug 31 21:28:08 2015 +0200 @@ -137,7 +137,7 @@ by (simp only: convex_Int 3 4) qed -lemma convex_Reals: "convex Reals" +lemma convex_Reals: "convex \" by (simp add: convex_def scaleR_conv_of_real) diff -r aefe89038dd2 -r b72a990adfe2 src/HOL/Multivariate_Analysis/Complex_Analysis_Basics.thy --- a/src/HOL/Multivariate_Analysis/Complex_Analysis_Basics.thy Mon Aug 31 21:01:21 2015 +0200 +++ b/src/HOL/Multivariate_Analysis/Complex_Analysis_Basics.thy Mon Aug 31 21:28:08 2015 +0200 @@ -242,9 +242,9 @@ by (intro open_Collect_less closed_Collect_le closed_Collect_eq isCont_Re isCont_Im continuous_ident continuous_const)+ -lemma closed_complex_Reals: "closed (Reals :: complex set)" +lemma closed_complex_Reals: "closed (\ :: complex set)" proof - - have "(Reals :: complex set) = {z. Im z = 0}" + have "(\ :: complex set) = {z. Im z = 0}" by (auto simp: complex_is_Real_iff) then show ?thesis by (metis closed_halfspace_Im_eq) diff -r aefe89038dd2 -r b72a990adfe2 src/HOL/Multivariate_Analysis/Complex_Transcendental.thy --- a/src/HOL/Multivariate_Analysis/Complex_Transcendental.thy Mon Aug 31 21:01:21 2015 +0200 +++ b/src/HOL/Multivariate_Analysis/Complex_Transcendental.thy Mon Aug 31 21:28:08 2015 +0200 @@ -211,7 +211,7 @@ by (auto simp: exp_eq abs_mult) lemma exp_integer_2pi: - assumes "n \ Ints" + assumes "n \ \" shows "exp((2 * n * pi) * ii) = 1" proof - have "exp((2 * n * pi) * ii) = exp 0" @@ -751,15 +751,15 @@ by blast qed -lemma Arg_eq_0: "Arg z = 0 \ z \ Reals \ 0 \ Re z" +lemma Arg_eq_0: "Arg z = 0 \ z \ \ \ 0 \ Re z" proof (cases "z=0") case True then show ?thesis by simp next case False - have "z \ Reals \ 0 \ Re z \ z \ Reals \ 0 \ Re (of_real (cmod z) * exp (\ * complex_of_real (Arg z)))" + have "z \ \ \ 0 \ Re z \ z \ \ \ 0 \ Re (of_real (cmod z) * exp (\ * complex_of_real (Arg z)))" by (metis Arg_eq) - also have "... \ z \ Reals \ 0 \ Re (exp (\ * complex_of_real (Arg z)))" + also have "... \ z \ \ \ 0 \ Re (exp (\ * complex_of_real (Arg z)))" using False by (simp add: zero_le_mult_iff) also have "... \ Arg z = 0" @@ -955,7 +955,7 @@ corollary Im_Ln_of_real [simp]: "r > 0 \ Im (ln (of_real r)) = 0" by (simp add: Ln_of_real) -lemma cmod_Ln_Reals [simp]: "z \ Reals \ 0 < Re z \ cmod (ln z) = norm (ln (Re z))" +lemma cmod_Ln_Reals [simp]: "z \ \ \ 0 < Re z \ cmod (ln z) = norm (ln (Re z))" using Ln_of_real by force lemma Ln_1: "ln 1 = (0::complex)" @@ -1565,10 +1565,10 @@ using lim_Ln_over_power [of 1] by simp -lemma Ln_Reals_eq: "x \ Reals \ Re x > 0 \ Ln x = of_real (ln (Re x))" +lemma Ln_Reals_eq: "x \ \ \ Re x > 0 \ Ln x = of_real (ln (Re x))" using Ln_of_real by force -lemma powr_Reals_eq: "x \ Reals \ Re x > 0 \ x powr complex_of_real y = of_real (x powr y)" +lemma powr_Reals_eq: "x \ \ \ Re x > 0 \ x powr complex_of_real y = of_real (x powr y)" by (simp add: powr_of_real) lemma lim_ln_over_power: diff -r aefe89038dd2 -r b72a990adfe2 src/HOL/NSA/HyperDef.thy --- a/src/HOL/NSA/HyperDef.thy Mon Aug 31 21:01:21 2015 +0200 +++ b/src/HOL/NSA/HyperDef.thy Mon Aug 31 21:28:08 2015 +0200 @@ -103,7 +103,7 @@ by transfer simp qed -lemma Reals_eq_Standard: "(Reals :: hypreal set) = Standard" +lemma Reals_eq_Standard: "(\ :: hypreal set) = Standard" by (simp add: Reals_def Standard_def) @@ -539,7 +539,7 @@ by transfer (rule refl) lemma hyperpow_SReal [simp]: - "(hypreal_of_real r) pow (hypnat_of_nat n) \ Reals" + "(hypreal_of_real r) pow (hypnat_of_nat n) \ \" by (simp add: Reals_eq_Standard) lemma hyperpow_zero_HNatInfinite [simp]: diff -r aefe89038dd2 -r b72a990adfe2 src/HOL/NSA/NSA.thy --- a/src/HOL/NSA/NSA.thy Mon Aug 31 21:01:21 2015 +0200 +++ b/src/HOL/NSA/NSA.thy Mon Aug 31 21:28:08 2015 +0200 @@ -33,7 +33,7 @@ definition st :: "hypreal => hypreal" where --{*the standard part of a hyperreal*} - "st = (%x. @r. x \ HFinite & r \ Reals & r @= x)" + "st = (%x. @r. x \ HFinite & r \ \ & r @= x)" definition monad :: "'a::real_normed_vector star => 'a star set" where @@ -49,7 +49,7 @@ notation (HTML output) approx (infixl "\" 50) -lemma SReal_def: "Reals == {x. \r. x = hypreal_of_real r}" +lemma SReal_def: "\ == {x. \r. x = hypreal_of_real r}" by (simp add: Reals_def image_def) subsection {* Nonstandard Extension of the Norm Function *} @@ -176,54 +176,54 @@ subsection{*Closure Laws for the Standard Reals*} -lemma Reals_minus_iff [simp]: "(-x \ Reals) = (x \ Reals)" +lemma Reals_minus_iff [simp]: "(-x \ \) = (x \ \)" apply auto apply (drule Reals_minus, auto) done -lemma Reals_add_cancel: "\x + y \ Reals; y \ Reals\ \ x \ Reals" +lemma Reals_add_cancel: "\x + y \ \; y \ \\ \ x \ \" by (drule (1) Reals_diff, simp) -lemma SReal_hrabs: "(x::hypreal) \ Reals ==> abs x \ Reals" +lemma SReal_hrabs: "(x::hypreal) \ \ ==> abs x \ \" by (simp add: Reals_eq_Standard) -lemma SReal_hypreal_of_real [simp]: "hypreal_of_real x \ Reals" +lemma SReal_hypreal_of_real [simp]: "hypreal_of_real x \ \" by (simp add: Reals_eq_Standard) -lemma SReal_divide_numeral: "r \ Reals ==> r/(numeral w::hypreal) \ Reals" +lemma SReal_divide_numeral: "r \ \ ==> r/(numeral w::hypreal) \ \" by simp text{*epsilon is not in Reals because it is an infinitesimal*} -lemma SReal_epsilon_not_mem: "epsilon \ Reals" +lemma SReal_epsilon_not_mem: "epsilon \ \" apply (simp add: SReal_def) apply (auto simp add: hypreal_of_real_not_eq_epsilon [THEN not_sym]) done -lemma SReal_omega_not_mem: "omega \ Reals" +lemma SReal_omega_not_mem: "omega \ \" apply (simp add: SReal_def) apply (auto simp add: hypreal_of_real_not_eq_omega [THEN not_sym]) done -lemma SReal_UNIV_real: "{x. hypreal_of_real x \ Reals} = (UNIV::real set)" +lemma SReal_UNIV_real: "{x. hypreal_of_real x \ \} = (UNIV::real set)" by simp -lemma SReal_iff: "(x \ Reals) = (\y. x = hypreal_of_real y)" +lemma SReal_iff: "(x \ \) = (\y. x = hypreal_of_real y)" by (simp add: SReal_def) -lemma hypreal_of_real_image: "hypreal_of_real `(UNIV::real set) = Reals" +lemma hypreal_of_real_image: "hypreal_of_real `(UNIV::real set) = \" by (simp add: Reals_eq_Standard Standard_def) -lemma inv_hypreal_of_real_image: "inv hypreal_of_real ` Reals = UNIV" +lemma inv_hypreal_of_real_image: "inv hypreal_of_real ` \ = UNIV" apply (auto simp add: SReal_def) apply (rule inj_star_of [THEN inv_f_f, THEN subst], blast) done lemma SReal_hypreal_of_real_image: - "[| \x. x: P; P \ Reals |] ==> \Q. P = hypreal_of_real ` Q" + "[| \x. x: P; P \ \ |] ==> \Q. P = hypreal_of_real ` Q" by (simp add: SReal_def image_def, blast) lemma SReal_dense: - "[| (x::hypreal) \ Reals; y \ Reals; x \r \ Reals. x \; y \ \; x \r \ Reals. x Reals ==> ((\x \ P. y < x) = + "P \ \ ==> ((\x \ P. y < x) = (\X. hypreal_of_real X \ P & y < hypreal_of_real X))" by (blast dest!: SReal_iff [THEN iffD1]) lemma SReal_sup_lemma2: - "[| P \ Reals; \x. x \ P; \y \ Reals. \x \ P. x < y |] + "[| P \ \; \x. x \ P; \y \ Reals. \x \ P. x < y |] ==> (\X. X \ {w. hypreal_of_real w \ P}) & (\Y. \X \ {w. hypreal_of_real w \ P}. X < Y)" apply (rule conjI) @@ -277,7 +277,7 @@ apply (blast intro: Reals_add SReal_hypreal_of_real Reals_1) done -lemma SReal_subset_HFinite: "(Reals::hypreal set) \ HFinite" +lemma SReal_subset_HFinite: "(\::hypreal set) \ HFinite" by (auto simp add: SReal_def) lemma HFiniteD: "x \ HFinite ==> \t \ Reals. hnorm x < t" @@ -850,29 +850,29 @@ by (blast intro!: approx_mult_HFinite approx_star_of_HFinite HFinite_star_of) lemma approx_SReal_mult_cancel_zero: - "[| (a::hypreal) \ Reals; a \ 0; a*x @= 0 |] ==> x @= 0" + "[| (a::hypreal) \ \; a \ 0; a*x @= 0 |] ==> x @= 0" apply (drule Reals_inverse [THEN SReal_subset_HFinite [THEN subsetD]]) apply (auto dest: approx_mult2 simp add: mult.assoc [symmetric]) done -lemma approx_mult_SReal1: "[| (a::hypreal) \ Reals; x @= 0 |] ==> x*a @= 0" +lemma approx_mult_SReal1: "[| (a::hypreal) \ \; x @= 0 |] ==> x*a @= 0" by (auto dest: SReal_subset_HFinite [THEN subsetD] approx_mult1) -lemma approx_mult_SReal2: "[| (a::hypreal) \ Reals; x @= 0 |] ==> a*x @= 0" +lemma approx_mult_SReal2: "[| (a::hypreal) \ \; x @= 0 |] ==> a*x @= 0" by (auto dest: SReal_subset_HFinite [THEN subsetD] approx_mult2) lemma approx_mult_SReal_zero_cancel_iff [simp]: - "[|(a::hypreal) \ Reals; a \ 0 |] ==> (a*x @= 0) = (x @= 0)" + "[|(a::hypreal) \ \; a \ 0 |] ==> (a*x @= 0) = (x @= 0)" by (blast intro: approx_SReal_mult_cancel_zero approx_mult_SReal2) lemma approx_SReal_mult_cancel: - "[| (a::hypreal) \ Reals; a \ 0; a* w @= a*z |] ==> w @= z" + "[| (a::hypreal) \ \; a \ 0; a* w @= a*z |] ==> w @= z" apply (drule Reals_inverse [THEN SReal_subset_HFinite [THEN subsetD]]) apply (auto dest: approx_mult2 simp add: mult.assoc [symmetric]) done lemma approx_SReal_mult_cancel_iff1 [simp]: - "[| (a::hypreal) \ Reals; a \ 0|] ==> (a* w @= a*z) = (w @= z)" + "[| (a::hypreal) \ \; a \ 0|] ==> (a* w @= a*z) = (w @= z)" by (auto intro!: approx_mult2 SReal_subset_HFinite [THEN subsetD] intro: approx_SReal_mult_cancel) @@ -907,7 +907,7 @@ subsection{* Zero is the Only Infinitesimal that is also a Real*} lemma Infinitesimal_less_SReal: - "[| (x::hypreal) \ Reals; y \ Infinitesimal; 0 < x |] ==> y < x" + "[| (x::hypreal) \ \; y \ Infinitesimal; 0 < x |] ==> y < x" apply (simp add: Infinitesimal_def) apply (rule abs_ge_self [THEN order_le_less_trans], auto) done @@ -917,29 +917,29 @@ by (blast intro: Infinitesimal_less_SReal) lemma SReal_not_Infinitesimal: - "[| 0 < y; (y::hypreal) \ Reals|] ==> y \ Infinitesimal" + "[| 0 < y; (y::hypreal) \ \|] ==> y \ Infinitesimal" apply (simp add: Infinitesimal_def) apply (auto simp add: abs_if) done lemma SReal_minus_not_Infinitesimal: - "[| y < 0; (y::hypreal) \ Reals |] ==> y \ Infinitesimal" + "[| y < 0; (y::hypreal) \ \ |] ==> y \ Infinitesimal" apply (subst Infinitesimal_minus_iff [symmetric]) apply (rule SReal_not_Infinitesimal, auto) done -lemma SReal_Int_Infinitesimal_zero: "Reals Int Infinitesimal = {0::hypreal}" +lemma SReal_Int_Infinitesimal_zero: "\ Int Infinitesimal = {0::hypreal}" apply auto apply (cut_tac x = x and y = 0 in linorder_less_linear) apply (blast dest: SReal_not_Infinitesimal SReal_minus_not_Infinitesimal) done lemma SReal_Infinitesimal_zero: - "[| (x::hypreal) \ Reals; x \ Infinitesimal|] ==> x = 0" + "[| (x::hypreal) \ \; x \ Infinitesimal|] ==> x = 0" by (cut_tac SReal_Int_Infinitesimal_zero, blast) lemma SReal_HFinite_diff_Infinitesimal: - "[| (x::hypreal) \ Reals; x \ 0 |] ==> x \ HFinite - Infinitesimal" + "[| (x::hypreal) \ \; x \ 0 |] ==> x \ HFinite - Infinitesimal" by (auto dest: SReal_Infinitesimal_zero SReal_subset_HFinite [THEN subsetD]) lemma hypreal_of_real_HFinite_diff_Infinitesimal: @@ -971,7 +971,7 @@ done lemma approx_SReal_not_zero: - "[| (y::hypreal) \ Reals; x @= y; y\ 0 |] ==> x \ 0" + "[| (y::hypreal) \ \; x @= y; y\ 0 |] ==> x \ 0" apply (cut_tac x = 0 and y = y in linorder_less_linear, simp) apply (blast dest: approx_sym [THEN mem_infmal_iff [THEN iffD2]] SReal_not_Infinitesimal SReal_minus_not_Infinitesimal) done @@ -996,7 +996,7 @@ done lemma Infinitesimal_SReal_divide: - "[| (x::hypreal) \ Infinitesimal; y \ Reals |] ==> x/y \ Infinitesimal" + "[| (x::hypreal) \ Infinitesimal; y \ \ |] ==> x/y \ Infinitesimal" apply (simp add: divide_inverse) apply (auto intro!: Infinitesimal_HFinite_mult dest!: Reals_inverse [THEN SReal_subset_HFinite [THEN subsetD]]) @@ -1018,7 +1018,7 @@ done lemma SReal_approx_iff: - "[|(x::hypreal) \ Reals; y \ Reals|] ==> (x @= y) = (x = y)" + "[|(x::hypreal) \ \; y \ \|] ==> (x @= y) = (x = y)" apply auto apply (simp add: approx_def) apply (drule (1) Reals_diff) @@ -1060,7 +1060,7 @@ by (simp_all add: star_of_approx_iff [symmetric]) lemma approx_unique_real: - "[| (r::hypreal) \ Reals; s \ Reals; r @= x; s @= x|] ==> r = s" + "[| (r::hypreal) \ \; s \ \; r @= x; s @= x|] ==> r = s" by (blast intro: SReal_approx_iff [THEN iffD1] approx_trans2) @@ -1069,12 +1069,12 @@ subsubsection{*Lifting of the Ub and Lub Properties*} lemma hypreal_of_real_isUb_iff: - "(isUb (Reals) (hypreal_of_real ` Q) (hypreal_of_real Y)) = + "(isUb \ (hypreal_of_real ` Q) (hypreal_of_real Y)) = (isUb (UNIV :: real set) Q Y)" by (simp add: isUb_def setle_def) lemma hypreal_of_real_isLub1: - "isLub Reals (hypreal_of_real ` Q) (hypreal_of_real Y) + "isLub \ (hypreal_of_real ` Q) (hypreal_of_real Y) ==> isLub (UNIV :: real set) Q Y" apply (simp add: isLub_def leastP_def) apply (auto intro: hypreal_of_real_isUb_iff [THEN iffD2] @@ -1083,30 +1083,30 @@ lemma hypreal_of_real_isLub2: "isLub (UNIV :: real set) Q Y - ==> isLub Reals (hypreal_of_real ` Q) (hypreal_of_real Y)" + ==> isLub \ (hypreal_of_real ` Q) (hypreal_of_real Y)" apply (auto simp add: isLub_def leastP_def hypreal_of_real_isUb_iff setge_def) by (metis SReal_iff hypreal_of_real_isUb_iff isUbD2a star_of_le) lemma hypreal_of_real_isLub_iff: - "(isLub Reals (hypreal_of_real ` Q) (hypreal_of_real Y)) = + "(isLub \ (hypreal_of_real ` Q) (hypreal_of_real Y)) = (isLub (UNIV :: real set) Q Y)" by (blast intro: hypreal_of_real_isLub1 hypreal_of_real_isLub2) lemma lemma_isUb_hypreal_of_real: - "isUb Reals P Y ==> \Yo. isUb Reals P (hypreal_of_real Yo)" + "isUb \ P Y ==> \Yo. isUb \ P (hypreal_of_real Yo)" by (auto simp add: SReal_iff isUb_def) lemma lemma_isLub_hypreal_of_real: - "isLub Reals P Y ==> \Yo. isLub Reals P (hypreal_of_real Yo)" + "isLub \ P Y ==> \Yo. isLub \ P (hypreal_of_real Yo)" by (auto simp add: isLub_def leastP_def isUb_def SReal_iff) lemma lemma_isLub_hypreal_of_real2: - "\Yo. isLub Reals P (hypreal_of_real Yo) ==> \Y. isLub Reals P Y" + "\Yo. isLub \ P (hypreal_of_real Yo) ==> \Y. isLub \ P Y" by (auto simp add: isLub_def leastP_def isUb_def) lemma SReal_complete: - "[| P \ Reals; \x. x \ P; \Y. isUb Reals P Y |] - ==> \t::hypreal. isLub Reals P t" + "[| P \ \; \x. x \ P; \Y. isUb \ P Y |] + ==> \t::hypreal. isLub \ P t" apply (frule SReal_hypreal_of_real_image) apply (auto, drule lemma_isUb_hypreal_of_real) apply (auto intro!: reals_complete lemma_isLub_hypreal_of_real2 @@ -1116,14 +1116,14 @@ (* lemma about lubs *) lemma lemma_st_part_ub: - "(x::hypreal) \ HFinite ==> \u. isUb Reals {s. s \ Reals & s < x} u" + "(x::hypreal) \ HFinite ==> \u. isUb \ {s. s \ \ & s < x} u" apply (drule HFiniteD, safe) apply (rule exI, rule isUbI) apply (auto intro: setleI isUbI simp add: abs_less_iff) done lemma lemma_st_part_nonempty: - "(x::hypreal) \ HFinite ==> \y. y \ {s. s \ Reals & s < x}" + "(x::hypreal) \ HFinite ==> \y. y \ {s. s \ \ & s < x}" apply (drule HFiniteD, safe) apply (drule Reals_minus) apply (rule_tac x = "-t" in exI) @@ -1131,12 +1131,12 @@ done lemma lemma_st_part_lub: - "(x::hypreal) \ HFinite ==> \t. isLub Reals {s. s \ Reals & s < x} t" + "(x::hypreal) \ HFinite ==> \t. isLub \ {s. s \ \ & s < x} t" by (blast intro!: SReal_complete lemma_st_part_ub lemma_st_part_nonempty Collect_restrict) lemma lemma_st_part_le1: - "[| (x::hypreal) \ HFinite; isLub Reals {s. s \ Reals & s < x} t; - r \ Reals; 0 < r |] ==> x \ t + r" + "[| (x::hypreal) \ HFinite; isLub \ {s. s \ \ & s < x} t; + r \ \; 0 < r |] ==> x \ t + r" apply (frule isLubD1a) apply (rule ccontr, drule linorder_not_le [THEN iffD2]) apply (drule (1) Reals_add) @@ -1156,8 +1156,8 @@ done lemma lemma_st_part_gt_ub: - "[| (x::hypreal) \ HFinite; x < y; y \ Reals |] - ==> isUb Reals {s. s \ Reals & s < x} y" + "[| (x::hypreal) \ HFinite; x < y; y \ \ |] + ==> isUb \ {s. s \ \ & s < x} y" by (auto dest: order_less_trans intro: order_less_imp_le intro!: isUbI setleI) lemma lemma_minus_le_zero: "t \ t + -r ==> r \ (0::hypreal)" @@ -1167,8 +1167,8 @@ lemma lemma_st_part_le2: "[| (x::hypreal) \ HFinite; - isLub Reals {s. s \ Reals & s < x} t; - r \ Reals; 0 < r |] + isLub \ {s. s \ \ & s < x} t; + r \ \; 0 < r |] ==> t + -r \ x" apply (frule isLubD1a) apply (rule ccontr, drule linorder_not_le [THEN iffD1]) @@ -1181,8 +1181,8 @@ lemma lemma_st_part1a: "[| (x::hypreal) \ HFinite; - isLub Reals {s. s \ Reals & s < x} t; - r \ Reals; 0 < r |] + isLub \ {s. s \ \ & s < x} t; + r \ \; 0 < r |] ==> x + -t \ r" apply (subgoal_tac "x \ t+r") apply (auto intro: lemma_st_part_le1) @@ -1190,8 +1190,8 @@ lemma lemma_st_part2a: "[| (x::hypreal) \ HFinite; - isLub Reals {s. s \ Reals & s < x} t; - r \ Reals; 0 < r |] + isLub \ {s. s \ \ & s < x} t; + r \ \; 0 < r |] ==> -(x + -t) \ r" apply (subgoal_tac "(t + -r \ x)") apply simp @@ -1200,11 +1200,11 @@ done lemma lemma_SReal_ub: - "(x::hypreal) \ Reals ==> isUb Reals {s. s \ Reals & s < x} x" + "(x::hypreal) \ \ ==> isUb \ {s. s \ \ & s < x} x" by (auto intro: isUbI setleI order_less_imp_le) lemma lemma_SReal_lub: - "(x::hypreal) \ Reals ==> isLub Reals {s. s \ Reals & s < x} x" + "(x::hypreal) \ \ ==> isLub \ {s. s \ \ & s < x} x" apply (auto intro!: isLubI2 lemma_SReal_ub setgeI) apply (frule isUbD2a) apply (rule_tac x = x and y = y in linorder_cases) @@ -1216,8 +1216,8 @@ lemma lemma_st_part_not_eq1: "[| (x::hypreal) \ HFinite; - isLub Reals {s. s \ Reals & s < x} t; - r \ Reals; 0 < r |] + isLub \ {s. s \ \ & s < x} t; + r \ \; 0 < r |] ==> x + -t \ r" apply auto apply (frule isLubD1a [THEN Reals_minus]) @@ -1228,8 +1228,8 @@ lemma lemma_st_part_not_eq2: "[| (x::hypreal) \ HFinite; - isLub Reals {s. s \ Reals & s < x} t; - r \ Reals; 0 < r |] + isLub \ {s. s \ \ & s < x} t; + r \ \; 0 < r |] ==> -(x + -t) \ r" apply (auto) apply (frule isLubD1a) @@ -1240,8 +1240,8 @@ lemma lemma_st_part_major: "[| (x::hypreal) \ HFinite; - isLub Reals {s. s \ Reals & s < x} t; - r \ Reals; 0 < r |] + isLub \ {s. s \ \ & s < x} t; + r \ \; 0 < r |] ==> abs (x - t) < r" apply (frule lemma_st_part1a) apply (frule_tac [4] lemma_st_part2a, auto) @@ -1250,7 +1250,7 @@ done lemma lemma_st_part_major2: - "[| (x::hypreal) \ HFinite; isLub Reals {s. s \ Reals & s < x} t |] + "[| (x::hypreal) \ HFinite; isLub \ {s. s \ \ & s < x} t |] ==> \r \ Reals. 0 < r --> abs (x - t) < r" by (blast dest!: lemma_st_part_major) @@ -1271,7 +1271,7 @@ done text{*There is a unique real infinitely close*} -lemma st_part_Ex1: "x \ HFinite ==> EX! t::hypreal. t \ Reals & x @= t" +lemma st_part_Ex1: "x \ HFinite ==> EX! t::hypreal. t \ \ & x @= t" apply (drule st_part_Ex, safe) apply (drule_tac [2] approx_sym, drule_tac [2] approx_sym, drule_tac [2] approx_sym) apply (auto intro!: approx_unique_real) @@ -1471,7 +1471,7 @@ done lemma HInfinite_gt_SReal: - "[| (x::hypreal) \ HInfinite; 0 < x; y \ Reals |] ==> y < x" + "[| (x::hypreal) \ HInfinite; 0 < x; y \ \ |] ==> y < x" by (auto dest!: bspec simp add: HInfinite_def abs_if order_less_imp_le) lemma HInfinite_gt_zero_gt_one: @@ -1762,7 +1762,7 @@ apply (auto intro: approx_sym) done -lemma st_SReal: "x \ HFinite ==> st x \ Reals" +lemma st_SReal: "x \ HFinite ==> st x \ \" apply (simp add: st_def) apply (frule st_part_Ex, safe) apply (rule someI2) @@ -1780,7 +1780,7 @@ apply (auto intro: approx_unique_real) done -lemma st_SReal_eq: "x \ Reals ==> st x = x" +lemma st_SReal_eq: "x \ \ ==> st x = x" by (metis approx_refl st_unique) lemma st_hypreal_of_real [simp]: "st (hypreal_of_real x) = hypreal_of_real x" @@ -1793,7 +1793,7 @@ assumes x: "x \ HFinite" and y: "y \ HFinite" and xy: "x @= y" shows "st x = st y" proof - - have "st x @= x" "st y @= y" "st x \ Reals" "st y \ Reals" + have "st x @= x" "st y @= y" "st x \ \" "st y \ \" by (simp_all add: st_approx_self st_SReal x y) with xy show ?thesis by (fast elim: approx_trans approx_trans2 SReal_approx_iff [THEN iffD1]) @@ -1805,13 +1805,13 @@ by (blast intro: approx_st_eq st_eq_approx) lemma st_Infinitesimal_add_SReal: - "[| x \ Reals; e \ Infinitesimal |] ==> st(x + e) = x" + "[| x \ \; e \ Infinitesimal |] ==> st(x + e) = x" apply (erule st_unique) apply (erule Infinitesimal_add_approx_self) done lemma st_Infinitesimal_add_SReal2: - "[| x \ Reals; e \ Infinitesimal |] ==> st(e + x) = x" + "[| x \ \; e \ Infinitesimal |] ==> st(e + x) = x" apply (erule st_unique) apply (erule Infinitesimal_add_approx_self2) done diff -r aefe89038dd2 -r b72a990adfe2 src/HOL/NSA/NSCA.thy --- a/src/HOL/NSA/NSCA.thy Mon Aug 31 21:01:21 2015 +0200 +++ b/src/HOL/NSA/NSCA.thy Mon Aug 31 21:28:08 2015 +0200 @@ -29,13 +29,13 @@ by (drule (1) Standard_diff, simp) lemma SReal_hcmod_hcomplex_of_complex [simp]: - "hcmod (hcomplex_of_complex r) \ Reals" + "hcmod (hcomplex_of_complex r) \ \" by (simp add: Reals_eq_Standard) -lemma SReal_hcmod_numeral [simp]: "hcmod (numeral w ::hcomplex) \ Reals" +lemma SReal_hcmod_numeral [simp]: "hcmod (numeral w ::hcomplex) \ \" by (simp add: Reals_eq_Standard) -lemma SReal_hcmod_SComplex: "x \ SComplex ==> hcmod x \ Reals" +lemma SReal_hcmod_SComplex: "x \ SComplex ==> hcmod x \ \" by (simp add: Reals_eq_Standard) lemma SComplex_divide_numeral: @@ -482,7 +482,7 @@ by (simp add: hcomplex_HFinite_iff) lemma SComplex_SReal_hcomplex_of_hypreal: - "x \ Reals ==> hcomplex_of_hypreal x \ SComplex" + "x \ \ ==> hcomplex_of_hypreal x \ SComplex" apply (rule Standard_of_hypreal) apply (simp add: Reals_eq_Standard) done diff -r aefe89038dd2 -r b72a990adfe2 src/HOL/NSA/Star.thy --- a/src/HOL/NSA/Star.thy Mon Aug 31 21:01:21 2015 +0200 +++ b/src/HOL/NSA/Star.thy Mon Aug 31 21:28:08 2015 +0200 @@ -53,7 +53,7 @@ lemma STAR_star_of_image_subset: "star_of ` A <= *s* A" by auto -lemma STAR_hypreal_of_real_Int: "*s* X Int Reals = hypreal_of_real ` X" +lemma STAR_hypreal_of_real_Int: "*s* X Int \ = hypreal_of_real ` X" by (auto simp add: SReal_def) lemma STAR_star_of_Int: "*s* X Int Standard = star_of ` X" diff -r aefe89038dd2 -r b72a990adfe2 src/HOL/Nat.thy --- a/src/HOL/Nat.thy Mon Aug 31 21:01:21 2015 +0200 +++ b/src/HOL/Nat.thy Mon Aug 31 21:28:08 2015 +0200 @@ -1588,11 +1588,8 @@ context semiring_1 begin -definition Nats :: "'a set" where - "Nats = range of_nat" - -notation (xsymbols) - Nats ("\") +definition Nats :: "'a set" ("\") + where "\ = range of_nat" lemma of_nat_in_Nats [simp]: "of_nat n \ \" by (simp add: Nats_def) diff -r aefe89038dd2 -r b72a990adfe2 src/HOL/Rat.thy --- a/src/HOL/Rat.thy Mon Aug 31 21:01:21 2015 +0200 +++ b/src/HOL/Rat.thy Mon Aug 31 21:28:08 2015 +0200 @@ -808,58 +808,54 @@ context field_char_0 begin -definition - Rats :: "'a set" where - "Rats = range of_rat" - -notation (xsymbols) - Rats ("\") +definition Rats :: "'a set" ("\") + where "\ = range of_rat" end -lemma Rats_of_rat [simp]: "of_rat r \ Rats" +lemma Rats_of_rat [simp]: "of_rat r \ \" by (simp add: Rats_def) -lemma Rats_of_int [simp]: "of_int z \ Rats" +lemma Rats_of_int [simp]: "of_int z \ \" by (subst of_rat_of_int_eq [symmetric], rule Rats_of_rat) -lemma Rats_of_nat [simp]: "of_nat n \ Rats" +lemma Rats_of_nat [simp]: "of_nat n \ \" by (subst of_rat_of_nat_eq [symmetric], rule Rats_of_rat) -lemma Rats_number_of [simp]: "numeral w \ Rats" +lemma Rats_number_of [simp]: "numeral w \ \" by (subst of_rat_numeral_eq [symmetric], rule Rats_of_rat) -lemma Rats_0 [simp]: "0 \ Rats" +lemma Rats_0 [simp]: "0 \ \" apply (unfold Rats_def) apply (rule range_eqI) apply (rule of_rat_0 [symmetric]) done -lemma Rats_1 [simp]: "1 \ Rats" +lemma Rats_1 [simp]: "1 \ \" apply (unfold Rats_def) apply (rule range_eqI) apply (rule of_rat_1 [symmetric]) done -lemma Rats_add [simp]: "\a \ Rats; b \ Rats\ \ a + b \ Rats" +lemma Rats_add [simp]: "\a \ \; b \ \\ \ a + b \ \" apply (auto simp add: Rats_def) apply (rule range_eqI) apply (rule of_rat_add [symmetric]) done -lemma Rats_minus [simp]: "a \ Rats \ - a \ Rats" +lemma Rats_minus [simp]: "a \ \ \ - a \ \" apply (auto simp add: Rats_def) apply (rule range_eqI) apply (rule of_rat_minus [symmetric]) done -lemma Rats_diff [simp]: "\a \ Rats; b \ Rats\ \ a - b \ Rats" +lemma Rats_diff [simp]: "\a \ \; b \ \\ \ a - b \ \" apply (auto simp add: Rats_def) apply (rule range_eqI) apply (rule of_rat_diff [symmetric]) done -lemma Rats_mult [simp]: "\a \ Rats; b \ Rats\ \ a * b \ Rats" +lemma Rats_mult [simp]: "\a \ \; b \ \\ \ a * b \ \" apply (auto simp add: Rats_def) apply (rule range_eqI) apply (rule of_rat_mult [symmetric]) @@ -867,7 +863,7 @@ lemma nonzero_Rats_inverse: fixes a :: "'a::field_char_0" - shows "\a \ Rats; a \ 0\ \ inverse a \ Rats" + shows "\a \ \; a \ 0\ \ inverse a \ \" apply (auto simp add: Rats_def) apply (rule range_eqI) apply (erule nonzero_of_rat_inverse [symmetric]) @@ -875,7 +871,7 @@ lemma Rats_inverse [simp]: fixes a :: "'a::{field_char_0, field}" - shows "a \ Rats \ inverse a \ Rats" + shows "a \ \ \ inverse a \ \" apply (auto simp add: Rats_def) apply (rule range_eqI) apply (rule of_rat_inverse [symmetric]) @@ -883,7 +879,7 @@ lemma nonzero_Rats_divide: fixes a b :: "'a::field_char_0" - shows "\a \ Rats; b \ Rats; b \ 0\ \ a / b \ Rats" + shows "\a \ \; b \ \; b \ 0\ \ a / b \ \" apply (auto simp add: Rats_def) apply (rule range_eqI) apply (erule nonzero_of_rat_divide [symmetric]) @@ -891,7 +887,7 @@ lemma Rats_divide [simp]: fixes a b :: "'a::{field_char_0, field}" - shows "\a \ Rats; b \ Rats\ \ a / b \ Rats" + shows "\a \ \; b \ \\ \ a / b \ \" apply (auto simp add: Rats_def) apply (rule range_eqI) apply (rule of_rat_divide [symmetric]) @@ -899,7 +895,7 @@ lemma Rats_power [simp]: fixes a :: "'a::field_char_0" - shows "a \ Rats \ a ^ n \ Rats" + shows "a \ \ \ a ^ n \ \" apply (auto simp add: Rats_def) apply (rule range_eqI) apply (rule of_rat_power [symmetric]) diff -r aefe89038dd2 -r b72a990adfe2 src/HOL/Real.thy --- a/src/HOL/Real.thy Mon Aug 31 21:01:21 2015 +0200 +++ b/src/HOL/Real.thy Mon Aug 31 21:28:08 2015 +0200 @@ -1163,7 +1163,7 @@ lemma real_of_int_div4: "real (n div x) <= real (n::int) / real x" by (insert real_of_int_div2 [of n x], simp) -lemma Ints_real_of_int [simp]: "real (x::int) \ Ints" +lemma Ints_real_of_int [simp]: "real (x::int) \ \" unfolding real_of_int_def by (rule Ints_of_int) @@ -1300,10 +1300,10 @@ apply (simp only: real_of_int_of_nat_eq) done -lemma Nats_real_of_nat [simp]: "real (n::nat) \ Nats" +lemma Nats_real_of_nat [simp]: "real (n::nat) \ \" unfolding real_of_nat_def by (rule of_nat_in_Nats) -lemma Ints_real_of_nat [simp]: "real (n::nat) \ Ints" +lemma Ints_real_of_nat [simp]: "real (n::nat) \ \" unfolding real_of_nat_def by (rule Ints_of_nat) subsection \The Archimedean Property of the Reals\ diff -r aefe89038dd2 -r b72a990adfe2 src/HOL/Real_Vector_Spaces.thy --- a/src/HOL/Real_Vector_Spaces.thy Mon Aug 31 21:01:21 2015 +0200 +++ b/src/HOL/Real_Vector_Spaces.thy Mon Aug 31 21:28:08 2015 +0200 @@ -358,55 +358,52 @@ subsection \The Set of Real Numbers\ -definition Reals :: "'a::real_algebra_1 set" where - "Reals = range of_real" +definition Reals :: "'a::real_algebra_1 set" ("\") + where "\ = range of_real" -notation (xsymbols) - Reals ("\") - -lemma Reals_of_real [simp]: "of_real r \ Reals" +lemma Reals_of_real [simp]: "of_real r \ \" by (simp add: Reals_def) -lemma Reals_of_int [simp]: "of_int z \ Reals" +lemma Reals_of_int [simp]: "of_int z \ \" by (subst of_real_of_int_eq [symmetric], rule Reals_of_real) -lemma Reals_of_nat [simp]: "of_nat n \ Reals" +lemma Reals_of_nat [simp]: "of_nat n \ \" by (subst of_real_of_nat_eq [symmetric], rule Reals_of_real) -lemma Reals_numeral [simp]: "numeral w \ Reals" +lemma Reals_numeral [simp]: "numeral w \ \" by (subst of_real_numeral [symmetric], rule Reals_of_real) -lemma Reals_0 [simp]: "0 \ Reals" +lemma Reals_0 [simp]: "0 \ \" apply (unfold Reals_def) apply (rule range_eqI) apply (rule of_real_0 [symmetric]) done -lemma Reals_1 [simp]: "1 \ Reals" +lemma Reals_1 [simp]: "1 \ \" apply (unfold Reals_def) apply (rule range_eqI) apply (rule of_real_1 [symmetric]) done -lemma Reals_add [simp]: "\a \ Reals; b \ Reals\ \ a + b \ Reals" +lemma Reals_add [simp]: "\a \ \; b \ \\ \ a + b \ \" apply (auto simp add: Reals_def) apply (rule range_eqI) apply (rule of_real_add [symmetric]) done -lemma Reals_minus [simp]: "a \ Reals \ - a \ Reals" +lemma Reals_minus [simp]: "a \ \ \ - a \ \" apply (auto simp add: Reals_def) apply (rule range_eqI) apply (rule of_real_minus [symmetric]) done -lemma Reals_diff [simp]: "\a \ Reals; b \ Reals\ \ a - b \ Reals" +lemma Reals_diff [simp]: "\a \ \; b \ \\ \ a - b \ \" apply (auto simp add: Reals_def) apply (rule range_eqI) apply (rule of_real_diff [symmetric]) done -lemma Reals_mult [simp]: "\a \ Reals; b \ Reals\ \ a * b \ Reals" +lemma Reals_mult [simp]: "\a \ \; b \ \\ \ a * b \ \" apply (auto simp add: Reals_def) apply (rule range_eqI) apply (rule of_real_mult [symmetric]) @@ -414,7 +411,7 @@ lemma nonzero_Reals_inverse: fixes a :: "'a::real_div_algebra" - shows "\a \ Reals; a \ 0\ \ inverse a \ Reals" + shows "\a \ \; a \ 0\ \ inverse a \ \" apply (auto simp add: Reals_def) apply (rule range_eqI) apply (erule nonzero_of_real_inverse [symmetric]) @@ -422,7 +419,7 @@ lemma Reals_inverse: fixes a :: "'a::{real_div_algebra, division_ring}" - shows "a \ Reals \ inverse a \ Reals" + shows "a \ \ \ inverse a \ \" apply (auto simp add: Reals_def) apply (rule range_eqI) apply (rule of_real_inverse [symmetric]) @@ -435,7 +432,7 @@ lemma nonzero_Reals_divide: fixes a b :: "'a::real_field" - shows "\a \ Reals; b \ Reals; b \ 0\ \ a / b \ Reals" + shows "\a \ \; b \ \; b \ 0\ \ a / b \ \" apply (auto simp add: Reals_def) apply (rule range_eqI) apply (erule nonzero_of_real_divide [symmetric]) @@ -443,7 +440,7 @@ lemma Reals_divide [simp]: fixes a b :: "'a::{real_field, field}" - shows "\a \ Reals; b \ Reals\ \ a / b \ Reals" + shows "\a \ \; b \ \\ \ a / b \ \" apply (auto simp add: Reals_def) apply (rule range_eqI) apply (rule of_real_divide [symmetric]) @@ -451,7 +448,7 @@ lemma Reals_power [simp]: fixes a :: "'a::{real_algebra_1}" - shows "a \ Reals \ a ^ n \ Reals" + shows "a \ \ \ a ^ n \ \" apply (auto simp add: Reals_def) apply (rule range_eqI) apply (rule of_real_power [symmetric]) diff -r aefe89038dd2 -r b72a990adfe2 src/HOL/Transcendental.thy --- a/src/HOL/Transcendental.thy Mon Aug 31 21:01:21 2015 +0200 +++ b/src/HOL/Transcendental.thy Mon Aug 31 21:28:08 2015 +0200 @@ -3759,7 +3759,7 @@ using sin_cos_squared_add [of x, unfolded assms] by simp -lemma sin_times_pi_eq_0: "sin(x * pi) = 0 \ x \ Ints" +lemma sin_times_pi_eq_0: "sin(x * pi) = 0 \ x \ \" by (simp add: sin_zero_iff_int2) (metis Ints_cases Ints_real_of_int real_of_int_def) lemma cos_one_2pi: @@ -3875,10 +3875,10 @@ lemma sin_30: "sin (pi / 6) = 1 / 2" by (simp add: sin_cos_eq cos_60) -lemma cos_integer_2pi: "n \ Ints \ cos(2*pi * n) = 1" +lemma cos_integer_2pi: "n \ \ \ cos(2*pi * n) = 1" by (metis Ints_cases cos_one_2pi_int mult.assoc mult.commute real_of_int_def) -lemma sin_integer_2pi: "n \ Ints \ sin(2*pi * n) = 0" +lemma sin_integer_2pi: "n \ \ \ sin(2*pi * n) = 0" by (metis sin_two_pi Ints_mult mult.assoc mult.commute sin_times_pi_eq_0) lemma cos_int_2npi [simp]: "cos (2 * real (n::int) * pi) = 1"