leanprover-community / leanprover-community/lean
old_structure_cmd cannot extend structures with subobjects
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 434
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
class A : Type :=
(B : true)
class C extends A :=
(D : true)
set_option old_structure_cmd true
class E extends C :=
(F : true)
#print E
/-
@[class]
inductive E : Type
constructors:
E.mk : Π [_to_A : A], true → true → E
-/
def G : E :=
{ B := trivial,
D := trivial,
F := trivial }
/-
invalid structure value {...}, expected type is known, but it is not a structure
E
-/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproducer in the issue: define A, C, and E using old_structure_cmd, then inspect the #print E output and the failing structure literal for G. The work is done when E can be initialized with B, D, and F as shown, with coverage for extending a structure that has subobjects.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100