# Recipe — reproduce the settlement and the `d = 27` certificates All paths are project-relative. `python3` is the project virtualenv (`.venv/bin/python3`); the Lean check uses the project-local toolchain. ## 1. Settlement of the threshold ``` cd research/0023 ../../../../.venv/bin/python3 src/threshold_settlement.py # all checks PASS ../../../../.venv/bin/python3 tests/test_settlement.py # all tests PASS ``` `src/threshold_settlement.py` verifies in exact sympy arithmetic: `η = 25/861`, `1/A = 10000/2583 ∈ (3,4)`, `ω = A − 1/4 = 83/10000`, `4A = 2583/2500`, `4(A+ε_s) − 1 = 79/1250`, and the homogeneity `J(G)/I(G) = ρ·J(F)/I(F)` by symbolic integration of an explicit `F`. ## 2. `d = 27` exact certificates (streaming, no dense pair) ``` cd research/0023 SAH_PREC=1024 ../../../../.venv/bin/python3 src/certify_stream.py ``` For each configuration it computes the Ritz vector at the named degree via the blocked `arb` Cholesky whitening (reused from `research/0022/src`), rationalises it, and streams the exact rational `cᵀ(M₂ − τM₁)c` at its own degree and at `d = 27` (the full exact `(M₁,M₂)` assembly pass). Outputs: `out/cert_stream_k50_eps1_25_d27.json`, `out/cert_stream_k46_eps25_861_d27.json`, `out/cert_stream_k46_eps79_1250_d27.json`. The certificate-only path needs no `d = 27` whitening: the lifted vector gives the identical exact value by basis nesting. ## 3. Lean ``` cd bash scripts/lean-check.sh \ research/0023/lean/ThresholdSettlement.lean ``` Compiles clean with Mathlib; `out/lean-check.txt` records the run. ## 4. Engine dependencies The exact engine and the blocked `arb` Cholesky are reused from `research/0022/src` (also harvested in `lib/maynard/`), not duplicated; `src/certify_stream.py` is the new reusable instrument and is promoted to `lib/maynard/certify_stream.py`.