New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - chore(Analysis/SpecificLimits/* and others): rename _0 -> _zero, _1 -> _one #10077
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me! Thanks a lot for doing it!
(tendsto_inv_atTop_zero.comp tendsto_exp_atTop).congr fun x => (exp_neg x).symm | ||
#align real.tendsto_exp_neg_at_top_nhds_0 Real.tendsto_exp_neg_atTop_nhds_0 | ||
#align real.tendsto_exp_neg_at_top_nhds_0 Real.tendsto_exp_neg_atTop_nhds_zero | ||
@[deprecated] alias tendsto_exp_neg_atTop_nhds_0 := tendsto_exp_neg_atTop_nhds_zero |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know enough about @[deprecated]
: can you confirm that you don't need to put the Real namespace for this line to be effective? (in contrast to #align
which does need them)
Thanks a lot for taking care of the #align
s and @[deprecated]
by the way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it works (at least I got a bunch of warnings that stuff is deprecated).
theorem tsum_geometric_of_abs_lt_one {r : ℝ} (h : |r| < 1) : ∑' n : ℕ, r ^ n = (1 - r)⁻¹ := | ||
tsum_geometric_of_norm_lt_one h | ||
#align tsum_geometric_of_abs_lt_1 tsum_geometric_of_abs_lt_one | ||
@[deprecated] alias tsum_geometric_of_abs_lt_1 := tsum_geometric_of_abs_lt_one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes, github making our life harder with this diff. @alexjbest can you use Leaff to confirm that this PR only does what it claims to do? Can you even check the @[deprecated]
stuff does what it's supposed to do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks fine to me from a visual inspection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frankly you could leave out the deprecated lines but it's probably kinder to keep them in I guess.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine these results are likely to be used in downstream projects, and there it is nice to be told automatically after updating Mathlib that the names are now deprecated, with the offer of fixing them (rather than getting an "unknown identifier" error and having to consult the change log).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I say, it is kinder - I like that we have the option and I like that you've done it.
A clever grep search yields a few other theorem names that could receive the same treatment. # Clean output, whitelist-based
rg '^(?:protected\s+)?(?:theorem|lemma)\s+[\w_]+?(?:ge|lt|le|gt|eq|ne|at|tendsto|nhds|exp)(?<!image|[aA]lt|triangle)_?[0-5](?![0-9])' --pcre2
# More noisy, blacklist-based, but catches a few exceptions to the common patterns
rg '^(?:protected\s+)?(?:theorem|lemma)\s+[\w_]+(?<!bit|bitm|div|aleph|image|deriv|L|C|C_|[aA]ux|lem|sym|append|node|fold[lr]|[fF]in|vecAlt|Gamma|T)[0-3](?![0-9]|Space|_separation)' --pcre2 Mathlib/Analysis/ODE/Gronwall.lean
Mathlib/Logic/Function/Iterate.lean
Mathlib/RingTheory/Polynomial/Bernstein.lean
Mathlib/Algebra/GroupWithZero/Basic.lean
Mathlib/Topology/MetricSpace/Cauchy.lean
Mathlib/Topology/Instances/ENNReal.lean
Mathlib/Data/Set/Pointwise/Interval.lean
Mathlib/Analysis/Convex/Normed.lean
Mathlib/Analysis/SpecialFunctions/Log/Deriv.lean
Mathlib/Analysis/SpecialFunctions/Exp.lean
Mathlib/LinearAlgebra/Eigenspace/Minpoly.lean
Mathlib/Analysis/SpecificLimits/Normed.lean
Mathlib/Analysis/SpecificLimits/Basic.lean
Mathlib/Data/Complex/Exponential.lean
Mathlib/RingTheory/UniqueFactorizationDomain.lean
Mathlib/AlgebraicTopology/ExtraDegeneracy.lean
|
@adri326 I'll leave cleaning up the remaining ones to somebody else. This PR was enough work for me 😄 |
Polynomial.C_0 and Polynomial.C_1 should probably also be renamed. |
bors merge |
…> _one (#10077) See [here](https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/exact.3F.20failure/near/418443193) on Zulip. This PR changes a bunch of names containing `nhds_0` or/and `lt_1` to `nhds_zero` or/and `lt_one`.
Pull request successfully merged into master. Build succeeded: |
See here on Zulip.
This PR changes a bunch of names containing
nhds_0
or/andlt_1
tonhds_zero
or/andlt_one
.