Zulip Chat Archive

Stream: PR reviews

Topic: Riemannian manifolds


Sébastien Gouëzel (Jun 18 2025 at 08:41):

I have a big work in progress towards Riemannian manifolds in #25347. It will need quite a long string of PRs to get there. I will list the currently opened PRs here as a subtle hint :-) Currently, there are two kind of prerequisites, the ones on differential geometry, and another bunch towards a good change of variables formula in dimension 1 for monotone maps (to be able to talk about path length and reparameterize the paths nicely).

Sébastien Gouëzel (Jun 18 2025 at 08:41):

#25383 (+273/-29): continuity statements for the bundle of continuous linear maps

Sébastien Gouëzel (Jun 18 2025 at 08:42):

#25768 (+33/-2): derivative of continuous affine maps

Sébastien Gouëzel (Jun 18 2025 at 08:42):

#25771 (+32/-12): drop an assumption in congruence lemma for manifold derivatives

Sébastien Gouëzel (Jun 18 2025 at 08:43):

#25824 (+164/-63): require that the range of a real or complex model with corners is convex

Sébastien Gouëzel (Jun 18 2025 at 08:43):

#25865 (+420/-138, but completely mechanical and boring): add fun_ variants for Fréchet derivative of addition and like

Sébastien Gouëzel (Jun 18 2025 at 08:44):

#26066 (+70/-3): missing API for measure theory

Sébastien Gouëzel (Jun 18 2025 at 08:44):

#26068 (+135/-3): the derivative of a monotone function is nonnegative

Sébastien Gouëzel (Jun 18 2025 at 08:45):

#26069 (+114/-66): split the file MeasureTheory.Function.Jacobian

Sébastien Gouëzel (Jun 18 2025 at 08:45):

(And yes, I'm aware that's a long list!)

Kevin Buzzard (Jun 18 2025 at 20:43):

I'm only seeing this 12 hours later and it looks like a very short list now :-)

Michael Rothgang (Jun 18 2025 at 20:44):

I'm assuming we'll get some more PRs tomorrow/soon :-)

Sébastien Gouëzel (Jun 19 2025 at 06:39):

The reviewers have been incredibly efficient on the list of PRs above, thanks a lot of that. Let's add a few more PRs to the list, and see if things go as smoothly :-)

Sébastien Gouëzel (Jun 19 2025 at 06:40):

#26112 (+173/-19): applying a smooth hom bundle section to a smooth section gives a smooth section

Sébastien Gouëzel (Jun 19 2025 at 06:40):

#26113 (+340/-55): more API for monotone functions wrt topology

Sébastien Gouëzel (Jun 19 2025 at 06:41):

#26121 (+36/-13): more uses of simps in fiber bundles and vector bundles

Jeremy Ravenel (Jun 20 2025 at 01:23):

@Sébastien Gouëzel can I ask, is your use of convexity in relation to invariance of domain and the inverse function theorem?

Sébastien Gouëzel (Jun 20 2025 at 05:46):

The answer is no. The issue is that, even for a nice path-connected subset of R2\R^2 (say equal to the closure of its interior), the topology defined by the geodesic distance may be different from the topology defined by the original distance, if the set is not convex.

Patrick Massot (Jun 20 2025 at 07:35):

Jeremy, this is all about differential topology, not topological manifolds, so the invariance of domain has nothing to do here. Invariance of domain is crucial to ensure that topological manifolds have a (locally) unique dimension. But the analogous claim for differentiable manifolds trivially reduces to linear algebra because the differential of a diffeomorphism is a linear isomorphism.

Sébastien Gouëzel (Jun 20 2025 at 09:41):

Next PRs:

Sébastien Gouëzel (Jun 20 2025 at 09:43):

#26198 (+323/-2): change of variables formula in integrals for monotone functions.
This one should also be useful to @Yury G. Kudryashov for reparameterization of path integrals after #24754

