src/HOL/Library/Liminf_Limsup.thy
author haftmann
Wed Jul 18 20:51:21 2018 +0200 (11 months ago)
changeset 68658 16cc1161ad7f
parent 66447 a1f5c5c26fa6
child 68860 f443ec10447d
permissions -rw-r--r--
tuned equation
hoelzl@51340
     1
(*  Title:      HOL/Library/Liminf_Limsup.thy
hoelzl@51340
     2
    Author:     Johannes Hölzl, TU München
eberlm@62049
     3
    Author:     Manuel Eberl, TU München
hoelzl@51340
     4
*)
hoelzl@51340
     5
hoelzl@62624
     6
section \<open>Liminf and Limsup on conditionally complete lattices\<close>
hoelzl@51340
     7
hoelzl@51340
     8
theory Liminf_Limsup
wenzelm@51542
     9
imports Complex_Main
hoelzl@51340
    10
begin
hoelzl@51340
    11
hoelzl@62624
    12
lemma (in conditionally_complete_linorder) le_cSup_iff:
hoelzl@62624
    13
  assumes "A \<noteq> {}" "bdd_above A"
hoelzl@62624
    14
  shows "x \<le> Sup A \<longleftrightarrow> (\<forall>y<x. \<exists>a\<in>A. y < a)"
hoelzl@62624
    15
proof safe
hoelzl@62624
    16
  fix y assume "x \<le> Sup A" "y < x"
hoelzl@62624
    17
  then have "y < Sup A" by auto
hoelzl@62624
    18
  then show "\<exists>a\<in>A. y < a"
hoelzl@62624
    19
    unfolding less_cSup_iff[OF assms] .
hoelzl@62624
    20
qed (auto elim!: allE[of _ "Sup A"] simp add: not_le[symmetric] cSup_upper assms)
hoelzl@62624
    21
hoelzl@62624
    22
lemma (in conditionally_complete_linorder) le_cSUP_iff:
hoelzl@62624
    23
  "A \<noteq> {} \<Longrightarrow> bdd_above (f`A) \<Longrightarrow> x \<le> SUPREMUM A f \<longleftrightarrow> (\<forall>y<x. \<exists>i\<in>A. y < f i)"
hoelzl@62624
    24
  using le_cSup_iff [of "f ` A"] by simp
hoelzl@62624
    25
hoelzl@62624
    26
lemma le_cSup_iff_less:
hoelzl@62624
    27
  fixes x :: "'a :: {conditionally_complete_linorder, dense_linorder}"
hoelzl@62624
    28
  shows "A \<noteq> {} \<Longrightarrow> bdd_above (f`A) \<Longrightarrow> x \<le> (SUP i:A. f i) \<longleftrightarrow> (\<forall>y<x. \<exists>i\<in>A. y \<le> f i)"
hoelzl@62624
    29
  by (simp add: le_cSUP_iff)
hoelzl@62624
    30
     (blast intro: less_imp_le less_trans less_le_trans dest: dense)
hoelzl@62624
    31
hoelzl@51340
    32
lemma le_Sup_iff_less:
hoelzl@53216
    33
  fixes x :: "'a :: {complete_linorder, dense_linorder}"
hoelzl@51340
    34
  shows "x \<le> (SUP i:A. f i) \<longleftrightarrow> (\<forall>y<x. \<exists>i\<in>A. y \<le> f i)" (is "?lhs = ?rhs")
hoelzl@51340
    35
  unfolding le_SUP_iff
hoelzl@51340
    36
  by (blast intro: less_imp_le less_trans less_le_trans dest: dense)
hoelzl@51340
    37
hoelzl@62624
    38
lemma (in conditionally_complete_linorder) cInf_le_iff:
hoelzl@62624
    39
  assumes "A \<noteq> {}" "bdd_below A"
hoelzl@62624
    40
  shows "Inf A \<le> x \<longleftrightarrow> (\<forall>y>x. \<exists>a\<in>A. y > a)"
hoelzl@62624
    41
proof safe
hoelzl@62624
    42
  fix y assume "x \<ge> Inf A" "y > x"
hoelzl@62624
    43
  then have "y > Inf A" by auto
hoelzl@62624
    44
  then show "\<exists>a\<in>A. y > a"
hoelzl@62624
    45
    unfolding cInf_less_iff[OF assms] .
hoelzl@62624
    46
qed (auto elim!: allE[of _ "Inf A"] simp add: not_le[symmetric] cInf_lower assms)
hoelzl@62624
    47
hoelzl@62624
    48
lemma (in conditionally_complete_linorder) cINF_le_iff:
hoelzl@62624
    49
  "A \<noteq> {} \<Longrightarrow> bdd_below (f`A) \<Longrightarrow> INFIMUM A f \<le> x \<longleftrightarrow> (\<forall>y>x. \<exists>i\<in>A. y > f i)"
hoelzl@62624
    50
  using cInf_le_iff [of "f ` A"] by simp
hoelzl@62624
    51
hoelzl@62624
    52
lemma cInf_le_iff_less:
hoelzl@62624
    53
  fixes x :: "'a :: {conditionally_complete_linorder, dense_linorder}"
hoelzl@62624
    54
  shows "A \<noteq> {} \<Longrightarrow> bdd_below (f`A) \<Longrightarrow> (INF i:A. f i) \<le> x \<longleftrightarrow> (\<forall>y>x. \<exists>i\<in>A. f i \<le> y)"
hoelzl@62624
    55
  by (simp add: cINF_le_iff)
hoelzl@62624
    56
     (blast intro: less_imp_le less_trans le_less_trans dest: dense)
hoelzl@62624
    57
hoelzl@51340
    58
lemma Inf_le_iff_less:
hoelzl@53216
    59
  fixes x :: "'a :: {complete_linorder, dense_linorder}"
hoelzl@51340
    60
  shows "(INF i:A. f i) \<le> x \<longleftrightarrow> (\<forall>y>x. \<exists>i\<in>A. f i \<le> y)"
hoelzl@51340
    61
  unfolding INF_le_iff
hoelzl@51340
    62
  by (blast intro: less_imp_le less_trans le_less_trans dest: dense)
hoelzl@51340
    63
haftmann@56212
    64
lemma SUP_pair:
hoelzl@54257
    65
  fixes f :: "_ \<Rightarrow> _ \<Rightarrow> _ :: complete_lattice"
hoelzl@54257
    66
  shows "(SUP i : A. SUP j : B. f i j) = (SUP p : A \<times> B. f (fst p) (snd p))"
