Lean Kernel Arena / corner-cases/let-value-type-mismatch

Test "corner-cases/let-value-type-mismatch"

Expected: 🤷 either · Size: 601 B · Lines: 13 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

A let has a mismatched annotation, but substitution removes the mismatch.

In readable notation, the exported declaration is:

def EcosystemCase : Sort 2 := let u : Sort 1 := Sort 1; u

The value Sort 1 has type Sort 2, rather than the annotated Sort 1. Checking the supplied let can therefore reject it. Substituting its value for u gives def EcosystemCase : Sort 2 := Sort 1, whose types match.

This records the choice to check the supplied annotation or first simplify the let. The discussion of this exact example supports allowing either outcome as practical checker policy, while leaving a completely authoritative answer open. This is not a false-theorem example.

Checker Result ⏱️ 🧠
nano-lean ✋ 0.448 ms 10.3 MB
gruszka ✋ 1.90 ms 46.0 MB
mathgraph ✋ 0.643 ms 26.0 MB
sokonanoda ✋ 0.645 ms 25.7 MB
pestka ✋ 1.97 ms 13.5 MB
kefir ✋ 0.403 ms 5.3 MB
kefir-wasm ✋ 104 ms 83.3 MB
con-ron ✋ 28.9 ms 43.6 MB
con-ron-stream ✋ 29.4 ms 45.1 MB
con-agua ✋ 20.0 ms 11.4 MB
nanobruijn ✋ 0.451 ms 3.4 MB
nanoda ✋ 0.455 ms 3.0 MB
con-leche ✋ 3.92 ms 25.0 MB
pestka-wasm ✋ 505 ms 311.2 MB
official-nightly ✋ 33.1 ms 107.8 MB
eink0rn ✋ 1.24 ms 11.0 MB
official ✋ 31.8 ms 101.6 MB
ind-models ✋ 99.7 ms 102.2 MB
kiota ✋ 0.555 ms 11.2 MB
tenet ✋ 105 ms 44.9 MB
tenet-hs ✋ 1.03 ms 7.6 MB
logos-kernel ✋ 0.401 ms 4.6 MB
evmlean ✋ 1.00 s 246.7 MB
mini ✋ 33.8 ms 73.9 MB
overfull ✋ 1.31 s 45.7 MB
lean4lean ✋ 29.7 ms 89.7 MB
lean4cobol ✋ 1.37 ms 13.3 MB
tenet-jvm ✋ 94.8 ms 76.0 MB
nanoclo ✋ 0.606 ms 37.5 MB
vow-lean-kernel 👍 112 ms 14.4 MB
canonical-min ✋ 389 ms 1.1 GB
lazylean ✋ 1.06 ms 21.3 MB
rpylean ✋ 0.835 ms 9.4 MB
metalean-slow ✋ 29.5 ms 71.1 MB
metalean-fast ✋ 29.5 ms 72.1 MB
nanoclo-fortran ✋ 0.614 ms 4.3 MB