Lean Kernel Arena / corner-cases/large-elim-maybe-prop

Test "corner-cases/large-elim-maybe-prop"

Expected: 🤷 either · Size: 3.1 KB · Lines: 55 · lean4export: 3.1.0 · Lean: 4.35.0 · 📄 Declaration

Large elimination for a type that may be a proposition but whose only field is a proof whenever it is:

MaybePropBox.{u} (α : Sort u) : Sort u | mk : α → MaybePropBox α
MaybePropBox.get.{u} (α : Sort u) (t : MaybePropBox α) : α :=
  MaybePropBox.rec (motive := fun _ => α) (fun x => x) t

The official kernel lets a possibly-Prop type with one constructor eliminate into every universe only when each field is a proof for every u (its universe normalizes to zero) or occurs in the constructor's result type. Neither holds for x : α, so it generates a recursor into Prop only; the inductive command refuses the type altogether, as for corner-cases/proj-maybe-prop. The recursor here is the one the kernel generates for the same type at level u + 1, with that level rewritten to u. It is still sound: at u = 0 the field x : α is a proof, so this is subsingleton elimination, and the same argument as in corner-cases/proj-maybe-prop applies. Compare bugs/large-elim-param, where two constructors make the same large recursor unsound.

Checker Result ⏱️ 🧠
logos-kernel ✋ 0.404 ms 3.3 MB
nano-lean ✋ 0.492 ms 17.7 MB
sokonanoda ✋ 0.711 ms 27.8 MB
pestka ✋ 0.734 ms 10.4 MB
kefir ✋ 0.424 ms 5.7 MB
nanoclo ✋ 0.679 ms 39.5 MB
kefir-wasm ✋ 102 ms 82.2 MB
con-ron 👍 22.1 ms 37.9 MB
con-agua 👍 18.0 ms 10.9 MB
nanoda ✋ 0.558 ms 3.3 MB
lazylean ✋ 1.10 ms 21.3 MB
con-leche 👍 3.97 ms 21.1 MB
pestka-wasm ✋ 81.2 ms 92.0 MB
tenet-jvm ✋ 105 ms 65.0 MB
eink0rn ✋ 1.30 ms 11.6 MB
official ✋ 27.8 ms 67.0 MB
ind-models ✋ 99.9 ms 106.7 MB
lean4lean ✋ 27.9 ms 97.1 MB
tenet ✋ 131 ms 44.3 MB
tenet-hs ✋ 1.17 ms 8.0 MB
ocaml4lean ✋ 13.1 ms 22.8 MB
lean4cobol ✋ 2.58 ms 13.5 MB
evmlean ✋ 1.08 s 252.5 MB
overfull ✋ 5.98 s 45.6 MB
vow-lean-kernel ✋ 119 ms 14.5 MB
mini ✋ 34.0 ms 74.2 MB
canonical-min 🚫 387 ms 1.1 GB
kiota ✋ 0.591 ms 9.0 MB
metalean-slow ✋ 29.8 ms 71.2 MB
nanobruijn ✋ 0.684 ms 9.1 MB
metalean-fast ✋ 29.8 ms 71.8 MB
nanoclo-fortran ✋ 0.790 ms 4.5 MB
rpylean 👍 0.478 ms 3.9 MB
mathgraph ✋ 0.654 ms 31.7 MB
parse-only 👍 27.5 ms 66.0 MB