hoelzl@51340
    67
  by (rule antisym) (auto intro!: SUP_least SUP_upper2)
hoelzl@51340
    68
haftmann@56212
    69
lemma INF_pair:
hoelzl@54257
    70
  fixes f :: "_ \<Rightarrow> _ \<Rightarrow> _ :: complete_lattice"
hoelzl@54257
    71
  shows "(INF i : A. INF j : B. f i j) = (INF p : A \<times> B. f (fst p) (snd p))"
hoelzl@51340
    72
  by (rule antisym) (auto intro!: INF_greatest INF_lower2)
hoelzl@51340
    73
wenzelm@61585
    74
subsubsection \<open>\<open>Liminf\<close> and \<open>Limsup\<close>\<close>
hoelzl@51340
    75
hoelzl@54261
    76
definition Liminf :: "'a filter \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b :: complete_lattice" where
hoelzl@51340
    77
  "Liminf F f = (SUP P:{P. eventually P F}. INF x:{x. P x}. f x)"
hoelzl@51340
    78
hoelzl@54261
    79
definition Limsup :: "'a filter \<Rightarrow> ('a \<Rightarrow> 'b) \<Rightarrow> 'b :: complete_lattice" where
hoelzl@51340
    80
  "Limsup F f = (INF P:{P. eventually P F}. SUP x:{x. P x}. f x)"
hoelzl@51340
    81
hoelzl@51340
    82
abbreviation "liminf \<equiv> Liminf sequentially"
hoelzl@51340
    83
hoelzl@51340
    84
abbreviation "limsup \<equiv> Limsup sequentially"
hoelzl@51340
    85
hoelzl@51340
    86
lemma Liminf_eqI:
wenzelm@61730
    87
  "(\<And>P. eventually P F \<Longrightarrow> INFIMUM (Collect P) f \<le> x) \<Longrightarrow>
haftmann@56218
    88
    (\<And>y. (\<And>P. eventually P F \<Longrightarrow> INFIMUM (Collect P) f \<le> y) \<Longrightarrow> x \<le> y) \<Longrightarrow> Liminf F f = x"
hoelzl@51340
    89
  unfolding Liminf_def by (auto intro!: SUP_eqI)
hoelzl@51340
    90
hoelzl@51340
    91
lemma Limsup_eqI:
wenzelm@61730
    92
  "(\<And>P. eventually P F \<Longrightarrow> x \<le> SUPREMUM (Collect P) f) \<Longrightarrow>
haftmann@56218
    93
    (\<And>y. (\<And>P. eventually P F \<Longrightarrow> y \<le> SUPREMUM (Collect P) f) \<Longrightarrow> y \<le> x) \<Longrightarrow> Limsup F f = x"
hoelzl@51340
    94
  unfolding Limsup_def by (auto intro!: INF_eqI)
hoelzl@51340
    95
haftmann@56212
    96
lemma liminf_SUP_INF: "liminf f = (SUP n. INF m:{n..}. f m)"
hoelzl@51340
    97
  unfolding Liminf_def eventually_sequentially
haftmann@56212
    98
  by (rule SUP_eq) (auto simp: atLeast_def intro!: INF_mono)
hoelzl@51340
    99
haftmann@56212
   100
lemma limsup_INF_SUP: "limsup f = (INF n. SUP m:{n..}. f m)"
hoelzl@51340
   101
  unfolding Limsup_def eventually_sequentially
haftmann@56212
   102
  by (rule INF_eq) (auto simp: atLeast_def intro!: SUP_mono)
hoelzl@51340
   103
wenzelm@61730
   104
lemma Limsup_const:
hoelzl@51340
   105
  assumes ntriv: "\<not> trivial_limit F"
hoelzl@54261
   106
  shows "Limsup F (\<lambda>x. c) = c"
hoelzl@51340
   107
proof -
hoelzl@51340
   108
  have *: "\<And>P. Ex P \<longleftrightarrow> P \<noteq> (\<lambda>x. False)" by auto
hoelzl@51340
   109
  have "\<And>P. eventually P F \<Longrightarrow> (SUP x : {x. P x}. c) = c"
hoelzl@51340
   110
    using ntriv by (intro SUP_const) (auto simp: eventually_False *)
hoelzl@51340
   111
  then show ?thesis
hoelzl@51340
   112
    unfolding Limsup_def using eventually_True
hoelzl@51340
   113
    by (subst INF_cong[where D="\<lambda>x. c"])
hoelzl@51340
   114
       (auto intro!: INF_const simp del: eventually_True)
hoelzl@51340
   115
qed
hoelzl@51340
   116
hoelzl@51340
   117
lemma Liminf_const:
hoelzl@51340
   118
  assumes ntriv: "\<not> trivial_limit F"
hoelzl@54261
   119
  shows "Liminf F (\<lambda>x. c) = c"
hoelzl@51340
   120
proof -
hoelzl@51340
   121
  have *: "\<And>P. Ex P \<longleftrightarrow> P \<noteq> (\<lambda>x. False)" by auto
hoelzl@51340
   122
  have "\<And>P. eventually P F \<Longrightarrow> (INF x : {x. P x}. c) = c"
hoelzl@51340
   123
    using ntriv by (intro INF_const) (auto simp: eventually_False *)
hoelzl@51340
   124
  then show ?thesis
hoelzl@51340
   125
    unfolding Liminf_def using eventually_True
hoelzl@51340
   126
    by (subst SUP_cong[where D="\<lambda>x. c"])
hoelzl@51340
   127
       (auto intro!: SUP_const simp del: eventually_True)
hoelzl@51340
   128
qed
hoelzl@51340
   129
hoelzl@51340
   130
lemma Liminf_mono:
hoelzl@51340
   131
  assumes ev: "eventually (\<lambda>x. f x \<le> g x) F"
hoelzl@51340
   132
  shows "Liminf F f \<le> Liminf F g"
hoelzl@51340
   133
  unfolding Liminf_def
hoelzl@51340
   134
proof (safe intro!: SUP_mono)
hoelzl@51340
   135
  fix P assume "eventually P F"
hoelzl@51340
   136
  with ev have "eventually (\<lambda>x. f x \<le> g x \<and> P x) F" (is "eventually ?Q F") by (rule eventually_conj)
haftmann@56218
   137
  then show "\<exists>Q\<in>{P. eventually P F}. INFIMUM (Collect P) f \<le> INFIMUM (Collect Q) g"
