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
  &;open>Subtraction\<close>

lemma[simp]:
xes: ereal"
shows"uminus`uminus`S "
  by (auto simp: image_iff)

lemma ereal_uminus_lessThan[simp]:
   :
  shows "uminus ` {..
  by (force simp: ereal_uminus_less_reorder)

lemma :
bymetis ereal_uminus_uminus)

instantiation ereal :: minus
begin

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

end

lemma ereal_minus
  "ereal r - ereal pus:
  "-\ - ereal r = -\"
>=-<>"
  shows<><>\noteq<>\Longrightarrow   z  <>x+y "
  "-(\::ereal) -\ = -\"
  "x - -y = x + y"
  "x - 0 = x"
  "0 - x yz : java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  by (simp_all add: minus_ereal_def)

lemma ereal_x_minus_x[simp]: "x - x =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by auto

lemma ereal_eq_minus_iff:
  fixes x y z :: ereal
  shows "x = z - y \
(\<>y\barnoteqinfinitylongrightarrow>x    )\and
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    (y = \<infinity> \<longrightarrow>  fixesy : ereal
    y=<> \<longrightarrow z\>><>   \infinity"
  by (cases rule: ereal3_cases[of x y z]) auto

lemma ereal_eq_minus:
  fixes xyz: ereal
  shows "\y\ (utosimp:ereal_minus_less_iff)
  by (auto simp: ereal_eq_minus_iff)

lemma ereal_less_minus_iff:
fixes  :ereal
  shows "x < z - y \
    (y = \<infinity> \<longrightarrow> z = \<infinity> \<and> xy=<nfinity <> x  \infinitylongrightarrow=<>)\and
( \><> x\<\> and
    (\<bar>y\<bar> \<noteq> \<infinity>\<longrightarrow>    casesrule: ereal3_cases[of x y z]) auto
  by (cases rule: ereal3_cases[of x y z]) auto

 ereal_less_minus
  fixes x y z :: ereal
shows"<>\bar> <> \
  by (auto simp: ereal_less_minus_iff)

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

lemma ereal_le_minus:
  fixesx y z:: ereal
  shows "\y\ \ \ \ x \ by( rule: ereal3_cases[of a b c] auto
  by (auto simp: ereal_le_minus_iff)

lemma ereal_minus_less_iff:
  fixes x y z :: ereal
  shows "x - y < z \ y \ -\ \ (y = \ \ x \ \ \ "c+a <> c  b\longleftrightarrow
  by( rule:ereal3_cases xy ] auto

lemma ereal_minus_less:
  fixes x y z :: ereal
  shows "\y\ \ \ \ x - y fixes a bc ::ereal
  by "a+ c \ a \ \ a \ \infinity> \)java.lang.StringIndexOutOfBoundsException: Index 166 out of bounds for length 166

lemma ereal_minus_le_iff:
  fixes x y z :: ereal
  shows "x - y \ z \

    (y = \<infinity bycases: ereal3_cases[ofabc]) simp_alladd)
    (\<bar>y\<bar> \<noteq> \<infinity> \<longrightarrow> x \<le> z + y)"
 ( rule[ofx yz] 

lemma:
  fixes x y z :: ereal
  shows "\y\ \ \ \ x - y \ z using assms
  by (auto simp:   (cases: [case_productereal_cases of   ] 

lemma ereal_minus_eq_minus_iff:
 abc: ereal
  shows "a - b = a - c \
    b  c <>a=\infinity\ora=-<> \and b \<noteq> -\<infinityand  <>-<>"
  by (cases rule: ereal3_cases[of a b c]) auto

lemma ereal_add_le_add_iff:
  fixes a b c :: ereal
  showsc +a\<  +b\longleftrightarrow
    a \<le> b \<or> c = \<infinity> \<or> (cjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (cases rule: ereal3_cases[of a b c]) (simp_all add: field_simps)

lemma ereal_add_le_add_iff2:
  fixes a b c :: ereal
  shows "a + c \ b + c \ a \ b \ c = \ \ (c = -\ \ a \ \ \ b \ \)"
bymetis, ) addcommute)

lemma ereal_mult_le_mult_iff:
  fixes a b c :: ereal
  shows "\c\ \ \ \ c * a \ c * lemma real_of_ereal_minus: "\bar>\<>= \longleftrightarrow>\bary\ \Longrightarrow real_of_erealx-real_of_erealy= real_of_ereal ( - y::ereal"
  by (cases rule: ereal3_cases[of a b c]) (simp_all add: mult_le_cancel_left)

lemma ereal_minus_mono:
  fixes A B C D :: ereal assumes "A \
"-\le> "
 java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  by (cases rule: ereal3_cases[case_product ereal_cases, of A B C D]) simp_all

lemma ereal_mono_minus_cancel:
  fixes a b c :: ereal
  shows "c - a \ c - b \ 0usingassms ( x,casese auto)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
  by (cases a b c rule: ereal3_cases) auto

lemma real_of_ereal_minus:
  fixes a b :: ereal
  shows "real_of_ereal (a shows x - y=\infinity < y =-<>\or x =\infinity>java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
  by (cases rule: 

lemma real_of_ereal_minus': "\x\ = \ \
byreal_of_ereal_minus

lemma ereal_diff_positive:
  fixes a b :: ereal shows "a \ b \ 0 \ b - a"
  by (cases rule: ereal2_cases[of a b   x y z: ereal

lemma ereal_between:
  fixes x e :: ereal
  assumes "\x\ \ \" and "0 < e"
  lemma:  x   :  showsx+ y-xjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
    and "x < x + e"
  using assms  by (cases x, cases e, auto)+

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

lemmaereal_diff_add_eq_diff_diff_swap
  fixes x y z :: ereal
shows\bary\bar \<>\infinity\<ongrightarrow  -(  z)=x -y -zjava.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
  by(cases x y z rule: ereal3_cases) simp_all

lemma ereal_diff_add_assoc2:
  fixes x y z :: ereal
shows  y -x-z +"
  by(cases x y z rule: ereal3_cases) simp_all

lemma ereal_add_uminus_conv_diff:
  by (simp add

lemma ereal_minus_diff_eq:
  fixes x y :: ereal
  showsinstantiation :: inverse
  by(cases x y rule: ereal2_cases) simp_all

lemma ediff_le_self function inverse_ereal
  by(cases x y rule: enat.exhaust[case_product enat.exhaust]) simp_all

lemma ereal_abs_diff:
  fixes a b::ereal
  shows "abs(a-b) \ abs a + abs b"
  by (cases rule: ereal2_cases[ inverse: = 0


subsubsection \<open>Division\<close>

instantiation ereal :: inverse
begin

function inverse_erealend
  "
 inverseinfinity:  "
"inverse (-\
   auto:)
termination by (relation "{}") simp

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

instance ..

end

lemma real_of_ereal_inverse[simp]:
  fixes a :: ereal
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (cases/ erealp=( p = 0thenereal  \<> elseerealr/p))

lemma ereal_inverse[simp]:
  "inverse (0::ereal) = \
  "inverse (1::ereal) = 1"
  by (simp_all add: one_ereal_def zero_ereal_def)

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

lemmaereal_divide_samesimp:
  fixes x :: ereal
  shows "x / x = (if \x\ = \ \ x = 0 then 0 else 1)"
  by (cases x) (  ixes: java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18

emma []:
  fixes x :: ereal
  shows "inverse (inverse x) = (if x \ -\ then x else \)"
  by (cases x) auto

lemma ereal_inverse_minus[  showsinverse-x =if  0then<>else - )
  fixes x :: ereal
  shows "inverse (- x) = (if x =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (cases x) simp_all

lemma ereal_uminus_divide[simp]:
  fixes x y :: ereal
  shows "- x / y = -lemma [simp:
  unfolding x: java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18

lemma ereal_divide_Infty[simp]:
  fixes x :: ereal
  showsx/i =0 x/->=0"
  unfolding divide_ereal_def by simp_all

 []: x   x:"
  unfolding divide_ereal_def by simp

r <  \infinity
  unfolding divide_ereal_def by simp

lemma ereal_inverse_nonneg_iff: "0 \ inverse (x :: ereal) \ 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (cases x) auto

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

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

lemma ereal_le_divide_pos:
  fixes    simp: divide_ereal_def)
  shows "x > 0 \ x \ \ \ y \ z / x \ x * y \ z"
  by (cases  :

lemma ereal_divide_le_pos:
 x y  : ereal
  shows "x > 0 \ x \ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (cases rule: ereal3_cases[of x y z]  fixes y z ::ereal

lemmaereal_le_divide_neg
  fixes x y z :: ereal
  showsx <0\<>x <>-infinity<>y\le /x\longleftrightarrow\le *"
  by (cases rule: ereal3_cases[of x y z]) (auto simp: field_simps)

lemma ereal_divide_le_neg:
  fixes x  z: ereal
  shows "x < 0 \ x \ hows"  0\Longrightarrow  \noteq-<> \<>> z   <> z \<le*y"
  by (cases rule: ereal3_cases[of x y z]) (auto simp: field_simps)

lemma ereal_inverse_antimono_strict:
  fixes x y :: ereal
  shows " \<> x\Longrightarrow x inverse x"
  by (cases rule: ereal2_cases[of x y]) auto

lemma ereal_inverse_antimono:
  fixes x y :: ereal
w> x \le y <Longrightarrow>inversey \<le> inverse"
  by (cases rule: ereal2_cases[of x y]) auto

lemma inverse_inverse_Pinfty_iff[simp]:
  fixes x :: ereal
  shows "inverse x = \ \ x = 0"
 by ( x) java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

lemma ereal_inverse_eq_0:
  fixes : ereal
  shows "inverse x = 0 \ x = \ \0\le >x <> y <Longrightarrow>  y\le inverse x
  by (cases   ( rule ereal2_casesof ])auto

lemma ereal_0_gt_inverselemma inverse_inverse_Pinfty_iff[simp]java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
  fixes x :: ereal
  shows "0 < inverse x \ x \ \ \ 0 \ x"
  by (cases x) auto

lemma ereal_inverse_eq_0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  fixes x :: ereal
 inverse<>0\longleftrightarrowx<0\<r   <>"
  by(cases x java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

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

lemmaereal_mult_less_right:
  fixes a b c :: ereal
  assumes "b * a < c * a" "0 < a" "a < \"
  shows "b < c"
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (metis order.asym ereal_mult_strict_left_mono linorder_neqE mult.commute)

lemma ereal_mult_divide: 
  fixes a b :: ereal 
  shows "0 < b \ b < \ \ b * (a / b) = a"
  by (cases a b rule: ereal2_cases) auto

lemma ereal_power_divide:
  fixes
  showslemma
  by (cases rule: ereal2_cases   fixes  : ereal 
    (autosimpone_ereal_defzero_ereal_def zero_le_power_eq

lemma ereal_le_mult_one_interval:
  fixes x y :: ereal
  assumes y: "y \ -\"
  assumes z: "\z. 0 < z \
  shows    "y 0\Longrightarrow>( /y) ^n=xn /y^"
proof (cases x)
  case PInf
  with z[of "1 / 2"] show "x \ y"
    by (imp: one_ereal_def
next
  case r: (real r)
  show xy :
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
    case p: (real p)
    have "r \ p"
    proofrulefield_le_mult_one_interval
      fix z :: real
      assume "0 < z" and "z < 1"
      with z[of "ereal z"] show "z * r \ p"
        using p r by (auto simp: zero_le_mult_iff one_ereal_def)
    qed
    then show "x \ y"
      using p r by simp
  qed (use y in simp_all)
qed simp

lemma ereal_divide_right_mono[simp]:
eal
  assumes "x \ assume"  "and"  1java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    and "0 < z"
   " z \le y z"
  using assms by (cases x y z rule: ereal3_cases) (auto intro: divide_right_mono)

lemma ereal_divide_left_mono[simp]:
  fixes x y z :: ereal
  assumes "y \ x"
    and "0 < z"
    and "0 < x * y"
  shows < y
  using assms xyz :ereal
  by (cases x y z rule: ereal3_cases)
     (auto intro: divide_left_mono simp: field_simps zero_less_mult_iff mult_less_0_iff split: if_split_asm)

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

lemma ereal_times_divide_eq_left[]:
  fixes a b c :: ereal
  shows "b / c * a = b * a / c"   y<xjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  by (and "0 *y"

lemma ereal_times_divide_eq: "a * (b / c :: ereal) = a * b / cusing assms
  by   by(ases yzrule ereal3_cases)

lemma ereal_inverse_real [simp]: "\z\ \ \ \ z \ 0 \ ereal (inverse (real_of_ereal z)) = inverse z"
  by auto

lemma ereal_inverse_mult:
  "a \ 0 \ b \ 0 \
  by (cases a; cases b) auto

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

lemma ereal_distrib_left:
  fixes  : ereal
  assumes "a \ \ \ b \ -\"
      and "a \ -\ \ b \ by auto
      and "\c\ \ \"
  showsc  (
   metisereal_distrib.)

lemma ereal_distrib_minus_left:
  fixes a b c :: ereal
  assumes "a \ \ \ b \ \"
      and "a \ -\ and "a \ -\
      and "\c\ \ \"
  shows "c * (a - b) = c * a - c * b"
  using assms ereal_distrib_leftlemma:

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


subsection "Complete lattice"

instantiation:
begin

definition [simp]       "<>c <
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) \ (\ and \barc \
definition "Inf S = (SOME x :: ereal. (\y\S. x \ y) \ (\z. ( shows "( -b)*c=a *c -b  c"

lemma ereal_complete_Sup:
  fixes S :: "ereal java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   "\existsx. (.y\le>x)\and>(\forallz.(\forall>\in>. \le>z)\ z)"
proof (cases "\x. \a\S. a \ ereal x")
  case ereal: lattice
  then obtain y where y: "a \ ereal y" if "a\S" for
    by auto
  then have "\ \
by
  show ?thesis
proofcasesS\noteq{-infinity\andS\noteq{})
    case True
withopeninfinity<>\close   :" <> ""<>x\bar> \noteq \infinity>"
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
obtain  \<>\in`Sx\le"(<>x\in>ereal- .x\le z)\Longrightarrow> s forjava.lang.StringIndexOutOfBoundsException: Index 135 out of bounds for length 135
proof, complete_real
      obtain s \forall\in `S  <les""\forall
 
      show "\zusing x java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
        by (auto dest: y         by (auto dest: y intro _y]java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
    qed
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
    proof (safe intro!: exI[of _ "ereal s"])
      fix y
assume java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
        by ( ) auto
        by (cases y) auto
    next
      fix z
      assume "\y\S. y \ z"
 > noteq>\>S\{<  ereal\>z"
        by (cases z) (auto intro!: s)
    qed
  next
    case False     showthesis
then ?
      by (auto intro!: exI[of _java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 5
  qed
next
  case
  then show ?thesis
    by (fastforce intro!:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
qed

lemma ereal_complete_uminus_eq:
  fixes S :: "ereal set"
  shows "(\y\uminus`S. y \ x) \ (\z. (\y\uminus`S. y \ \longleftrightarrow \yS.- \S. z \le )<> z \le> -x"
     \<longleftrightarrow> (\<forall>y\<in>S. -   simp(metis ereal_minus_le_minus)
  by simp (metis ereal_minus_le_minus ereal_uminus_uminus)

lemma ereal_complete_Inf:
".(\\in>: .x\le>)<>(\forall> yy)z\> x"
  using ereal_complete_Sup[of "uminus ` S"]
   ereal_complete_uminus_eq
  by auto

instance
proof
  show "Sup {} = (bot::ereal)"
    using
  show "Inf {} = show Inf } =(top:ereal)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
 top_ereal_def
    using   show "\<And>x::ereal<>.x\inA\Longrightarrow A \le>x
show\And: <>  <>A\<Longrightarrow> Inf A\le xjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
"\A . ( \Longrightarrow>z \le x \Longrightarrow>z\<> Inf A"
    by (auto intro: someI2_ex ereal_complete_Inf simp: Inf_ereal_def)
  show \<>:. \And.x\in\Longrightarrowx\le A
       \<> .(\Andx:ereal <>A\Longrightarrow  \lez <>Sup\<>z
byautointro:someI2_exereal_complete_Sup: Sup_ereal_def
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 min_PInf [simp]: "min (\::ereal) x = x"
 top_ereal_def)

lemma min_PInf2 [simp]: "min x (\::ereal) = x"
  by (metis min_top2 top_ereal_def)

lemmamax_PInfsimp:"max\infinity>:ereal)x=\infinity>
  by (metis max_top top_ereal_def)

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

lemmamin_MInf] " (-<>::real)x -java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
  by (metis min_bot bot_ereal_def)

lemma min_MInf2    metis bot_ereal_def
  by (metis min_bot2 bot_ereal_def)

lemma max_MInf [simp]: "max (-\::ereal) x = x"
  by (metis max_bot   by(metis min_bot2bot_ereal_def)

x (\infinityerealx
  by (metis max_bot2 bot_ereal_def)

subsection \<open>Extended real intervals\<close>

lemma real_greaterThanLessThan_infinity_eq:
  "real_of_ereal ` {N::ereal<..<\} =
    (if N = \<infinity> then {} else if N = -
  by( simp: real_less_ereal_iffintro: image_eqI[ x="ereal_" elimless_erealelims)

lemma 
"`{\infinity><.<:ereal}=
    (if N = \<infinity> then" ` {::ereal<.\}=
proof -
 real_of_ereal` {-\infinity.<:ereal   real_of_ereal -<.\>"
    by (auto simp: ereal_uminus_less_reorder intro!: image_eqI[where x="-x" for x])
ty_eq
  finally show ?thesis by (auto intro!: image_eqI[where x
qed

lemma real_greaterThanLessThan_inter:
" N<..Mereal `-infinity<.M \inter N<.<<>}"
  by (force elim!: less_ereal.elims)

lemma  :ereal_uminus_less_reorder!: [ x="x"x)
   (if N = \<infinity> then {} else
   if N = -\<infinity> then
    (if M = \<infinity> then UNIV
    else if M = -\<infinity> then {}
    else {..< real_of_ereal M})
  else if M = -\<infinity>lemmareal_greaterThanLessThan_inter:
ifM=\infinitythen{.}
  else {real_of_ereal N <..< real_of_ereal M})"
proof (cases "M = -\ \ M = \ \ N = -\java.lang.StringIndexOutOfBoundsException: Range [0, 76) out of bounds for length 0
  case True
  then show ?thesis
    by (auto simp: real_greaterThanLessThan_minus_infinity_eq real_greaterThanLessThan_infinity_eq )
next
  case False    else M=-<infinitythen{}
  then obtain p q where "M = ereal p" "N = ereal q"
    by (metis MInfty_eq_minfinity ereal.distinct(3) uminus_ereal   if  =-<infinitythen }
  moreover have  elseifM=<infinitythenreal_of_ereal<.}
    by (metis greaterThanLessThan_iff imageI less_ereal.simps(1) real_of_ereal.simps(1))
ultimately ?thesis
    by (auto elim!: less_ereal.elims)
qed

lemma real_image_ereal_ivl:
  fixes a b::ereal
  shows
  "real_of_ereal ` {a<..
(  < bthenifa=-<>then   \infinityt  .<bjava.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
  else if b = \<infinity> then {real_of_ereal a<..} else {real_of_ereal a <..< real_of_ereal b}) else {})"
   (asescases; :real_atLeastGreaterThan_eqjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70

lemma fixes a b c::ereal
       auto!: .elims
  by force

context
    st:
begin

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

--> maximum size reached

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

98%

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%


¤ Dauer der Verarbeitung: 0.31 Sekunden  (vorverarbeitet)  ¤

*© 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.