Lean Kernel Arena / bugs/constlevels

Test "bugs/constlevels"

Expected: ✋ reject · Size: 15.3 KB · Lines: 283 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

Regression test for undefined behavior in lazy_delta_reduction_step in the official kernel

In the function lazy_delta_reduction_step, the official kernel expects unfold_definition to always succeed. However, if the constant has an incorrect number of level parameters, it actually fails, which leads to memory corruption in lazy_delta_reduction_step.

This test is to check that the official kernel and also other kernels that closely follow the logic of the official kernel correctly handle this unfolding failure.

The issue in the official kernel was originally reported as https://github.com/leanprover/lean4/issues/10577.

Checker Result ⏱️ 🧠
nano-lean ✋ 0.618 ms 23.9 MB
gruszka ✋ 1.91 ms 100.0 MB
mathgraph ✋ 1.09 ms 29.8 MB
sokonanoda ✋ 0.940 ms 29.8 MB
pestka ✋ 2.34 ms 18.9 MB
kefir ✋ 1.00 ms 6.4 MB
kefir-wasm ✋ 131 ms 88.4 MB
con-ron ✋ 29.2 ms 41.7 MB
con-ron-stream ✋ 29.7 ms 45.2 MB
con-agua ✋ 20.4 ms 13.5 MB
nanobruijn ✋ 1.26 ms 12.0 MB
nanoda ✋ 0.896 ms 3.0 MB
con-leche ✋ 4.30 ms 22.8 MB
pestka-wasm ✋ 518 ms 313.4 MB
official-nightly ✋ 34.2 ms 108.0 MB
eink0rn ✋ 1.84 ms 12.3 MB
official ✋ 33.0 ms 101.9 MB
ind-models ✋ 101 ms 105.2 MB
kiota ✋ 1.23 ms 11.1 MB
tenet ✋ 145 ms 45.8 MB
tenet-hs ✋ 1.78 ms 9.7 MB
logos-kernel ✋ 0.513 ms 4.8 MB
evmlean ✋ 2.28 s 275.4 MB
mini ✋ 35.7 ms 73.5 MB
overfull ✋ 42.6 s 47.3 MB
lean4lean ✋ 30.9 ms 89.7 MB
lean4cobol ✋ 9.65 ms 13.5 MB
tenet-jvm ✋ 131 ms 77.6 MB
nanoclo ✋ 0.893 ms 49.5 MB
vow-lean-kernel ✋ 202 ms 14.4 MB
canonical-min 🚫 571 ms 1.1 GB
lazylean ✋ 1.33 ms 21.2 MB
rpylean ✋ 0.985 ms 10.5 MB
metalean-slow ✋ 33.0 ms 73.7 MB
metalean-fast ✋ 31.4 ms 72.3 MB
nanoclo-fortran ✋ 1.38 ms 4.8 MB