hoelzl@51340
   138
    by (intro bexI[of _ ?Q]) (auto intro!: INF_mono)
hoelzl@51340
   139
qed
hoelzl@51340
   140
hoelzl@51340
   141
lemma Liminf_eq:
hoelzl@51340
   142
  assumes "eventually (\<lambda>x. f x = g x) F"
hoelzl@51340
   143
  shows "Liminf F f = Liminf F g"
lp15@61810
   144
  by (intro antisym Liminf_mono eventually_mono[OF assms]) auto
hoelzl@51340
   145
hoelzl@51340
   146
lemma Limsup_mono:
hoelzl@51340
   147
  assumes ev: "eventually (\<lambda>x. f x \<le> g x) F"
hoelzl@51340
   148
  shows "Limsup F f \<le> Limsup F g"
hoelzl@51340
   149
  unfolding Limsup_def
hoelzl@51340
   150
proof (safe intro!: INF_mono)
hoelzl@51340
   151
  fix P assume "eventually P F"
hoelzl@51340
   152
  with ev have "eventually (\<lambda>x. f x \<le> g x \<and> P x) F" (is "eventually ?Q F") by (rule eventually_conj)
haftmann@56218
   153
  then show "\<exists>Q\<in>{P. eventually P F}. SUPREMUM (Collect Q) f \<le> SUPREMUM (Collect P) g"
hoelzl@51340
   154
    by (intro bexI[of _ ?Q]) (auto intro!: SUP_mono)
hoelzl@51340
   155
qed
hoelzl@51340
   156
hoelzl@51340
   157
lemma Limsup_eq:
hoelzl@51340
   158
  assumes "eventually (\<lambda>x. f x = g x) net"
hoelzl@51340
   159
  shows "Limsup net f = Limsup net g"
lp15@61810
   160
  by (intro antisym Limsup_mono eventually_mono[OF assms]) auto
hoelzl@51340
   161
immler@63895
   162
lemma Liminf_bot[simp]: "Liminf bot f = top"
immler@63895
   163
  unfolding Liminf_def top_unique[symmetric]
immler@63895
   164
  by (rule SUP_upper2[where i="\<lambda>x. False"]) simp_all
immler@63895
   165
immler@63895
   166
lemma Limsup_bot[simp]: "Limsup bot f = bot"
immler@63895
   167
  unfolding Limsup_def bot_unique[symmetric]
immler@63895
   168
  by (rule INF_lower2[where i="\<lambda>x. False"]) simp_all
immler@63895
   169
hoelzl@51340
   170
lemma Liminf_le_Limsup:
hoelzl@51340
   171
  assumes ntriv: "\<not> trivial_limit F"
hoelzl@51340
   172
  shows "Liminf F f \<le> Limsup F f"
hoelzl@51340
   173
  unfolding Limsup_def Liminf_def
hoelzl@54261
   174
  apply (rule SUP_least)
hoelzl@54261
   175
  apply (rule INF_greatest)
hoelzl@51340
   176
proof safe
hoelzl@51340
   177
  fix P Q assume "eventually P F" "eventually Q F"
hoelzl@51340
   178
  then have "eventually (\<lambda>x. P x \<and> Q x) F" (is "eventually ?C F") by (rule eventually_conj)
hoelzl@51340
   179
  then have not_False: "(\<lambda>x. P x \<and> Q x) \<noteq> (\<lambda>x. False)"
hoelzl@51340
   180
    using ntriv by (auto simp add: eventually_False)
haftmann@56218
   181
  have "INFIMUM (Collect P) f \<le> INFIMUM (Collect ?C) f"
hoelzl@51340
   182
    by (rule INF_mono) auto
haftmann@56218
   183
  also have "\<dots> \<le> SUPREMUM (Collect ?C) f"
hoelzl@51340
   184
    using not_False by (intro INF_le_SUP) auto
haftmann@56218
   185
  also have "\<dots> \<le> SUPREMUM (Collect Q) f"
hoelzl@51340
   186
    by (rule SUP_mono) auto
haftmann@56218
   187
  finally show "INFIMUM (Collect P) f \<le> SUPREMUM (Collect Q) f" .
hoelzl@51340
   188
qed
hoelzl@51340
   189
hoelzl@51340
   190
lemma Liminf_bounded:
hoelzl@51340
   191
  assumes le: "eventually (\<lambda>n. C \<le> X n) F"
hoelzl@51340
   192
  shows "C \<le> Liminf F X"
immler@63895
   193
  using Liminf_mono[OF le] Liminf_const[of F C]
immler@63895
   194
  by (cases "F = bot") simp_all
hoelzl@51340
   195
hoelzl@51340
   196
lemma Limsup_bounded:
hoelzl@51340
   197
  assumes le: "eventually (\<lambda>n. X n \<le> C) F"
hoelzl@51340
   198
  shows "Limsup F X \<le> C"
immler@63895
   199
  using Limsup_mono[OF le] Limsup_const[of F C]
immler@63895
   200
  by (cases "F = bot") simp_all
hoelzl@51340
   201
hoelzl@61245
   202
lemma le_Limsup:
hoelzl@61245
   203
  assumes F: "F \<noteq> bot" and x: "\<forall>\<^sub>F x in F. l \<le> f x"
hoelzl@61245
   204
  shows "l \<le> Limsup F f"
immler@63895
   205
  using F Liminf_bounded Liminf_le_Limsup order.trans x by blast
immler@63895
   206
immler@63895
   207
lemma Liminf_le:
immler@63895
   208
  assumes F: "F \<noteq> bot" and x: "\<forall>\<^sub>F x in F. f x \<le> l"
immler@63895
   209
  shows "Liminf F f \<le> l"
immler@63895
   210
  using F Liminf_le_Limsup Limsup_bounded order.trans x by blast
hoelzl@61245
   211
hoelzl@51340
   212
lemma le_Liminf_iff:
hoelzl@51340
   213
  fixes X :: "_ \<Rightarrow> _ :: complete_linorder"
hoelzl@51340
   214
  shows "C \<le> Liminf F X \<longleftrightarrow> (\<forall>y<C. eventually (\<lambda>x. y < X x) F)"
hoelzl@51340
   215
proof -
wenzelm@61730
   216
  have "eventually (\<lambda>x. y < X x) F"
wenzelm@61730
   217
    if "eventually P F" "y < INFIMUM (Collect P) X" for y P
lp15@61810
   218
    using that by (auto elim!: eventually_mono dest: less_INF_D)
hoelzl@51340
   219
  moreover
