Test "other/inductive-undeclared-universe"
Expected: ✋ reject · Size: 2.5 KB · Lines: 42 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration
An inductive type whose type mentions a universe parameter it does not declare.
The export declares, in this order:
inductive U : Sort uwith constructorsU.a U.b : Uand its recursor intoProp, withlevelParams: []everywhere:uis not a parameter of the block;def P.{u} : Sort u := U, which does declareu, so the freeuin the type ofUis read asP's own parameter;theorem pa : P.{0} := U.aandtheorem pb : P.{0} := U.b.
At u := 0 the type U becomes a proposition with two distinct proofs.
The elimination restriction still holds (the recursor only eliminates into
Prop), so this file does not lead to False, but every declaration after
U is checked against a type that has no fixed universe.
A checker must reject U itself: the universe parameters occurring in the
types of an inductive block and its constructors must be among the block's
levelParams, exactly as for definitions, theorems and axioms. The official
kernel rejects with invalid reference to undefined universe level parameter
'u'.
Nanoda, nanoclo and nanobruijn accepted this export. Found by differential fuzzing of export checkers against the official kernel.
| Checker | Result | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| logos-kernel | ✋ | 0.403 ms | 3.2 MB | |||
| nano-lean | ✋ | 0.502 ms | 13.7 MB | |||
| sokonanoda | ✋ | 0.618 ms | 17.8 MB | |||
| pestka | ✋ | 0.735 ms | 10.5 MB | |||
| kefir | ✋ | 0.415 ms | 5.0 MB | |||
| nanoclo | ✋ | 0.655 ms | 45.5 MB | |||
| kefir-wasm | ✋ | 92.7 ms | 81.0 MB | |||
| con-ron | ✋ | 22.0 ms | 37.8 MB | |||
| con-agua | ✋ | 17.7 ms | 8.6 MB | |||
| nanoda | ✋ | 0.500 ms | 3.4 MB | |||
| lazylean | ✋ | 1.09 ms | 21.1 MB | |||
| con-leche | ✋ | 3.82 ms | 21.1 MB | |||
| pestka-wasm | ✋ | 74.8 ms | 91.4 MB | |||
| tenet-jvm | ✋ | 97.4 ms | 64.5 MB | |||
| eink0rn | ✋ | 1.31 ms | 11.3 MB | |||
| official | ✋ | 27.7 ms | 67.3 MB | |||
| ind-models | ✋ | 99.8 ms | 108.0 MB | |||
| lean4lean | ✋ | 27.8 ms | 97.8 MB | |||
| tenet | ✋ | 115 ms | 44.3 MB | |||
| tenet-hs | ✋ | 1.11 ms | 7.7 MB | |||
| ocaml4lean | ✋ | 13.6 ms | 22.7 MB | |||
| lean4cobol | ✋ | 1.96 ms | 13.7 MB | |||
| evmlean | ✋ | 1.00 s | 267.3 MB | |||
| overfull | ✋ | 4.23 s | 45.6 MB | |||
| vow-lean-kernel | 👍 | 139 ms | 14.4 MB | |||
| mini | 👍 | 34.0 ms | 73.6 MB | |||
| canonical-min | 🚫 | 386 ms | 1.1 GB | |||
| kiota | 👍 | 0.621 ms | 9.2 MB | |||
| metalean-slow | ✋ | 29.7 ms | 69.0 MB | |||
| nanobruijn | 👍 | 0.469 ms | 3.5 MB | |||
| metalean-fast | ✋ | 29.8 ms | 70.9 MB | |||
| nanoclo-fortran | 👍 | 0.727 ms | 4.2 MB | |||
| rpylean | 👍 | 0.460 ms | 4.1 MB | |||
| mathgraph | 👍 | 0.640 ms | 33.6 MB | |||
| parse-only | 👍 | 27.4 ms | 65.2 MB |