Skip to content
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

jump-to-definition for instances to parent classes #3063

Closed
1 task
fpvandoorn opened this issue Dec 13, 2023 · 0 comments · Fixed by #6487
Closed
1 task

jump-to-definition for instances to parent classes #3063

fpvandoorn opened this issue Dec 13, 2023 · 0 comments · Fixed by #6487
Labels
bug Something isn't working server Affects the Lean server code

Comments

@fpvandoorn
Copy link
Contributor

Prerequisites

  • Put an X between the brackets on this line if you have done all of the following:
    • Check that your issue is not already filed.
    • Reduce the issue to a minimal, self-contained, reproducible test case. Avoid dependencies to mathlib4 or std4.

Description

Jump-to-definition doesn't work for automatically generated instances to parent classes, see the MWE below.

class MySemigroup (G : Type u) extends Mul G where
  mul_assoc : ∀ a b c : G, a * b * c = a * (b * c)

class MyMulComm (G : Type u) extends Mul G where
  mul_comm : ∀ a b : G, a * b = b * a

class MyCommSemigroup (G : Type u) extends MySemigroup G, MyMulComm G

#check MySemigroup -- jump to definition works
#check MySemigroup.mul_assoc -- jump to definition works
#check MySemigroup.toMul -- jump to definition doesn't work
#check MyCommSemigroup.toMySemigroup -- jump to definition doesn't work
#check MyCommSemigroup.toMyMulComm -- jump to definition doesn't work

Expected behavior: jumping to all these declarations should work with F12 (it should jump to the line containing the class (or extends) command.

Versions

4.4.0-rc1

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@fpvandoorn fpvandoorn added the bug Something isn't working label Dec 13, 2023
@mhuisi mhuisi added the server Affects the Lean server code label Dec 21, 2023
kmill added a commit to kmill/lean4 that referenced this issue Dec 31, 2024
… information

This PR adds source position information for `structure` parent projections, supporting "go to definition". Closes leanprover#3063.
github-merge-queue bot pushed a commit that referenced this issue Dec 31, 2024
… information (#6487)

This PR adds source position information for `structure` parent
projections, supporting "go to definition". Closes #3063.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working server Affects the Lean server code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants