lean4-htt/tests/lean/run/5417.lean
Kyle Miller 96adf04a62
fix: reduce parents in structure command (#5511)
Makes it possible to `extend` another structure through an abbreviation.
Also inserts a `withSynthesize` checkpoint for parents.

Closes #5417
2024-09-29 02:15:07 +00:00

26 lines
474 B
Text

/-!
# Reduce parents in structure `extends` clause
-/
structure A
abbrev B := A
/-!
This already worked before the fix. Structure instances unfold the expected type.
-/
/-- info: { } : A -/
#guard_msgs in #check { : B}
/-!
This is now allowed. The parent `B` is unfolded.
-/
structure C extends B
/-- info: { } : C -/
#guard_msgs in #check { : C}
/-!
Note that the parent projection is for `A`, not `B`.
-/
/-- info: C.toA (self : C) : A -/
#guard_msgs in #check C.toA