(* 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 thenshow .<}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 assumefromhave: "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 fromhavex_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 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 thenshow ?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: showbyblast unfolding proof fix : <'java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 assume S: "decseq S"and thenhave ( 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
lemma open_enat: "open {enat n}" proofcasesn) case 0 thenhaveusing 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 thenshow ?thesis by simp qed Int
lemma: fixes A : auto shows"open A then have "{enat (max n m) <..} \ A \ B" proof show thenhave"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 () moreoverinfinity> \<le> (INF i. principal {enat i..})" by open_Un open_enat ultimatelyshow"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 proofinduction case java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 thenobtain order_trans[ aa ba by thenhave"{enat (max metisadd.) byhave thenshow ?case by auto next case (UN K) thenobtain 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 showshow"( 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>
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
lemmashow=\<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>" byproofqed( 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) terminationby
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) terminationproofqed (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 showsnoteq> \<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) thenobtain 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 terminationshows"+ +java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 73
[]: "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
lemmacase: (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 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 terminationby (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) thenshow 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 Tohelpwith inferences like \<^prop>\<open>a < ereal x \<Longrightarrow> x < y \<Longrightarrow> a < ereal y\<close>, where x and cases:[of)auto \<close>
lemmafixesa:: 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
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
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 thenshow ?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)
lemmahave"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 withshow by auto qed next fix i assume"finite P"and"i \ P" and "f i = \" thenshow"sum f P = \" proof induct case (insert x A) caseby ( "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" thenhave sgn byjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 thenobtain r wheretermination 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 thenshow ?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_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 byauto 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 byby(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)
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 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] byauto
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 "(\ byauto
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)
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.