wenzelm@61730
   220
  have "\<exists>P. eventually P F \<and> y < INFIMUM (Collect P) X"
wenzelm@61730
   221
    if "y < C" and y: "\<forall>y<C. eventually (\<lambda>x. y < X x) F" for y P
wenzelm@61730
   222
  proof (cases "\<exists>z. y < z \<and> z < C")
wenzelm@61730
   223
    case True
wenzelm@61730
   224
    then obtain z where z: "y < z \<and> z < C" ..
wenzelm@61730
   225
    moreover from z have "z \<le> INFIMUM {x. z < X x} X"
wenzelm@61730
   226
      by (auto intro!: INF_greatest)
wenzelm@61730
   227
    ultimately show ?thesis
wenzelm@61730
   228
      using y by (intro exI[of _ "\<lambda>x. z < X x"]) auto
wenzelm@61730
   229
  next
wenzelm@61730
   230
    case False
wenzelm@61730
   231
    then have "C \<le> INFIMUM {x. y < X x} X"
wenzelm@61730
   232
      by (intro INF_greatest) auto
wenzelm@61730
   233
    with \<open>y < C\<close> show ?thesis
wenzelm@61730
   234
      using y by (intro exI[of _ "\<lambda>x. y < X x"]) auto
wenzelm@61730
   235
  qed
hoelzl@51340
   236
  ultimately show ?thesis
hoelzl@51340
   237
    unfolding Liminf_def le_SUP_iff by auto
hoelzl@51340
   238
qed
hoelzl@51340
   239
eberlm@62049
   240
lemma Limsup_le_iff:
eberlm@62049
   241
  fixes X :: "_ \<Rightarrow> _ :: complete_linorder"
eberlm@62049
   242
  shows "C \<ge> Limsup F X \<longleftrightarrow> (\<forall>y>C. eventually (\<lambda>x. y > X x) F)"
eberlm@62049
   243
proof -
eberlm@62049
   244
  { fix y P assume "eventually P F" "y > SUPREMUM (Collect P) X"
eberlm@62049
   245
    then have "eventually (\<lambda>x. y > X x) F"
eberlm@62049
   246
      by (auto elim!: eventually_mono dest: SUP_lessD) }
eberlm@62049
   247
  moreover
eberlm@62049
   248
  { fix y P assume "y > C" and y: "\<forall>y>C. eventually (\<lambda>x. y > X x) F"
eberlm@62049
   249
    have "\<exists>P. eventually P F \<and> y > SUPREMUM (Collect P) X"
eberlm@62049
   250
    proof (cases "\<exists>z. C < z \<and> z < y")
eberlm@62049
   251
      case True
eberlm@62049
   252
      then obtain z where z: "C < z \<and> z < y" ..
eberlm@62049
   253
      moreover from z have "z \<ge> SUPREMUM {x. z > X x} X"
eberlm@62049
   254
        by (auto intro!: SUP_least)
eberlm@62049
   255
      ultimately show ?thesis
eberlm@62049
   256
        using y by (intro exI[of _ "\<lambda>x. z > X x"]) auto
eberlm@62049
   257
    next
eberlm@62049
   258
      case False
eberlm@62049
   259
      then have "C \<ge> SUPREMUM {x. y > X x} X"
eberlm@62049
   260
        by (intro SUP_least) (auto simp: not_less)
eberlm@62049
   261
      with \<open>y > C\<close> show ?thesis
eberlm@62049
   262
        using y by (intro exI[of _ "\<lambda>x. y > X x"]) auto
eberlm@62049
   263
    qed }
eberlm@62049
   264
  ultimately show ?thesis
eberlm@62049
   265
    unfolding Limsup_def INF_le_iff by auto
eberlm@62049
   266
qed
eberlm@62049
   267
eberlm@62049
   268
lemma less_LiminfD:
eberlm@62049
   269
  "y < Liminf F (f :: _ \<Rightarrow> 'a :: complete_linorder) \<Longrightarrow> eventually (\<lambda>x. f x > y) F"
eberlm@62049
   270
  using le_Liminf_iff[of "Liminf F f" F f] by simp
eberlm@62049
   271
eberlm@62049
   272
lemma Limsup_lessD:
eberlm@62049
   273
  "y > Limsup F (f :: _ \<Rightarrow> 'a :: complete_linorder) \<Longrightarrow> eventually (\<lambda>x. f x < y) F"
eberlm@62049
   274
  using Limsup_le_iff[of F f "Limsup F f"] by simp
eberlm@62049
   275
hoelzl@51340
   276
lemma lim_imp_Liminf:
wenzelm@61730
   277
  fixes f :: "'a \<Rightarrow> _ :: {complete_linorder,linorder_topology}"
hoelzl@51340
   278
  assumes ntriv: "\<not> trivial_limit F"
wenzelm@61973
   279
  assumes lim: "(f \<longlongrightarrow> f0) F"
hoelzl@51340
   280
  shows "Liminf F f = f0"
hoelzl@51340
   281
proof (intro Liminf_eqI)
hoelzl@51340
   282
  fix P assume P: "eventually P F"
haftmann@56218
   283
  then have "eventually (\<lambda>x. INFIMUM (Collect P) f \<le> f x) F"
hoelzl@51340
   284
    by eventually_elim (auto intro!: INF_lower)
haftmann@56218
   285
  then show "INFIMUM (Collect P) f \<le> f0"
hoelzl@51340
   286
    by (rule tendsto_le[OF ntriv lim tendsto_const])
hoelzl@51340
   287
next
haftmann@56218
   288
  fix y assume upper: "\<And>P. eventually P F \<Longrightarrow> INFIMUM (Collect P) f \<le> y"
hoelzl@51340
   289
  show "f0 \<le> y"
hoelzl@51340
   290
  proof cases
hoelzl@51340
   291
    assume "\<exists>z. y < z \<and> z < f0"
wenzelm@53374
   292
    then obtain z where "y < z \<and> z < f0" ..
haftmann@56218
   293
    moreover have "z \<le> INFIMUM {x. z < f x} f"
hoelzl@51340
   294
      by (rule INF_greatest) simp
hoelzl@51340
   295
    ultimately show ?thesis
hoelzl@51340
   296
      using lim[THEN topological_tendstoD, THEN upper, of "{z <..}"] by auto
hoelzl@51340
   297
  next
hoelzl@51340
   298
    assume discrete: "\<not> (\<exists>z. y < z \<and> z < f0)"
hoelzl@51340
   299
    show ?thesis
