-
Notifications
You must be signed in to change notification settings - Fork 370
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
chore: use suffix ₚ
for lemmas with positivity assumptions, create aliases
#9249
Conversation
#align mul_lt_mul_of_lt_of_lt' mul_lt_mul_of_lt_of_ltₚ' | ||
|
||
alias mul_le_mul := mul_le_mul_of_le_of_leₚ' -- this name was in `Algebra.Order.Ring.Defs` | ||
alias mul_lt_mul := mul_lt_mul_of_lt_of_leₚ' -- this name was in `Algebra.Order.Ring.Defs` |
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.
These statements are not identical. mul_lt_mul
holds in a StrictOrderedSemiring
. Of course, the lemma you are aliasing holds in more generality, but it also makes Lean work harder to synthesize type classes. I am dubious whether we are actually okay with this unless I see a !bench
showing the effect is negligible.
I've highlighted mul_lt_mul
, but I suspect the same is true for many of the alias
es you have in this PR.
I've opened a Zulip thread because I think this is a somewhat significant change to our naming conventions and as such I've marked this as RFC. |
!bench |
Here are the benchmark results for commit 7559b09. |
This PR uses the suffix
ₚ
on some lemmas which assume positivity.This allows the names to be clearly distinguished from versions that do not require positivity assumptions, and also do not become too long.
I've kept most of the previous names (short names and long names suffixed with
_of_pos
or_of_nonneg
) as aliases, but not for wrong names and confusing names.Due to name conflicts, some similar lemmas have dissimilar names before this PR:
If there is a better way to resolve name conflicts, please feel free to comment.
Ported from leanprover-community/mathlib3#16523