Skip to content

Sort-polymorphic Bool fails with obscure error message #14904

Closed

Description

@AndrasKovacs

From the following code under 4.34.0-rc1

set_option bootstrap.inductiveCheckResultingUniverse false

inductive Bool2 : Sort u where
  | true
  | false

I get the error message

Unknown constant `Bool2.ctorIdx`

I arrived at this case while looking at the kernel arena tutorial which prominently uses sort-polymorphic unit and product types, and trying to figure out the general behavior.

#7637 possibly related.

Activity

  1. added
    bug
    on Aug 24, 2026
  2. nomeata commented on Aug 24, 2026

    @nomeata
    Collaborator

    I'm having a look. But note that the elaborator may allow less than the kernel does, so for better experiments use run_meta and addDecl directly. https://github.com/leanprover/lean-kernel-arena/blob/master/tutorial/Tutorial.lean and the Meta.lean file may be helpful

  3. added a commit that references this issue on Aug 25, 2026
    0dc10a4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions