You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reduce the issue to a minimal, self-contained, reproducible test case. Avoid dependencies to mathlib4 or std4.
Description
The following Lean 4 code produces an error:
classAclassBclassC [A] extends B
classDextends A, B, C
-- ^ (kernel) declaration has free variables 'D.toC'
Context
This came about when I was defining my own classes for abstract algebra, which heavily build on other classes and use extends to minimize field repetition caused by inheritance diamonds.
Steps to Reproduce
Write the code above into a Lean file
Attempt to compile it
Expected behavior: No error.
Actual behavior: The type checker gives the described error.
Versions
Lean (version 4.3.0-nightly-2023-10-01, commit e6292bc, Release) on Linux 6.3.13
…ances
This PR fixes a bug with the `structure` command where if there were parents that are not represented as subobjects but which used other parents as instances, then there would be a kernel error. Closesleanprover#2611.
…ances
This PR fixes a bug with the `structure` command where if there were parents that are not represented as subobjects but which used other parents as instances, then there would be a kernel error. Closesleanprover#2611.
…ances (#6175)
This PR fixes a bug with the `structure`/`class` command where if there
are parents that are not represented as subobjects but which used other
parents as instances, then there would be a kernel error. Closes#2611.
Note: there is still the limitation that parents that are not
represented as subobjects do not themselves provide instances to other
parents.
Prerequisites
Description
The following Lean 4 code produces an error:
Context
This came about when I was defining my own classes for abstract algebra, which heavily build on other classes and use
extend
s to minimize field repetition caused by inheritance diamonds.Steps to Reproduce
Expected behavior: No error.
Actual behavior: The type checker gives the described error.
Versions
Lean (version 4.3.0-nightly-2023-10-01, commit e6292bc, Release) on Linux 6.3.13
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: