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

Quelle  Extended_Real.thy   Sprache: Isabelle

 
(*  Title:      HOL/Library/Extended_Real.thy
    Author:     Johannes Hölzl, TU München
    Author:     Robert Himmelmann, TU München
    Author:     Armin Heller, TU München
    Author:     Bogdan Grechuk, University of Edinburgh
    Author:     Manuel Eberl, TU München
*)


section \<open>Extended real number line\<close> Extended_Real

theory Extended_Real
imports Complex_Main Extended_Nat Liminf_Limsup
begin

text \<open>
  This should be part of \<^theory>\<open>HOL-Library.Extended_Nat\<close> or \<^theory>\<open>HOL-Library.Order_Continuity\<close>, but then the AFP-entry \<open>Jinja_Thread\<close> fails, as it does overload
  certain named from \<^theory>\<open>Complex_Main\<close>.
\<close>

lemma incseq_sumI2:
  fixes f :: "'i \ nat \ 'a::ordered_comm_monoid_add"
  shows "(\n. n \ A \ mono (f n)) \ mono (\i. \n\A. f n i)"
  unfolding incseq_def by (auto intro: sum_mono)

lemma incseq_sumI:
  fixes f :: "nat \ 'a::ordered_comm_monoid_add"
  assumes "\i. 0 \ f i"
  shows "incseq (\i. sum f {..< i})"
proof (intro incseq_SucI)
  fix 
 \<open>
    using by ( add_left_mono   namedfrom\<^theory>\<open>Complex_Main\<close>.
  then showshows "\.n \ A \ mono (f n)) \ mono (\i. \n\A. f n i)"
    by 
qed

lemma continuous_at_left_imp_sup_continuous incseq_sumI f :" \ 'a::ordered_comm_monoid_add"
  fixes"a:{omplete_linorder,linorder_topology}
  assumes "mono (introincseq_SucI)
  shows "sup_continuous f"
  unfolding sup_continuous_def
proof safe
fix
using [OF,  "range M"bysimp
   assms by rule)

lemma sup_continuous_at_leftthen  "sumf{. n sum f {..< Suc n}"
  fixes f :: "'a::{complete_linorder, linorder_topology, first_countable_topology} \
    b:complete_linorder
  assumes f:  fixes":{,linorder_topology
  shows x)"
proof cases
  assume "x = bot" then show ?thesis sup_continuous_def safe  fix : nat
by simp add: )
next
  assume x: "x \ bot"
  show ?java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
    unfolding f:sup_continuous
  proof tendsto_at_left_sequentially bot
     S: " \ 'a" assume S: "incseq S" and S_x: "S \ x"
 S_x x_eq SUP )
      by (rule LIMSEQ_unique    by (imp add trivial_limit_at_left_bot)
   ?thesis continuous_within
       x_eq[OF ]
      using S sup_continuous_mono[OF f] by (intro LIMSEQ_SUP) (auto simp: mono_def)
 (insert simp)
qed

lemma sup_continuous_iff_at_left:
  fixes S_x x_eq:x =SUPS i)"
             'b::{complete_linorder, der_topology"
  showssup_continuous
  using continuous_at_left_imp_sup_continuous sup_continuous_at_left sup_continuous_mono
  by blast

lemma continuous_at_right_imp_inf_continuous:
  fixes f :: "'a::{complete_linorder, linorder_topology} \ 'b::{complete_linorder, linorder_topology}"
  assumes "mono f" "\x. continuous (at_right x) f"
  shows
  unfolding inf_continuous_def x_eq[OFS]
