src/HOL/Library/Extended_Real.thy
changeset 51022 78de6c7e8a58
parent 51000 c9adb50f74ad
child 51301 6822aa82aafa
equal deleted inserted replaced
51021:1cf4faed8b22 51022:78de6c7e8a58
     8 header {* Extended real number line *}
     8 header {* Extended real number line *}
     9 
     9 
    10 theory Extended_Real
    10 theory Extended_Real
    11 imports "~~/src/HOL/Complex_Main" Extended_Nat
    11 imports "~~/src/HOL/Complex_Main" Extended_Nat
    12 begin
    12 begin
       
    13 
       
    14 text {*
       
    15 
       
    16 For more lemmas about the extended real numbers go to
       
    17   @{file "~~/src/HOL/Multivariate_Analysis/Extended_Real_Limits.thy"}
       
    18 
       
    19 *}
    13 
    20 
    14 lemma LIMSEQ_SUP:
    21 lemma LIMSEQ_SUP:
    15   fixes X :: "nat \<Rightarrow> 'a :: {complete_linorder, linorder_topology}"
    22   fixes X :: "nat \<Rightarrow> 'a :: {complete_linorder, linorder_topology}"
    16   assumes "incseq X"
    23   assumes "incseq X"
    17   shows "X ----> (SUP i. X i)"
    24   shows "X ----> (SUP i. X i)"
    20      (auto simp: SUP_upper less_SUP_iff incseq_def eventually_sequentially intro: less_le_trans)
    27      (auto simp: SUP_upper less_SUP_iff incseq_def eventually_sequentially intro: less_le_trans)
    21 
    28 
    22 lemma eventually_const: "\<not> trivial_limit net \<Longrightarrow> eventually (\<lambda>x. P) net \<longleftrightarrow> P"
    29 lemma eventually_const: "\<not> trivial_limit net \<Longrightarrow> eventually (\<lambda>x. P) net \<longleftrightarrow> P"
    23   by (cases P) (simp_all add: eventually_False)
    30   by (cases P) (simp_all add: eventually_False)
    24 
    31 
    25 lemma (in complete_lattice) Inf_le_Sup:
    32 lemma (in complete_lattice) Inf_le_Sup: "A \<noteq> {} \<Longrightarrow> Inf A \<le> Sup A"
    26   assumes "A \<noteq> {}" shows "Inf A \<le> Sup A"
    33   by (metis Sup_upper2 Inf_lower ex_in_conv)
    27 proof -
    34 
    28   from `A \<noteq> {}` obtain x where "x \<in> A" by auto
    35 lemma (in complete_lattice) INF_le_SUP: "A \<noteq> {} \<Longrightarrow> INFI A f \<le> SUPR A f"
    29   then show ?thesis
       
    30     by (metis Sup_upper2 Inf_lower)
       
    31 qed
       
    32 
       
    33 lemma (in complete_lattice) INF_le_SUP:
       
    34   "A \<noteq> {} \<Longrightarrow> INFI A f \<le> SUPR A f"
       
    35   unfolding INF_def SUP_def by (rule Inf_le_Sup) auto
    36   unfolding INF_def SUP_def by (rule Inf_le_Sup) auto
    36 
    37 
    37 text {*
    38 lemma (in complete_linorder) le_Sup_iff:
    38 
    39   "x \<le> Sup A \<longleftrightarrow> (\<forall>y<x. \<exists>a\<in>A. y < a)"
    39 For more lemmas about the extended real numbers go to
    40 proof safe
    40   @{file "~~/src/HOL/Multivariate_Analysis/Extended_Real_Limits.thy"}
    41   fix y assume "x \<le> Sup A" "y < x"
    41 
    42   then have "y < Sup A" by auto
    42 *}
    43   then show "\<exists>a\<in>A. y < a"
       
    44     unfolding less_Sup_iff .
       
    45 qed (auto elim!: allE[of _ "Sup A"] simp add: not_le[symmetric] Sup_upper)
       
    46 
       
    47 lemma (in complete_linorder) le_SUP_iff:
       
    48   "x \<le> SUPR A f \<longleftrightarrow> (\<forall>y<x. \<exists>i\<in>A. y < f i)"
       
    49   unfolding le_Sup_iff SUP_def by simp
       
    50 
       
    51 lemma (in complete_linorder) Inf_le_iff:
       
    52   "Inf A \<le> x \<longleftrightarrow> (\<forall>y>x. \<exists>a\<in>A. y > a)"
       
    53 proof safe
       
    54   fix y assume "x \<ge> Inf A" "y > x"
       
    55   then have "y > Inf A" by auto
       
    56   then show "\<exists>a\<in>A. y > a"
       
    57     unfolding Inf_less_iff .
       
    58 qed (auto elim!: allE[of _ "Inf A"] simp add: not_le[symmetric] Inf_lower)
       
    59 
       
    60 lemma (in complete_linorder) le_INF_iff:
       
    61   "INFI A f \<le> x \<longleftrightarrow> (\<forall>y>x. \<exists>i\<in>A. y > f i)"
       
    62   unfolding Inf_le_iff INF_def by simp
    43 
    63 
    44 lemma (in complete_lattice) Sup_eqI:
    64 lemma (in complete_lattice) Sup_eqI:
    45   assumes "\<And>y. y \<in> A \<Longrightarrow> y \<le> x"
    65   assumes "\<And>y. y \<in> A \<Longrightarrow> y \<le> x"
    46   assumes "\<And>y. (\<And>z. z \<in> A \<Longrightarrow> z \<le> y) \<Longrightarrow> x \<le> y"
    66   assumes "\<And>y. (\<And>z. z \<in> A \<Longrightarrow> z \<le> y) \<Longrightarrow> x \<le> y"
    47   shows "Sup A = x"
    67   shows "Sup A = x"
  1427     by (auto simp: top_ereal_def)
  1447     by (auto simp: top_ereal_def)
  1428 qed
  1448 qed
  1429 
  1449 
  1430 lemma ereal_le_Sup:
  1450 lemma ereal_le_Sup:
  1431   fixes x :: ereal
  1451   fixes x :: ereal
  1432   shows "(x <= (SUP i:A. f i)) <-> (ALL y. y < x --> (EX i. i : A & y <= f i))"
  1452   shows "(x <= (SUP i:A. f i)) <-> (ALL y. y < x --> (EX i. i : A & y <= f i))" (is "?lhs = ?rhs")
  1433 (is "?lhs <-> ?rhs")
       
  1434 proof-
  1453 proof-
  1435 { assume "?rhs"
  1454 { assume "?rhs"
  1436   { assume "~(x <= (SUP i:A. f i))" hence "(SUP i:A. f i)<x" by (simp add: not_le)
  1455   { assume "~(x <= (SUP i:A. f i))" hence "(SUP i:A. f i)<x" by (simp add: not_le)
  1437     then obtain y where y_def: "(SUP i:A. f i)<y & y<x" using ereal_dense by auto
  1456     then obtain y where y_def: "(SUP i:A. f i)<y & y<x" using ereal_dense by auto
  1438     then obtain i where "i : A & y <= f i" using `?rhs` by auto
  1457     then obtain i where "i : A & y <= f i" using `?rhs` by auto
  1992   show "eventually (\<lambda>x. real (f x) \<in> S) net"
  2011   show "eventually (\<lambda>x. real (f x) \<in> S) net"
  1993     by (rule eventually_mono)
  2012     by (rule eventually_mono)
  1994 qed
  2013 qed
  1995 
  2014 
  1996 lemma tendsto_PInfty: "(f ---> \<infinity>) F \<longleftrightarrow> (\<forall>r. eventually (\<lambda>x. ereal r < f x) F)"
  2015 lemma tendsto_PInfty: "(f ---> \<infinity>) F \<longleftrightarrow> (\<forall>r. eventually (\<lambda>x. ereal r < f x) F)"
  1997   unfolding tendsto_def
  2016 proof -
  1998 proof safe
  2017   { fix l :: ereal assume "\<forall>r. eventually (\<lambda>x. ereal r < f x) F"
  1999   fix S :: "ereal set" assume "open S" "\<infinity> \<in> S"
  2018     from this[THEN spec, of "real l"]
  2000   from open_PInfty[OF this] guess B .. note B = this
  2019     have "l \<noteq> \<infinity> \<Longrightarrow> eventually (\<lambda>x. l < f x) F"
  2001   moreover
  2020       by (cases l) (auto elim: eventually_elim1) }
  2002   assume "\<forall>r::real. eventually (\<lambda>z. r < f z) F"
  2021   then show ?thesis
  2003   then have "eventually (\<lambda>z. f z \<in> {B <..}) F" by auto
  2022     by (auto simp: order_tendsto_iff)
  2004   ultimately show "eventually (\<lambda>z. f z \<in> S) F" by (auto elim!: eventually_elim1)
       
  2005 next
       
  2006   fix x assume "\<forall>S. open S \<longrightarrow> \<infinity> \<in> S \<longrightarrow> eventually (\<lambda>x. f x \<in> S) F"
       
  2007   from this[rule_format, of "{ereal x <..}"]
       
  2008   show "eventually (\<lambda>y. ereal x < f y) F" by auto
       
  2009 qed
  2023 qed
  2010 
  2024 
  2011 lemma tendsto_MInfty: "(f ---> -\<infinity>) F \<longleftrightarrow> (\<forall>r. eventually (\<lambda>x. f x < ereal r) F)"
  2025 lemma tendsto_MInfty: "(f ---> -\<infinity>) F \<longleftrightarrow> (\<forall>r. eventually (\<lambda>x. f x < ereal r) F)"
  2012   unfolding tendsto_def
  2026   unfolding tendsto_def
  2013 proof safe
  2027 proof safe
  2206 
  2220 
  2207 
  2221 
  2208 lemma ereal_max_least:
  2222 lemma ereal_max_least:
  2209   "[| (a::ereal) <= x; c <= x |] ==> max a c <= x"
  2223   "[| (a::ereal) <= x; c <= x |] ==> max a c <= x"
  2210   by (metis sup_ereal_def sup_least)
  2224   by (metis sup_ereal_def sup_least)
  2211 
       
  2212 
  2225 
  2213 lemma ereal_LimI_finite:
  2226 lemma ereal_LimI_finite:
  2214   fixes x :: ereal
  2227   fixes x :: ereal
  2215   assumes "\<bar>x\<bar> \<noteq> \<infinity>"
  2228   assumes "\<bar>x\<bar> \<noteq> \<infinity>"
  2216   assumes "!!r. 0 < r ==> EX N. ALL n>=N. u n < x + r & x < u n + r"
  2229   assumes "!!r. 0 < r ==> EX N. ALL n>=N. u n < x + r & x < u n + r"
  2401   assumes ntriv: "\<not> trivial_limit F"
  2414   assumes ntriv: "\<not> trivial_limit F"
  2402   assumes le: "eventually (\<lambda>n. X n \<le> C) F"
  2415   assumes le: "eventually (\<lambda>n. X n \<le> C) F"
  2403   shows "Limsup F X \<le> C"
  2416   shows "Limsup F X \<le> C"
  2404   using Limsup_mono[OF le] Limsup_const[OF ntriv, of C] by simp
  2417   using Limsup_mono[OF le] Limsup_const[OF ntriv, of C] by simp
  2405 
  2418 
       
  2419 lemma le_Liminf_iff:
       
  2420   fixes X :: "_ \<Rightarrow> _ :: complete_linorder"
       
  2421   shows "C \<le> Liminf F X \<longleftrightarrow> (\<forall>y<C. eventually (\<lambda>x. y < X x) F)"
       
  2422 proof -
       
  2423   { fix y P assume "eventually P F" "y < INFI (Collect P) X"
       
  2424     then have "eventually (\<lambda>x. y < X x) F"
       
  2425       by (auto elim!: eventually_elim1 dest: less_INF_D) }
       
  2426   moreover
       
  2427   { fix y P assume "y < C" and y: "\<forall>y<C. eventually (\<lambda>x. y < X x) F"
       
  2428     have "\<exists>P. eventually P F \<and> y < INFI (Collect P) X"
       
  2429     proof cases
       
  2430       assume "\<exists>z. y < z \<and> z < C"
       
  2431       then guess z ..
       
  2432       moreover then have "z \<le> INFI {x. z < X x} X"
       
  2433         by (auto intro!: INF_greatest)
       
  2434       ultimately show ?thesis
       
  2435         using y by (intro exI[of _ "\<lambda>x. z < X x"]) auto
       
  2436     next
       
  2437       assume "\<not> (\<exists>z. y < z \<and> z < C)"
       
  2438       then have "C \<le> INFI {x. y < X x} X"
       
  2439         by (intro INF_greatest) auto
       
  2440       with `y < C` show ?thesis
       
  2441         using y by (intro exI[of _ "\<lambda>x. y < X x"]) auto
       
  2442     qed }
       
  2443   ultimately show ?thesis
       
  2444     unfolding Liminf_def le_SUP_iff by auto
       
  2445 qed
       
  2446 
       
  2447 lemma lim_imp_Liminf:
       
  2448   fixes f :: "'a \<Rightarrow> _ :: {complete_linorder, linorder_topology}"
       
  2449   assumes ntriv: "\<not> trivial_limit F"
       
  2450   assumes lim: "(f ---> f0) F"
       
  2451   shows "Liminf F f = f0"
       
  2452 proof (intro Liminf_eqI)
       
  2453   fix P assume P: "eventually P F"
       
  2454   then have "eventually (\<lambda>x. INFI (Collect P) f \<le> f x) F"
       
  2455     by eventually_elim (auto intro!: INF_lower)
       
  2456   then show "INFI (Collect P) f \<le> f0"
       
  2457     by (rule tendsto_le[OF ntriv lim tendsto_const])
       
  2458 next
       
  2459   fix y assume upper: "\<And>P. eventually P F \<Longrightarrow> INFI (Collect P) f \<le> y"
       
  2460   show "f0 \<le> y"
       
  2461   proof cases
       
  2462     assume "\<exists>z. y < z \<and> z < f0"
       
  2463     then guess z ..
       
  2464     moreover have "z \<le> INFI {x. z < f x} f"
       
  2465       by (rule INF_greatest) simp
       
  2466     ultimately show ?thesis
       
  2467       using lim[THEN topological_tendstoD, THEN upper, of "{z <..}"] by auto
       
  2468   next
       
  2469     assume discrete: "\<not> (\<exists>z. y < z \<and> z < f0)"
       
  2470     show ?thesis
       
  2471     proof (rule classical)
       
  2472       assume "\<not> f0 \<le> y"
       
  2473       then have "eventually (\<lambda>x. y < f x) F"
       
  2474         using lim[THEN topological_tendstoD, of "{y <..}"] by auto
       
  2475       then have "eventually (\<lambda>x. f0 \<le> f x) F"
       
  2476         using discrete by (auto elim!: eventually_elim1)
       
  2477       then have "INFI {x. f0 \<le> f x} f \<le> y"
       
  2478         by (rule upper)
       
  2479       moreover have "f0 \<le> INFI {x. f0 \<le> f x} f"
       
  2480         by (intro INF_greatest) simp
       
  2481       ultimately show "f0 \<le> y" by simp
       
  2482     qed
       
  2483   qed
       
  2484 qed
       
  2485 
       
  2486 lemma lim_imp_Limsup:
       
  2487   fixes f :: "'a \<Rightarrow> _ :: {complete_linorder, linorder_topology}"
       
  2488   assumes ntriv: "\<not> trivial_limit F"
       
  2489   assumes lim: "(f ---> f0) F"
       
  2490   shows "Limsup F f = f0"
       
  2491 proof (intro Limsup_eqI)
       
  2492   fix P assume P: "eventually P F"
       
  2493   then have "eventually (\<lambda>x. f x \<le> SUPR (Collect P) f) F"
       
  2494     by eventually_elim (auto intro!: SUP_upper)
       
  2495   then show "f0 \<le> SUPR (Collect P) f"
       
  2496     by (rule tendsto_le[OF ntriv tendsto_const lim])
       
  2497 next
       
  2498   fix y assume lower: "\<And>P. eventually P F \<Longrightarrow> y \<le> SUPR (Collect P) f"
       
  2499   show "y \<le> f0"
       
  2500   proof cases
       
  2501     assume "\<exists>z. f0 < z \<and> z < y"
       
  2502     then guess z ..
       
  2503     moreover have "SUPR {x. f x < z} f \<le> z"
       
  2504       by (rule SUP_least) simp
       
  2505     ultimately show ?thesis
       
  2506       using lim[THEN topological_tendstoD, THEN lower, of "{..< z}"] by auto
       
  2507   next
       
  2508     assume discrete: "\<not> (\<exists>z. f0 < z \<and> z < y)"
       
  2509     show ?thesis
       
  2510     proof (rule classical)
       
  2511       assume "\<not> y \<le> f0"
       
  2512       then have "eventually (\<lambda>x. f x < y) F"
       
  2513         using lim[THEN topological_tendstoD, of "{..< y}"] by auto
       
  2514       then have "eventually (\<lambda>x. f x \<le> f0) F"
       
  2515         using discrete by (auto elim!: eventually_elim1 simp: not_less)
       
  2516       then have "y \<le> SUPR {x. f x \<le> f0} f"
       
  2517         by (rule lower)
       
  2518       moreover have "SUPR {x. f x \<le> f0} f \<le> f0"
       
  2519         by (intro SUP_least) simp
       
  2520       ultimately show "y \<le> f0" by simp
       
  2521     qed
       
  2522   qed
       
  2523 qed
       
  2524 
       
  2525 lemma Liminf_eq_Limsup:
       
  2526   fixes f0 :: "'a :: {complete_linorder, linorder_topology}"
       
  2527   assumes ntriv: "\<not> trivial_limit F"
       
  2528     and lim: "Liminf F f = f0" "Limsup F f = f0"
       
  2529   shows "(f ---> f0) F"
       
  2530 proof (rule order_tendstoI)
       
  2531   fix a assume "f0 < a"
       
  2532   with assms have "Limsup F f < a" by simp
       
  2533   then obtain P where "eventually P F" "SUPR (Collect P) f < a"
       
  2534     unfolding Limsup_def INF_less_iff by auto
       
  2535   then show "eventually (\<lambda>x. f x < a) F"
       
  2536     by (auto elim!: eventually_elim1 dest: SUP_lessD)
       
  2537 next
       
  2538   fix a assume "a < f0"
       
  2539   with assms have "a < Liminf F f" by simp
       
  2540   then obtain P where "eventually P F" "a < INFI (Collect P) f"
       
  2541     unfolding Liminf_def less_SUP_iff by auto
       
  2542   then show "eventually (\<lambda>x. a < f x) F"
       
  2543     by (auto elim!: eventually_elim1 dest: less_INF_D)
       
  2544 qed
       
  2545 
       
  2546 lemma tendsto_iff_Liminf_eq_Limsup:
       
  2547   fixes f0 :: "'a :: {complete_linorder, linorder_topology}"
       
  2548   shows "\<not> trivial_limit F \<Longrightarrow> (f ---> f0) F \<longleftrightarrow> (Liminf F f = f0 \<and> Limsup F f = f0)"
       
  2549   by (metis Liminf_eq_Limsup lim_imp_Limsup lim_imp_Liminf)
       
  2550 
  2406 lemma liminf_bounded_iff:
  2551 lemma liminf_bounded_iff:
  2407   fixes x :: "nat \<Rightarrow> ereal"
  2552   fixes x :: "nat \<Rightarrow> ereal"
  2408   shows "C \<le> liminf x \<longleftrightarrow> (\<forall>B<C. \<exists>N. \<forall>n\<ge>N. B < x n)" (is "?lhs <-> ?rhs")
  2553   shows "C \<le> liminf x \<longleftrightarrow> (\<forall>B<C. \<exists>N. \<forall>n\<ge>N. B < x n)" (is "?lhs <-> ?rhs")
  2409 proof safe
  2554   unfolding le_Liminf_iff eventually_sequentially ..
  2410   fix B assume "B < C" "C \<le> liminf x"
       
  2411   then have "B < liminf x" by auto
       
  2412   then obtain N where "B < (INF m:{N..}. x m)"
       
  2413     unfolding liminf_SUPR_INFI SUP_def less_Sup_iff by auto
       
  2414   from less_INF_D[OF this] show "\<exists>N. \<forall>n\<ge>N. B < x n" by auto
       
  2415 next
       
  2416   assume *: "\<forall>B<C. \<exists>N. \<forall>n\<ge>N. B < x n"
       
  2417   { fix B assume "B<C"
       
  2418     then obtain N where "\<forall>n\<ge>N. B < x n" using `?rhs` by auto
       
  2419     hence "B \<le> (INF m:{N..}. x m)" by (intro INF_greatest) auto
       
  2420     also have "... \<le> liminf x" unfolding liminf_SUPR_INFI by (intro SUP_upper) simp
       
  2421     finally have "B \<le> liminf x" .
       
  2422   } then show "?lhs"
       
  2423     by (metis * leD Liminf_bounded[OF sequentially_bot] linorder_le_less_linear eventually_sequentially)
       
  2424 qed
       
  2425 
  2555 
  2426 lemma liminf_subseq_mono:
  2556 lemma liminf_subseq_mono:
  2427   fixes X :: "nat \<Rightarrow> 'a :: complete_linorder"
  2557   fixes X :: "nat \<Rightarrow> 'a :: complete_linorder"
  2428   assumes "subseq r"
  2558   assumes "subseq r"
  2429   shows "liminf X \<le> liminf (X \<circ> r) "
  2559   shows "liminf X \<le> liminf (X \<circ> r) "
  2445   proof (safe intro!: SUP_mono)
  2575   proof (safe intro!: SUP_mono)
  2446     fix n m :: nat assume "n \<le> m" then show "\<exists>ma\<in>{n..}. (X \<circ> r) m \<le> X ma"
  2576     fix n m :: nat assume "n \<le> m" then show "\<exists>ma\<in>{n..}. (X \<circ> r) m \<le> X ma"
  2447       using seq_suble[OF `subseq r`, of m] by (intro bexI[of _ "r m"]) auto
  2577       using seq_suble[OF `subseq r`, of m] by (intro bexI[of _ "r m"]) auto
  2448   qed
  2578   qed
  2449   then show ?thesis by (auto intro!: INF_mono simp: limsup_INFI_SUPR comp_def)
  2579   then show ?thesis by (auto intro!: INF_mono simp: limsup_INFI_SUPR comp_def)
  2450 qed
       
  2451 
       
  2452 lemma lim_imp_Liminf:
       
  2453   fixes f :: "'a \<Rightarrow> ereal" (* generalize to inner dense, complete_linorder, order_topology *)
       
  2454   assumes ntriv: "\<not> trivial_limit F"
       
  2455   assumes lim: "(f ---> f0) F"
       
  2456   shows "Liminf F f = f0"
       
  2457 proof (rule Liminf_eqI)
       
  2458   fix y assume *: "\<And>P. eventually P F \<Longrightarrow> INFI (Collect P) f \<le> y"
       
  2459   show "f0 \<le> y"
       
  2460   proof (rule ereal_le_ereal)
       
  2461     fix B
       
  2462     assume "B < f0"
       
  2463     have "B \<le> INFI {x. B < f x} f"
       
  2464       by (rule INF_greatest) simp
       
  2465     also have "INFI {x. B < f x} f \<le> y"
       
  2466       using lim[THEN topological_tendstoD, of "{B <..}"] `B < f0` * by auto
       
  2467     finally show "B \<le> y" .
       
  2468   qed
       
  2469 next
       
  2470   fix P assume P: "eventually P F"
       
  2471   then have "eventually (\<lambda>x. INFI (Collect P) f \<le> f x) F"
       
  2472     by eventually_elim (auto intro!: INF_lower)
       
  2473   then show "INFI (Collect P) f \<le> f0"
       
  2474     by (rule tendsto_le[OF ntriv lim tendsto_const])
       
  2475 qed
       
  2476 
       
  2477 lemma lim_imp_Limsup:
       
  2478   fixes f :: "'a \<Rightarrow> ereal" (* generalize to inner dense, complete_linorder, order_topology *)
       
  2479   assumes ntriv: "\<not> trivial_limit F"
       
  2480   assumes lim: "(f ---> f0) F"
       
  2481   shows "Limsup F f = f0"
       
  2482 proof (rule Limsup_eqI)
       
  2483   fix y assume *: "\<And>P. eventually P F \<Longrightarrow> y \<le> SUPR (Collect P) f"
       
  2484   show "y \<le> f0"
       
  2485   proof (rule ereal_ge_ereal, safe)
       
  2486     fix B
       
  2487     assume "f0 < B"
       
  2488     have "y \<le> SUPR {x. f x < B} f"
       
  2489       using lim[THEN topological_tendstoD, of "{..< B}"] `f0 < B` * by auto
       
  2490     also have "SUPR {x. f x < B} f \<le> B"
       
  2491       by (rule SUP_least) simp
       
  2492     finally show "y \<le> B" .
       
  2493   qed
       
  2494 next
       
  2495   fix P assume P: "eventually P F"
       
  2496   then have "eventually (\<lambda>x. f x \<le> SUPR (Collect P) f) F"
       
  2497     by eventually_elim (auto intro!: SUP_upper)
       
  2498   then show "f0 \<le> SUPR (Collect P) f"
       
  2499     by (rule tendsto_le[OF ntriv tendsto_const lim])
       
  2500 qed
  2580 qed
  2501 
  2581 
  2502 definition (in order) mono_set:
  2582 definition (in order) mono_set:
  2503   "mono_set S \<longleftrightarrow> (\<forall>x y. x \<le> y \<longrightarrow> x \<in> S \<longrightarrow> y \<in> S)"
  2583   "mono_set S \<longleftrightarrow> (\<forall>x y. x \<le> y \<longrightarrow> x \<in> S \<longrightarrow> y \<in> S)"
  2504 
  2584