refactor(Geometry/Manifold/Instances/Sphere): use mvfderiv when appropriate - #42374
Open
grunweg wants to merge 1 commit into
Open
refactor(Geometry/Manifold/Instances/Sphere): use mvfderiv when appropriate#42374grunweg wants to merge 1 commit into
grunweg wants to merge 1 commit into
Conversation
PR summary 870d68f581
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Geometry.Manifold.Instances.Sphere | 2356 | 2358 | +2 (+0.08%) |
Import changes for all files
| Files | Import difference |
|---|---|
3 filesMathlib.Geometry.Manifold.Instances.Sphere Mathlib.Geometry.Manifold.PoincareConjecture Mathlib.Topology.Compactification.OnePoint.Sphere |
2 |
Declarations diff (regex)
+ MDifferentiableAt.mvfderiv
+ MDifferentiableWithinAt.mvfderivWithin
+ injective_mvfderiv_subtypeVal_sphere
+ range_mvfderiv_subtypeVal
You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.
Declarations diff (Lean)
✅ Lean-aware diff — post-build, computed from the Lean environment (commit
870d68f).
- +4 new declarations
- −0 removed declarations
+MDifferentiableAt.mvfderiv
+MDifferentiableWithinAt.mvfderivWithin
+injective_mvfderiv_subtypeVal_sphere
+range_mvfderiv_subtypeValDecrease in strong tech debt: (relative, absolute) = (2.00, 0.00)
| Current number | Change | Type (strong) |
|---|---|---|
| 7094 | -2 | backward.isDefEq.respectTransparency |
Current commit 870d68f581
Reference commit 5eec30bc56
This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
grunweg
commented
Aug 2, 2026
|
|
||
| -- TODO: rephrase this using `mvfderiv`, avoiding the defeq abuse | ||
| -- Without this option, the lemmas `EmbeddingLike.map_eq_zero_iff` and `Submodule.range_subtype` | ||
| -- are not applied by simp. |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| -- are not applied by simp. | |
| -- are not applied by simp below. |
grunweg
commented
Aug 2, 2026
| HasFDerivAt (stereoInvFunAux (-v : E) ∘ (Subtype.val : (ℝ ∙ (↑(-v) : E))ᗮ → E)) | ||
| (ℝ ∙ (↑(-v) : E))ᗮ.subtypeL (U.symm 0) := by | ||
| convert! hasFDerivAt_stereoInvFunAux_comp_coe (-v : E) | ||
| simp |
Contributor
Author
There was a problem hiding this comment.
This is the first location needing backcompat options (for reasons independent of this PR).
grunweg
commented
Aug 2, 2026
| convert! | ||
| (U.symm : EuclideanSpace ℝ (Fin n) ≃ₗᵢ[ℝ] (ℝ ∙ (↑(-v) : E))ᗮ).range_comp | ||
| (ℝ ∙ (↑(-v) : E))ᗮ.subtype using 1 | ||
| simp only [Submodule.range_subtype, coe_neg_sphere] |
Contributor
Author
There was a problem hiding this comment.
This is the second one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a TODO in the file, and some pre-existing defeq abuse.
While at it, rename the affected lemmas to follow the naming convention.
There is some remaining defeq abuse in the proofs, which we comment on and localise more.
While at it, we also remove three defeq abuse options which are simply superfluous now.