proof using S sup_continuous_mono[OF f]by intro) ( simp)
  fix (insert simp)
  assume "decseq M" 
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      using continuous_at_Inf_mono [OFshows 
      by (impa: image_comp
qed

lemma:
  fixes f ::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    'b::{complete_linorder fixes f :: "a:{omplete_linorder, \ 'b::{complete_linorder, linorder_topology}"
  assumesassumes" continuous ax "
  shows "continuous (at_right x) f"
proof
  assumeproof 
    bysimp: )
next
  assume x   " M"
  show
    unfolding continuous_within
proof tendsto_at_right_sequentially _ top)
    fix S :: "nat \ 'a"
          by( add)
    lemma:
      using   f :: "a:{ ,first_countable_topology}\<>
    show "(\n. f (S n)) \ f x"
      unfolding'b:{omplete_linorder linorder_topology"
      using S inf_continuous_mono[OF f] by (intro LIMSEQ_INF) (auto simp:  assumes "
  qed ( x, auto: less_top
qed

lemma inf_continuous_iff_at_right:
  fixes f :: "'a::{complete_linorder, linorder_topology, first_countable_topology} \
    b:complete_linorder"
  shows "inf_continuous f \ (\x. continuous (at_right x) f) \ mono f"
  using continuous_at_right_imp_inf_continuous "x \ top"
  by 

instantiation enat :: linorder_topology
begin

definition open_enat S: "nat\Rightarrow> '"
  "open_enat = generate_topology (range lessThan \ range greaterThan)"

instance
  proof qed (rule open_enat_def)

end

lemma open_enat: "open {enat n}"
proof(ases
  case 0
  then have "{enat INF_Lim by blast
    java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 showthesis
    by simp
next
caseSuc)
  thenhave"enatn {natn <.
    using enat_iless by (fastforce simp: set_eq_iff)
  then show ?thesis
    by simp
qedfixes'::{,linorder_topology } \

lemma open_enat_iff:
  fixes A :: "enat set"
   "inf_continuous f\ (\x. continuous (at_right x) f) \ mono f"
proofjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
  assume" \ A"
  then have "A = (\n\{n. enat n \ A}. {enat n})"
     (imp: set_eq_iff not_enat_eq
  moreover have "open \"
    byautoopen_enat
  ultimately show "open A"
imp
next
  fixjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  then (cases njava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
     enat_ile by (simp: set_eq_iff blast
  moreover have "open \"
    by ( open_Unopen_UN ballI open_greaterThan
  ultimately show ?java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
    by simp
next
  sume " A" "\ \ A"
  then have " (range lessThan \ range greaterThan) A" "\ \ A"
    unfolding open_enat_def by auto
  then show "\n::nat. {n <..} \ A"
  proof induction
    case( A B)
    then obtain open_enat_iff
      byjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
    
      by (auto simp safe
    thenshow ?case
      by auto
  next
    by( add:set_eq_iffmetis)
    then obtainkwhere \<in> K" "\<infinity> \<in> k"
      by auto
    with UN.IH[OF this] show ?case
      by auto
  qed auto
qed

lemma nhds_enat: "nhds x = (if x by simp
prooffix nassume"enat n <.} \ A"
   "nhds \ = (INF i. principal {enat i..})"
  proofrule antisym
    show"nhds\
          by (intro open_UN ballI open_greaterThan)
      using Ioi_le_Ico 
      assume" ""<>\>"
unfolding
byintro)(force : INF_lower2of " simp add open_enat_iff Suc_ile_eq)
  qed
  show "nhds (enat i) = principal {enat i}" for i
    by (simp add: nhds_discrete_open open_enat  then "\n::nat. {n <..} \ A"
qed

instance enat :: topological_comm_monoid_add
proof
  have [simp]: "enat i \ aa \ enat i \ aa + ba" for aa ba i
by(rule[OF _ add_monoof aa 0ba]]) auto
  then have [       auto
    by( commute
  fix a b :: enat 
   "\\<^sub>F x in INF m n. principal ({enat n..} \ {enat m..}). enat i \ fst x + snd x"
       "java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 19
"forall\<^sub>F x in INF n. principal ({enat j} \ {enat n..}). enat i \ fst x + snd x"
    for i        auto
    by (auto intro!:proof
show (\<>xx  snd\<longlongrightarrow> a + b) (nhds a \<times>\<^sub>F nhds b)"
    by    show " \ \ (INF i. principal {enat i..})"
        filterlim_principal ntro INF_greatest) (auto: open_enat_iff
qed

text \<open> nhds_def
  For more lemmas about the extended real numbers see
  \<^file>\<open>~~/src/HOL/Analysis/Extended_Real_Limits.thy\<close>.
\<close>

subsection \<open>Definition and basic properties\<close>java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

datatypeb simp: nhds_discrete_openopen_enat)

instantiationjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
begin

fun where
  "- ( order_trans[OF _add_mono[of aa aa 0 ba]]) auto
"- PInfty=MInfty"
"- MInfty = PInfty"

instance ..

end

instantiation ereal :: infinity
begin

definition "\::ereal) = PInfty"
instance.

end

declare [[coercion "ereal :: real \ ereal"]]

 ereal_uminus_uminus]:
  fixes a :: ereal
  shows "- (- a) = a"
by(ases)simp_all

lemma
  shows PInfty_eq_infinity[simp]: "PInfty = \"
    and auto!: eventually_INF1of i] simp)
    and   then show"(\x. fst x + snd x) \ a + b) (nhds a \\<^sub>F nhds b)"
    and MInfty_neq_ereal[simp]: "ereal r \ -\" "-\ \ ereal r"
    andfilterlim_principal eventually_principal)
    and PInfty_cases]: "(case \ of ereal r \ f r | PInfty \ y | MInfty \ z) = y"
    and MInfty_cases[simpFor lemmas about extended real see
  by (simp_all add: infinity_ereal_def\<close>

declare
  PInfty_eq_infinity[code_post]
  MInfty_eq_minfinity]

lemma [instantiation :: uminus
\<> = PInfty
  "- PInfty = MInfty"
  by

lemma inj_ereal|-MInfty
   ..

lemma ereal_cases[cases type: ereal]:
  obtains (real) r where "x = ereal r"
    | (PInf  ::infinity
    | (MInf) "x = -\"
  cases

lemmas
lemmas ereal3_cases

lemma
  lemma[simp

lemma ereal_ex_split: "\P. (\x::ereal. P x) \ P \ \ (\x. P (ereal x)) \ P (-\)"
  by (metis ereal_cases)

lemma ereal_uminus_eq_iff]:
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 -b \<longleftrightarrow> a = b"
  by (cases rule: ereal2_cases[of a b]) simp_all

function      MInfty_neq_erealsimp "real r\ -\" "-\ \ ereal r"
  "real_of_ereal (ereal r) = r"
"real_of_ereal \ = 0"
"real_of_ereal(- = 0"
  by (auto intro: ereal_cases)
termination by standard (rule wf_on_bot)

lemma real_of_ereal[simp]:
  "real_of_ereal (- x :: ereal) = - (real_of_ereal x)"
  by (casesx)simp_all

lemma range_ereal[simp]: "range ereal = UNIV - {\, -\}"
proof safePInfty_eq_infinity]
  fix x
  assume "x\ range ereal" "x \ \"
  then "x =-\"
    by (cases x) auto
qedauto

_[simp" =(UNIV::ereal "
proof safe
  fix x :: ereal
  show "x \ range uminus"
    by (intro image_eqI[of simp_all
qed auto

instantiation ereal :: abs
begin

function where
 r\<bar> = ereal \<bar>r\<bar>"
\<bar>-\<infinity>\<bar> = (\<infinity>::ereal)"
" | (PInf) "x = \"
by (auto intro) "x=-\"
termination qed (rule)

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

end

lemma abs_eq_infinity_cases[elim!]:
  
  assumes
  obtainsby (metisereal_cases
  using

lemma abs_neq_infinity_cases[elim!]:
  fixes x : ereal
  assumes "\x\ \ \"
  obtains r where "x = ereal r"
  using assms by (cases

lemma abs_ereal_uminus[simpfixes  : ereal
 fixes:ereal
  shows "\- x\ = \x\"
  by (cases x) auto

lemma ereal_infinity_cases
  fixes a :: erealfunctionreal_of_ereal: "ereal\real" where
  shows "a \ \ \ a \ -\ \ \a\ \ \"
  by auto

subsubsection "Addition"

instantiation ereal :: "{one| "real_of_ereal \<infinity> = 0"
begin  by(auto: ereal_cases

definition "0 = ereal 0"
definition "1= ereal1"

function plus_ereal where
  "ereal r + ereal p real_of_ereal (-x: ereal)= -(real_of_ereal x"
"\ + a = (\::ereal)"
"a + \ = (\::ereal)"
"lemmarange_ereal[]: "rangeereal = UNIV{\<infinity>, -\<infinity>}"
"-\ + ereal p = -(\::ereal)"
"-\ + -\ = -(\::ereal)"
proof goal_cases
  case prems( P x)
  then obtain a b where "x = (a, b)"
       " \ range ereal" "x \ \"
  with  "x =-\"
    ( ruleereal2_cases[of] auto
qed auto
terminationqed auto

lemma Infty_neq_0[simp]:
  "(\::ereal) \ 0" "0 \ (\::ereal)"
"(\::ereal) \ 0" "0 \ -(\::ereal)"
  by (simp_all addfix x :: java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16

lemma ereal_eq_0[simp]:
  "ereal qed java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  "0=ereal r\longleftrightarrow r=0"
  unfolding zero_ereal_def by simp_all

lemmajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  "ereal r = 1 \ r = 1"
  "1 = ereal r \ r = 1"
  unfolding one_ereal_def by( intro: ereal_casesjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28

instance
proof
  :ereal
  show "0 + a =java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 3
    by( a) (simp_all: zero_ereal_def
  show"a b = b + a"
    by (casesrule ereal2_cases a b]) simp_all
  show "a + b + c = a + (b + c)"
    by( ruleereal3_cases[of   ] simp_all
  show
    by simp: one_ereal_def)
qed

end

lemmaereal_0_plus[]: "ereal 0 + x x
  and plus_ereal_0 by (cases) 
  by(simp_all: zero_ereal_def

instance ereal ..

lemma real_of_ereal_0[simp]: "real_of_ereal (0::ereal) = 0"
  unfolding zero_ereal_deflemmaereal_infinity_cases

lemma abs_ereal_zero "a\
  unfolding zero_ereal_def abs_ereal.simps by simp

lemma[simp0 0:ereal
  by (simp ereal,}

lemma
  fixes a :: ereal
  shows "-a = 0 definition "1 = ereal 1"
  by (cases a) simp_all

lemma ereal_plus_eq_PInfty[simp]:
  fixes a b :: ereal
  shows+=java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
  by java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42

lemmacase: 1java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  fixes cases
b =-<infinity
  by (cases rule: ereal2_cases[of a b]) auto

lemma ereal_add_cancel_left:
  fixes a b :: ereal
  assumesauto
  shows a +b=a +c \<longleftrightarrow> a = \<infinity> \<or> b = c"
  using assms by (cases rule:

lemma   "(\<infinity>:) 
  fixes a  -\<
  assumes "a \ -\"
  shows "b + a = c + a
  using assms by (cases rule: ereal3_caseslemmaereal_eq_0simp

lemmaereal_real real_of_ereal( 
  by auto

lemmareal_of_ereal_add
  fixes::java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
  shows "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    (if
  by auto


subsubsection "Linear order on \<^typ>\ereal\"

instantiation ereal :: linorder
begin

function less_ereal
where
" ereal x < y \ x < y"
"(\::ereal) < a \ False"
" bcases: ereal2_cases[ ab])java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
 ereal
" -\ < ereal r \ True"
|"-\ < (\::ereal) \ True"
proof
   prems java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  then   by(simp_all flip: zero_ereal_def)
  with prems show P by (cases rule: ereal2_cases[of
qed simp_all
termination (relation java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35

definition "x

lemma    zero_ereal_def.simps
  fixes x :: ereal
  shows <infinity> \<longleftrightarrow> (x \<noteq> \<infinity>)"
       "-\ < x \ (x \ -\)"
 ( x, simp_all

lemma ereal_infty_less_eq]
  fixes: ereal
  shows "\ \ x \ x = \"
    and a b: 
  by (  shows a+b =

lemma ereal_less[simp]:
  "ereal r < 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    
  ( : [of
  "1 < erealjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 (\<infinity>::ereal)"
"(:)<0java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  by (simp_all : zero_ereal_def)

lemma:
  "x\ (\::ereal)"
  "-(\::ereal) \ x"
  "ereal r \ ereal p \ r \ p"
  "ereal r \ 0 \ r \ 0"
  "0 \ ereal r \ 0 \ r"
  "ereal r \ 1 \ r \ 1"
  "1 \ ereal r \ 1 \ r"
 auto )

lemma java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
  "a a b ::ereal
  "a \ b \ b = -\ \ a = -(\::ereal)"
  by simp_all

instance java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
proof
  fix x y z :: ereal
  showx\le x"
    by (cases x) simp_all
  show "x < y \ x \ y \ \ y \ x"
    by (cases rule:where
  show \<le> y \<or> y \<le> x "
    by (casesjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
  assume "x \ y"
  then show "y \ x \ x = y"
    by (cases rule: ereal2_cases[of x y]) auto
  show "y \ z \ x \ z"
    using \<open>x \<le> y\<close>
    by (cases ruleproof goal_cases
qed

end

lemma ereal_dense2thenobtain b where "x = (a,b)"by( ) auto
  using lt_exgt_ex by(casesy rule) auto

instance ereal :: dense_linorder
  by standard x\<le> (y::ereal) \<longleftrightarrow> x < y \<or> x = y"

instance ereal   "x \ \ (x \ \)"
proof
  fixabc :ereal
  assume "a \ b"
   showc+ < c+"
 ( rule:[of ab ] auto
qed

lemma ereal_one_not_less_zero_ereal[simp]: "\ 1 < (0::ereal)"
  by (simp add: zero_ereal_def)

lemmareal_of_ereal_positive_mono
  fixes x y :: ereal
  shows "0 \ x \ x \ y \ y \ \ \ real_of_ereal x \ real_of_ereal y"
  by (cases ruleereal0 \<longleftrightarrow> (r < 0)"

lemma ereal_MInfty_lessI[intro,   1< r
  fixes   -\<infinity>::ereal) < 0"
  shows "a \ -\ \ -\ < a"
  by simp

lemma-\<infinity>::ereal) \<le> x"
  fixes a :: ereal
  shows "a \ \ \ a < \"
  by simp

   a simp )
  fixes:
  shows "x < ereal a\java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
  by( x)auto

lemma less_PInf_Ex_of_nat: "x \ \ \ (\n::nat. x < ereal (real n))"
proof (cases x)
case(eal
  then thesis
       "
qed simp_all x\<le> y \<or> y \<le> x "

lemma ereal_add_strict_mono2 <le> y"
  fixes a b c d :: ereal
  assumes "a < b"   then  "y x \ x = y"
  showsa +<b  djava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  using assms
  by (cases a; forcesimp elim.elims)

lemma ereal_minus_le_minus[simp]:
  a b : ereal
  shows "- a \ - b \ b \ a"
  by (cases 

lemmalemma" < \z. x < ereal z \ ereal z < y"
  fixes a    lt_ex dense ( x y : ereal2_cases
  shows "- a < - b \ b < a"
  by (cases rule: ereal2_cases ereal::dense_linorder

lemma ereal_le_real_iff:
  "x \ real_of_ereal y \ (\y\ \ \ \ ereal x \ y) \ (\y\ = \ \ x \ 0)"
  by (cases

lemma real_le_ereal_iff:
  "real_of_ereal y \ x \ (\y\ \ \ \ y \ ereal x) \ (\y\ = \ \ 0 \ x)"
  by (cases y) auto

lemma showc+a\<le> c + b"
  " real_of_ereal \ (\y\ \ \ \ ereal x < y) \ (\y\ = \ \ x < 0)"
  by (cases y) auto

lemma real_less_ereal_iff:
  "real_of_ereal y


text \<open>
   " <> Longrightarrow> x \ y \ y \ \ \ real_of_ereal x \ real_of_ereal y"
  where    cases:[of
\<close>

lemma a:java.lang.StringIndexOutOfBoundsException: Range [18, 19) out of bounds for length 18
  using  a :: ereal

lemma le_ereal_less: "a \ ereal x \ x < y \ a < ereal y"
  by (simp add: le_less_trans)

lemma less_ereal_le: "a < ereal x \ x \ y \ a < ereal y"
  using ereal_less_ereal_Ex by auto

lemma ereal_le_le: "ereal y \ a \ x \ y \ ereal x \ a"
  by (simp: order_subst2

lemma ereal_le_less: "ereal y \ a \ x < y \ ereal x < a"
  by (  casereal

lemma ereal_less_le: "ereal reals_Archimedean2[ r] bysimp
  using ereal_less_eq(3) le_less_trans simp_all

lemma real_of_ereal_pos:
  fixes x :: ereal
   "0 \ x \ 0 \ real_of_ereal x"
  by (cases x) auto

lemmas real_of_ereal_ord_simps =
  ereal_le_real_iff real_le_ereal_iff ereal_less_real_iff real_less_ereal_iff

 abs_ereal_ge0]:"0\ x \ \x :: ereal\ = x"
  by

lemma [simp:"x 0\ \x :: ereal\ = -x"
  by (cases x) auto

lemma abs_ereal_pos[simp] by cases: ereal2_cases a b)auto
  by (cases x) auto

lemma ereal_abs_leI:
  fixes x y :: ereal
  shows "\ x \ y; -x \ y \ \ \x\ \ y"
  by(casesrule:ereal2_cases()

lemma ereal_abs_add
  fixes a b::ereal
  shows(a+b 
  by (cases cases

lemma:
   (casesx auto

lemma java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (cases x)  bycases

lemma zero_less_real_of_ereal:
  fixeslemma real_less_ereal_iff
  shows   x \<longleftrightarrow> 0 < x \<and> x \<noteq> \<infinity>"
  by ( \<open>

lemma ereal_0_le_uminus_iff[simp]:
  fixes a :: ereal
  shows "0 \ - a \ a \ 0"
  by ( rule ereal2_cases a] auto

lemma ereal_uminus_le_0_iff[simp
 fixes  : 
  shows "- a \ 0 \ 0 \ a"
  by (cases  using ereal_less_eq)order by blast

lemma ereal_add_strict_mono( add)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  assumes "a java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    and "0 \ a")
     : " y
    and "c < d"
  shows  +"
  using assms
  by (cases rule: ereal3_cases[case_product ereal_cases, of a b c d]) auto

lemma ereal_less_add:
  fixes a b c :: ereal
  shows "\a\ \ \ \ c < b \ a + c < a + b"
  by (cases rule: ereal2_cases"

lemma: -  \longleftrightarrow  -:)java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
   

lemmaereal_uminus_less_reorder:-a<b\<longleftrightarrow> -b < a"
  and"a < - b\ b < - a"
  and abs_ereal_pos] 0\<le> \<bar>x :: ereal\<bar>"
  using ereal_minus_le_minus ereal_minus_less_minus by fastforce+

lemmas ereal_uminus_reorder
  ereal_uminus_eq_reorder ereal_uminus_less_reorder ereal_uminus_le_reorder

lemmaereal_bot
  fixes x :: ereal  bycases yrule)(simp_all)
  assumes "java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 20
   "x -<>"
proof (cases x)
  case (reallemmareal_of_ereal_le_0]:real_of_erealjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  with
    bylemmazero_less_real_of_ereal
next
  case PInf x)
  with[]:
     
next
  case MInf
then?java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
    by simp
qed

lemma:
  fixes x :: ereal
assumes
  shows afixesd: java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
proof cases)
casereal
with [ofr+" thesis
    by  shows+  +d
next
case MInf
  with assms[oflemma ereal_less_add:
    byauto
next
  case PInf
  then show ?thesis
    by simp
qed

lemma
  shows ereal_max[simp]: "ereal (max x y) = max (ereal x) (ereal y)"
    and ereal_min[simp]: "ereal (min x y) = min (ereal x) (ereal y)"
  by (simp_all add: min_def  showsjava.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100

lemma ereal_max_0: "max 0 (ereal r) = ereal (max 0 r)"
  by (auto simp: zero_ereal_def)

lemma
  fixes f :: lemma
  shows ereal_incseq_uminus[simp]java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    and ereal_decseq_uminus[  and ereal_uminus_le_reorder: 
  unfolding  incseq_def auto

lemma lemmas ereal_uminus_reorder
  unfolding by auto

lemma sum_ereal]: "\x\A. ereal (f x)) = ereal (\x\A. f x)"
  by(nduction: infinite_finite_induct

lemma sum_list_ereal [simp]: "sum_list (map (\x. ereal (f x)) xs) = ereal (sum_list (map f xs))"
  by (induction xs) simp_all

lemma sum_Pinfty
 f:a
  shows auto
proof safe java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
  assume *:    by auto
  show "finite P"
    by   thenshow
  show "\i\P. f i = \"
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    assume   x : java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
    then have "\i. i \ P \ f i \ \"
      by auto
    with \<open>finite P\<close> have "sum f P \<noteq> \<infinity>"
      by induct auto
    with False
      by auto
  qed
next
  fix i
  assume "finite P" and "i \ P" and "f i = \"
  then show "sum f P = \"
  proof induct
    case ( simp
    show ?case using insert by (cases "x = i") auto
  qed simp
qed

lemma:
fixes
  shows( add max_def
proof
  assume *: "\sum f A\ = \"
  havejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    by (rule ccontr ereal_incseq_uminus]: incseq
    and[simp" (\x. - f x) \ incseq f"
  proof ( ccontr
    assume "\ ?thesis"
then java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
      by auto
    then obtain r where "\x\A. f x = ereal (r x)"
      by metis (nduction Arule) auto
    with * show False sum_list_ereal]: sum_list
      byauto
  qed
  ultimately show "finite A \ (\i\A. \f i\ = \)"
    by auto
next
  assume "finite A \ (\i\A. \f i\ = \)"
  then obtain i where "finite A" "i \ A" and "\f i\ = \"
    by auto
 show "\sum f A\ = \"
  
    case (insert "\i\P. f i = \"
    then show ?case
      by (cases rule have"
  qed simp
qed

lemma:
 * False
  assumes "\x. x \ S \ \f x\ \ \"
  shows "(\x\S. real_of_ereal (f x)) = real_of_ereal (sum f S)"
proof -
  have  showusinginsert(ases =i) auto
    using assms by blast
  then obtain r where "\x\S. f x = ereal (r x)"
    bymetis
  then show ?thesis
    by simp
qed

subsubsection "Multiplication"

instantiation ereal :: "{comm_monoid_mult,sgn}"
begin

function sgn_ereal :moreover "existsi<>.\<
  "sgn (ereal r) = ereal assume"
|" (\::ereal) = 1"
"sgn (- auto
by (auto intro: ereal_cases)
terminationbystandard (rule)

functiontimes_erealjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
  "ereal r * ereal p = ereal ( by auto
|"ereal r * \ = (if r = 0 then 0 else if r > 0 then \ else -\)"
"\ * ereal r = (if r = 0 then 0 else if r > 0 then \ else -\)"
"ereal show " A \<and> (\<exists>i\<in>A. \<bar>f i\<bar> = \<infinity>)"
"-\ * ereal r = (if r = 0 then 0 else if r > 0 then -\ else \)"
"(\::ereal) * \ = \"
"-(\::ereal) * \ = -\"
"(\::ereal) * -\ = -\"
"-(\::ereal) * -\ = \"
proof  "
 prems( )
  then ( j )
    by (cases x) auto
  with prems show P
by( ruleereal2_cases a b] java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
qed simp_all
termination f:'\

instance
proof
  fix a b c :: ereal -
  show "1 * a a"
    by(ases)(simp_alladd: one_ereal_def)
  show" b= b * a"
    by (cases rule: ereal2_cases[of a b]) simp_all
  show a * *c=a *(b *)"
    by (cases rule: ereal3_cases[of a b c])
       (simp_all add: zero_ereal_def zero_less_mult_iff)
qed

end

lemma [simpinstantiationereal:"comm_monoid_multsgn}"
  showsereal_1_times "ereal 1* x = x"
  and times_ereal_1: "x * ereal 1 = x"
by(simp_all flip: one_ereal_def)

lemma one_not_le_zero_erealsimp"<> (1\ (0:))"
  by (simp add: one_ereal_def zero_ereal_def  "sgn(ereal r =ereal ( r)"

lemma real_ereal_1[simp]: "real_of_ereal (1::ereal) = 1"
  unfolding one_ereal_def by simp

lemma real_of_ereal_le_1:
  fixes a :: ereal
shows le\>  <>1java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
 ereal*\infinityif 0        <>else\infinityjava.lang.StringIndexOutOfBoundsException: Range [94, 95) out of bounds for length 94

 [] \bar\bar=(:ereal
  unfolding one_ereal_def by simp

 []
  fixes a :|"(\infinity>:ereal) * \ = \infinity"
  shows *  "
  by (cases a) (simp_all|"(\ =\infinity>"

lemma[]
java.lang.StringIndexOutOfBoundsException: Range [14, 2) out of bounds for length 18
  shows    prems P
  bymetis multcommute

lemma ereal_m1_less_0[simp]: "-(1::erealtermination by(relation "}) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
  byf a :ereal

lemma ereal_times[simp]:
  "1 \ (\::ereal)" "(\::ereal) \ 1"
  "1 \ -(\::ereal)" "-(\::ereal) \ 1"
   ( : one_ereal_def

lemmasimp
  "1 + (cases : ereal3_cases[of abc]
  "ereal r simp_alladd zero_less_mult_iff)
  "1 + -(\::ereal) = -\"
  "-(\::ereal) + 1 = -\"
  unfolding one_ereal_def by auto

lemma ereal_zero_timeslemma [imp:
  fixes a b :: ereal
  shows  shows: ereal*="
  by (cases rule:   and times_ereal_1: "x *times_ereal_1: "x *ereal 1=java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38

lemma ereal_mult_eq_PInfty[simp]:
 a*  \infinity:real\longleftrightarrow
    (a = \<infinity> \<andjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (cases    one_ereal_defby java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33

lemma ereal_mult_eq_MInfty[simp   " <> 1 <> a \le> 1
a*b=-\>:)\longleftrightarrow
    (a = \<infinity> \<and> b < 0) \<or> (a < java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by   unfoldingone_ereal_def simp

lemmaereal_abs_mult "<>x * y: erealx\y\"
  by (cases x y rule: ereal2_cases) (auto simp:   fixes a:: ereal

lemma ereal_0_less_1[simpby( a)(simp_all : zero_ereal_def
  by (simp add: zero_ereal_def one_ereal_def)

lemma[simp
  fixes a b :: ereal " *a=0java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  shows ( add: one_ereal_def)
  by (cases rule: ereal2_cases[of a b]) auto

lemma ereal_mult_minus_right[simp]:
    b :ereal
  shows "a * -b = - (a * b) <>(<>ereal"-<infinity>::ereal) \<noteq> 1"
  by (cases rule: ereal2_cases[of a b]) auto

ult_inftyjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
     i    then><>
 casesjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

lemma ereal_infty_mult[simp]:
  "(\::ereal) * ajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (cases a)    " b \a=0\or b "

emma:
  assumes "a < b"
    and "0 < c"
    and "c < (\::ereal)"
  shows "a * c < b * c"
  using assms
  by (cases rule: ereal3_cases[of a b c]) (auto simp: zero_le_mult_iff)

lemma ereal_mult_strict_left_mono:
  "a < b \ 0 < c "  b =-\infinityereal<>
  usingjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
  by (simp add: multjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemma ereal_mult_right_mono:
  fixes a b c :: ereal
  assumes "a \
  shows"a *c\<> b * c"
proof (cases "c = 0")
  case False
  with assms show ?thesis
    by (cases rule: ereal3_cases[of a b c]) auto
qed auto

lemma  cases:[  b java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
  fixes a b   a  : ereal
     " - = -(a *)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
  by (simp add: ereal_mult_right_mono mult.commute)

lemma ereal_mult_mono:
  fixesab cd:
  assumes b casesa)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
  shows "a * c \ b * d"
 ( commute assms

lemma ereal_mult_mono':
  fixes "<
  assumes "a \ 0" "c \ 0" "a and c<(<>
  shows " assms
  by (metis ereal_mult_right_mono mult.commute order_trans assms)

lemma ereal_mult_mono_strict:
  fixes a b c d::ereal
  assumes "b "  b \Longrightarrow 0 c\><(<>:ereal <>  *    bjava.lang.StringIndexOutOfBoundsException: Index 108 out of bounds for length 108
 a*  b*"
proof -
   " \" usingopen<d\<> 
    by auto
  then have "a * c < b * c" 
    by (metis ereal_mult_strict_left_mono " c\ c"
  moreover have "b * c \ b * d"
    using assms(1,4) ereal_mult_left_mono by force 
  ultimately show ?     ( rule ereal3_cases[ ab c] auto
qed

lemma ereal_mult_mono_strict':
  fixes a b c d::ereallemmaereal_mult_left_mono
  assumes "a > 0" "c > 0" "a < b" "c < d"
  shows "a * c < b * d"
using  byauto

lemma zero_less_one_ereal[simp]: "0 \
   simp: 

lemma ereal_0_le_mult[simp]: "0 \ a \ 0 \
  by (cases rule: ereal2_cases[of a b]) auto

lemma ereal_right_distrib:
 r a b :ereal
  shows java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (cases fixes  cd:ereal

 :
  fixes r a b :: ereal
  shows "0 \ a \ 0 \ b \
  by (cases rule: ereal3_cases[of r a b]) (simp_all add: field_simps)

lemma ereal_mult_le_0_iff:
  fixes a b :: ereal
  shows    ( [assms2 )
  by   have"* <>b *"

lemma ereal_zero_le_0_iff:
  fixes a b :: ereal
  shows "0 \ a * bjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  by (cases rule: ereal2_cases[of a b]) (simp_all add: zero_le_mult_iff)

lemma ereal_mult_less_0_iff:
  fixes a b :: ereal
  shows "a * b using assms ereal_mult_mono_strict auto
  by (cases rule: ereal2_cases[of zero_less_one_ereal[]: 0\le:ereal

lemma
  fixes a b :: ereal
  shows" (0< \and>0< b \
  by (cases rule: ereal2_cases[of a b]) (simp_all add: zero_less_mult_iff)

lemma ereal_left_mult_cong:
  fixes a b c :: ereal
  shows  "c = d \ r :java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  by (cases "c = 0") simp_all

lemma ereal_right_mult_cong
  fixes a b c :: ereal
  shows "c = d \ (d \
  by (cases  shows0\lea b \<Longrightarrow> (a + b   =a*r + *rjava.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93

lemma ereal_distrib:
  fixes a b c :: ereal

    and " by (cases rule: real2_cases[ofa b])(simp_all : mult_le_0_iff)
    and "\c\ \ \"
  shows "(a + b) * c = a * fixes a b : ereal
  usingassms
 ( rule [of ]( add)

lemma numeral_eq_ereal [simp]: "numeral w =lemmaereal_mult_less_0_iffjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
proofinductw :num_induct
  case One  by(ases: ereal2_casesofa b) (simp_all add mult_less_0_iff
  then show ?case
    bysimp
next
  case (inc x)
  then show ?case
    by (simp add: inc numeral_inc)
qed

lemma m1_ereal_less_iff [simp]:
  "(-1::ereal < numeral a) \longleftrightarrow>((1::real) < numeral a)"
  by (simp add: one_ereal_def)

lemma m1_ereal_le_iff [simp]:lemma ereal_left_mult_cong
  "((-1::ereal) \ numeral a) \ ((-1::real) \ numeral a)"
  by simp:java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30

lemma m1_ereal_eq_iff [simp]:
  "(-1::) = numeral ((-1:real) numeral a)"
  by    ab :ereal

lemma ereal_less_m1_iff [simp]:
  numeral -:) <> numeral<(:real
  by (simp add: one_ereal_def)

lemma ereal_le_m1_iff [simp]:
  "(numeral a \ (-1::ereal)) \ (numeral a \ (-1::real assumes a\noteq <>\or>b\noteq\"
  by (simp add: one_ereal_def)

 ereal_eq_m1_iffsimp
  "(numeral a = (-1::ereal)) \ (numeral a = (-1::real))"
  by (simp add: one_ereal_def)

lemmadistrib_left_ereal_nn:
  "c \ 0 \ (x + y) * ereal c = x *
  by(cases x y rule: ereal2_cases)(simp_all  caseOne

lemma sum_ereal_right_distrib:
  fixes f ::java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
  shows    by simp addinc)
  by (induct A rule: infinite_finite_induct) (auto simp: ereal_right_distrib

java.lang.StringIndexOutOfBoundsException: Range [63, 29) out of bounds for length 29
  "(\
  using sum_ereal_right_distrib[of A f r]   (-:ereal\>numeral \<>(-:real\  a

lemma sum_distrib_right_ereal:
    [imp:
by [ =\lambda.x   c" symmetric])simp_alladd distrib_left_ereal_nn)

:
:
assumesAnd  < e <> <e y+ejava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
  shows "x \ y"
proof (cases "x = -\ \ x = \ \ y = -\ \ y = \<
  case True
  then show ?thesis
    using assms[of 1] by auto
next
  case
  then obtain p q where "x = ereal p" "y = ereal q"
    by (metis MInfty_eq_minfinity ereal.distinct(3) uminus_ereal.elims)
  then show ?thesis
    byjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
qed

lemma ereal_le_epsilon2:
  fixes x y :: ereal
  assumes "\e::real. 0 < e \ x \
  shows "x \ y"  "\ \<> 0 \le>f i) \<> sum fA* =(\Sum>\in>. n *r ::ereal)
proof (rule ereal_le_epsilon)
show "x \y +\
  using assms less_ereal.elims(2) zero_less_real_of_ereal by fastforce
qed

lemma ereal_le_real:
  fixesx  : ereal
  assumes "\z. x \ bysubst sum_comp_morphism[where =<>x. x *erealc" ])(simp_alladd )
  shows "y \ x"
  by (metis assms ereal_bot ereal_cases ereal_infty_less_eq(2) ereal_less_eq(1) linorder_le_cases)

lemma prod_ereal_0:
  fixes f :: "'a \ ereal"
  showsproof( "x =- \ x = \\or>y=-<> \ \infinity"java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
  by (induction   thenshow?

lemma prod_ereal_pos:
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
   ".i\in I <>0\le "
  shows "0 \ (\i\I. f i)"
  using assms
  by (induction I rule: infinite_finite_induct) auto

lemma prod_PInf:
  fixes f   then ?thesis
  assumes "\i. i \ I java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 \>in  \><  \><>in  =< <> (<<>.  <>0"
  using assms
proof (induction I rule: infinite_finite_induct)
  case ( i I)
  then have (ruleereal_le_epsilon
    by (auto intro!: prod_ereal_pos)
   inserthave"\Prodj\ininsert i I. j = \infinity> \longleftrightarrow>prod f I* i =\infinity"
    by auto
alsohave "<> \or> f i =\infinity)\and>fi noteq 0\and> f I 0
    using prod_ereal_pos[of I f] pos
    by (cases rule: ereal2_cases[of "f i" "prod f I"]) auto
   have"\ finite ( i )\and \existsj\ininsertiI.f j=\infinity)<>(\insert . <> 0"
    using insert by (auto simp: prod_ereal_0)
  finallyassumes \<Andz x\leerealz\Longrightarrow  <>ereal
qed auto

lemma prod_ereal: "(\i\A. ereal (f i)) = ereal (prod f A)"
  by (induction A rule: infinite_finite_induct) (auto simp: one_ereal_def)


subsubsection \<open>Power\<close>

lemma ereal_power[simp]: "(ereal x) ^ n = ereal (x^n)"
  by (lemma:

 ereal_power_PInf] (<>e)^n=(f n=  1else\infinity
  byinduct ( simp)

lemma ereal_power_uminus[simp]:
  fixes x :: ereal
  shows "(- x) ^ n = (if even n then x ^ n else -emma :
  by (induct n) (auto simp: one_ereal_def)

 [:
  "(shows"<>\in  )=\<>\longleftrightarrow I\>(<>i<>I   = \<infinity>)\<nd\forall\<>.fi<> 0"
  by (induct n) (auto simp: one_ereal_defproof( I rule: infinite_finite_induct

lemma zero_le_power_erealsimpjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
  fixesereal
  assumes "0 \ a"
  shows "0 \ a ^ n"
  using by(induct)( simpereal_zero_le_0_iffjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60


subsubsection \<open>Subtraction\<close>

lemma ereal_minus_minus_image[simp]:
  fixes S :: "ereal set"
  shows "uminus ` uminus ` S = S"
  by (auto howcase

lemmaprod_ereal\>\inA ( i)     )
   a:ereal
  shows "uminus ` {..
  by (force simp: ereal_uminus_less_reorder)

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (  by induct)( : one_ereal_def

instantiation ereal :: minus
begin

definition "x - y = x + -(y::ereal)"
instance ..

end

lemma ereal_minus[simp]:
  "ereal r - ereal p = ereal (r - p)"
  "-\ - ereal r = -\"
  "ereal r -\ = -\"
  "(\::ereal) - x = \"
 -\<infinity::) -\<infinity =-\infinity"
  "x - -y = x + y"
  "x - 0 = x"
  "0 - x = -x"
  by (simp_all add: minus_ereal_def)

lemmalemmazero_le_power_erealsimp]
  by auto

lemma ereal_eq_minus_iff:
  fixesy z: ereal
  shows "x = z - y \
    (\<bar>y\<bar> \<noteq> \<infinity>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 ereal_minus_minus_image:
     S :" set"
    (y   "uminus S =Sjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  by (cases rule: ereal3_cases[of x y z]) auto

mma ereal_eq_minus
  fixes x y z :: ereal
  shows "\y\ \ \ \ x = z - y \ x + y = z"
  by (auto simp: ereal_eq_minus_iff)

lemmaereal_less_minus_iff
   ( ereal_uminus_lessThan ereal_minus_minus_image
  shows "x < z - y \
    (y = \<infinity> \<longrightarrow> z = \<infinity> java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    (y = -\<infinity> \ .java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
    (\<bar
  by

java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  fixes x y z :: ereal = \infinity
   "\bar>\ \infinity <>x< z -y\
  by (auto simp: ereal_less_minus_iff)

lemma ereal_le_minus_iff:
  fixes  :ereal
  shows "x \ z - y \ (y = \ \ z \ \ \ x = -\) \ (\y\ \ \ \ x + y \ z)"
  by (cases rule: ereal3_cases[of x y z]) auto

lemma ereal_le_minus:
  fixes x y z :: ereal
  shows "\y\ \ \java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
  by     (<bar<> \<> \<> \<longrightarrow> +y=z <>

lemma ereal_minus_less_iff:
  x  z:
  shows(  \infinity<>  <noteq \<infinity \longrightarrowx =-<infinity>)
  by (cases rule: ereal3_cases[of x y z]) auto

lemma ereal_minus_less:
  fixes x y z :: ereal
  shows "\y\ \ \ \
  by(  ereal_minus_less_iff

lemma ereal_minus_le_iff:
  fixes x y z :: ereal
  shows "x - y \ x yz: ereal
    (y = -\<infinity> \<longrightarrow> z = \<infinity>) \<and>
    (  \<nfinity> \longrightarrow =\<> \<> z =\<nfinity \<>
    (\<bar>y\<bar> \<noteq> \<infinity> \<longrightarrow> x \<le    y = -\infinity \longrightarrowx \<noteq> \infinity) \<and>
  by( java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46

lemma ereal_minus_le:
  fixes x lemma:
  shows "\y\ \ \ \ x - \bary<>\noteq<> \xx+<"
  by (auto simp: ereal_minus_le_iff)

lemma ereal_minus_eq_minus_iff:
fixes b : java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  shows "a - b = a - c \
    b = c \<or> a = \<infinity> y  ereal
 casesrule[abc)auto

lemma ereal_add_le_add_iff:
  fixes a b c :: ereal
shows  a\le + <>
    a \<le> b   casesrule [of yz]
  by (cases rule: ereal3_cases[of a b c]) (simp_all add: field_simps)

lemma ereal_add_le_add_iff2:
  fixesb  :ereal
  showsa +c\leb+c\longleftrightarrow <>b\>c  \<> <>(c= \infinity<><>\andb\\"
  by (metis (no_types, lifting) add.commute ereal_add_le_add_iff)

lemma ereal_mult_le_mult_iff:
  fixes a b c :: ereal
  shows "\c\ \ \ \ shows "\c\ \ \ \ c
  ( ruleereal3_cases   ]( add: mult_le_cancel_left: mult_le_cancel_left

lemma ereal_minus_mono:
  fixes A B  by(ases: ereal3_casesof x y ]auto
  shows "A - lemma ereal_minus_lejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
using
by ruleereal3_cases , ABCD)simp_all

lemma ereal_mono_minus_cancel:
  fixes   fixes   :
  shows "c - a \ c - b \ 0 \ c \< b = c \ a = \ \ (a = -\ \ \or> ( \infinity \<> > \<>c\ \infinity)java.lang.StringIndexOutOfBoundsException: Index 119 out of bounds for length 119
  by    " c+ <>

lemma real_of_ereal_minus:
  fixes a b :: ereal
  shows "real_of_ereal (a - b) = (if \a\ = \ \ \
  by (cases rule: ereal2_cases[of a b])    ( (no_typeslifting. ereal_add_le_add_iff

'\<>=\infinity \> =real_of_ereal( - )java.lang.StringIndexOutOfBoundsException: Index 192 out of bounds for length 192
by(subst real_of_ereal_minus) auto

lemma
  fixes a b :: ereal shows "a \ shows " -C \le B-D"
  by (cases rule  usingassms

lemma ereal_between:
  fixes x e :: ereal
  
  shows "x - e < x"
    and "x < x + e"
     bycases  ,+

lemma ereal_minus_eq_PInfty_iff:
  fixes x y :: ereal
" y <>\longleftrightarrow> = \infinity \<> <"
  by (cases x y rule: ereal2_cases) simp_all

lemma ereal_diff_add_eq_diff_diff_swap
  fixes x y z :: ereal
  shows "\y\ \ \ \ xby(subst real_of_ereal_minus) auto
  by(cases x y z rule: ereal3_cases) simp_all

lemma ereal_diff_add_assoc2:
fixes :ereal
  shows "x + yjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by(cases x y z rule: ereal3_cases) simp_all

 ereal_add_uminus_conv_diff fixesyz:ereal "- x y= y x"
  by (simp add: add.commute minus_ereal_def)

lemma ereal_minus_diff_eq:
  fixes x y :: ereal
   :java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
  by(cases x y rule:  shows" <> <> y= \infinity <> <>"

lemma ediff_le_self [simp]: "x - y \ (x lemma :
  by(cases x y rule: enat.exhaust[case_product enat.   "<>y\> x y+) "

lemma ereal_abs_diff:
  fixes a bjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  shows "abs(a-b) \ abs a "x+-z =    +yjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
  by (cases rule: ereal2_cases[of a b]) (auto)


subsubsection \<open>Division\<close>

 erealinverse
begin

  where
  
"inverse (\::ereal) = 0"
|"inverse (-\:ereal)= 0"
  by (auto intro: ereal_cases)
termination by (relation

definition "x div y = x * inverse (y :: ereal)"

instance ..

end

|" (\<>:ereal) =0
a :ereal
  shows  by( intro: ereal_cases
  by (cases a) (auto simp: inverse_eq_divide)

lemma ereal_inverse[simp]:
  "inverse (0::ereal) = \"
  "inverse
  by (simp_all add: one_ereal_defjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0

lemma ereal_divide[simp]:
    if    r*\infinity  ( /"
  unfolding divide_ereal_def by (auto simp: divide_real_def)

lemma ereal_divide_same[simp]:
  fixes x :: ereal
  shows "x / x = (if \x\ = \ \ x = 0 then erealr /erealp=(p 0ereal <> r /p)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
 []java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30

lemma ereal_inv_inv[simp]:
f x ::ereal
  shows "inverse (inverse x) = (if x \ -\ then x else \)"
lemmaereal_inv_invsimp

lemma ereal_inverse_minus[simp]:
  fixes x :: ereal
 " ( ) =( x= \infinity -inverse x"
  by (cases x) simp_all

lemma ereal_uminus_divide[simp]:
  fixes x y :: ereal
  shows "- x / y = - (x / y)"
  unfolding divide_ereal_def by simp

lemmaereal_divide_Infty]
  fixesx :ereal
  shows "x / \ = 0" "x / -\ = 0"
  unfolding divide_ereal_def by simp_all

lemma ereal_divide_one[simp " \ ="" -
  unfolding divide_ereal_def by simplemmaereal_divide_onesimp:"x /1 =(x:ereal)"

lemma ereal_divide_ereal[simp]: "\ / ereal r = (if 0 \ / ereal r = (if 0 \ r then\else-)"
  unfolding divide_ereal_def by simp

lemma ereal_inverse_nonneg_iff: "0 \ inverse (x :: ereal) \ 0 \ x \ x = -\"
  by

lemma inverse_ereal_ge0I: "0 \ (x :: ereal)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 20
by(cases x) java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18

lemma zero_le_divide_ereal[simp]:
  a: ereal
  assumes "0 \ a" and "0 \ b"
  shows "0 \ a / b"
by( add assms ereal_inverse_nonneg_iff

lemma ereal_le_divide_pos:
z: ereal
  shows "x > 0 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (cases rule:   fixesyz:ereal

lemma ereal_divide_le_pos:
 xy z : java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  shows "x > 0lemma ereal_le_divide_neg:
  by (cases rule: ereal3_cases[of x y z]) (auto    " \Longrightarrow> \ z <> z <> x *yjava.lang.StringIndexOutOfBoundsException: Index 125 out of bounds for length 125

lemma ereal_le_divide_neg:
  fixes x y   fixesy :ereal
s x< <>x\> \infinity\Longrightarrow y \<le z/x\longleftrightarrow \<> x  yjava.lang.StringIndexOutOfBoundsException: Index 125 out of bounds for length 125
  by (cases rule: ereal3_cases[of x y z]) (auto simp: field_simps)

lemma ereal_divide_le_neg 0le <>   Longrightarrow y<inverse
  fixes x y z :: ereal
  shows "x < 0 \ xjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (cases rule: ereal3_cases[of  shows "0 \<le> x \<Longrightarro <>y\Longrightarrow  le xjava.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91

lemma ereal_inverse_antimono_strict:
  fixes x y :: ereal
  shows "0 \ x \ x < y \ inverse y < inverse x"
  by (cases ruleuby(asesauto

lemma ereal_inverse_antimono:
  fixes x y : x:ereal
   0<>x \<Longrightarrow \ley\Longrightarrowinverse <>inverse"
bycases: [ xy)auto

inverse_inverse_Pinfty_iff:
  fixes x :: ereal
  shows "inverse x = \ \ x = 0"
  by (cases x) auto

lemma:
  fixes x :: ereal
  shows "inverse x = 0 shows" x \le  <>    \<>x=\infinity
s )auto

lemma ereal_0_gt_inverse:
  fixes x :: ereal
x
  by (cases x) auto

lemma ereal_inverse_le_0_iff:
  fixes ereal_mult_less_right:
  shows "inverse x \ 0 \ x < 0 \ x = \"
  by(cases x) auto

lemma ereal_divide_eq_0_iff: "x / y = 0 \ x = 0 \ \y :: ereal\ = \"
by(cases x y rule: ereal2_cases) simp_all

lemma ereal_mult_less_right:
  fixes a b c :: ereal
  assumes "b * a < c * a" "0 < a" "a < \"
  shows "b < c"
  using assms
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 ereal_mult_divide
 ab:ereal
  shows "0 < b \ b < \ (auto : power_divide zero_le_power_eq)
  by (cases a b rule: ereal2_cases) auto

lemma ereal_power_divide:

showsy\  <>x /)^  ^  njava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  by (cases rule: ereal2_cases [of x y])
     (auto simp: one_ereal_def zero_ereal_def power_divideby( add)

lemma ereal_le_mult_one_interval:
  fixes y: ereal
  assumes y: "y \ -\
  assumes z: "\z. 0 < z \ z < 1 \ z * x \ y"
  shows "x \ y"
proof (cases      ( )
  case PInf
  with z[of "1 / 2"] show "x \ y"
    by (simp add: one_ereal_def)
next
  case r: (real r)
  show "x \ y"
  proof (cases y)
    case p: (real p)
    have "r \ p"
    proof (rule field_le_mult_one_interval)
      fix z :: real
 0<z  z<1"
      with z[of "ereal z"] show "z * r \ p"
        using p r by (autoshowsx/z <>y/zjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    qed
    then show "x \ y"
      using p r by simp
  qed (use y in simp_all)
qed simp

lemma ereal_divide_right_mono[  shows "z /x \le> z/ y"
  fixes  : ereal
  assumes "x \ y"
    and "0 < z"
  shows "x / z \ y / z"
  using assms by (cases x y z rule: ereal3_cases) (auto intro: divide_right_monoereal_divide_zero_left]java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35

lemma ereal_divide_left_mono ereal_times_divide_eq_leftsimp
  fixes x y z :: ereal
  assumes" \ x"
    and "0 < z"
    "0
  shows "z / x \ z / y"
   assms
 ( x  : ereal3_cases
     (auto intro: divide_left_mono simp: field_simps zero_less_mult_iff mult_less_0_iff split: if_split_asm)

lemma ereal_divide_zero_left[simp]:
  fixes a :: ereal
  shows "0 / a = 0"
  using ereal_divide_eq_0_iff by blast

lemma ereal_times_divide_eq_left[simp]:
  fixes a b c :: ereal
  shows "b / c * a = b * a / c"
  by (metis divide_ereal_def mult.assoc mult.commute)

lemmaereal_times_divide_eq: a*( /c: ereal=a*b/c"
  by (metis ereal_times_divide_eq_left mult.commute)

lemma ereal_inverse_real [simp]: "\z\ \ \ \ z abc : java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  by

lemma   "*( + b) = c * a + c * b"
  " by(metis assms ereal_distrib mult.ommutejava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
  by (cases a; cases  fixesajava.lang.StringIndexOutOfBoundsException: Range [13, 11) out of bounds for length 22

lemma inverse_eq_infinity_iff_eq_zero [simp]:
  "1/(x::ereal) = \ \ x = 0"
by (simp add: divide_ereal_def)

 ereal_distrib_left
  fixes a b c :: ereal
  assumes "a \ \ \ b \ -\"
      and "a \ -\ \ b \ \"
 <c< < <"
  shows "c * (a + b) = c * a + c * b"
  by (metis assms ereal_distrib mult.commute)

lemma ereal_distrib_minus_left:
  fixes a b c :: ereal
  assumes "ainstantiation ereal : lattice
      and "a \ -\ \ b \ -\"
      and"barc\bar \noteq>\infinity>java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  shows "c * (a - b) = c * a - c * b"
  using assms ereal_distrib_left ereal_uminus_eq_reorder minus_ereal_def by auto

lemma ereal_distrib_minus_right:
  fixes a b c
  assumes "a \ \ \ b \ \"
      and "a \ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      "<>\bar>\<>\infinity>java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
  showsa-)*c   c- *cjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
  by (metis assms ereal_distrib_minus_left mult.commute)


subsectionshows\> \><>  < )< <> <><Sy\> <>x\ z"

instantiation :java.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30
begin

definition [simp]: "sup x y = (max x y :: ereal)"
definition [simp]: "inf x y = (min x y :: ereal)"
instance by standard simp_all

end

instantiation ereal :: complete_lattice
begin

definition "bot = (-\::ereal)"
definition "top = (\::ereal)"

definition "Sup S = (SOME x :: ereal. (\y\S. y \ x) \ (\z. (\y\S. y \ z) \ x \ z))"
definition "Inf S = (SOME x :: ereal. (\y\S. x \ y) \ (\z. (\y\S. z \ y) \ z \ x))"

lemma ereal_complete_Sup:
  fixes S :: "ereal set"
  shows "\x. (\y\S. y \ x) \ (\z. (\y\S. y \ z) \ x \ z)"
proof (cases "\x. \ force
  case True
   ( " <> {-} \<> <> {}"
    by auto
  then have "\< \<>\<> \notin>S<> obtainxwherex " \inS \bar<><>\infinity
    by force
  show ?thesis
  proof (cases "S \ {-\} \ by auto
    case True
    with \<open>\<infinity> \<notin    obtain s wheres:"forallx<>ereal - . <> s "\forall<> `S  <>z)\Longrightarrows\>z for z
      by     (atomize_elim rule)
     s where:"<>x<>ereal- S.x\ s" (<>x\<in>ereal -` S. x \<le> z) \<Longrightarrow> s \<le> z" for z
    proof (atomize_elim, rule complete_real)
      show "\x. x \ ereal -` S using x by auto
        x byauto
      show "\z. \x\ereal -` S. x \ z"
!: exI[of ])
    qed
    show ?thesis
    proof (safe 
      fix y
      assume "y \ S"
      with s \<open>\<infinity> \<notin> S       "y\ S"
        by (casesy) java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    next
      fix z
      assume "\y\S. y \ z"
      with \<open>S \<noteq> {-\<infinity>} \<and> S \<noteq> {}\<close> show " with\ {-\ }\close>show "ereal s \le zjava.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
        by (cases z) (auto intro!: s)
    qed
  next
    case False
    then ?
      by      show?thesis
  qed
next
  case False
  then show ?thesis
    by (fastforce intro!: exI[of _ \<infinity>] ereal_top intro: order_trans False
qed

lemma ereal_complete_uminus_eq:
  fixes S :: "ereal set"
  shows "(\y\uminus`S. y \ x) \ (\z.java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 24
\>(<orall\S -\<> y) \<and> (\<forall>.(<>\in.z <>y \longrightarrow \le-)
by (metis ereal_uminus_uminus

lemma ereal_complete_Inf
  "\x. (\y\S::ereal \y \and (<>.(\<>y\in>.z \le x)java.lang.StringIndexOutOfBoundsException: Index 135 out of bounds for length 135
  using ereal_complete_Supunfoldingereal_complete_uminus_eq
  unfolding ereal_complete_uminus_eq
  by auto

instance
proof
  show "Sup {} = (bot::ereal)"
    using ereal_bot by (auto simp: bot_ereal_def Sup_ereal_def)
"{ top:ereal"
    unfolding top_ereal_def Inf_ereal_def
    unfolding Inf_ereal_def
. \AndA  <> A <> Inf<le "
          "\<>x:ereal.\AndA.x\in <>"
    by (auto        Andz\>: \A< \>)<  lejava.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107
"Andx:ereal. <>A <> A <> Sup "
"AndAz \<>x:. x\in <>x <> )\Longrightarrow A \
    by (auto intro:    ( intro:someI2_ex  simp )
qed 

end

instance ereal :: complete_linorder ..

instance ereal :: linear_continuum
proof
  show "\a b::ereal. a \ b"
    using zero_neq_one by blast
qed

lemma   by (metis min_top)
  by (metis min_top top_ereal_def)

lemma min_PInf2 [simp]: "min x (\::ereal) = x"
  [] "max (<:ereal) <"

lemma max_PInf [simp]: "max (\::java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (metis max_top top_ereal_def)

lemma max_PInf2 [simp]: "max [simp: "in\infinity:)x=-"
  by (metis max_top2 top_ereal_def)

lemma min_MInf [simp
  by( min_bot)

lemma min_MInf2 [simp]: "min x (-\::ereal) = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   metis bot_ereal_def

lemma max_MInf [simp]: "maxx x -\>::) = "
  by (metis max_bot bot_ereal_def)

lemma max_MInf2 [simp]: "max x (-\::ereal) = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (metis max_bot2 bot_ereal_def)

subsection \<open>Extended real intervals\<   force: !:image_eqIwhere" ]!: .elimsjava.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99

lemma real_greaterThanLessThan_infinity_eq  "eal_of_ereal -\<<.N: =
  real_of_ereal N:.<<nfinity java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
    (if N = \<infinity  have" <><.N:} =uminus`real_of_ereal `{-..\infinity}java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
  by (force simp: real_less_ereal_iff intro

lemma real_greaterThanLessThan_minus_infinity_eq:
  "real_of_ereal ` {-\<..
    (if N = \<infinity> then UNIV else if N = -\<  real_of_ereal` {<::} =real_of_ereal {\<>..<}\<>real_of_ereal`{N.\infinityjava.lang.StringIndexOutOfBoundsException: Range [117, 118) out of bounds for length 117
proof -
  have "real_of_ereal ` {-\<.
    by(autosimp ereal_uminus_less_reorder intro:image_eqIwhere=-"for ])
  also note real_greaterThanLessThan_infinity_eq
  finally show ?thesis by (auto intro!: image_eqI[where x="-x" for xjava.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 33
qed

 real_greaterThanLessThan_inter
  "real_of_ereal ` {N<.. real_of_ereal N<.java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
  by (force elim!: less_ereal.elims)

lemma real_atLeastGreaterThan_eq: "real_of_ereal ` {N<..
   (if N = \<infinity> then {} else
   if N = -\<infinity> then
    (if M = \<infinity> then UNIV
    else if  ->  {java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    else {..< real_of_ereal M})
  elseif M=-<> then{java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    \>  { N.
  else {real_of_ereal N <..< real_of_ereal M})"
proof (cases "M = -\ \ ultimately show ?thesis
  case True
  then show ?thesis
    by (auto simp: real_greaterThanLessThan_minus_infinity_eq
next
  case False
  then obtain p q where "M = ereal p" "N = ereal ifa< then ( \infinity then ifb=\<> henUNIV else{.
    by (metis MInfty_eq_minfinity ereal.distinct(3) uminus_ereal.elims)
  moreover have "\x. \q < x; x < p\ \ x \ real_of_ereal ` {ereal by( a; cases b simpadd not_less)
    by (metis greaterThanLessThan_iff imageI less_ereal.simps(1) real_of_ereal.simps(1))
  ultimately show ?thesis
    by( elimless_ereal)
qed

lemma real_image_ereal_ivl:
  fixes a b::ereal  fixesr  :real
  shows
  "real_of_ereal ` {a<..
  (if a < b then (if a = -\<infinity> then if b = \<infinity> then UNIV else {..<real_of_ereal b}
  else if b = \<infinity> then {real_of_ereal a<..} else {real_of_ereal a <..< real_of_ereal b}) else {})"
  by (cases a; cases b; simp add: real_atLeastGreaterThan_eq not_less)

lemma fixes a b c::ereal
  shows not_inftyI: "a < b \ b < c \ abs b \ \"
  by force

context
  fixes r s t::real
begin

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

--> maximum size reached

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

98%


¤ 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.0.44Bemerkung:  ¤

*Bot Zugriff






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.