Zulip Chat Archive

Stream: new members

Topic: Jerome Hofstetter, manifold question


Jérôme Hofstetter (Dec 30 2025 at 17:15):

Hello
I'm a physics student with a strong interest in maths and theoretical physics. I love the idea of having maths formalized to the degree the lean project does it altho it doesnt seem that useful trying to learn from it. I'm interested in the mathematical underpinning of physical theories like GR, the slew of mathematical structures, definitions and theorems that are then utilized. I wish there was a middleground between textbooks, wikipedia and lean (in terms of similar rigorousity , but sacrificing some for readability while linking to existing textbooks)

I came here as I'm looking for material that better explains theorems and definitions extending from pre manifolds just locally modeled by Rn\mathbb{R}^n to premanifolds with corners (modeled by [0,)kRnk[0,\infty)^k \mathbb{R}^{n-k})
specifically how any structure with differentiation is defined, like CkC^k and what kind of hurdles one has to carefully navigate around verses which ones are not a problem.
As I've seen that manifold with corner seems to have been implemented in lean and the people being involved with that have probably seen the hurdles i wanted to ask if 1. there is a textbook or script that they've used as a reference or 2. they have made a post or jotted down their process and the hurdles.

Michael Rothgang (Dec 30 2025 at 19:02):

Hi, welcome to the mathlib community! I'm always glad to hear about users interested in manifolds in Lean.