hoelzl@51340
   300
    proof (rule classical)
hoelzl@51340
   301
      assume "\<not> f0 \<le> y"
hoelzl@51340
   302
      then have "eventually (\<lambda>x. y < f x) F"
hoelzl@51340
   303
        using lim[THEN topological_tendstoD, of "{y <..}"] by auto
hoelzl@51340
   304
      then have "eventually (\<lambda>x. f0 \<le> f x) F"
lp15@61810
   305
        using discrete by (auto elim!: eventually_mono)
haftmann@56218
   306
      then have "INFIMUM {x. f0 \<le> f x} f \<le> y"
hoelzl@51340
   307
        by (rule upper)
haftmann@56218
   308
      moreover have "f0 \<le> INFIMUM {x. f0 \<le> f x} f"
hoelzl@51340
   309
        by (intro INF_greatest) simp
hoelzl@51340
   310
      ultimately show "f0 \<le> y" by simp
hoelzl@51340
   311
    qed
hoelzl@51340
   312
  qed
hoelzl@51340
   313
qed
hoelzl@51340
   314
hoelzl@51340
   315
lemma lim_imp_Limsup:
wenzelm@61730
   316
  fixes f :: "'a \<Rightarrow> _ :: {complete_linorder,linorder_topology}"
hoelzl@51340
   317
  assumes ntriv: "\<not> trivial_limit F"
wenzelm@61973
   318
  assumes lim: "(f \<longlongrightarrow> f0) F"
hoelzl@51340
   319
  shows "Limsup F f = f0"
hoelzl@51340
   320
proof (intro Limsup_eqI)
hoelzl@51340
   321
  fix P assume P: "eventually P F"
haftmann@56218
   322
  then have "eventually (\<lambda>x. f x \<le> SUPREMUM (Collect P) f) F"
hoelzl@51340
   323
    by eventually_elim (auto intro!: SUP_upper)
haftmann@56218
   324
  then show "f0 \<le> SUPREMUM (Collect P) f"
hoelzl@51340
   325
    by (rule tendsto_le[OF ntriv tendsto_const lim])
hoelzl@51340
   326
next
haftmann@56218
   327
  fix y assume lower: "\<And>P. eventually P F \<Longrightarrow> y \<le> SUPREMUM (Collect P) f"
hoelzl@51340
   328
  show "y \<le> f0"
wenzelm@53381
   329
  proof (cases "\<exists>z. f0 < z \<and> z < y")
wenzelm@53381
   330
    case True
wenzelm@53381
   331
    then obtain z where "f0 < z \<and> z < y" ..
haftmann@56218
   332
    moreover have "SUPREMUM {x. f x < z} f \<le> z"
hoelzl@51340
   333
      by (rule SUP_least) simp
hoelzl@51340
   334
    ultimately show ?thesis
hoelzl@51340
   335
      using lim[THEN topological_tendstoD, THEN lower, of "{..< z}"] by auto
hoelzl@51340
   336
  next
wenzelm@53381
   337
    case False
hoelzl@51340
   338
    show ?thesis
hoelzl@51340
   339
    proof (rule classical)
hoelzl@51340
   340
      assume "\<not> y \<le> f0"
hoelzl@51340
   341
      then have "eventually (\<lambda>x. f x < y) F"
hoelzl@51340
   342
        using lim[THEN topological_tendstoD, of "{..< y}"] by auto
hoelzl@51340
   343
      then have "eventually (\<lambda>x. f x \<le> f0) F"
lp15@61810
   344
        using False by (auto elim!: eventually_mono simp: not_less)
haftmann@56218
   345
      then have "y \<le> SUPREMUM {x. f x \<le> f0} f"
hoelzl@51340
   346
        by (rule lower)
haftmann@56218
   347
      moreover have "SUPREMUM {x. f x \<le> f0} f \<le> f0"
hoelzl@51340
   348
        by (intro SUP_least) simp
hoelzl@51340
   349
      ultimately show "y \<le> f0" by simp
hoelzl@51340
   350
    qed
hoelzl@51340
   351
  qed
hoelzl@51340
   352
qed
hoelzl@51340
   353
hoelzl@51340
   354
lemma Liminf_eq_Limsup:
wenzelm@61730
   355
  fixes f0 :: "'a :: {complete_linorder,linorder_topology}"
hoelzl@51340
   356
  assumes ntriv: "\<not> trivial_limit F"
hoelzl@51340
   357
    and lim: "Liminf F f = f0" "Limsup F f = f0"
wenzelm@61973
   358
  shows "(f \<longlongrightarrow> f0) F"
hoelzl@51340
   359
proof (rule order_tendstoI)
hoelzl@51340
   360
  fix a assume "f0 < a"
hoelzl@51340
   361
  with assms have "Limsup F f < a" by simp
haftmann@56218
   362
  then obtain P where "eventually P F" "SUPREMUM (Collect P) f < a"
hoelzl@51340
   363
    unfolding Limsup_def INF_less_iff by auto
hoelzl@51340
   364
  then show "eventually (\<lambda>x. f x < a) F"
lp15@61810
   365
    by (auto elim!: eventually_mono dest: SUP_lessD)
hoelzl@51340
   366
next
hoelzl@51340
   367
  fix a assume "a < f0"
hoelzl@51340
   368
  with assms have "a < Liminf F f" by simp
haftmann@56218
   369
  then obtain P where "eventually P F" "a < INFIMUM (Collect P) f"
hoelzl@51340
   370
    unfolding Liminf_def less_SUP_iff by auto
hoelzl@51340
   371
  then show "eventually (\<lambda>x. a < f x) F"
lp15@61810
   372
    by (auto elim!: eventually_mono dest: less_INF_D)
hoelzl@51340
   373
qed
hoelzl@51340
   374
hoelzl@51340
   375
lemma tendsto_iff_Liminf_eq_Limsup:
wenzelm@61730
   376
  fixes f0 :: "'a :: {complete_linorder,linorder_topology}"
wenzelm@61973
   377
  shows "\<not> trivial_limit F \<Longrightarrow> (f \<longlongrightarrow> f0) F \<longleftrightarrow> (Liminf F f = f0 \<and> Limsup F f = f0)"
hoelzl@51340
   378
  by (metis Liminf_eq_Limsup lim_imp_Limsup lim_imp_Liminf)
hoelzl@51340
   379
hoelzl@51340
   380
lemma liminf_subseq_mono:
hoelzl@51340
   381
  fixes X :: "nat \<Rightarrow> 'a :: complete_linorder"
