2023 Infinitesimals as smaller than 1/n for all n::nat (> 0) |
2023 Infinitesimals as smaller than 1/n for all n::nat (> 0) |
2024 ------------------------------------------------------------------------*) |
2024 ------------------------------------------------------------------------*) |
2025 |
2025 |
2026 lemma lemma_Infinitesimal: |
2026 lemma lemma_Infinitesimal: |
2027 "(\<forall>r. 0 < r --> x < r) = (\<forall>n. x < inverse(real (Suc n)))" |
2027 "(\<forall>r. 0 < r --> x < r) = (\<forall>n. x < inverse(real (Suc n)))" |
2028 apply (auto simp add: real_of_nat_Suc_gt_zero) |
2028 apply (auto simp add: real_of_nat_Suc_gt_zero simp del: real_of_nat_Suc) |
2029 apply (blast dest!: reals_Archimedean intro: order_less_trans) |
2029 apply (blast dest!: reals_Archimedean intro: order_less_trans) |
2030 done |
2030 done |
2031 |
2031 |
2032 lemma lemma_Infinitesimal2: |
2032 lemma lemma_Infinitesimal2: |
2033 "(\<forall>r \<in> Reals. 0 < r --> x < r) = |
2033 "(\<forall>r \<in> Reals. 0 < r --> x < r) = |
2034 (\<forall>n. x < inverse(hypreal_of_nat (Suc n)))" |
2034 (\<forall>n. x < inverse(hypreal_of_nat (Suc n)))" |
2035 apply safe |
2035 apply safe |
2036 apply (drule_tac x = "inverse (hypreal_of_real (real (Suc n))) " in bspec) |
2036 apply (drule_tac x = "inverse (hypreal_of_real (real (Suc n))) " in bspec) |
2037 apply (simp (no_asm_use)) |
2037 apply (simp (no_asm_use)) |
2038 apply (rule real_of_nat_Suc_gt_zero [THEN positive_imp_inverse_positive, THEN star_of_less [THEN iffD2], THEN [2] impE]) |
2038 apply (rule real_of_nat_Suc_gt_zero [THEN positive_imp_inverse_positive, THEN star_of_less [THEN iffD2], THEN [2] impE]) |
2039 prefer 2 apply assumption |
2039 prefer 2 apply assumption |
2040 apply (simp add: real_of_nat_def) |
2040 apply (simp add: real_of_nat_def) |
2041 apply (auto dest!: reals_Archimedean simp add: SReal_iff) |
2041 apply (auto dest!: reals_Archimedean simp add: SReal_iff simp del: real_of_nat_Suc) |
2042 apply (drule star_of_less [THEN iffD2]) |
2042 apply (drule star_of_less [THEN iffD2]) |
2043 apply (simp add: real_of_nat_def) |
2043 apply (simp add: real_of_nat_def) |
2044 apply (blast intro: order_less_trans) |
2044 apply (blast intro: order_less_trans) |
2045 done |
2045 done |
2046 |
2046 |
2146 apply (simp add: mult.commute) |
2146 apply (simp add: mult.commute) |
2147 done |
2147 done |
2148 |
2148 |
2149 lemma finite_inverse_real_of_posnat_gt_real: |
2149 lemma finite_inverse_real_of_posnat_gt_real: |
2150 "0 < u ==> finite {n. u < inverse(real(Suc n))}" |
2150 "0 < u ==> finite {n. u < inverse(real(Suc n))}" |
2151 apply (simp (no_asm_simp) add: real_of_nat_less_inverse_iff) |
2151 apply (simp (no_asm_simp) add: real_of_nat_less_inverse_iff del: real_of_nat_Suc) |
2152 apply (simp (no_asm_simp) add: real_of_nat_Suc less_diff_eq [symmetric]) |
2152 apply (simp (no_asm_simp) add: real_of_nat_Suc less_diff_eq [symmetric]) |
2153 apply (rule finite_real_of_nat_less_real) |
2153 apply (rule finite_real_of_nat_less_real) |
2154 done |
2154 done |
2155 |
2155 |
2156 lemma lemma_real_le_Un_eq2: |
2156 lemma lemma_real_le_Un_eq2: |
2159 apply (auto dest: order_le_imp_less_or_eq simp add: order_less_imp_le) |
2159 apply (auto dest: order_le_imp_less_or_eq simp add: order_less_imp_le) |
2160 done |
2160 done |
2161 |
2161 |
2162 lemma finite_inverse_real_of_posnat_ge_real: |
2162 lemma finite_inverse_real_of_posnat_ge_real: |
2163 "0 < u ==> finite {n. u \<le> inverse(real(Suc n))}" |
2163 "0 < u ==> finite {n. u \<le> inverse(real(Suc n))}" |
2164 by (auto simp add: lemma_real_le_Un_eq2 lemma_finite_epsilon_set finite_inverse_real_of_posnat_gt_real) |
2164 by (auto simp add: lemma_real_le_Un_eq2 lemma_finite_epsilon_set finite_inverse_real_of_posnat_gt_real |
|
2165 simp del: real_of_nat_Suc) |
2165 |
2166 |
2166 lemma inverse_real_of_posnat_ge_real_FreeUltrafilterNat: |
2167 lemma inverse_real_of_posnat_ge_real_FreeUltrafilterNat: |
2167 "0 < u ==> \<not> eventually (\<lambda>n. u \<le> inverse(real(Suc n))) FreeUltrafilterNat" |
2168 "0 < u ==> \<not> eventually (\<lambda>n. u \<le> inverse(real(Suc n))) FreeUltrafilterNat" |
2168 by (blast intro!: FreeUltrafilterNat.finite finite_inverse_real_of_posnat_ge_real) |
2169 by (blast intro!: FreeUltrafilterNat.finite finite_inverse_real_of_posnat_ge_real) |
2169 |
2170 |
2186 whose term with an hypernatural suffix is an infinitesimal i.e. |
2187 whose term with an hypernatural suffix is an infinitesimal i.e. |
2187 the whn'nth term of the hypersequence is a member of Infinitesimal*} |
2188 the whn'nth term of the hypersequence is a member of Infinitesimal*} |
2188 |
2189 |
2189 lemma SEQ_Infinitesimal: |
2190 lemma SEQ_Infinitesimal: |
2190 "( *f* (%n::nat. inverse(real(Suc n)))) whn : Infinitesimal" |
2191 "( *f* (%n::nat. inverse(real(Suc n)))) whn : Infinitesimal" |
2191 apply (simp add: hypnat_omega_def starfun_star_n star_n_inverse) |
2192 by (simp add: hypnat_omega_def starfun_star_n star_n_inverse Infinitesimal_FreeUltrafilterNat_iff |
2192 apply (simp add: Infinitesimal_FreeUltrafilterNat_iff) |
2193 real_of_nat_Suc_gt_zero FreeUltrafilterNat_inverse_real_of_posnat del: real_of_nat_Suc) |
2193 apply (simp add: real_of_nat_Suc_gt_zero FreeUltrafilterNat_inverse_real_of_posnat) |
|
2194 done |
|
2195 |
2194 |
2196 text{* Example where we get a hyperreal from a real sequence |
2195 text{* Example where we get a hyperreal from a real sequence |
2197 for which a particular property holds. The theorem is |
2196 for which a particular property holds. The theorem is |
2198 used in proofs about equivalence of nonstandard and |
2197 used in proofs about equivalence of nonstandard and |
2199 standard neighbourhoods. Also used for equivalence of |
2198 standard neighbourhoods. Also used for equivalence of |