Sébastien Gouëzel (Jun 20 2025 at 09:51):

#26197 (+244/-2): continuous Riemannian bundles
This one doesn't build currently, because the simpNF linter complains that it reaches a timeout in an unrelated lemma docs#ContinuousLinearMap.norm_smulRightL. Probably this means that I've made instance search slightly more costly, and that it's passed the threshold. I tried to improve things by making the instances I add with a very small priority, and to make several definitions reducible as in the reducible non-instances library note. To no avail. I don't know how to debug what is going on: if I create a new file importing all of mathlib and copy inside it the content of ContinuousLinearMap.norm_smulRightL, then everything is quick (no timeouts).

There is an easy but bad fix which is to just nolint simpNF this lemma, but it's probably not a good idea performancewise, because it means something fishy is going on somewhere. If anyone has an idea to improve the situation, I'm all ears. Otherwise, I'll go with my bad fix.

Sébastien Gouëzel (Jun 20 2025 at 12:49):

I've checked the timings, and they vary very little between before and after the PR. So in fact I think nolinting the lemma is the right thing to do. I've done it in the PR, which is now ready for review.

Michael Rothgang (Jun 25 2025 at 12:17):

Let me link a few more recent PRs, for easier finding:

Michael Rothgang (Jun 25 2025 at 12:17):

#26356 (+180/-173): refactor: move stuff on addition of iInf and iSup in ENNReal to a common place

Michael Rothgang (Jun 25 2025 at 12:18):

#26362 (+60/-15) preliminary refactoring; weaken assumption to NullMeasurableSet in some results on change of variables in integrals

Michael Rothgang (Jun 25 2025 at 12:18):

#26361 (+23) the function smoothTransition is monotone

Michael Rothgang (Jun 25 2025 at 12:20):

#26355 (+690/-290) add fun_ versions of many lemmas about one-dimensional derivatives

Michael Rothgang (Jun 25 2025 at 12:20):

Michael Rothgang said:

#26355 (+679/-288) add fun_ versions of many lemmas about one-dimensional derivatives

currently doesn't pass CI yet; I maintainer merge'd an old version: taking a look now Everything builds and tests fine; ought to lint.
Re-reviewed everything, still looks good.

Michael Rothgang (Jun 26 2025 at 13:45):

#26411 (+44/-0): add iInf results on ENNReal, matching existing iSup ones

Winston Yin (尹維晨) (Jun 27 2025 at 01:29):

May I just say a big thank you for this massive undertaking. Been looking forward to this for a long time!

Sébastien Gouëzel (Jun 29 2025 at 06:25):

Here is a new list of PRs, to keep the reviewers busy :-)

Sébastien Gouëzel (Jun 29 2025 at 06:25):

#26500 (+206/-2): more properties of the manifold structure on Icc

Sébastien Gouëzel (Jun 29 2025 at 06:26):

#26501 (+65/-7): more API on manifolds

Sébastien Gouëzel (Jun 29 2025 at 06:26):

#26502 (+49/-10): monotonicity of lineMap

Sébastien Gouëzel (Jun 29 2025 at 06:27):

#26503 (+77/-0): constructor for emetric space with a preexisting topology

Sébastien Gouëzel (Jun 29 2025 at 06:28):

#26504 (+34/-3): the image of an interval under a continuous monotone map is an interval

Sébastien Gouëzel (Jun 29 2025 at 06:28):

#26505 (+244/-1): in a continuous Riemannian bundle, the trivialization at a point is locally bounded in norm

Sébastien Gouëzel (Jun 29 2025 at 06:29):

#26506 (+201/-0): smooth Riemannian bundles

Sébastien Gouëzel (Jun 29 2025 at 06:31):

Again I'm really aware that this is a long list. The good news is that the final target in the list, #25347, builds fully and contains the theorem I wanted to prove (the distance coming from a Riemannian metric is indeed a distance, and it defines the same topology as the original one). This proves that the API is working fine to prove nontrivial results, so all that is left is to integrate all this into mathlib.

