Skip to content

[Merged by Bors] - feat: smooth immersions#28793

Closed
grunweg wants to merge 140 commits intoleanprover-community:masterfrom
grunweg:def-immersions
Closed

[Merged by Bors] - feat: smooth immersions#28793
grunweg wants to merge 140 commits intoleanprover-community:masterfrom
grunweg:def-immersions

Conversation

@grunweg
Copy link
Copy Markdown
Contributor

@grunweg grunweg commented Aug 23, 2025

Define smooth immersions between manifolds. We use a definition which allows for corners, infinite dimension and arbitrary fields. This matches the mathematical literature for e.g. real Banach manifolds with corners (even though there is no textbook treating manifolds as general as mathlib's).

This PR provides four central definitions: being an immersion at a point, and being an immersion everywhere,
plus a variant of these with a fixed complement. (Being an immersion at a point is a property with respect to some choice of complement in the model normed space of the codomain. In most applications, there is no need to control this complement. Such control will be helpful, however, when considering the local characterisation of submanifolds: locally, a submanifold is described either as the image of an immersion, or the preimage of a submersion --- w.r.t. the same complement. Having access to a definition version with complements allows stating this equivalence cleanly.

This PR only provides the basic API to keep its size (relatively) small. Future PRs will add more substance, and


Most of the above has been done at https://github.com/grunweg/mathlib4/tree/MR-define-immersions.

Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 23, 2025

PR summary 1159dce834

Import changes for modified files

No significant changes to the import graph
M scripts/count-trans-deps.py
M scripts/count-trans-deps.py
M scripts/count-trans-deps.py

Import changes for all files
Files Import difference
Mathlib.Geometry.Manifold.LocalSourceTargetProperty (new file) 1566
Mathlib.Geometry.Manifold.Immersion (new file) 1945

Declarations diff

+ ImmersionAtProp
+ IsImmersion
+ IsImmersionOfComplement
+ IsLocalSourceTargetProperty
+ LiftSourceTargetPropertyAt
+ LocalPresentationAt
+ instance (h : IsImmersion I J n f) : NormedAddCommGroup h.complement
+ instance (h : IsImmersion I J n f) : NormedSpace 𝕜 h.complement
+ instance (h : IsImmersionAt I J n f x) : NormedAddCommGroup h.complement := by
+ instance (h : IsImmersionAt I J n f x) : NormedSpace 𝕜 h.complement := by
+ instance (hf : IsImmersionAtOfComplement F I J n f x) : NormedAddCommGroup hf.smallComplement := by
+ instance (hf : IsImmersionAtOfComplement F I J n f x) : NormedSpace 𝕜 hf.smallComplement := by
+ isImmersion
+ isImmersionAtOfComplement_complement
+ isImmersionOfComplement_complement
+ isLocalSourceTargetProperty_immersionAtProp
+ localPresentationAt
+ small
+ smallComplement
+ smallEquiv
++ complement
++ congr
++ congr_F
++ congr_iff
++ congr_iff_of_eventuallyEq
++ equiv
++ map_target_subset_target
++ mk_of_charts
++ target_subset_preimage_target
++ trans_F
++ writtenInCharts
+++ codChart
+++ codChart_mem_maximalAtlas
+++ congr_of_eventuallyEq
+++ domChart
+++ domChart_mem_maximalAtlas
+++ isImmersionAt
+++ mem_codChart_source
+++ mem_domChart_source
+++ mk_of_continuousAt
+++ property
+++ source_subset_preimage_source

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@grunweg grunweg changed the title Def immersions feat: smooth immersions Aug 23, 2025
@grunweg grunweg force-pushed the def-immersions branch 2 times, most recently from 6829f56 to 85f7eb6 Compare August 23, 2025 08:05
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Aug 23, 2025
@grunweg grunweg added the t-differential-geometry Manifolds etc label Aug 23, 2025
mathlib-bors bot pushed a commit that referenced this pull request Sep 8, 2025
If `G` is a `StructureGroupoid` that is `ClosedUnderRestriction`,
if `e` is a chart in the maximal atlas of `G`, then so is any restriction `e.restr s` to an open set `s`.

In #28793, I will use this to give a more natural constructor for "f is an immersion at x".
From the path towards smooth immersions, embeddings and embedded submanifolds.

Co-authored-by: Michael Rothgang <rothgang@math.uni-bonn.de>
mathlib-bors bot pushed a commit that referenced this pull request Sep 8, 2025
If `G` is a `StructureGroupoid` that is `ClosedUnderRestriction`,
if `e` is a chart in the maximal atlas of `G`, then so is any restriction `e.restr s` to an open set `s`.

In #28793, I will use this to give a more natural constructor for "f is an immersion at x".
From the path towards smooth immersions, embeddings and embedded submanifolds.

Co-authored-by: Michael Rothgang <rothgang@math.uni-bonn.de>
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Sep 8, 2025
yuanyi-350 pushed a commit to yuanyi-350/yuanyi_mathlib4 that referenced this pull request Sep 10, 2025
…nity#28701)

If `G` is a `StructureGroupoid` that is `ClosedUnderRestriction`,
if `e` is a chart in the maximal atlas of `G`, then so is any restriction `e.restr s` to an open set `s`.

In leanprover-community#28793, I will use this to give a more natural constructor for "f is an immersion at x".
From the path towards smooth immersions, embeddings and embedded submanifolds.

Co-authored-by: Michael Rothgang <rothgang@math.uni-bonn.de>
robertmaxton42 pushed a commit to robertmaxton42/mathlib4 that referenced this pull request Sep 11, 2025
…nity#28701)

If `G` is a `StructureGroupoid` that is `ClosedUnderRestriction`,
if `e` is a chart in the maximal atlas of `G`, then so is any restriction `e.restr s` to an open set `s`.

In leanprover-community#28793, I will use this to give a more natural constructor for "f is an immersion at x".
From the path towards smooth immersions, embeddings and embedded submanifolds.

Co-authored-by: Michael Rothgang <rothgang@math.uni-bonn.de>
@sgouezel
Copy link
Copy Markdown
Contributor

Nice, thanks!

@sgouezel sgouezel added the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 16, 2025
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Oct 1, 2025

@chrisflav I just pushed a first version using local properties to abstract some of the proofs. (They do indeed become a bit clearer.) What do you think?

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Oct 1, 2025

(Obviously, this needs to be added to the module doc-string: I'll do that after lunch.)

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Nov 26, 2025

Thanks for your comments; all addressed!

Feel free to list missing API lemmas and I'll be happy to add them in a future PR!

Copy link
Copy Markdown
Contributor

@sgouezel sgouezel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you included the lemma saying that IsImmersionAtOfComplement implies IsImmersionAt? I thought it was the goal of all the small business, but I can't find it.

@sgouezel sgouezel added the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 27, 2025
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Nov 27, 2025

The initial motivation for all the Small stuff was to make the constructions mk_of_charts and mk_of_continuousAt for immersions truly usable (by allowing a complement in any universe). I agree that the lemma you pointed out was sorely missing, though, and added it now.

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Nov 27, 2025

Should there be an "implementation notes" section describing the universe issues in some detail? (Is there anything else missing for this to get merged?)

@sgouezel sgouezel removed the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 28, 2025
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Nov 28, 2025

And this PR is definitely also missing IsImmersionOfComplement.isImmersion; I'll add that in a moment.

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Nov 28, 2025

Added that: this exposed some more missing API which I also just added.

The proof for the case "M is empty" is a bit awkward because we need to provide a dummy type in the existential. It's not obvious, however, to provide API similar to smallEquiv and smallComplement for IsImmersionOfComplement --- the definitions at a point use the equivalence we have there, which we cannot do as we only have a equivalence at some point. For the empty type the immersion property is vacuously true, but finding a complement in the right universe is a bit annoying.

Update: the empty case proved fine after all, we already have a NormedSpace instance on PUnit.

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Nov 28, 2025

I just add two paragraphs of implementation notes and augmented the PR description.

@sgouezel
Copy link
Copy Markdown
Contributor

Great. Let's get this in. Thanks a lot for all the time you spent on this, and bearing with all our comments!
bors r+

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Nov 28, 2025
mathlib-bors bot pushed a commit that referenced this pull request Nov 28, 2025
Define smooth immersions between manifolds. We use a definition which allows for corners, infinite dimension and arbitrary fields. This matches the mathematical literature for e.g. real Banach manifolds with corners (even though there is no textbook treating manifolds as general as mathlib's).

This PR provides four central definitions: being an immersion at a point, and being an immersion everywhere,
plus a variant of these with a fixed complement. (Being an immersion at a point is a property with respect to some choice of complement in the model normed space of the codomain. In most applications, there is no need to control this complement. Such control will be helpful, however, when considering the local characterisation of submanifolds: locally, a submanifold is described either as the image of an immersion, or the preimage of a submersion

Co-authored-by: Christian Merten <christian@merten.dev>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 28, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: smooth immersions [Merged by Bors] - feat: smooth immersions Nov 28, 2025
@mathlib-bors mathlib-bors bot closed this Nov 28, 2025
@grunweg grunweg deleted the def-immersions branch November 28, 2025 20:48
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Nov 28, 2025

Thanks a lot, @sgouezel and @chrisflav for the very detailed and meticulous reviews! While this process took a while, I feel the process was clearly worth it --- I learned a lot from your comments and the final result is much better because of it. Thanks in particular for doing the final review rounds this quickly, this is much appreciated.

This PR is (of course) only the first step towards submanifolds in mathlib. I hope the subsequent PRs can be split among more reviewers. (Of course, you're welcome to review as many of them as you like.)

mathlib-bors bot pushed a commit that referenced this pull request Nov 30, 2025
…pen (#30356)

Prove an API lemma which `chrisflav` requested in #28793, which was split from that PR to keep the diff smaller.
@grunweg grunweg mentioned this pull request Nov 30, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-differential-geometry Manifolds etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants