Skip to content

Add Inhabited and BEq instances for Sigma types#5

Open
nek0las wants to merge 1 commit intorems-project:mainfrom
nek0las:sigma-type-support
Open

Add Inhabited and BEq instances for Sigma types#5
nek0las wants to merge 1 commit intorems-project:mainfrom
nek0las:sigma-type-support

Conversation

@nek0las
Copy link
Copy Markdown

@nek0las nek0las commented Mar 25, 2026

Required to support the Sail Lean backend's existential type translation, where Sail constructs like {'n, 'n in {16,32}. (int('n), bits('n))} are represented as Lean Sigma types. Without Inhabited (Sigma β), AST types containing existential fields (e.g. union variants with constrained bitvector widths) fail to derive Inhabited, which is needed for the generated Lean code to compile.

Repr is omitted as it already exists in the Lean standard library.

Required to support the Sail Lean backend's existential type translation,
where Sail constructs like `{'n, 'n in {16,32}. (int('n), bits('n))}` are
represented as Lean Sigma types. Without `Inhabited (Sigma β)`, AST types
containing existential fields (e.g. union variants with constrained bitvector
widths) fail to derive `Inhabited`, which is needed for the generated Lean code
to compile.

`Repr` is omitted as it already exists in the Lean standard library.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant