-
Notifications
You must be signed in to change notification settings - Fork 441
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
feat: abbrev produces theorems where appropriate #6083
Conversation
Mathlib CI status (docs):
|
Is there any advantage of using |
Yes, we can use |
a4b2b68
to
1431cba
Compare
I'm adding the This is an intermediate measure until we decide on a unification of |
7872b4a
to
1801d74
Compare
For just offering something under a different name, I guess that can be done on the level of renaming variables.
(Likely this idiom doens't work completely the way it seems to work, e.g. across modules.) Unfortunately deprecation attributes are attached to the underlying constant, not to the alias:
If the latter could change then the whole use-case of providing alternative names could be moved from the level of definitions to the level of name resolution, which is likely more robust anyways? |
@kim-em Could you explain what the limitations of the current behavior are, i.e. Note that declarations changing their kind post-hoc can also be an issue for parallelism. |
It's not super important, but I have been trying to get the Batteries environment linter suite running on Lean itself, and all the abbrevs currently make the |
Ok, given the additional complication with parallelism, I'd prefer adjusting the linter instead |
This PR modifies the
abbrev
keyword, ensuring that it produces atheorem
when the declaration is aProp
. This is convenient for the frequent current use case ofabbrev
to set up deprecations.