Test "bugs/closure-level-subst"
Expected: ✋ reject · Size: 4.0 KB · Lines: 74 · lean4export: 3.1.0 · Lean: 4.35.0 · 📄 Declaration
Proof of False via two closures that differ only in their universe levels.
def FalseTy : Prop := ∀ P : Prop, P
def TrueTy : Prop := ∀ P : Prop, P → P
def trueProof : TrueTy := fun _ p => p
def A : Type := Prop → Prop → Prop
def seed : A := fun x _ => x
def Family.{u} : Sort (max 1 (u + 1)) := A → Sort u
def good : Family.{1} := fun _ => A
def lower : Family.{0} := good
def lowA : Prop := lower seed
def a : lowA := fun x _ => x
def b : lowA := fun _ y => y
def D (f : lowA) : Prop := f TrueTy FalseTy
def pa : D a := trueProof
theorem boom : D b := pa
lower is ill typed: good has type A → Type, and Family.{0} is
A → Prop. Both function types are Family's body, A → Sort u, under
empty environments that differ only in what u stands for. A checker that
compares such closures by their body, domain and environment, and takes two
empty environments to be equal whatever their universe substitutions, finds
them equal. Then lowA is a proposition that reduces to A, two different
functions inhabit it, and D b reduces to FalseTy. The file has no axioms
and no inductive types.
Sokonanoda accepted this export. Found by a differential run of Pestka against other checkers.
| Checker | Result | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| logos-kernel | ✋ | 0.414 ms | 4.5 MB | |||
| nano-lean | ✋ | 0.520 ms | 15.7 MB | |||
| sokonanoda | ✋ | 0.656 ms | 25.9 MB | |||
| pestka | ✋ | 0.725 ms | 10.4 MB | |||
| kefir | ✋ | 0.444 ms | 5.8 MB | |||
| nanoclo | ✋ | 0.660 ms | 41.5 MB | |||
| kefir-wasm | ✋ | 109 ms | 82.8 MB | |||
| con-ron | ✋ | 22.1 ms | 37.9 MB | |||
| con-agua | ✋ | 18.0 ms | 10.6 MB | |||
| nanoda | ✋ | 0.567 ms | 3.1 MB | |||
| lazylean | ✋ | 1.10 ms | 21.2 MB | |||
| con-leche | ✋ | 4.03 ms | 20.7 MB | |||
| pestka-wasm | ✋ | 78.4 ms | 91.9 MB | |||
| tenet-jvm | ✋ | 100 ms | 64.7 MB | |||
| eink0rn | ✋ | 1.44 ms | 11.7 MB | |||
| official | ✋ | 27.9 ms | 67.1 MB | |||
| ind-models | ✋ | 99.9 ms | 106.5 MB | |||
| lean4lean | ✋ | 96.8 ms | 104.4 MB | |||
| tenet | ✋ | 116 ms | 44.5 MB | |||
| tenet-hs | ✋ | 1.19 ms | 7.9 MB | |||
| ocaml4lean | ✋ | 13.6 ms | 23.6 MB | |||
| lean4cobol | ✋ | 2.76 ms | 13.4 MB | |||
| evmlean | ✋ | 1.09 s | 273.9 MB | |||
| overfull | ✋ | 7.38 s | 45.9 MB | |||
| vow-lean-kernel | ✋ | 140 ms | 14.3 MB | |||
| mini | ✋ | 34.1 ms | 74.4 MB | |||
| canonical-min | ✋ | 387 ms | 1.1 GB | |||
| kiota | ✋ | 0.677 ms | 9.2 MB | |||
| metalean-slow | ✋ | 29.9 ms | 71.1 MB | |||
| nanobruijn | ✋ | 0.598 ms | 5.5 MB | |||
| metalean-fast | ✋ | 30.1 ms | 74.0 MB | |||
| nanoclo-fortran | ✋ | 0.814 ms | 4.5 MB | |||
| rpylean | ✋ | 0.505 ms | 4.2 MB | |||
| mathgraph | 👍 | 0.606 ms | 31.6 MB | |||
| parse-only | 👍 | 27.5 ms | 65.8 MB |