src/HOL/SupInf.thy
author wenzelm
Thu Feb 11 23:00:22 2010 +0100 (2010-02-11)
changeset 35115 446c5063e4fd
parent 35037 748f0bc3f7ca
child 35216 7641e8d831d2
permissions -rw-r--r--
modernized translations;
formal markup of @{syntax_const} and @{const_syntax};
minor tuning;
     1 (*  Author: Amine Chaieb and L C Paulson, University of Cambridge *)
     2 
     3 header {*Sup and Inf Operators on Sets of Reals.*}
     4 
     5 theory SupInf
     6 imports RComplete
     7 begin
     8 
     9 instantiation real :: Sup 
    10 begin
    11 definition
    12   Sup_real_def [code del]: "Sup X == (LEAST z::real. \<forall>x\<in>X. x\<le>z)"
    13 
    14 instance ..
    15 end
    16 
    17 instantiation real :: Inf 
    18 begin
    19 definition
    20   Inf_real_def [code del]: "Inf (X::real set) == - (Sup (uminus ` X))"
    21 
    22 instance ..
    23 end
    24 
    25 subsection{*Supremum of a set of reals*}
    26 
    27 lemma Sup_upper [intro]: (*REAL_SUP_UBOUND in HOL4*)
    28   fixes x :: real
    29   assumes x: "x \<in> X"
    30       and z: "!!x. x \<in> X \<Longrightarrow> x \<le> z"
    31   shows "x \<le> Sup X"
    32 proof (auto simp add: Sup_real_def) 
    33   from reals_complete2
    34   obtain s where s: "(\<forall>y\<in>X. y \<le> s) & (\<forall>z. ((\<forall>y\<in>X. y \<le> z) --> s \<le> z))"
    35     by (blast intro: x z)
    36   hence "x \<le> s"
    37     by (blast intro: x z)
    38   also with s have "... = (LEAST z. \<forall>x\<in>X. x \<le> z)"
    39     by (fast intro: Least_equality [symmetric])  
    40   finally show "x \<le> (LEAST z. \<forall>x\<in>X. x \<le> z)" .
    41 qed
    42 
    43 lemma Sup_least [intro]: (*REAL_IMP_SUP_LE in HOL4*)
    44   fixes z :: real
    45   assumes x: "X \<noteq> {}"
    46       and z: "\<And>x. x \<in> X \<Longrightarrow> x \<le> z"
    47   shows "Sup X \<le> z"
    48 proof (auto simp add: Sup_real_def) 
    49   from reals_complete2 x
    50   obtain s where s: "(\<forall>y\<in>X. y \<le> s) & (\<forall>z. ((\<forall>y\<in>X. y \<le> z) --> s \<le> z))"
    51     by (blast intro: z)
    52   hence "(LEAST z. \<forall>x\<in>X. x \<le> z) = s"
    53     by (best intro: Least_equality)  
    54   also with s z have "... \<le> z"
    55     by blast
    56   finally show "(LEAST z. \<forall>x\<in>X. x \<le> z) \<le> z" .
    57 qed
    58 
    59 lemma less_SupE:
    60   fixes y :: real
    61   assumes "y < Sup X" "X \<noteq> {}"
    62   obtains x where "x\<in>X" "y < x"
    63 by (metis SupInf.Sup_least assms linorder_not_less that)
    64 
    65 lemma Sup_singleton [simp]: "Sup {x::real} = x"
    66   by (force intro: Least_equality simp add: Sup_real_def)
    67  
    68 lemma Sup_eq_maximum: (*REAL_SUP_MAX in HOL4*)
    69   fixes z :: real
    70   assumes X: "z \<in> X" and z: "!!x. x \<in> X \<Longrightarrow> x \<le> z"
    71   shows  "Sup X = z"
    72   by (force intro: Least_equality X z simp add: Sup_real_def)
    73  
    74 lemma Sup_upper2: (*REAL_IMP_LE_SUP in HOL4*)
    75   fixes x :: real
    76   shows "x \<in> X \<Longrightarrow> y \<le> x \<Longrightarrow> (!!x. x \<in> X \<Longrightarrow> x \<le> z) \<Longrightarrow> y \<le> Sup X"
    77   by (metis Sup_upper real_le_trans)
    78 
    79 lemma Sup_real_iff : (*REAL_SUP_LE in HOL4*)
    80   fixes z :: real
    81   shows "X ~= {} ==> (!!x. x \<in> X ==> x \<le> z) ==> (\<exists>x\<in>X. y<x) <-> y < Sup X"
    82   by (metis Sup_least Sup_upper linorder_not_le le_less_trans)
    83 
    84 lemma Sup_eq:
    85   fixes a :: real
    86   shows "(!!x. x \<in> X \<Longrightarrow> x \<le> a) 
    87         \<Longrightarrow> (!!y. (!!x. x \<in> X \<Longrightarrow> x \<le> y) \<Longrightarrow> a \<le> y) \<Longrightarrow> Sup X = a"
    88   by (metis Sup_least Sup_upper add_le_cancel_left diff_add_cancel insert_absorb
    89         insert_not_empty real_le_antisym)
    90 
    91 lemma Sup_le:
    92   fixes S :: "real set"
    93   shows "S \<noteq> {} \<Longrightarrow> S *<= b \<Longrightarrow> Sup S \<le> b"
    94 by (metis SupInf.Sup_least setle_def)
    95 
    96 lemma Sup_upper_EX: 
    97   fixes x :: real
    98   shows "x \<in> X \<Longrightarrow> \<exists>z. \<forall>x. x \<in> X \<longrightarrow> x \<le> z \<Longrightarrow>  x \<le> Sup X"
    99   by blast
   100 
   101 lemma Sup_insert_nonempty: 
   102   fixes x :: real
   103   assumes x: "x \<in> X"
   104       and z: "!!x. x \<in> X \<Longrightarrow> x \<le> z"
   105   shows "Sup (insert a X) = max a (Sup X)"
   106 proof (cases "Sup X \<le> a")
   107   case True
   108   thus ?thesis
   109     apply (simp add: max_def) 
   110     apply (rule Sup_eq_maximum)
   111     apply (metis insertCI)
   112     apply (metis Sup_upper insertE le_iff_sup real_le_linear real_le_trans sup_absorb1 z)     
   113     done
   114 next
   115   case False
   116   hence 1:"a < Sup X" by simp
   117   have "Sup X \<le> Sup (insert a X)"
   118     apply (rule Sup_least)
   119     apply (metis empty_psubset_nonempty psubset_eq x)
   120     apply (rule Sup_upper_EX) 
   121     apply blast
   122     apply (metis insert_iff real_le_linear real_le_refl real_le_trans z)
   123     done
   124   moreover 
   125   have "Sup (insert a X) \<le> Sup X"
   126     apply (rule Sup_least)
   127     apply blast
   128     apply (metis False Sup_upper insertE real_le_linear z) 
   129     done
   130   ultimately have "Sup (insert a X) = Sup X"
   131     by (blast intro:  antisym )
   132   thus ?thesis
   133     by (metis 1 min_max.le_iff_sup real_less_def)
   134 qed
   135 
   136 lemma Sup_insert_if: 
   137   fixes X :: "real set"
   138   assumes z: "!!x. x \<in> X \<Longrightarrow> x \<le> z"
   139   shows "Sup (insert a X) = (if X={} then a else max a (Sup X))"
   140 by auto (metis Sup_insert_nonempty z) 
   141 
   142 lemma Sup: 
   143   fixes S :: "real set"
   144   shows "S \<noteq> {} \<Longrightarrow> (\<exists>b. S *<= b) \<Longrightarrow> isLub UNIV S (Sup S)"
   145 by  (auto simp add: isLub_def setle_def leastP_def isUb_def intro!: setgeI) 
   146 
   147 lemma Sup_finite_Max: 
   148   fixes S :: "real set"
   149   assumes fS: "finite S" and Se: "S \<noteq> {}"
   150   shows "Sup S = Max S"
   151 using fS Se
   152 proof-
   153   let ?m = "Max S"
   154   from Max_ge[OF fS] have Sm: "\<forall> x\<in> S. x \<le> ?m" by metis
   155   with Sup[OF Se] have lub: "isLub UNIV S (Sup S)" by (metis setle_def)
   156   from Max_in[OF fS Se] lub have mrS: "?m \<le> Sup S"
   157     by (auto simp add: isLub_def leastP_def setle_def setge_def isUb_def)
   158   moreover
   159   have "Sup S \<le> ?m" using Sm lub
   160     by (auto simp add: isLub_def leastP_def isUb_def setle_def setge_def)
   161   ultimately  show ?thesis by arith
   162 qed
   163 
   164 lemma Sup_finite_in:
   165   fixes S :: "real set"
   166   assumes fS: "finite S" and Se: "S \<noteq> {}"
   167   shows "Sup S \<in> S"
   168   using Sup_finite_Max[OF fS Se] Max_in[OF fS Se] by metis
   169 
   170 lemma Sup_finite_ge_iff: 
   171   fixes S :: "real set"
   172   assumes fS: "finite S" and Se: "S \<noteq> {}"
   173   shows "a \<le> Sup S \<longleftrightarrow> (\<exists> x \<in> S. a \<le> x)"
   174 by (metis Max_ge Se Sup_finite_Max Sup_finite_in fS linorder_not_le less_le_trans)
   175 
   176 lemma Sup_finite_le_iff: 
   177   fixes S :: "real set"
   178   assumes fS: "finite S" and Se: "S \<noteq> {}"
   179   shows "a \<ge> Sup S \<longleftrightarrow> (\<forall> x \<in> S. a \<ge> x)"
   180 by (metis Max_ge Se Sup_finite_Max Sup_finite_in fS le_iff_sup real_le_trans) 
   181 
   182 lemma Sup_finite_gt_iff: 
   183   fixes S :: "real set"
   184   assumes fS: "finite S" and Se: "S \<noteq> {}"
   185   shows "a < Sup S \<longleftrightarrow> (\<exists> x \<in> S. a < x)"
   186 by (metis Se Sup_finite_le_iff fS linorder_not_less)
   187 
   188 lemma Sup_finite_lt_iff: 
   189   fixes S :: "real set"
   190   assumes fS: "finite S" and Se: "S \<noteq> {}"
   191   shows "a > Sup S \<longleftrightarrow> (\<forall> x \<in> S. a > x)"
   192 by (metis Se Sup_finite_ge_iff fS linorder_not_less)
   193 
   194 lemma Sup_unique:
   195   fixes S :: "real set"
   196   shows "S *<= b \<Longrightarrow> (\<forall>b' < b. \<exists>x \<in> S. b' < x) \<Longrightarrow> Sup S = b"
   197 unfolding setle_def
   198 apply (rule Sup_eq, auto) 
   199 apply (metis linorder_not_less) 
   200 done
   201 
   202 lemma Sup_abs_le:
   203   fixes S :: "real set"
   204   shows "S \<noteq> {} \<Longrightarrow> (\<forall>x\<in>S. \<bar>x\<bar> \<le> a) \<Longrightarrow> \<bar>Sup S\<bar> \<le> a"
   205 by (auto simp add: abs_le_interval_iff) (metis Sup_upper2) 
   206 
   207 lemma Sup_bounds:
   208   fixes S :: "real set"
   209   assumes Se: "S \<noteq> {}" and l: "a <=* S" and u: "S *<= b"
   210   shows "a \<le> Sup S \<and> Sup S \<le> b"
   211 proof-
   212   from Sup[OF Se] u have lub: "isLub UNIV S (Sup S)" by blast
   213   hence b: "Sup S \<le> b" using u 
   214     by (auto simp add: isLub_def leastP_def setle_def setge_def isUb_def) 
   215   from Se obtain y where y: "y \<in> S" by blast
   216   from lub l have "a \<le> Sup S"
   217     by (auto simp add: isLub_def leastP_def setle_def setge_def isUb_def)
   218        (metis le_iff_sup le_sup_iff y)
   219   with b show ?thesis by blast
   220 qed
   221 
   222 lemma Sup_asclose: 
   223   fixes S :: "real set"
   224   assumes S:"S \<noteq> {}" and b: "\<forall>x\<in>S. \<bar>x - l\<bar> \<le> e" shows "\<bar>Sup S - l\<bar> \<le> e"
   225 proof-
   226   have th: "\<And>(x::real) l e. \<bar>x - l\<bar> \<le> e \<longleftrightarrow> l - e \<le> x \<and> x \<le> l + e" by arith
   227   thus ?thesis using S b Sup_bounds[of S "l - e" "l+e"] unfolding th
   228     by  (auto simp add: setge_def setle_def)
   229 qed
   230 
   231 
   232 subsection{*Infimum of a set of reals*}
   233 
   234 lemma Inf_lower [intro]: 
   235   fixes z :: real
   236   assumes x: "x \<in> X"
   237       and z: "!!x. x \<in> X \<Longrightarrow> z \<le> x"
   238   shows "Inf X \<le> x"
   239 proof -
   240   have "-x \<le> Sup (uminus ` X)"
   241     by (rule Sup_upper [where z = "-z"]) (auto simp add: image_iff x z)
   242   thus ?thesis 
   243     by (auto simp add: Inf_real_def)
   244 qed
   245 
   246 lemma Inf_greatest [intro]: 
   247   fixes z :: real
   248   assumes x: "X \<noteq> {}"
   249       and z: "\<And>x. x \<in> X \<Longrightarrow> z \<le> x"
   250   shows "z \<le> Inf X"
   251 proof -
   252   have "Sup (uminus ` X) \<le> -z" using x z by (force intro: Sup_least)
   253   hence "z \<le> - Sup (uminus ` X)"
   254     by simp
   255   thus ?thesis 
   256     by (auto simp add: Inf_real_def)
   257 qed
   258 
   259 lemma Inf_singleton [simp]: "Inf {x::real} = x"
   260   by (simp add: Inf_real_def) 
   261  
   262 lemma Inf_eq_minimum: (*REAL_INF_MIN in HOL4*)
   263   fixes z :: real
   264   assumes x: "z \<in> X" and z: "!!x. x \<in> X \<Longrightarrow> z \<le> x"
   265   shows  "Inf X = z"
   266 proof -
   267   have "Sup (uminus ` X) = -z" using x z
   268     by (force intro: Sup_eq_maximum x z)
   269   thus ?thesis
   270     by (simp add: Inf_real_def) 
   271 qed
   272  
   273 lemma Inf_lower2:
   274   fixes x :: real
   275   shows "x \<in> X \<Longrightarrow> x \<le> y \<Longrightarrow> (!!x. x \<in> X \<Longrightarrow> z \<le> x) \<Longrightarrow> Inf X \<le> y"
   276   by (metis Inf_lower real_le_trans)
   277 
   278 lemma Inf_real_iff:
   279   fixes z :: real
   280   shows "X \<noteq> {} \<Longrightarrow> (!!x. x \<in> X \<Longrightarrow> z \<le> x) \<Longrightarrow> (\<exists>x\<in>X. x<y) \<longleftrightarrow> Inf X < y"
   281   by (metis Inf_greatest Inf_lower less_le_not_le real_le_linear 
   282             order_less_le_trans)
   283 
   284 lemma Inf_eq:
   285   fixes a :: real
   286   shows "(!!x. x \<in> X \<Longrightarrow> a \<le> x) \<Longrightarrow> (!!y. (!!x. x \<in> X \<Longrightarrow> y \<le> x) \<Longrightarrow> y \<le> a) \<Longrightarrow> Inf X = a"
   287   by (metis Inf_greatest Inf_lower add_le_cancel_left diff_add_cancel
   288         insert_absorb insert_not_empty real_le_antisym)
   289 
   290 lemma Inf_ge: 
   291   fixes S :: "real set"
   292   shows "S \<noteq> {} \<Longrightarrow> b <=* S \<Longrightarrow> Inf S \<ge> b"
   293 by (metis SupInf.Inf_greatest setge_def)
   294 
   295 lemma Inf_lower_EX: 
   296   fixes x :: real
   297   shows "x \<in> X \<Longrightarrow> \<exists>z. \<forall>x. x \<in> X \<longrightarrow> z \<le> x \<Longrightarrow> Inf X \<le> x"
   298   by blast
   299 
   300 lemma Inf_insert_nonempty: 
   301   fixes x :: real
   302   assumes x: "x \<in> X"
   303       and z: "!!x. x \<in> X \<Longrightarrow> z \<le> x"
   304   shows "Inf (insert a X) = min a (Inf X)"
   305 proof (cases "a \<le> Inf X")
   306   case True
   307   thus ?thesis
   308     by (simp add: min_def)
   309        (blast intro: Inf_eq_minimum Inf_lower real_le_refl real_le_trans z) 
   310 next
   311   case False
   312   hence 1:"Inf X < a" by simp
   313   have "Inf (insert a X) \<le> Inf X"
   314     apply (rule Inf_greatest)
   315     apply (metis empty_psubset_nonempty psubset_eq x)
   316     apply (rule Inf_lower_EX) 
   317     apply (blast intro: elim:) 
   318     apply (metis insert_iff real_le_linear real_le_refl real_le_trans z)
   319     done
   320   moreover 
   321   have "Inf X \<le> Inf (insert a X)"
   322     apply (rule Inf_greatest)
   323     apply blast
   324     apply (metis False Inf_lower insertE real_le_linear z) 
   325     done
   326   ultimately have "Inf (insert a X) = Inf X"
   327     by (blast intro:  antisym )
   328   thus ?thesis
   329     by (metis False min_max.inf_absorb2 real_le_linear)
   330 qed
   331 
   332 lemma Inf_insert_if: 
   333   fixes X :: "real set"
   334   assumes z:  "!!x. x \<in> X \<Longrightarrow> z \<le> x"
   335   shows "Inf (insert a X) = (if X={} then a else min a (Inf X))"
   336 by auto (metis Inf_insert_nonempty z) 
   337 
   338 lemma Inf_greater:
   339   fixes z :: real
   340   shows "X \<noteq> {} \<Longrightarrow>  Inf X < z \<Longrightarrow> \<exists>x \<in> X. x < z"
   341   by (metis Inf_real_iff mem_def not_leE)
   342 
   343 lemma Inf_close:
   344   fixes e :: real
   345   shows "X \<noteq> {} \<Longrightarrow> 0 < e \<Longrightarrow> \<exists>x \<in> X. x < Inf X + e"
   346   by (metis add_strict_increasing comm_monoid_add.mult_commute Inf_greater linorder_not_le pos_add_strict)
   347 
   348 lemma Inf_finite_Min:
   349   fixes S :: "real set"
   350   shows "finite S \<Longrightarrow> S \<noteq> {} \<Longrightarrow> Inf S = Min S"
   351 by (simp add: Inf_real_def Sup_finite_Max image_image) 
   352 
   353 lemma Inf_finite_in: 
   354   fixes S :: "real set"
   355   assumes fS: "finite S" and Se: "S \<noteq> {}"
   356   shows "Inf S \<in> S"
   357   using Inf_finite_Min[OF fS Se] Min_in[OF fS Se] by metis
   358 
   359 lemma Inf_finite_ge_iff: 
   360   fixes S :: "real set"
   361   shows "finite S \<Longrightarrow> S \<noteq> {} \<Longrightarrow> a \<le> Inf S \<longleftrightarrow> (\<forall> x \<in> S. a \<le> x)"
   362 by (metis Inf_finite_Min Inf_finite_in Min_le real_le_trans)
   363 
   364 lemma Inf_finite_le_iff:
   365   fixes S :: "real set"
   366   shows "finite S \<Longrightarrow> S \<noteq> {} \<Longrightarrow> a \<ge> Inf S \<longleftrightarrow> (\<exists> x \<in> S. a \<ge> x)"
   367 by (metis Inf_finite_Min Inf_finite_ge_iff Inf_finite_in Min_le
   368           real_le_antisym real_le_linear)
   369 
   370 lemma Inf_finite_gt_iff: 
   371   fixes S :: "real set"
   372   shows "finite S \<Longrightarrow> S \<noteq> {} \<Longrightarrow> a < Inf S \<longleftrightarrow> (\<forall> x \<in> S. a < x)"
   373 by (metis Inf_finite_le_iff linorder_not_less)
   374 
   375 lemma Inf_finite_lt_iff: 
   376   fixes S :: "real set"
   377   shows "finite S \<Longrightarrow> S \<noteq> {} \<Longrightarrow> a > Inf S \<longleftrightarrow> (\<exists> x \<in> S. a > x)"
   378 by (metis Inf_finite_ge_iff linorder_not_less)
   379 
   380 lemma Inf_unique:
   381   fixes S :: "real set"
   382   shows "b <=* S \<Longrightarrow> (\<forall>b' > b. \<exists>x \<in> S. b' > x) \<Longrightarrow> Inf S = b"
   383 unfolding setge_def
   384 apply (rule Inf_eq, auto) 
   385 apply (metis less_le_not_le linorder_not_less) 
   386 done
   387 
   388 lemma Inf_abs_ge:
   389   fixes S :: "real set"
   390   shows "S \<noteq> {} \<Longrightarrow> (\<forall>x\<in>S. \<bar>x\<bar> \<le> a) \<Longrightarrow> \<bar>Inf S\<bar> \<le> a"
   391 by (simp add: Inf_real_def) (rule Sup_abs_le, auto) 
   392 
   393 lemma Inf_asclose:
   394   fixes S :: "real set"
   395   assumes S:"S \<noteq> {}" and b: "\<forall>x\<in>S. \<bar>x - l\<bar> \<le> e" shows "\<bar>Inf S - l\<bar> \<le> e"
   396 proof -
   397   have "\<bar>- Sup (uminus ` S) - l\<bar> =  \<bar>Sup (uminus ` S) - (-l)\<bar>"
   398     by auto
   399   also have "... \<le> e" 
   400     apply (rule Sup_asclose) 
   401     apply (auto simp add: S)
   402     apply (metis abs_minus_add_cancel b comm_monoid_add.mult_commute real_diff_def) 
   403     done
   404   finally have "\<bar>- Sup (uminus ` S) - l\<bar> \<le> e" .
   405   thus ?thesis
   406     by (simp add: Inf_real_def)
   407 qed
   408 
   409 subsection{*Relate max and min to Sup and Inf.*}
   410 
   411 lemma real_max_Sup:
   412   fixes x :: real
   413   shows "max x y = Sup {x,y}"
   414 proof-
   415   have f: "finite {x, y}" "{x,y} \<noteq> {}"  by simp_all
   416   from Sup_finite_le_iff[OF f, of "max x y"] have "Sup {x,y} \<le> max x y" by simp
   417   moreover
   418   have "max x y \<le> Sup {x,y}" using Sup_finite_ge_iff[OF f, of "max x y"]
   419     by (simp add: linorder_linear)
   420   ultimately show ?thesis by arith
   421 qed
   422 
   423 lemma real_min_Inf: 
   424   fixes x :: real
   425   shows "min x y = Inf {x,y}"
   426 proof-
   427   have f: "finite {x, y}" "{x,y} \<noteq> {}"  by simp_all
   428   from Inf_finite_le_iff[OF f, of "min x y"] have "Inf {x,y} \<le> min x y"
   429     by (simp add: linorder_linear)
   430   moreover
   431   have "min x y \<le> Inf {x,y}" using Inf_finite_ge_iff[OF f, of "min x y"]
   432     by simp
   433   ultimately show ?thesis by arith
   434 qed
   435 
   436 lemma reals_complete_interval:
   437   fixes a::real and b::real
   438   assumes "a < b" and "P a" and "~P b"
   439   shows "\<exists>c. a \<le> c & c \<le> b & (\<forall>x. a \<le> x & x < c --> P x) &
   440              (\<forall>d. (\<forall>x. a \<le> x & x < d --> P x) --> d \<le> c)"
   441 proof (rule exI [where x = "Sup {d. \<forall>x. a \<le> x & x < d --> P x}"], auto)
   442   show "a \<le> Sup {d. \<forall>c. a \<le> c \<and> c < d \<longrightarrow> P c}"
   443     by (rule SupInf.Sup_upper [where z=b], auto)
   444        (metis prems real_le_linear real_less_def) 
   445 next
   446   show "Sup {d. \<forall>c. a \<le> c \<and> c < d \<longrightarrow> P c} \<le> b"
   447     apply (rule SupInf.Sup_least) 
   448     apply (auto simp add: )
   449     apply (metis less_le_not_le)
   450     apply (metis `a<b` `~ P b` real_le_linear real_less_def) 
   451     done
   452 next
   453   fix x
   454   assume x: "a \<le> x" and lt: "x < Sup {d. \<forall>c. a \<le> c \<and> c < d \<longrightarrow> P c}"
   455   show "P x"
   456     apply (rule less_SupE [OF lt], auto)
   457     apply (metis less_le_not_le)
   458     apply (metis x) 
   459     done
   460 next
   461   fix d
   462     assume 0: "\<forall>x. a \<le> x \<and> x < d \<longrightarrow> P x"
   463     thus "d \<le> Sup {d. \<forall>c. a \<le> c \<and> c < d \<longrightarrow> P c}"
   464       by (rule_tac z="b" in SupInf.Sup_upper, auto) 
   465          (metis `a<b` `~ P b` real_le_linear real_less_def) 
   466 qed
   467 
   468 end