[Merged by Bors] - chore: rename declarations whose names do not match their statements - #44051
Multramate wants to merge 3 commits into
Conversation
These old names are well-formed and pronounceable - there is no misspelling to spot - they simply say the wrong thing, so each one needs the statement read. That is fine for six and intolerable interleaved with fifty others, which is why they are split out of leanprover-community#43889. - `coeff_isPWOsupport` -> `isPWO_support_coeff`: the conclusion really is `IsPWO (support (coeff ..))`. - `contmdiffOn_localInverse` -> `localInverse_contMDiffOn`. - `preserveFiniteLimits_plusFunctor` -> `preservesFiniteLimits_plusFunctor`: the verb tracks the head symbol `PreservesFiniteLimits`. - `tendsto_of_uncrossing_lt_top` -> `tendsto_of_upcrossings_lt_top`: wrong word and wrong number, checked against the hypothesis `upcrossings a b f w`. - `substr_num_den'` -> `sub_num_den'`: the statement is subtraction, and the new name matches the neighbouring `add_num_den'`. - `nneg_mul_add_sq_of_abs_le_one` -> `nonneg_mul_add_sq_of_abs_le_one`. `localInverse_contMDiffOn` already existed further down `Mathlib/Geometry/Manifold/LocalDiffeomorph.lean` with a byte-identical statement and proof; this moves the lemma above its first use and drops the duplicate, so the rename can take the name.
PR summary 8083eb1ba6Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
grunweg
left a comment
There was a problem hiding this comment.
Thanks! A few minor comments. Please also update the PR description accordingly.
| rw [← divInt_eq_div] | ||
|
|
||
| theorem substr_num_den' (q r : ℚ) : | ||
| theorem sub_num_den' (q r : ℚ) : |
There was a problem hiding this comment.
Let me flag this for a second pair of eyes.
There was a problem hiding this comment.
I think this is fine? It's literally subtraction (apparently spelt substraction here for whatever reason), and there are already add_num_den and mul_num_den, etc.
- Drop the deprecated alias for `preserveFiniteLimits_plusFunctor`. It is an instance, so it is found by typeclass resolution rather than by name, and nothing in Mathlib refers to it by name. - Use `contMDiffOn_localInverse` rather than `localInverse_contMDiffOn`, as requested. `localInverse_contMDiffOn` exists on master, so it is deprecated to the new name alongside the misspelled `contmdiffOn_localInverse`. - Follow the same order for the two neighbouring lemmas: `localInverse_contMDiffAt` -> `contMDiffAt_localInverse` and `localInverse_mdifferentiableAt` -> `mdifferentiableAt_localInverse`, both deprecated, with their use sites updated. The review suggested `mdifferentiableAt_contMDiffAt` for the last of these, but the statement is `MDiffAt hf.localInverse (f x)` - about the local inverse, not about `contMDiffAt` - so `mdifferentiableAt_localInverse` is used instead, matching the other two. `sub_num_den'` is left as is: the statement is subtraction, it sits directly below `add_num_den'` and `mul_num_den'`, its proof goes via `add_num_den'`, and no `sub_num_den`/`sub_num_den'` exists anywhere else.
The previous run failed in `Test and lint` because the prebuilt artifact download returned 403, so `lake lint` rebuilt Mathlib from source and hit the 10-minute timeout twice. No linter finding was reported. Empty commit to get a clean run.
|
Thanks! I have drastically shortened the PR description. (Can you take that into account for the next PRs, please?) With that fixed, I think this PR is good to go. |
…44051) The lemmas about `IsLocalDiffeomorphAt.localInverse` simply were in the wrong order: they should say `continuous_localInverse` etc. instead of `localInverse_continuous`. In some cases, both variants already existed (so we deprecated the wrongly named one). Split out of #43889. Written with the assistance of Claude (Claude Code).
|
Pull request successfully merged into master. Build succeeded: |
…eanprover-community#44051) The lemmas about `IsLocalDiffeomorphAt.localInverse` simply were in the wrong order: they should say `continuous_localInverse` etc. instead of `localInverse_continuous`. In some cases, both variants already existed (so we deprecated the wrongly named one). Split out of leanprover-community#43889. Written with the assistance of Claude (Claude Code).
The lemmas about
IsLocalDiffeomorphAt.localInversesimply were in the wrong order: they should saycontinuous_localInverseetc. instead oflocalInverse_continuous. In some cases, both variants already existed (so we deprecated the wrongly named one).Split out of #43889.
Written with the assistance of Claude (Claude Code).
Unlike the other parts of the split, these old names are well-formed and pronounceable — there is no misspelling to spot. They simply say the wrong thing, so each one needs its statement read.
coeff_isPWOsupport→isPWO_support_coeff— the conclusion really isIsPWO (support (coeff ..))preserveFiniteLimits_plusFunctor→preservesFiniteLimits_plusFunctor— the verb tracks the head symbolPreservesFiniteLimitstendsto_of_uncrossing_lt_top→tendsto_of_upcrossings_lt_top— wrong word and wrong number, checked against the hypothesisupcrossings a b f wsubstr_num_den'→sub_num_den'nneg_mul_add_sq_of_abs_le_one→nonneg_mul_add_sq_of_abs_le_onelemmas
contmdiffOn_localInverse→contMDiffOn_localInverse, and for consistency the two lemmas below it take the same order:localInverse_contMDiffAt→contMDiffAt_localInverseandlocalInverse_mdifferentiableAt→mdifferentiableAt_localInverse. All three old names are deprecated and their use sites updated.localInverse_contMDiffOnalready existed further down the file with a byte-identical statement and proof. The duplicate is dropped and the lemma moved above its first use, so that name is deprecated tocontMDiffOn_localInversetoo.The review suggested
mdifferentiableAt_contMDiffAtfor the third of these. Its statement isMDiffAt hf.localInverse (f x)— about the local inverse, not aboutcontMDiffAt— somdifferentiableAt_localInverseis used instead, matching the other two. Happy to change it if the original was meant literally.Notes on the review
preserveFiniteLimits_plusFunctorgets no deprecated alias: it is an instance, so it is found by typeclass resolution rather than by name, and nothing in Mathlib refers to it by name.sub_num_den'is left as proposed. The statement is(q - r).num * q.den * r.den = (q.num * r.den - r.num * q.den) * (q - r).den, which is genuinely subtraction; it sits directly belowadd_num_den'andmul_num_den'and its proof goes viaadd_num_den'andsub_eq_add_neg; and nosub_num_denorsub_num_den'exists anywhere else in Mathlib or the toolchain, so there is no collision.(see #44049, #44050 and #44052 for the other parts).