As you maybe saw already, mathlib aims for definitions to be in the greatest reasonable generality. (If you'll need a definition when formalising current research mathematics, mathlib aims to have you covered.) As a result, there is no single reference covering mathlib's definition of manifolds. The closest I know is Roig and Domingues' Differential topology (which treats real Banach manifolds with boundary and corners). I'm not sure if this will answer your question, though.

Michael Rothgang (Dec 30 2025 at 19:08):

There is no mathematics in lean chapter for differential geometry yet. (I may get to writing one soon; no promises.) Similarly, there is no one coherent document explaining the design of manifolds in mathlib yet (which, again, hopefully will change in the coming months). Until then, I can only refer you to some slides and a talk of mine: https://www.math.uni-bonn.de/people/rothgang/slides_LearningLeanSeminar.pdf

Michael Rothgang (Dec 30 2025 at 19:08):

(There might be other such introductions; I'm not aware of them. Tell me if I have overlooked one!)

Jérôme Hofstetter (Dec 30 2025 at 19:56):

for myself and other students i've been in the process to write up more general texts of mathematical structures that in a sense resembles projects like mathworld or nLab but then create a connection to lectures

aiming for definitions to be in the greatest reasonable generality is partially an aim, just in the scope to what is reasonable , needed for example in GR. As i want to be quite rigorous and generalizing definitions is not trivial and spotting that lean has had some development in this direction i was curious if there is some more informal text about the process that went into it as it seems that describing the definitions and theorems informally is easier than formalizing it in lean

For that I'm glad my post has been spotted by someone that has directly worked on this.

I would know how to proceed if i just stick with premanifolds locally modeled to some Rn\mathbb{R}^n while texts that I've seen seem to mention manifolds with boundaries more of an afterthought, while i assume there come significant challenges and questions popping up for me like how does CkC^k condition work at those boundaries and corners, or the metric and so on.

I will check out Roig and Domingues' Differential topology, from a cursory glance it allows for quadrants of real banach spaces which seems like to me it extends the notion of [0,)kRnk[0,\infty)^k \mathbb{R}^{n-k} and defines differentiability already in that context which could already answer my questions.
While the definition in lean (again cursory glance) instead of using a normed vectorspace directly , asks for a topological space with an embedding to a normed vectorspace

Michael Rothgang (Dec 30 2025 at 22:44):

I'm glad this has been helpful! About "how to define differentiability on manifolds with corners", Lean's answer is "use the model with corners (and consider extended charts)", and then it boils down to differentiability between normed spaces. See e.g. docs#contMDiffAt_iff.

Michael Rothgang (Dec 30 2025 at 22:47):

By modelling a manifold on Euclidean quadrants, you're implicitly using the canonical inclusion as your model with corners --- mathlib's definition merely abstracts over this, but is not mathematically different.

Snir Broshi (Dec 31 2025 at 10:01):

Michael Rothgang said:

(There might be other such introductions; I'm not aware of them. Tell me if I have overlooked one!)

Maybe https://www.youtube.com/watch?v=deppJ2q_5a0 is helpful?

Michael Rothgang (Dec 31 2025 at 11:41):

This certainly seems helpful indeed - Heather Macbeth discussing the construction of a manifold structure on the sphere. Thanks for finding this video.

Jérôme Hofstetter (Jan 04 2026 at 22:28):

seeing a concrete example was helpful to conceptualizing it in lean, tho I was wondering how specifically the boundaries are treated. By my understanding it just adds some bookkeeping and differentiability at the boundary just needs in that one direction to have a directional derivative

Jérôme Hofstetter (Jan 05 2026 at 15:52):

trying to follow the book ive noticed the resemblance to the structure I've seen in the slides, from the slide 15, H=EΛ+,E=EH=E^+_{\Lambda}, E=E and the continuous map in the book is always just the inclusion
but I'm unable to see in the book (and in lean aswell, but thisi can attribute to not being familiar with lean at all) how differentiability at the boundaries is defined unless I missed an argument or it implicitly asks for an extension to exist that is then differentiable. (the definition im familiar with is just the frechet derivative, for a function with an open subset as domain)

I can imagine just asking the function to fulfill differentiability on the interior (relative to the ambient space) but I'm not familiar if with this something fails to hold. Or asking that there exists an extension to an open cover of the domain (i assume continuous extension, agreeing on the domain, not sure if more conditions are required) that can be differentiated. And finally taking that route it is enough to have just one such extension.

Jérôme Hofstetter (Jan 06 2026 at 14:26):

Michael Rothgang said:

I'm glad this has been helpful! About "how to define differentiability on manifolds with corners", Lean's answer is "use the model with corners (and consider extended charts)", and then it boils down to differentiability between normed spaces. See e.g. docs#contMDiffAt_iff.

i followed the equations and docs and it seems like to end up at docs#ContDiffWithinAt
trying my best to interpret the equation it seems like differentiation is not checked by asking that the iterated frechet derivative exists, but instead asks for any point to have a taylor expansion (just the existence of a sequence of multilinear maps that then summed up appropriately, plugging in h into any argument of the multilinear maps and looking at the limit as h goes to zero equals the functions evaluation at that point.

Then the taylor expansion in some way forms an extension, just agreeing at one point. It doesnt ask of it to be unique but i assume that if the domain is open and "nice" (some conditions im not familiar with) this definition of C^k via existing taylorexpansion agrees with the definition via iterated frechet derivative?

This difference i find quite fascinating, are there some sources (in literature or more lean intern) that talk about what went into this choice of definition?
i saw the text on #iteratedFDerivWithin but it doesn't end with the conclusion to then use taylor expansion existing approach.

Sébastien Gouëzel (Jan 06 2026 at 15:05):

Shameless plug: https://gouezel.pages.math.cnrs.fr/webpage/articles/calculus.pdf

Jérôme Hofstetter (Jan 06 2026 at 15:57):

Sébastien Gouëzel said:

Shameless plug: https://gouezel.pages.math.cnrs.fr/webpage/articles/calculus.pdf

thank you for sharing this is exactly what i was looking for.
to my understanding once can define taylorexpansion quite generally, i assume even on a normed ring, so could it be used to define some kind of derivative on a normed module over normed ring or a LCTVS (just formally without expecting nice properties)?

Assume something like this as been attempted.

Sébastien Gouëzel (Jan 06 2026 at 16:39):

In Mathlib, derivatives are defined in topological vector spaces, with respect to nontrivially normed fields. It would probably be possible to replace the nontrivially normed field by a normed ring, but I don't know of any interesting application.

Jérôme Hofstetter (Jan 06 2026 at 18:34):

i would then be interested what motivated the generality of I:HEI : H \rightarrow E instead of using the inclusion and a specific subset. Does it enable proofs that were not possible without this choice or just makes the definitions more elegant, having to introduce less and is in some way equivalent to just using the inclusion?

Sébastien Gouëzel (Jan 06 2026 at 19:16):

If you use always inclusion, even when the model is the whole space you would need to use the subtype corresponding to univ, and the inclusion is a nontrivial map from the subtype to the space. If you allow any map I like we do, then you can take H = E and I = id, which gives better definitional equalities in this case.

Jérôme Hofstetter (Jan 06 2026 at 19:38):

in general i assume I has to be atleast homeomorphic onto its image, are there more conditions needed (in generality) or are additional conditions required later on I to define additional constructs? Or are for example two charts being compatible in C^k sense enough but wouldnt be fulfilled unless I posesses certain conditions
essentially dividing into 3 cases,

generally intrinsic needed conditions (continuous, injective ...) , specifically extrinsic (needed properties on I such that then additional construction "makes sense" (leads to nice properties ...) and lastly implied conditions (B) when fulfilling (A) (such as B not being fulfilled would directly imply A not being fulfilled)

an example for the last case would be a group being an nonempty set as you want atleast a neutral element. But necessarily nonempty condition wouldnt be necessary. I assume this as a concrete name that I'm failing to find.

Sébastien Gouëzel (Jan 06 2026 at 20:11):

The practical condition we put on I are essentially that it is a homeomorphism on its image, which is a closed convex set. These conditions are convenient, and satisfied in all relevant examples.

Jérôme Hofstetter (Jan 06 2026 at 20:20):

to clarify the embeddinglike function I has to fulfill all :

  1. its an homeomorphism to its image
  2. the image of I has to be a closed convex set
    i wouldn't think that 1. implies 2.

Sébastien Gouëzel (Jan 06 2026 at 20:29):

Yes, 1. and 2. are independent conditions. The nice thing is, you can go and check everything for yourself in the Lean code! docs#ModelWithCorners

Michael Rothgang (Jan 06 2026 at 20:29):

See docs#ModelWithCorners to verify this yourself: indeed, these are two independent conditions.

Jérôme Hofstetter (Jan 06 2026 at 20:46):

thank you for the clarification.
I don't find lean code and docs as a beginner that much readable. It seems tho the real and complex number become exceptions to check the image to be convex while for other fields it requires I to be surjective from the start?

Ruben Van de Velde (Jan 06 2026 at 20:49):

Okay I find that hard to read and I've got years of experience with lean :sweat_smile:

Jérôme Hofstetter (Jan 06 2026 at 21:01):

im failing to find closedness condition, I probably missed it or it is a condition introduced later?

Sébastien Gouëzel (Jan 06 2026 at 21:28):

It's a consequence of the existence of the partial inverse. See docs#ModelWithCorners.isClosed_range

Michael Rothgang (Jan 06 2026 at 21:51):

Jérôme Hofstetter said:

thank you for the clarification.
I don't find lean code and docs as a beginner that much readable. It seems tho the real and complex number become exceptions to check the image to be convex while for other fields it requires I to be surjective from the start?

Manifolds in mathlib are intended to cover real, complex and p-adic manifolds. One can show (on paper) that p-adic manifolds never have boundary --- therefore, requiring directly in the mathlib definition that the range be everything in the p-adic case was deemed acceptable.

Michael Rothgang (Jan 06 2026 at 21:52):

If you wanted to do something more interesting, the question is what: the p-adic numbers are certainly not convex over the reals.


Last updated: Feb 28 2026 at 14:05 UTC