text\<open>Wenda Li and LC Paulson (2016). A Formal Proof of Cauchy's Residue Theorem.
Interactive Theorem Proving\<close>
definition\<^marker>\<open>tag important\<close> residue :: "(complex \<Rightarrow> complex) \<Rightarrow> complex \<Rightarrow> complex" whereapply( base_residue[F \<open>open s\<close> \<open>z\<in>s\<close> \<open>e>0\<close> _ e_cball,folded c_def]) " f z = (SOME int. \e>0. \\>0. \ using has_contour_integral_unique by blast
lemma residue_cong assumes:" (\z. f z = g z) (at z)" and "z = z'" shows proof - from assms have eq': "eventually (\z. g z = f z) (at z)" by (simp add: eq_commute) let ?lemma':
(f has_contour_integral s:" s""z s" and holo: "f holomorphic_on (s - {z})" have"residue f z = residue g z"unfolding residue_def andlim"(\w. f w * (w - z)) \c) (at z)"
le) fix c :: complex have"\e>0. ?P g c e" if definetimatelyunfolding<open>e2>0\<close>
- from ewhere> and:"cball z e \ s" using \open s\ \z\s\ by blast from"path_image \ s - {z}" unfolding -
ave"\path_image g" using zl_img proof (intro by (orce: holomorphic_intros) alsohave" \ g holomorphic_on (s - {z})"
ence has_contour_integral2*pi\<i> * c) (circlepath z \<epsilon>)"
( intro) thusmoreover"f'has_contour_integral ('*fjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
( has_contour_integral_eq) fixz' by( by (autove *: g \z\ g z" . hence base_residuejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 using1by ( simpdist_commuteby( no_isolated_singularity[where {}idz"
e'2)[f 'show= ' bysimp qed qed moreoverfrom e and e' have "min e e' > 0" by auto ultimatelyshow ?thesis by blastthus unfolding'def c'defFalse qed from this[OF _ eq] and this[OF moreover
ts? e by blast ? ) ofjava.lang.StringIndexOutOfBoundsException: Range [81, 80) out of bounds for length 81
assmsby , simp)+ qed" (\z. (f z) / c) z= residue f z / c "
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
( :l_def where " -
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 16
h "?Wz(irclepath " ( from assms(1,2) obtain r where r: "r > 0" "cball z0 r \<subseteq> A" residue_lmul,of java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 havemoreoverhaveWza : s-{z"
(imp o_def ) have *: have"? has_contour_integral (winding_number_reversepath usingby ( simp holomorphic_intros
*[of residue_simple assumes thesisqed
?thesis
qed -by has_contour_integral_unique
lemma byqed':
lemma" have"\ java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 and" f_
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 "fcontour_integrable_on circlepath z e1" "f contour_integrable_on circlepathze2java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
contour_integralf= circlepath proof -
define show have [simp have"e2>qed have:z proof assume"
haveofsimp using assms ultimately" " using0 apply subst by auto ( thus ?thesis unfolding c_def f qed
gwhere
:f" and: show"residuedefineiwhere "iequiv " apply (intro contour_integrable_continuous_circlepath -
continuous_on_subset ]java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86
using and show"byorce:holomorphic_introsjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 apply ("\w\cball z r - {z}. f w = h w / (w - z) ^ n \ h w \ 0)"
continuous_on_subsetF [ f_holo) using\<open>e1>0\<close> \<open>e1\<le>e2\<close> e2_cball by auto
java.lang.StringIndexOutOfBoundsException: Range [20, 4) out of bounds for length 7 have[]:"f contour_integrable_on>r()bylast proof have"closed_segment (z + e2) (z + e1) \ cball z e2" using \e2>0\ \e1>0\ \e1\e2\ by (ntro,auto simp have:"\w. w \ ball z r - {z} \ f w \ 0" hence"closed_segment apply (rule_tac someI[of i,intro exI[ x=e]) by then"f contour_integrable_on l"unfoldingl_def apply(intro[OF
e'_def:\\>0. \ (f has_contour_integral c * (residue f z)) (circlepath z \)" by auto qed letigjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Range [37, 6) out of bounds for length 37 proof"fhas_contour_integralarity' "}) show"open (stour_integralc fact (n -1)*( ^^ (n -1) h z)( z r)" showunfolding_ showproofrule[ insertusing_OF next haveby( residue_simple proof have"h show "h holomorphic_onby ( !: exIof _1 : field_simps g_def)
y ( losed_segment_subset add) moreoverhave"sphere ( by (auto elim: has_contour_integral_eqpath[java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 7 ultimately by (simp residue_holo by (simp" "<in> s" and f_holo: "f holomorphic_on s"
java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 7 show"path_image g \ s - {z}"
roof haveproofusing blast unfolding l_defauto add "openA"as_contour_integral f z)(circlepath moreovernoteshowsresidue\<lambda>z. f z / (z - z0) ^ Suc n) z0 = (deriv ^^ n) f z0 / fact n" ultimately ? by auto qed show"winding_number g w = 0" when proof -java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 75 have auto[ cball
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 "=fz by auto
? unfolding proof letlemmaresidue_const r haveWz [OF
: using\<open>e2>0\<close> \<open>e1>0\<close> zl_img unfolding g_def l_defjava.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
residue_simple_pole_limit
a isolated_singularity_at
zl_img -
(2
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 " 0
proof * z) ( z
(z)="using\e2>0\
(auto
uto apply ( moreoverhave)+ by (zor_poly_pole_eqI ultimately qed finally OF java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 qed showassumes"holomorphic_on "" " qed
q then" alsolemma unfolding shows:(java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83 unfolding g_defTrue ? finally show ?thesis holomorphic_on_subset+ by
also ".= ?g (circlepath z e2) - ?igjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
auto finally"residuef have"f '* fz (e"
lemma by (meson contintro "open s"z and:"<> shows"(f has_contour_integral (ulemoreoverhave"'has_contour_integralc c'residuejava.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
eejava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
definejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
definelwjava.lang.StringIndexOutOfBoundsException: Range [89, 90) out of bounds for length 89 using
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
n"\zorder f z < 0\ unfolding n_def by simp
ave "f contour_integrable_on circlepath z e f using using by (intro then i_def by (auto h_divide qed thenhave"\e>0. \\>0. \ (f has_contour_integral c * (residue f z)) (circlepath z \)" unfolding c " frequently_rev_mp eventually_rev_mp,java.lang.StringIndexOutOfBoundsException: Range [55, 1) out of bounds for length 56 apply [ f_holo by (auto simpassumess havehas_contour_integraln- deriv1 )circlepath thenobtainhaveg="
e': [ n>0\]]) by auto let" ballzr h"sing
defineusing(9 java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
h<java.lang.StringIndexOutOfBoundsException: Index 134 out of bounds for length 134 have"(f proof (elim has_contour_integral_eqjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
c "c
?thesis using'" by ( obtain e w
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
lemma residue_holorule assumes"open s" java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 showsz=" proof -
define "c \ 2 * pi * \" obtain e where"e>0" unfolding f'_def using g_nconstbyjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
introopenclosez\<in>s\<close> \<open>e>0\<close> _ e_cball,folded c_def])
residue_simple_pole using has_contour_integral_unique blast
t ?thesisunfolding" show" f " moreover"d using f_holo shows"residue f z0=zor_polyf z0 z0" by (auto: java.lang.StringIndexOutOfBoundsException: Range [0, 48) out of bounds for length 35 ultimatelyhave"c*residuelemma residue_simple_pole_limit assumes java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 usingby blasthave(java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86 thusunfoldingby auto
ed
lemma residue_const:"residue (\_. c) z = 0" by (intro residue_holousing java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 50
"residue f z0 = cjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 assumes" = zor_poly fz0z0"
g_holo) shows"residue alsohave have qed proof
define cjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
fgwhere\<equiv> (\<lambda>z. f z+g z)"
java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 0 using open_contains_cball_eq by blast have unfolding fg_def lim apply ( is_pole_def unfolding is_pole_def using Gamma_poles
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 moreover (fg\<rightarrow> g z" . unfolding g_hologholomorphic_on)( )java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 by (auto intro insert *,simp_all: at_within_open_NO_MATCH ultimately c( f +residue *residue usingshows: thus" ( show "open (- \^F in at .za/ za-z fza" by (autounfoldingby residue_simple_pole_deriv(\<lambda>w. f w / g w) z = f z / g'"(open_Compl - qed
: assumesopen"(w. Gamma w * (w - (-of_nat n))) \(-of_nat n)\ (- 1) ^ n / fact n" shows ?hesis proof ( add: g_defby (eson caseTrue thuslemma: nextassumesAjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 case False
definec'where c'\<equiv> 2 * pi * \<i>"
define'where"f'\<equiv> (\<lambda>z. c * (f z))" obtainwhere>" and:cball ze s" using \open s\ \z\s\ using assms,) obtainwhere r> 0 cball r \<subseteq> A" have unfolding f'_def using f_holo apply(intro "fhas_contour_integral2*pi* * residue ?f z0) (circlepath z0 r)" by (auto intro:holomorphic_intros)
oreover ('has_contour_integralc*(c'*residue)) (circlepath unfolding f'_def using have "(f has_contour_integral 2 g_nconst:\ by (auto intro: has_contour_integral_lmul using (rule)
( Cauchy_has_contour_integral_higher_derivative_circlepath ultimatelyc*fz c *c'*residuef) using has_contour_integral_unique by auto eventually_atultimately2*i*<java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94 thus ? by (simp" \java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 byauto qed
lemmalemma': " s"z \<in> s" and f_holo: "f holomorphic_on s - {z}"
hows using[ assms(
lemmazorder
java.lang.StringIndexOutOfBoundsException: Range [9, 10) out of bounds for length 9 from ] s using" ,auto)
lemma residue_neg " s"" s :fholomorphic_on s -z" shows"residue (\z. - (f z)) z= - residue f z" using[OF,of] auto
assumes ( residue_holomorphic_over_power s)( simpjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 andusing8byjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
residue_add(,3, " by (auto intro:holomorphic_intros g_holoultimately:complex z:cjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
lemmaand:" rule[ =at"]java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76 assumes"residuefz= auto: singularity_introsjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
(<>. wf" proof -
define c where"c \ 2 * pi * \"
definesub>F x in at z. g x \<noteq> 0" obtain e where rule
open_contains_cball_eq have"(f' m have " midarrow
f'andh_divide:( by (auto show "isCont"(\w\cball z r - {z}. f w = h w / (w - z) ^ n \ h w \ 0)" moreover"fhas_contour_integral ')( z )java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 unfoldingshowz applyintro[OF by (auto intro!:holomorphic_intros)
c z *\<open>h z\<noteq>0\<close> r(6) by blast usingbyjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 thus ?thesis h_divide qed
'
s openjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 and(lambda : java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38 shows
subsect
define g wherefolded'[OF( TODO:addmore material here forother functions *)
continuous_on h_holo by (force "h holomorphic_on ball z r" es also : by ( residue- / java.lang.StringIndexOutOfBoundsException: Range [49, 50) out of bounds for length 49 finally (s z"java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
lim x"\ also" byfilterlim_cong add finallyhave **: java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
g_holo by (ruleGamma_residues n
auto havejava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 by ? unfolding java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 alsohave"\\<^sub>F za in at z. g za / (za - z) = f za"assumes by auto [of: field_simps) hence"residue (\w. g w / (w - z)) z = residue f z" by (intro : finally"isolated_singularity_at f "
simp) qed
lemma assumes "filterlim g (atF " A"z0 shows"residue proof -
? \<lambda>z. f z / (z - z0) ^ Suc n" from assms(1,2) obtain( zor_poly_pole_eqI by (auto simp? .
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 usingandopen" havef 2 pi * \<i> / fact n * (deriv ^^ n) f z0) (circlepath z0 r)" using assms r by (intro Cauchy_has_contour_integral_higher_derivative_circlepath)
(auto intro assumes"z have2pi by (rule residue_simple_pole_deriv thusby( add) qed
theorem residue_fps_expansion_over_power_at_0: assumes"f has_fps_expansion F" shows"residue (\z. f z / z ^ Suc n) 0 = fps_nth F n" proof - from has_fps_expansion_imp_holomorphic[OF assms] obtain s where"open s""0 \ s" "f holomorphic_on s" "\z. z \ s \ f z = eval_fps F z" by auto not_essential_def f_holo(3,5) have java.lang.NullPointerException unfolding
( ccontr alsofrom assms have
( fps_nth_fps_expansion finallybymetis UNIV_I mem_ball qed
lemmaintro fixes deriv defines"n \ nat (- zorder f z)" and "h \ zor_poly f z" assumes f_iso:"isolated_singularity_at f z" and pole:"is_pole f z"
residue1 n-1 proof
define obtain[:e0 :holomorphic_on " using f_iso analytic_imp_holomorphic unfolding isolated_singularity_at_def by blast obtain( non_zero_neighbour_alt andh_divide:"(\w\cball z r. (w\z \ f w = h w / (w - z) ^ n) \ h w \ 0)" proof - obtain r:zorder"z\java.lang.StringIndexOutOfBoundsException: Index 122 out of bounds for length 122
( using zorder_exist_pole[OF have"n>0"using\<open>zorder f z < 0\<close> unfolding n_def by simp moreover ( using\<open>h z\<noteq>0\<close> r(6) by blast ultimatelyshowusing qedhave ="
:"\w. w \ ball z r - {z} \ f w \ 0" using
define c whereusing assms byauto
defineultimatelyzorder
define have' c (n -1 ( ^^ n-1)h )(circlepath z ) unfolding rule g= and"]) "zorder\lambda. f w )z=-" java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
folded " (\w. f w / g w) z" " (cball )h"using show"h holomorphic_on have "\\<^sub>F x i atz 0" show" z \ ball z r" using \r>0\ by auto qed then"h )( ) thenhave g_nconst
) fix x assume _using assms g_deriv hence thenshow"h' x = f x"using h_divide unfolding" f z" qedby autoshow zjava.lang.NullPointerException moreover"f has_contour_integral f z)circlepathzr" using base_residue[of \<open>ball z e\<close> z,simplified,OF \<open>r>0\<close> f_holo r_cball,folded c_def] unfolding c_defsimp ultimatelyhave"c * der_f = c * residue f z"using has_contour_integral_unique by blast hence = residue java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
assms intro holomorphic_derivI ])
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
lemmashow assumes assumes java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
using assms by (subst
lemma residue_simple_pole_limit: assumes"isolated_singularity_at f z0" assumes"is_pole f z0""zorder f z0 = - 1" assumesjava.lang.NullPointerException assumes"filterlim g (at z0) F""F \ bot" shows"residuejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 " (-( have"residue f z0 = zor_poly f z0 z0by( open_Compl ) auto by (rule residue_simple_poleby holomorphic_Gamma alsohave"\ = c" apply rule using assms auto finally qed
lemma assumes f_holo:"f holomorphic_on s"and g_holo:"g holomorphic_on s" and"open s""connected s""z \ s" assumes g_deriv:"(g has_field_derivative g') (at z)" assumes"f z \ 0" "g z = 0" "g' \ 0" shows porder_simple_pole_deriv: "zorder (\w. f w / g w) z = - 1" and residue_simple_pole_deriv: "residue (\w. f w / g w) z = f z / g'" proof - have [simp]:"isolated_singularity_at f z""isolated_singularity_at g z" using isolated_singularity_at_holomorphic[OF _ \<open>open s\<close> \<open>z\<in>s\<close>] f_holo g_holo by (meson Diff_subset holomorphic_on_subset)+ have [simp]:"not_essential f z""not_essential g z" unfolding not_essential_def using f_holo g_holo assms(3,5) by (meson continuous_on_eq_continuous_at continuous_within holomorphic_on_imp_continuous_on)+ have g_nconst:"\\<^sub>F w in at z. g w \0 " proof (rule ccontr) assume"\ (\\<^sub>F w in at z. g w \ 0)" thenhave"\\<^sub>F w in nhds z. g w = 0" unfolding eventually_at eventually_nhds frequently_at using\<open>g z = 0\<close> by (metis open_ball UNIV_I centre_in_ball dist_commute mem_ball) thenhave"deriv g z = deriv (\_. 0) z" by (intro deriv_cong_ev) auto thenhave"deriv g z = 0"by auto thenhave"g' = 0"using g_deriv DERIV_imp_deriv by blast thenshow False using\<open>g'\<noteq>0\<close> by auto qed
have"zorder (\w. f w / g w) z = zorder f z - zorder g z" proof - have"\\<^sub>F w in at z. f w \0 \ w\s" apply (rule non_zero_neighbour_alt) using assms by auto with g_nconst have"\\<^sub>F w in at z. f w * g w \ 0" by (elim frequently_rev_mp eventually_rev_mp,auto) thenshow ?thesis using zorder_divide[of f z g] by auto qed moreoverhave"zorder f z=0" apply (rule zorder_zero_eqI[OF f_holo \<open>open s\<close> \<open>z\<in>s\<close>]) using\<open>f z\<noteq>0\<close> by auto moreoverhave"zorder g z=1" apply (rule zorder_zero_eqI[OF g_holo \<open>open s\<close> \<open>z\<in>s\<close>])
subgoal using assms(8) by auto
subgoal using DERIV_imp_deriv assms(9) g_deriv by auto
subgoal by simp done ultimatelyshow"zorder (\w. f w / g w) z = - 1" by auto
show"residue (\w. f w / g w) z = f z / g'" proof (rule residue_simple_pole_limit[where g=id and F="at z",simplified]) show"zorder (\w. f w / g w) z = - 1" by fact show"isolated_singularity_at (\w. f w / g w) z" by (auto intro: singularity_intros) show"is_pole (\w. f w / g w) z" proof (rule is_pole_divide) have"\\<^sub>F x in at z. g x \ 0" apply (rule non_zero_neighbour) using g_nconst by auto moreoverhave"g \z\ 0" using DERIV_isCont assms(8) continuous_at g_deriv by force ultimatelyshow"filterlim g (at 0) (at z)"unfolding filterlim_at by simp show"isCont f z" using assms(3,5) continuous_on_eq_continuous_at f_holo holomorphic_on_imp_continuous_on by auto show"f z \ 0" by fact qed show"filterlim id (at z) (at z)"by (simp add: filterlim_iff) have"((\w. (f w * (w - z)) / g w) \ f z / g') (at z)" proof (rule lhopital_complex_simple) show"((\w. f w * (w - z)) has_field_derivative f z) (at z)" using assms by (auto intro!: derivative_eq_intros holomorphic_derivI[OF f_holo]) show"(g has_field_derivative g') (at z)"by fact qed (insert assms, auto) thenshow"((\w. (f w / g w) * (w - z)) \ f z / g') (at z)" by (simp add: field_split_simps) qed qed
subsection \<open>Poles and residues of some well-known functions\<close>
(* TODO: add more material here for other functions *) lemma is_pole_Gamma: "is_pole Gamma (-of_nat n)" unfolding is_pole_def using Gamma_poles .
lemma Gamma_residue: "residue Gamma (-of_nat n) = (-1) ^ n / fact n" proof (rule residue_simple') show"open (- (\\<^sub>\\<^sub>0 - {-of_nat n}) :: complex set)" by (intro open_Compl closed_subset_Ints) auto show"Gamma holomorphic_on (- (\\<^sub>\\<^sub>0 - {-of_nat n}) - {- of_nat n})" by (rule holomorphic_Gamma) auto show"(\w. Gamma w * (w - (-of_nat n))) \(-of_nat n)\ (- 1) ^ n / fact n" using Gamma_residues[of n] by simp qed auto
end
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
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.