Zulip Chat Archive
Stream: mathlib4
Topic: Capitalization of LE/Le
Jovan Gerbscheid (Oct 25 2025 at 17:50):
In mathlib there are many definitions that refer to LE/Le in their name. It would be great to make this more consistent. However it isn't quite clear to me what the rules are here.
For types we have Valuation.RankOne.rankLeOneStruct, LeOnePart VS ZeroLEOneClass, Ring.DimensionLEOne, Filter.EventuallyLE
And for definitions we have LieSubalgebra.ofLe, SimplexCategory.mkOfLe VS LocalizedModule.liftOfLE, CategoryTheory.homOfLE
Just to give a few examples.
Yury G. Kudryashov (Oct 25 2025 at 17:51):
IMHO, LE is the correct spelling if L is capitalized. See docs#ENNReal for a similar example.
Kenny Lau (Oct 25 2025 at 17:53):
while we're at it, how should we deal with LinearEquiv? Is it Lequiv or LEquiv?
Jovan Gerbscheid (Oct 25 2025 at 17:57):
cslib was having some similar problems I think :laughing:
Jovan Gerbscheid (Oct 25 2025 at 18:04):
Yury G. Kudryashov said:
IMHO,
LEis the correct spelling ifLis capitalized. See docs#ENNReal for a similar example.
I think the reason why people are discarding this rule is that they want word boundaries to be clear. ENNReal is one word and it ends in a lowercase, so there are no issues. But in LEOne, it's not clear where the word boundary is.
Ruben Van de Velde (Oct 25 2025 at 18:22):
I think a fair number of Le are incorrectly autotranslated from lean 3
Ruben Van de Velde (Oct 25 2025 at 18:22):
But your point is one reason I haven't gone after them :)
Yaël Dillies (Oct 25 2025 at 18:24):
Kenny Lau said:
while we're at it, how should we deal with LinearEquiv? Is it
LequivorLEquiv?
LinearEquiv. It shouldn't be abbreviated further!
Yaël Dillies (Oct 25 2025 at 18:25):
If that's too long, I am always open to renaming it globally to LinearIso, but that is a lot of churn.
Yury G. Kudryashov (Oct 25 2025 at 19:21):
We have quite a few definitions abbreviated like myHomCLM etc (myHom bundled as ContinuousLinearMap). Sometimes, unfolding these abbreviations result in really long names.
Junyan Xu (Oct 25 2025 at 23:47):
If that's too long, I am always open to renaming it globally to
LinearIso, but that is a lot of churn.
How about equivₗ, as ₗ is used in the notation. Also in Matrix.toLin etc. Lin is used as a shorthand for LinearMap. Should it be LM?
while we're at it, how should we deal with LinearEquiv? Is it
LequivorLEquiv?
I just found docs#finsuppLequivDFinsupp and docs#finsuppLEquivDirectSum ...
Michael Rothgang (Oct 26 2025 at 02:07):
I'll happily review a PR about these two!
Yury G. Kudryashov (Oct 26 2025 at 02:27):
About equivₗ: I think that suffixes like ₗ/L are worse than LM/CLM. I don't want to rename definitions and lemmas if we ever change notation.
Yury G. Kudryashov (Oct 26 2025 at 02:27):
(I know that I've introduced some definitions with suffixes like ₗ)
Floris van Doorn (Oct 27 2025 at 11:38):
Jovan Gerbscheid said:
I think the reason why people are discarding this rule is that they want word boundaries to be clear.
ENNRealis one word and it ends in a lowercase, so there are no issues. But inLEOne, it's not clear where the word boundary is.
to_additive special-cases such all-capital names (or names that end in a capital letter). I don't think we should necessarily avoid them.
Last updated: Dec 20 2025 at 21:32 UTC