Zulip Chat Archive
Stream: mathlib4
Topic: Differentiability of paths in manifolds
Ben Eltschig (Nov 16 2023 at 04:50):
Over the past few months I've been playing around a bit with formalising Riemannian manifolds in lean, and in the process wrote quite a few lemmas on smoothness and derivatives of paths in manifolds. I'm now at a point where I'm thinking about potentially PR-ing some of those to mathlib, and would like to know whether such a PR would be welcome, or whether my approach is maybe not the one mathlib should use.
Specifically, I've used the SmoothManifoldWithCorners
-instance on the unit interval to talk about smoothness of paths using the existing API for smooth maps between manifolds with corners, and also defined the derivative of paths as a function using the existing mfderiv
-API by evaluating it as needed. The main results include:
γ.symm
is differentiable/C^n/smooth att
iffγ
is the same atunitInterval.symm t
- for
γ.trans γ'
is differentiable/C^n/smooth at iffγ
is the same at - for
γ.trans γ'
is differentiable/C^n/smooth at iffγ'
is the same at γ.trans γ'
is differentiable iff bothγ
andγ'
are differentiable and their derivatives at the endpoints match- the derivative of
γ.symm
att
equals minus the derivative ofγ
atunitInterval.symm t
- for the derivative of
γ.trans γ'
at equals twice the derivative ofγ
at - for the derivative of
γ.trans γ'
at equals twice the derivative ofγ'
at .
The reason that I think those would be useful to have in mathlib is that they are required for example to define the length of paths in Riemannian manifolds and prove some basic properties like additivity under concatenation (in fact I've already done so in another file), or to define and work with piecewise C^n/smooth paths, which will eventually be required to define the distance function on Riemannian manifolds.
I however also know that mathlib has a preference towards working with functions defined on all of ℝ rather than just , and indeed working with the smooth structure of the unit interval has made parts of my code quite lengthy; the lemmas outlined above with all their variants take about 600 lines of code, but also another 500 lines of prerequisites on smoothness and derivatives of certain functions like on the unit interval. This has me questioning a bit whether this really was the right approach, or whether doing most computations with γ.extend
instead might've been a better choice.
So, is this something that would still be an good/acceptable starting point for a PR? If it is, what would be the next steps I should take?
Johan Commelin (Nov 16 2023 at 05:57):
Let me ping our manifold crowd: @Heather Macbeth @Sebastien Gouezel @Patrick Massot @Yury G. Kudryashov
Yury G. Kudryashov (Nov 16 2023 at 06:03):
I think that using functions from real numbers is easier.
Yury G. Kudryashov (Nov 16 2023 at 06:04):
And we should have lemmas about length of a path parametrized by , not only .
Yury G. Kudryashov (Nov 16 2023 at 06:07):
BTW, do we have lemmas like t ≤ 1/2 → (γ.trans γ').extend t = γ.extend(2 * t)
?
Yury G. Kudryashov (Nov 16 2023 at 06:08):
And simple corollaries like t < 1/2 → (γ.trans γ').extend =ᶠ[𝓝 t] (γ <| 2 * ⋅)
?
Junyan Xu (Nov 16 2023 at 06:20):
Yury G. Kudryashov said:
BTW, do we have lemmas like
t ≤ 1/2 → (γ.trans γ').extend t = γ.extend(2 * t)
?
Haha, we have exactly almost this at mathlib3#18375 (which it's also about lengths of paths!) It should indeed be stated in terms of Path.extend
, not sure why I chose the statement. Maybe because it's about two functions on the unit interval, not the reals? (If someone can help porting the PR please do.)
Junyan Xu (Nov 16 2023 at 06:32):
We had some discussion about integration of a function along a curve in the context of contour integrals in complex analysis. I think the generality we should aim for is defining it for measurable functions and rectifiable curves, for which we can pullback the arclength to a measure on an interval and do Lebesgue integration on the interval. (Rectifiability is independent of the choice of a (smooth) chart. I guess your definition of length also requires choosing a chart. Have you made progress proving the length is invariant under change of coordinates?)
Ben Eltschig (Nov 16 2023 at 11:59):
Junyan Xu said:
Yury G. Kudryashov said:
BTW, do we have lemmas like
t ≤ 1/2 → (γ.trans γ').extend t = γ.extend(2 * t)
?Haha, we have
exactlyalmost this at mathlib3#18375 (which it's also about lengths of paths!) It should indeed be stated in terms ofPath.extend
, not sure why I chose the statement. Maybe because it's about two functions on the unit interval, not the reals? (If someone can help porting the PR please do.)
That's actually really similar to how I've written the lemma too, except I've given names to even more common functions like your div_two
because they kept appearing all over the place. Talking about extended paths instead is probably a good way to avoid having to do that indeed.
Ben Eltschig (Nov 16 2023 at 12:30):
Junyan Xu said:
We had some discussion about integration of a function along a curve in the context of contour integrals in complex analysis. I think the generality we should aim for is defining it for measurable functions and rectifiable curves, for which we can pullback the arclength to a measure on an interval and do Lebesgue integration on the interval. (Rectifiability is independent of the choice of a (smooth) chart. I guess your definition of length also requires choosing a chart. Have you made progress proving the length is invariant under change of coordinates?)
I don't think I've defined length in a coordinate-dependent way actually - I just did it as the integral over the norm of the derivative as a function on . Of course that only works right for differentiable paths though, so I agree that this should probably be done more generally in mathlib.
What I'm really here to ask about is not lengths of paths though, but the lemmas on differentiability outlined above. I'd assume that with smooth paths being so common in differential geometry they'd still be useful to have around - or is differentiability also something that should be talked about only in terms of γ.extend
, not just in the proofs of those lemmas but also their statements?
Last updated: Dec 20 2023 at 11:08 UTC