Lean Kernel Arena (Preview) / perf/gf3-matrix-product

Test "perf/gf3-matrix-product"

Expected: 馃憤 accept 路 Size: 793.6鈥疜B 路 Lines: 15.1鈥痥 路 lean4export: 3.2.0 路 Lean: 4.38.0-nightly-2026-12-03 路 Timeout: 70.0鈥痵 路 馃搫 Declaration 路 馃敆 Source

The declaration to check is

Nat.beq (fp 4) 361572011084151223 = true

proved by decide +kernel, where fp m multiplies 781脳781 matrices over GF(3) along a fixed word of length m and reduces the product modulo 2^61 - 1. A matrix is a pair of bit-sliced Nat literals of 609 961 bits (the entries equal to 1 and those equal to 2), and one product runs 781 steps of shifting, masking, multiplying and xoring numbers of that size. The 14 input matrices are generated from Nat.pow b 32000 inside the file, so the test has no data.

This is a scaled-down copy of a real proof: the theorem ck97 of AxiomMath/CFSG's Certificates.Kernel.Sporadic.Fi24Seven.C06, which checks one chunk of a straight-line program over such matrices with CFSG's own mul3s and prodV (copied unchanged). ck97 has 86 products; this test has 3.

It measures big-Nat arithmetic and what the reduction caches keep. Every product's intermediates are big literals that a checker's whnf caches hold until the declaration ends, so memory grows by about 1 GiB per product: the official kernel (v4.35.0) needed about 17 G instructions and 3.5 GiB here, and ck97 itself about 87 GiB. A checker that hashes big literals by their low 64 bits only (Lean issue #15686) or keeps more intermediates than needed shows it here.

Checker Result 鈴憋笍 馃
gruszka 馃憤 2.42鈥痵 (+3%) 348.1鈥疢B (梅10)
nano-lean 馃憤 835鈥痬s (梅2.8) 3.4鈥疓B (-5%)
pestka 馃憤 992鈥痬s (梅2.4) 755.7鈥疢B (梅4.8)
con-leche 馃憤 2.84鈥痵 (+20%) 3.5鈥疓B (-2%)
con-ron 馃憤 6.79鈥痵 (脳2.9) 3.4鈥疓B (-5%)
nucleus 馃毇 0鈥痬s 0鈥疊
official 馃憤 2.36鈥痵 3.6鈥疓B