-
Notifications
You must be signed in to change notification settings - Fork 449
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: allow dot idents to resolve to local names #6602
Conversation
Mathlib CI status (docs):
|
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.
(nevermind, looks like there is more work to be done)
This causes breakage in Batteries and Mathlib due to code such as https://github.com/leanprover-community/batteries/blob/66225aab4f6bd1687053b03916105f7cab140507/Batteries/Data/UnionFind/Lemmas.lean#L100-L101 which rely on the dot ident not resolving to the current definition. This can easily be fixed by using |
Thanks for the investigation. Can you add this analysis to #6601, ideally with a self-contained example of the idiom that this fix would be breaking (so that we can use it for the test suite)? Under which circumstaces can Also, if possible, contrast the behavior with the |
changelog-language |
Please ping me here once mathlib is green (this likely requires pinning the mathlib adaption branch to the fixed batteries branch that you created, but should be possible) |
If you are fixing Mathlib, would you please avoid introducing more |
@nomeata I made |
* chore: bump to nightly-2024-12-23 * chore: adaptations for nightly-2024-12-23 (#20196) Co-authored-by: Kim Morrison <[email protected]> Co-authored-by: leanprover-community-mathlib4-bot <[email protected]> Co-authored-by: Mario Carneiro <[email protected]> Co-authored-by: Junyan Xu <[email protected]> Co-authored-by: Ruben Van de Velde <[email protected]> Co-authored-by: Mitchell Lee <[email protected]> Co-authored-by: Joël Riou <[email protected]> Co-authored-by: Christian Merten <[email protected]> Co-authored-by: Artie Khovanov <[email protected]> Co-authored-by: Eric Wieser <[email protected]> Co-authored-by: Eric Wieser <[email protected]> * fix * chore: bump to nightly-2024-12-24 * Merge master into nightly-testing * chore: bump to nightly-2024-12-25 * Merge master into nightly-testing * chore: bump to nightly-2024-12-26 * chore: bump to nightly-2024-12-27 * Merge master into nightly-testing * chore: bump to nightly-2024-12-28 * Merge master into nightly-testing * fix * fix * fix * chore: bump to nightly-2024-12-29 * Merge master into nightly-testing * deprecations * revert * revert * revert * Update lean-toolchain for testing leanprover/lean4#6473 * remove DeriveToExpr * Trigger CI for leanprover/lean4#6473 * fix * chore: bump to nightly-2024-12-30 * Merge master into nightly-testing * Trigger CI for leanprover/lean4#6473 * chore: bump to nightly-2024-12-31 * Merge master into nightly-testing * chore: bump to nightly-2025-01-01 * Merge master into nightly-testing * chore: bump to nightly-2025-01-02 * fix * partial fix * fix hopefully * chore: adaptations for nightly-2025-01-02 * chore: bump to nightly-2025-01-03 * chore: adaptations for nightly-2025-01-03 * chore: bump to nightly-2025-01-04 * fixes * shake --update * chore: bump to nightly-2025-01-05 * Merge master into nightly-testing * chore: bump to nightly-2025-01-06 * bump batteries * chore: bump to nightly-2025-01-07 * chore: bump to nightly-2025-01-08 * chore: bump to nightly-2025-01-09 * bump batteries * bump deps * fix * chore: adaptations for nightly-2025-01-09 * chore: bump to nightly-2025-01-10 * remove upstreamed * Update lean-toolchain for testing leanprover/lean4#6602 * Trigger CI for leanprover/lean4#6602 * fix breakage caused by leanprover/lean4#6602 * chore: adaptations for nightly-2025-01-10 * fix merge * avoid nonrec for leanprover/lean4#6602 * Trigger CI for leanprover/lean4#6602 * chore: bump to nightly-2025-01-14 * bump * fixes * fixes * fixes * chore: bump to nightly-2025-01-15 * fix * empty commit to bump CI * Update lean-toolchain for testing leanprover/lean4#6660 * fixes for leanprover/lean4#6660 * chore: bump to nightly-2025-01-16 * fix * move batteries back to nightly-testing * move batteries back to nightly-testing --------- Co-authored-by: leanprover-community-mathlib4-bot <[email protected]> Co-authored-by: Johan Commelin <[email protected]> Co-authored-by: Mario Carneiro <[email protected]> Co-authored-by: Junyan Xu <[email protected]> Co-authored-by: Ruben Van de Velde <[email protected]> Co-authored-by: Mitchell Lee <[email protected]> Co-authored-by: Joël Riou <[email protected]> Co-authored-by: Christian Merten <[email protected]> Co-authored-by: Artie Khovanov <[email protected]> Co-authored-by: Eric Wieser <[email protected]> Co-authored-by: Eric Wieser <[email protected]> Co-authored-by: Kyle Miller <[email protected]> Co-authored-by: Parth Shastri <[email protected]>
This PR allows the dot ident notation to resolve to the current definition, or to any of the other definitions in the same mutual block. Existing code that uses dot ident notation may need to have
nonrec
added if the ident has the same name as the definition.Closes #6601