Michael Rothgang (Jun 29 2025 at 07:07):

No worries; I'm glad Patrick and I have some work to do again :-)

Patrick Massot (Jul 05 2025 at 09:29):

@Sébastien Gouëzel could you clarify the current status of this effort? Do you intend to cut #25347 into more pieces? Or are you now expecting a review? Note it still has the WIP label.

Sébastien Gouëzel (Jul 05 2025 at 09:30):

I'm still cutting it into pieces, hence the WIP. The next one is #26778.

Sébastien Gouëzel (Jul 05 2025 at 09:30):

And many thanks for all the reviews, this is getting merged to mathlib at a really impressive pace!

Patrick Massot (Jul 05 2025 at 09:42):

It really really help that Michael and I are both in Orsay with time and the explicit goal of doing differential geometry.

Patrick Massot (Jul 05 2025 at 09:43):

This allows us to stay focused on this area and not forget the big picture while moving from one PR to the next, and presumably it’s the same for you as an author.

Patrick Massot (Jul 05 2025 at 09:44):

In an ideal world this would be the situation for every big push to a specific area of Mathlib.

Patrick Massot (Jul 05 2025 at 09:47):

Being able to talk to another reviewer while reviewing is really helpful.

Michael Rothgang (Jul 05 2025 at 16:44):

I very much agree: the past weeks are quite possibly my most productive ones this year.

Michael Rothgang (Jul 05 2025 at 16:46):

I wonder if organising a "mathlib differential geometry workshop", where people come together for e.g. a week with the explicit goal of making progress would help. (Though being in Orsay for several weeks really helps; one week might possibly be too short.)
Or should we have differential geometry parties, to meet virtually and e.g. review a stack of PRs, or discuss difficult issues? (Lower barrier to entry, can be repeated more often, but same-room-ness is harder to approximate online.)

Johan Commelin (Jul 06 2025 at 04:10):

I think topical workshops are great! We've had several in the algebraic geometry corner of maths, and they were very productive.

Kevin Buzzard (Jul 06 2025 at 06:55):

We had a very productive algebraic geometry workshop at AIM in California, you could try for a differential geometry one. I didn't really want to go to California so we had it online. The cohomology workshop in Banff was in person though.

Dominic Steinitz (Jul 06 2025 at 08:41):

I would love a differential geometry workshop. Also I have my metric and connections (the usual Levi-Civita and what I call the Mercator connection) ready to try out via Christoffel symbols (for the metric) and connection coefficients (for the connections) :-)

Kevin Buzzard (Jul 06 2025 at 12:53):

I think that one thing which made the algebraic geometry workshop so interesting was that as well as lean experts in algebraic geometry there were also people like Ravi Vakil who knew less about lean but had very clear ideas about what theories should be developed and in what order. So if you go for it I would definitely sell it as being appropriate for differential geometers even if they know no lean and then just make sure internally that the lean diff geom experts can all make it

Sébastien Gouëzel (Jul 17 2025 at 20:42):

The final PR integrating Riemannian manifolds in Mathlib is ready for review, at #25347. It's a little bit long because it mixes a part on definitions, and a part proving a non-trivial theorem (the topology coming from the distance associated to a Riemannian metric coincides with the initial topology). I could split it in two, but I think that proving a nontrivial theorem shows that the design just works. Tell me if you want me to split it!

And many thanks to the reviewers who have already looked at a lot of PRs for this project!

Patrick Massot (Jul 18 2025 at 11:28):

@Sébastien Gouëzel could you move that branch to your fork?

Sébastien Gouëzel (Jul 18 2025 at 11:59):

Sure. #27250.

Patrick Massot (Jul 18 2025 at 20:31):

Ok, now both versions have comments…


Last updated: Dec 20 2025 at 21:32 UTC