Zulip Chat Archive
Stream: Is there code for X?
Topic: Complex Integral of 1/z round the unit circle
Kevin Buzzard (Jul 17 2021 at 09:37):
I am giving a talk to Olympiad level schoolkids tomorrow and during it I would like to state in Lean the theorem that the integral
Kevin Buzzard (Jul 17 2021 at 09:37):
Can we do this on some compiling commit of mathlib?
Kevin Buzzard (Jul 17 2021 at 09:38):
I don't need a proof but ideally I'd like to be able to present a term which contains as few symbols as possible other than the essential maths ones
Mario Carneiro (Jul 17 2021 at 09:41):
Are you okay with a parameterized curve?
Kevin Buzzard (Jul 17 2021 at 09:42):
I'm completely happy with def S\^1 : complex_path := <unreadable_thing>
Kevin Buzzard (Jul 17 2021 at 09:43):
I think a parameterised curve is fine
Mario Carneiro (Jul 17 2021 at 09:43):
I was thinking more along the lines of
Kevin Buzzard (Jul 17 2021 at 09:43):
Anything which I can explain to a mathematician without having to go "enat: well ok there's thing called roption
which is computer science"
Mario Carneiro (Jul 17 2021 at 09:44):
that might be halfway to solving the problem though
Kevin Buzzard (Jul 17 2021 at 09:44):
That would be a good start
Kevin Buzzard (Jul 17 2021 at 09:44):
Can we integrate complex-valued functions on ?
Mario Carneiro (Jul 17 2021 at 09:44):
yeah
Mario Carneiro (Jul 17 2021 at 09:44):
bochner baby
Mario Carneiro (Jul 17 2021 at 09:46):
the domain can be any measurable space although it's specialized to , and the codomain can be any complete vector space including
Mario Carneiro (Jul 17 2021 at 09:47):
given what we know about derivatives, I think you could even do a proof of the theorem in your talk
Mario Carneiro (Jul 17 2021 at 09:48):
but stating it in terms of a contour integral is out of reach at the moment, unless you define a parameterized contour integral on the spot just so the statement looks nice
Kevin Buzzard (Jul 17 2021 at 10:02):
So is complex_integral (F : Icc 0 1 \to_<whatever> \C) : \C := ...
accessible? Do we have the correct bundled morphism?
Kevin Buzzard (Jul 17 2021 at 10:03):
`(0 : \R) if you really must, but everyone knows the default Icc is .
Kevin Buzzard (Jul 17 2021 at 10:04):
I have learnt to live without the square bracket notation but we could define S^1 to be this
Kevin Buzzard (Jul 17 2021 at 10:04):
Why not? It's a model
Kevin Buzzard (Jul 17 2021 at 10:05):
It could be Carneiro's -- a convenient model.
Kevin Buzzard (Jul 17 2021 at 10:06):
You can create an instance of topological space
later
Mario Carneiro (Jul 17 2021 at 10:25):
I managed this much:
import measure_theory.interval_integral
open_locale classical real
noncomputable theory
open set complex
def complex_path := { γ : ℝ → ℂ // differentiable ℝ γ }
instance : has_coe_to_fun complex_path := ⟨_, λ γ, γ.1⟩
lemma S1_deriv (t : ℝ) :
has_deriv_at
(λ x:ℝ, exp (2 * π * I * x))
(2 * π * I * exp (2 * π * I * t)) t :=
sorry
def S1 : complex_path := ⟨λ t, exp (2 * π * I * t), λ t, ⟨_, S1_deriv t⟩⟩
notation `S¹` := S1
def contour_integral (γ : complex_path) (f : ℂ → ℂ) : ℂ :=
∫ t in 0..1, f (γ t) * deriv γ t
notation `∮` binders ` in ` γ `, ` f:(scoped:60 f, f) := contour_integral γ f
example : ∮ z in S¹, 1 / z = 2 * π * I :=
show ∫ (t:ℝ) in 0..1, (1 / exp (2 * π * I * t)) * deriv (λ x:ℝ, exp (2 * π * I * x)) t = 2 * π * I,
by simp [λ t, (S1_deriv t).deriv, mul_left_comm, exp_ne_zero]
The sorry
looks easy but there is something missing about deriving real derivatives from complex ones
Heather Macbeth (Jul 17 2021 at 10:27):
Do you need to use a result from analysis.complex.real_deriv
? (Just a hunch.)
Mario Carneiro (Jul 17 2021 at 10:27):
I noticed that file, but it seems to be about restricting the codomain, not the domain
Mario Carneiro (Jul 17 2021 at 10:29):
actually I take it back, they are doing both at once
Mario Carneiro (Jul 17 2021 at 10:29):
they are a little overspecific
Heather Macbeth (Jul 17 2021 at 10:57):
I think what's missing is the deriv
(i.e., 1d) version of docs#has_fderiv_at.restrict_scalars.
Heather Macbeth (Jul 17 2021 at 10:57):
In its absence one has to convert to a multivariate version:
lemma S1_deriv (t : ℝ) :
has_deriv_at
(λ x:ℝ, exp (2 * π * I * x))
(2 * π * I * exp (2 * π * I * t)) t :=
begin
have h : has_fderiv_at (λ x : ℂ, exp (2 * π * I * x))
((2 * ↑π * I * exp (2 * π * I * t)) • continuous_linear_map.id ℂ ℂ) (of_real_clm t),
{ rw has_fderiv_at_iff_has_deriv_at,
simpa [mul_comm] using ((has_deriv_at_id _).const_mul (2 * ↑π * I : ℂ)).cexp },
simpa using ((h.restrict_scalars ℝ).comp t of_real_clm.has_fderiv_at).has_deriv_at,
end
Johan Commelin (Jul 17 2021 at 11:04):
Wow, I didn't expect that all of this would fit in ~ 35 lines!
Last updated: Dec 20 2023 at 11:08 UTC