Lean Kernel Arena (Preview) / perf/irrelevance-refutes

Test "perf/irrelevance-refutes"

Expected: 馃憤 accept 路 Size: 13.3鈥疜B 路 Lines: 244 路 lean4export: 3.2.0 路 Lean: 4.38.0-nightly-2026-12-03 路 Timeout: 40.0鈥痵 路 馃搫 Declaration 路 馃敆 Source

The declaration to check is

f 100000 (slowRefl 100000) = f 100001 (slowRefl 100001)

proved by rfl, where f ignores its arguments and slowRefl m : m = m is a Nat.rec over m, so unfolding it to rfl takes 螛(m) steps.

Both sides apply f, so a checker may first compare the arguments, find them different, and then unfold f. Comparing the literals refutes for 螛(1). Comparing the proofs, proof irrelevance refutes them by their types, 100000 = 100000 against 100001 = 100001, also for 螛(1): two proofs of propositions that are not defeq are not defeq. A checker that takes only proof irrelevance's positive answer, and otherwise unfolds the proofs, evaluates both recursions for 螛(m).

When this test was added, official reached the proofs first. f is a regular definition at the head of both sides, so lazy_delta_reduction_step tried the arguments before unfolding it, and is_def_eq_args compared them last to first. (The congruence fallback at the end of is_def_eq_core, is_def_eq_app, compared first to last, but it was not reached here.) For the proofs, is_def_eq_core stopped on is_def_eq_proof_irrel's l_false.

Distilled from decide +kernel on Rat arithmetic, e.g. (1 : Rat) / 1000000000 * ((1000000 : Int) : Rat) = 1 / 1000, where the proofs are Nat.gcd_dvd terms by well-founded recursion and the comparison that reaches them is of Int.divExact's arguments, last to first.

Checker Result 鈴憋笍 馃
gruszka 馃憤 1.90鈥痬s (梅23) 98.0鈥疢B (-13%)
nano-lean 馃憤 0.600鈥痬s (梅71) 23.9鈥疢B (梅4.7)
pestka 馃憤 2.30鈥痬s (梅19) 16.8鈥疢B (梅6.7)
con-leche 馃憤 4.23鈥痬s (梅10) 25.2鈥疢B (梅4.5)
con-ron 馃憤 28.5鈥痬s (-33%) 43.7鈥疢B (梅2.6)
nucleus 馃憤 48.6鈥痬s (+13%) 13.6鈥疢B (梅8.3)
official 馃憤 42.9鈥痬s 112.6鈥疢B