eberlm@66447
   382
  assumes "strict_mono r"
hoelzl@51340
   383
  shows "liminf X \<le> liminf (X \<circ> r) "
hoelzl@51340
   384
proof-
hoelzl@51340
   385
  have "\<And>n. (INF m:{n..}. X m) \<le> (INF m:{n..}. (X \<circ> r) m)"
hoelzl@51340
   386
  proof (safe intro!: INF_mono)
hoelzl@51340
   387
    fix n m :: nat assume "n \<le> m" then show "\<exists>ma\<in>{n..}. X ma \<le> (X \<circ> r) m"
eberlm@66447
   388
      using seq_suble[OF \<open>strict_mono r\<close>, of m] by (intro bexI[of _ "r m"]) auto
hoelzl@51340
   389
  qed
haftmann@56212
   390
  then show ?thesis by (auto intro!: SUP_mono simp: liminf_SUP_INF comp_def)
hoelzl@51340
   391
qed
hoelzl@51340
   392
hoelzl@51340
   393
lemma limsup_subseq_mono:
hoelzl@51340
   394
  fixes X :: "nat \<Rightarrow> 'a :: complete_linorder"
eberlm@66447
   395
  assumes "strict_mono r"
hoelzl@51340
   396
  shows "limsup (X \<circ> r) \<le> limsup X"
hoelzl@51340
   397
proof-
wenzelm@61730
   398
  have "(SUP m:{n..}. (X \<circ> r) m) \<le> (SUP m:{n..}. X m)" for n
hoelzl@51340
   399
  proof (safe intro!: SUP_mono)
wenzelm@61730
   400
    fix m :: nat
wenzelm@61730
   401
    assume "n \<le> m"
wenzelm@61730
   402
    then show "\<exists>ma\<in>{n..}. (X \<circ> r) m \<le> X ma"
eberlm@66447
   403
      using seq_suble[OF \<open>strict_mono r\<close>, of m] by (intro bexI[of _ "r m"]) auto
hoelzl@51340
   404
  qed
wenzelm@61730
   405
  then show ?thesis
wenzelm@61730
   406
    by (auto intro!: INF_mono simp: limsup_INF_SUP comp_def)
hoelzl@51340
   407
qed
hoelzl@51340
   408
wenzelm@61730
   409
lemma continuous_on_imp_continuous_within:
wenzelm@61730
   410
  "continuous_on s f \<Longrightarrow> t \<subseteq> s \<Longrightarrow> x \<in> s \<Longrightarrow> continuous (at x within t) f"
wenzelm@61730
   411
  unfolding continuous_on_eq_continuous_within
wenzelm@61730
   412
  by (auto simp: continuous_within intro: tendsto_within_subset)
hoelzl@61245
   413
eberlm@62049
   414
lemma Liminf_compose_continuous_mono:
eberlm@62049
   415
  fixes f :: "'a::{complete_linorder, linorder_topology} \<Rightarrow> 'b::{complete_linorder, linorder_topology}"
eberlm@62049
   416
  assumes c: "continuous_on UNIV f" and am: "mono f" and F: "F \<noteq> bot"
eberlm@62049
   417
  shows "Liminf F (\<lambda>n. f (g n)) = f (Liminf F g)"
eberlm@62049
   418
proof -
eberlm@62049
   419
  { fix P assume "eventually P F"
eberlm@62049
   420
    have "\<exists>x. P x"
eberlm@62049
   421
    proof (rule ccontr)
eberlm@62049
   422
      assume "\<not> (\<exists>x. P x)" then have "P = (\<lambda>x. False)"
eberlm@62049
   423
        by auto
eberlm@62049
   424
      with \<open>eventually P F\<close> F show False
eberlm@62049
   425
        by auto
eberlm@62049
   426
    qed }
eberlm@62049
   427
  note * = this
eberlm@62049
   428
eberlm@62049
   429
  have "f (Liminf F g) = (SUP P : {P. eventually P F}. f (Inf (g ` Collect P)))"
haftmann@62343
   430
    unfolding Liminf_def
eberlm@62049
   431
    by (subst continuous_at_Sup_mono[OF am continuous_on_imp_continuous_within[OF c]])
eberlm@62049
   432
       (auto intro: eventually_True)
eberlm@62049
   433
  also have "\<dots> = (SUP P : {P. eventually P F}. INFIMUM (g ` Collect P) f)"
eberlm@62049
   434
    by (intro SUP_cong refl continuous_at_Inf_mono[OF am continuous_on_imp_continuous_within[OF c]])
eberlm@62049
   435
       (auto dest!: eventually_happens simp: F)
eberlm@62049
   436
  finally show ?thesis by (auto simp: Liminf_def)
eberlm@62049
   437
qed
eberlm@62049
   438
eberlm@62049
   439
lemma Limsup_compose_continuous_mono:
eberlm@62049
   440
  fixes f :: "'a::{complete_linorder, linorder_topology} \<Rightarrow> 'b::{complete_linorder, linorder_topology}"
eberlm@62049
   441
  assumes c: "continuous_on UNIV f" and am: "mono f" and F: "F \<noteq> bot"
eberlm@62049
   442
  shows "Limsup F (\<lambda>n. f (g n)) = f (Limsup F g)"
eberlm@62049
   443
proof -
eberlm@62049
   444
  { fix P assume "eventually P F"
eberlm@62049
   445
    have "\<exists>x. P x"
eberlm@62049
   446
    proof (rule ccontr)
eberlm@62049
   447
      assume "\<not> (\<exists>x. P x)" then have "P = (\<lambda>x. False)"
eberlm@62049
   448
        by auto
eberlm@62049
   449
      with \<open>eventually P F\<close> F show False
eberlm@62049
   450
        by auto
eberlm@62049
   451
    qed }
eberlm@62049
   452
  note * = this
eberlm@62049
   453
eberlm@62049
   454
  have "f (Limsup F g) = (INF P : {P. eventually P F}. f (Sup (g ` Collect P)))"
haftmann@62343
   455
    unfolding Limsup_def
eberlm@62049
   456
    by (subst continuous_at_Inf_mono[OF am continuous_on_imp_continuous_within[OF c]])
eberlm@62049
   457
       (auto intro: eventually_True)
eberlm@62049
   458
  also have "\<dots> = (INF P : {P. eventually P F}. SUPREMUM (g ` Collect P) f)"
eberlm@62049
   459
    by (intro INF_cong refl continuous_at_Sup_mono[OF am continuous_on_imp_continuous_within[OF c]])
