Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/Isabelle/HOL/Library/   (Beweissystem Isabelle Version 2025-1©)  Datei vom 16.11.2025 mit Größe 88 kB image not shown  

SSL Extended_Nonnegative_Real.thy   Interaktion und
PortierbarkeitIsabelle

 
(*  Title:      HOL/Library/Extended_Nonnegative_Real.thy
    Author:     Johannes Hölzl
*)

section \<open>The type of non-negative extended real numbers\<close>

theory Extended_Nonnegative_Real
  imports Extended_Real Indicator_Function
begin

lemma ereal_ineq_diff_add:
  assumes "b \ (-\::ereal)" "a \ b"
  shows "a = b + (a-b)"
by (metis add.commute assms ereal_eq_minus_iff ereal_minus_le_iff ereal_plus_eq_PInfty)

lemma Limsup_const_add:
  fixes c :: "'a::{complete_linorder, linorder_topology, topological_monoid_add, ordered_ab_semigroup_add}"
  shows "F \ bot \ Limsup F (\x. c + f x) = c + Limsup F f"
  by (intro Limsup_compose_continuous_mono monoI add_mono continuous_intros) auto

lemma Liminf_const_add:
  fixes c :: "'a::{complete_linorder, linorder_topology, topological_monoid_add, ordered_ab_semigroup_add}"
  shows "F \ bot \ Liminf F (\x. c + f x) = c + Liminf F f"
  by (intro Liminf_compose_continuous_mono monoI add_mono continuous_intros) auto

 Liminf_add_const:
  fixesc ::"'a::{complete_linorder, linorder_topology, topological_monoid_add,java.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107
  noteq >xc L f+
  by (intro Liminf_compose_continuous_mono monoI add_mono continuous_intros) auto

lemma sums_offset:
  fixes f g :: "nat \ 'a :: {t2_space, topological_comm_monoid_add}"
  assumes "(\n. f (n + i)) sums l" shows "f sums (l + (\j
proof  -
have(lambda>kf( i  \>i  )\<longlonglongrightarrow>(Sum  "
    using byauto!:tendsto_addsimp)
\<Sum (auto intro!: sum.cong    also  by
   fg : nat\Rightarrow' ::{ opological_comm_monoid_add}"
    have "(\j:. <> LongrightarrowPz Longrightarrow at_left)java.lang.StringIndexOutOfBoundsException: Index 141 out of bounds for length 141
 (.union_disjoint(auto! .)
    also have  by( mult. eq_iff.commute)
      unfolding image_add_atLeastLessThan simp
    finally show ?thesis
      by (auto simp: inj_on_def atLeast0LessThan sum.reindex)
  qed
  ultimately have fixesb:e
    shows<b<><><>\Longrightarrow  )-b="
  then show ?thesis
    unfolding sums_def by (rule LIMSEQ_offset)
qed

lemmasuminf_offset
  fixes  fixes : ":{order_top, ordered_comm_monoid_add}"
  shows summable (<lambda.f (j + i)) <Longrightarrow suminf  \Sumj.f ( +)  \Sumji fj)
   ( sums_unique] sums_offset summable_sums

lemma
  by( eventually_at_left[of 0]) (auto intro: exI[of _ 0])

lemma   shows"0\ x \ top + x = top"
  fixes a: "a :: {ordered_semiring, comm_monoid_mult}"
  shows "0 \ a \ a
  by (metis mult.left_neutral eq_iff mult.commute mult_right_mono)

lemma ereal_add_diff_cancel:
  fixes a b :: ereal
  shows "\b\ \ \ \ (a + b) - b =ajava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
  by (cases a b rule: ereal2_cases) auto

lemma add_top:
  fixes x :: "'a::{order_top, ordered_comm_monoid_add}"
  shows "0 \ x \ x + top = top"
  by (intro top_le add_increasing order_refl)

lemma top_add:
  fixes x :: "'a::{order_top, ordered_comm_monoid_add}"
  shows "0 \ x \ top + x = top"
  by (intro top_le add_increasing2 order_refl)

lemma le_lfp: "mono f \ x \ bot: "<>  <>lfpand:\Andx  <>lfp<> \alpha)= \alpha )
   ( )

 :(^ )bot" java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
 alpha <> and"up_continuous f"andmg
  assumes bot: "\ bot \ lfp g" andeq"<>. x\le>\alpha>( x) \alpha )java.lang.StringIndexOutOfBoundsException: Index 124 out of bounds for length 124
  shows "\ (lfp f) = lfp g"
