Skip to content

perf(row-reduce): optimize prepared helpers and complete Phase 4 evidence - #9880

Merged
kim-em merged 9 commits into
mainfrom
issue-9811
Sep 1, 2026
Merged

perf(row-reduce): optimize prepared helpers and complete Phase 4 evidence#9880
kim-em merged 9 commits into
mainfrom
issue-9811

Conversation

@kim-em

@kim-em kim-em commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Closes #9811

Summary

  • replace compiled free-column filtering with a proved linear sorted-complement implementation while retaining the theorem-facing definition
  • prepare the column-to-pivot table once for nullspace materialization, with a public bridge theorem for downstream proofs
  • add 12 direct compiled benchmarks covering every advertised row-reduction, span, and nullspace runtime surface
  • add an informational cached python-flint fmpq_mat.rref() rank comparator with protocol-overhead measurement and unit tests
  • wire the benchmark and oracle through monorepo and released-repository CI, release metadata, the Phase-4 audit, SPEC, and headline report
  • commit clean scientific evidence (all 12 complexity verdicts pass), two confidence-passing profiles, and exact proof-only factor-sweep exemptions

Validation

  • lake build (10,500 jobs)
  • lake build HexRowReduce.RowEchelon.Contracts HexBerlekamp.PackedKernel
  • HEX_FLINT_BENCH_PYTHON=/tmp/hex9811-flint/bin/python .lake/build/bin/hexrowreduce_bench verify (23/23)
  • fresh hexrowreduce_emit_fixtures diff plus matrix_flint.py (27/27)
  • python3 scripts/check_phase4.py
  • python3 scripts/check_dag.py
  • python3 scripts/release/check_released_manifest.py
  • python3 scripts/ci/check_benches_mathlib_free.py
  • python3 scripts/ci/check_persistent_flint_warmup.py
  • oracle and CI lint unit tests
  • python3 scripts/bench/check_factor_sweep_freshness.py

Scientific artifact: reports/bench-results/hex-row-reduce-phase4-scientific.json, SHA-256 ecc174e4ac710fa928f6e31464251ca5a0484d0ef3073992246af1f3e9a5e2f2.

Review and release prerequisite

A fresh Claude Opus review found substantive evidence and release-readiness gaps. This revision restores the full cubic nullspace ladder, discloses checksum profile cost and comparator eligibility/work mismatch, and records the refreshed pristine artifact. The required unmanaged benchmark sidecar skeleton is merged in leanprover/hex-row-reduce#2, and release-sync-baseline now records mirror main at 52cd2d3a156207bb5b16f00ab872a1055adf580f.

Kim Morrison added 7 commits September 1, 2026 01:25
Cost-model derivation: public elimination and nullspace wrappers are cubic; prepared span and nullspace materialization are quadratic; prepared coefficient and free-column traversals are linear.
Cost-model derivation: public row reduction, rank, span, and nullspace are cubic because dense elimination performs n pivots by n rows by n entries. Prepared span and nullspace materialization are quadratic, while prepared coefficient selection and the sorted free-column complement are linear.
Cost-model derivation: nullspace construction performs dense Gauss--Jordan elimination before basis materialization, so benchmark it against n^3 across 8, 12, 16, 24, 32, 48, and 64. The restored low-to-high ladder directly tests the claimed regime instead of sampling only the high endpoint. Document checksum attribution and comparator limitations identified by independent review.
Kim Morrison added 2 commits September 1, 2026 02:35
Record a pristine full-ladder run after restoring the cubic nullspace schedule. All twelve parametric targets pass their declared models, fixed hashes agree, and the report now includes comparator eligibility and checksum attribution.
# Conflicts:
#	.github/workflows/ci.yml
@kim-em
kim-em merged commit 17bd5fd into main Sep 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(row-reduce): optimize prepared helpers and complete Phase 4 evidence

1 participant