Skip to content

[Merged by Bors] - feat: add ContMDiff.congr#28527

Closed
grunweg wants to merge 1 commit intoleanprover-community:masterfrom
grunweg:diffgeo-misc
Closed

[Merged by Bors] - feat: add ContMDiff.congr#28527
grunweg wants to merge 1 commit intoleanprover-community:masterfrom
grunweg:diffgeo-misc

Conversation

@grunweg
Copy link
Copy Markdown
Contributor

@grunweg grunweg commented Aug 16, 2025

I wanted this lemma both while working on an early version of #28056 and while working on #23040: time to add it.
Besides, it fills a natural API gap.


Open in Gitpod

@grunweg grunweg requested a review from sgouezel August 16, 2025 18:07
@grunweg grunweg added the easy < 20s of review time. See the lifecycle page for guidelines. label Aug 16, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 16, 2025

PR summary ba1699697a

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ ContMDiff.congr
+ contMDiff_congr

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).

@github-actions github-actions bot added the t-differential-geometry Manifolds etc label Aug 16, 2025
@peabrainiac
Copy link
Copy Markdown
Collaborator

You could golf this by one line by proving ContMDiff.congr using contMDiff_congr - but either way, looks good to me. I'm a bit surprised that we're phrasing equality of functions as ∀ y, f₁ y = f y instead of f₁ = f here, but Continuous.congr also does it, so it makes sense to stay consistent.

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Aug 17, 2025

You're right about the golf, good catch!
About the function equality: in general, there is a difference for dependent functions (e.g., sections of a vector bundle): saying f = g makes it not apply to dependent functions. In this case, that's probably no problem (as ContMDiff requires non-dependent functions anyway, and e.g. using TotalSpace.mk(') to turn a section into a function into the total space).

At the same time, staying consistent is good: if we wanted to change this, that should be a separate PR changing all such lemmas.

I wanted this lemma both while working on an early version of leanprover-community#28056
and while working on leanprover-community#23040: time to add it.
Besides, it fills a natural API gap.
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Oct 1, 2025

Let's hope rebasing fixes the CI error!

@sgouezel
Copy link
Copy Markdown
Contributor

sgouezel commented Oct 2, 2025

bors r+

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Oct 2, 2025
mathlib-bors bot pushed a commit that referenced this pull request Oct 2, 2025
I wanted this lemma both while working on an early version of #28056 and while working on #23040: time to add it.
Besides, it fills a natural API gap.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 2, 2025

Pull request successfully merged into master.

Build succeeded:

  • CI Success

@mathlib-bors mathlib-bors bot changed the title feat: add ContMDiff.congr [Merged by Bors] - feat: add ContMDiff.congr Oct 2, 2025
@mathlib-bors mathlib-bors bot closed this Oct 2, 2025
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Oct 2, 2025
I wanted this lemma both while working on an early version of leanprover-community#28056 and while working on leanprover-community#23040: time to add it.
Besides, it fills a natural API gap.
mitchell-horner pushed a commit to mitchell-horner/mathlib4 that referenced this pull request Oct 6, 2025
I wanted this lemma both while working on an early version of leanprover-community#28056 and while working on leanprover-community#23040: time to add it.
Besides, it fills a natural API gap.
BeibeiX0 pushed a commit to BeibeiX0/mathlib4 that referenced this pull request Nov 7, 2025
I wanted this lemma both while working on an early version of leanprover-community#28056 and while working on leanprover-community#23040: time to add it.
Besides, it fills a natural API gap.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

easy < 20s of review time. See the lifecycle page for guidelines. 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.

3 participants