Test "perf/proj-stuck-struct"
Expected: 👍 accept · Size: 50.1 KB · Lines: 916 · lean4export: 3.1.0 · Lean: 4.36.0 · Timeout: 40.0 s · 📄 Declaration · 🔗 Source
A definitional equality under a projection whose structure argument is stuck, distilled from a fuel-bridge lemma of con-leche's own proof library, on which con-leche ran out of memory.
step c n x : Nat × Nat recurses structurally on the fuel n; for a
variable x each level is stuck on match x, and each branch reads .1
of two recursive calls. stepN checks (step (id c) N x).1 =
(step c N x).1 by rfl, the sides differing only in id c vs c.
A checker that leaves a stuck projection's structure argument alone (as
the reference kernel's whnf_core does when reduce_proj fails) compares
step (id c) N x =?= step c N x, tries the arguments first, and is done
at once. A checker that replaces it by its weak head normal form has lost
the step head and unrolls the recursion tree on both sides:
exponential in N (con-leche before the fix: 0.2 s, 2 s, 17 s and
73 MB, 0.4 GB, 2.6 GB for N = 12, 16, 20; official, nanoda, lean4lean:
~0.02 s at every N).
| Checker | Result | ⏱️ | 🧠 | |||
|---|---|---|---|---|---|---|
| nano-lean | 👍 | 0.873 ms | (÷41) | 30.4 MB | (÷3.0) | |
| gruszka | 👍 | 2.25 ms | (÷16) | 105.9 MB | (+15%) | |
| mathgraph | 👍 | 1.73 ms | (÷21) | 29.7 MB | (÷3.1) | |
| sokonanoda | 👍 | 1.40 ms | (÷26) | 29.7 MB | (÷3.1) | |
| pestka | 👍 | 3.20 ms | (÷11) | 18.7 MB | (÷4.9) | |
| kefir | 👍 | 2.63 ms | (÷14) | 6.2 MB | (÷15) | |
| kefir-wasm | 👍 | 163 ms | (×4.5) | 91.3 MB | (-1%) | |
| con-ron | 👍 | 30.6 ms | (-15%) | 43.6 MB | (÷2.1) | |
| con-ron-stream | 👍 | 31.2 ms | (-13%) | 47.2 MB | (-49%) | |
| con-agua | 👍 | 22.0 ms | (-39%) | 19.9 MB | (÷4.6) | |
| nanobruijn | 👍 | 3.53 ms | (÷10) | 18.4 MB | (÷5.0) | |
| nanoda | 👍 | 2.04 ms | (÷18) | 3.2 MB | (÷29) | |
| con-leche | 👍 | 6.10 ms | (÷5.9) | 24.8 MB | (÷3.7) | |
| pestka-wasm | 👍 | 538 ms | (×15) | 325.3 MB | (×3.5) | |
| official-nightly | 👍 | 36.9 ms | (+2%) | 97.6 MB | (+6%) | |
| eink0rn | 👍 | 3.42 ms | (÷11) | 15.2 MB | (÷6.1) | |
| official | 👍 | 36.0 ms | 92.1 MB | |||
| ind-models | 👍 | 114 ms | (×3.2) | 111.5 MB | (+21%) | |
| kiota | 👍 | 3.00 ms | (÷12) | 11.2 MB | (÷8.2) | |
| tenet | 👍 | 149 ms | (×4.1) | 45.1 MB | (÷2.0) | |
| tenet-hs | 👍 | 3.77 ms | (÷9.6) | 13.8 MB | (÷6.7) | |
| logos-kernel | 👍 | 0.828 ms | (÷44) | 4.4 MB | (÷21) | |
| evmlean | 👍 | 21.7 s | (×603) | 325.7 MB | (×3.5) | |
| mini | 🚫 | 36.8 ms | 65.3 MB | |||
| overfull | ⌛ | — | — | |||
| lean4lean | 👍 | 34.0 ms | (-5%) | 89.9 MB | (-2%) | |
| lean4cobol | 👍 | 34.0 ms | (-6%) | 13.8 MB | (÷6.7) | |
| tenet-jvm | 👍 | 175 ms | (×4.9) | 81.1 MB | (-12%) | |
| nanoclo | 👍 | 1.54 ms | (÷23) | 55.3 MB | (-40%) | |
| vow-lean-kernel | ⌛ | — | — | |||
| canonical-min | ✋ | 392 ms | 1.0 GB | |||
| lazylean | 👍 | 2.07 ms | (÷17) | 21.6 MB | (÷4.3) | |
| rpylean | 👍 | 1.27 ms | (÷28) | 11.9 MB | (÷7.7) | |
| metalean-slow | 🚫 | 39.2 ms | 63.2 MB | |||
| metalean-fast | 👍 | 36.3 ms | (+1%) | 75.8 MB | (-18%) | |
| nanoclo-fortran | 👍 | 3.35 ms | (÷11) | 4.5 MB | (÷20) |