Lean Kernel Arena (Preview) / bugs/pi-closure-context

Test "bugs/pi-closure-context"

Expected: ✋ reject · Size: 1.5 KB · Lines: 26 · lean4export: 3.1.0 · Lean: 4.35.0 · 📄 Declaration

Proof of False via a function whose codomain is checked against the type of its body's value instead of the value itself.

def FalseTy : Prop := ∀ P : Prop, P
def TrueTy : Prop := ∀ P : Prop, P → P
def trueProof : TrueTy := fun _ p => p
def bad : TrueTy → FalseTy := fun _ => FalseTy
theorem boom : FalseTy := bad trueProof

bad is ill typed: its value has type TrueTy → Prop. A checker that represents both function types as closures over the same body, FalseTy, and compares two such closures by their body, domain and environment alone, without telling a closure that evaluates the body from one that infers its type, finds TrueTy → Prop equal to TrueTy → 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 ⏱️ 🧠
gruszka ✋ 1.77 ms 66.0 MB
nano-lean ✋ 0.485 ms 10.3 MB
pestka ✋ 2.05 ms 18.5 MB
con-leche ✋ 3.89 ms 22.6 MB
con-ron ✋ 28.3 ms 43.6 MB
nucleus ✋ 23.9 ms 13.7 MB
official ✋ 42.1 ms 114.0 MB