diff -r 8bad1f42fec0 -r 300e09825d8b src/HOL/Hyperreal/Lim.thy --- a/src/HOL/Hyperreal/Lim.thy Thu Dec 02 11:09:19 2004 +0100 +++ b/src/HOL/Hyperreal/Lim.thy Thu Dec 02 11:42:01 2004 +0100 @@ -8,7 +8,7 @@ header{*Limits, Continuity and Differentiation*} theory Lim -imports SEQ RealDef +imports SEQ begin text{*Standard and Nonstandard Definitions*} @@ -17,9 +17,8 @@ LIM :: "[real=>real,real,real] => bool" ("((_)/ -- (_)/ --> (_))" [60, 0, 60] 60) "f -- a --> L == - \r. 0 < r --> - (\s. 0 < s & (\x. (x \ a & (\x + -a\ < s) - --> \f x + -L\ < r)))" + \r > 0. \s > 0. \x. x \ a & \x + -a\ < s + --> \f x + -L\ < r" NSLIM :: "[real=>real,real,real] => bool" ("((_)/ -- (_)/ --NS> (_))" [60, 0, 60] 60) @@ -58,9 +57,7 @@ inc = ( *f* f)(hypreal_of_real x + h) + -hypreal_of_real (f x))" isUCont :: "(real=>real) => bool" - "isUCont f == (\r. 0 < r --> - (\s. 0 < s & (\x y. \x + -y\ < s - --> \f x + -f y\ < r)))" + "isUCont f == \r > 0. \s > 0. \x y. \x + -y\ < s --> \f x + -f y\ < r" isNSUCont :: "(real=>real) => bool" "isNSUCont f == (\x y. x @= y --> ( *f* f) x @= ( *f* f) y)" @@ -84,12 +81,12 @@ lemma LIM_eq: "f -- a --> L = - (\r. 0 (\s. 0 < s & (\x. x \ a & \x-a\ < s --> \f x - L\ < r)))" + (\r>0.\s>0.\x. x \ a & \x-a\ < s --> \f x - L\ < r)" by (simp add: LIM_def diff_minus) lemma LIM_D: "[| f -- a --> L; 0 \s. 0 < s & (\x. x \ a & \x-a\ < s --> \f x - L\ < r)" + ==> \s>0.\x. x \ a & \x-a\ < s --> \f x - L\ < r" by (simp add: LIM_eq) lemma LIM_const [simp]: "(%x. k) -- x --> k" @@ -111,8 +108,7 @@ where gs: "0 < gs" and gs_lt: "\x. x \ a & \x-a\ < gs --> \g x - M\ < r/2" by blast - show "\s. 0 < s \ - (\x. x \ a \ \x-a\ < s \ \f x + g x - (L + M)\ < r)" + show "\s>0.\x. x \ a \ \x-a\ < s \ \f x + g x - (L + M)\ < r" proof (intro exI conjI strip) show "0 < min fs gs" by (simp add: fs gs) fix x :: real @@ -143,8 +139,7 @@ lemma LIM_const_not_eq: "k \ L ==> ~ ((%x. k) -- a --> L)" proof (simp add: linorder_neq_iff LIM_eq, elim disjE) assume k: "k < L" - show "\r. 0 < r \ - (\s. 0 < s \ (\x. (x < a \ a < x) \ \x-a\ < s) \ \ \k-L\ < r)" + show "\r>0. \s>0. (\x. (x < a \ a < x) \ \x-a\ < s) \ \ \k-L\ < r" proof (intro exI conjI strip) show "0 < L-k" by (simp add: k compare_rls) fix s :: real @@ -157,8 +152,7 @@ qed next assume k: "L < k" - show "\r. 0 < r \ - (\s. 0 < s \ (\x. (x < a \ a < x) \ \x-a\ < s) \ \ \k-L\ < r)" + show "\r>0.\s>0. (\x. (x < a \ a < x) \ \x-a\ < s) \ \ \k-L\ < r" proof (intro exI conjI strip) show "0 < k-L" by (simp add: k compare_rls) fix s :: real @@ -245,8 +239,8 @@ subsubsection{*Limit: The NS definition implies the standard definition.*} -lemma lemma_LIM: "\s. 0 < s --> (\xa. xa \ x & - \xa + - x\ < s & r \ \f xa + -L\) +lemma lemma_LIM: "\s>0.\xa. xa \ x & + \xa + - x\ < s & r \ \f xa + -L\ ==> \n::nat. \xa. xa \ x & \xa + -x\ < inverse(real(Suc n)) & r \ \f xa + -L\" apply clarify @@ -254,8 +248,7 @@ done lemma lemma_skolemize_LIM2: - "\s. 0 < s --> (\xa. xa \ x & - \xa + - x\ < s & r \ \f xa + -L\) + "\s>0.\xa. xa \ x & \xa + - x\ < s & r \ \f xa + -L\ ==> \X. \n::nat. X n \ x & \X n + -x\ < inverse(real(Suc n)) & r \ abs(f (X n) + -L)" apply (drule lemma_LIM) @@ -598,17 +591,15 @@ apply (drule FreeUltrafilterNat_all, ultra) done -lemma lemma_LIMu: "\s. 0 < s --> (\z y. \z + - y\ < s & r \ \f z + -f y\) - ==> \n::nat. \z y. - \z + -y\ < inverse(real(Suc n)) & - r \ \f z + -f y\" +lemma lemma_LIMu: "\s>0.\z y. \z + - y\ < s & r \ \f z + -f y\ + ==> \n::nat. \z y. \z + -y\ < inverse(real(Suc n)) & r \ \f z + -f y\" apply clarify apply (cut_tac n1 = n in real_of_nat_Suc_gt_zero [THEN positive_imp_inverse_positive], auto) done lemma lemma_skolemize_LIM2u: - "\s. 0 < s --> (\z y. \z + - y\ < s & r \ \f z + -f y\) + "\s>0.\z y. \z + - y\ < s & r \ \f z + -f y\ ==> \X Y. \n::nat. abs(X n + -(Y n)) < inverse(real(Suc n)) & r \ abs(f (X n) + -f (Y n))" @@ -687,7 +678,7 @@ subsubsection{*Alternative definition for differentiability*} lemma LIM_I: - "(!!r. 0 (\s. 0 < s & (\x. x \ a & \x-a\ < s --> \f x - L\ < r))) + "(!!r. 0 \s>0.\x. x \ a & \x-a\ < s --> \f x - L\ < r) ==> f -- a --> L" by (simp add: LIM_eq) @@ -1438,7 +1429,7 @@ apply (drule_tac P = "%d. 0 ?P d" and x = 1 in spec, arith) apply (drule_tac x = x in spec)+ apply simp -apply (drule_tac P = "%r. ?P r --> (\s. 0 l" and l: "0 < l" - shows "\d. 0 < d & (\h. 0 < h & h < d --> f(x) < f(x + h))" + shows "\d > 0. \h > 0. h < d --> f(x) < f(x + h)" proof - from l der [THEN DERIV_D, THEN LIM_D [where r = "l"]] - have "\s. 0 < s \ - (\z. z \ 0 \ \z\ < s \ \(f(x+z) - f x) / z - l\ < l)" + have "\s > 0. (\z. z \ 0 \ \z\ < s \ \(f(x+z) - f x) / z - l\ < l)" by (simp add: diff_minus) then obtain s where s: "0 < s" @@ -1608,7 +1598,7 @@ proof (intro exI conjI strip) show "0 h < s" + assume "0 < h" "h < s" with all [of h] show "f x < f (x+h)" proof (simp add: abs_if pos_less_divide_eq diff_minus [symmetric] split add: split_if_asm) @@ -1624,11 +1614,10 @@ lemma DERIV_left_dec: assumes der: "DERIV f x :> l" and l: "l < 0" - shows "\d. 0 < d & (\h. 0 < h & h < d --> f(x) < f(x-h))" + shows "\d > 0. \h > 0. h < d --> f(x) < f(x-h)" proof - from l der [THEN DERIV_D, THEN LIM_D [where r = "-l"]] - have "\s. 0 < s \ - (\z. z \ 0 \ \z\ < s \ \(f(x+z) - f x) / z - l\ < -l)" + have "\s > 0. (\z. z \ 0 \ \z\ < s \ \(f(x+z) - f x) / z - l\ < -l)" by (simp add: diff_minus) then obtain s where s: "0 < s" @@ -1638,7 +1627,7 @@ proof (intro exI conjI strip) show "0 h < s" + assume "0 < h" "h < s" with all [of "-h"] show "f x < f (x-h)" proof (simp add: abs_if pos_less_divide_eq diff_minus [symmetric] split add: split_if_asm) @@ -1662,7 +1651,7 @@ case less from DERIV_left_dec [OF der less] obtain d' where d': "0 < d'" - and lt: "\h. 0 < h \ h < d' \ f x < f (x-h)" by blast + and lt: "\h > 0. h < d' \ f x < f (x-h)" by blast from real_lbound_gt_zero [OF d d'] obtain e where "0 < e \ e < d \ e < d'" .. with lt le [THEN spec [where x="x-e"]] @@ -1671,7 +1660,7 @@ case greater from DERIV_left_inc [OF der greater] obtain d' where d': "0 < d'" - and lt: "\h. 0 < h \ h < d' \ f x < f (x + h)" by blast + and lt: "\h > 0. h < d' \ f x < f (x + h)" by blast from real_lbound_gt_zero [OF d d'] obtain e where "0 < e \ e < d \ e < d'" .. with lt le [THEN spec [where x="x+e"]] @@ -1857,7 +1846,7 @@ lemma DERIV_isconst_end: "[| a < b; \x. a \ x & x \ b --> isCont f x; \x. a < x & x < b --> DERIV f x :> 0 |] - ==> (f b = f a)" + ==> f b = f a" apply (drule MVT, assumption) apply (blast intro: differentiableI) apply (auto dest!: DERIV_unique simp add: diff_eq_eq) @@ -1992,7 +1981,7 @@ assumes d: "0 < d" and inj: "\z. \z-x\ \ d --> g(f z) = z" and cont: "\z. \z-x\ \ d --> isCont f z" - shows "\e. 0y. \y - f x\ \ e --> (\z. \z-x\ \ d & f z = y))" + shows "\e>0. \y. \y - f x\ \ e --> (\z. \z-x\ \ d & f z = y)" proof - have "x-d \ x+d" "\z. x-d \ z \ z \ x+d \ isCont f z" using cont d by (auto simp add: abs_le_interval_iff) @@ -2045,7 +2034,7 @@ shows "isCont g (f x)" proof (simp add: isCont_iff LIM_eq) show "\r. 0 < r \ - (\s. 0 (\z. z\0 \ \z\ < s \ \g(f x + z) - g(f x)\ < r))" + (\s>0. \z. z\0 \ \z\ < s \ \g(f x + z) - g(f x)\ < r)" proof (intro strip) fix r::real assume r: "0y. \y - f x\ \ e' \ (\z. \z - x\ \ e \ f z = y)" by blast - show "\s. 0 (\z. z\0 \ \z\ < s \ \g(f x + z) - g(f x)\ < r)" + show "\s>0. \z. z\0 \ \z\ < s \ \g(f x + z) - g(f x)\ < r" proof (intro exI conjI) show "0z. z \ 0 \ \z\ < e' \ \g (f x + z) - g (f x)\ < r" @@ -2269,4 +2258,3 @@ end -