Lean Kernel Arena / corner-cases/alg-conv-trans-acc

Test "corner-cases/alg-conv-trans-acc"

Expected: 🤷 either · Size: 66.4 KB · Lines: 1.2 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

As Lean's type theory has undecidable conversion (a.k.a. definitional equality), there are bound to be gaps between so called "algorithmic" conversion (that which is implemented by a typechecker), and the "declarative" conversion.

In the official kernel, algorithmic conversion fails to be transitive. f 1 a is a normal form: a is a variable, so Acc.rec cannot fire on it. Proof irrelevance admits any other proof of Acc (· < ·) 1 in its place, and Acc.intro 1 fun _ => Acc.inv a carries a constructor at the head, so it reduces. left is that substitution, right the reduction it unblocks, and trans chains the two.

acc asks for the endpoints on their own, which means inventing the middle term: choosing, among the proofs of a proposition, the one that happens to reduce the right way. The kernel has no reason to go looking, the left side being normal already, and unfolding regardless does not terminate here, as each step makes the term larger.

References:

  • Mario Carneiro, The Type Theory of Lean, MSc thesis
Checker Result ⏱️ 🧠
sokonanoda ✋ 1 ms 70.3 MB
mathgraph ✋ 2 ms 76.1 MB
nanoclo ✋ 2 ms 55.8 MB
con-ron ✋ 26 ms 56.8 MB
nanobruijn ✋ 5 ms 17.7 MB
nanoda ✋ 3 ms 3.5 MB
lazylean ✋ 3 ms 23.0 MB
con-leche ✋ 9 ms 22.5 MB
eink0rn ✋ 4 ms 18.1 MB
official ✋ 35 ms 67.3 MB
ind-models ✋ 107 ms 105.6 MB
lean4lean ✋ 84 ms 106.9 MB
tenet ✋ 153 ms 47.9 MB
tenet-hs ✋ 5 ms 18.1 MB
lean4cobol ✋ 53 ms 14.0 MB
evmlean ✋ 25.8 s 327.1 MB
mini ✋ 137 ms 73.9 MB
overfull ⌛ 0 ms 0 B
metalean-slow 🚫 58 ms 76.2 MB
tenet-jvm ✋ 210 ms 72.5 MB
nanoclo-fortran ✋ 5 ms 5.2 MB
kiota ✋ 3 ms 11.4 MB
metalean-fast ✋ 39 ms 80.4 MB
canonical-min ✋ 392 ms 1.1 GB
rpylean ✋ 3 ms 7.9 MB
vow-lean-kernel ✋ 353 ms 8.8 MB
parse-only 👍 31 ms 66.6 MB