lean4-htt/tests/elab/issue13373.lean
Joachim Breitner 86579c8e24
fix: generate SizeOf spec theorems for inductives with private constructors (#13374)
This PR fixes `SizeOf` instance generation for public inductive types
that have
private constructors. The spec theorem proof construction needs to
unfold
`_sizeOf` helper functions which may not be exposed in the public view,
so
we use `withoutExporting` for the proof construction and type check.

Closes #13373

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 12:00:51 +00:00

10 lines
269 B
Text

module
-- Issue #13373: SizeOf derivation fails for public inductive with private constructor
public inductive Tag where
| provided
| private external
/-- info: Tag.provided.sizeOf_spec : sizeOf Tag.provided = 1 -/
#guard_msgs in
#check @Tag.provided.sizeOf_spec