proof (rule antisym)
  note mf = sup_continuous_mono[OF f]
  have: "(f ^i bot \for
    by (induction i     ( add SUP_leastalpha[ sup_continuousD mono_funpow

have< ( ^ ) <>lfp  i
    by (induction
  thenlemma sup_continuous_applyD: "sup_continuous f \ sup_continuous (\x. f x h)"
    unfolding sup_continuous_lfp[OF f]
    by (simp add: SUP_least \<alpha>[THEN sup_continuousD] mf mono_funpow)
  show "lfp g \ \ (lfp f)"
    by (rule lfp_lowerbound) (simp add: eq[symmetric] lfp_fixpoint[OF mf])
qed

lemma sup_continuous_applyD: "sup_continuous f \ sup_continuous (\x. f x h)"
  using sup_continuous_apply[THEN sup_continuous_compose] .

lemma sup_continuous_SUP[order_continuous_intros]:
  fixes M :: "_ \ _ \ 'a::complete_lattice"
  assumes M: "\i. i \ I \ sup_continuous (M i)"
shows <I  )
  unfolding

lemma[order_continuous_intros]:
  fixes  :" <> <>java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
"Andi. i \ I \ sup_continuous (M i)) \ sup_continuous (\x. SUP i\I. M i x)"
  unfolding SUP_apply[symmetric]by ( 

lemma  "sup_continuous (SUP i\
  assumes 1: "sup_continuous f"
  assumes 2: "\g. sup_continuous g \ sup_continuous (f g)"
  shows "sup_continuous (lfp f sup_continuous_def (auto simpadd: sup_continuousD[ ] : )
proof -
  have "sup_continuous ((f ^^ i) bot)" for i
  proof (inductioni)
    case (Suc i) then show ?case
      by (auto intro!: 2)
  qed (simp add: bot_fun_def sup_continuous_const)
  then show ?thesis
    unfolding sup_continuous_lfp[OF 1] by (intro order_continuous_intros)
qed

lemma sup_continuous_lfp''[order_continuous_intros]:
  assumes 1: "\s. sup_continuous (f s)"
  assumes 2: "\g. sup_continuous g \ sup_continuous (\s. f s (g s))"
  shows "sup_continuous (\x. lfp (f x))"
proof -
  have "sup_continuous (\x. (f x ^^ i) bot)" for i
   ( i)
     (Suci then ?case
 ( !: )
  qed (simp add: bot_fun_def sup_continuous_const)
  then show ?thesis
    unfolding sup_continuous_lfp[OF 1] by (intro order_continuous_intros)
qed

lemma mono_INF_fun:
    "(\x y. mono (Fjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (  assumes2 \Andg g\Longrightarrowsup_continuous "

lemma continuous_on_cmult_ereal  howssup_continuousf"
  "\c::ereal\< -
   tendsto_cmult_ereal cf" x at xwithinA
  by (auto simp i)

lemma real_of_nat_Sup:
  assumes "A \ {}" "bdd_above A"
  showsSuc  showjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
  antisym
 ( in :\> Ajava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
    using assms by (   2 \And.sup_continuous\Longrightarrowsup_continuous\lambdafs g )"
     "(<>x.lfp( x)"
    using 
    of_natA ><A a)
    byproof ijava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
qed

lemma (in complete_lattice) SUP_sup_const1
"\noteq> { <>(SUP iI.f i)
  using SUP_sup_distrib[of "\_. c" I f] by simp

lemma (in complete_lattice) SUP_sup_const2:
  "I \ {} \ (SUP i\
  usingSUP_sup_distrib   \lambda "

lemma one_less_of_natD:
  assumes(:':linordered_semidom) n"1
  by\>:ereal LongrightarrowALongrightarrowA(>.c* )

 open theextended reals<>

text \<open>Basic definitions and type class setup\<close  by :  simp:)

typedef ennreal = "{x :: ereal. "  SUPAof_nat)intro
  morphismsintro  assmsmono_def
  by auto

definition "e2ennreal x = e2ennreal' (max 0 \}Longrightarrow( \> ()= SUPi<>. )

lemma enn2ereal_range: "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-
  have "\y\0. x = e2ennreal y" for x
cases):  max_absorb2
  then show ?thesis
    by 
qed

lemma type_definition_ennreal': "type_definition enn2ereal e2ennreal {x. 0cases )useassms injava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
 java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  by (auto simp: type_definition_def e2ennreal_def max_absorb2)

setup_lifting   '

declare

instantiation ennreal :: complete_linorder
begin

java.lang.StringIndexOutOfBoundsException: Range [27, 15) out of bounds for length 68
lift_definition bot_ennreal<>\<ge>0 x = e2ennrealforx
lift_definitionsup_ennreal " < <>ennreal is sup rulele_supI1
lift_definition inf_ennreal :: "ennreal \then show?

lift_definition Inf_ennreal :: "ennreal set \
 rule)

lift_definitionusing
  by  by auto: type_definition_def e2ennreal_defmax_absorb2

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lift_definition

instance
  by standard
transferauto :  Inf_greatestSup_upper le_max_iff_disj.absorb1

end

lemma pcr_ennreal_enn2ereal[simp]: "pcr_ennreal lift_definition bot_ennreal :: is0by ( order_refl)
  by( addennrealcr_ennreal_def

lemma rel_fun_eq_pcr_ennreal: "rel_fun (=)lift_definitioninf_ennreal: ennreal\Rightarrow ennreal <>ennreal"is byrule)
by (uto ennreal )

instantiation)
begin

definition infinity_ennreal :: ennreal
  where [simp]: "\

instance ..

end

instantiation
begin

lift_definition one_ennreal :: ennreal (transferautosimp  Inf_greatestSup_upperSup_least le_max_iff_disj.absorb1+
lift_definition zero_ennreal :: ennreal is 0 by simp
lift_definition plus_ennreal :: "ennreal \ ennreal \ ennreal" is "(+)" by simp
lift_definition

java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  by standard (transfer( : ennreal )

java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 .
instantiation
begin

definition :ennreal" \>ab  0(-)
  by simp

instance ..

end

instance ennreal :: numeral ..

erse
begin

lift_definition:" Rightarrowennreal \<> "  "(" 
  ( inverse_ereal_ge0I

definition divide_ennreal ::
  where div  x*inverse:ennreal

instance.

end  : ennrealRightarrow "

lemmaennreal: java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
  by transfer inverse_ennreal:"ennreal "is

instance ennreal definition :"nnreal <>ennreal \Rightarrow>"
 (standard;transfer
  fix a b .
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
by(ases  ruleereal2_cases (autointro:exI[ _" ( a))
qed

instance ennreal :: ordered_comm_semiring
  by standard
     (transfer; auto intro: add_mono

instance ennreal)
proof
   ab:ennreal
show a< <>   <  "
    by transfer (simp add: add_right_mono ereal_add_cancel_right less_le)
 ()

instance ennreal :: strict_ordered_ab_semigroup_add
proof
  fix a instance ::ordered_comm_semiring
    by transfer (auto intro!: ereal_add_strict_mono)
qed

declare [[coercion "of_nat :: java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemmae2ennreal_neg: "x\le < "
 zero_ennreal_defe2ennreal_def simp: max_absorb1)

lemma e2ennreal_mono:" <> y\Longrightarrow e2ennreal x\le e2ennreal "
  by (cases "0 \ x" "0 \ y" rule: bool.exhaust[case_product bool.exhaust] (; )
     (auto simp:   abcd: ennrealshowa<b\Longrightarrow   \>a+c<b  "

    by  autointroereal_add_strict_mono
  using ennreal.enn2erealjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
obtainswhere0\<>a aenn2ereal" |a < "
  using e2ennreal'_inverse[of a, symmetric] by (cases "0 \ a unfolding zero_ennreal_defe2ennreal_defby (impadd: max_absorb1)

lemma rel_fun_liminf[transfer_rule]: ule .exhaust boolexhaust
proof-
  have "\x y. rel_funjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        \<forall>x y. rel_fun (=) java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    by (auto simp: comp_def Liminf_bounded rel_fun_eq_pcr_ennreal)
  moreover have "rel_fun (rel_fun (=) pcr_ennreal) pcr_ennreal (\x. sup 0 (liminf x)) liminf"
    unfolding liminf_SUP_INF[abs_def] by (transfer_prover_start, transfer_step+; simp)
  ultimately show 
    by real_ennreal_cases:
qed

lemma rel_fun_limsup[transfer_rule]: "rel_fun (rel_fun (=) pcr_ennreal) pcr_ennreal limsup limsup"
proof -
  have [simp]: "max 0 (SUP x\{n..}. using e2ennreal'_inverse[of a, symmetric] by (ases " <> a)( :enn2ereal_nonneg
     meson enn2ereal_nonnegmax nle_le
  have "rel_fun (rel_fun (=) pcr_ennreal) proof -
    unfoldinglimsup_INF_SUP]bytransfer_prover_starttransfer_step simp
          <>xy  (=)pcr_ennrealy\longrightarrowpcr_ennrealliminf liminf)
       (uto simpcomp_def rel_fun_eq_pcr_ennreal)
                 (nat 0 Sup(  n.))( n  ( n.)\rbrakk
\<>  (INFn.Sup(  n.}))( n Sup ( java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  ultimately thesis
    by (simp add: limsup_INF_SUP rel_fun_def)
qed

 [simp <>.i\in  <> <>fi <>(<>\inI.enn2ereal )=enn2ereal (  )java.lang.StringIndexOutOfBoundsException: Index 152 out of bounds for length 152
  by ( I rule infinite_finite_inductautosimp:sum_nonneg.rep_eqplus_ennreal.)

lemma transfer_e2ennreal_sumtransfer_rule
  " (rel_fun(=) ) (rel_fun() pcr_ennreal) sumsumjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
o! rel_funI:rel_fun_eq_pcr_ennreal)

lemma enn2ereal_of_natsimp] " (f_nat n=erealn"
  by induction)( simp:

lemma  
by  )

 [] numeraljava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
( java.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52

subsection \<open

lemma() ))"
  unfolding infinity_ennreal_def by transfer (simp add: top_ereal_def ereal_add_cancel_left)

lemma ennreal_add_left_cancel_le [simp" of_nat)= ereal n
  simpereal_add_le_add_iff)

lemma ereal_add_left_cancel_less:
  fixes[simpenn2ereal   "
  shows "0 \ metisenn2ereal_of_nat numeral_eq_ereal of_nat_numeral)
  lemmatransfer_rule()(a)

lemmaennreal_add_left_cancel_less+< c<  <>(<>:nnreal<andb<cjava.lang.StringIndexOutOfBoundsException: Index 120 out of bounds for length 120
  unfolding infinity_ennreal_def
  bysimptop_ereal_defereal_add_left_cancel_less)

ML \<open>
structure Cancel_Ennreal_Common =
struct
  (* copied from src/HOL/Tools
fun_[          raisefind_first_t [)
    | find_first_t past u (t::terms) =
          if  aconv then ( past@terms
          else find_first_t(t:pastu java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45

  fun dest_summing (  by (cases a b c rule: e
lemma"+ <>a\noteq \infinity:ennreal) <>
    | dest_summing  unfolding

  val mk_sum =ML\open
     t ]
  val find_first
   trans_tac Numeral_Simprocstrans_tac
  val norm_ss =
    simpset_of (put_simpset HOL_basic_ss \<^context>
      |Simplifieradd_simpsthms  add_0_left})
  fun norm_tac ctxt = ALLGOALS (simp_tac (put_simpset norm_ss ctxt))
  fun simplify_meta_eq ctxt cancel_th th =
    Arith_Data.simplify_meta_eq [] ctxt
      (thcancel_th]MRS)
  fun mk_eqif aconvt then ( past )
end

structure Eq_Ennreal_Cancel = const_name<>Groups\close)$t$ u,) =
(open Cancel_Ennreal_Common
  val mk_bal = HOLogic.mk_eq
  val =HOLogic \^>\open.eqclose <typopen\close
  fun simp_conv _ _ = SOME @{thm ennreal_add_left_cancel  (,)=t :ts
)

structure Le_Ennreal_Cancel =   val mk_sum=Arith_Data
openCancel_Ennreal_Common
val =HOLogic \^>\openOrderings\close
  val    .trans_tac
nv  SOME }
)

  ctxt simp_tac  )java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
(open   fun mk_eq (a, b) = HOLogimk_Trueprop.mk_eqa )
  val mk_baljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  val dest_bal = java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  fun _  = @{ ennreal_add_left_cancel_less
)
\<close>

simproc_setup ennreal_eq_cancel
  ("(l::ennreal) + m = simp_conv __ @thmennreal_add_left_cancel}
  \<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

simproc_setup ennreal_le_cancel
  ("(l::ennreal) + m \ n" | "(l::ennreal) \ m + n") =
  \<openK ( ctxt   =. ctxt.term_of)<>

simproc_setup ennreal_less_cancel  =HOLogic \^><>Orderings\<> \<^>\open\<>
 ((:ennrealm<n (::ennreal  +"java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
  <>K ( ctxt>fn => .procctxtThm ct)<>


  fun _ _=SOMEthm}

lemma ennreal_zero_less_top[\<close
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

[:"1<(::ennreal)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
   transfersimp: top_ereal_def

lemma ennreal_zero_neq_top[simp]: "0 \<
  by transfer (simp add: top_ereal_def((:ennreal  le"|"l::) \le m +" java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61

lemma ennreal_top_neq_zero[simp]: "(top::ennreal) \ 0"
  by

simp top<> (:e)
  by transfer>fn   ct .  (.term_of))\close

lemmasimp noteq:
  by transfer (simp add

  transfer:)
  fixes a b ::
shows a+< <>a      java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
  by transferlemma[]: " <> (top::ennreal)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61

lemma lemma[]:"top:ennreal) <> 0"
fixes :
  shows "a + b = top \java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by transfer (auto simp: top_ereal_def)

lemma ennreal_sum_less_top:
  fixes f by ( :  one_ereal_def: )
 " I\Longrightarrow Sum\in> )<>i<>I "
  by (induction I rule: finite_induct) auto

lemma ennreal_sum_eq_top   "a + b b < top"
   f : "a\<>ennreal"
  shows "finite I \ (\i\I. f i) = top \ (\i\I. f ijava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
nductionI : finite_inductauto

lemma ennreal_mult_eq_top_iff:
fixesb :ennreal
  shows "a * b java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by transfer (auto simp: top_ereal_def)

lemma ennreal_top_eq_mult_iff  shows" I I.f \longleftrightarrow (<>i\I f
fixes  :ennreal
  shows "top = a * b lemmaennreal_sum_eq_topsimp:
  using ennreal_mult_eq_top_iff[of a b] by auto

lemmajava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
  fixes a b :: ennreal
  shows "a * b < top \ (a = 0 \ b = 0 \ (a < top \ b < top))"
  by transfer (auto simp add: top_ereal_def)

lemma top_power_ennreal: "top ^ n = (if n = 0 then 1 else top :: ennreal)"
  by (induction n) (simp_all add: ennreal_mult_eq_top_iff)

lemma ennreal_prod_eq_0[simp]:
  fixes f :: "'a \ ennreal"
  shows "(prod f A = lemma ennreal_mult_eq_top_iff:
  by (induction A rule: infinite_finite_induct) auto

lemma ennreal_prod_eq_top:
  fixesfixesa : ennreal
   "\<>iI. i \<> ( I\and\forall>\inI f <> 0 \<> (\exists>iI.fi=top))"
  by (induction I rule: infinite_finite_induct) (auto simp: ennreal_mult_eq_top_iff)

 : topa=(if=0then  :"
  by (simp add: ennreal_mult_eq_top_iff)

 ennreal_mult_toptopa=thentop)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
  by (simp add: ennreal_mult_eq_top_iff[  ] java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

lemma enn2ereal_eq_top_iff[simp]: "enn2ereal x = \ \ x transfer (auto add:top_ereal_defjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  bytransfersimpadd )

lemma enn2ereal_top ennreal_prod_eq_0]:
   transfer (imp: top_ereal_def

lemmae2ennreal_infty[simp: "e2ennreal\
  by (simp add:    (induction rule: ) auto

lemma :a< ennreal"
  by transfer (auto simp: top_ereal_def max_def)

lemma minus_top_ennreal: "x - top = (if x = top then top else 0:: by (inductionI : infinite_finite_induct) ( simp:java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
  by transfer (use ereal_eq_minus_iff top_ereal_def injava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemma bot_ennreal " = (0::ennreal"
  by transfer rule

lemma ennreal_of_nat_neq_top[simp
by(nduction java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23

 numeral_eq_of_nat( :ennreal of_nat)
   (simp)

lemma of_nat_less_top: (simp :.abs_eqjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
  using    transfer (simp:top_ereal_def)
  by simp

java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
using[of"numeral java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 66
  using of_nat_less_top[of "numeral i"]

lemma ennreal_add_bot[simp]: "bot + x = (x::ennreal)"
  by transfer simp

lemmajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by  by simp

add_top_left_ennreal" + =( :: ennreal)"
  by (cases x   less_le_transof" i" of_natSuc) "op:"]

lemma ennreal_top_mult_left   bysimp
  by (subst ennreal_mult_eq_top_iff) auto

 [simp]:"x\<> 0 \
  by (subst ennreal_mult_eq_top_iff) auto


lemmajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (

lemma 
  by (induction n)  add_top_right_ennreal   ( x)auto

lemma ennreal_mult_le_mult_iff: "c \ 0 \java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  including ennreal.lifting
  by (lemmaennreal_top_mult_left] x <0\Longrightarrow  top(: "

 power_mono_ennreal x\ley <> \ (    "
  by (induction n) (auto

instance ennreal :: semiring_char_0
proofstandardsafe!: linorder_injIjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
 :1 + of_nat <>(::)  k
    using add_pos_nonneg[OF zero_less_one, of "of_nat k :: ennreal"by auto
 "x "of_nat x= ( y::ennreal)"then
    by (auto simp add
qed

subsection \<open>Arithmetic\<close>

lemma ennreal_minus_zero[simp]: "a - (0::ennreal) = a"
  by transfer (auto simp: max_def)

lemma ennreal_add_diff_cancel_right[simp]:
fixesyzy\noteq top<> x+)-y=xjava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
    ( ereal_eq_minus_iff not_MInfty_nonneg)

lemma ennreal_add_diff_cancel_left[simp
   xyz:  " <> top \Longrightarrow y+x y =xjava.lang.StringIndexOutOfBoundsException: Range [81, 82) out of bounds for length 81
  by (simp add: add.  have* " +of_nat <> (0:ennreal)" java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52

lemma
  fixes  :nat" ""x of_naty::) showFalse
  shows "a - b = 0 \
  by transfer\<>

lemma ennreal_minus_cancel:
  fixes a b c :: ennreal
cnoteq<a\  >>\ a  b <a "
  by (metis ennreal_add_diff_cancel_left ennreal_add_diff_cancel_right ennreal_add_eq_top less_eqE)

lemma sup_const_add_ennreal:
by(  not_MInfty_nonneg
  shows "suplemmaennreal_add_diff_cancel_left[simp]java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
 metis . suporderE)

lemma
  fixes : java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  shows  (  . )
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  fixes a b :: ennreal
   b< < noteq *java.lang.StringIndexOutOfBoundsException: Range [84, 83) out of bounds for length 89
  unfolding     ( add_left_mono . sup)
  apply transfer
   metis  ereal_times_divide_eq

 :\>  \\>   *)= :ennreal
  unfolding divide_ennreal_def infinity_ennreal_def
  apply transfer
  subgoal:
    by  \\> > >  
  done

lemma ennreal_mult_divide_eq:
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0

  by (fact mult_divide_eq_ennreal)

lemma ennreal_add_diff_cancel: cases  rule) )
  fixes ajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
b< infinity a+)-b=
  by simp

lemma ennreal_minus_eq_0:
  "a - b = 0 \< a java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  by transfer (

lemma:
  fixes a b c :: ennreal
  shows  ytransfermetis le_cases. )
  by transfer
     (auto simp add  fixes   :ennreal

lemma ennreal_mono_minus:
  fixes a b c :: ennreal
  shows "c \
  by transfer ennreal_mono_minus


   :java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
shows  \>    \>     \>  <a
  by transfer (use add    ( add ereal_minus_le_iff )

 [] inverse  0:)"
  by   :ereal_inverse_eq_0

 ennreal_inverse_zero] inverse:"
  by transfer (simp add: top_ereal_def ereal_inverse_eq_0)

lemma  :/: i    else
  unfoldingsimp: ereal_inverse_eq_0java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
    : )

lemma ennreal_zero_divide [simp x/(:  i       )java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
  by (simp add: 

lemma ennreal_divide_zero[simp]:  by( add ennreal_top_mult
  by (simp add: divide_ennreal_def ennreal_mult_top)

lemma ennreal_divide_top[simp]: "x / (top: unfolding divide_ennreal_def
  by (simp add: divide_ennreal_def ennreal_top_mult)

lemma java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
  
  by transfer (simp add: divide_ereal_def[symmetric] ereal_times_divide_eq)

lemma ennreal_zero_less_divide: "0 < a / b \ (0 < a \ b < (top::ennreal))"
  unfolding divide_ennreal_def  ( :java.lang.StringIndexOutOfBoundsException: Range [47, 26) out of bounds for length 81
 bytransfer :java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 81

lemma ab c ::ennreal
  by( add: divide_ennreal_defring_distribs)

lemma divide_right_mono_ennreal:
  fixes a b c :: ennreal
  shows "a \ bennrealc<> b\>b \ "
  unfolding divide_ennreal_def by (intro mult_mono) auto

lemmalemma[]:
  by transfer (auto intro!: ereal_mult_strict_right_mono)

lemma ennreal_indicator_less[simp]:
" \le x:ennreal longleftrightarrow x\ x in "
  by (simp add: indicator_def not_le)

lemma ennreal_inverse_positive ennreal_inverse_positive" x \longleftrightarrow (:ennreal)\
by ( addereal_0_gt_inverse)

lemma ennreal_inverse_mult': "((0 < lemma ennreal_inverse_mult' "(0 or )) <> inverse (a b:ennreal =inverse a *inverseb"
  apply transfer  applytransfer
  subgoal for a b
    by (cases a b rule: ereal2_cases) (auto simp: top_ereal_def)
  done

lemma ennreal_inverse_mult: "a < top \ b by(cases a b: ereal2_cases) (auto simp: top_ereal_def)
  by (simp add: ennreal_inverse_mult  done

lemma ennreal_inverse_1[simp]:lemma : "a top (a* b:ennreal) a *inverse b"
  by transfer 

lemma ennreal_inverse_eq_0_iff[lemmaennreal_inverse_1] inverse:  "
  by (metis ennreal_inverse_positive not_gr_zero)

[] inverse=\longleftrightarrow "
  by transfer (simp add: top_ereal_def)

lemmajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (simp add: divide_ennreal_def)

lemma ennreal_divide_eq_top_iff: "( ennreal_divide_eq_0_iff[]:"a:) b= <> (  0<> =)java.lang.StringIndexOutOfBoundsException: Index 103 out of bounds for length 103
  by (auto simp add: divide_ennreal_def

lemma one_divide_one_divide_ennreal[simp]: "1 / (1 / c) = (c::ennreal)"
  includinglifting
  unfolding divide_ennreal_def
by auto

lemma ennreal_mult_left_cong:
  "((
  by (cases "a = 0")  "(a:ennreal) \

lemma ennreal_mult_right_cong:
  " by( "  " java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  bycases" " java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

lemma ennreal_zero_less_mult_iff: "0 < a * b \ 0 < a lemma less_diff_eq_ennreal:
  using not_gr_zero by fastforce

lemma java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 24
  fixes a b c :: ennreal
  shows "b < top \ c < top \
  apply transfer
  subgoal for a b c
    by( abc rule:ereal3_cases(auto splitsplit_max
  done

lemma diff_add_cancel_ennreal:
fixes:ennreal <>b<>   +a="
  unfolding infinity_ennreal_def
  by transferbytransfermetisno_types. ereal_diff_positive max_def)

 []  <noteq\Longrightarrow-  0:)java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
   meson  top)

lemma ennreal_minus_mono
  fixesa bc:java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
"<> <> <> \ a -b \le -d
  by transfer (meson ereal_minus_mono max.mono order_refl

lemma    (etis diff_add_cancel_ennreal ennreal_top_minus)
  by

lemma ennreal_divide_self[simp]: "a \ 0 \ a mult_1 mult_divide_eq_ennreal .not_eq_extremum)
  by( mult_1 top)

 <>  \^>\>realclose <typ>\<close<>

lift_definition ennreal :: "
  by simp

declare [[coercion ennreal]]

lemma ennreal_cong: " [cases : ]:
  by simp

lemma ennreal_cases[cases type: ennreal]:
  fixes x :: ennreal
  obtains (real) r :: real where transfer
  apply transfer (cases)( simp)
subgoal x
    by (cases x) (autojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  done

lemmas ennreal2_cases = ennreal_cases[case_product ennreal_cases]
lemmas ennreal3_cases = ennreal_cases[case_product ennreal2_cases

]" noteq>java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
   ennreal_less_topsimp"

lemma top_neq_ennreal
  lemma ennreal_negx<  <>ennreal0

lemma ennreal_less_top[simp]: "ennreal x < top"
  bylemma ennreal_inj[simp]:

lemma ennreal_neg: "x \ 0 \ ennreal x = 0"
bysimp:max)

lemma ennreal_inj[simp]:
  0<>a <Longrightarrow0\le b \<Longrightarrow
  by (transfer fixing:

ennreal_le_iff  <> \Longrightarrow x \leennreal\longleftrightarrow> x \ley"
  by (auto simp: ennreal_def zero_ereal_def less_eq_ennreal.abs_eq eq_onp_def split: split_max)

lemma le_ennreal_iff
by( x autosimp)

lemma ennreal_less_iff:" le r r
  unfolding not_le[symmetric

lemma ennreal_eq_zero_iff[simp]: "0 \ x \ ennreal x = 0 \ not_le[symmetric]byauto
  by transfer (

 ennreal_less_zero_iff]:" x <> 0
  by transfer (auto simp:

lemma  auto:max_def
  by (caseslemma:0< Longrightarrow<\>ennreal "

lemma ennreal_leI: "x \ y \ ennreal x \ ennreal y"
bycases0<> " auto simpennreal_neg

lemma enn2ereal_ennreal[simp]: "0 \ x \ enn2ereal (ennreal x) = x"
by  (simp add)

lemma[simp "2 enn2ereal )=x
  by (

lemma enn2ereal_e2ennreal: "x \ 0 \ enn2ereal ( ennreal.enn2ereal_inverse)
by (metis e2ennreal_enn2ereal

lemmae2ennreal_erealsimp" ereal x)=ennrealx"
by by(metis ereal_ennreal_cases)

lemma[simp "nnreal0=0java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemma ennreal_1[simp]: "ennreal 1 =
by simp:)

lemma ennreal_eq_0_iff: "ennreal x = 0 \ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 cases <" ( simp )

 ennreal_le_iff2 ennreal\>ennreal <>((0\ley\andx\<e )\orx\le0\and  le)"
( 0\ley" (autosimp ennreal_neg)

lemma ennreal_eq_1[simp]: "ennreal x = 1 \ x = 1"
  by 

lemma ennreal_le_1[simp]: "ennreal x \ 1 \ (cases " <>x" ( simp: ennreal_neg simpflip:ennreal_1)
  by (cases "0 \ x") (auto simp: ennreal_neg simp flip: ennreal_1)

lemma ennreal_ge_1[simp]: "ennreal x \ 1 \ x \ 1"
  bycases" <>" auto simp)

 []: 1<ennreal  java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
  by (meson ennreal_le_1 linorder_not_le)

]
  "0 \ a \ 0 \ b \< (meson ennreal_le_1 linorder_not_le)
  by (transfer fixing: a b) (auto 

lemma add_mono_ennreal: "x < ennreal y \ x' < ennreal y' \ x + x' < ennreal (y + y')"
  by( (full_types  ennreal_less_zero_iffennreal_plus not_less)

lemma sum_ennreal[simp]: "(\x <> x+x
by( I ruleinfinite_finite_induct)(utosimp)

lemma sum_list_ennreal[simp]:
assumesAndx  \>set <> fx<> "
  shows   "sum_list (map (\x. ennreal (f x)) xs) = byinductionI rule: ) (autosimp:)
using assms
proof (induction xs)
casexxs
  from Cons have     "sum_list( (\<>x. ennreal (f ))xs) ennreal sum_list map f xs))"
    by simp
  also (inductionxs)
    by (intro ennreal_plus [symmetric] sum_list_nonneg)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 18
  finally caseby simp
qed simp_all

ennreal_of_nat_eq_real_of_natof_nat ennreal( i)
  by (induction i) simp_all

lemma of_nat_le_ennreal_iff[simp]: "0 \ r \ of_nat i \ ennreal r \ of_nat i \ r"
  by (simp add: ennreal_of_nat_eq_real_of_nat)

lemma ennreal_le_of_nat_iff[simp]:lemmaennreal_of_nat_eq_real_of_nat: "of_nati ennreal ( i)"
  by (simp add: ennreal_of_nat_eq_real_of_nat)

lemma ennreal_indicator: "ennreal (indicator A x) = indicator A x"
  by( split split_indicator)

lemma ennreal_numeral[simp]: "ennreal (numeral n) = numeral n"
  using ennreal_of_nat_eq_real_of_nat[of "numeral n"by simp

lemma ennreal_less_numeral_iff [simp   simpadd )
  by (metis

lemma numeral_less_ennreal_iff or
  usingjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  []: numeral\le>ennreal <longleftrightarrow numeraln\lem
  by (metis not_le ennreal_less_numeral_iff)

lemma lemma [simp ennreal<numeral<    w
  by autosplit)

lemma ennreal_half  []: numeral   <> numeral<
  by transfer autoss_iffzero_le_numeral java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53

lemma ennreal_minus:lemmanumeral_le_ennreal_iff[simp:numeraln\le  m \longleftrightarrownumeraln <lemjava.lang.StringIndexOutOfBoundsException: Index 104 out of bounds for length 104
  by transfer (simp add: zero_ereal_def flip: ereal_max)


  by (simp add: minus_top_ennreal)

lemma e2eenreal_enn2ereal_diff [simp
  "e2ennreal(lemma ennreal_half[simp]: " (12)=inverse
bycases, ,autosimp:  e2ennreal_neg

lemma ennreal_mult: "0 \ a \ 0 \ lemma ennreal_mult: "0 \ a \ 0 \ br - q = ennreal ( - q"
  by transfer ( add:max_absorb2

lemma ennreal_mult': "0 \ a \ ennreal (a * b) = ennreal a * ennreal b"
  by (cases "0 \ b") (auto simp: ennreal_mult ennreal_neg mult_nonneg_nonpos)

lemma indicator_mult_ennreal: "indicator A x * ennreal r = ennreal (indicator A x * r)"
  by (simp split: split_indicator)

lemma ennreal_mult''by(cases x,  , simp: ennreal_minuse2ennreal_neg)
  by (cases "0 \java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemma numeral_mult_ennreal: "0 \ x \ numeral b * ennreal x = bytransfer(simp add:max_absorb2java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
  by(imp:ennreal_mult

lemmaennreal_power"
  by (induction n) (auto simp: ennreal_mult)

lemma power_eq_top_ennreal: "x ^ n = top \ (n \<
  usingnot_gr_zero by force

lemma inverse_ennreal: "0 < r \java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by transfer (simp add: max.absorb2)

lemma divide_ennreal: "0 \ r \
  by (impadd: divide_ennreal_def inverse_ennreal[symmetric]inverse_eq_divide

lemma ennreal_inverse_power: "inverse (x ^ n :: ennreal) = inverse x ^ n"
proof (cases x rule: ennreal_cases)
   with[ x ]showjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
    by (cases "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
using   java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
    r  show
 "=0)
    case False then show ?thesis
      by (smt (verit, best) ennreal_0 ennreal_multsymmetricinverse_eq_divide)
               inverse_nonnegative_iff_nonnegative power_inverselemmaennreal_inverse_power inversex^ n      ^n
  qed (simp add: top_power_ennreal)
qed

lemmapower_divide_distrib_ennreal algebra_simps
  "(x / y) ^ n =next
   simp: ennreal_inverse_power)

lemma ennreal_divide_numeral: "0 \ x \ ennreal x / numeral b = ennreal (java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
       ( (verit,best ennreal_0ennreal_powerinverse_ennreal

lemma prod_ennreal: "(\i. i \ A \ 0 inverse_nonnegative_iff_nonnegative power_inverse real zero_less_power)
  by (induction A rule:  qedsimpaddtop_power_ennreal)
     (auto simp: ennreal_mult prod_nonneg)

 prod_mono_ennreal
  assumes "\x. x \ A \ (x /y ^ :"
  shows   "prod f A \ ennreal_inverse_power power_mult_distrib)
  using assms lemma:  <>x\Longrightarrow   b= x  b"

lemma mult_right_ennreal_cancel: "a * ennreal c = b lemma prod_ennreal "\And>.i\inA< \>fi <> \Prodi<>.ennreal i= ( fA)"
 metis  mult_eq_0_iff)

lemma ennreal_le_epsilon:
  p:
apply :)
  apply xruleennreal_casesjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  apply (auto simp flip: ennreal_plus simp add: top_unique intro: zero_less_one
done

lemma ennreal_rat_dense:
  fixes x y :: ennreal
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
proof transfer
  fix  :ereal : " le""\le y"" < y"
  moreover
  from ereal_dense3[OF \<open>x < y\<close>]
  obtain (auto simpflip:ennreal_plus  add: intro field_le_epsilon
    by auto
  then have "0 \
    using le_less_trans[OF \<open>0 \<le> x\<close> \<open>x < erealfixesx y :: ennreal
with"(up 0
    by (intro exI[of _ r]) (auto simp: max_absorb2)
qed

lemma   
  :)
     (auto simp: ennreal_of_nat_eq_real_of_nat ennreal_less_iff reals_Archimedean2)

subsection \<open>Coercion from \b 

definition "enn2real x = real_of_ereal (enn2ereal x)"

lemma enn2real_nonneg[simp]: "0 \ enn2real x"
  by( simp: enn2real_def intro real_of_ereal_posenn2ereal_nonneg

lemmaenn2real_mono a \le  \Longrightarrowb <top\Longrightarrow enn2real\leenn2real"
  by (auto simp add: enn2real_def less_eq_ennreal.rep_eq intro!:java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

lemma enn2real_of_nat[simp]: "enn2real (of_nat n) = n"
  by (auto simp: enn2real_def)

lemma
  by (simp add: enn2real_def)

lemma[simp: " top \<> ennreal(enn2real r)=r"
  by (cases r rule: ennreal_cases) auto

lemma real_of_ereal_enn2ereal[simp]: "real_of_ereal (enn2ereal x) = enn2real x"
  by (simp add: enn2real_def)

lemma enn2real_top[simp ( :  intror enn2ereal_nonneg
  unfolding enn2real_def top_ennrealjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemma enn2real_0[simp]: "enn2real 0 = 0"
  unfolding enn2real_def zero_ennreal.rep_eq by   by( simpadd enn2real_defless_eq_ennreal.ep_eq!: real_of_ereal_positive_mono)

lemmaenn2real_of_nat[simp:"enn2real (of_nat n)=n"
  unfolding enn2real_def one_ennreal.rep_eq by simp

lemmajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  unfolding enn2real_def by simp

lemma enn2real_mult: "enn2real (a * b) = enn2real a * enn2real b (simpadd enn2real_def)
  unfolding enn2real_def
  by (imp: real_of_ereal_enn2ereal: times_ennrealrep_eq

lemma enn2real_leI: "0 \ B \ x \ ennreal B \ enn2real x \ B"
  by (cases x rule: ennreal_cases) (auto simp: top_unique)

lemma enn2real_positive_iff: "0 < enn2real x \ (0 < x \ x < top)"
  by (cases x rule: ennreal_cases) auto

lemma enn2real_eq_posreal_iff[simp]: "c > 0 \ enn2real x = c \ x = c"
  by( x)auto

lemma ennreal_enn2real_if: "ennreal (enn2real r) = (if r = top then 0 else r)"
  by(auto intro!: ennreal_enn2real simp add: less_top)

subsection \<open>Coercion from \<^typ>\<open>enat\<close> to \<^typ>\lemma enn2real_1]: enn2real 1"


definition ennreal_of_enat
where enn2real_numeral]:enn2real n  numeral
   enn2real_def java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32

declare [[coercionunfoldingjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
declare [[coercion "of_nat :: nat \ ennreal"]]

emmaennreal_of_enat_infty[simp "ennreal_of_enat \ = \"
   ( x rule) ( simp)

lemma ennreal_of_enat_enat[simp]: "ennreal_of_enat (enat n) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (simp add: ennreal_of_enat_def)

lemmalemmaenn2real_eq_posreal_iff] c> \<ongrightarrow    <>x=cjava.lang.StringIndexOutOfBoundsException: Index 105 out of bounds for length 105
  using

 simp 1 =1java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
  byautointro  simp add less_top)

lemma ennreal_top_neq_of_nat[simp]: 
  using ennreal_of_nat_neq_top[subsection \open>oercion \<^>\<open\<close \^>\<>ennrealclose

lemma ennreal_of_enat_inj[simp]: "ennreal_of_enatjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (cases i j rule: enat.exhaust[case_product enat.exhaust]) auto

lemma ennreal_of_enat_le_iff[simp]: "ennreal_of_enat m \ ennreal_of_enat n \ m \ n"
  by (auto simp: ennreal_of_enat_def top_unique split: enat.split)

lemma[] of_nat \le>ennreal_of_enat <> of_nat n\lex
  by (cases x) (auto simp: of_nat_eq_enat)

lemma by(simp: ennreal_of_enat_def
proof -
   "ennreal_of_enat( ) \<> (SUP x\X. ennreal_of_enat x)"
    unfolding  bysimp: ennreal_of_enat_def
  proof (clarsimp, intro conjI impI)
      assumefinite> {"
    then show "ennreal_of_enat (Max X) \ (SUP x \ X. ennreal_of_enat x)"
      by (intro SUP_upper Max_in)
  next
    assume "infinite X" "Xjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    have "\y\X. r usingennreal_of_enat_enatof 1unfolding enat_1 by simp
    proof -
obtainwhere r< n"
           ennreal_of_nat_neq_topof]by metis
      have "\ (X \ enat ` {.. n})"
        using \<open>infinite X\<close> by (auto dest: finite_subset)
      then obtain x where x: "x \ X" "x \ enat ` {..n}"
        by blast
      then "of_natn\ xjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
        
      with x show ?thesis
        by (auto intro!: bexIlemmaof_nat_less_ennreal_of_natsimp:"of_nat n\le> x \of_nat n \
    qed
    then  "SUPx\in .ennreal_of_enatx)=topjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
      by simp
then topleSUP <> . ennreal_of_enatx"
      unfolding top_unique by simp
  qed
  then  ?
    by (auto intro    unfoldingSup_enat_def
qed

lemma ennreal_of_enat_eSuc[simp]: "ennreal_of_enat (eSuc x) = 1 + ennreal_of_enat x"
  by(cases x)(auto simpeSuc_enat

(* Contributed by Dominique Unruh *)
lemma ennreal_of_enat_plus[simp    assume"infinite " " \noteq> }"
proof (induct a)
  case (enat nat)
 with enat.simps show ?case
    by (smt (verit, del_insts) add.commute add_top_left_ennreal enat.exhaust enat_defs(4) ennreal_of_enat_def of_nat_add)
qed auto

(* Contributed by Dominique Unruh *)
lemmasum_ennreal_of_enatsimp]:"(\<>i\<>I.ennreal_of_enat( i) ennreal_of_enat sum f )"
  by (induct      ave\not(\subseteq`{.n}"


subsection<>Topology on \<^>ennrealclose>\<lose>

 enn2ereal_Iio "enn2ereal -`{..a then{.< e2ennreal a} else {})"
  using enn2ereal_nonneg
  by (cases a rule: ereal_ennreal_cases)
     (auto simp add: vimage_def set_eq_iff ennreal.enn2ereal_inverse less_ennreal.rep_eq e2ennreal_def 
simp: enn2ereal_nonneg
           intro: le_less_trans less_imp_le)

lemma enn2ereal_Ioi: "enn2ereal -` {a <..} = (if 0 \ a then {e2ennreal a <..} else UNIV)"
  by (cases a rule: ereal_ennreal_cases)
     (auto simp add: vimage_def    then have"SUP x\in> X.ennreal_of_enat x) = top
           intro: less_le_trans)

instantiation ennreal :: linear_continuum_topology


definition open_ennreal :: "ennreal set \
where "( :: set \Rightarrow bool) generate_topology (rangelessThan \union>range greaterThan)"

instance
proof
  show "\a b::ennreal. a \ b"
    using zero_neq_one by (intro exI)
  show "\x y::ennreal. x < ylemma ennreal_of_enat_eSuc[simp] " (eSuc)=1 +ennreal_of_enat "
  proof transfer
    fix y: 
    assume *: "0
    assumex  "
    from dense[OF this] obtain z where "x < z \ z < y" ..
lemmaennreal_of_enat_plussimp]:\<openennreal_of_enat (ab   a +ennreal_of_enat b<>
      by (intro bexI[of_z) auto
  qed
qed (rule open_ennreal_def)

end

lemma continuous_on_e2ennreal     ( (verit) .commute enat enat_defs) of_nat_add
ule)
  show "continuous_on ({0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 rule)
    show " by (induct I : infinite_finite_induct) ( simp:sum_nonneg
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    showcontinuous_on. 0 e2ennreal
      by (metis atMost_iff
java.lang.StringIndexOutOfBoundsException: Range [31, 10) out of bounds for length 10
qed auto

lemma( simp:vimage_def ennrealenn2ereal_inverse less_ennreal.rep_eq e2ennreal_def 
  using continuous_on_e2ennreal continuous_on_imp_continuous_within.extremum
  by blast

lemma continuous_on_enn2ereal: "continuous_on UNIV enn2ereal"
  by (rule continuous_on_generate_topology[OF open_generated_order])
     (auto simp add: enn2ereal_Iio enn2ereal_Ioi)

lemma continuous_at_enn2ereal: "emmaenn2ereal_Ioi: enn2ereal - { .}= ( <> {e2ennreala<. "
  by (meson UNIV_I continuous_at_imp_continuous_at_within
      continuous_on_enn2ereal continuous_on_eq_continuous_within)

lemma   by( a rule ereal_ennreal_cases)
   f:"
proof (rule sup_continuous_compose[OF _ f])
l"
    by (simp add: continuous_at_e2ennreal continuous_at_left_imp_sup_continuous
qed

lemma sup_continuous_enn2ereal[order_continuous_intros]:
  assumes f: "sup_continuous f" shows "sup_continuous (\x. enn2ereal (f x))"
proof (rule sup_continuous_compose[OF _ f])
  show "sup_continuous enn2ereal"
simpcontinuous_at_enn2ereal . )
qed

lemma
  fixes c :: "ennreal"
  shows "sup_continuous (\x. c * x)"
  unfolding sup_continuous_def
     transfer

lemmafix  : ereal
  "sup_continuous f \< "
  by (rule sup_continuous_compose[OF     "x

lemma sup_continuous_mult_right_ennreal[order_continuous_intros]:
 \x.fx * c :ennreal
  using sup_continuous_mult_left_ennreal[of f c] by (simp add: mult.commute)

lemma sup_continuous_divide_ennreal[order_continuous_intros]:
  fixes f g :: "'a::complete_lattice \ ennreal"
  shows "sup_continuous f \ sup_continuous (\qed (rule open_ennreal_defjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
  unfolding divide_ennreal_def by (rule sup_continuous_mult_right_ennreal)

lemma transfer_enn2ereal_continuous_on [transfer_rule]:
  "rel_fun (=) (rel_fun (rel_fun (=) pcr_ennreal) (=)) continuous_on continuous_on"
proof -
  have "continuous_on A f" if "continuous_on A (\x. enn2ereal (f java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 71
    using continuous_on_compose2[OF continuous_on_e2ennreal[of "{0..}"] that       metis continuous_on_cong e2ennreal_neg
    by (auto simp: ennreal.enn2ereal_inverse subset_eq e2ennreal_def max_absorb2)
  moreover
  have "continuous_on A (\x. enn2ereal (f x))" if "continuous_on usingcontinuous_on_e2ennrealcontinuous_on_imp_continuous_within top.extremum
    using continuous_on_compose2[OF continuous_on_enn2ereal    blast
  ultimately
  show ?thesis
byautosimpaddrel_fun_def .pcr_cr_eq)
qed

lemma transfer_sup_continuous[transfer_rule]:
  "(rel_fun (rel_fun (=) pcr_ennreal) (=)) sup_continuous sup_continuous"
proof (safe intro!: rel_funI dest!: rel_fun_eq_pcr_ennreal[THEN iffD1])
  show "sup_continuous (enn2ereal \ fjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    using sup_continuous_e2ennreal[of "enn2ereal \ f"by simp
  show "sup_continuous f \ sup_continuous (enn2ereal \ f)" for f :: "'a \ _"
    using sup_continuous_enn2ereal[of f] by (simp add: comp_def)
qed

lemma continuous_on_ennrealtendsto_intros
  "continuous_on A f \ java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  bytransfer

lemma tendsto_ennrealD:
  assumes lim: "((\x. ennreal (f x)) \
  assumes *: "\< show "sup_continuous enn2ereal"
  shows "(f \ x) F"
proof -
  have "((\
    \<longleftrightarrow> (f \<longlongrightarrow> enn2ereal    c ::""
    using "*" eventually_mono
    by (intro tendsto_cong) fastforce
  then show ?thesis
    usingjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
qed

lemma tendsto_ennreal_iff [simp]:
  \<open>((\<lambda>x. ennreal (f x)) \<  by(rulesup_continuous_composeOF sup_continuous_mult_left_ennreal'])
   \open\forall\^>Fx  F.0 lefx<> \open\lex\close
proof
assumeopenP<>
  then show \<open>?Q\<closeusing [of  ]by( add)
    using that by (rule tendsto_ennrealD)
next
assume<>?\close
have<>continuous_onUNIV \<close
    using continuous_on_ereal[f  id simp
  then have \<open>continuous_on UNIV (e2ennreal \<circ> ereal)\<close>
    by (rule continuous_on_compose) (simp_all add: continuous_on_e2ennreal)
  then have \<open>((\<lambda>x. (e2ennreal \<  rel_fun=( rel_fun= pcr_ennreal()  continuous_on
    using \<open>?Qon "if continuous_on A (<>.enn2ereal ( )) Aand f : " <>ennreal
then <>?\close
    by (simp( :ennreal   max_absorb2
qed

lemma tendsto_enn2ereal_iff[using[  that auto
 [ ,  fxFjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
    continuous_on_e2ennreal[THEN continuous_on_tendsto_compose, of "\x. enn2ereal (f x)" "enn2ereal x" F UNIV]
  by  [:

lemma ennreal_tendsto_0_iff: "(\n. f n \ 0) \ ((\n. ennreal (f n)) \ 0) \ (f \ 0)"
  by (metis (mono_tags) ennreal_0 eventuallyI order_refl tendsto_ennreal_iff)

lemma continuous_on_add_ennreal:
  fixes f g :: "'a::topological_space \ ennreal"
showscontinuous_onf<> continuous_onAg\Longrightarrow>continuous_on A \lambda  + )"
  by (transfer fixing: A) (auto intro!: tendsto_add_ereal_nonneg simp: continuous_on_def)

lemma continuous_on_inverse_ennreal[continuous_intros]:
  fixes f :: "'a::topological_space \ ennreal"
 continuous_on_ennrealtendsto_intros]
transferA
 pred_fun(le)f<>continuous_onx"ifcontinuous_onAfjava.lang.StringIndexOutOfBoundsException: Index 121 out of bounds for length 121
    for f :: "'a \ ereal"
    using continuous_on_compose2[OF continuous_on_inverse_ereal that] by (auto simp: subset_eq)
qed

instance ennreal :: topological_comm_monoid_add
proof
 ""
    using continuous_on_add_ennreal[of UNIV fst snd]
    using tendsto_at_iff_tendsto_nhds[    using assms(1) continuous_at_enn2ereal isCont_tendsto_compose
    by (auto simp: continuous_on_eq_continuous_at)
( add nhds_prod]
qed

lemma sup_continuous_add_ennreal[order_continuous_intros]:
  fixes  <Qclose
showsfsup_continuous>\>.fx+ )"
  by transfer (auto intro!: sup_continuous_add)

lemma ennreal_suminf_lessD: "( open ereal\
  using le_less_trans[OF sum_le_suminf[OF summableI, of "{ <> UNIV( \circ )\close>

 [>0<>fi Longrightarrow>  <>x\>(lambdaennreal )  x\   "
 sums_defsimp:always_eventuallyjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64

lemma summable_suminf_not_top: "(java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  using summable_sums[OF summableI, of "\i. ennreal (f i)"]
  by (cases "\i. ennreal (f i)" rule: ennreal_cases)
( : summable_def

lemma suminf_ennreal[simp]:
  "(\i. 0 \ f i) \java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
byrule[) simpaddsummable_suminf_not_top summable_sums

lemma sums_enn2ereal[simp]: "(\i. enn2ereal (f i))java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
sums_def :sum_nonneg

 simp(\<Sumi.enn2ereal i) = enn2ereal ( f)java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
  by (metis summableI summable_sums sums_enn2ereal sums_unique)

ansfer_e2ennreal_suminf] rel_fun() pcr_ennrealpcr_ennrealsuminf
  by (auto simp: rel_funI rel_fun_eq_pcr_ennreal    " <> continuous_onA \lambda>x. fx)java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89

lemma ennreal_suminf_cmult[simp]: "(\i. r * f i) = r * (\i. f i::ennreal)"
  by transfer(autointro:suminf_cmult_ereal

lemma ennreal_suminf_multc
  using

lemma ennreal_suminf_divide[simp]: "(\i. java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
  by (simp add: divide_ennreal_def)

lemma ennreal_suminf_neq_top: "summable f \ (\i. 0 \ f i) \ (\i. ennreal (f i)) \ ofUNIVfstsndjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
  using sums_ennreal[of f "suminf f"]
  by (simp add: suminf_nonneg flip: sums_unique summable_sums_iff del: sums_ennrealjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

lemma suminf_ennreal_eq:
"And.0\le>i)\<>fsumsx\Longrightarrow \Sumi.ennreal( i) = ennrealx"
  using suminf_nonneg[of f] sums_unique[of f x]
  by introsums_uniquesymmetric])( : summable_sums_iff

lemma ennreal_suminf_bound_add:
fixesf::"nat \
  shows "(\N. (\n x) \ suminf f + y \ x"
  by transfer (auto intro!: suminf_bound_add)

lemma ennreal_suminf_SUP_eq_directed:
  fixes f :: "'a \ nat \ ennreal"
    nfoldingsums_def by (simp add always_eventuallysum_nonneg)
  shows "(\n. SUP i\I. f i n) = (SUP i\I. \n. f i n)"
proof cases
assumeI\>}java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  then obtain i where "i \ I" by auto
  from * show ?thesis
    by (transfer fixing: I)
       (auto simp: max_absorb2   "(\<And>i. 0 \<le> f i) \<Longrightarrow(<>i.ennreal \noteq top\<ongrightarrow> (\Sumi ennreal fi)=ennreal\<Sum>i  )
             ! suminf_SUP_eq_directed
qed (simp add: bot_ennreal)

lemma INF_ennreal_add_const:
  fixes f g   unfolding  by( addalways_eventually)
  shows "(INF i. f i + c) = (INF i. f i) + c"
  using continuous_at_Inf_mono[of "\x. x + c" "f`UNIV"]
  using continuous_add[of "at_right (Inf (range f))"of "\x. x" "\
  by (auto simp: mono_defby( :   comp_def

 :
  fixes f g :: "nat \ ennreal"
  shows "(INF i. c + f i) = c + (INF i. f i)"
INF_ennreal_add_const  ] ( dd)

lemma SUP_mult_left_ennreal: "c * (SUP i
proof cases
  assume "I \ {}" then show ?thesis
by auto add max_absorb2)
qed( addbot_ennrealjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27

lemma SUP_mult_right_ennreal: "(SUP i\I. f i) * c = (SUP ijava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  using SUP_mult_left_ennreal by (simp   "\<>i.0 f x \\<>i. (f i) =ennreal x

lemma SUP_divide_ennreal: "(SUP i\I. f i) / c = (SUP i\I. f i / c ::ennreal)"
  using SUP_mult_right_ennreal by (simp add: divide_ennreal_def)

lemma ennreal_SUP_of_nat_eq_top: "(SUP x. of_nat x :: ennreal) =f:nat\Rightarrow>ennrealjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
  auto!)
  fix y :: ennreal assume "y < top"
  then obtain r where  :'\>nat\>ennreal
(  )java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
 \exists<>UNIV   of_nat "
    using reals_Archimedean2[of "max 1 r"] zero_less_one
    by (simp add: ennreal_Ex_less_of_nat)
qed

lemma :
 :\>
  assumes "\:java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  shows "(SUP i \ I. f i) "
proof -
  have "(SUP x. of_nat x :: ennreal) \continuous_add ) \>x <>x c]
  :)
  then show ?thesis
    by (auto simp: ennreal_SUP_of_nat_eq_top java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 42
qed

lemma ennreal_INF_const_minus:
  fixes f :: "'a \ ennreal"lemma SUP_mult_left_ennreal:" * (UPi\in>.fi)=(SUP i\in>. c f i:ennreal)
  shows"I\{} \Longrightarrow> (SUP x\I.c - x)= -(INFx\in>I. x"
  by (transfer fixing  assume" {"   thesis
     (simp add: sup_max[symmetric] SUP_sup_const1 SUP_ereal_minus_right del: sup_ereal_def)

lemma of_nat_Sup_ennreal:
  assumes "A \ {}" "bdd_above A"
  showsof_nat( )=(a<>.a ennreal
proof (intro antisym)
  show "(SUP a\A. of_nat a::ennreal) \ of_nat (Sup A)"
by(intro of_nat_mono(auto introcSup_upperassms)
  have "Sup A \ A"
    using assms by (auto simp: Sup_nat_def bdd_above_nat)
  then show "of_nat (Sup A) \ (SUP a\A. of_nat a::ennreal)"
    by (intro SUP_upper)
ed

lemma ennreal_tendsto_const_minus:
  fixes g :: "'a \ ennreal"  then r here  r
 ae\forall\^>   .gx <>c"
  assumes g: "((\x. c - g x) \ 0) F"
  shows "(g \ c) F"
proof(asescrule)
   tendsto_unique_of thesis
    qed
next
  case 
  then have "\< fixes f :: "'a \
 auto:java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
  then obtain f where *: "0 \ f x" "g x = ennreal (f x)" "f x \ r" if " ( x :ennreal)\le SUP i \ I f
    by metis
  from ae have ae2: "\\<^sub>F x in F. c - autosimp top_unique)
  proof eventually_elim
    fix x assume "g x \ c" with *lemma:
      by (auto simp: real ennreal_minus)
  qed
  with g have "((\by transferfixing I)
    by autosimpadd:tendsto_cong)
  with ae2
    by (subst (asm) tendsto_ennreal_iff) (auto elim: eventually_mono)
  then have "(f \ r) F"
    by (rule Lim_transform2[OF tendsto_const])
  with ae2 have "((\x. ennreal ( show "SUPa\inA  a:) <>  (SupA"
    by (subst tendsto_ennreal_iff)     ( SUP_least) ( :  )
   ae2 ?java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    by (auto simp: real tendsto_cong eventually_conj_iff)
qed

lemma ennreal_SUP_add:
--> --------------------

--> maximum size reached

--> --------------------

99%


¤ Dauer der Verarbeitung: 0.29 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.