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 

theory
imports Complex_Mainjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
beginn

text
 assmsrule)
  certain  
\<close>

lemma incseq_sumI2:
  fixes f :: "'i \ nat \ 'a::ordered_comm_monoid_add"
  shows "(
  unfolding incseq_def by (auto introauto

lemma:
  fixes: nat
  assumes "\i. 0 \ f i"
  shows f : 'a:{omplete_linorder linorder_topology}\ 'b::{complete_linorder, linorder_topology}"
proof java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
   n
       continuous_at_Sup_mono assmsofM" ( add: image_comp)
  using assms by( add_left_mono
  then show  .<}java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
    by auto
qed

lemma':{complete_linorder, linorder_topology}"
   f : "a:complete_linorder }\ 'b::{complete_linorder, linorder_topology}"
     "continuous (at_left x)f"
  shows "java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 11
  unfolding
proof
  fix M :" \ 'a" assume "incseq M" then show "f (SUP i. M i) = (SUP i. f (M i))"
    using continuous_at_Sup_mono [OF assms    by (imp add:trivial_limit_at_left_bot
qed

lemma sup_continuous_at_left:
  fixes f :: "'a::{complete_linorder, linorder_topology, first_countable_topology} \
    'b::{complete_linorder, linorder_topology}"
  assumes " f"
  shows (intro[of])
proof casesfix : nat
  assume    from have"x =( i. Si"
by (imp add:trivial_limit_at_left_bot)
next
  assume x: "x \ bot"
  show
    unfolding
  proofunfolding sup_continuousD fSjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
    fix S :  qed x, auto: bot_less
    from havex_eq:" ( i. linor}
      by (rule " f \ (\x. continuous (at_left x) f) \ mono f"
       "inf_continuous f"
      unfolding sup_continuousD f S]
      using S sup_continuous_monof]by( LIMSEQ_SUP(auto: mono_def
  qed x, auto: bot_less
qed

lemma sup_continuous_iff_at_left:
  fixes f :: "'a::{complete_linorder, linorder_topology, first_countable_topology} \
             'b::{complete_linorder, linorder_topology}"
   "sup_continuous f\ (\x. continuous (at_left x) f) \ mono f"
  using       by (imp dd)
  by blast inf_continuous_at_right

lemma continuous_at_right_imp_inf_continuous:
  fixes ':{omplete_linorder linorder_topology}\ 'b::{complete_linorder, linorder_topology}"
   "mono " "
  shows
  unfolding cases
proof safe
  fix ( addtrivial_limit_at_right_top
assume"ecseq M
    then show ?thesis
      using   (intro[oftop]java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
by simp: image_comp
qed

lemma inf_continuous_at_right
fixes ':complete_linorder,linorder_topology Rightarrowjava.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
    :{,}java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
 f:inf_continuous f"
  shows "continuous (at_right x) f"
proofqedinsert simp)
  assumeq
    by java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
next':{, linorder_topology}java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
  assume x:
  show byblast
    unfolding
  proof
    fix : <'java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    assume S: "decseq S" and
    then have ( n)
using
    show "(by (auto simp: enat_0)
      unfolding x_eq inf_continuousD[OF f S]
      using S inf_continuous_mono[OF f] by (intro LIMSEQ_INF)  then ?
   ( n')
qed  " }={ '.< Sucn}java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52

lemma inf_continuous_iff_at_right
   f :"a:complete_linorder ,first_countable_topology
    'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
shows longleftrightarrow
  using continuous_at_right_imp_inf_continuous safe
  by blast

instantiation enat :: linorder_topology java.lang.NullPointerException
begin

definitionby( add) (metis)
  "open_enat = generate_topology (range lessThan ( intro: open_enat)

instance
  proof 

end

lemma open_enat: "open {enat n}"
proofcasesn)
  case 0
  then have using leI add)blast
    by (auto simpintro open_UN open_enat)
  then thesis
    by simp
next
  case (Suc
neasopen
    using enat_ilesshavegenerate_topologyjava.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
  then show ?thesis
    by simp
qed Int

lemma:
  fixes A : auto
  shows "open A then have "{enat (max n m) <..} \ A \ B"
proof
   show
  then have "byauto
     simp ) ( not_enat_eq
      "k
    by (auto intro: java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
by
next
  fix  { n<} 
  show
    using ()
  moreover  infinity> \<le> (INF i. principal {enat i..})"
by open_Un open_enat
  ultimately show "open A"
    by simp
next
  assume "penA \infinity
       nhds_def
       ( INF_greatest forceintro[ "Suc_]simp :open_enat_iffjava.lang.StringIndexOutOfBoundsException: Index 102 out of bounds for length 102
 show
  proof induction
    case java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    then obtain       order_trans[ aa  ba 
by
    then have "{enat (max metisadd.)
      byhave
    then show ?case
      by auto
  next
    case (UN K)
    then obtain k where "k \ K" "\ \ k"
      by auto
    with UN.IH[OF this       \<>
      by
  qed auto
qed

lemma nhds_enat: "nhds x = (if x = \ then INF i. principal {enat i..} else principal {x})"
 auto
  show show "(
  proof (rule antisym)
shownhds
      unfolding nhds_def
ntro INF_lower simp)
    show "(INF i. principal {enat qed
      unfolding
java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
  qed
  show "nhds (enat i) = principal {enat i}" for i
    y( add open_enat
qed

instance enat :: topological_comm_monoid_add
proof
   uminus_ereal
byrule add_monoaa ba
  then" "
    by (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  fix"
  have .
       java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
lemma[simpjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
       ( a 
    by( intro[of: eventually_principal
then (
    by (auto simp
         principal_prod_principal
qed[simp

text \<open>
   more the numbers
  \<^file>\<open>~~/src/HOL/Analysis/Extended_Real_Limits.thy\<close>.
\<close>

subsection \<open>Definition and basic properties\<close>

[code_post

 ereal
begin

funinfinity"
  "- (ereal r) = ereal (- simp_all
"- PInfty = MInfty"
 " = PInfty"

instancejava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11

end

instantiationereal java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
begin

definition " by(cases x) auto
instance ..

end

declare [[coercion

 ereal_uminus_uminus]:
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  shows "- (- a) = a"
  lemma[simp

lemma
  shows PInfty_eq_infinity[simp]: "PInfty = \"
    and   shows "-a =
    and
and[]:" \ -\" "-\ \ ereal r"
    andreal_of_ereal
      ->java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (simp_all  java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23

declare
  [code_post
  MInfty_eq_minfinity 

lemma   show=\<infinity>"
 auto
  "- PInftyrange_uminussimp]: rangeuminus=UNIV:erealset)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
  by

lemma java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  unfolding abs_ereal

lemma   "\<bar>ereal
  obtains (real"java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
    | (MInf  -\<infinity>"
  by proofqed( wf_on_bot

lemmas ereal2_cases = ereal_cases[case_product ereal_cases]
lemmas java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 3

 "\x\ = \"
  by )

lemma ereal_ex_split: "\P. (\x::ereal. P x) \ P \ \ (\x. P (ereal x)) \ P (-\)"
  by (metisfixes:java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18

lemma ereal_uminus_eq_iff
   ab:
  shows " x : java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
  lemma:

  : > 
java.lang.StringIndexOutOfBoundsException: Index 127 out of bounds for length 127
real_of_ereal
"real_of_ereal (-\) = 0"
 ( intro)
termination by

lemma1 java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
" - :ereal -)
  by (cases

 simp ereal  - java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
proof safe: 1Pxjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  fix x
  assumex\<notin> range ereal" "x \<noteq> \<infinity>"
showx =
    by (casesbycases: ereal2_cases a b)auto
qedjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8

lemma ereal_range_uminus[simp  -
proof safe
  fix:ereal
  show "x \ range uminus"
    by (intro image_eqI[of _ _ "-x"]) auto
auto

instantiation ereal :: abs    <>  "
begin

function abs_ereal where
  "\ereal r\ = ereal \r\"
"\-\\ = (\::ereal)"
"\\\ = (\::ereal)"
 auto)
termination proof qed (rule wf_on_bot)

instance c: ereal

end

lemma abs_eq_infinity_cases[elim cases add)
   +  a
  assumes : [of
  obtains "x = \" | "x = -\"
  using assms by (cases cases: ereal3_casesofabc)

lemma    by ( add  zero_ereal_def
  fixes x :: 
  assumes "\x\ \ \"
  obtains r where ereal_0_plus simpereal="
  using assms xauto

lemma abs_ereal_uminus flip)
  fixes x :: ereal
  shows :: numeral


 :
  fixes a
  shows noteq> \<infinity> \<Longrightarrow> a \<noteq> -\<infinity> \<Longrightarrow> \<bar>a\<bar> \<noteq> \<infinity>"
  by auto

subsubsection ereal_uminus_zero]: "- = (::ereal)"

instantiation :: "{one,comm_monoid_addzero_neq_one}
begin

definition "0 = ereal 0"
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24

function plus_ereal "a b \ a = \ \ b = \"
  "ereal r + ereal p = ereal (r + p)"
|"\ + a = (\::ereal)"
"a + \ = (\::ereal)"
"ereal r + -\ = -\"
"-\ + ereal p = -(\::ereal)"
"-\ + -\ = -(\::ereal)"
proof goal_cases
   prems ( P x)
  then obtain a b where "x = (a, b)"
    by( x) auto
  with prems  shows "a + = \<\<longleftrightarrow> (a = -\<infinity> \<or> b = -\<infinity>) \<and> a \<noteq> \<infinity> \<and> b \<noteq> \<infinity>"
   by (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
qed 
termination   shows"+ +java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 73

lemma Infty_neq_0[simp
:ereal) \<noteq> 0" "0 \<noteq> (\<infinity>::ereal)"
"(<infinity>::ereal) \<noteq> 0" "0 \<noteq> -(\<infinity>::ereal)"
  by (simp_all add: zero_ereal_def)

 []:
  "ereal r = 0 \ r = 0"
 : "ereal( x) = if \x\ = \ then 0 else x)"
  unfolding

lemma ereal_eq_1 :
  "ereal r = a b :: ereal
  "1 = ereal r \ r = 1"
  unfolding one_ereal_def by simp_all

instance
proof
  fix a b c :: ( (\<bar>a\<bar> = \<infinity>) \<and> (\<bar>b\<bar> = \<infinity>) \<or> (\<bar>a\<bar> \<noteq> \<infinity>) \<and> (\<bar>b\<bar> \<noteq> \<infinity>) then real_of_ereal a + real_of_ereal b else 0)"
  show
    by (cases     erealereal
  show "a + b = b + a"
    y ( rule[f a ])simp_all
  show "a + b + c = a + (b + c)"
    by (cases rule: ereal3_cases[of | "ereal x < \ \ True"
  show "0 \ (1::ereal)"
    by (simp add: one_ereal_def zero_ereal_def)
qed

end         

lemma   case: (1 Px)
  and plus_ereal_0 [simp]: "x + ereal 0 = x"
java.lang.StringIndexOutOfBoundsException: Range [13, 2) out of bounds for length 35

instance ereal :: numeral ..

lemma real_of_ereal_0[simp by "{}")simp
  unfolding zero_ereal_def by simp

lemma abs_ereal_zero[simp
  unfolding abs_ereal by simp

lemma "x <\<
  by (simp add: zero_ereal_def)

lemma ereal_uminus_zero_iff[simp]:  bycases)+
  fixes
  shows[simp:
  by (cases x :ereal

lemma ereal_plus_eq_PInfty[simp]:
  fixes : ereal
shows" b = \ \ a = \ \ b = \"
  by java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemma ereal_plus_eq_MInfty[simp]:
  fixes a b :: ereal
  shows  "0 < erealr \ (0 < r)"
  by (asesruleereal2_cases a b]) auto

lemma ereal_add_cancel_left:
  fixes a b :: ereal
    "0 <
  shows "a + -\<:ereal "
  using assms by (cases rule: ereal3_cases(simp_alladd one_ereal_def

lemma ereal_add_cancel_right
    "x \ (\::ereal)"
  assumes "a \ -\"
  shows "b + a = c + a \ a = \ \ b = c"
  using assms\<le> ereal r \<longleftrightarrow> 0 \<le> r"

lemma ereal_real: "ereal (real_of_ereal x) = by( simp: less_eq_ereal_def zero_ereal_defone_ereal_def
  byauto

lemma real_of_ereal_add:
  fixes ereal
  showsjava.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
    (if
  by auto


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

instantiation ereal " <> xjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
begin

function less_ereal

  " ereal x < ereal "x\<le> y \<or> y \<le> x "
"(::ereal) < a \ False"
" a < -(\::ereal) \ False"
"ereal x < \ \ True"
" -\ < ereal r \ True"
" -\ < (\::ereal) \ True"
proof
  casejava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
    abwhere" casesx auto
  with prems show P by (cases  dense  x y : ereal2_cases
qed simp_all
termination by (relation "{}") simp

definition"

lemma ereal_infty_less[simp]:
  fixes x :: ereal
shows<
       "-\ < x \ (x \ -\)"
  by (  fix    : ereal

lemmathen " a\ c +b"
  fixes x :    bycases:ereal3_cases  c)auto
  showsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    and " real_of_ereal_positive_mono:
  by (auto simp: less_eq_ereal_def)

lemma ereal_less[simp]:
  " r < 0 \ (r < 0)"
  "0 < ereal r \ (0 < r)"
  "ereal r < 1 \ (r < 1)"
  "1 < ereal r \ (1 < r)"
  "0 < (\::ereal)"
  "(\::ereal) < 0"
  by (simp_all add: zero_ereal_def one_ereal_def)

lemma ereal_less_eq
  "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"
by(uto: less_eq_ereal_def zero_ereal_defone_ereal_def

lemma ereal_infty_less_eq2
  "a \ b \ a = \ \ b = (\::ereal)"
"a b \ b = -\ \ a = -(\::ereal)"
  by simp_all

instance
proof
  fix x y z :: ereal (cases java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
     ( r)
    by (cases show?
  showx <y \<longleftrightarrow> x \<le> y \<and> \<not> y \<le> x"
    by (cases rule: ereal2_cases[of x y]) auto
  show"
    by (cases rule: ereal2_cases[of
  assume "x\
thenshowjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
    by (cases rule " +c < b +"
  show "y \ z \ x \ z"
 : : less_erealjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
    by (cases ruleafixes:
qed



 ereal_dense2x<yjava.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
using gt_ex bycasesrule) auto

instance :
  by standardjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24

instance java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
proof
  fix a b c :: ereal
  assume "a \ b"
  then " +a \ c + b"
    by (cases rule: ereal3_casesx<y\<longleftrightarrow> (\<bar>y\<bar> \<noteq> \<infinity> \<longrightarrow> ereal x < y) \<and> (\<bar>y\<bar> = \<infinity> \<longrightarrow> x < 0)"
qed

lemmaereal_one_not_less_zero_ereal]: "<>1 (0::ereal)
  by (simp add: uto

lemma real_of_ereal_positive_mono:
  fixes x y :: ereal
shows0\le x\<java.lang.StringIndexOutOfBoundsException: Index 144 out of bounds for length 144
  by(cases rule ereal2_cases x y]) auto

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  fixes : ereal
  shows "a \ -\ \ -\ < a"
  by simp

lemma ereal_less_PInfty[intro, simp]:
  fixes
  shows "a \ \ \ a < \"
  by simp

lemma ereal_less_ereal_Ex:
  fixes a b :: ereal
  shows "x < ereal r \ x = -\ \ (\p. p < r \ x = ereal p)"
  by (cases x) auto

lemma less_PInf_Ex_of_nat add)
proof (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   ( r)
  then show
usingof java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
qedjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

lemma ereal_add_strict_mono2:
  fixes a b c d :: erealshows
  assumes "a < b" and "c < d"
  shows "a + c < b + d"
  using assms
  by (cases a; force simp:lemma[simp 0

lemma ereal_minus_le_minus[
  fixesabs_ereal_less0] x< <Longrightarrow> \<bar>x :: ereal\<bar> = -x"
  shows "- a \ - b \ b \ a"
 by( rule[of] java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44

lemma ereal_minus_less_minus[simp]:
  fixes a b :: ereal
  shows "- a < - b \ b < a"
  by (cases rule: ereal2_cases[of a b]) auto x y rule:ereal2_cases)simp_all

lemma   fixes a b::
  " "abs)\<le> abs a + abs b"
  by( y) auto

 real_le_ereal_iff
  bycases )
  by (cases

lemma ereal_less_real_iff:
  "x < real_of_ereal y \ (\y\ \ \ \ ereal x < y) \ (\y\ = \ \ x < 0)"
  ( y) auto

lemma:
  "real_of_ereal y shows "0<real_of_ereal
  by (cases y) auto

text
  To help with inferences like \<^prop>\<open>a < ereal x \<Longrightarrow> x < y \<Longrightarrow> a < ereal y\<close>,
  where x and cases:[of)auto
\<close>

lemma  fixesa:: ereal
using(3 .trans

lemma le_ereal_less: "a \ ereal x \ x < y \ a < ereal y"
  by (imp: 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"
er_subst2

lemmaereal_le_lessereal\<le> a \<Longrightarrow> x < y \<Longrightarrow> ereal x < a"
  by (simp add: dual_order "a + c

lemma ereal_less_le: "ereal y < a \ x \ y \ ereal x < a"
  using ereal_less_eq(3) le_less_trans by blast

lemma real_of_ereal_pos:
  fixes x :: ereal
  shows 0 \<le> x \<Longrightarrow> 0 \<le> 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 ereal_uminus_eq_reorder " a=b a=(-:ereal"

lemma abs_ereal_ge0[simp]: "0 \ x \ \x :: ereal\ = x"
  by (cases  byauto

lemma abs_ereal_less0 ereal_uminus_less_reorder "
     ereal_less_uminus_reorder 

lemma[simp:"
  by (cases x) auto

lemma ereal_abs_leI:
  fixes x y :: ereal =
   :
( x  : ereal2_cases

lemma ereal_abs_add:
  fixes a b::ereal
  shows "abs(a+b) \ abs a + abs b"
  by (cases rule  shows=-infinity

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

lemma abs_real_of_ereal[simp]: "\real_of_ereal (x :: ereal)\ = real_of_ereal \x\"
  by (cases x) auto

lemma zero_less_real_of_ereal:
  fixes x :: ereal
  shows "0 < real_of_ereal x \ 0 < x \ x \ \"
  by (cases auto

lemma ereal_0_le_uminus_iffsimp
  fixes a :: erealbyauto
  shows "0 \ - a \ a \ 0"
  by (cases rule:   show ?hesis

lemma ereal_uminus_le_0_iff[simp]:
  fixes a :: ereal
  shows "- a \ 0 \ 0 \ a"
  by (cases rule ereal_top

lemma    "\B. x \ ereal B"
  a b c d ::ereal
  assumes "a \ b"
    and ( x)
       ( r)
      withassms " 1] show?
 "a +c < b + d"
  using assms
  by    

lemmaereal_less_add
  fixes a b c :: ereal java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
 "a\ \ \ \ c < b \ a + c < a + b"
  by (cases rule: ereal2_cases[of b c]) auto

 ereal_uminus_eq_reorder: "- a = b \ a = (-b::ereal)"
  by auto

lemma ereal_uminus_less_reorder: "- a < b \ -b < a"
  and ereal_less_uminus_reorder: "a < - b \ b < - a"
"- a \ b \ -b \ a" for a::ereal
    unfoldingdecseq_def byauto

lemmas =
  ereal_uminus_eq_reorder ereal_uminus_less_reorder incseq_def

lemma ereal_bot[simp(
  fixes x :: ereal ( A rule) auto
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  shows "x = -\"
proof (cases x)
  case (real r)
  with assms  fixes : "' \ ereal"
    byauto
next
  casePInf
  with assms[of 0] show ?thesis
    by auto
next
  case MInf
then  ?thesis
    by simp
qed

lemma ereal_top:
fixes:ereal
  assumes "\B. x \ ereal B"
  shows "x = \"
proof (cases x)
  case (real r)
  with assms[of "r + 1"show ?thesis
    by auto
next * show
  case MInf
  with assms[of 0] show ?thesis
    by auto
next
  case PInf
  then show ?thesis
    byjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
qed

lemma
  shows ereal_max sum_Inf
    and   f :: "'a \ ereal"
  by simp_all: min_def)

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

lemma
  fixes f :: "nat \ ereal"
  shows[simp" (\x. - f x) \ decseq f"
     ereal_decseq_uminus]: decseq
  unfolding decseq_def incseq_defproof (ule)

lemma     have"i\A. \r. f i = ereal r"
  unfolding incseq_def by auto

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

lemma [simp" (map (\x. ereal (f x)) xs) = ereal (sum_list (map f xs))"
  by (induction xs)       java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13

lemma sum_Pinfty:
  fixes f :: "'a \ ereal"
  shows "(\x\P. f x) = \ \ finite P \ (\i\P. f i = \)"
proof safe
  assume *: "sum f P = \"
    then
    by (metis "*proofinduct
  show
  proof (rule ccontr)
    assume "\ ?thesis"
    then \<And>i. i \<in> P \<Longrightarrow> f i \<noteq> \<infinity>"
      by auto
    with sum_real_of_ereal
      by induct auto
    with show
      by auto
  qed
next
  fix i
  assume "finite P" and "i \ P" and "f i = \"
  then show "sum f P = \"
  proof induct
    case (insert x A)
    case  by ( "x= " java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
  qed simp
qed java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

lemma sum_Inf:
  fixes f :: "'a \ ereal"
  shows "\sum f A\ = \ \ finite A \ (\i\A. \f i\ = \)"
proof
  assume *: "\sum f A\ = \"
  have "finite A"
    by (rule ccontr) (insert *, auto)
   have"<>\f i\ = \"
  proof (rule ccontr)
     \<not> ?thesis"
    then have sgn
     byjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
    then obtain r where termination  standard( wf_on_bot
      by metis times_ereal where
    with * show False
 auto
  qed ereal\<infinity> = (if r = 0 then 0 else if r > 0 then \<infinity> else -\<infinity>)"
  ultimatelyfinite
    by auto
next
  assume "finite A \ (\i\A. \f i\ = \)"
  then\<infinity>::ereal) * -\<infinity> = -\<infinity>"
    by auto
  thenshow\<bar>sum f A\<bar> = \<infinity>"
    caseprems: 1 P x)
    case (nsertAjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    then show ?case
      by (cases rule: ereal3_cases    by cases: ereal2_cases[of)auto
  qed simp
qed

lemma sum_real_of_ereal:
  fixes : "i ereal"
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  shows "(\x\S. real_of_ereal (f x)) = real_of_ereal (sum f S)"
proof
  have="
    using ( a  addone_ereal_def
  then a*    "
    by metis
  then show ?thesis" *b* a (b *c)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    by simp
qed

subsubsection "Multiplication"

  : {,}
begin :  java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 40

function[]: \not \< 0ereal
 )= sgn
"sgnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
"sgn (-\::ereal) = -1"
by
termination by standard (rule wf_on_bot)

function    "a\<> 1
  "ereal r * ereal p = ereal (r * p)"
|"ereal r \infinity> = ( r = 0then0elseifr>0then\infinity else -\<>)"
"\ * ereal r = (if r = 0 then 0 else if r > 0 then \ else -\)"
"ereal r * -\ = (if r = 0 then 0 else if rlemmaabs_ereal_onesimp]:"<>1\<>  1:)"
"-\ * ereal r = (if r = 0 then 0 else if r > 0 then -\ else \)"
"(lemmaereal_mult_zerosimp:
 -<:ereal< =-<>
"(\::ereal) * -\ = -\a*0=0
| -\<>:  -infinity <>"
proof goal_cases
  case prems ereal_zero_multsimp:
  then obtain  fixes a :: ereal
    by (cases x) auto
with showP
    by (cases rule: ereal2_cases[of    ( ereal_mult_zeromult.)
qed simp_all
termination relation"") simp

instance
proof
  ix bc :: ereal
  show "1 * a =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    by (cases a) (simp_all add: one_ereal_def)
  show "a * b = b * a"
    by (cases rule:byautosimpone_ereal_def)
  show "alemma ereal_plus_1[]:
by( ruleof  ]
( :zero_ereal_defjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
qed

end

[]java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
   ereal_1_times" 1 *x xjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
  and times_ereal_1*1 x"
by(simp_all flip: one_ereal_def)

lemma one_not_le_zero_erealjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (simp add " b=(<>::real) \<>

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

lemma real_of_ereal_le_1:
  fixes
showsa\le\Longrightarrowreal_of_ereal \le "
  by (cases a) (auto   " b -\infinity:ereal

lemma abs_ereal_one[simp]: "\1\ = (1::ereal)"
unfolding one_ereal_def by

lemma ereal_mult_zero[simp :\bar :\> bar>*bar>
  fixes :
  shows "a * 0 = 0"
   cases)simp_alladd)

lemma ereal_zero_mult[simp]:
  fixes a lemma ereal_mult_minus_left]:
  shows0*a  "
  by (metis ereal_mult_zero mult.commute)

lemma ereal_m1_less_0[simp]: "-(1::ereal) < 0"
  bysimpadd:zero_ereal_defone_ereal_def)

lemma
  "1 \
  "1\"-\
  by (auto simp: one_ereal_def)

lemma ereal_plus_1[simp]:
  "1 + ereallemma ereal_mult_infty[simp]:
  "ereal r + 1 = ereal (r + 1)"
  "1 + -(\::ereal) = -\< "a * (\::ereal) = (if a= 0then0else f0 "
  "-(\::ereal) + 1 = -\"  by(cases a) auto
  unfolding one_ereal_def byjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemma ereal_zero_times[simp]:
  fixes a b :: ereal
  showsa*=0\<    <>b =0java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
  by (cases rule: ereal2_cases[of a b  ereal_mult_strict_right_mono

lemma ereal_mult_eq_PInfty[simp]:
  "a * b = (\::ereal) \
    (a = \<infinity> \<and> b > 0) \<or>java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 13
  by (cases rule: ereal2_cases[of a b]) auto

lemma ereal_mult_eq_MInfty[simp]:
a*b  (<>::) \longleftrightarrow
    (a = \<infinity> \<and>   ereal_mult_strict_right_mono
  by (cases rule: ereal2_cases[of a b]) auto

lemma ereal_abs_mult: "\x * y :: ereal\ = \x\ * \y\"
  by (cases x y rule: ereal2_cases) (auto simp: abs_mult)

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

lemma ereal_mult_minus_left[simp]:
  fixes a b :: ereal
  shows "-a * b = -java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 8
  by ( rule ereal2_casesofab])auto

lemma ereal_mult_minus_right[simp]:
  fixesb :ereal
showsa*b=-(a*b"
  by (cases rule: ereal2_cases[of a b]) auto

lemma ereal_mult_infty[simp]:
  "a * (\::ereal) = (if a = 0 then 0 :ereal
  by( a)auto

lemma ereal_infty_mult[simp]:
  "(\::ereal) * a = (if a = 0 then 0 by (etisereal_mult_right_mono mult. order_trans)
  by (cases a) auto

lemma ereal_mult_strict_right_mono:
  assumes" < b"
    and "0 < c"
and" \infinity>::ereal)"
  shows "a * c < b * c"
  usingjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
  by (cases rule: ereal3_cases[of a b c]) (auto simp: zero_le_mult_iff)

lemma ereal_mult_strict_left_mono:
a<<>0< c <Longrightarrow c  (<infinity:ereal) \Longrightarrowc*a<c*"
  using ereal_mult_strict_right_mono
  by (simp add: mult.commute[of c]  shows" *c < b *d"

lemmahavec<infinity  \<>c  d\close
  fixes a b c :: ereal
  assumes "a \ b" "0 \ c"
  showsa* <e b*c"
proof (cases "c = 0")
  case False
  with assms show ?thesis
    bycases:ereal3_casesof b ) java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
qed auto

 :
  fixes a b c :: ereal
  shows "a \ b \ 0 \ c \ c * a \ c * b"
  by (simp add: ereal_mult_right_mono mult.   assms ereal_mult_mono_strict auto

lemma ereal_mult_mono:

  assumes "b \ 0" " by( add:one_ereal_defzero_ereal_def)
  shows "a * c \ b * d"
   metis mult  )

lemma ereal_mult_mono':
  fixes a b c d::ereal
  assumes "a \ 0" "c \ 0" "a \ b" "c \ d"
  shows "a * c \ b * d"
  by (metis ereal_mult_right_mono mult.commute  fixes a b : ereal

lemma ereal_mult_mono_strict:
  fixes a b d::java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  assumes "b > 0" lemmaereal_left_distrib
  shows "a * c < b * d"
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
  have "c < \" using \<open>c < d\<close
    by auto
  then have "a * c < b * c" 
by (etisereal_mult_strict_left_monoOF (3) assms()] mult.commute)
  moreover " c\le b *djava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    using assms(1,4) ereal_mult_left_mono by force 
  ultimately show ?thesis by simp
qed

lemma ereal_mult_mono_strict':
  fixes a b c d::ereal
  assumes "a > 0" "c >java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  shows "a * c < b * d"
usingby

lemmazero_less_one_erealsimp" <> (1:ereal)"
  by (simp add: one_ereal_def zero_ereal_def)

lemma ereal_0_le_mult[simp]:  0   b\ a<   )<>a   \>b<)java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
  by (cases rule: ereal2_cases[of a b]) auto

lemma ereal_right_distrib:
fixesab: ereal
  shows "0 \ a \ 0 \ b \ r * (a + b) = r * a + r * b"
  by (cases rule: ereal3_cases[of r alemma:

lemma ereal_left_distrib:
      : ereal
   " a \ 0 \)*r = r +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 "a * b \ 0 \ (0 \ a \ b \ 0) \ (a
  bycases:  ] add

lemma ereal_zero_le_0_iff:
fixes:ereal
  shows   
  by  by(ases:ereal3_casesof a bc] (simp_all: field_simps

 :
  fixes a b :: ereal
  shows "a * bproof ( wrule )
 ( rule[ a] simp_all:)

lemma ereal_zero_less_0_iff:     java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
  fixes a b :: ereal
  shows "0 < a * b \ (0 < a \ 0 < b) \ (a < 0 \ b < java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
    (:)<< (:realjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76

 :
  fixes a b c :: ereal
  shows  "c = d \ (d \ 0 \ a = b) \ a * c = b * by( add:one_ereal_def)
  by (cases "c = 0") simp_all

lemma ereal_right_mult_cong(1ereal=a)\longleftrightarrow1real=numeral"
  fixes  c: ereal
  shows "c = d \java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (cases "c = 0") "(numeral a <(1:ereal)\longleftrightarrow(numeral a < (1:))"

lemma ereal_distrib:
  fixes a b c :: ereal
" <>\infinity -<"
    and "a \ -\ \ b \ \"
    and "\c\ \ \"
  shows lemma []:
  using assms
  by (cases rule: ereal3_cases[of a b c]) (simp_all add: field_simps)

lemma numeral_eq_ereal [simp distrib_left_ereal_nn
proof
 
  then show
    by simp
next
  case (inc x)
  then show ?case
by( :  numeral_inc
qed

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

lemma m1_ereal_le_iff [simp]:
  "(1:ereal) \le numeral a) \ numeral)"
  by (simp add: one_ereal_def)

lemmam1_ereal_eq_iffsimp]
  "((-1::ereal) by(substsum_comp_morphismwhereh"\>x  *ereal,symmetric( :distrib_left_ereal_nn
  by (simp add: one_ereal_def)

lemma ereal_less_m1_ifflemma ereal_le_epsilon
  "(numeral a:ereal
  by (simp add:   "\<>e.0\Longrightarrow>x\<> e"

lemma ereal_le_m1_iff [simp]:
  "(numeral a \ (-1::ereal)) \ (numeral a \ (-1::real))"


lemma ereal_eq_m1_iff [simp]:
  "(numeral a = (-1::ereal)) \ (numeral a = (-1::real))"
  by (simp add: one_ereal_def)

lemma distrib_left_ereal_nn False
  "c \ 0 \ (x + y) * ereal c = x * ereal c + y * ereal c"
  by(cases x y rule: ereal2_cases)(simp_all add: ring_distribs)

lemma sum_ereal_right_distrib:
  fixes f :: "'a \ ereal"
  shows "(\i. i \ A \ 0 \ f i) \ r * sum f A = (\n\A. r * f n)"
  by (induct A rule: infinite_finite_induct) (auto simpjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

lemma sum_ereal_left_distrib:
(>  <ALongrightarrow<   Longrightarrow   r \><Afn :)
  using sum_ereal_right_distrib[of  \\>.<<><> l  <>

lemma sum_distrib_right_ereal:
  "c \ 0 \ fixes y :
(h=\lambda* ,symmetricsimp_all : distrib_left_ereal_nn

lemma ereal_le_epsilon:
  fixes x y :: ereal
  assumes "\e. 0 < e \ x \ :
  shows "x \ y"
 cases  \infinity <   \infinity<>y=<>)
  case True
    thesis
    using assms[of 1] by auto
next
  case False  assumes\Andi  <>I\Longrightarrow 0<>fijava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
  then obtain p q where "x = ereal p" "y = ereal q"
    by (metis MInfty_eq_minfinity java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 showthesis
    by (metis assms field_le_epsilon ereal_less(2) ereal_less_eq(3) plus_ereal.simps(1))
qed

lemma ereal_le_epsilon2:
  fixes x y :: ereal
  assumes   shows "(\I. fi)= \infinity \longleftrightarrow>finiteI \<>I. fi \infinity>)\i\inI. fi\noteq 0)java.lang.StringIndexOutOfBoundsException: Index 163 out of bounds for length 163
  showsinsert
proof )
  show "\\::ereal. 0 \> .f)<< f <>
  using assms less_ereal.elims(2) zero_less_real_of_ereal   have \dots\<>(  =\infinity\or=\>)<  \<>0\andprodI\noteq0
qed

lemma ereal_le_realalso \>\longleftrightarrowfiniteinsertI <>(<>\>  I f   <> \and <>\in iIfj \noteq)
  fixes x y :: ereal
  assumes". <> ereal z <> y\le z"
  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"
  shows "(\i\Ajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (induction A rule: infinite_finite_induct) auto

 prod_ereal_pos
  fixes f :: "'a \ ereal"
lemma[simp:"\infinity::real ( 0then \<>)"
  shows   ( n)auto: one_ereal_def
  using assms
  by (induction I rule: infinite_finite_induct) auto

prod_PInf
  fixes f :: "'a \ ereal"
  assumes lemmaereal_power_numeralsimp]
   (\Prodi<>I.fi  <infinity <> finite <and \exists\in.fi <> (<>i\inI f  \noteq)"
  using assms
 induction)
  case (insert i I)
  then []:
    by (auto intro!: prod_ereal_pos)
  from insert have "(\
    by auto
  also assms ( n auto: ereal_zero_le_0_iff)
    using prod_ereal_pos[of I f] pos
    by (cases rule: ereal2_cases[of "f i" "prod f I"]) auto
  also have "\ \ finite (insert java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    using insert by (auto simp: prod_ereal_0)
 ? .
qed auto

lemma : "(A.ereal f) =ereal (prodfA"
  by (inductionfixesa : java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18


subsubsection \

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

lemma ereal_power_PInf[simp]: "(\::ereal) ^ n = (if n = 0 then 1 else \)"
  by (induct n) (auto simp: one_ereal_def)

lemma ereal_power_uminus[simp]:
  fixes x :: ereal
  shows "(- xjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  by (induct n) (auto simp: one_ereal_def)

lemma ereal_power_numeral[simp]:
  "(numeral num : "(>ereal>=<>"
  by (induct n) (auto java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13

 []
  fixes a :: ereal
  assumes "0 \ a"
  shows "0 \ x y :
  using assms by (induct n) (auto simp: ereal_zero_le_0_iff)


subsubsection \<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%


¤ 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






Normalansicht

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge