lemma hypreal_sqrt_gt_zero: "\x. 0 < x \ 0 < ( *f* sqrt)(x)" by transfer (simp add: real_sqrt_gt_zero)
lemma hypreal_sqrt_ge_zero: "0 \ x \ 0 \ ( *f* sqrt)(x)" by (auto intro: hypreal_sqrt_gt_zero simp add: order_le_less)
lemma hypreal_sqrt_lessI: "\x u. \0 < u; x < u\<^sup>2\ \ ( *f* sqrt) x < u" proof transfer show"\x u. \0 < u; x < u\<^sup>2\ \ sqrt x < u" by (metis less_le real_sqrt_less_iff real_sqrt_pow2 real_sqrt_power) qed
lemma hypreal_sqrt_hrabs [simp]: "\x. ( *f* sqrt)(x\<^sup>2) = \x\" by transfer simp
lemma hypreal_sqrt_hrabs2 [simp]: "\x. ( *f* sqrt)(x*x) = \x\" by transfer simp
lemma hypreal_sqrt_hyperpow_hrabs [simp]: "\x. ( *f* sqrt)(x pow (hypnat_of_nat 2)) = \x\" by transfer simp
lemma star_sqrt_HFinite: "\x \ HFinite; 0 \ x\ \ ( *f* sqrt) x \ HFinite" by (metis HFinite_square_iff hypreal_sqrt_pow2_iff power2_eq_square)
lemma hypreal_sqrt_sum_squares_ge1 [simp]: "\x y. x \ ( *f* sqrt)(x\<^sup>2 + y\<^sup>2)" by transfer (rule real_sqrt_sum_squares_ge1)
lemma HFinite_hypreal_sqrt_imp_HFinite: "\0 \ x; ( *f* sqrt) x \ HFinite\ \ x \ HFinite" by (metis HFinite_mult hypreal_sqrt_pow2_iff power2_eq_square)
lemma HFinite_hypreal_sqrt_iff [simp]: "0 \ x \ (( *f* sqrt) x \ HFinite) = (x \ HFinite)" by (blast intro: star_sqrt_HFinite HFinite_hypreal_sqrt_imp_HFinite)
lemma Infinitesimal_hypreal_sqrt: "\0 \ x; x \ Infinitesimal\ \ ( *f* sqrt) x \ Infinitesimal" by (simp add: mem_infmal_iff)
lemma Infinitesimal_hypreal_sqrt_imp_Infinitesimal: "\0 \ x; ( *f* sqrt) x \ Infinitesimal\ \ x \ Infinitesimal" using hypreal_sqrt_approx_zero2 mem_infmal_iff by blast
lemma Infinitesimal_hypreal_sqrt_iff [simp]: "0 \ x \ (( *f* sqrt) x \ Infinitesimal) = (x \ Infinitesimal)" by (blast intro: Infinitesimal_hypreal_sqrt_imp_Infinitesimal Infinitesimal_hypreal_sqrt)
lemma HInfinite_hypreal_sqrt: "\0 \ x; x \ HInfinite\ \ ( *f* sqrt) x \ HInfinite" by (simp add: HInfinite_HFinite_iff)
lemma HInfinite_hypreal_sqrt_imp_HInfinite: "\0 \ x; ( *f* sqrt) x \ HInfinite\ \ x \ HInfinite" using HFinite_hypreal_sqrt_iff HInfinite_HFinite_iff by blast
lemma HInfinite_hypreal_sqrt_iff [simp]: "0 \ x \ (( *f* sqrt) x \ HInfinite) = (x \ HInfinite)" by (blast intro: HInfinite_hypreal_sqrt HInfinite_hypreal_sqrt_imp_HInfinite)
lemma coshr_zero [simp]: "coshr 0 = 1" proof - have"\x>1. 1 = sumhr (0, 1, \n. cos_coeff n * 0 ^ n) + sumhr (1, x, \n. cos_coeff n * 0 ^ n)" unfolding sumhr_app by transfer (simp add: power_0_left) thenhave"sumhr (0, 1, \n. cos_coeff n * 0 ^ n) + sumhr (1, whn, \n. cos_coeff n * 0 ^ n) \ 1" by auto thenshow ?thesis unfolding coshr_def using sumhr_split_add [OF hypnat_one_less_hypnat_omega] st_unique by auto qed
lemma STAR_exp_zero_approx_one [simp]: "( *f* exp) (0::hypreal) \ 1" proof - have"(*f* exp) (0::real star) = 1" by transfer simp thenshow ?thesis by auto qed
lemma STAR_exp_Infinitesimal: assumes"x \ Infinitesimal" shows "( *f* exp) (x::hypreal) \ 1" proof (cases "x = 0") case False have"NSDERIV exp 0 :> 1" by (metis DERIV_exp NSDERIV_DERIV_iff exp_zero) thenhave"((*f* exp) x - 1) / x \ 1" using nsderiv_def False NSDERIVD2 assms by fastforce thenhave"(*f* exp) x - 1 \ x" using NSDERIVD4 \<open>NSDERIV exp 0 :> 1\<close> assms by fastforce thenshow ?thesis by (meson Infinitesimal_approx approx_minus_iff approx_trans2 assms not_Infinitesimal_not_zero) qed auto
lemma starfun_ln_inverse: "\x. 0 < x \ ( *f* real_ln) (inverse x) = -( *f* ln) x" by transfer (rule ln_inverse)
lemma starfun_abs_exp_cancel: "\x. \( *f* exp) (x::hypreal)\ = ( *f* exp) x" by transfer (rule abs_exp_cancel)
lemma starfun_exp_less_mono: "\x y::hypreal. x < y \ ( *f* exp) x < ( *f* exp) y" by transfer (rule exp_less_mono)
lemma starfun_exp_HFinite: fixes x :: hypreal assumes"x \ HFinite" shows"( *f* exp) x \ HFinite" proof - obtain u where"u \ \" "\x\ < u" using HFiniteD assms by force with assms have"\(*f* exp) x\ < (*f* exp) u" using starfun_abs_exp_cancel starfun_exp_less_mono by auto with\<open>u \<in> \<real>\<close> show ?thesis by (force simp: HFinite_def Reals_eq_Standard) qed
lemma starfun_exp_add_HFinite_Infinitesimal_approx: fixes x :: hypreal shows"\x \ Infinitesimal; z \ HFinite\ \ ( *f* exp) (z + x::hypreal) \ ( *f* exp) z" using STAR_exp_Infinitesimal approx_mult2 starfun_exp_HFinite by (fastforce simp add: STAR_exp_add)
lemma starfun_ln_HInfinite: "\x \ HInfinite; 0 < x\ \ ( *f* real_ln) x \ HInfinite" by (metis HInfinite_HFinite_iff starfun_exp_HFinite starfun_exp_ln_iff)
lemma starfun_exp_HInfinite_Infinitesimal_disj: fixes x :: hypreal shows"x \ HInfinite \ ( *f* exp) x \ HInfinite \ ( *f* exp) (x::hypreal) \ Infinitesimal" by (meson linear starfun_exp_HInfinite starfun_exp_Infinitesimal)
(* we do proof by considering ln of 1/x *) lemma starfun_ln_Infinitesimal_HInfinite: assumes"x \ Infinitesimal" "0 < x" shows"( *f* real_ln) x \ HInfinite" proof - have"inverse x \ HInfinite" using Infinitesimal_inverse_HInfinite assms by blast thenshow ?thesis using HInfinite_minus_iff assms(2) starfun_ln_HInfinite starfun_ln_inverse by fastforce qed
lemma starfun_ln_less_zero: "\x. \0 < x; x < 1\ \ ( *f* real_ln) x < 0" by transfer (rule ln_less_zero)
lemma HFinite_sin [simp]: "sumhr (0, whn, \n. sin_coeff n * x ^ n) \ HFinite" proof - have"summable (\i. sin_coeff i * x ^ i)" using summable_norm_sin [of x] by (simp add: summable_rabs_cancel) thenhave"(*f* (\n. \n HFinite" unfolding summable_sums_iff sums_NSsums_iff NSsums_def NSLIMSEQ_def using HFinite_star_of HNatInfinite_whn approx_HFinite approx_sym by blast thenshow ?thesis unfolding sumhr_app by (simp only: star_zero_def starfun2_star_of atLeast0LessThan) qed
lemma STAR_sin_zero [simp]: "( *f* sin) 0 = 0" by transfer (rule sin_zero)
lemma STAR_sin_Infinitesimal [simp]: fixes x :: "'a::{real_normed_field,banach} star" assumes"x \ Infinitesimal" shows"( *f* sin) x \ x" proof (cases "x = 0") case False have"NSDERIV sin 0 :> 1" by (metis DERIV_sin NSDERIV_DERIV_iff cos_zero) thenhave"(*f* sin) x / x \ 1" using False NSDERIVD2 assms by fastforce with assms show ?thesis unfolding star_one_def by (metis False Infinitesimal_approx Infinitesimal_ratio approx_star_of_HFinite) qed auto
lemma HFinite_cos [simp]: "sumhr (0, whn, \n. cos_coeff n * x ^ n) \ HFinite" proof - have"summable (\i. cos_coeff i * x ^ i)" using summable_norm_cos [of x] by (simp add: summable_rabs_cancel) thenhave"(*f* (\n. \n HFinite" unfolding summable_sums_iff sums_NSsums_iff NSsums_def NSLIMSEQ_def using HFinite_star_of HNatInfinite_whn approx_HFinite approx_sym by blast thenshow ?thesis unfolding sumhr_app by (simp only: star_zero_def starfun2_star_of atLeast0LessThan) qed
lemma STAR_cos_zero [simp]: "( *f* cos) 0 = 1" by transfer (rule cos_zero)
lemma STAR_cos_Infinitesimal [simp]: fixes x :: "'a::{real_normed_field,banach} star" assumes"x \ Infinitesimal" shows"( *f* cos) x \ 1" proof (cases "x = 0") case False have"NSDERIV cos 0 :> 0" by (metis DERIV_cos NSDERIV_DERIV_iff add.inverse_neutral sin_zero) thenhave"(*f* cos) x - 1 \ 0" using NSDERIV_approx assms by fastforce with assms show ?thesis using approx_minus_iff by blast qed auto
lemma STAR_tan_zero [simp]: "( *f* tan) 0 = 0" by transfer (rule tan_zero)
lemma STAR_tan_Infinitesimal [simp]: assumes"x \ Infinitesimal" shows"( *f* tan) x \ x" proof (cases "x = 0") case False have"NSDERIV tan 0 :> 1" using DERIV_tan [of 0] by (simp add: NSDERIV_DERIV_iff) thenhave"(*f* tan) x / x \ 1" using False NSDERIVD2 assms by fastforce with assms show ?thesis unfolding star_one_def by (metis False Infinitesimal_approx Infinitesimal_ratio approx_star_of_HFinite) qed auto
lemma STAR_sin_cos_Infinitesimal_mult: fixes x :: "'a::{real_normed_field,banach} star" shows"x \ Infinitesimal \ ( *f* sin) x * ( *f* cos) x \ x" using approx_mult_HFinite [of "( *f* sin) x" _ "( *f* cos) x" 1] by (simp add: Infinitesimal_subset_HFinite [THEN subsetD])
lemma HFinite_pi: "hypreal_of_real pi \ HFinite" by simp
lemma STAR_sin_Infinitesimal_divide: fixes x :: "'a::{real_normed_field,banach} star" shows"\x \ Infinitesimal; x \ 0\ \ ( *f* sin) x/x \ 1" using DERIV_sin [of "0::'a"] by (simp add: NSDERIV_DERIV_iff [symmetric] nsderiv_def)
lemma starfunNat_pi_divide_n_Infinitesimal: "N \ HNatInfinite \ ( *f* (\x. pi / real x)) N \ Infinitesimal" by (simp add: Infinitesimal_HFinite_mult2 divide_inverse starfunNat_real_of_nat)
lemma STAR_sin_pi_divide_n_approx: assumes"N \ HNatInfinite" shows"( *f* sin) (( *f* (\x. pi / real x)) N) \ hypreal_of_real pi/(hypreal_of_hypnat N)" proof - have"\s. (*f* sin) ((*f* (\n. pi / real n)) N) \ s \ hypreal_of_real pi / hypreal_of_hypnat N \ s" by (metis (lifting) Infinitesimal_approx Infinitesimal_pi_divide_HNatInfinite STAR_sin_Infinitesimal assms starfunNat_pi_divide_n_Infinitesimal) thenshow ?thesis by (meson approx_trans2) qed
lemma NSLIMSEQ_sin_pi: "(\n. real n * sin (pi / real n)) \\<^sub>N\<^sub>S pi" proof - have *: "hypreal_of_hypnat N * (*f* sin) ((*f* (\x. pi / real x)) N) \ hypreal_of_real pi" if"N \ HNatInfinite" for N :: "nat star" using that by simp (metis STAR_sin_pi_divide_HNatInfinite_approx_pi2 starfunNat_real_of_nat) show ?thesis by (simp add: NSLIMSEQ_def starfunNat_real_of_nat) (metis * starfun_o2) qed
lemma NSLIMSEQ_cos_one: "(\n. cos (pi / real n))\\<^sub>N\<^sub>S 1" proof - have"(*f* cos) ((*f* (\x. pi / real x)) N) \ 1" if"N \ HNatInfinite" for N using that STAR_cos_Infinitesimal starfunNat_pi_divide_n_Infinitesimal by blast thenshow ?thesis by (simp add: NSLIMSEQ_def) (metis STAR_cos_Infinitesimal starfunNat_pi_divide_n_Infinitesimal starfun_o2) qed
lemma NSLIMSEQ_sin_cos_pi: "(\n. real n * sin (pi / real n) * cos (pi / real n)) \\<^sub>N\<^sub>S pi" using NSLIMSEQ_cos_one NSLIMSEQ_mult NSLIMSEQ_sin_pi by force
text\<open>A familiar approximation to \<^term>\<open>cos x\<close> when \<^term>\<open>x\<close> is small\<close>
lemma STAR_cos_Infinitesimal_approx: fixes x :: "'a::{real_normed_field,banach} star" shows"x \ Infinitesimal \ ( *f* cos) x \ 1 - x\<^sup>2" by (metis Infinitesimal_square_iff STAR_cos_Infinitesimal approx_diff approx_sym diff_zero mem_infmal_iff power2_eq_square)
lemma STAR_cos_Infinitesimal_approx2: fixes x :: hypreal assumes"x \ Infinitesimal" shows"( *f* cos) x \ 1 - (x\<^sup>2)/2" proof - have"1 \ 1 - x\<^sup>2 / 2" using assms by (auto intro: Infinitesimal_SReal_divide simp add: Infinitesimal_approx_minus [symmetric] numeral_2_eq_2) thenshow ?thesis using STAR_cos_Infinitesimal approx_trans assms by blast qed
end
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.