eberlm@62049
   460
       (auto dest!: eventually_happens simp: F)
eberlm@62049
   461
  finally show ?thesis by (auto simp: Limsup_def)
eberlm@62049
   462
qed
eberlm@62049
   463
hoelzl@61245
   464
lemma Liminf_compose_continuous_antimono:
wenzelm@61730
   465
  fixes f :: "'a::{complete_linorder,linorder_topology} \<Rightarrow> 'b::{complete_linorder,linorder_topology}"
wenzelm@61730
   466
  assumes c: "continuous_on UNIV f"
wenzelm@61730
   467
    and am: "antimono f"
wenzelm@61730
   468
    and F: "F \<noteq> bot"
hoelzl@61245
   469
  shows "Liminf F (\<lambda>n. f (g n)) = f (Limsup F g)"
hoelzl@61245
   470
proof -
wenzelm@61730
   471
  have *: "\<exists>x. P x" if "eventually P F" for P
wenzelm@61730
   472
  proof (rule ccontr)
wenzelm@61730
   473
    assume "\<not> (\<exists>x. P x)" then have "P = (\<lambda>x. False)"
wenzelm@61730
   474
      by auto
wenzelm@61730
   475
    with \<open>eventually P F\<close> F show False
wenzelm@61730
   476
      by auto
wenzelm@61730
   477
  qed
hoelzl@61245
   478
  have "f (Limsup F g) = (SUP P : {P. eventually P F}. f (Sup (g ` Collect P)))"
haftmann@62343
   479
    unfolding Limsup_def
hoelzl@61245
   480
    by (subst continuous_at_Inf_antimono[OF am continuous_on_imp_continuous_within[OF c]])
hoelzl@61245
   481
       (auto intro: eventually_True)
hoelzl@61245
   482
  also have "\<dots> = (SUP P : {P. eventually P F}. INFIMUM (g ` Collect P) f)"
hoelzl@61245
   483
    by (intro SUP_cong refl continuous_at_Sup_antimono[OF am continuous_on_imp_continuous_within[OF c]])
hoelzl@61245
   484
       (auto dest!: eventually_happens simp: F)
hoelzl@61245
   485
  finally show ?thesis
hoelzl@61245
   486
    by (auto simp: Liminf_def)
hoelzl@61245
   487
qed
eberlm@62049
   488
eberlm@62049
   489
lemma Limsup_compose_continuous_antimono:
eberlm@62049
   490
  fixes f :: "'a::{complete_linorder, linorder_topology} \<Rightarrow> 'b::{complete_linorder, linorder_topology}"
eberlm@62049
   491
  assumes c: "continuous_on UNIV f" and am: "antimono f" and F: "F \<noteq> bot"
eberlm@62049
   492
  shows "Limsup F (\<lambda>n. f (g n)) = f (Liminf F g)"
eberlm@62049
   493
proof -
eberlm@62049
   494
  { fix P assume "eventually P F"
eberlm@62049
   495
    have "\<exists>x. P x"
eberlm@62049
   496
    proof (rule ccontr)
eberlm@62049
   497
      assume "\<not> (\<exists>x. P x)" then have "P = (\<lambda>x. False)"
eberlm@62049
   498
        by auto
eberlm@62049
   499
      with \<open>eventually P F\<close> F show False
eberlm@62049
   500
        by auto
eberlm@62049
   501
    qed }
eberlm@62049
   502
  note * = this
eberlm@62049
   503
eberlm@62049
   504
  have "f (Liminf F g) = (INF P : {P. eventually P F}. f (Inf (g ` Collect P)))"
haftmann@62343
   505
    unfolding Liminf_def
eberlm@62049
   506
    by (subst continuous_at_Sup_antimono[OF am continuous_on_imp_continuous_within[OF c]])
eberlm@62049
   507
       (auto intro: eventually_True)
eberlm@62049
   508
  also have "\<dots> = (INF P : {P. eventually P F}. SUPREMUM (g ` Collect P) f)"
eberlm@62049
   509
    by (intro INF_cong refl continuous_at_Inf_antimono[OF am continuous_on_imp_continuous_within[OF c]])
eberlm@62049
   510
       (auto dest!: eventually_happens simp: F)
eberlm@62049
   511
  finally show ?thesis
eberlm@62049
   512
    by (auto simp: Limsup_def)
eberlm@62049
   513
qed
eberlm@62049
   514
immler@63895
   515
lemma Liminf_filtermap_le: "Liminf (filtermap f F) g \<le> Liminf F (\<lambda>x. g (f x))"
immler@63895
   516
  apply (cases "F = bot", simp)
immler@63895
   517
  by (subst Liminf_def)
immler@63895
   518
    (auto simp add: INF_lower Liminf_bounded eventually_filtermap eventually_mono intro!: SUP_least)
immler@63895
   519
immler@63895
   520
lemma Limsup_filtermap_ge: "Limsup (filtermap f F) g \<ge> Limsup F (\<lambda>x. g (f x))"
immler@63895
   521
  apply (cases "F = bot", simp)
immler@63895
   522
  by (subst Limsup_def)
immler@63895
   523
    (auto simp add: SUP_upper Limsup_bounded eventually_filtermap eventually_mono intro!: INF_greatest)
immler@63895
   524
immler@63895
   525
lemma Liminf_least: "(\<And>P. eventually P F \<Longrightarrow> (INF x:Collect P. f x) \<le> x) \<Longrightarrow> Liminf F f \<le> x"
immler@63895
   526
  by (auto intro!: SUP_least simp: Liminf_def)
immler@63895
   527
immler@63895
   528
lemma Limsup_greatest: "(\<And>P. eventually P F \<Longrightarrow> x \<le> (SUP x:Collect P. f x)) \<Longrightarrow> Limsup F f \<ge> x"
immler@63895
   529
  by (auto intro!: INF_greatest simp: Limsup_def)
immler@63895
   530
immler@63895
   531
lemma Liminf_filtermap_ge: "inj f \<Longrightarrow> Liminf (filtermap f F) g \<ge> Liminf F (\<lambda>x. g (f x))"
immler@63895
   532
  apply (cases "F = bot", simp)
immler@63895
   533
  apply (rule Liminf_least)
immler@63895
   534
  subgoal for P
immler@63895
   535
    by (auto simp: eventually_filtermap the_inv_f_f
immler@63895
   536
        intro!: Liminf_bounded INF_lower2 eventually_mono[of P])
immler@63895
   537
  done
