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 | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| mathgraph | ✋ | 1 ms | 31.6 MB | |||
| sokonanoda | ✋ | 1 ms | 29.7 MB | |||
| nanoclo | ✋ | 1 ms | 33.5 MB | |||
| con-ron | ✋ | 23 ms | 56.8 MB | |||
| lazylean | ✋ | 1 ms | 21.2 MB | |||
| nanoda | ✋ | 0 ms | 3.2 MB | |||
| nanobruijn | ✋ | 1 ms | 3.1 MB | |||
| con-leche | ✋ | 3 ms | 18.1 MB | |||
| eink0rn | ✋ | 1 ms | 11.2 MB | |||
| ind-models | ✋ | 58 ms | 105.2 MB | |||
| official | ✋ | 27 ms | 66.8 MB | |||
| lean4lean | ✋ | 28 ms | 96.0 MB | |||
| tenet | ✋ | 101 ms | 43.2 MB | |||
| nanoclo-fortran | ✋ | 1 ms | 4.3 MB | |||
| lean4cobol | ✋ | 1 ms | 13.4 MB | |||
| evmlean | ✋ | 490 ms | 132.6 MB | |||
| mini | ✋ | 34 ms | 74.3 MB | |||
| overfull | ✋ | 1.3 s | 45.6 MB | |||
| kiota | ✋ | 1 ms | 6.8 MB | |||
| canonical-min | ✋ | 390 ms | 1.1 GB | |||
| rpylean | ✋ | 0 ms | 4.2 MB | |||
| vow-lean-kernel | 👍 | 46 ms | 8.3 MB | |||
| official-v4.28.0 | ✋ | 34 ms | 73.8 MB | |||
| still-nanoda | ✋ | 0 ms | 3.3 MB | |||
| nyaya | ✋ | 2 ms | 8.8 MB | |||
| parse-only | 👍 | 27 ms | 65.6 MB |