-
Notifications
You must be signed in to change notification settings - Fork 345
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
fix: make rw [foo]
look in the local context for foo
before it looks in the environment
#2738
fix: make rw [foo]
look in the local context for foo
before it looks in the environment
#2738
Conversation
Thanks for your contribution! Please make sure to follow our Commit Convention. |
WIP |
9563e5f
to
2db94fe
Compare
|
awaiting-review |
|
||
example (A B : Prop) (foo : A ↔ B) (b : B) : A := by | ||
rw [foo] -- should be interpreted as `foo : A ↔ B`, not `foo : List Nat`, and succeed | ||
assumption |
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 we need a test that shows that we can still rewrite by the global constant, by fully specifying it (e.g. with _root_
).
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.
2db94fe
to
c0e3492
Compare
* as opposed to interpreting `foo` as a global constant
c0e3492
to
d84f159
Compare
…oks in the environment (leanprover#2738)
External Contribution Guidelines.
Fixes #2729.
This requires some changes to mathlib4 where the opposite behavior was being exploited; we now must namespace
foo
to make it refer to a constant in the environment (e.g.rw [Bar.foo]
), which has the nice side effect of making explicit whichfoo
we're referring to. See leanprover-community/mathlib4#7872.