Lean Kernel Arena / constlevels

Test "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 ⏱️ 🧠
mathgraph 1 ms 34.0 MB
ind-models 59 ms 106.9 MB
official-nightly 29 ms 67.4 MB
evmlean 1.7 s 131.3 MB
nanoda 1 ms 3.1 MB
mini 36 ms 74.8 MB
lean4lean 29 ms 97.9 MB
sokonanoda 1 ms 33.7 MB
zignodamus 1 ms 5.1 MB
nanoclo 1 ms 45.6 MB
nanobruijn 1 ms 11.7 MB
kiota 1 ms 8.9 MB
official 29 ms 65.4 MB
vow-lean-kernel 125 ms 8.2 MB
rpylean 1 ms 8.7 MB
official-v4.28.0 💥 35 ms 73.1 MB
still-nanoda 1 ms 3.1 MB
nyaya 3 ms 10.2 MB
parse-only 👍 28 ms 61.9 MB