Test "bugs/const-level-arity"
Expected: ✋ reject · Size: 1.3 KB · Lines: 27 · lean4export: 3.1.0 · Lean: 4.36.0 · 📄 Declaration · 🔗 Source
Constant application supplying more universe levels than the referenced declaration declares.
The export declares a monomorphic theorem mono : ∀ (p : Prop), p → p (with
levelParams: []) and theorem tooManyLevels : ∀ (p : Prop), p → p := mono.{0},
which instantiates mono with one universe level (0) instead of zero.
Neither declaration depends on Init.Prelude.
Unlike bugs/constlevels (which supplies too few levels alongside a type
mismatch to trigger undefined behavior in lazy delta unfolding),
tooManyLevels is otherwise well-typed and never unfolds mono: a checker
that fast-paths empty levelParams or zips decl.levelParams with const.us
without enforcing equal lengths silently ignores the trailing universe level
and accepts the export.
rpylean accepted this export (reported as
Julian/rpylean#38) because
constant reference checking and type inference bypassed the level-count check
when decl.levels was empty.
| Checker | Result | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| nano-lean | ✋ | 0.459 ms | 10.6 MB | |||
| gruszka | ✋ | 1.76 ms | 59.8 MB | |||
| mathgraph | ✋ | 0.646 ms | 25.7 MB | |||
| sokonanoda | ✋ | 0.650 ms | 25.8 MB | |||
| pestka | ✋ | 2.00 ms | 16.0 MB | |||
| kefir | ✋ | 0.420 ms | 5.6 MB | |||
| kefir-wasm | ✋ | 103 ms | 82.6 MB | |||
| con-ron | ✋ | 28.9 ms | 41.5 MB | |||
| con-ron-stream | ✋ | 29.4 ms | 45.1 MB | |||
| con-agua | ✋ | 20.2 ms | 11.5 MB | |||
| nanobruijn | ✋ | 0.470 ms | 3.5 MB | |||
| nanoda | ✋ | 0.473 ms | 3.1 MB | |||
| con-leche | ✋ | 3.94 ms | 22.5 MB | |||
| pestka-wasm | ✋ | 508 ms | 311.2 MB | |||
| official-nightly | ✋ | 33.1 ms | 97.3 MB | |||
| eink0rn | ✋ | 1.27 ms | 11.1 MB | |||
| official | ✋ | 31.9 ms | 101.9 MB | |||
| ind-models | ✋ | 99.8 ms | 107.0 MB | |||
| kiota | ✋ | 0.584 ms | 11.3 MB | |||
| tenet | ✋ | 108 ms | 45.0 MB | |||
| tenet-hs | ✋ | 1.06 ms | 7.7 MB | |||
| logos-kernel | ✋ | 0.405 ms | 4.5 MB | |||
| evmlean | ✋ | 1.02 s | 246.2 MB | |||
| mini | ✋ | 33.9 ms | 74.6 MB | |||
| overfull | ✋ | 2.57 s | 45.5 MB | |||
| lean4lean | ✋ | 29.7 ms | 100.6 MB | |||
| lean4cobol | ✋ | 1.69 ms | 13.7 MB | |||
| tenet-jvm | ✋ | 100 ms | 76.2 MB | |||
| nanoclo | ✋ | 0.619 ms | 33.6 MB | |||
| vow-lean-kernel | 🚫 | 117 ms | 14.5 MB | |||
| canonical-min | 👍 | 386 ms | 1.1 GB | |||
| lazylean | ✋ | 1.07 ms | 21.3 MB | |||
| rpylean | 👍 | 0.830 ms | 8.9 MB | |||
| metalean-slow | ✋ | 29.6 ms | 71.5 MB | |||
| metalean-fast | ✋ | 29.6 ms | 72.0 MB | |||
| nanoclo-fortran | ✋ | 0.641 ms | 4.4 MB |