immler@63895
   538
immler@63895
   539
lemma Limsup_filtermap_le: "inj f \<Longrightarrow> Limsup (filtermap f F) g \<le> Limsup F (\<lambda>x. g (f x))"
immler@63895
   540
  apply (cases "F = bot", simp)
immler@63895
   541
  apply (rule Limsup_greatest)
immler@63895
   542
  subgoal for P
immler@63895
   543
    by (auto simp: eventually_filtermap the_inv_f_f
immler@63895
   544
        intro!: Limsup_bounded SUP_upper2 eventually_mono[of P])
immler@63895
   545
  done
immler@63895
   546
immler@63895
   547
lemma Liminf_filtermap_eq: "inj f \<Longrightarrow> Liminf (filtermap f F) g = Liminf F (\<lambda>x. g (f x))"
immler@63895
   548
  using Liminf_filtermap_le[of f F g] Liminf_filtermap_ge[of f F g]
immler@63895
   549
  by simp
immler@63895
   550
immler@63895
   551
lemma Limsup_filtermap_eq: "inj f \<Longrightarrow> Limsup (filtermap f F) g = Limsup F (\<lambda>x. g (f x))"
immler@63895
   552
  using Limsup_filtermap_le[of f F g] Limsup_filtermap_ge[of F g f]
immler@63895
   553
  by simp
immler@63895
   554
eberlm@62049
   555
hoelzl@61880
   556
subsection \<open>More Limits\<close>
hoelzl@61880
   557
hoelzl@61880
   558
lemma convergent_limsup_cl:
hoelzl@61880
   559
  fixes X :: "nat \<Rightarrow> 'a::{complete_linorder,linorder_topology}"
hoelzl@61880
   560
  shows "convergent X \<Longrightarrow> limsup X = lim X"
hoelzl@61880
   561
  by (auto simp: convergent_def limI lim_imp_Limsup)
hoelzl@61880
   562
hoelzl@61880
   563
lemma convergent_liminf_cl:
hoelzl@61880
   564
  fixes X :: "nat \<Rightarrow> 'a::{complete_linorder,linorder_topology}"
hoelzl@61880
   565
  shows "convergent X \<Longrightarrow> liminf X = lim X"
hoelzl@61880
   566
  by (auto simp: convergent_def limI lim_imp_Liminf)
hoelzl@61880
   567
hoelzl@61880
   568
lemma lim_increasing_cl:
hoelzl@61880
   569
  assumes "\<And>n m. n \<ge> m \<Longrightarrow> f n \<ge> f m"
wenzelm@61969
   570
  obtains l where "f \<longlonglongrightarrow> (l::'a::{complete_linorder,linorder_topology})"
hoelzl@61880
   571
proof
wenzelm@61969
   572
  show "f \<longlonglongrightarrow> (SUP n. f n)"
hoelzl@61880
   573
    using assms
hoelzl@61880
   574
    by (intro increasing_tendsto)
hoelzl@61880
   575
       (auto simp: SUP_upper eventually_sequentially less_SUP_iff intro: less_le_trans)
hoelzl@61880
   576
qed
hoelzl@61880
   577
hoelzl@61880
   578
lemma lim_decreasing_cl:
hoelzl@61880
   579
  assumes "\<And>n m. n \<ge> m \<Longrightarrow> f n \<le> f m"
wenzelm@61969
   580
  obtains l where "f \<longlonglongrightarrow> (l::'a::{complete_linorder,linorder_topology})"
hoelzl@61880
   581
proof
wenzelm@61969
   582
  show "f \<longlonglongrightarrow> (INF n. f n)"
hoelzl@61880
   583
    using assms
hoelzl@61880
   584
    by (intro decreasing_tendsto)
hoelzl@61880
   585
       (auto simp: INF_lower eventually_sequentially INF_less_iff intro: le_less_trans)
hoelzl@61880
   586
qed
hoelzl@61880
   587
hoelzl@61880
   588
lemma compact_complete_linorder:
hoelzl@61880
   589
  fixes X :: "nat \<Rightarrow> 'a::{complete_linorder,linorder_topology}"
eberlm@66447
   590
  shows "\<exists>l r. strict_mono r \<and> (X \<circ> r) \<longlonglongrightarrow> l"
hoelzl@61880
   591
proof -
eberlm@66447
   592
  obtain r where "strict_mono r" and mono: "monoseq (X \<circ> r)"
hoelzl@61880
   593
    using seq_monosub[of X]
hoelzl@61880
   594
    unfolding comp_def
hoelzl@61880
   595
    by auto
hoelzl@61880
   596
  then have "(\<forall>n m. m \<le> n \<longrightarrow> (X \<circ> r) m \<le> (X \<circ> r) n) \<or> (\<forall>n m. m \<le> n \<longrightarrow> (X \<circ> r) n \<le> (X \<circ> r) m)"
hoelzl@61880
   597
    by (auto simp add: monoseq_def)
wenzelm@61969
   598
  then obtain l where "(X \<circ> r) \<longlonglongrightarrow> l"
hoelzl@61880
   599
     using lim_increasing_cl[of "X \<circ> r"] lim_decreasing_cl[of "X \<circ> r"]
hoelzl@61880
   600
     by auto
hoelzl@61880
   601
  then show ?thesis
eberlm@66447
   602
    using \<open>strict_mono r\<close> by auto
hoelzl@61880
   603
qed
hoelzl@61245
   604
hoelzl@62975
   605
lemma tendsto_Limsup:
hoelzl@62975
   606
  fixes f :: "_ \<Rightarrow> 'a :: {complete_linorder,linorder_topology}"
hoelzl@62975
   607
  shows "F \<noteq> bot \<Longrightarrow> Limsup F f = Liminf F f \<Longrightarrow> (f \<longlongrightarrow> Limsup F f) F"
hoelzl@62975
   608
  by (subst tendsto_iff_Liminf_eq_Limsup) auto
hoelzl@62975
   609
hoelzl@62975
   610
lemma tendsto_Liminf:
hoelzl@62975
   611
  fixes f :: "_ \<Rightarrow> 'a :: {complete_linorder,linorder_topology}"
hoelzl@62975
   612
  shows "F \<noteq> bot \<Longrightarrow> Limsup F f = Liminf F f \<Longrightarrow> (f \<longlongrightarrow> Liminf F f) F"
hoelzl@62975
   613
  by (subst tendsto_iff_Liminf_eq_Limsup) auto
hoelzl@62975
   614
hoelzl@51340
   615
end